listen for allusers/nousers click event
This commit is contained in:
parent
6f5b051821
commit
755dcdccaa
1 changed files with 11 additions and 8 deletions
|
@ -503,7 +503,17 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.$folder.forEach(function($folder) {
|
||||
$folder.options({users: self.enabledUsers});
|
||||
});
|
||||
} else if (data.id == 'allusers') {
|
||||
} else {
|
||||
self.options[data.id] = data.checked[0].id;
|
||||
set[data.id] = self.options[data.id];
|
||||
self.$folder.forEach(function($folder) {
|
||||
$folder.options(set);
|
||||
});
|
||||
that.triggerEvent('annotations' + data.id, set);
|
||||
}
|
||||
},
|
||||
click: function(data) {
|
||||
if (data.id == 'allusers') {
|
||||
self.enabledUsers = Ox.clone(self.users);
|
||||
self.users.forEach(function(user) {
|
||||
self.$optionsMenuButton.checkItem('user_' + user);
|
||||
|
@ -519,13 +529,6 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.$folder.forEach(function($folder) {
|
||||
$folder.options({users: self.enabledUsers});
|
||||
});
|
||||
} else {
|
||||
self.options[data.id] = data.checked[0].id;
|
||||
set[data.id] = self.options[data.id];
|
||||
self.$folder.forEach(function($folder) {
|
||||
$folder.options(set);
|
||||
});
|
||||
that.triggerEvent('annotations' + data.id, set);
|
||||
}
|
||||
},
|
||||
hide: function() {
|
||||
|
|
Loading…
Reference in a new issue