mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 13:03:16 +01:00
Send back to server both checked and unchecked values if autoloading is used
This commit is contained in:
parent
422a341513
commit
a5f347d484
@ -442,7 +442,30 @@ var et2_tree = et2_inputWidget.extend(
|
||||
*/
|
||||
getValue: function() {
|
||||
if(this.input == null) return null;
|
||||
return this.options.multiple ? this.input.getAllChecked().split(this.input.dlmtr) : this.input.getSelectedItemId();
|
||||
if (this.options.multiple)
|
||||
{
|
||||
var allChecked = this.input.getAllChecked().split(this.input.dlmtr);
|
||||
var allUnchecked = this.input.getAllUnchecked().split(this.input.dlmtr);
|
||||
if (this.options.autoloading)
|
||||
{
|
||||
|
||||
var res = {};
|
||||
for (var i=0;i<allChecked.length;i++)
|
||||
{
|
||||
res[allChecked[i]]= {value:true};
|
||||
}
|
||||
for (var i=0;i<allUnchecked.length;i++)
|
||||
{
|
||||
res[allUnchecked[i]]= {value:false};
|
||||
}
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
return allChecked;
|
||||
}
|
||||
}
|
||||
return this.input.getSelectedItemId();
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user