X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=admin_pages.html;h=0d5614c2bf37cb95c75f8ddf9ee769e6b99fb1ac;hb=9cd73aa3d18a76feb8fe640071c9e7e90abf4f8f;hp=e6630f5ea121ee6cf6f85daae350d777a9d4dc6d;hpb=ddc328b5b754c573d029b410375fc78b6da7c443;p=wfpl-cms.git diff --git a/admin_pages.html b/admin_pages.html index e6630f5..0d5614c 100644 --- a/admin_pages.html +++ b/admin_pages.html @@ -213,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'}, @@ -249,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 + } @@ -262,6 +298,10 @@

Add a new pageEdit page "~title html~"

+ +

View archived versions of this page

+ +
Title
@@ -279,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]
titlesaved atby
~title html~(untitled)~timestamp~~who html~ + + +
+ + +
+ + + +
+ +
- -

No pages in database.

- - -

[Add a new page]