listen for allusers/nousers click event

This commit is contained in:
j 2015-04-16 19:29:02 +05:30
parent 6f5b051821
commit 755dcdccaa

View file

@ -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() {