app/assets/javascripts/activeadmin-selleo-cms/custom.js in activeadmin-selleo-cms-0.0.20 vs app/assets/javascripts/activeadmin-selleo-cms/custom.js in activeadmin-selleo-cms-0.0.21
- old
+ new
@@ -18,13 +18,20 @@
function delete_asset(page_id, asset_id) {
$.ajax({
url: '/admin/assets/' + asset_id + '.js',
type: 'DELETE'
- }).success(function(){
- $('[data-attachment-id="' + asset_id + '"]').remove();
}).error(function(){
alert('Could not delete attachment');
+ });
+}
+
+function delete_related(page_id, related_item_id) {
+ $.ajax({
+ url: '/admin/related_items/' + related_item_id + '.js',
+ type: 'DELETE'
+ }).error(function(){
+ alert('Could not delete related item');
});
}
function update_positions(pagesArray) {
$('.update-positions-button').attr('disabled', true).attr('value', 'Saving...')
\ No newline at end of file