From 084576ca2dcaaff1184338e0ec4a587ee0dacee7 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Tue, 1 May 2012 12:06:15 -0700 Subject: CSS Panel - Added code hinting and tooltips --- 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 2a3fc068..ad8387de 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js @@ -4,8 +4,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ -var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").cssPropertyNameList, - cssCompletionMap = require("js/panels/CSSPanel/css-value-completion-map").cssValueCompletionMap, +var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").CssPropertyNameList, + cssCompletionMap = require("js/panels/CSSPanel/css-value-completion-map").CssValueCompletionMap, CSS_SHORTHAND_MAP = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP, keyboardModule = require("js/mediators/keyboard-mediator").Keyboard, nj = require("js/lib/NJUtils").NJUtils; -- cgit v1.2.3 From 2d31bce1b35001dfb7d1f63838abe8db1ddf019b Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Tue, 1 May 2012 16:24:36 -0700 Subject: CSS Panel - Modify pseudo class on getMatchedCSSRules --- js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 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 ad8387de..4c0a3611 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js @@ -822,17 +822,14 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre }, getAllRelatedRules : { value: function(element) { - var pseudos = [null],//, 'link', 'visited', 'active', 'hover', 'focus', 'first-letter', - //'first-line', 'first-child', 'before', 'after', 'lang'], - rules = [], + var rules = [], + win = element.ownerDocument.defaultView, self = this; - pseudos.forEach(function(pseudo) { - rules = rules.concat(nj.toArray(this.getMatchedCSSRules(element, ':'+pseudo)).filter(function(rule) { - var sheetId = (rule.parentStyleSheet) ? rule.parentStyleSheet.ownerNode.id : null; - return sheetId !== self._stageStyleSheetId; - })); - }, element.ownerDocument.defaultView); + rules = rules.concat(nj.toArray(win.getMatchedCSSRules(element)).filter(function(rule) { + var sheetId = (rule.parentStyleSheet) ? rule.parentStyleSheet.ownerNode.id : null; + return sheetId !== self._stageStyleSheetId; + })); return rules; } -- cgit v1.2.3