From 15cccb43865cb8b78bd99253af976ff6366ef097 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 19 Jul 2016 03:41:16 -0400 Subject: add themes, switch pages and sites to use them --- data/assets/js/admin/dialogs/page-edit.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'data/assets/js') 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, }, }); -- cgit v1.2.3