Explorar o código

Trigger event before removing element

Emmanuel Vella %!s(int64=12) %!d(string=hai) anos
pai
achega
5cc55ebd55
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Resources/public/base.js

+ 2 - 2
Resources/public/base.js

@@ -154,9 +154,9 @@ var Admin = {
         jQuery(subject).on('click', '.sonata-collection-delete', function(event) {
         jQuery(subject).on('click', '.sonata-collection-delete', function(event) {
             Admin.stopEvent(event);
             Admin.stopEvent(event);
 
 
-            jQuery(this).closest('.sonata-collection-row').remove();
-
             jQuery(this).trigger('sonata-collection-item-deleted');
             jQuery(this).trigger('sonata-collection-item-deleted');
+
+            jQuery(this).closest('.sonata-collection-row').remove();
         });
         });
     },
     },