X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=admin_pages.html;h=cc23bfc9535fc28fb557499deea589545c4c2de2;hb=01c953a17babb9d6fedb751671d7e05bc6f33a92;hp=59af576a758696ff29cc02688d5559b28e4e5d15;hpb=efec949cce9a02539f6b1dc50735334903ecc570;p=wfpl-cms.git
diff --git a/admin_pages.html b/admin_pages.html
index 59af576..cc23bfc 100644
--- a/admin_pages.html
+++ b/admin_pages.html
@@ -2,355 +2,464 @@
- ~$host~ Admin: Manage PagesAdd a new pageEdit page "~title html~"
-
-
-
-
+
+
-
+ editor.addCommand('wfpl_images', new CKEDITOR.dialogCommand('wfpl_images_dialog'));
+ editor.ui.addButton('wfpl_images', {
+ label: 'Insert Image',
+ command: 'wfpl_images',
+ toolbar: 'insert'
+ });
+ CKEDITOR.dialog.add('wfpl_images_dialog', function (api) {
+ var i, im, selected, thumbs;
+ selected = 'selected ';
+ thumbs = ''
+ for (i in window.cke_wfpl_images.images) {
+ im = window.cke_wfpl_images.images[i];
+ thumbs += '
'+ enc_html(im.name.length > 0 ? im.name : im.caption) + '
';
+ selected = '';
+ }
+ thumbs += '
'
+ return {
+ title: 'Insert Image',
+ minWidth: 700,
+ minHeight: 350,
+ contents: [
+ {
+ expand: true,
+ padding: 0,
+ elements: [
+ {
+ type: 'html',
+ html: ''
+ + '
Step 1: Choose an image to insert:
'
+ + thumbs
+ + '
If you\'d like to insert an image not shown above, you can upload it here. Sorry, it won\'t appear here until you reload this editor page (hit Save below, then "edit this page" again.)
'
+ + '
'
+ }
+ ]
+ }
+ ],
+ buttons: [
+ {
+ type: 'button',
+ label: 'Insert on Left',
+ className: 'cke_dialog_ui_button_ok',
+ onClick: function() {
+ cke_wfpl_images_insert_click(plugin_id, 'left');
+ }
+ },
+ {
+ type: 'button',
+ label: 'Insert Centered',
+ className: 'cke_dialog_ui_button_ok',
+ onClick: function() {
+ cke_wfpl_images_insert_click(plugin_id, 'centered');
+ }
+ },
+ {
+ type: 'button',
+ label: 'Insert on Right',
+ className: 'cke_dialog_ui_button_ok',
+ onClick: function() {
+ cke_wfpl_images_insert_click(plugin_id, 'right');
+ }
+ },
+ {
+ type: 'button',
+ label: 'Insert BIG',
+ className: 'cke_dialog_ui_button_ok',
+ onClick: function() {
+ cke_wfpl_images_insert_click(plugin_id, 'full');
+ }
+ },
+ CKEDITOR.dialog.cancelButton
+ ]
+ };
+ });
+ }
+ });
+ function make_wysiwyg(name, bodyid_postfix) {
+ CKEDITOR.replace(name, {
+ 'contentsCss': 'css.css?m=~css.css mtime~',
+ 'allowedContent': true,
+ bodyId: '~$basename~' + '_wysiwyg_' + (bodyid_postfix ? bodyid_postfix : name),
+ 'stylesSet': [
+ { name: 'Paragraph', element: 'p'},
+ { name: 'Page Headline', element: 'h1'},
+ { name: 'Section Headline', element: 'h2'},
+ { name: 'Subsection Headline', element: 'h3'},
+ { name: 'Tagline (under headline)', element: 'h4', attributes: { class: 'tagline'}},
+ { name: 'Quote', element: 'p', attributes: { class: 'quote'}},
+ { name: 'Quote Author', element: 'p', attributes: { class: 'attrib'}},
+ { name: 'div (generic box)', element: 'div'}
+ ],
+ 'uiColor': '#ccccff',
+ 'removePlugins': 'forms,templates,smiley,pagebreak,save,newpage,preview,print',
+ 'extraPlugins': 'wfpl_images',
+ 'height': '300px',
+ 'toolbar': [
+ ['Source'],
+ ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SpellChecker', 'Scayt'],
+ ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
+ '/',
+ ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript'],
+ ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
+ ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+ ['Link', 'Unlink', 'Anchor'],
+ ['wfpl_images', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'],
+ '/',
+ ['Styles', 'Font', 'FontSize'],
+ ['TextColor', 'BGColor'],
+ ['Maximize', 'ShowBlocks']
+ ]
+ });
+ }
+ 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
+ }
+
+
-
- ~$host~ Admin Control Panel
+
+ ~$host~ Admin Control Panel
+
+ Add a new pageEdit page "~title html~"
+
+
+ View archived versions of this page
+
+
+
-
+
+
+
-
-
-
+
+ ~$host~ Admin Control Panel
-
- ~$host~ Admin Control Panel
- Manage Pages
+ Manage Pages
-
- [Add a new page]
+
-
-
- No pages in database.
-
+ Edit history for page "~title html~"
- [Add a new page]
-
+
+ There are no archived versions of this page.
+
+
+
+
+