summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
Unidiff
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.js4
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
361 for (slotName in this.slotComponents()) { 361 for (slotName in this.slotComponents()) {
362 this.slotComponents()[slotName].remove(); 362 this.slotComponents()[slotName].remove();
363 delete this.slotComponents()[slotName]; 363 delete this.slotComponents()[slotName];
364 } 364 }
365 365
366 for (componentId in this.components()) { 366 for (componentId in this.components()) {
367 this.components()[componentId].remove(); 367 this.components()[componentId].remove();
368 delete this.components()[componentId]; 368 delete this.components()[componentId];
369 } 369 }
370 370
371 this.clear(); 371 this.clear();
372 MochiKit.Signal.disconnectAll(this); 372 MochiKit.Signal.disconnectAll(this);
373 }, 373 },
374 374
375 'append': function(aNode, aValue) { 375 'append': function(aNode, aValue) {
376 return Clipperz.DOM.Helper.append(aNode, aValue); 376 return Clipperz.DOM.Helper.append(aNode, aValue);
377 }, 377 },
378 378
379 'insertBefore': function (aNode, aValue) { 379 'insertBefore': function (aNode, aValue) {
380 return Clipperz.DOM.Helper.insertBefore(aNode, aValue); 380 return Clipperz.DOM.Helper.insertBefore(aNode, aValue);
381 }, 381 },
382 382
383 'insertAfter': function (aNode, aValue) { 383 'insertAfter': function (aNode, aValue) {
384 return Clipperz.DOM.Helper.insertAfter(aNode, aValue); 384 return Clipperz.DOM.Helper.insertAfter(aNode, aValue);
385 }, 385 },
386 386
387 //------------------------------------------------------------------------- 387 //-------------------------------------------------------------------------
388 388
389 'getId': function(aValue) { 389 'getId': function(aValue) {
390 varresult; 390 varresult;
391 391
392 if (typeof(aValue) != 'undefined') { 392 if (typeof(aValue) != 'undefined') {
393 result = this._ids[aValue]; 393 result = this._ids[aValue];
394 394
395 if (typeof(result) == 'undefined') { 395 if (typeof(result) == 'undefined') {
396 _Clipperz_PM_Components_base_id_ ++; 396 _Clipperz_PM_Components_base_id_ ++;
397 397
398 result = "Clipperz_PM_Components_" + aValue + "_" + _Clipperz_PM_Components_base_id_; 398 result = "Clipperz_PM_Components_" + aValue + "_" + _Clipperz_PM_Components_base_id_;
399 this._ids[aValue] = result; 399 this._ids[aValue] = result;
400 } 400 }
401 } else { 401 } else {
402 // result = Clipperz.PM.UI.Common.Components.BaseComponent.superclass.getId.call(this); 402 // result = Clipperz.PM.UI.Common.Components.BaseComponent.superclass.getId.call(this);
403 throw "call to BaseComponent.getId with an undefined value"; 403 throw "call to BaseComponent.getId with an undefined value";
404 } 404 }
405 405
406 return result; 406 return result;
407 }, 407 },
408 408
409 'getAnchor': function (aValue) {
410 return '#' + this.getId(aValue);
411 },
412
409 //------------------------------------------------------------------------- 413 //-------------------------------------------------------------------------
410 414
411 'getElement': function(aValue) { 415 'getElement': function(aValue) {
412 return Clipperz.DOM.get(this.getId(aValue)); 416 return Clipperz.DOM.get(this.getId(aValue));
413 }, 417 },
414 418
415 //------------------------------------------------------------------------- 419 //-------------------------------------------------------------------------
416 420
417 'hideElement': function(anElementName) { 421 'hideElement': function(anElementName) {
418 MochiKit.Style.hideElement(this.getElement(anElementName)); 422 MochiKit.Style.hideElement(this.getElement(anElementName));
419 }, 423 },
420 424
421 'showElement': function(anElementName) { 425 'showElement': function(anElementName) {
422 MochiKit.Style.showElement(this.getElement(anElementName)); 426 MochiKit.Style.showElement(this.getElement(anElementName));
423 }, 427 },
424 428
425 //------------------------------------------------------------------------- 429 //-------------------------------------------------------------------------
426 430
427 'activate': function () { 431 'activate': function () {
428 this._isActive = true; 432 this._isActive = true;
429 }, 433 },
430 434
431 'deactivate': function () { 435 'deactivate': function () {
432 this._isActive = false; 436 this._isActive = false;
433 }, 437 },
434 438
435 'isActive': function () { 439 'isActive': function () {
436 return this._isActive; 440 return this._isActive;
437 }, 441 },
438 442
439 //------------------------------------------------------------------------- 443 //-------------------------------------------------------------------------
440 444
441 'hideSlot': function(aSlotName) { 445 'hideSlot': function(aSlotName) {
442 if (this.componentForSlotNamed(aSlotName)) { 446 if (this.componentForSlotNamed(aSlotName)) {
443 this.componentForSlotNamed(aSlotName).deactivate(); 447 this.componentForSlotNamed(aSlotName).deactivate();
444 } 448 }
445 MochiKit.Style.hideElement(this.elementForSlotNamed(aSlotName)); 449 MochiKit.Style.hideElement(this.elementForSlotNamed(aSlotName));
446 }, 450 },
447 451
448 'showSlot': function(aSlotName) { 452 'showSlot': function(aSlotName) {
449 if (this.componentForSlotNamed(aSlotName)) { 453 if (this.componentForSlotNamed(aSlotName)) {
450 this.componentForSlotNamed(aSlotName).activate(); 454 this.componentForSlotNamed(aSlotName).activate();
451 } 455 }
452 MochiKit.Style.showElement(this.elementForSlotNamed(aSlotName)); 456 MochiKit.Style.showElement(this.elementForSlotNamed(aSlotName));
453 }, 457 },
454 458
455 //------------------------------------------------------------------------- 459 //-------------------------------------------------------------------------
456 460