From 0c2d54c6159cf4b9e4c93e43c18ad4d08bf54faf Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 29 Jul 2016 17:10:50 -0400 Subject: enable generate secret button and add gripe() --- data/assets/js/admin/tabs/posts.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'data/assets/js/admin/tabs/posts.js') diff --git a/data/assets/js/admin/tabs/posts.js b/data/assets/js/admin/tabs/posts.js index a1e73c9..25f659e 100644 --- a/data/assets/js/admin/tabs/posts.js +++ b/data/assets/js/admin/tabs/posts.js @@ -167,18 +167,8 @@ jQuery(function($) { $('body').trigger('click'); send(type + '/add').fail(function(r) { - var msg = r.responseText; - - try { - var data = $.parseJSON(r); - if (data.error) - msg = data.error; - } catch (e) {} - - alert('Error: ' + msg); + gripe(r, 'add ' + type); }).done(function(r) { - console.log(r); - // show edit dialog $('#' + type + '-edit-dialog').data('post_id', r.post_id).modal('show') }); -- cgit v1.2.3