diff options
author | Ananya Sen | 2012-06-04 10:43:29 -0700 |
---|---|---|
committer | Ananya Sen | 2012-06-04 10:43:29 -0700 |
commit | 6fb29883329c9c42a8b406128b92c0e6323a47be (patch) | |
tree | 07f46e88bccf9cdb7d4e6818e1b646b0d19f05b9 /js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | |
parent | cf097ec69e35c07ecae5a105ed5eeb78291c9ac2 (diff) | |
parent | c1ec69879028220b0c3f11ad6e24035bf527802c (diff) | |
download | ninja-6fb29883329c9c42a8b406128b92c0e6323a47be.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Conflicts:
js/ninja.reel/ninja.html
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js')
-rwxr-xr-x | js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index b4a803b2..b496ce4a 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | |||
@@ -57,11 +57,6 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
57 | 57 | ||
58 | this.eventManager.addEventListener("selectionChange", this, true); | 58 | this.eventManager.addEventListener("selectionChange", this, true); |
59 | this.eventManager.addEventListener("elementChange", this, true); | 59 | this.eventManager.addEventListener("elementChange", this, true); |
60 | this.eventManager.addEventListener("openDocument", this, true); | ||
61 | |||
62 | if(this.application.ninja.currentDocument) { | ||
63 | this.captureOpenDocument(); | ||
64 | } | ||
65 | 60 | ||
66 | this.addEventListener('webkitTransitionEnd', this, false); | 61 | this.addEventListener('webkitTransitionEnd', this, false); |
67 | ['sheets', 'styles'].forEach(function(section) { | 62 | ['sheets', 'styles'].forEach(function(section) { |
@@ -73,11 +68,29 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
73 | this._setUpToolbars(); | 68 | this._setUpToolbars(); |
74 | } | 69 | } |
75 | }, | 70 | }, |
76 | captureOpenDocument : { | 71 | |
77 | value : function(e) { | 72 | _currentDocument: { |
78 | this.populateStyleSheetList(); | 73 | value : null, |
74 | enumerable : false | ||
75 | }, | ||
76 | |||
77 | currentDocument : { | ||
78 | get : function() { | ||
79 | return this._currentDocument; | ||
80 | }, | ||
81 | set : function(value) { | ||
82 | if (value === this._currentDocument) { | ||
83 | return; | ||
84 | } | ||
85 | |||
86 | this._currentDocument = value; | ||
87 | |||
88 | if(this._currentDocument.currentView === "design") { | ||
89 | this.populateStyleSheetList(); | ||
90 | } | ||
79 | } | 91 | } |
80 | }, | 92 | }, |
93 | |||
81 | handleWebkitTransitionEnd : { | 94 | handleWebkitTransitionEnd : { |
82 | value: function(e) { | 95 | value: function(e) { |
83 | //console.log('transition end at panel base'); | 96 | //console.log('transition end at panel base'); |