src/pyams_skin/resources/js/myams.js
changeset 23 02baebfdfbe8
parent 19 7d4bd86b3f30
child 27 5b990958e2da
--- a/src/pyams_skin/resources/js/myams.js	Tue Mar 03 16:40:39 2015 +0100
+++ b/src/pyams_skin/resources/js/myams.js	Wed Mar 04 00:03:45 2015 +0100
@@ -2,7 +2,7 @@
  * MyAMS
  * « My Application Management Skin »
  *
- * $Tag$
+ * $Tag: null $
  * A bootstrap based application/administration skin
  *
  * Custom administration and application skin tools
@@ -2937,7 +2937,11 @@
 						var object_name = tr.data('ams-element-name');
 						MyAMS.ajax.post(location + '/' + delete_target, {'object_name': object_name}, function(result, status) {
 							if (result.status == 'success') {
-								link.parents('tr').remove();
+								if (table.hasClass('datatable')) {
+									table.dataTable().fnDeleteRow(tr[0]);
+								} else {
+									tr.remove();
+								}
 							}
 						});
 					}
@@ -3570,8 +3574,10 @@
 		// Initialize modal dialogs links
 		$(document).off('click.modal')
 				   .on('click', '[data-toggle="modal"]', function(e) {
+			var source = $(this);
+			if (source.data('ams-click-stop-propagation') === true)
+				e.stopPropagation();
 			e.preventDefault();
-			var source = $(this);
 			ams.dialog.open(source);
 			if (source.parents('#shortcut').exists())
 				setTimeout(ams.skin._hideShortcutButtons, 300);