diff options
author | Armen Kesablyan | 2012-05-08 16:43:43 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-08 16:43:43 -0700 |
commit | dc075ffcc6dd03c090d90fad999eee9b924d56ee (patch) | |
tree | 867f8bdd588c8f9076979233ca46a688ff70523e /node_modules/montage/ui/loader.reel/loader.js | |
parent | 5d7e470351fd150d5e70a97332fa2f2553797499 (diff) | |
parent | 4d949f141247215b5f2a6ec0cfc7d2d31cf2bb1f (diff) | |
download | ninja-dc075ffcc6dd03c090d90fad999eee9b924d56ee.tar.gz |
Merge branch 'refs/heads/dom-architecture' into binding
Conflicts:
js/components/layout/tools-properties.reel/tools-properties.html
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/loader.reel/loader.js')
-rwxr-xr-x | node_modules/montage/ui/loader.reel/loader.js | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/node_modules/montage/ui/loader.reel/loader.js b/node_modules/montage/ui/loader.reel/loader.js index 941c17da..921c3781 100755 --- a/node_modules/montage/ui/loader.reel/loader.js +++ b/node_modules/montage/ui/loader.reel/loader.js | |||
@@ -438,11 +438,33 @@ exports.Loader = Montage.create(Component, /** @lends module:montage/ui/loader.L | |||
438 | } | 438 | } |
439 | }, | 439 | }, |
440 | 440 | ||
441 | /** | ||
442 | Boolean that specifies whether to remove the loading content when load is completed | ||
443 | */ | ||
444 | removeContentOnLoad: { | ||
445 | value: true | ||
446 | }, | ||
447 | |||
448 | _forceContentRemoval: { | ||
449 | enumerable: false, | ||
450 | value: false | ||
451 | }, | ||
452 | |||
441 | _contentToRemove: { | 453 | _contentToRemove: { |
442 | enumerable: false, | 454 | enumerable: false, |
443 | value: null | 455 | value: null |
444 | }, | 456 | }, |
445 | 457 | ||
458 | /** | ||
459 | Forces a manual removal of loading content | ||
460 | */ | ||
461 | removeContent: { | ||
462 | value: function() { | ||
463 | this._forceContentRemoval = true; | ||
464 | this.needsDraw = true; | ||
465 | } | ||
466 | }, | ||
467 | |||
446 | draw: { | 468 | draw: { |
447 | value: function() { | 469 | value: function() { |
448 | // start loading the mainComponent if we haven't already | 470 | // start loading the mainComponent if we haven't already |
@@ -464,9 +486,11 @@ exports.Loader = Montage.create(Component, /** @lends module:montage/ui/loader.L | |||
464 | this.element.classList.remove(BOOTSTRAPPING_CLASS_NAME); | 486 | this.element.classList.remove(BOOTSTRAPPING_CLASS_NAME); |
465 | this.element.classList.remove(LOADING_CLASS_NAME); | 487 | this.element.classList.remove(LOADING_CLASS_NAME); |
466 | 488 | ||
467 | this._contentToRemove.extractContents(); | 489 | if(this.removeContentOnLoad || this._forceContentRemoval) { |
468 | this._contentToRemove.detach(); | 490 | this._contentToRemove.extractContents(); |
469 | this._contentToRemove = null; | 491 | this._contentToRemove.detach(); |
492 | this._contentToRemove = null; | ||
493 | } | ||
470 | 494 | ||
471 | this.element.classList.add(LOADED_CLASS_NAME); | 495 | this.element.classList.add(LOADED_CLASS_NAME); |
472 | } | 496 | } |