diff options
Diffstat (limited to 'data/assets/js/admin/dialogs/blog-edit.js')
-rw-r--r-- | data/assets/js/admin/dialogs/blog-edit.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/data/assets/js/admin/dialogs/blog-edit.js b/data/assets/js/admin/dialogs/blog-edit.js index 46a782b..0084028 100644 --- a/data/assets/js/admin/dialogs/blog-edit.js +++ b/data/assets/js/admin/dialogs/blog-edit.js @@ -1,7 +1,23 @@ jQuery(function($) { "use strict"; - $('#blog-edit-dialog').on('post-data-loaded', function(r) { - console.log(r); + var p = '#blog-edit-'; + + $(p + 'dialog').on('guff.loaded', function(ev) { + var r = ev.post_data; + $(p + 'tags').val(r.tags); + }); + + $(p + 'confirm').click(function() { + $(p + 'dialog').trigger({ + type: 'guff.save', + + post_data: { + tags: $(p + 'tags').val(), + }, + }); + + // stop event + return false; }); }); |