fix broken group presentation in selected groups list
This commit is contained in:
parent
892e2a3321
commit
795a48d45c
|
@ -158,9 +158,12 @@ OCA = OCA || {};
|
||||||
/**
|
/**
|
||||||
* sets the selected groups
|
* sets the selected groups
|
||||||
*
|
*
|
||||||
* @param {Array} groups
|
* @param {string} groups
|
||||||
*/
|
*/
|
||||||
setGroups: function(groups) {
|
setGroups: function(groups) {
|
||||||
|
if(typeof groups === 'string') {
|
||||||
|
groups = groups.split("\n");
|
||||||
|
}
|
||||||
if(!this.isComplexGroupChooser) {
|
if(!this.isComplexGroupChooser) {
|
||||||
this.setElementValue(this.getGroupsItem().$element, groups);
|
this.setElementValue(this.getGroupsItem().$element, groups);
|
||||||
this.getGroupsItem().$element.multiselect('refresh');
|
this.getGroupsItem().$element.multiselect('refresh');
|
||||||
|
@ -224,10 +227,10 @@ OCA = OCA || {};
|
||||||
$selectedGroups, $(this.tabID).find('.ldapManyGroupsSearch')
|
$selectedGroups, $(this.tabID).find('.ldapManyGroupsSearch')
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
if(_.isUndefined || only.toLowerCase() === 'available') {
|
if(only.toLowerCase() === 'available') {
|
||||||
this.filterOnType[0].updateOptions();
|
this.filterOnType[0].updateOptions();
|
||||||
}
|
}
|
||||||
if(_.isUndefined || only.toLowerCase() === 'selected') {
|
if(only.toLowerCase() === 'selected') {
|
||||||
this.filterOnType[1].updateOptions();
|
this.filterOnType[1].updateOptions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue