From 32654e945c0d44e0c293ddb32c67122b64673fd1 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Thu, 29 Mar 2012 17:09:57 -0700 Subject: CSS Panel - Fix animation duration value updates from "infinite" to integer. --- js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js') diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index 0c950ffd..ecf0f9cd 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js @@ -1691,7 +1691,7 @@ NJCSSStyle.prototype.styleChange = function() { NJCSSStyle.prototype.getUnits = function(val) { if(val.split(/\s/).length > 1) { return false; - } else if(/px|em|pt|in|cm|mm|ex|pc|%/.test(val)) { + } else if(/(px|em|pt|in|cm|mm|ex|pc|%)$/.test(val)) { return val.replace(/^.*(px|em|pt|in|cm|mm|ex|pc|%).*/, '$1'); } return null; @@ -1771,7 +1771,7 @@ NJCSSStyle.prototype.updateValue = function(newValue, bypassUndo) { this.styleChange(); return true; } - + var IMPORTANT_FLAG = ' !important', dec = this.njRule.declaration, acceptAsValid = false, -- cgit v1.2.3 From a11ef2eed7049835c8bdfa50a2b893632c46eaa0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 11:11:58 -0700 Subject: Squashed commit of Preparing for the montage undo-manager: Architecture changes Reworked the add and remove elements into 1 function which can take 1 or more elements. Removed the _element from the selection array Many other changes related to those 2 changes Undo/Redo shortcuts are now using montage undo/redo manager. Signed-off-by: Valerio Virgillito --- js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js') diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index ecf0f9cd..2a3fc068 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js @@ -520,9 +520,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre this.inComputedStyleMode = false; // No computed styles mode for multiple items ///// if multiple items are selected, then show common rules - var elements = items.map(function(item) { - return item._element; - }); + var elements = Array.prototype.slice.call(this.application.ninja.selectedElements, 0); ///// show toolbar, but hide computed style button this.sections.styles.toolbar.style.display = ''; @@ -538,7 +536,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); this.sections.styles.showComputedEl.classList.remove('nj-css-panel-hide');// .style.display = ''; this.sections.styles.toolbar.style.display = ''; - this.showStylesForElement(items[0]._element, null); + this.showStylesForElement(items[0], null); } else { this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); this._inMultiSelectMode = false; -- cgit v1.2.3