aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/dialogs/site-edit.js
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-07-30 18:40:08 -0400
committerPaul Duncan <pabs@pablotron.org>2016-07-30 18:40:08 -0400
commitbb2a315df93c173db84d2d6fc0cf1b2bdbd931a7 (patch)
tree831f46bd240348af1df70eb0abf98bb92b360f3e /data/assets/js/admin/dialogs/site-edit.js
parent9cec164e724465c11ff91772cdad3126de663ade (diff)
downloadguff-bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7.tar.bz2
guff-bb2a315df93c173db84d2d6fc0cf1b2bdbd931a7.zip
refactor site dialogs and add site editing
Diffstat (limited to 'data/assets/js/admin/dialogs/site-edit.js')
-rw-r--r--data/assets/js/admin/dialogs/site-edit.js18
1 files changed, 18 insertions, 0 deletions
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,
+ });
+ });
+ });
+});