mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
- Apply 'none' user selection preference (with admin consideration)
- Avoid potential infinite loop with no select options
This commit is contained in:
parent
0db144feb9
commit
a6ac5155ac
@ -111,6 +111,11 @@ var et2_selectAccount = et2_selectbox.extend(
|
||||
switch(type)
|
||||
{
|
||||
case 'none':
|
||||
if(typeof egw.user('apps').admin == 'undefined')
|
||||
{
|
||||
this.options.select_options = {};
|
||||
break;
|
||||
}
|
||||
case 'selectbox':
|
||||
case 'groupmembers':
|
||||
default:
|
||||
@ -164,9 +169,10 @@ var et2_selectAccount = et2_selectbox.extend(
|
||||
*/
|
||||
createMultiSelect: function() {
|
||||
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
var type = this.egw().preference('account_selection', 'common');
|
||||
if(type == 'none' && typeof egw.user('apps').admin == 'undefined') return;
|
||||
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
this.options.select_options = this._get_accounts();
|
||||
|
||||
|
@ -440,7 +440,9 @@ var et2_selectbox = et2_inputWidget.extend(
|
||||
{
|
||||
_value = _value.split(',');
|
||||
}
|
||||
if(this.input !== null && this.options.select_options && this.input.children().length == 0)
|
||||
if(this.input !== null && this.options.select_options && (
|
||||
!jQuery.isEmptyObject(this.options.select_options) || this.options.select_options.length > 0
|
||||
) && this.input.children().length == 0)
|
||||
{
|
||||
// No options set yet
|
||||
this.set_select_options(this.options.select_options);
|
||||
|
Loading…
Reference in New Issue
Block a user