1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
2 <html <%text(_HTML_XML_NAME_SPACE_AND_LANG_CODE)%>>
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=<%text(_CHARSET)%>" />
\r
6 Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
\r
7 Copyright (C) 2002-2009 The Nucleus Group
\r
9 This program is free software; you can redistribute it and/or
\r
10 modify it under the terms of the GNU General Public License
\r
11 as published by the Free Software Foundation; either version 2
\r
12 of the License, or (at your option) any later version.
\r
13 (see nucleus/documentation/index.html#license for more info)
\r
15 @license http://nucleuscms.org/license.txt GNU General Public License
\r
16 @copyright Copyright (C) 2002-2009 The Nucleus Group
\r
19 <title><%text(_EDIT_ITEM)%></title>
\r
20 <link rel="stylesheet" type="text/css" href="styles/bookmarklet.css" />
\r
21 <link rel="stylesheet" type="text/css" href="styles/addedit.css" />
\r
22 <link rel="stylesheet" type="text/css" href="styles/jqueryui/ui.all.css" />
\r
23 <script type="text/javascript" src="javascript/bookmarklet.js"></script>
\r
24 <script type="text/javascript" src="javascript/edit.js"></script>
\r
25 <script type="text/javascript" src="javascript/numbercheck.js"></script>
\r
26 <%ifautosave()%><script type="text/javascript" src="javascript/xmlhttprequest.js"></script><%endif%>
\r
27 <script src="http://www.google.com/jsapi"></script>
\r
30 <script type="text/javascript">
\r
31 google.load("jquery", "1");
\r
32 google.load("jqueryui", "1");
\r
33 var nucleus_initbm_oldonload = window.onload;
\r
34 function nucleus_initbm()
\r
39 if (nucleus_initbm_oldonload)
\r
40 nucleus_initbm_oldonload();
\r
42 window.onload = nucleus_initbm;
\r
43 google.setOnLoadCallback(function() {
\r
45 $("#tabs > ul").tabs();
\r
46 $("table tr td:first-child").css("width", "14%");
\r
49 function preautoSaveDraft() {
\r
50 $(".autosavestatus").text('(' + lastsavedtext + ' ' + formattedDate() + ')');
\r
56 <h1><%text(_EDIT_ITEM)%> (<%contents(itemid)%>)</h1>
\r
57 <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
\r
58 <ul class=" ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
\r
59 <li class="ui-state-default ui-corner-top"><a href="#body"><%text(_BMLET_BODY)%> >></a></li>
\r
60 <li class="ui-state-default ui-corner-top"><a href="#more"><%text(_BMLET_MORE)%> >></a></li>
\r
61 <li class="ui-state-default ui-corner-top"><a href="#options"><%text(_BMLET_OPTIONS)%> >></a></li>
\r
62 <li class="ui-state-default ui-corner-top"><a href="#preview"><%text(_BMLET_PREVIEW)%> >></a></li>
\r
64 <form id="editform" method="post" action="bookmarklet.php" ><div>
\r
65 <input name="action" type="hidden" value="edititem" />
\r
66 <input name="itemid" type="hidden" value="<%contents(itemid)%>" />
\r
67 <input type="hidden" name="draftid" value="0" />
\r
69 <!-- div id="submit" class="buttonbar" -->
\r
70 <!-- div id="switchbuttons" -->
\r
71 <!-- input type="button" onclick="flipBlock('body');" value="<%text(_BMLET_BODY)%> >>" / -->
\r
72 <!-- input type="button" onclick="flipBlock('more');" value="<%text(_BMLET_MORE)%> >>" / -->
\r
73 <!-- input type="button" onclick="flipBlock('options');" value="<%text(_BMLET_OPTIONS)%> >>" / -->
\r
74 <!-- input type="button" onclick="updAllPreviews(); flipBlock('preview');" value="<%text(_BMLET_PREVIEW)%> >>" / -->
\r
76 <!-- input type="submit" value="<%text(_BMLET_EDIT)%>" onclick="return checkSubmit();" / -->
\r
77 <!-- input type="button" value="<%text(_BMLET_CANCEL)%>" onclick="window.close();" / -->
\r
80 <div id="body" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
84 <td><%text(_ADD_TITLE)%></td>
\r
88 type="text" size="60" maxlength="160"
\r
89 value="<%contents(title)%>"
\r
93 <%text(_ADD_BODY)%> <%helplink(additem)%></td>
\r
95 <%jsbuttonbar(media)%>
\r
99 rows="12"><%contents(body)%></textarea>
\r
103 <%text(_ADD_CATEGORY)%></td>
\r
104 <td><%categories%></td>
\r
107 <%ifautosave()%><td><%text(_AUTOSAVEDRAFT_NOW)%></td>
\r
108 <td><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="autoSaveDraft();" /></td><%endif%>
\r
115 <div id="more" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
118 <td><%text(_ADD_MORE)%> <%helplink(extended)%></td>
\r
120 <%jsbuttonbar(media)%>
\r
124 rows="17"><%contents(more)%></textarea>
\r
127 <div id="options" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
129 <%ifblogsetting(bcomments)%>
\r
131 <td><%text(_ADD_DISABLE_COMMENTS)%></td>
\r
133 <input type="radio" name="closed" value="1" id="closed_yes" <%checkedonval(1,closed)%> /><label for="closed_yes"><%text(_YES)%></label>
\r
134 <input type="radio" name="closed" value="0" id="closed_no" <%checkedonval(0,closed)%> /><label for="closed_no"><%text(_NO)%></label>
\r
139 <!-- The only actiontypes are 'edit', 'changedate' (no draft items can be edited) and 'delete' -->
\r
141 <td><%text(_EDIT_SUBMIT)%></td>
\r
143 <ul class="nobullets">
\r
144 <li><input name="actiontype" value="edit" type="radio" checked="checked" id="act_edit" /><label for="act_edit"><%text(_BMLET_EDIT)%></label></li>
\r
145 <li><input name="actiontype" value="delete" type="radio" id="act_delete" /><label for="act_delete"><%text(_BMLET_DELETE)%></label></li>
\r
146 <%ifblogsetting(ballowpast)%>
\r
148 <input name="actiontype" value="changedate" type="radio" id="act_changedate" tabindex="70" /><label for="act_changedate"><%text(_BMLET_CHANGEDATE)%></label> <%helplink(changedate)%>
\r
149 <div class="indent">
\r
150 <input id="inputyear" name="year" tabindex="71" size="4" value="<%itemtime(year)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>
\r
151 <input id="inputmonth" name="month" tabindex="72" size="2" value="<%itemtime(mon)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>
\r
152 <input id="inputday" name="day" tabindex="73" size="2" value="<%itemtime(mday)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_DAY)%>
\r
154 <input id="inputhour" name="hour" tabindex="74" size="2" value="<%itemtime(hours)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>
\r
155 <input id="inputminutes" name="minutes" tabindex="75" size="2" value="<%itemtime(minutes)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>
\r
156 <br /><%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
160 <input name="actiontype" value="backtodrafts" type="radio" id="act_backtodrafts" tabindex="71" /><label for="act_backtodrafts"><%text(_BMLET_BACKTODRAFTS)%></label> <%helplink(draft)%>
\r
164 <br /><input id="dosendping" name="dosendping" value="1" type="checkbox"><label for="dosendping"><%text(_UPDATEDPING_GOSENDPING)%></label>
\r
169 <td><%text(_ADD_PLUGIN_EXTRAS)%></td>
\r
180 <div id="preview" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
181 <h2><%text(_ADD_PREVIEW)%></h2>
\r
183 <b><span id="prevtitle"> </span></b>
\r
185 <span id="prevbody"> </span>
\r
187 <span id="prevmore"> </span>
\r
193 <div class="submitbuttons">
\r
194 <input type="submit" value="<%text(_BMLET_EDIT)%>" onclick="return checkSubmit();" />
\r
195 <%ifautosave()%><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="autoSaveDraft();" /><%endif%>
\r
196 <input type="button" value="<%text(_BMLET_CANCEL)%>" onclick="window.close();" />
\r
197 <%ifautosave()%><span class="autosavestatus">(<%text(_AUTOSAVEDRAFT)%> : <span class="lastsavedtime"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%>)</span></span><%endif%>
\r
200 <%ifautosave()%><script type="text/javascript">
\r
201 var xmlhttprequest = new Array();
\r
202 xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
\r
203 xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
\r
204 var seconds = now(); // Last AutoDraft time
\r
205 var checks = 0; // Number of checks since last AutoDraft
\r
206 var addform = document.getElementById('editform'); // The form id
\r
207 var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
\r
208 var goalurl = '../action.php'; // The PHP file where the content must be posted to
\r
209 var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
\r
210 var formtype = 'edit'; // Add or edit form
\r