Author: ralfbecker
New Revision: 55615
URL: http://svn.stylite.de/viewvc/egroupware?rev=55615&view=rev
Log:
storing select_options permanent when send with rows
Modified:
trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js
— trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_selectbox.js Mon Apr 4 20:36:33 2016
@@ -442,9 +442,11 @@
/**
* Set value
*
-
- */
- set_value: function(_value)
-
-
@param {string|number} _value
-
-
@param {boolean} _dont_try_set_options true: if _value is not in options, use “” instead of calling set_select_options
-
- */
- set_value: function(_value, _dont_try_set_options)
{
if (typeof _value == “number”) _value = “”+_value; // convert to string for consitent matching
if(typeof _value == “string” && (this.options.multiple || this.options.expand_multiple_rows) && _value.match(this._is_multiple_regexp) !== null)
@@ -498,10 +500,15 @@
{
if(this.options.select_options[_value] ||
this.options.select_options.filter &&
-
this.options.select_options.filter(function(value) {return value == _value;}) &&
-
!_dont_try_set_options)
{
// Options not set yet? Do that now, which will try again.
return this.set_select_options(this.options.select_options);
-
}
-
else if (_dont_try_set_options)
-
{
-
this.value = "";
}
else if (jQuery.isEmptyObject(this.options.select_options))
{
@@ -737,9 +744,10 @@
this._appendOptionElement(key, _options[key]);
}
}
-
if(this.value || this.options.empty_label) this.set_value(this.value, true); // true = dont try to set_options, to avoid an infinit recursion
},
getValue: function() {
@@ -1125,7 +1133,7 @@
var parent = widget._parent;
while(parent && !in_nextmatch)
{
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs