better toastr message on device delete

This commit is contained in:
Oliver Gorwits
2013-09-09 00:38:52 +01:00
parent 4f667a4f3a
commit 1e6d6fee78

View File

@@ -104,12 +104,17 @@
,url: uri_base + '/ajax/control/admin/' + mode
,data: tr.find('input[data-form="' + mode + '"],textarea[data-form="' + mode + '"]').serializeArray()
,success: function() {
if (mode != 'delete') {
toastr.info('Requested '+ mode +' for device '+ tr.data('for-device'));
}
else {
toastr.success('Deleted device '+ tr.data('for-device'));
}
}
// skip any error reporting for now
// TODO: fix sanity_ok in Netdisco Web
,error: function() {
toastr.error('Failed to '+ mode +' for device '+ tr.data('for-device'));
toastr.error('Failed to '+ mode +' device '+ tr.data('for-device'));
}
});
});