a:31:{s:9:"#provides";s:5:"dijit";s:9:"#resource";s:16:"_base/manager.js";s:15:"dijit.WidgetSet";a:5:{s:4:"type";s:8:"Function";s:7:"summary";s:97:"A set of widgets indexed by id. A default instance of this class is available as `dijit.registry`";s:8:"examples";a:2:{i:0;s:182:"Create a small list of widgets: var ws = new dijit.WidgetSet(); ws.add(dijit.byId("one")); ws.add(dijit.byId("two")); // destroy both: ws.forEach(function(w){ w.destroy(); });";i:1;s:82:"Using dijit.registry: dijit.registry.forEach(function(w){ /* do something */ });";}s:6:"source";s:18:" this._hash = {};";s:9:"classlike";b:1;}s:19:"dijit.WidgetSet.add";a:5:{s:9:"prototype";s:15:"dijit.WidgetSet";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"widget";a:2:{s:4:"type";s:6:"Widget";s:7:"summary";s:41:"dijit._Widget Any dijit._Widget subclass.";}}s:6:"source";s:173:" if(this._hash[widget.id]){ throw new Error("Tried to register widget with id==" + widget.id + " but that id is already registered"); } this._hash[widget.id]=widget;";s:7:"summary";s:76:"Add a widget to this list. If a duplicate ID is detected, a error is thrown.";}s:22:"dijit.WidgetSet.remove";a:5:{s:9:"prototype";s:15:"dijit.WidgetSet";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:2:"id";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:24:" delete this._hash[id];";s:7:"summary";s:95:"Remove a widget from this WidgetSet. Does not destroy the widget; simply removes the reference.";}s:23:"dijit.WidgetSet.forEach";a:6:{s:9:"prototype";s:15:"dijit.WidgetSet";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"func";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:65:"A callback function to run for each item. Is passed a the widget.";}}s:6:"source";s:57:" for(var id in this._hash){ func(this._hash[id]); }";s:7:"summary";s:52:"Call specified function for each widget in this set.";s:8:"examples";a:1:{i:0;s:129:"Using the default `dijit.registry` instance: dijit.registry.forEach(function(widget){ console.log(widget.declaredClass); });";}}s:22:"dijit.WidgetSet.filter";a:7:{s:9:"prototype";s:15:"dijit.WidgetSet";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"filter";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:37:"Callback function to test truthiness.";}}s:6:"source";s:148:" var res = new dijit.WidgetSet(); this.forEach(function(widget){ if(filter(widget)){ res.add(widget); } }); return res; // dijit.WidgetSet";s:7:"summary";s:112:"Filter down this WidgetSet to a smaller new WidgetSet Works the same as `dojo.filter` and `dojo.NodeList.filter`";s:7:"returns";s:15:"dijit.WidgetSet";s:8:"examples";a:1:{i:0;s:162:"Arbitrary: select the odd widgets in this list var i = 0; dijit.registry.filter(function(w){ return ++i % 2 == 0; }).forEach(function(w){ /* odd ones */ });";}}s:20:"dijit.WidgetSet.byId";a:7:{s:9:"prototype";s:15:"dijit.WidgetSet";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:2:"id";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:41:" return this._hash[id]; // dijit._Widget";s:7:"summary";s:38:"Find a widget in this list by it's id.";s:7:"returns";s:13:"dijit._Widget";s:8:"examples";a:1:{i:0;s:194:"Test if an id is in a particular WidgetSet var ws = new dijit.WidgetSet(); ws.add(dijit.byId("bar")); var t = ws.byId("bar") // returns a widget var x = ws.byId("foo"); // returns undefined";}}s:23:"dijit.WidgetSet.byClass";a:7:{s:9:"prototype";s:15:"dijit.WidgetSet";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"cls";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:95:" return this.filter(function(widget){ return widget.declaredClass==cls; }); // dijit.WidgetSet";s:7:"summary";s:70:"Reduce this widgetset to a new WidgetSet of a particular declaredClass";s:7:"returns";s:15:"dijit.WidgetSet";s:8:"examples";a:1:{i:0;s:113:"Find all titlePane's in a page: dijit.registry.byClass("dijit.TitlePane").forEach(function(tp){ tp.close(); });";}}s:21:"dijit.WidgetSet._hash";a:3:{s:8:"instance";s:15:"dijit.WidgetSet";s:7:"private";b:1;s:7:"summary";s:0:"";}s:14:"dijit.registry";a:3:{s:4:"type";s:6:"Object";s:7:"summary";s:28:"A list of widgets on a page.";s:11:"description";s:35:"Is an instance of `dijit.WidgetSet`";}s:20:"dijit._widgetTypeCtr";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:18:"dijit._tabElements";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:23:"dijit._tabElements.area";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:25:"dijit._tabElements.button";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:24:"dijit._tabElements.input";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:25:"dijit._tabElements.object";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:25:"dijit._tabElements.select";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:27:"dijit._tabElements.textarea";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:17:"dijit.getUniqueId";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"widgetType";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:207:" var id; do{ id = widgetType + "_" + (widgetType in dijit._widgetTypeCtr ? ++dijit._widgetTypeCtr[widgetType] : dijit._widgetTypeCtr[widgetType] = 0); }while(dijit.byId(id)); return id; // String";s:7:"summary";s:44:"Generates a unique id for a given widgetType";s:7:"returns";s:6:"String";}s:17:"dijit.findWidgets";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"root";a:1:{s:4:"type";s:7:"DomNode";}}s:6:"source";s:416:" var outAry = []; function getChildrenHelper(root){ var list = dojo.isIE ? root.children : root.childNodes, i = 0, node; while(node = list[i++]){ if(node.nodeType != 1){ continue; } var widgetId = node.getAttribute("widgetId"); if(widgetId){ var widget = dijit.byId(widgetId); outAry.push(widget); }else{ getChildrenHelper(node); } } } getChildrenHelper(root); return outAry;";s:7:"summary";s:128:"Search subtree under root, putting found widgets in outAry. Doesn't search for nested widgets (ie, widgets inside other widgets)";}s:10:"dijit.byId";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:2:"id";a:1:{s:4:"type";s:13:"String|Widget";}}s:6:"source";s:69:" return (dojo.isString(id)) ? dijit.registry.byId(id) : id; // Widget";s:7:"summary";s:76:"Returns a widget by it's id, or if passed a widget, no-op (like dojo.byId())";s:7:"returns";s:6:"Widget";}s:12:"dijit.byNode";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"node";a:1:{s:4:"type";s:7:"DOMNode";}}s:6:"source";s:69:" return dijit.registry.byId(node.getAttribute("widgetId")); // Widget";s:7:"summary";s:53:"Returns the widget corresponding to the given DOMNode";s:7:"returns";s:6:"Widget";}s:24:"dijit.getEnclosingWidget";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"node";a:1:{s:4:"type";s:7:"DOMNode";}}s:6:"source";s:180:" while(node){ if(node.getAttribute && node.getAttribute("widgetId")){ return dijit.registry.byId(node.getAttribute("widgetId")); } node = node.parentNode; } return null;";s:7:"summary";s:136:"Returns the widget whose DOM tree contains the specified DOMNode, or null if the node is not contained within the DOM tree of any widget";}s:21:"dijit._isElementShown";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}}s:6:"source";s:183:" var style = dojo.style(elem); return (style.visibility != "hidden") && (style.visibility != "collapsed") && (style.display != "none") && (dojo.attr(elem, "type") != "hidden");";s:7:"private";b:1;s:7:"summary";s:0:"";}s:20:"dijit.isTabNavigable";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"elem";a:1:{s:4:"type";s:7:"Element";}}s:6:"source";s:429:" if(dojo.hasAttr(elem, "disabled")){ return false; } var hasTabindex = dojo.hasAttr(elem, "tabindex"); var tabindex = dojo.attr(elem, "tabindex"); if(hasTabindex && tabindex >= 0) { return true; // boolean } var name = elem.nodeName.toLowerCase(); if(((name == "a" && dojo.hasAttr(elem, "href")) || dijit._tabElements[name]) && (!hasTabindex || tabindex >= 0)){ return true; // boolean } return false; // boolean";s:7:"summary";s:36:"Tests if an element is tab-navigable";s:7:"returns";s:7:"boolean";}s:22:"dijit._getTabNavigable";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"root";a:1:{s:4:"type";s:7:"DOMNode";}}s:6:"source";s:893:" var first, last, lowest, lowestTabindex, highest, highestTabindex; var walkTree = function(/*DOMNode*/parent){ dojo.query("> *", parent).forEach(function(child){ var isShown = dijit._isElementShown(child); if(isShown && dijit.isTabNavigable(child)){ var tabindex = dojo.attr(child, "tabindex"); if(!dojo.hasAttr(child, "tabindex") || tabindex == 0){ if(!first){ first = child; } last = child; }else if(tabindex > 0){ if(!lowest || tabindex < lowestTabindex){ lowestTabindex = tabindex; lowest = child; } if(!highest || tabindex >= highestTabindex){ highestTabindex = tabindex; highest = child; } } } if(isShown && child.nodeName.toUpperCase() != 'SELECT'){ walkTree(child) } }); }; if(dijit._isElementShown(root)){ walkTree(root) } return { first: first, last: last, lowest: lowest, highest: highest };";s:7:"summary";s:45:"Finds descendants of the specified root node.";s:11:"description";s:398:"Finds the following descendants of the specified root node: * the first tab-navigable element in document order without a tabindex or with tabindex="0" * the last tab-navigable element in document order without a tabindex or with tabindex="0" * the first element in document order with the lowest positive tabindex value * the last element in document order with the highest positive tabindex value";s:7:"private";b:1;}s:28:"dijit.getFirstInTabbingOrder";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"root";a:1:{s:4:"type";s:14:"String|DOMNode";}}s:6:"source";s:115:" var elems = dijit._getTabNavigable(dojo.byId(root)); return elems.lowest ? elems.lowest : elems.first; // DomNode";s:7:"summary";s:82:"Finds the descendant of the specified root node that is first in the tabbing order";s:7:"returns";s:7:"DomNode";}s:27:"dijit.getLastInTabbingOrder";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"root";a:1:{s:4:"type";s:14:"String|DOMNode";}}s:6:"source";s:113:" var elems = dijit._getTabNavigable(dojo.byId(root)); return elems.last ? elems.last : elems.highest; // DomNode";s:7:"summary";s:81:"Finds the descendant of the specified root node that is last in the tabbing order";s:7:"returns";s:7:"DomNode";}s:21:"dijit.defaultDuration";a:1:{s:7:"summary";s:0:"";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}