aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/properties.js
diff options
context:
space:
mode:
authorEric Guzman2012-05-25 16:37:43 -0700
committerEric Guzman2012-05-25 16:37:43 -0700
commite884d2769a53dd8920b485672631b50158ed0800 (patch)
tree526934085f973f0bcfef5a3f130794530396aa03 /js/panels/properties.reel/properties.js
parent1f7c17d688c3340b31d2e1c2b7205b10bd806968 (diff)
parent81239571c538f72e398fafa5b07725bf1bbb2d5d (diff)
downloadninja-e884d2769a53dd8920b485672631b50158ed0800.tar.gz
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-xjs/panels/properties.reel/properties.js12
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]);