a:38:{s:9:"#provides";s:23:"dojox.data.CssRuleStore";s:9:"#resource";s:20:"data/CssRuleStore.js";s:9:"#requires";a:3:{i:0;a:3:{i:0;s:6:"common";i:1;s:21:"dojo.data.util.filter";i:2;s:4:"dojo";}i:1;a:3:{i:0;s:6:"common";i:1;s:21:"dojo.data.util.sorter";i:2;s:4:"dojo";}i:2;a:2:{i:0;s:6:"common";i:1;s:14:"dojox.data.css";}}s:23:"dojox.data.CssRuleStore";a:6:{s:4:"type";s:8:"Function";s:7:"summary";s:39:"Basic store to display CSS information.";s:11:"description";s:748:"The CssRuleStore allows users to get information about active CSS rules in the page running the CssRuleStore. It can also filter out rules from specific stylesheets. The attributes it exposes on rules are as follows: selector: The selector text. classes: An array of classes present in this selector. rule: The actual DOM Rule object. style: The actual DOM CSSStyleDeclaration object. cssText: The cssText string provided on the rule object. styleSheet: The originating DOM Stylesheet object. parentStyleSheet: The parent stylesheet to the sheet this rule originates from. parentStyleSheetHref: The href of the parent stylesheet. AND every style attribute denoted as style.*, such as style.textAlign or style.backgroundColor";s:10:"parameters";a:1:{s:17:"keywordParameters";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:2447:"dojo.provide("dojox.data.CssRuleStore"); dojo.require("dojo.data.util.filter"); dojo.require("dojo.data.util.sorter"); dojo.require("dojox.data.css"); dojo.declare("dojox.data.CssRuleStore", null, { // summary: // Basic store to display CSS information. // description: // The CssRuleStore allows users to get information about active CSS rules in the page running the CssRuleStore. // It can also filter out rules from specific stylesheets. The attributes it exposes on rules are as follows: // selector: The selector text. // classes: An array of classes present in this selector. // rule: The actual DOM Rule object. // style: The actual DOM CSSStyleDeclaration object. // cssText: The cssText string provided on the rule object. // styleSheet: The originating DOM Stylesheet object. // parentStyleSheet: The parent stylesheet to the sheet this rule originates from. // parentStyleSheetHref: The href of the parent stylesheet. // AND every style attribute denoted as style.*, such as style.textAlign or style.backgroundColor _storeRef: '_S', _labelAttribute: 'selector', // text representation of the Item [label and identifier may need to stay due to method names] _cache: null, _browserMap: null, _cName: "dojox.data.CssRuleStore", constructor: function(/* Object */ keywordParameters){ // Initializes this store if(keywordParameters){ dojo.mixin(this, keywordParameters); } this._cache = {}; this._allItems = null; this._waiting = []; this.gatherHandle = null; var self = this; // CSS files may not be finished loading by the time the store is constructed. We need to // give them a little time, so setting the stylesheet loading to retry every 250ms. function gatherRules(){ try { // Funkiness here is due to css that may still be loading. This throws an DOM Access // error if css isnt completely loaded. self.context = dojox.data.css.determineContext(self.context); if(self.gatherHandle){ clearInterval(self.gatherHandle); self.gatherHandle = null; } // Handle any fetches that have been queued while we've been waiting on the CSS files // to finish while(self._waiting.length){ var item = self._waiting.pop(); dojox.data.css.rules.forEach(item.forFunc, null, self.context); item.finishFunc(); } }catch(e){} } this.gatherHandle = setInterval(gatherRules,250);";s:9:"classlike";b:1;}s:33:"dojox.data.CssRuleStore._storeRef";a:3:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:39:"dojox.data.CssRuleStore._labelAttribute";a:3:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:30:"dojox.data.CssRuleStore._cache";a:4:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:8:"instance";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:35:"dojox.data.CssRuleStore._browserMap";a:3:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:30:"dojox.data.CssRuleStore._cName";a:3:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:34:"dojox.data.CssRuleStore.setContext";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"context";a:1:{s:4:"type";s:5:"Array";}}s:6:"source";s:2720:"dojo.provide("dojox.data.CssRuleStore"); dojo.require("dojo.data.util.filter"); dojo.require("dojo.data.util.sorter"); dojo.require("dojox.data.css"); dojo.declare("dojox.data.CssRuleStore", null, { // summary: // Basic store to display CSS information. // description: // The CssRuleStore allows users to get information about active CSS rules in the page running the CssRuleStore. // It can also filter out rules from specific stylesheets. The attributes it exposes on rules are as follows: // selector: The selector text. // classes: An array of classes present in this selector. // rule: The actual DOM Rule object. // style: The actual DOM CSSStyleDeclaration object. // cssText: The cssText string provided on the rule object. // styleSheet: The originating DOM Stylesheet object. // parentStyleSheet: The parent stylesheet to the sheet this rule originates from. // parentStyleSheetHref: The href of the parent stylesheet. // AND every style attribute denoted as style.*, such as style.textAlign or style.backgroundColor _storeRef: '_S', _labelAttribute: 'selector', // text representation of the Item [label and identifier may need to stay due to method names] _cache: null, _browserMap: null, _cName: "dojox.data.CssRuleStore", constructor: function(/* Object */ keywordParameters){ // Initializes this store if(keywordParameters){ dojo.mixin(this, keywordParameters); } this._cache = {}; this._allItems = null; this._waiting = []; this.gatherHandle = null; var self = this; // CSS files may not be finished loading by the time the store is constructed. We need to // give them a little time, so setting the stylesheet loading to retry every 250ms. function gatherRules(){ try { // Funkiness here is due to css that may still be loading. This throws an DOM Access // error if css isnt completely loaded. self.context = dojox.data.css.determineContext(self.context); if(self.gatherHandle){ clearInterval(self.gatherHandle); self.gatherHandle = null; } // Handle any fetches that have been queued while we've been waiting on the CSS files // to finish while(self._waiting.length){ var item = self._waiting.pop(); dojox.data.css.rules.forEach(item.forFunc, null, self.context); item.finishFunc(); } }catch(e){} } this.gatherHandle = setInterval(gatherRules,250); }, setContext: function(/* Array */ context){ // Sets the context in which queries are executed // context: Array - Array of CSS string paths to execute queries within if(context){ this.close(); this.context = dojox.data.css.determineContext(context); }";s:7:"summary";s:0:"";}s:35:"dojox.data.CssRuleStore.getFeatures";a:4:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:6:"source";s:47:" return { "dojo.data.api.Read" : true };";s:7:"summary";s:36:"See dojo.data.api.Read.getFeatures()";}s:30:"dojox.data.CssRuleStore.isItem";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:79:" if(item && item[this._storeRef] == this){ return true; } return false;";s:7:"summary";s:31:"See dojo.data.api.Read.isItem()";}s:36:"dojox.data.CssRuleStore.hasAttribute";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:186:" this._assertIsItem(item); this._assertIsAttribute(attribute); var attrs = this.getAttributes(item); if(dojo.indexOf(attrs, attribute) != -1) { return true; } return false;";s:7:"summary";s:37:"See dojo.data.api.Read.hasAttribute()";}s:37:"dojox.data.CssRuleStore.getAttributes";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:287:" this._assertIsItem(item); var attrs = ['selector', 'classes', 'rule', 'style', 'cssText', 'styleSheet', 'parentStyleSheet', 'parentStyleSheetHref']; var style = item.rule.style; if(style){ var key; for(key in style){ attrs.push("style." + key); } } return attrs;";s:7:"summary";s:38:"See dojo.data.api.Read.getAttributes()";}s:32:"dojox.data.CssRuleStore.getValue";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}s:12:"defaultValue";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:158:" var values = this.getValues(item, attribute); var value = defaultValue; if(values && values.length > 0){ return values[0]; } return defaultValue;";s:7:"summary";s:33:"See dojo.data.api.Read.getValue()";}s:33:"dojox.data.CssRuleStore.getValues";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1285:" this._assertIsItem(item); this._assertIsAttribute(attribute); var value = null; if(attribute === "selector"){ value = item.rule["selectorText"]; if(value && dojo.isString(value)){ value = value.split(","); } }else if(attribute === "classes"){ value = item.classes; }else if(attribute === "rule"){ value = item.rule.rule; }else if(attribute === "style"){ value = item.rule.style; }else if(attribute === "cssText"){ if (dojo.isIE) { if(item.rule.style){ value = item.rule.style.cssText; if(value){ value = "{ " + value.toLowerCase() + " }"; } } }else{ value = item.rule.cssText; if(value){ value = value.substring(value.indexOf("{"), value.length); } } }else if(attribute === "styleSheet"){ value = item.rule.styleSheet; }else if(attribute === "parentStyleSheet"){ value = item.rule.parentStyleSheet; }else if(attribute === "parentStyleSheetHref"){ if(item.href){ value = item.href; } }else if(attribute.indexOf("style.") === 0){ var attr = attribute.substring(attribute.indexOf("."), attribute.length); value = item.rule.style[attr]; }else{ value = []; } if(value !== undefined){ if(!dojo.isArray(value)){ value = [value]; } } return value;";s:7:"summary";s:34:"See dojo.data.api.Read.getValues()";}s:32:"dojox.data.CssRuleStore.getLabel";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:79:" this._assertIsItem(item); return this.getValue(item, this._labelAttribute);";s:7:"summary";s:33:"See dojo.data.api.Read.getLabel()";}s:42:"dojox.data.CssRuleStore.getLabelAttributes";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:32:" return [this._labelAttribute];";s:7:"summary";s:43:"See dojo.data.api.Read.getLabelAttributes()";}s:37:"dojox.data.CssRuleStore.containsValue";a:6:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"item";a:1:{s:4:"type";s:4:"item";}s:9:"attribute";a:1:{s:4:"type";s:21:"attribute-name-string";}s:5:"value";a:1:{s:4:"type";s:8:"anything";}}s:6:"source";s:200:" var regexp = undefined; if(typeof value === "string"){ regexp = dojo.data.util.filter.patternToRegExp(value, false); } return this._containsValue(item, attribute, value, regexp); //boolean.";s:7:"summary";s:38:"See dojo.data.api.Read.containsValue()";s:7:"returns";s:8:"boolean.";}s:36:"dojox.data.CssRuleStore.isItemLoaded";a:6:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:9:"something";a:1:{s:4:"type";s:8:"anything";}}s:6:"source";s:42:" return this.isItem(something); //boolean";s:7:"summary";s:37:"See dojo.data.api.Read.isItemLoaded()";s:7:"returns";s:7:"boolean";}s:32:"dojox.data.CssRuleStore.loadItem";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"keywordArgs";a:1:{s:4:"type";s:6:"object";}}s:6:"source";s:39:" this._assertIsItem(keywordArgs.item);";s:7:"summary";s:33:"See dojo.data.api.Read.loadItem()";}s:29:"dojox.data.CssRuleStore.fetch";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"request";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:339:" request = request || {}; if(!request.store){ request.store = this; } var scope = request.scope || dojo.global; if(this._pending && this._pending.length > 0){ this._pending.push({request: request, fetch: true}); }else{ this._pending = [{request: request, fetch: true}]; this._fetch(request); } return request;";s:7:"summary";s:30:"See dojo.data.api.Read.fetch()";}s:30:"dojox.data.CssRuleStore._fetch";a:7:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"request";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:528:" var scope = request.scope || dojo.global; if(this._allItems === null){ this._allItems = {}; try{ if(this.gatherHandle){ this._waiting.push({'forFunc': dojo.hitch(this, this._handleRule), 'finishFunc': dojo.hitch(this, this._handleReturn)}); }else{ dojox.data.css.rules.forEach(dojo.hitch(this, this._handleRule), null, this.context); this._handleReturn(); } }catch(e){ if(request.onError){ request.onError.call(scope, e, request); } } }else{ this._handleReturn(); }";s:7:"summary";s:54:"Populates the _allItems object with unique class names";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:15:"request.onError";}}s:7:"private";b:1;}s:35:"dojox.data.CssRuleStore._handleRule";a:6:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"rule";a:1:{s:4:"type";s:0:"";}s:10:"styleSheet";a:1:{s:4:"type";s:0:"";}s:4:"href";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:642:" var selector = rule['selectorText']; var s = selector.split(" "); var classes = []; for(var j=0; j 0 && first !== -1){ var last = tmp.indexOf(',') || tmp.indexOf('['); tmp = tmp.substring(first, ((last !== -1 && last > first)?last:tmp.length)); classes.push(tmp); } } var item = {}; item.rule = rule; item.styleSheet = styleSheet; item.href = href; item.classes = classes; item[this._storeRef] = this; if(!this._allItems[selector]){ this._allItems[selector] = []; } this._allItems[selector].push(item);";s:7:"summary";s:125:"Handles the creation of an item based on the passed rule. In this store, this implies parsing out all available class names.";s:7:"private";b:1;}s:37:"dojox.data.CssRuleStore._handleReturn";a:5:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:6:"source";s:570:" var _inProgress = []; var items = []; var item = null; for(var i in this._allItems){ item = this._allItems[i]; for(var j in item){ items.push(item[j]); } } var requestInfo; // One-level deep clone (can't use dojo.clone, since we don't want to clone all those store refs!) while(this._pending.length){ requestInfo = this._pending.pop(); requestInfo.request._items = items; _inProgress.push(requestInfo); } while(_inProgress.length){ requestInfo = _inProgress.pop(); this._handleFetchReturn(requestInfo.request); }";s:7:"summary";s:203:"Handles the return from a fetching action. Delegates requests to act on the resulting item set to eitehr the _handleFetchReturn or _handleFetchByIdentityReturn depending on where the request originated.";s:7:"private";b:1;}s:42:"dojox.data.CssRuleStore._handleFetchReturn";a:7:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"request";a:1:{s:4:"type";s:7:"Request";}}s:6:"source";s:2197:" var scope = request.scope || dojo.global; var items = []; //Check to see if we've looked this query up before //If so, just reuse it, much faster. Only regen if query changes. var cacheKey = "all"; var i; if(request.query){ cacheKey = dojo.toJson(request.query); } if(this._cache[cacheKey]){ items = this._cache[cacheKey]; }else if(request.query){ for(i in request._items){ var item = request._items[i]; // Per https://bugs.webkit.org/show_bug.cgi?id=17935 , Safari 3.x always returns the selectorText // of a rule in full lowercase. var ignoreCase = dojo.isWebKit ? true : (request.queryOptions ? request.queryOptions.ignoreCase : false); var regexpList = {}; var key; var value; for(key in request.query){ value = request.query[key]; if(typeof value === "string"){ regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase); } } var match = true; for(key in request.query){ value = request.query[key]; if(!this._containsValue(item, key, value, regexpList[key])){ match = false; } } if(match){ items.push(item); } } this._cache[cacheKey] = items; }else{ for(i in request._items){ items.push(request._items[i]); } } var total = items.length; //Sort it if we need to. if(request.sort){ items.sort(dojo.data.util.sorter.createSortFunction(request.sort, this)); } var start = 0; var count = items.length; if(request.start > 0 && request.start < items.length){ start = request.start; } if(request.count && request.count){ count = request.count; } var endIdx = start + count; if(endIdx > items.length){ endIdx = items.length; } items = items.slice(start, endIdx); if(request.onBegin){ request.onBegin.call(scope, total, request); } if(request.onItem){ if(dojo.isArray(items)){ for(i = 0; i < items.length; i++){ request.onItem.call(scope, items[i], request); } if(request.onComplete){ request.onComplete.call(scope, null, request); } } }else if(request.onComplete){ request.onComplete.call(scope, items, request); } return request;";s:7:"summary";s:63:"Handles a fetchByIdentity request by finding the correct items.";s:6:"chains";a:1:{s:4:"call";a:3:{i:0;s:15:"request.onBegin";i:1;s:14:"request.onItem";i:2;s:18:"request.onComplete";}}s:7:"private";b:1;}s:29:"dojox.data.CssRuleStore.close";a:4:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:6:"source";s:44:" this._cache = {}; this._allItems = null;";s:7:"summary";s:130:"See dojo.data.api.Read.close() Clears out the cache and allItems objects, meaning all future fetches will requery the stylesheets.";}s:37:"dojox.data.CssRuleStore._assertIsItem";a:6:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:50:"The item to test for being contained by the store.";}}s:6:"source";s:92:" if(!this.isItem(item)){ throw new Error(this._cName + ": Invalid item argument."); }";s:7:"summary";s:78:"This function tests whether the item passed in is indeed an item in the store.";s:7:"private";b:1;}s:42:"dojox.data.CssRuleStore._assertIsAttribute";a:6:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:9:"attribute";a:2:{s:4:"type";s:21:"attribute-name-string";s:7:"summary";s:55:"The attribute to test for being contained by the store.";}}s:6:"source";s:108:" if(typeof attribute !== "string"){ throw new Error(this._cName + ": Invalid attribute argument."); }";s:7:"summary";s:101:"This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.";s:7:"private";b:1;}s:38:"dojox.data.CssRuleStore._containsValue";a:8:{s:9:"prototype";s:23:"dojox.data.CssRuleStore";s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:46:"The data item to examine for attribute values.";}s:9:"attribute";a:2:{s:4:"type";s:21:"attribute-name-string";s:7:"summary";s:25:"The attribute to inspect.";}s:5:"value";a:2:{s:4:"type";s:8:"anything";s:7:"summary";s:19:"The value to match.";}s:6:"regexp";a:3:{s:8:"optional";b:1;s:4:"type";s:6:"RegExp";s:7:"summary";s:196:"Optional regular expression generated off value if value was of string type to handle wildcarding. If present and attribute values are string, then it can be used for comparison instead of 'value'";}}s:6:"source";s:327:" return dojo.some(this.getValues(item, attribute), function(possibleValue){ if(possibleValue !== null && !dojo.isObject(possibleValue) && regexp){ if(possibleValue.toString().match(regexp)){ return true; // Boolean } }else if(value === possibleValue){ return true; // Boolean } return false; });";s:7:"summary";s:66:"Internal function for looking at the values contained by the item.";s:11:"description";s:230:"Internal function for looking at the values contained by the item. This function allows for denoting if the comparison should be case sensitive for strings or not (for handling filtering cases where string case should not matter)";s:7:"returns";s:7:"Boolean";s:7:"private";b:1;}s:31:"dojox.data.CssRuleStore.context";a:2:{s:8:"instance";s:23:"dojox.data.CssRuleStore";s:7:"summary";s:0:"";}s:32:"dojox.data.CssRuleStore._pending";a:3:{s:8:"instance";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:33:"dojox.data.CssRuleStore._allItems";a:3:{s:8:"instance";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:32:"dojox.data.CssRuleStore._waiting";a:3:{s:8:"instance";s:23:"dojox.data.CssRuleStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:36:"dojox.data.CssRuleStore.gatherHandle";a:2:{s:8:"instance";s:23:"dojox.data.CssRuleStore";s:7:"summary";s:0:"";}s:4:"this";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:17:"keywordParameters";}}s:7:"summary";s:0:"";}s:10:"dojox.data";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}