1 <?xml version="1.0" encoding="<%text(_CHARSET)%>"?>
\r
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
3 <html <%text(_HTML_XML_NAME_SPACE_AND_LANG_CODE)%>>
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=<%text(_CHARSET)%>" />
\r
7 Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
\r
8 Copyright (C) 2002-2009 The Nucleus Group
\r
10 This program is free software; you can redistribute it and/or
\r
11 modify it under the terms of the GNU General Public License
\r
12 as published by the Free Software Foundation; either version 2
\r
13 of the License, or (at your option) any later version.
\r
14 (see nucleus/documentation/index.html#license for more info)
\r
16 @license http://nucleuscms.org/license.txt GNU General Public License
\r
17 @copyright Copyright (C) 2002-2009 The Nucleus Group
\r
20 <title><%text(_EDIT_ITEM)%></title>
\r
21 <link rel="stylesheet" type="text/css" href="styles/bookmarklet.css" />
\r
22 <link rel="stylesheet" type="text/css" href="styles/addedit.css" />
\r
23 <link rel="stylesheet" type="text/css" href="styles/jqueryui/ui.all.css" />
\r
24 <meta http-equiv="Content-Script-Type" content="text/javascript" />
\r
25 <script type="text/javascript" src="javascript/bookmarklet.js"></script>
\r
26 <script type="text/javascript" src="javascript/edit.js"></script>
\r
27 <script type="text/javascript" src="javascript/numbercheck.js"></script>
\r
28 <%ifautosave()%><script type="text/javascript" src="javascript/xmlhttprequest.js"></script><%endif%>
\r
29 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
\r
32 <script type="text/javascript">
\r
34 google.load("jquery", "1");
\r
35 google.load("jqueryui", "1");
\r
36 var nucleus_initbm_oldonload = window.onload;
\r
37 function nucleus_initbm()
\r
42 if (nucleus_initbm_oldonload)
\r
43 nucleus_initbm_oldonload();
\r
45 window.onload = nucleus_initbm;
\r
46 google.setOnLoadCallback(function() {
\r
48 $("#tabs > ul").tabs();
\r
49 $("table tr td:first-child").css("width", "14%");
\r
52 function preautoSaveDraft() {
\r
53 $(".autosavestatus").text('(' + lastsavedtext + ' ' + formattedDate() + ')');
\r
60 <h1><%text(_EDIT_ITEM)%> (<%contents(itemid)%>)</h1>
\r
61 <form id="editform" method="post" action="bookmarklet.php" >
\r
62 <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
\r
63 <ul class=" ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
\r
64 <li class="ui-state-default ui-corner-top"><a href="#body"><%text(_BMLET_BODY)%> >></a></li>
\r
65 <li class="ui-state-default ui-corner-top"><a href="#more"><%text(_BMLET_MORE)%> >></a></li>
\r
66 <li class="ui-state-default ui-corner-top"><a href="#options"><%text(_BMLET_OPTIONS)%> >></a></li>
\r
67 <li class="ui-state-default ui-corner-top"><a href="#preview" onclick="updAllPreviews();"><%text(_BMLET_PREVIEW)%> >></a></li>
\r
69 <input name="action" type="hidden" value="edititem" />
\r
70 <input name="itemid" type="hidden" value="<%contents(itemid)%>" />
\r
71 <input type="hidden" name="draftid" value="0" />
\r
73 <div id="body" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
76 <td><%text(_ADD_TITLE)%></td>
\r
77 <td><input <%jsinput(title)%> type="text" size="60" maxlength="160" value="<%contents(title)%>" /></td>
\r
80 <td><%text(_ADD_BODY)%> <%helplink(additem)%></td>
\r
82 <%jsbuttonbar(media)%>
\r
83 <textarea <%jsinput(body)%> cols="58" rows="12"><%contents(body)%></textarea>
\r
87 <td><%text(_ADD_CATEGORY)%></td>
\r
88 <td><%categories%></td>
\r
92 <div id="more" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
95 <td><%text(_ADD_MORE)%> <%helplink(extended)%></td>
\r
97 <%jsbuttonbar(media)%>
\r
98 <textarea <%jsinput(more)%> cols="58" rows="17"><%contents(more)%></textarea>
\r
103 <div id="options" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
105 <%ifblogsetting(bcomments)%><tr>
\r
106 <td><%text(_ADD_DISABLE_COMMENTS)%></td>
\r
108 <input type="radio" name="closed" value="1" id="closed_yes" <%checkedonval(1,closed)%> /><label for="closed_yes"><%text(_YES)%></label>
\r
109 <input type="radio" name="closed" value="0" id="closed_no" <%checkedonval(0,closed)%> /><label for="closed_no"><%text(_NO)%></label>
\r
112 <!-- The only actiontypes are 'edit', 'changedate' (no draft items can be edited) and 'delete' -->
\r
114 <td><%text(_EDIT_SUBMIT)%></td>
\r
116 <ul class="nobullets">
\r
117 <li><input name="actiontype" value="edit" type="radio" checked="checked" id="act_edit" /><label for="act_edit"><%text(_BMLET_EDIT)%></label></li>
\r
118 <li><input name="actiontype" value="delete" type="radio" id="act_delete" /><label for="act_delete"><%text(_BMLET_DELETE)%></label></li>
\r
119 <%ifblogsetting(ballowpast)%><li>
\r
120 <input name="actiontype" value="changedate" type="radio" id="act_changedate" tabindex="70" /><label for="act_changedate"><%text(_BMLET_CHANGEDATE)%></label> <%helplink(changedate)%>
\r
121 <div class="indent">
\r
122 <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
123 <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
124 <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
125 <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
126 <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
127 <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
131 <input name="actiontype" value="backtodrafts" type="radio" id="act_backtodrafts" tabindex="71" /><label for="act_backtodrafts"><%text(_BMLET_BACKTODRAFTS)%></label> <%helplink(draft)%>
\r
134 <br /><input id="dosendping" name="dosendping" value="1" type="checkbox" /><label for="dosendping"><%text(_UPDATEDPING_GOSENDPING)%></label>
\r
139 <td><%text(_ADD_PLUGIN_EXTRAS)%></td>
\r
140 <td><%pluginextras%></td>
\r
145 <div id="preview" class="contentblock ui-tabs-panel ui-widget-content ui-corner-bottom">
\r
146 <h2><%text(_ADD_PREVIEW)%></h2>
\r
147 <b><span id="prevtitle"> </span></b>
\r
149 <span id="prevbody"> </span>
\r
151 <span id="prevmore"> </span>
\r
153 <div class="submitbuttons">
\r
154 <input type="submit" value="<%text(_BMLET_EDIT)%>" onclick="return checkSubmit();" />
\r
155 <%ifautosave()%><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="autoSaveDraft();" /><%endif%>
\r
156 <input type="button" value="<%text(_BMLET_CANCEL)%>" onclick="window.close();" />
\r
157 <%ifautosave()%><span class="autosavestatus">(<%text(_AUTOSAVEDRAFT)%> : <span class="lastsavedtime"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%>)</span></span><%endif%>
\r
162 <%ifautosave()%><script type="text/javascript">
\r
163 var xmlhttprequest = new Array();
\r
164 xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
\r
165 xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
\r
166 var seconds = now(); // Last AutoDraft time
\r
167 var checks = 0; // Number of checks since last AutoDraft
\r
168 var addform = document.getElementById('editform'); // The form id
\r
169 var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
\r
170 var goalurl = '../action.php'; // The PHP file where the content must be posted to
\r
171 var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
\r
172 var formtype = 'edit'; // Add or edit form
\r