diff options
author | Nivesh Rajbhandari | 2012-05-24 13:54:00 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-24 13:54:00 -0700 |
commit | fd4af6d81725dfa0630ac5e52ba95405336f4074 (patch) | |
tree | 868197f79862e98b9c7f5a1f296d64832c68d48f /js/panels/properties.reel/properties.js | |
parent | de25d2b7d05476d4f0d385b5e910db189f682d21 (diff) | |
parent | 70ff8dd670bc37c14caf850e06791d1e293b1e4b (diff) | |
download | ninja-fd4af6d81725dfa0630ac5e52ba95405336f4074.tar.gz |
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index b292a66a..e3ecce10 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -73,7 +73,7 @@ exports.Properties = Montage.create(Component, { | |||
73 | this.application.ninja.currentDocument.model.views.design.propertiesPanel = this; | 73 | this.application.ninja.currentDocument.model.views.design.propertiesPanel = this; |
74 | 74 | ||
75 | // Display the default document root PI | 75 | // Display the default document root PI |
76 | this.displayElementProperties(this.application.ninja.currentDocument.documentRoot); | 76 | this.displayElementProperties(this.application.ninja.currentDocument.model.documentRoot); |
77 | } | 77 | } |
78 | }, | 78 | }, |
79 | 79 | ||
@@ -95,7 +95,7 @@ exports.Properties = Montage.create(Component, { | |||
95 | this.elementId.value = this.elementId.value.replace(/\s/g, ''); | 95 | this.elementId.value = this.elementId.value.replace(/\s/g, ''); |
96 | 96 | ||
97 | // Check if that id is in use | 97 | // Check if that id is in use |
98 | if(this.application.ninja.currentDocument._document.getElementById(this.elementId.value) !== null) { | 98 | if(this.application.ninja.currentDocument.model.views.design.document.getElementById(this.elementId.value) !== null) { |
99 | // TODO: Replace with Ninja Alert | 99 | // TODO: Replace with Ninja Alert |
100 | alert("The following ID: " + this.elementId.value + " is already in use"); | 100 | alert("The following ID: " + this.elementId.value + " is already in use"); |
101 | } | 101 | } |
@@ -104,13 +104,13 @@ exports.Properties = Montage.create(Component, { | |||
104 | // ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); | 104 | // ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, "Change", "pi"); |
105 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, this.application.ninja.selectedElements[0].id, "pi"); | 105 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "id", this.elementId.value, this.application.ninja.selectedElements[0].id, "pi"); |
106 | } else { | 106 | } else { |
107 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); | 107 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.model.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.model.documentRoot.elementModel.id); |
108 | } | 108 | } |
109 | } else if(event.target.id === "elementClass") { | 109 | } else if(event.target.id === "elementClass") { |
110 | if(this.application.ninja.selectedElements.length) { | 110 | if(this.application.ninja.selectedElements.length) { |
111 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); | 111 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); |
112 | } else { | 112 | } else { |
113 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); | 113 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.model.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.model.documentRoot.elementModel.elementClass); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
@@ -135,7 +135,7 @@ exports.Properties = Montage.create(Component, { | |||
135 | value: function(event) { | 135 | value: function(event) { |
136 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update | 136 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update |
137 | if(event.detail.source && event.detail.source !== "pi") { | 137 | if(event.detail.source && event.detail.source !== "pi") { |
138 | var el = this.application.ninja.currentDocument.documentRoot; | 138 | var el = this.application.ninja.currentDocument.model.documentRoot; |
139 | if(this.application.ninja.selectedElements.length) { | 139 | if(this.application.ninja.selectedElements.length) { |
140 | el = this.application.ninja.selectedElements[0]; | 140 | el = this.application.ninja.selectedElements[0]; |
141 | } | 141 | } |
@@ -161,7 +161,7 @@ exports.Properties = Montage.create(Component, { | |||
161 | handleSelectionChange: { | 161 | handleSelectionChange: { |
162 | value: function(event) { | 162 | value: function(event) { |
163 | if(event.detail.isDocument) { | 163 | if(event.detail.isDocument) { |
164 | this.displayElementProperties(this.application.ninja.currentDocument.documentRoot); | 164 | this.displayElementProperties(this.application.ninja.currentDocument.model.documentRoot); |
165 | } else { | 165 | } else { |
166 | if(this.application.ninja.selectedElements.length === 1) { | 166 | if(this.application.ninja.selectedElements.length === 1) { |
167 | this.displayElementProperties(this.application.ninja.selectedElements[0]); | 167 | this.displayElementProperties(this.application.ninja.selectedElements[0]); |