aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/tabs/posts.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/assets/js/admin/tabs/posts.js')
-rw-r--r--data/assets/js/admin/tabs/posts.js12
1 files changed, 1 insertions, 11 deletions
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')
});