mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
convert numbers to string for consistent matching, 0 was never set, because it was treated as already set, which gives wrong result if it is not first option
This commit is contained in:
parent
07cd6838f5
commit
2c5ba307b5
@ -423,7 +423,9 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
this.set_select_options(this.options.select_options);
|
||||
},
|
||||
|
||||
set_value: function(_value) {
|
||||
set_value: function(_value)
|
||||
{
|
||||
if (typeof _value == "number") _value = ""+_value; // convert to string for consitent matching
|
||||
if(typeof _value == "string" && this.options.multiple && _value.match(/^[,0-9A-Za-z/-_]+$/) !== null)
|
||||
{
|
||||
_value = _value.split(',');
|
||||
@ -738,8 +740,8 @@ jQuery.extend(et2_selectbox,
|
||||
{
|
||||
/**
|
||||
* Find the select options for a widget, out of the many places they could be.
|
||||
* @param {et2_widget} Widget to check for. Should be some sort of select widget.
|
||||
* @param {object} Select options in attributes array
|
||||
* @param {et2_widget} widget to check for. Should be some sort of select widget.
|
||||
* @param {object} attr_options Select options in attributes array
|
||||
* @return {object} Select options, or empty object
|
||||
*/
|
||||
find_select_options: function(widget, attr_options)
|
||||
|
Loading…
Reference in New Issue
Block a user