a:21:{s:9:"#provides";s:28:"dojox.form._SelectStackMixin";s:9:"#resource";s:25:"form/_SelectStackMixin.js";s:28:"dojox.form._SelectStackMixin";a:3:{s:4:"type";s:8:"Function";s:7:"summary";s:636:"Mix this class in to a dojox.form._FormSelectWidget in order to provide support for "selectable" multiforms. The widget is pointed to a dijit.layout.StackContainer and will handle displaying and submitting the values of only the appropriate pane. The options for this widget will be automatically set - based on the panes that are in the stack container. The "title" attribute of the pane will be used for the display of the option. The "id" attribute of the pane will be used as the value of the option. In order to avoid running into unique ID constraint issues, a stackPrefix mechanism is provided.";s:9:"classlike";b:1;}s:36:"dojox.form._SelectStackMixin.stackId";a:3:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:6:"string";s:7:"summary";s:59:"The id of the stack that this widget is supposed to control";}s:40:"dojox.form._SelectStackMixin.stackPrefix";a:3:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:6:"string";s:7:"summary";s:559:"A prefix to remove from our stack pane ids when setting our options. This exists so that we won't run into unique ID constraints. For example, if stackPrefix is set to "foo_", and there are three panes in our stack with ids of "foo_a", "foo_b", and "foo_c", then the values of the options created for the stack controller widget will be "a", "b", and "c". This allows you to have multiple select stack widgets with the same values - without having to have the panes require the same ids.";}s:46:"dojox.form._SelectStackMixin._paneIdFromOption";a:7:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"oVal";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:51:" return (this.stackPrefix || "") + oVal; // String";s:7:"summary";s:38:"Gets the pane ID given an option value";s:7:"returns";s:6:"String";s:7:"private";b:1;}s:47:"dojox.form._SelectStackMixin._optionValFromPane";a:7:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";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:134:" var sp = this.stackPrefix; if(sp && id.indexOf(sp) === 0){ return id.substring(sp.length); // String } return id; // String";s:7:"summary";s:37:"Gets the option value given a pane ID";s:7:"returns";s:6:"String";s:7:"private";b:1;}s:40:"dojox.form._SelectStackMixin._togglePane";a:6:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"pane";a:1:{s:4:"type";s:6:"Widget";}s:5:"shown";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:709:" if(pane._shown != undefined && pane._shown == shown){ return; } var widgets = dojo.filter(pane.getDescendants(), "return item.name;"); if(!shown){ // We are hiding - save the current state and then disable them savedStates = {}; dojo.forEach(widgets, function(w){ savedStates[w.id] = w.disabled; w.attr("disabled", true); }); pane._savedStates = savedStates; }else{ // We are showing - restore our saved states var savedStates = pane._savedStates||{}; dojo.forEach(widgets, function(w){ var state = savedStates[w.id]; if(state == undefined){ state = false; } w.attr("disabled", state); }); delete pane._savedStates; } pane._shown = shown;";s:7:"summary";s:86:"called when a pane is either shown or hidden (so that we can toggle the widgets on it)";s:7:"private";b:1;}s:39:"dojox.form._SelectStackMixin.onAddChild";a:5:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"pane";a:1:{s:4:"type";s:6:"Widget";}s:11:"insertIndex";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Integer";}}s:6:"source";s:356:" if(!this._panes[pane.id]){ this._panes[pane.id] = pane; this.addOption({value: this._optionValFromPane(pane.id), label: pane.title}); } if(!pane.onShow || !pane.onHide || pane._shown == undefined){ pane.onShow = dojo.hitch(this, "_togglePane", pane, true); pane.onHide = dojo.hitch(this, "_togglePane", pane, false); pane.onHide(); }";s:7:"summary";s:47:"Called when the stack container adds a new pane";}s:42:"dojox.form._SelectStackMixin.onRemoveChild";a:5:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"pane";a:1:{s:4:"type";s:6:"Widget";}}s:6:"source";s:119:" if(this._panes[pane.id]){ delete this._panes[pane.id]; this.removeOption(this._optionValFromPane(pane.id)); }";s:7:"summary";s:46:"Called when the stack container removes a pane";}s:42:"dojox.form._SelectStackMixin.onSelectChild";a:5:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"pane";a:1:{s:4:"type";s:6:"Widget";}}s:6:"source";s:55:" this._setValueAttr(this._optionValFromPane(pane.id));";s:7:"summary";s:50:"Called when the stack container selects a new pane";}s:38:"dojox.form._SelectStackMixin.onStartup";a:5:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"info";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:679:" var selPane = info.selected; this.addOption(dojo.filter(dojo.map(info.children, function(c){ var v = this._optionValFromPane(c.id); var toAdd = null; if(!this._panes[c.id]){ this._panes[c.id] = c; toAdd = {value: v, label: c.title}; } if(!c.onShow || !c.onHide || c._shown == undefined){ c.onShow = dojo.hitch(this, "_togglePane", c, true); c.onHide = dojo.hitch(this, "_togglePane", c, false); c.onHide(); } if(this._savedValue && v){ selPane = c; } return toAdd; }, this), function(i){ return i;})); delete this._savedValue; this.onSelectChild(selPane); if(!selPane._shown){ this._togglePane(selPane, true); }";s:7:"summary";s:45:"Called when the stack container is started up";}s:48:"dojox.form._SelectStackMixin.postMixInProperties";a:4:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:6:"source";s:118:" this._savedValue = this.value; this.inherited(arguments); this.connect(this, "onChange", "_handleSelfOnChange");";s:7:"summary";s:0:"";}s:39:"dojox.form._SelectStackMixin.postCreate";a:4:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:6:"source";s:595:" this.inherited(arguments); this._panes = {}; this._subscriptions = [ dojo.subscribe(this.stackId + "-startup", this, "onStartup"), dojo.subscribe(this.stackId + "-addChild", this, "onAddChild"), dojo.subscribe(this.stackId + "-removeChild", this, "onRemoveChild"), dojo.subscribe(this.stackId + "-selectChild", this, "onSelectChild") ]; var stack = dijit.byId(this.stackId); if(stack && stack._started){ // If we have a stack, and it's already started, call our onStartup now this.onStartup({children: stack.getChildren(), selected: stack.selectedChildWidget}); }";s:7:"summary";s:0:"";}s:36:"dojox.form._SelectStackMixin.destroy";a:4:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:6:"source";s:143:" dojo.forEach(this._subscriptions, dojo.unsubscribe); delete this._panes; // Fixes memory leak in IE this.inherited("destroy", arguments);";s:7:"summary";s:0:"";}s:48:"dojox.form._SelectStackMixin._handleSelfOnChange";a:6:{s:9:"prototype";s:28:"dojox.form._SelectStackMixin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"val";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:118:" var pane = this._panes[this._paneIdFromOption(val)]; if (pane){ dijit.byId(this.stackId).selectChild(pane); }";s:7:"summary";s:50:"Called when form select widget's value has changed";s:7:"private";b:1;}s:40:"dojox.form._SelectStackMixin._savedValue";a:3:{s:8:"instance";s:28:"dojox.form._SelectStackMixin";s:7:"private";b:1;s:7:"summary";s:0:"";}s:35:"dojox.form._SelectStackMixin._panes";a:3:{s:8:"instance";s:28:"dojox.form._SelectStackMixin";s:7:"private";b:1;s:7:"summary";s:0:"";}s:43:"dojox.form._SelectStackMixin._subscriptions";a:3:{s:8:"instance";s:28:"dojox.form._SelectStackMixin";s:7:"private";b:1;s:7:"summary";s:0:"";}s:10:"dojox.form";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:"";}}