diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-19 03:41:16 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-19 03:41:16 -0400 |
commit | 15cccb43865cb8b78bd99253af976ff6366ef097 (patch) | |
tree | 94b51cbbc2405878509ca558c7be336e5223fdba /data/assets/js/admin | |
parent | f442f7a57b3b6b988f1d914b4ef5c53993b1fa90 (diff) | |
download | guff-15cccb43865cb8b78bd99253af976ff6366ef097.tar.bz2 guff-15cccb43865cb8b78bd99253af976ff6366ef097.zip |
add themes, switch pages and sites to use them
Diffstat (limited to 'data/assets/js/admin')
-rw-r--r-- | data/assets/js/admin/dialogs/page-edit.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/data/assets/js/admin/dialogs/page-edit.js b/data/assets/js/admin/dialogs/page-edit.js index 05d69a7..95c9a63 100644 --- a/data/assets/js/admin/dialogs/page-edit.js +++ b/data/assets/js/admin/dialogs/page-edit.js @@ -6,17 +6,20 @@ jQuery(function($) { $(p + 'dialog').on('guff.loaded', function(ev) { var r = ev.post_data; - $(p + 'layout a').removeClass('btn-primary').addClass('btn-default'); - $(p + 'layout a[data-val="' + r.layout + '"]') - .toggleClass('btn-primary btn-default'); + $(p + 'theme').val(r.theme_id || 'site-default'); }); $(p + 'confirm').click(function() { + var theme_id = $(p + 'theme').val(); + if (theme_id == 'site-default') + theme_id = null; + $(p + 'dialog').trigger({ type: 'guff.save', post_data: { - layout: $(p + 'layout .btn-primary').data('val'), + have_theme_id: 't', + theme_id: theme_id, }, }); |