Revert "closes #992"

This reverts commit ed4b0461b9.
This commit is contained in:
psychobunny
2014-02-19 02:07:48 -05:00
parent bbe1a00d34
commit 6496ad95e8
3 changed files with 11 additions and 16 deletions

View File

@@ -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;
}