aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/dialogs/page-edit.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/assets/js/admin/dialogs/page-edit.js')
-rw-r--r--data/assets/js/admin/dialogs/page-edit.js11
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,
},
});