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 From 5914c5b2209c4b8daac4249bb76cda5c9314c4e6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 24 May 2012 00:07:23 -0700 Subject: Cleaning up referencing to 'documentRoot' and '_document' Moved to reference new model in DOM architecture rework. This should not affect anything, just moving the references, and also the setting to the render methods in the design view. --- js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 4c0a3611..b4a803b2 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js @@ -87,7 +87,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre populateStyleSheetList: { value: function() { - this.sections.sheets.doc = this.application.ninja.currentDocument._document; + this.sections.sheets.doc = this.application.ninja.currentDocument.model.views.design.document; var styleTagCount = 0, sect = this.sections.sheets, sheetsArray = nj.toArray(sect.doc.styleSheets), -- cgit v1.2.3