X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=admin_pages.html;h=638b630dfa52651dc2ce2d5e0b774bef7fb58bd4;hb=948d843003f8f9f70e830e73ecd3e53bf231f247;hp=593b5c0128fa3fbbc9cd7ab63175376195199fca;hpb=3fe5000888dd47ae4de76a1f6678b2e21cacc1bc;p=wfpl-cms.git diff --git a/admin_pages.html b/admin_pages.html index 593b5c0..638b630 100644 --- a/admin_pages.html +++ b/admin_pages.html @@ -47,6 +47,7 @@ display: inline-block; overflow: hidden; text-align: center; + background-size: contain; background-position: 50% 50%; background-repeat: no-repeat; background-color: transparent; @@ -212,11 +213,11 @@ }); } }); - function make_wysiwyg(name) { + function make_wysiwyg(name, bodyid_postfix) { CKEDITOR.replace(name, { 'contentsCss': 'css.css?m=~css.css mtime~', 'allowedContent': true, - bodyId: '~$basename~' + '_wysiwyg_' + name, + bodyId: '~$basename~' + '_wysiwyg_' + (bodyid_postfix ? bodyid_postfix : name), 'stylesSet': [ { name: 'Paragraph', element: 'p'}, { name: 'Page Headline', element: 'h1'}, @@ -248,6 +249,42 @@ ] }); } + window.admin_pages_cur_layout = null + function admin_pages_layout(layout) { + if (layout === undefined) { + layout = document.getElementById('layout').value + } + if (typeof layout === 'string') { + layout = parseInt(layout); + } + if (layout === window.admin_pages_cur_layout) { + return; + } + // hide/show sidebar editor + if (layout === 0) { + document.getElementById('sidebar_editor').style.display = 'none' + } else { + document.getElementById('sidebar_editor').style.display = 'block' + } + // remove existing ckeditors + if (window.admin_pages_cur_layout !== null) { + for (name in CKEDITOR.instances) { + CKEDITOR.instances[name].destroy(); + } + } + // create ckeditors + if (layout === 0) { + make_wysiwyg('content', 'content_full_main'); + } else if (layout === 1) { + make_wysiwyg('content', 'content_with_sidebar_main'); + make_wysiwyg('sidebar_content', 'content_with_sidebar_sidebar_plain'); + } else { + make_wysiwyg('content', 'content_with_sidebar_main'); + make_wysiwyg('sidebar_content', 'content_with_sidebar_sidebar_bordered'); + } + + window.admin_pages_cur_layout = layout + } @@ -261,6 +298,10 @@

Add a new pageEdit page "~title html~"

+ +

View archived versions of this page

+ +
Title
@@ -278,6 +319,9 @@
(If you'd like this page to appear in the navigation with a shorter title.)
+
Page Template/Layout
+
+
Page Contents
-
+
+ + + +

~$host~ Admin Control Panel

+

Manage Pages

- -

[Add a new page]

+ + + + + + + + + + + + + + + + + +
(new) + +
(home page) +
+ + +
+
~title html~(untitled) +
+
+
+
+ + +

~$host~ Admin Control Panel

+ +

Edit history for page "~title html~"

+ +

There are no archived versions of this page.

+ + - - - - - - - - - - + + + + + + + + + + + + +
FilenameTitle 
~filename html~(offline)~title html~(untitled)[delete]
titleatby
~title html~(untitled)~timestamp~~who html~ + + +
+ + +
+ + + +
+ +
- -

No pages in database.

- - -

[Add a new page]