From bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 30 Jul 2016 18:40:08 -0400 Subject: refactor site dialogs and add site editing --- data/assets/js/admin/dialogs/site-edit.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/assets/js/admin/dialogs/site-edit.js (limited to 'data/assets/js/admin/dialogs/site-edit.js') diff --git a/data/assets/js/admin/dialogs/site-edit.js b/data/assets/js/admin/dialogs/site-edit.js new file mode 100644 index 0000000..5a35073 --- /dev/null +++ b/data/assets/js/admin/dialogs/site-edit.js @@ -0,0 +1,18 @@ +jQuery(function($) { + "use strict"; + + $('#site-edit-dialog').on('show.bs.modal', function() { + var me = $(this); + + send('site/get', { + site_id: me.data('site_id'), + }).fail(function(r) { + gripe(r, 'get site'); + }).done(function(r) { + me.trigger({ + type: 'guff.loaded', + site_data: r, + }); + }); + }); +}); -- cgit v1.2.3