fix #2737 (add 'Show All Users' and 'Show No Users')

This commit is contained in:
rolux 2015-04-15 19:01:51 +01:00
parent c7225757df
commit d42b9c25fb

View file

@ -504,13 +504,21 @@ Ox.AnnotationPanel = function(options, self) {
$folder.options({users: self.enabledUsers}); $folder.options({users: self.enabledUsers});
}); });
} else if (data.id == 'allusers') { } else if (data.id == 'allusers') {
self.enabledUsers = Ox.clone(self.users);
self.users.forEach(function(user) { self.users.forEach(function(user) {
self.$optionsMenuButton.checkItem('user_' + user); self.$optionsMenuButton.checkItem('user_' + user);
}); });
self.$folder.forEach(function($folder) {
$folder.options({users: self.enabledUsers});
});
} else if (data.id == 'nousers') { } else if (data.id == 'nousers') {
self.enabledUsers = [];
self.users.forEach(function(user) { self.users.forEach(function(user) {
self.$optionsMenuButton.uncheckItem('user_' + user); self.$optionsMenuButton.uncheckItem('user_' + user);
}); });
self.$folder.forEach(function($folder) {
$folder.options({users: self.enabledUsers});
});
} else { } else {
self.options[data.id] = data.checked[0].id; self.options[data.id] = data.checked[0].id;
set[data.id] = self.options[data.id]; set[data.id] = self.options[data.id];