From d4ce8c2fe42fcbfc36cf4b20ef8de67c6471c241 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 14 May 2012 23:44:47 -0700 Subject: CSSPanel - Add mutli-selection and adding classes to groups of elements --- js/panels/css-panel/rule-list-container.reel/rule-list-container.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/panels/css-panel/rule-list-container.reel/rule-list-container.js') diff --git a/js/panels/css-panel/rule-list-container.reel/rule-list-container.js b/js/panels/css-panel/rule-list-container.reel/rule-list-container.js index 511ff24c..50d69093 100644 --- a/js/panels/css-panel/rule-list-container.reel/rule-list-container.js +++ b/js/panels/css-panel/rule-list-container.reel/rule-list-container.js @@ -98,7 +98,9 @@ exports.RuleListContainer = Montage.create(Component, { value: function(selection) { var rules; - if(selection.length === 1) { + if(selection.length > 1) { + rules = this.stylesController.getCommonRules(selection); + } else if(selection.length === 1) { rules = this.stylesController.getMatchingRules(selection[0]); ///// Add inline style to rule list @@ -109,7 +111,7 @@ exports.RuleListContainer = Montage.create(Component, { style : selection[0].style }); - } //// TODO: support more selection types + } return rules; } -- cgit v1.2.3