[bknr-cvs] hans changed trunk/projects/quickhoney/
BKNR Commits
bknr at bknr.net
Fri Sep 26 15:03:28 UTC 2008
Revision: 3963
Author: hans
URL: http://bknr.net/trac/changeset/3963
News item editing support.
U trunk/projects/quickhoney/src/handlers.lisp
U trunk/projects/quickhoney/src/webserver.lisp
A trunk/projects/quickhoney/website/static/icons/blankimage.png
A trunk/projects/quickhoney/website/static/icons/editor-knob.gif
A trunk/projects/quickhoney/website/static/icons/editor-sprite-active.gif
A trunk/projects/quickhoney/website/static/icons/editor-sprite.gif
A trunk/projects/quickhoney/website/static/icons/sprite.png
U trunk/projects/quickhoney/website/static/javascript.js
A trunk/projects/quickhoney/website/static/simpleeditor.css
U trunk/projects/quickhoney/website/templates/index.xml
Modified: trunk/projects/quickhoney/src/handlers.lisp
===================================================================
--- trunk/projects/quickhoney/src/handlers.lisp 2008-09-24 16:51:13 UTC (rev 3962)
+++ trunk/projects/quickhoney/src/handlers.lisp 2008-09-26 15:03:28 UTC (rev 3963)
@@ -153,7 +153,6 @@
(defmethod handle-object-form ((handler json-edit-image-handler) (action (eql :edit)) image)
(with-query-params (client spider-keywords)
- (format t "editing image ~A client ~A spider-keywords ~A~%" image client spider-keywords)
(with-transaction (:edit-image)
(setf (quickhoney-image-client image) client
(quickhoney-image-spider-keywords image) spider-keywords
@@ -169,6 +168,19 @@
(with-json-response ()
(encode-object-element "result" "deleted")))
+(defclass json-edit-news-item-handler (json-edit-image-handler)
+ ()
+ (:default-initargs :object-class 'quickhoney-news-item))
+
+(defmethod handle-object-form ((handler json-edit-news-item-handler) (action (eql :edit)) item)
+ (with-query-params (title text)
+ (with-transaction (:edit-news-item)
+ (setf (quickhoney-news-item-title item) title
+ (quickhoney-news-item-text item) text)))
+ (setf *last-image-upload-timestamp* (get-universal-time))
+ (with-json-response ()
+ (encode-object-element "result" "edited")))
+
(defclass digg-image-handler (object-handler)
()
(:default-initargs :object-class 'quickhoney-image))
@@ -373,8 +385,8 @@
:dest-width +news-image-width+ :dest-height scaled-height)
(cl-gd:destroy-image uploaded-image)
(setf uploaded-image scaled-image)))
- (let* ((title (normalize-news-title title))
- (item (make-store-image :name title
+ (let* ((name (normalize-news-title title))
+ (item (make-store-image :name name
:image uploaded-image
:type (if (cl-gd:true-color-p uploaded-image) :jpg :png)
:class-name 'quickhoney-news-item
@@ -385,7 +397,7 @@
:owner (bknr-session-user)))))
(declare (ignore item)) ; for now
(twitter:update-status (bknr-session-user)
- (format nil "Posted news item: http://quickhoney.com/news/~A" title))
+ (format nil "Posted news item: http://quickhoney.com/news/~A" name))
(with-http-response ()
(with-http-body ()
(html (:html
Modified: trunk/projects/quickhoney/src/webserver.lisp
===================================================================
--- trunk/projects/quickhoney/src/webserver.lisp 2008-09-24 16:51:13 UTC (rev 3962)
+++ trunk/projects/quickhoney/src/webserver.lisp 2008-09-26 15:03:28 UTC (rev 3963)
@@ -28,6 +28,7 @@
("/json-clients" json-clients-handler)
("/json-buttons" json-buttons-handler)
("/json-edit-image" json-edit-image-handler)
+ ("/json-edit-news" json-edit-news-item-handler)
("/upload-image" upload-image-handler)
("/upload-animation" upload-animation-handler)
("/upload-button" upload-button-handler)
Added: trunk/projects/quickhoney/website/static/icons/blankimage.png
===================================================================
(Binary files differ)
Property changes on: trunk/projects/quickhoney/website/static/icons/blankimage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/projects/quickhoney/website/static/icons/editor-knob.gif
===================================================================
(Binary files differ)
Property changes on: trunk/projects/quickhoney/website/static/icons/editor-knob.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/projects/quickhoney/website/static/icons/editor-sprite-active.gif
===================================================================
(Binary files differ)
Property changes on: trunk/projects/quickhoney/website/static/icons/editor-sprite-active.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/projects/quickhoney/website/static/icons/editor-sprite.gif
===================================================================
(Binary files differ)
Property changes on: trunk/projects/quickhoney/website/static/icons/editor-sprite.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/projects/quickhoney/website/static/icons/sprite.png
===================================================================
(Binary files differ)
Property changes on: trunk/projects/quickhoney/website/static/icons/sprite.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/projects/quickhoney/website/static/javascript.js
===================================================================
--- trunk/projects/quickhoney/website/static/javascript.js 2008-09-24 16:51:13 UTC (rev 3962)
+++ trunk/projects/quickhoney/website/static/javascript.js 2008-09-26 15:03:28 UTC (rev 3963)
@@ -15,6 +15,38 @@
pen: ['portraits', 'nudes', 'stuff']
};
+/* rich text editor toolbar configuration */
+
+var editorToolbarConfig = {
+ collapse: false,
+ draggable: false,
+ buttons: [
+ { group: 'textstyle', label: 'Font Style',
+ buttons: [
+ { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
+ { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
+ { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
+ { type: 'separator' },
+ { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
+ { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
+ ]
+ },
+ { type: 'separator' },
+ { group: 'indentlist', label: 'Lists',
+ buttons: [
+ { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
+ { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
+ ]
+ },
+ { type: 'separator' },
+ { group: 'insertitem', label: 'Insert Item',
+ buttons: [
+ { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true }
+ ]
+ }
+ ]
+};
+
/* safari global variable - used to trigger some compatibility hacks */
var safari = false;
@@ -40,6 +72,8 @@
/* login status */
+var news_editor;
+
function login_status(json_result) {
log('login_status, admin: ' + json_result.admin + ' login: ' + json_result.login);
@@ -49,6 +83,8 @@
if (logged_in) {
replaceChildNodes("username", json_result.login);
$("login_status").style.visibility = 'visible';
+ news_editor = new YAHOO.widget.SimpleEditor('news_editor', { toolbar: editorToolbarConfig });
+ news_editor.render();
show_cms_window();
}
}
@@ -148,9 +184,24 @@
}
show_cms_window("image_edited_form");
setTimeout("show_cms_window('edit_form')", 2000);
- // reload_clients();
}
+function image_edited(json_data) {
+ if (json_data.result == 'error') {
+ alert(json_data.message);
+ }
+ show_cms_window("image_edited_form");
+ setTimeout("show_cms_window('edit_form')", 2000);
+}
+
+function news_edited(json_data) {
+ if (json_data.result == 'error') {
+ alert(json_data.message);
+ }
+ show_cms_window("image_edited_form");
+ setTimeout("show_cms_window('edit_news')", 2000);
+}
+
function do_delete() {
if (confirm('delete this image?')) {
@@ -221,6 +272,7 @@
/* news */
+var current_news_item;
var month_names = [ 'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December' ];
@@ -284,6 +336,8 @@
return false;
}
}
+ var text_div = DIV({ 'class': 'item-text' });
+ text_div.innerHTML = item.text;
return DIV({ 'class': 'newsentry' },
IMG({ src: "/image/" + encodeURI(item.name) + '/news-article-cutout' }),
DIV(null,
@@ -291,11 +345,11 @@
item.date, ' by ', item.owner, ' | ',
permalink('news/' + item.name),
BR(),
- DIV({ 'class': 'item-text' }, item.text),
+ text_div,
delete_button));
}
-function load_news(data)
+function load_news(single_entry, data)
{
try {
if (data.items.length > max_news_items) {
@@ -310,6 +364,23 @@
wait_for_images(function () { hide_cue(); $('newsentries').style.visibility = 'inherit' });
+ current_news_item = null;
+ if (logged_in) {
+ current_news_item = data.items[0];
+ if (single_entry) {
+ $('news_title').value = current_news_item.title;
+ news_editor.setEditorHTML(current_news_item.text);
+ $('news_editor').value = current_news_item.text;
+ $('edit_news_action').value = 'edit';
+ $('edit_image_upload_row').style.visibility = 'hidden';
+ } else {
+ $('edit_news_form').reset();
+ news_editor.setEditorHTML("");
+ $('edit_news_action').value = 'create';
+ $('edit_image_upload_row').style.visibility = 'inherit';
+ }
+ }
+
display_cms_window();
}
catch (e) {
@@ -342,8 +413,11 @@
show_cue();
$('newsentries').style.visibility = 'hidden';
loadJSONDoc('/json-news/' + subpath)
- .addCallbacks(load_news, alert);
+ .addCallbacks(partial(load_news, true), alert);
+ $('edit_news_form').reset();
+ replaceChildNodes('edit_news_title', 'Edit News Item');
+
} else {
var args = subpath.split('/');
@@ -358,8 +432,11 @@
show_cue();
$('newsentries').style.visibility = 'hidden';
loadJSONDoc('/json-news/quickhoney' + (month ? ('?month=' + subpath) : ''))
- .addCallbacks(load_news, alert);
+ .addCallbacks(partial(load_news, false), alert);
}
+
+ $('edit_news_form').reset();
+ replaceChildNodes('edit_news_title', 'Create News Item');
}
}
@@ -1130,6 +1207,29 @@
detail_window.focus();
}
+function upload_news (target) {
+ var edit_mode = $('edit_news_action').value == 'edit';
+
+ if (!edit_mode && $('news_file').value == '') {
+ alert('Please upload an image!');
+ return false;
+ }
+ if ($('news_title').value == '') {
+ alert('Please enter a title for the news item!');
+ $('news_title').focus();
+ return false;
+ }
+ news_editor.saveHTML(); // update editor's value from html
+
+ if (edit_mode) {
+ show_cms_window('saving_edits_form'); // hide edit window until server replies
+ submit_json('/json-edit-news/' + current_news_item.id + '?action=edit', 'edit_news_form', news_edited);
+ return false;
+ } else {
+ do_upload(target);
+ return true;
+ }
+}
/* open the upload window */
function do_upload(target) {
Added: trunk/projects/quickhoney/website/static/simpleeditor.css
===================================================================
--- trunk/projects/quickhoney/website/static/simpleeditor.css (rev 0)
+++ trunk/projects/quickhoney/website/static/simpleeditor.css 2008-09-26 15:03:28 UTC (rev 3963)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/
+.yui-busy{cursor:wait !important;}.yui-toolbar-container fieldset{padding:0;margin:0;border:0;}.yui-toolbar-container legend{display:none;}.yui-toolbar-container .yui-toolbar-subcont{padding:.25em 0;zoom:1;}.yui-toolbar-container-collapsed .yui-toolbar-subcont{display:none;}.yui-toolbar-container .yui-toolbar-subcont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container span.yui-toolbar-draghandle{cursor:move;border-left:1px solid #999;border-right:1px solid #999;overflow:hidden;text-indent:77777px;width:2px;height:20px;display:block;clear:none;float:left;margin:0 0 0 .2em;}.yui-toolbar-container .yui-toolbar-titlebar.draggable{cursor:move;}.yui-toolbar-container .yui-toolbar-titlebar{position:relative;}.yui-toolbar-container .yui-toolbar-titlebar h2{font-weight:bold;letter-spacing:0;border:none;color:#000;margin:0;padding:.2em;}.yui-toolbar-container .yui-toolbar-titlebar h2 a{text-decoration:none;color:#000;cursor:default;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-draghandle{height:40px;}.yui-toolbar-container .yui-toolbar-group{float:left;zoom:1;}.yui-toolbar-container .yui-toolbar-group:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-container .yui-toolbar-group h3{font-size:75%;padding:0 0 0 .25em;margin:0;}.yui-toolbar-container span.yui-toolbar-separator{width:2px;height:18px;margin:.2em 0 .2em .1em;display:block;clear:none;float:left;}.yui-toolbar-container.yui-toolbar-grouped span.yui-toolbar-separator{height:35px;}.yui-toolbar-container.yui-toolbar-grouped .yui-toolbar-group span.yui-toolbar-separator{height:18px;}.yui-toolbar-container ul li{margin:0;padding:0;list-style-type:none;}.yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-toolbar-container .yui-push-button,.yui-toolbar-container .yui-color-button,.yui-toolbar-container .yui-menu-button{position:relative;cursor:pointer;}.yui-toolbar-container .yui-button .first-child,.yui-toolbar-container .yui-button .first-child a{height:100%;width:100%;overflow:hidden;}.yui-toolbar-container .yui-button-disabled{cursor:default;}.yui-toolbar-container .yui-button-disabled .yui-toolbar-icon{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button-disabled .up,.yui-toolbar-container .yui-button-disabled .down{opacity:.5;filter:alpha(opacity=50);}.yui-toolbar-container .yui-button a{overflow:hidden;}.yui-toolbar-container .yui-toolbar-select .first-child a{cursor:pointer;}.yui-toolbar-fontname-arial{font-family:Arial;}.yui-toolbar-fontname-arial-black{font-family:Arial Black;}.yui-toolbar-fontname-comic-sans-ms{font-family:Comic Sans MS;}.yui-toolbar-fontname-courier-new{font-family:Courier New;}.yui-toolbar-fontname-times-new-roman{font-family:Times New Roman;}.yui-toolbar-fontname-verdana{font-family:Verdana;}.yui-toolbar-fontname-impact{font-family:Impact;}.yui-toolbar-fontname-lucida-console{font-family:Lucida Console;}.yui-toolbar-fontname-tahoma{font-family:Tahoma;}.yui-toolbar-fontname-trebuchet-ms{font-family:Trebuchet MS;}.yui-toolbar-container .yui-toolbar-spinbutton{position:relative;}.yui-toolbar-container .yui-toolbar-spinbutton .first-child a{z-index:0;opacity:1;}.yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-toolbar-container .yui-toolbar-spinbutton a.down{position:absolute;display:block right:0;cursor:pointer;z-index:1;padding:0;margin:0;}.yui-toolbar-container .yui-overlay{position:absolute;}.yui-toolbar-container .yui-overlay ul li{margin:0;list-style-type:none;}.yui-toolbar-container{z-index:1;}.yui-editor-container .yui-editor-editable-container{position:relative;z-index:0;width:100%;}.yui-editor-container .yui-editor-masked{background-color:#CCC;}.yui-editor-container iframe{border:0px;padding:0;margin:0;zoom:1;display:block;}.yui-editor-container .yui-editor-editable{padding:0;margin:0;}.yui-editor-container .dompath{font-size:85%;}.yui-editor-panel .hd{text-align:left;position:relative;}.yui-editor-panel .hd h3{font-weight:bold;padding:0.25em 0pt 0.25em 0.25em;margin:0;}.yui-editor-panel .bd{width:100%;zoom:1;position:relative;}.yui-editor-panel .bd div.yui-editor-body-cont{padding:.25em .1em;zoom:1;}.yui-editor-panel .bd .gecko form{overflow:auto;}.yui-editor-panel .bd div.yui-editor-body-cont:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-editor-panel .ft{text-align:right;width:99%;float:left;clear:both;}.yui-editor-panel .ft span.tip{display:block;position:relative;padding:.5em .5em .5em 23px;text-align:left;zoom:1;}.yui-editor-panel label{clear:both;float:left;padding:0;width:100%;text-align:left;zoom:1;}.yui-editor-panel .gecko label{overflow:auto;}.yui-editor-panel label strong{float:left;width:6em;}.yui-editor-panel .removeLink{width:80%;text-align:right;}.yui-editor-panel label input{margin-left:.25em;float:left;}.yui-editor-panel .yui-toolbar-group-padding{}.yui-editor-panel .yui-toolbar-group-border{}.yui-editor-panel .yui-toolbar-group-textflow{}.yui-editor-panel .height-width{float:left;}.yui-editor-panel .height-width h3{}.yui-editor-panel .height-width span{font-style:italic;display:block;float:left;overflow:visible;}.yui-editor-panel .height-width span.info{font-size:70%;margin-top:3px;}.yui-editor-panel .yui-toolbar-bordersize,.yui-editor-panel .yui-toolbar-bordertype{font-size:75%;}.yui-editor-panel .yui-toolbar-container span.yui-toolbar-separator{border:none;}.yui-editor-panel .yui-toolbar-bordersize span a span,.yui-editor-panel .yui-toolbar-bordertype span a span{display:block;height:8px;left:4px;position:absolute;top:3px;*top:-5px;width:24px;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-solid{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dotted{border-bottom:1px dotted black;}.yui-editor-panel .yui-toolbar-bordertype span a span.yui-toolbar-bordertype-dashed{border-bottom:1px dashed black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-0{*top:0px;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-1{border-bottom:1px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-2{border-bottom:2px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-3{top:2px;*top:-5px;border-bottom:3px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-4{top:1px;*top:-5px;border-bottom:4px solid black;}.yui-editor-panel .yui-toolbar-bordersize span a span.yui-toolbar-bordersize-5{top:1px;*top:-5px;border-bottom:5px solid black;}.yui-toolbar-container .yui-toolbar-bordersize-menu,.yui-toolbar-container .yui-toolbar-bordertype-menu{width:95px !important;}.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel,.yui-toolbar-bordersize-menu .yuimenuitemlabel,.yui-toolbar-bordertype-menu .yuimenuitemlabel:hover{margin:0px 3px 7px 17px;}.yui-toolbar-bordersize-menu .yuimenuitemlabel .checkedindicator,.yui-toolbar-bordertype-menu .yuimenuitemlabel .checkedindicator{position:absolute;left:-12px;*top:14px;*left:0px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-1 a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-2 a{border-bottom:2px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-3 a{border-bottom:3px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-4 a{border-bottom:4px solid black;height:14px;}.yui-toolbar-bordersize-menu li.yui-toolbar-bordersize-5 a{border-bottom:5px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-solid a{border-bottom:1px solid black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dashed a{border-bottom:1px dashed black;height:14px;}.yui-toolbar-bordertype-menu li.yui-toolbar-bordertype-dotted a{border-bottom:1px dotted black;height:14px;}h2.yui-editor-skipheader,h3.yui-editor-skipheader{height:0;margin:0;padding:0;border:none;width:0;overflow:hidden;position:absolute;}.yui-toolbar-colors{width:133px;zoom:1;display:none;z-index:100;overflow:hidden;}.yui-toolbar-colors:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors a{height:9px;width:9px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0;cursor:pointer;border:1px solid #F6F7EE;}.yui-toolbar-colors a:hover{border:1px solid black;}.yui-color-button-menu{overflow:visible;background-color:transparent;}.yui-toolbar-colors span{position:relative;display:block;padding:3px;overflow:hidden;float:left;width:100%;zoom:1;}.yui-toolbar-colors span:after{display:block;clear:both;visibility:hidden;content:'.';height:0;}.yui-toolbar-colors span em{height:35px;width:30px;float:left;display:block;overflow:hidden;text-indent:999px;margin:0.75px;border:1px solid black;}.yui-toolbar-colors span strong{font-weight:normal;padding-left:3px;display:block;font-size:85%;float:left;width:65%;}.yui-skin-sam .yui-editor-container{border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container{zoom:1;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;position:relative;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar h2{color:#000000;font-weight:bold;margin:0;padding:0.3em 1em;font-size:100%;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3{color:#808080;font-size:75%;margin:1em 0 0;padding-bottom:0;padding-left:0.25em;text-align:left;}.yui-toolbar-container span.yui-toolbar-separator{border:none;text-indent:33px;overflow:hidden;margin:0 .25em;}.yui-skin-sam .yui-toolbar-container{background-color:#F2F2F2;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subcont{padding:0 1em 0.35em;border-bottom:1px solid #808080;}.yui-skin-sam .yui-toolbar-container-collapsed .yui-toolbar-titlebar{border-bottom:1px solid #808080;}.yui-skin-sam .yui-editor-container .visible .yui-menu-shadow,.yui-skin-sam .yui-editor-panel .visible .yui-menu-shadow{display:none;}.yui-skin-sam .yui-editor-container ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-container ul li{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-toolbar-group ul li.yui-toolbar-groupitem{float:left;}.yui-skin-sam .yui-editor-container .dompath{background-color:#F2F2F2;border-top:1px solid #808080;color:#999;text-align:left;padding:0.25em;}.yui-skin-sam .yui-toolbar-container .collapse{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -400px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-titlebar span.collapse{cursor:pointer;position:absolute;top:4px;right:2px;display:block;overflow:hidden;height:15px;width:15px;text-indent:9999px;}.yui-skin-sam .yui-toolbar-container .yui-push-button,.yui-skin-sam .yui-toolbar-container .yui-color-button,.yui-skin-sam .yui-toolbar-container .yui-menu-button{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;position:relative;display:block;height:22px;width:30px;margin:0;border-color:#808080;border-style:solid;border-width:1px 0;}.yui-skin-sam .yui-toolbar-container .yui-push-button a,.yui-skin-sam .yui-toolbar-container .yui-color-button a,.yui-skin-sam .yui-toolbar-container .yui-menu-button a{padding-left:35px;height:20px;text-decoration:none;font-size:93%;line-height:2;display:block;color:#000000;overflow:hidden;}.yui-skin-sam .yui-toolbar-container .yui-push-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button .first-child{border-color:#808080;border-style:solid;border-width:0 1px;margin:0 -1px;display:block;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled .first-child,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled a,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled a{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-toolbar-container .yui-push-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-color-button-disabled,.yui-skin-sam .yui-toolbar-container .yui-menu-button-disabled{border-color:#ccc;}.yui-skin-sam .yui-toolbar-container .yui-button .first-child{*left:0px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-fontname{width:135px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-heading{width:92px;}.yui-skin-sam .yui-toolbar-container .yui-button-hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1300px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-button-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;border-color:#808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels h3{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-nogrouplabels .yui-toolbar-group{margin-top:.75em;}.yui-skin-sam .yui-toolbar-container .yui-push-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-color-button span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-menu-button span.yui-toolbar-icon{display:block;position:absolute;top:2px;height:18px;width:18px;overflow:hidden;background:url(editor-sprite.gif) no-repeat 30px 30px;}.yui-skin-sam .yui-toolbar-container .yui-button-selected span.yui-toolbar-icon,.yui-skin-sam .yui-toolbar-container .yui-button-hover span.yui-toolbar-icon{background-image:url(editor-sprite-active.gif);}.yui-skin-sam .yui-toolbar-container .visible .yuimenuitemlabel{cursor:pointer;color:#000;*position:relative;}.yui-skin-sam .yui-toolbar-container .yui-button-menu{background-color:#fff;}.yui-skin-sam div.yuimenu li.selected{background-color:#B3D4FF;}.yui-skin-sam div.yuimenu li.selected a.selected{color:#000;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bold span.yui-toolbar-icon{background-position:0 0;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-strikethrough span.yui-toolbar-icon{background-position:0 -108px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-italic span.yui-toolbar-icon{background-position:0 -36px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-underline span.yui-toolbar-icon{background-position:0 -72px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-subscript span.yui-toolbar-icon{background-position:0 -180px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-superscript span.yui-toolbar-icon{background-position:0 -144px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-forecolor span.yui-toolbar-icon{background-position:0 -216px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-backcolor span.yui-toolbar-icon{background-position:0 -288px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyleft span.yui-toolbar-icon{background-position:0 -324px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifycenter span.yui-toolbar-icon{background-position:0 -360px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyright span.yui-toolbar-icon{background-position:0 -396px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-justifyfull span.yui-toolbar-icon{background-position:0 -432px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-indent span.yui-toolbar-icon{background-position:0 -720px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-outdent span.yui-toolbar-icon{background-position:0 -684px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-createlink span.yui-toolbar-icon{background-position:0 -792px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertimage span.yui-toolbar-icon{background-position:1px -756px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-left span.yui-toolbar-icon{background-position:0 -972px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-right span.yui-toolbar-icon{background-position:0 -936px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-inline span.yui-toolbar-icon{background-position:0 -900px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-block span.yui-toolbar-icon{background-position:0 -864px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-bordercolor span.yui-toolbar-icon{background-position:0 -252px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-removeformat span.yui-toolbar-icon{background-position:0 -1080px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-hiddenelements span.yui-toolbar-icon{background-position:0 -1044px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertunorderedlist span.yui-toolbar-icon{background-position:0 -468px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-insertorderedlist span.yui-toolbar-icon{background-position:0 -504px;left:5px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child{width:35px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton .first-child a{padding-left:2px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton span.yui-toolbar-icon{display:none;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up,.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{right:2px;background:url(editor-sprite.gif) no-repeat 0 -1222px;overflow:hidden;height:6px;width:7px;min-height:0;padding:0;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.up{top:2px;background-position:0 -1222px;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-spinbutton a.down{bottom:2px;background-position:0 -1187px;}.yui-skin-sam .yui-toolbar-container select{height:22px;border:1px solid #808080;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select .first-child a{padding-left:5px;text-align:left;}.yui-skin-sam .yui-toolbar-container .yui-toolbar-select span.yui-toolbar-icon{background:url( editor-sprite.gif ) no-repeat 0 -1144px;overflow:hidden;right:-2px;top:0px;height:20px;}.yui-skin-sam .yui-editor-panel .yui-color-button-menu .bd{background-color:transparent;border:none;width:135px;}.yui-skin-sam .yui-color-button-menu .yui-toolbar-colors{border:1px solid #808080;}.yui-skin-sam .yui-editor-panel{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;}.yui-skin-sam .yui-editor-panel .hd{margin:10px 0 0;padding:0;border:none;}.yui-skin-sam .yui-editor-panel .hd h3{color:#000;border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;width:99%;position:relative;margin:0;padding:3px 0 0 0;font-size:93%;text-indent:5px;height:20px;}.yui-skin-sam .yui-editor-panel .bd{background-color:#F2F2F2;border-left:1px solid #808080;border-right:1px solid #808080;width:99%;margin:0;padding:0;overflow:visible;}.yui-skin-sam .yui-editor-panel ul{list-style-type:none;margin:0;padding:0;}.yui-skin-sam .yui-editor-panel ul li{margin:0;padding:0;}.yui-skin-sam .yui-editor-panel .yuimenu{}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .yui-toolbar-subcont{padding:0;border:none;margin-top:0.35em;}.yui-skin-sam .yui-editor-panel .yui-toolbar-bordersize,.yui-skin-sam .yui-editor-panel .yui-toolbar-bordertype{width:50px;}.yui-skin-sam .yui-editor-panel label{display:block;float:none;padding:4px 0;margin-bottom:7px;}.yui-skin-sam .yui-editor-panel label strong{font-weight:normal;font-size:93%;text-align:right;padding-top:2px;}.yui-skin-sam .yui-editor-panel label input{width:75%;}.yui-skin-sam .yui-editor-panel .createlink_target,.yui-skin-sam .yui-editor-panel .insertimage_target{width:auto;margin-right:5px;}.yui-skin-sam .yui-editor-panel .removeLink{width:98%;}.yui-skin-sam .yui-editor-panel label input.warning{background-color:#FFEE69;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group h3{color:#000;float:left;font-weight:normal;font-size:93%;margin:5px 0 0 0;padding:0 3px 0 0;text-align:right;}.yui-skin-sam .yui-editor-panel .height-width h3{margin:3px 0 0 10px;}.yui-skin-sam .yui-editor-panel .height-width{margin:3px 0 0 35px;*margin-left:14px;width:42%;*width:44%;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-border{width:190px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-border{width:210px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding{width:203px;}.yui-skin-sam .yui-editor-panel .no-button .yui-toolbar-group-padding{width:172px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-padding h3{margin-left:25px;*margin-left:12px;}.yui-skin-sam .yui-editor-panel .yui-toolbar-group-textflow{width:182px;}.yui-skin-sam .yui-editor-panel .hd{background:none;}.yui-skin-sam .yui-editor-panel .ft{background-color:#F2F2F2;border:1px solid #808080;border-top:none;padding:0;margin:0 0 2px 0;}.yui-skin-sam .yui-editor-panel .hd span.close{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;display:block;height:16px;overflow:hidden;position:absolute;right:5px;text-indent:500px;top:2px;width:26px;}.yui-skin-sam .yui-editor-panel .ft span.tip{background-color:#EDF5FF;border-top:1px solid #808080;font-size:85%;}.yui-skin-sam .yui-editor-panel .ft span.tip strong{display:block;float:left;margin:0 2px 8px 0;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon{background:url( editor-sprite.gif ) no-repeat 0 -1260px;display:block;height:20px;left:2px;position:absolute;top:8px;width:20px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-info{background-position:2px -1260px;}.yui-skin-sam .yui-editor-panel .ft span.tip span.icon-warn{background-position:2px -1296px;}.yui-skin-sam .yui-editor-panel .hd span.knob{position:absolute;height:10px;width:28px;top:-10px;left:25px;text-indent:9999px;overflow:hidden;background:url( editor-knob.gif ) no-repeat 0 0;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container{float:left;width:100%;background-image:none;border:none;}.yui-skin-sam .yui-editor-panel .yui-toolbar-container .bd{background-color:#ffffff;}.yui-editor-blankimage{background-image:url( blankimage.png );}
Modified: trunk/projects/quickhoney/website/templates/index.xml
===================================================================
--- trunk/projects/quickhoney/website/templates/index.xml 2008-09-24 16:51:13 UTC (rev 3962)
+++ trunk/projects/quickhoney/website/templates/index.xml 2008-09-26 15:03:28 UTC (rev 3963)
@@ -7,13 +7,13 @@
xmlns:quickhoney="http://quickhoney.com/">
<head>
<meta name="verify-v1" content="0lfE42KxaTLpCzUEkuTA7V2a9Ojdwk9BG2XSaZGPaoA=" />
- <link rel="stylesheet" href="/static/yui/reset-fonts/reset-fonts.css,quickhoney.css,index.css,ydsf.css" />
+ <link rel="stylesheet" href="/static/yui/reset-fonts/reset-fonts.css,yui/fonts/fonts-min.css,yui/editor/assets/skins/sam/simpleeditor.css,quickhoney.css,index.css,ydsf.css" />
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/rss/quickhoney" />
- <script src="/static/detectplugins.js,AC_QuickTime.js,MochiKit/MochiKit.js,yui/yahoo-dom-event/yahoo-dom-event.js,yui/animation/animation-min.js,javascript.js" type="text/javascript"> </script>
+ <script src="/static/detectplugins.js,AC_QuickTime.js,MochiKit/MochiKit.js,yui/yahoo-dom-event/yahoo-dom-event.js,yui/animation/animation-min.js,yui/element/element-beta-min.js,yui/container/container_core-min.js,yui/editor/simpleeditor-beta-min.js,javascript.js" type="text/javascript"> </script>
<title>QuickHoney</title>
</head>
- <body id="body" class="loading">
+ <body id="body" class="loading yui-skin-sam">
<div id="overlay" class="page">
</div>
@@ -271,27 +271,27 @@
</div>
<div id="edit_news" class="cms_form">
- <div class="cms_title">Create news entry</div>
+ <div class="cms_title" id="edit_news_title">Create news entry</div>
<form action="/upload-news" method="post" id="edit_news_form"
- enctype="multipart/form-data" target="upload_result" onsubmit="do_upload(this.target);">
+ enctype="multipart/form-data" target="upload_result" onsubmit="return upload_news(this.target);">
<table class="cms">
<tbody>
- <tr>
+ <tr id="edit_image_upload_row">
<td>Image:</td>
- <td><input type="file" name="image-file" /></td>
+ <td><input id="news_file" type="file" name="image-file" /></td>
</tr>
<tr>
<td>Title:</td>
- <td><input name="title" size="60"/></td>
+ <td><input id="news_title" name="title" size="60"/></td>
</tr>
<tr>
<td>Text:</td>
- <td><textarea class="mce_editor" name="text" cols="60" rows="10"> </textarea></td>
+ <td><textarea id="news_editor" name="text" cols="80" rows="10"> </textarea></td>
</tr>
</tbody>
</table>
<p class="cms">
- <input type="submit" name="action" value="upload" />
+ <input type="submit" name="action" id="edit_news_action" value="create" />
</p>
</form>
</div>
@@ -306,7 +306,7 @@
<div id="image_edited_form" class="cms_form">
<div class="cms_title">Edits saved</div>
<p class="cms">
- Your image edits have been saved.
+ Your edits have been saved.
</p>
</div>
More information about the Bknr-cvs
mailing list