mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Importexport: fix allowed_users_change()
Not allowed to choose "all" or "just me" in combination with actual users, but this was broken by webcomponent upgrade
This commit is contained in:
parent
67e643be8d
commit
8e0192fb7c
@ -12,7 +12,6 @@
|
||||
|
||||
import "../../vendor/bower-asset/jquery/dist/jquery.min.js";
|
||||
//import "../../vendor/bower-asset/jquery-ui/jquery-ui.js";
|
||||
|
||||
import {EgwApp} from '../../api/js/jsapi/egw_app';
|
||||
import {egw} from "../../api/js/jsapi/egw_global";
|
||||
|
||||
@ -166,12 +165,15 @@ class ImportExportApp extends EgwApp
|
||||
* Allowed users widget has been changed, if 'All users' or 'Just me'
|
||||
* was selected, turn off any other options.
|
||||
*/
|
||||
allowed_users_change(node, widget)
|
||||
allowed_users_change(event, widget)
|
||||
{
|
||||
var value = widget.getValue();
|
||||
|
||||
// Only 1 selected, no checking needed
|
||||
if(value == null || value.length <= 1) return;
|
||||
if(value == null || value.length <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't jump it to the top, it's weird
|
||||
widget.selected_first = false;
|
||||
@ -183,9 +185,9 @@ class ImportExportApp extends EgwApp
|
||||
var special = specials[i];
|
||||
if((index = value.indexOf(special)) >= 0)
|
||||
{
|
||||
if(window.event.target.value == special)
|
||||
if(value.indexOf(special) == value.length - 1)
|
||||
{
|
||||
// Just clicked all/private, clear the others
|
||||
// Just clicked all/private (it's at the end), clear the others
|
||||
value = [special];
|
||||
}
|
||||
else
|
||||
@ -193,9 +195,6 @@ class ImportExportApp extends EgwApp
|
||||
// Just added another, clear special
|
||||
value.splice(index, 1);
|
||||
}
|
||||
|
||||
// A little highlight to call attention to the change
|
||||
jQuery('input[value="'+special+'"]',node).parent().parent().effect('highlight',{},500);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user