From 83fff4ad660e4c9ea82c234f051c58d96f84f3e3 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 25 May 2012 15:18:41 -0700 Subject: fix for the id and class controls in the pi the id and class did not set values from the pi because of the removals of all id's on element. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/panels/properties.reel/properties.js') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index e3ecce10..84b0d589 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -89,7 +89,7 @@ exports.Properties = Montage.create(Component, { handleBlur: { value: function(event) { - if(event.target.id === "elementId") { + if(event.target === this.elementId.element) { // Remove all white spaces from the id this.elementId.value = this.elementId.value.replace(/\s/g, ''); @@ -106,7 +106,7 @@ exports.Properties = Montage.create(Component, { } else { ElementsMediator.setAttribute(this.application.ninja.currentDocument.model.documentRoot, "id", this.elementId.value, "Change", "pi", this.application.ninja.currentDocument.model.documentRoot.elementModel.id); } - } else if(event.target.id === "elementClass") { + } else if(event.target === this.elementClass.element) { if(this.application.ninja.selectedElements.length) { ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, this.application.ninja.selectedElements[0].className, "pi"); } else { -- cgit v1.2.3