|
@@ -157,12 +157,16 @@ var Admin = {
|
|
var proto = container.attr('data-prototype');
|
|
var proto = container.attr('data-prototype');
|
|
proto = proto.replace(/\$\$name\$\$/g, container.children().length);
|
|
proto = proto.replace(/\$\$name\$\$/g, container.children().length);
|
|
jQuery(proto).insertBefore(jQuery(this).parent());
|
|
jQuery(proto).insertBefore(jQuery(this).parent());
|
|
|
|
+
|
|
|
|
+ jQuery(this).trigger('sonata-collection-item-added');
|
|
});
|
|
});
|
|
|
|
|
|
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).closest('.sonata-collection-row').remove();
|
|
|
|
+
|
|
|
|
+ jQuery(this).trigger('sonata-collection-item-deleted');
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|