diff options
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 8c2daa14..9af9253b 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -101,9 +101,7 @@ exports.Properties = Montage.create(Component, { | |||
101 | */ | 101 | */ |
102 | handleBlur: { | 102 | handleBlur: { |
103 | value: function(event) { | 103 | value: function(event) { |
104 | 104 | if(event.target.dataset.montageId === "elementId") { | |
105 | if(event.target.id === "elementId") { | ||
106 | |||
107 | // Remove all white spaces from the id | 105 | // Remove all white spaces from the id |
108 | this.elementId.value = this.elementId.value.replace(/\s/g, ''); | 106 | this.elementId.value = this.elementId.value.replace(/\s/g, ''); |
109 | 107 | ||
@@ -119,13 +117,14 @@ exports.Properties = Montage.create(Component, { | |||
119 | } else { | 117 | } else { |
120 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); | 118 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.id); |
121 | } | 119 | } |
122 | } else if(event.target.id === "elementClass") { | 120 | } else if(event.target.dataset.montageId === "elementClass") { |
123 | if(this.application.ninja.selectedElements.length) { | 121 | if(this.application.ninja.selectedElements.length) { |
124 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); | 122 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); |
125 | } else { | 123 | } else { |
126 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); | 124 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); |
127 | } | 125 | } |
128 | } | 126 | } |
127 | NJevent("updatedID",this.application.ninja.selectedElements[0]); | ||
129 | } | 128 | } |
130 | }, | 129 | }, |
131 | 130 | ||