X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=inline;f=admin_pages.html;h=cc23bfc9535fc28fb557499deea589545c4c2de2;hb=01c953a17babb9d6fedb751671d7e05bc6f33a92;hp=62aaf7e2be217e3bd5f7276d242ce6aaa32ba023;hpb=452f05a9594192ab8aebd344629b737d557c6bb2;p=wfpl-cms.git
diff --git a/admin_pages.html b/admin_pages.html
index 62aaf7e..cc23bfc 100644
--- a/admin_pages.html
+++ b/admin_pages.html
@@ -2,340 +2,464 @@
- ~$host~ Admin: Pages ListingAdd 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
+ }
+
+
-
- Add a new pageEdit page "~title html~"
+
+ ~$host~ Admin Control Panel
+
+ Add a new pageEdit page "~title html~"
+
+
+ View archived versions of this page
+
+
+
-
-
+
+
+
-
+
+ ~$host~ Admin Control Panel
-
-
-
+ 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.
+
+
+
+
+