|
|
|
@ -58,15 +58,14 @@ define(function() {
|
|
|
|
|
|
|
|
|
|
listEl.on('click', 'button[data-action]', function() {
|
|
|
|
|
var action = this.getAttribute('data-action'),
|
|
|
|
|
parent = $(this).parents('li[data-gid]'),
|
|
|
|
|
gid = parent.attr('data-gid'),
|
|
|
|
|
system = parseInt(parent.attr('data-system'), 10) === 1;
|
|
|
|
|
gid = $(this).parents('li[data-gid]').attr('data-gid');
|
|
|
|
|
|
|
|
|
|
switch (action) {
|
|
|
|
|
case 'delete':
|
|
|
|
|
bootbox.confirm('Are you sure you wish to delete this group?', function(confirm) {
|
|
|
|
|
if (confirm) {
|
|
|
|
|
socket.emit('admin.groups.delete', gid, function(err, data) {
|
|
|
|
|
console.log(err, data);
|
|
|
|
|
if(err) {
|
|
|
|
|
return app.alertError(err.message);
|
|
|
|
|
}
|
|
|
|
@ -107,8 +106,6 @@ define(function() {
|
|
|
|
|
|
|
|
|
|
detailsModal.attr('data-gid', groupObj.gid);
|
|
|
|
|
detailsModal.modal('show');
|
|
|
|
|
|
|
|
|
|
$('.hide-if-system')[system ? 'hide' : 'show']();
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|