Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js index 2a03fdf..b9d7adf 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js @@ -361,96 +361,100 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Compo for (slotName in this.slotComponents()) { this.slotComponents()[slotName].remove(); delete this.slotComponents()[slotName]; } for (componentId in this.components()) { this.components()[componentId].remove(); delete this.components()[componentId]; } this.clear(); MochiKit.Signal.disconnectAll(this); }, 'append': function(aNode, aValue) { return Clipperz.DOM.Helper.append(aNode, aValue); }, 'insertBefore': function (aNode, aValue) { return Clipperz.DOM.Helper.insertBefore(aNode, aValue); }, 'insertAfter': function (aNode, aValue) { return Clipperz.DOM.Helper.insertAfter(aNode, aValue); }, //------------------------------------------------------------------------- 'getId': function(aValue) { var result; if (typeof(aValue) != 'undefined') { result = this._ids[aValue]; if (typeof(result) == 'undefined') { _Clipperz_PM_Components_base_id_ ++; result = "Clipperz_PM_Components_" + aValue + "_" + _Clipperz_PM_Components_base_id_; this._ids[aValue] = result; } } else { // result = Clipperz.PM.UI.Common.Components.BaseComponent.superclass.getId.call(this); throw "call to BaseComponent.getId with an undefined value"; } return result; }, + 'getAnchor': function (aValue) { + return '#' + this.getId(aValue); + }, + //------------------------------------------------------------------------- 'getElement': function(aValue) { return Clipperz.DOM.get(this.getId(aValue)); }, //------------------------------------------------------------------------- 'hideElement': function(anElementName) { MochiKit.Style.hideElement(this.getElement(anElementName)); }, 'showElement': function(anElementName) { MochiKit.Style.showElement(this.getElement(anElementName)); }, //------------------------------------------------------------------------- 'activate': function () { this._isActive = true; }, 'deactivate': function () { this._isActive = false; }, 'isActive': function () { return this._isActive; }, //------------------------------------------------------------------------- 'hideSlot': function(aSlotName) { if (this.componentForSlotNamed(aSlotName)) { this.componentForSlotNamed(aSlotName).deactivate(); } MochiKit.Style.hideElement(this.elementForSlotNamed(aSlotName)); }, 'showSlot': function(aSlotName) { if (this.componentForSlotNamed(aSlotName)) { this.componentForSlotNamed(aSlotName).activate(); } MochiKit.Style.showElement(this.elementForSlotNamed(aSlotName)); }, //------------------------------------------------------------------------- |