a:35:{s:9:"#provides";s:28:"dojox.form._FormSelectWidget";s:9:"#resource";s:25:"form/_FormSelectWidget.js";s:9:"#requires";a:1:{i:0;a:3:{i:0;s:6:"common";i:1;s:22:"dijit.form._FormWidget";i:2;s:5:"dijit";}}s:28:"dojox.form._FormSelectWidget";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:27:"dijit.form._FormValueWidget";}s:4:"call";a:1:{i:0;s:27:"dijit.form._FormValueWidget";}}s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:37:"dojox.form._FormSelectWidget.multiple";a:3:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:7:"Boolean";s:7:"summary";s:48:"Matches the select's "multiple=" value";}s:40:"dojox.form._FormSelectWidget._multiValue";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:8:"instance";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:7:"Boolean";s:7:"summary";s:45:"Whether or not we are multi-valued (for form)";s:7:"private";b:1;}s:36:"dojox.form._FormSelectWidget.options";a:4:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:8:"instance";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:26:"dojox.form.__SelectOption[";s:7:"summary";s:92:"The set of options for our select item. Roughly corresponds to the html <option> tag.";}s:39:"dojox.form._FormSelectWidget.getOptions";a:7:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"valueOrIdx";a:2:{s:4:"type";s:8:"anything";s:7:"summary";s:542:"If passed in as a string, that string is used to look up the option in the array of options - based on the value property. (See dojox.form.__SelectOption). If passed in a number, then the option with the given index (0-based) within this select will be returned. If passed in a dojox.form.__SelectOption, the same option will be returned if and only if it exists within this select. If passed an array, then an array will be returned with each element in the array being looked up. If not passed a value, then all options will be returned";}}s:6:"source";s:1012:" var lookupValue = valueOrIdx, opts = this.options || [], l = opts.length; if(lookupValue === undefined){ return opts; // dojox.form.__SelectOption[] } if(dojo.isArray(lookupValue)){ return dojo.map(lookupValue, "return this.getOptions(item);", this); // dojox.form.__SelectOption[] } if(dojo.isObject(valueOrIdx)){ // We were passed an option - so see if it's in our array (directly), // and if it's not, try and find it by value. if (!dojo.some(this.options, function(o, idx){ if (o === lookupValue || (o.value && o.value === lookupValue.value)){ lookupValue = idx; return true; } return false; })){ lookupValue = -1; } } if(typeof lookupValue == "string"){ for(var i=0; i= 0 && lookupValue < l){ return this.options[lookupValue] // dojox.form.__SelectOption } return null; // null";s:7:"summary";s:36:"Returns a given option (or options).";s:14:"return_summary";s:550:"The option corresponding with the given value or index. null is returned if any of the following are true: - A string value is passed in which doesn't exist - An index is passed in which is outside the bounds of the array of options - A dojox.form.__SelectOption is passed in which is not a part of the select NOTE: the compare for passing in a dojox.form.__SelectOption checks if the value property matches - NOT if the exact option exists NOTE: if passing in an array, null elements will be placed in the returned array when a value is not found.";s:7:"returns";s:58:"dojox.form.__SelectOption[]|dojox.form.__SelectOption|null";}s:38:"dojox.form._FormSelectWidget.addOption";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"option";a:1:{s:4:"type";s:54:"dojox.form.__SelectOption, dojox.form.__SelectOption[]";}}s:6:"source";s:182:" if(!dojo.isArray(option)){ option = [option]; } dojo.forEach(option, function(i){ if(i && dojo.isObject(i)){ this.options.push(i); } }, this); this._loadChildren();";s:7:"summary";s:239:"Adds an option or options to the end of the select. If value of the option is empty or missing, a separator is created instead. Passing in an array of options will yeild slightly better performance since the children are only loaded once.";}s:41:"dojox.form._FormSelectWidget.removeOption";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"valueOrIdx";a:1:{s:4:"type";s:51:"string, dojox.form.__SelectOption, number, or array";}}s:6:"source";s:318:" if(!dojo.isArray(valueOrIdx)){ valueOrIdx = [valueOrIdx]; } var oldOpts = this.getOptions(valueOrIdx); dojo.forEach(oldOpts, function(i){ this.options = dojo.filter(this.options, function(node, idx){ return (node.value !== i.value); }); this._removeOptionItem(i); }, this); this._loadChildren();";s:7:"summary";s:373:"Removes the given option or options. You can remove by string (in which case the value is removed), number (in which case the index in the options array is removed), or select option (in which case, the select option with a matching value is removed). You can also pass in an array of those values for a slightly better performance since the children are only loaded once.";}s:41:"dojox.form._FormSelectWidget.updateOption";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:9:"newOption";a:1:{s:4:"type";s:54:"dojox.form.__SelectOption, dojox.form.__SelectOption[]";}}s:6:"source";s:229:" if(!dojo.isArray(newOption)){ newOption = [newOption]; } dojo.forEach(newOption, function(i){ var oldOpt = this.getOptions(i), k; if(oldOpt){ for(k in i){ oldOpt[k] = i[k]; } } }, this); this._loadChildren();";s:7:"summary";s:225:"Updates the values of the given option. The option to update is matched based on the value of the entered option. Passing in an array of new options will yeild better performance since the children will only be loaded once.";}s:42:"dojox.form._FormSelectWidget._setValueAttr";a:6:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:8:"newValue";a:1:{s:4:"type";s:8:"anything";}s:14:"priorityChange";a:1:{s:4:"type";s:17:"Boolean, optional";}}s:6:"source";s:1016:" var opts = this.getOptions() || []; if(!dojo.isArray(newValue)){ newValue = [newValue]; } dojo.forEach(newValue, function(i, idx){ if(!dojo.isObject(i)){ i = i + ""; } if(typeof i === "string"){ newValue[idx] = dojo.filter(opts, function(node){ return node.value === i; })[0] || {value: "", label: ""}; } }, this); // Make sure some sane default is set newValue = dojo.filter(newValue, function(i){ return i && i.value; }); if(!this._multiValue && (!newValue[0] || !newValue[0].value) && opts.length){ newValue[0] = opts[0]; } dojo.forEach(opts, function(i){ i.selected = dojo.some(newValue, function(v){ return v.value === i.value; }); }); var val = dojo.map(newValue, function(i){ return i.value; }), disp = dojo.map(newValue, function(i){ return i.label; }); this.value = this._multiValue ? val : val[0]; this._setDisplay(this._multiValue ? disp : disp[0]); this._updateSelection(); this._handleOnChange(this.value, priorityChange);";s:7:"summary";s:93:"set the value of the widget. If a string is passed, then we set our value from looking it up.";s:7:"private";b:1;}s:51:"dojox.form._FormSelectWidget._getDisplayedValueAttr";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:290:" var val = this.attr("value"); if(!dojo.isArray(val)){ val = [val]; } var ret = dojo.map(this.getOptions(val), function(v){ if(v && "label" in v){ return v.label; }else if(v){ return v.value; } return null; }, this); return this._multiValue ? ret : ret[0];";s:7:"summary";s:41:"returns the displayed value of the widget";s:7:"private";b:1;}s:48:"dojox.form._FormSelectWidget._getValueDeprecated";a:3:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dojox.form._FormSelectWidget.getValue";a:4:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:25:" return this._lastValue;";s:7:"summary";s:28:"get the value of the widget.";}s:33:"dojox.form._FormSelectWidget.undo";a:4:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:53:" this._setValueAttr(this._lastValueReported, false);";s:7:"summary";s:54:"restore the value to the last value passed to onChange";}s:42:"dojox.form._FormSelectWidget._loadChildren";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:219:" dojo.forEach(this._getChildren(), function(child){ child.destroyRecursive(); }); // Add each menu item dojo.forEach(this.options, this._addOptionItem, this); // Update states this._updateSelection();";s:7:"summary";s:118:"Loads the children represented by this widget's optiosn. reset the menu to make it "populatable on the next click";s:7:"private";b:1;}s:45:"dojox.form._FormSelectWidget._updateSelection";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:497:" this.value = this._getValueFromOpts(); var val = this.value; if(!dojo.isArray(val)){ val = [val]; } if(val && val[0]){ dojo.forEach(this._getChildren(), function(child){ var isSelected = dojo.some(val, function(v){ return child.option && (v === child.option.value); }); dojo.toggleClass(child.domNode, this.baseClass + "SelectedOption", isSelected); dijit.setWaiState(child.domNode, "selected", isSelected); }, this); } this._handleOnChange(this.value);";s:7:"summary";s:68:"Sets the "selected" class on the item for styling purposes";s:7:"private";b:1;}s:46:"dojox.form._FormSelectWidget._getValueFromOpts";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:544:" var opts = this.getOptions() || []; if(!this._multiValue && opts.length){ // Mirror what a select does - choose the first one var opt = dojo.filter(opts, function(i){ return i.selected; })[0]; if(opt && opt.value){ return opt.value }else{ opts[0].selected = true; return opts[0].value; } }else if(this._multiValue){ // Set value to be the sum of all selected return dojo.map(dojo.filter(opts, function(i){ return i.selected; }), function(i){ return i.value; }) || []; } return "";";s:7:"summary";s:76:"Returns the value of the widget by reading the options for the selected flag";s:7:"private";b:1;}s:48:"dojox.form._FormSelectWidget.postMixInProperties";a:4:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:91:" this._multiValue = (this.multiple.toLowerCase() === "true"); this.inherited(arguments);";s:7:"summary";s:0:"";}s:41:"dojox.form._FormSelectWidget._fillContent";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:686:" var opts = this.options; if(!opts){ opts = this.options = this.srcNodeRef ? dojo.query(">", this.srcNodeRef).map(function(node){ if(node.getAttribute("type") === "separator"){ return { value: "", label: "", selected: false, disabled: false }; } return { value: node.getAttribute("value"), label: String(node.innerHTML), selected: node.getAttribute("selected") || false, disabled: node.getAttribute("disabled") || false }; }, this) : []; } if(!this.value){ this.value = this._getValueFromOpts(); }else if(this._multiValue && typeof this.value == "string"){ this.value = this.value.split(","); }";s:7:"summary";s:126:"Loads our options and sets up our dropdown correctly. We don't want any content, so we don't call any inherit chain function.";s:7:"private";b:1;}s:39:"dojox.form._FormSelectWidget.postCreate";a:4:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:274:" dojo.setSelectable(this.focusNode, false); this.inherited(arguments); // Make our event connections for updating state this.connect(this, "onChange", "_updateSelection"); this.connect(this, "startup", "_loadChildren"); this._setValueAttr(this.value, null);";s:7:"summary";s:67:"sets up our event handling that we need for functioning as a select";}s:43:"dojox.form._FormSelectWidget._addOptionItem";a:6:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"option";a:1:{s:4:"type";s:25:"dojox.form.__SelectOption";}}s:6:"source";s:261:" // summary: // User-overridable function which, for the given option, adds an // item to the select. If the option doesn't have a value, then a // separator is added in that place. Make sure to store the option // in the created option widget.";s:7:"summary";s:221:"User-overridable function which, for the given option, adds an item to the select. If the option doesn't have a value, then a separator is added in that place. Make sure to store the option in the created option widget.";s:7:"private";b:1;}s:46:"dojox.form._FormSelectWidget._removeOptionItem";a:6:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"option";a:1:{s:4:"type";s:25:"dojox.form.__SelectOption";}}s:6:"source";s:114:" // summary: // User-overridable function which, for the given option, removes // its item from the select.";s:7:"summary";s:88:"User-overridable function which, for the given option, removes its item from the select.";s:7:"private";b:1;}s:40:"dojox.form._FormSelectWidget._setDisplay";a:6:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:10:"newDisplay";a:1:{s:4:"type";s:18:"String or String[]";}}s:6:"source";s:215:" // summary: Overridable function which will set the display for the // widget. newDisplay is either a string (in the case of // single selects) or array of strings (in the case of multi- // selects)";s:7:"summary";s:178:"Overridable function which will set the display for the widget. newDisplay is either a string (in the case of single selects) or array of strings (in the case of multi- selects)";s:7:"private";b:1;}s:41:"dojox.form._FormSelectWidget._getChildren";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:12:" return [];";s:7:"summary";s:70:"Overridable function to return the children that this widget contains.";s:7:"private";b:1;}s:52:"dojox.form._FormSelectWidget._getSelectedOptionsAttr";a:5:{s:9:"prototype";s:28:"dojox.form._FormSelectWidget";s:4:"type";s:8:"Function";s:6:"source";s:45:" return this.getOptions(this.attr("value"));";s:7:"summary";s:109:"hooks into this.attr to provide a mechanism for getting the option items for the current value of the widget.";s:7:"private";b:1;}s:34:"dojox.form._FormSelectWidget.value";a:2:{s:8:"instance";s:28:"dojox.form._FormSelectWidget";s:7:"summary";s:0:"";}s:25:"dojox.form.__SelectOption";a:5:{s:4:"type";s:8:"Function";s:6:"source";s:577:"dojo.provide("dojox.form._FormSelectWidget"); dojo.require("dijit.form._FormWidget"); dojox.form.__SelectOption = function(){ // value: String // The value of the option. Setting to empty (or missing) will // place a separator at that location // label: String // The label for our option. It can contain html tags. // selected: Boolean // Whether or not we are a selected option // disabled: Boolean // Whether or not this specific option is disabled this.value = value; this.label = label; this.selected = selected; this.disabled = disabled;";s:7:"private";b:1;s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:31:"dojox.form.__SelectOption.value";a:4:{s:8:"instance";s:25:"dojox.form.__SelectOption";s:4:"type";s:6:"String";s:7:"summary";s:95:"The value of the option. Setting to empty (or missing) will place a separator at that location";s:14:"private_parent";b:1;}s:31:"dojox.form.__SelectOption.label";a:4:{s:8:"instance";s:25:"dojox.form.__SelectOption";s:4:"type";s:6:"String";s:7:"summary";s:52:"The label for our option. It can contain html tags.";s:14:"private_parent";b:1;}s:34:"dojox.form.__SelectOption.selected";a:4:{s:8:"instance";s:25:"dojox.form.__SelectOption";s:4:"type";s:7:"Boolean";s:7:"summary";s:39:"Whether or not we are a selected option";s:14:"private_parent";b:1;}s:34:"dojox.form.__SelectOption.disabled";a:4:{s:8:"instance";s:25:"dojox.form.__SelectOption";s:4:"type";s:7:"Boolean";s:7:"summary";s:47:"Whether or not this specific option is disabled";s:14:"private_parent";b:1;}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:"";}}