+<?xml version="1.0" encoding="<%text(_CHARSET)%>"?>\r
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
- <html xmlns="http://www.w3.org/1999/xhtml">\r
+ <html <%text(_HTML_XML_NAME_SPACE_AND_LANG_CODE)%>>\r
<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=<%text(_CHARSET)%>" />\r
+ <!--\r
+ Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
+ Copyright (C) 2002-2009 The Nucleus Group\r
+\r
+ This program is free software; you can redistribute it and/or\r
+ modify it under the terms of the GNU General Public License\r
+ as published by the Free Software Foundation; either version 2\r
+ of the License, or (at your option) any later version.\r
+ (see nucleus/documentation/index.html#license for more info)\r
+\r
+ @license http://nucleuscms.org/license.txt GNU General Public License\r
+ @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ $Id$\r
+ -->\r
<title><%text(_ADD_ADDTO)%> '<%blogname%>'</title>\r
<link rel="stylesheet" type="text/css" href="styles/bookmarklet.css" /> \r
- <link rel="stylesheet" type="text/css" href="styles/addedit.css" /> \r
+ <link rel="stylesheet" type="text/css" href="styles/addedit.css" />\r
+ <link rel="stylesheet" type="text/css" href="styles/jqueryui/ui.all.css" />\r
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />\r
<script type="text/javascript" src="javascript/bookmarklet.js"></script>\r
<script type="text/javascript" src="javascript/edit.js"></script>\r
<script type="text/javascript" src="javascript/numbercheck.js"></script>\r
+ <%ifautosave()%><script type="text/javascript" src="javascript/xmlhttprequest.js"></script><%endif%>\r
+ <script type="text/javascript" src="http://www.google.com/jsapi"></script>\r
<%init%>\r
<%extrahead%>\r
<script type="text/javascript">\r
+ //<![CDATA[\r
+ google.load("jquery", "1");\r
+ google.load("jqueryui", "1");\r
var nucleus_initbm_oldonload = window.onload;\r
function nucleus_initbm()\r
{\r
- initStyles(); \r
+// initStyles(); \r
updAllPreviews();\r
\r
if (nucleus_initbm_oldonload)\r
nucleus_initbm_oldonload();\r
}\r
window.onload = nucleus_initbm;\r
+ google.setOnLoadCallback(function() {\r
+ $(function(){\r
+ $("#tabs > ul").tabs();\r
+ $("table tr td:first-child").css("width", "14%");\r
+ });\r
+ });\r
+ function preautoSaveDraft() {\r
+ $(".autosavestatus").text('(' + lastsavedtext + ' ' + formattedDate() + ')');\r
+ autoSaveDraft();\r
+ }\r
+ //]]>\r
</script>\r
</head>\r
<body>\r
<h1><%text(_ADD_ADDTO)%> '<%bloglink%>'</h1>\r
- <form method="post" action="bookmarklet.php" ><div>\r
- \r
- <input name="action" type="hidden" value="additem" />\r
- <input name="blogid" type="hidden" value="<%blogid%>" />\r
- <%ticket%>\r
- \r
- <div id="submit" class="buttonbar">\r
- <input type="submit" value="<%text(_BMLET_ADD)%>" onclick="return checkSubmit();" />\r
- <div id="switchbuttons">\r
- <input type="button" onclick="flipBlock('body');" value="<%text(_BMLET_BODY)%> >>" />\r
- <input type="button" onclick="flipBlock('more');" value="<%text(_BMLET_MORE)%> >>" />\r
- <input type="button" onclick="flipBlock('options');" value="<%text(_BMLET_OPTIONS)%> >>" />\r
- <input type="button" onclick="updAllPreviews(); flipBlock('preview');" value="<%text(_BMLET_PREVIEW)%> >>" />\r
+ <form id="addform" method="post" action="bookmarklet.php" >\r
+ <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">\r
+ <ul class=" ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">\r
+ <li class="ui-state-default ui-corner-top"><a href="#body"><%text(_BMLET_BODY)%> >></a></li>\r
+ <li class="ui-state-default ui-corner-top"><a href="#more"><%text(_BMLET_MORE)%> >></a></li>\r
+ <li class="ui-state-default ui-corner-top"><a href="#options"><%text(_BMLET_OPTIONS)%> >></a></li>\r
+ <li class="ui-state-default ui-corner-top"><a href="#preview" onclick="updAllPreviews();"><%text(_BMLET_PREVIEW)%> >></a></li>\r
+ </ul>\r
+ <input name="action" type="hidden" value="additem" />\r
+ <input name="blogid" type="hidden" value="<%blogid%>" />\r
+ <input type="hidden" name="draftid" value="0" />\r
+ <%ticket%>\r
+ <div id="body" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">\r
+ <table summary="item body">\r
+ <tr>\r
+ <td><%text(_ADD_TITLE)%></td>\r
+ <td><input <%jsinput(title)%> type="text" size="60" maxlength="160" value="<%contents(title)%>" /></td>\r
+ </tr>\r
+ <tr>\r
+ <td><%text(_ADD_BODY)%> <%helplink(additem)%></td>\r
+ <td>\r
+ <%jsbuttonbar(media)%>\r
+ <textarea <%jsinput(body)%> cols="58" rows="12"><%contents(body)%></textarea>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td><%text(_ADD_CATEGORY)%></td>\r
+ <td><%categories%></td>\r
+ </tr>\r
+ </table>\r
</div>\r
- </div>\r
-\r
- <div id="body" class="contentblock">\r
-\r
- <table>\r
- <tr>\r
- <td><%text(_ADD_TITLE)%></td>\r
- <td>\r
- <input \r
- <%jsinput(title)%>\r
- type="text" size="60" maxlength="160" \r
- value="<%contents(title)%>"\r
- /></td>\r
- </tr><tr>\r
- <td>\r
- <%text(_ADD_BODY)%> <%helplink(additem)%></td>\r
- <td>\r
- <%jsbuttonbar(media)%>\r
- <textarea \r
- <%jsinput(body)%>\r
- cols="58" \r
- rows="12"><%contents(body)%></textarea>\r
- \r
- </td></tr>\r
- <tr><td>\r
- <%text(_ADD_CATEGORY)%></td>\r
- <td><%categories%></td>\r
- </tr></table>\r
-\r
- \r
- </div>\r
- \r
- <div id="more" class="contentblock">\r
- <table>\r
- <tr>\r
- <td><%text(_ADD_MORE)%> <%helplink(extended)%></td>\r
- <td>\r
- <%jsbuttonbar(media)%>\r
- <textarea \r
- <%jsinput(more)%>\r
- cols="58" \r
- rows="17"><%contents(more)%></textarea>\r
- </td></tr></table>\r
- </div>\r
- <div id="options" class="contentblock">\r
- <table>\r
- <%ifblogsetting(bcomments)%>\r
- <tr>\r
- <td><%text(_ADD_DISABLE_COMMENTS)%></td>\r
- <td>\r
- <input type='radio' name='closed' value='1' id="closed_yes" /><label for="closed_yes"><%text(_YES)%></label>\r
- <input type='radio' name='closed' value='0' checked='checked' id="closed_no"/><label for="closed_no"><%text(_NO)%></label>\r
- </td>\r
- </tr>\r
- <%endif%>\r
- \r
- <tr>\r
- <td><%text(_ADD_DRAFTNFUTURE)%></td>\r
- <td>\r
- <input name="actiontype" value="addnow" type="radio" checked='checked' id="act_now" /><label for="act_now"><%text(_ADD_ADDNOW)%></label>\r
+ <div id="more" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">\r
+ <table summary="item more">\r
+ <tr>\r
+ <td><%text(_ADD_MORE)%> <%helplink(extended)%></td>\r
+ <td>\r
+ <%jsbuttonbar(media)%>\r
+ <textarea <%jsinput(more)%> cols="58" rows="17"><%contents(more)%></textarea>\r
+ </td>\r
+ </tr>\r
+ </table>\r
+ </div>\r
+ <div id="options" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">\r
+ <table summary="item options">\r
+ <%ifblogsetting(bcomments)%><tr>\r
+ <td><%text(_ADD_DISABLE_COMMENTS)%></td>\r
+ <td>\r
+ <input type='radio' name='closed' value='1' id="closed_yes" /><label for="closed_yes"><%text(_YES)%></label>\r
+ <input type='radio' name='closed' value='0' checked='checked' id="closed_no" /><label for="closed_no"><%text(_NO)%></label>\r
+ </td>\r
+ </tr><%endif%>\r
+ <tr>\r
+ <td><%text(_ADD_DRAFTNFUTURE)%></td>\r
+ <td>\r
+ <input name="actiontype" value="addnow" type="radio" checked='checked' id="act_now" /><label for="act_now"><%text(_ADD_ADDNOW)%></label>\r
+ <br />\r
+ <input name="actiontype" value="addfuture" type="radio" id="act_future" /><label for="act_future"><%text(_ADD_ADDLATER)%></label> <%helplink(future)%>\r
+ <div class="indent">\r
+ <%text(_ADD_PLACE_ON)%>\r
+ <input id="inputyear" name="year" size="4" value="<%currenttime(year)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>\r
+ <input id="inputmonth" name="month" size="2" value="<%currenttime(mon)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>\r
+ <input id="inputday" name="day" size="2" value="<%currenttime(mday)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_DAY)%>\r
+ <input id="inputhour" name="hour" size="2" value="<%currenttime(hours)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>\r
+ <input id="inputminutes" name="minutes" size="2" value="<%currenttime(minutes)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>\r
+ <br />\r
+ <%text(_ITEM_ADDEDITTEMPLATE_FORMAT)%>(yyyy)<%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>(mm)<%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>(dd)<%text(_ITEM_ADDEDITTEMPLATE_DAY)%> (hh)<%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>(mm)<%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>\r
+ <%ifblogsetting(ballowpast,0)%><br /><%text(_ADD_NOPASTDATES)%><%endif%>\r
+ </div>\r
+ <input name="actiontype" value="adddraft" type="radio" id="act_draft" /><label for="act_draft"><%text(_ADD_ADDDRAFT)%></label> <%helplink(draft)%><br />\r
+ <input id="dosendping" name="dosendping" value="1" type="checkbox" checked="checked" /><label for="dosendping"><%text(_UPDATEDPING_GOSENDPING)%></label>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ <td><%text(_ADD_PLUGIN_EXTRAS)%></td>\r
+ <td><%pluginextras%></td>\r
+ </tr>\r
+ <%itemoptions%>\r
+ </table>\r
+ </div>\r
+ <div id="preview" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">\r
+ <h2><%text(_ADD_PREVIEW)%></h2>\r
+ <strong><span id="prevtitle"> </span></strong>\r
<br />\r
- <input name="actiontype" value="addfuture" type="radio" id="act_future" /><label for="act_future"><%text(_ADD_ADDLATER)%></label> <%helplink(future)%>\r
- <div class="indent">\r
- <%text(_ADD_PLACE_ON)%>\r
- <input id="inputyear" name="year" size="4" value="<%currenttime(year)%>" />年\r
- <input id="inputmonth" name="month" size="2" value="<%currenttime(mon)%>" />月\r
- <input id="inputday" name="day" size="2" value="<%currenttime(mday)%>" />日\r
- <input id="inputhour" name="hour" size="2" value="<%currenttime(hours)%>" />時\r
- <input id="inputminutes" name="minutes" size="2" value="<%currenttime(minutes)%>" />分\r
- <br />\r
- フォーマット:(yyyy)年(mm)月(dd)日 (hh)時(mm)分\r
- <%ifblogsetting(ballowpast,0)%>\r
- <br />\r
- <%text(_ADD_NOPASTDATES)%>\r
- <%endif%>\r
- </div>\r
- <input name="actiontype" value="adddraft" type="radio" id="act_draft" /><label for="act_draft"><%text(_ADD_ADDDRAFT)%></label> <%helplink(draft)%>\r
- </td>\r
- </tr>\r
- <tr>\r
- <td><%text(_ADD_PLUGIN_EXTRAS)%></td>\r
- <td>\r
- <%pluginextras%></td>\r
- </tr>\r
- \r
- \r
- <%itemoptions%>\r
- </table>\r
- \r
-\r
+ <span id="prevbody"> </span>\r
+ <br />\r
+ <span id="prevmore"> </span>\r
+ </div>\r
</div>\r
- \r
- <div id="preview" class="contentblock">\r
- <h2><%text(_ADD_PREVIEW)%></h2>\r
- \r
- <b><span id="prevtitle"></span></b>\r
- <br />\r
- <span id="prevbody"></span>\r
- <br />\r
- <span id="prevmore"></span>\r
+ <div class="submitbuttons">\r
+ <input type="submit" value="<%text(_BMLET_EDIT)%>" onclick="return checkSubmit();" />\r
+ <%ifautosave()%><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="preautoSaveDraft();" /><%endif%>\r
+ <input type="button" value="<%text(_BMLET_CANCEL)%>" onclick="window.close();" />\r
+ <%ifautosave()%><span class="autosavestatus">(<%text(_AUTOSAVEDRAFT)%> : <span class="lastsavedtime"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%>)</span></span><%endif%>\r
</div>\r
- \r
- </div></form>\r
+ </form>\r
+ <%ifautosave()%><script type="text/javascript">\r
+ var xmlhttprequest = new Array();\r
+ xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler\r
+ xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler\r
+ var seconds = now(); // Last AutoDraft time\r
+ var checks = 0; // Number of checks since last AutoDraft\r
+ var addform = document.getElementById('addform'); // The form id\r
+ var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come\r
+ var goalurl = '../action.php'; // The PHP file where the content must be posted to\r
+ var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'\r
+ var formtype = 'add'; // Add or edit form\r
+ </script><%endif%>\r
</body>\r
- </html>\r
-\r
+</html>\r