OSDN Git Service

34cf598872ffb9b3ed4981e17f4eb9c10bca9b01
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / libs / include / bookmarklet-edit.template
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2         <html xmlns="http://www.w3.org/1999/xhtml">
3         <head>
4                 <title><%text(_EDIT_ITEM)%></title>
5                 <link rel="stylesheet" type="text/css" href="styles/bookmarklet.css" />
6                 <link rel="stylesheet" type="text/css" href="styles/addedit.css" />                             
7                 <script type="text/javascript" src="javascript/bookmarklet.js"></script>
8                 <script type="text/javascript" src="javascript/edit.js"></script>
9                 <script type="text/javascript" src="javascript/numbercheck.js"></script>
10                 <script type="text/javascript" src="javascript/xmlhttprequest.js"></script>
11                 <%init%>
12                 <%extrahead%>
13                 <script type="text/javascript">
14                         var nucleus_initbm_oldonload = window.onload;
15                         function nucleus_initbm()
16                         {
17                                 initStyles(); 
18                                 updAllPreviews();
19
20                                 if (nucleus_initbm_oldonload)
21                                         nucleus_initbm_oldonload();
22                         }
23                         window.onload = nucleus_initbm;
24                 </script>
25         </head>
26         <body>
27                 <h1><%text(_EDIT_ITEM)%> (<%contents(itemid)%>)</h1>
28                 <form id="editform" method="post" action="bookmarklet.php" ><div>
29                         
30                         <input name="action" type="hidden" value="edititem" />
31                         <input name="itemid" type="hidden" value="<%contents(itemid)%>" />
32                         <input type="hidden" name="draftid" value="0" />
33                         <%ticket%>
34                         
35                         <div id="submit" class="buttonbar">
36                                 <input type="submit" value="<%text(_BMLET_EDIT)%>" onclick="return checkSubmit();" />
37                                 <div id="switchbuttons">
38                                         <input type="button" onclick="flipBlock('body');" value="<%text(_BMLET_BODY)%> &gt;&gt;" />
39                                         <input type="button" onclick="flipBlock('more');" value="<%text(_BMLET_MORE)%> &gt;&gt;" />
40                                         <input type="button" onclick="flipBlock('options');" value="<%text(_BMLET_OPTIONS)%> &gt;&gt;" />
41                                         <input type="button" onclick="updAllPreviews(); flipBlock('preview');" value="<%text(_BMLET_PREVIEW)%> &gt;&gt;" />
42                                 </div>
43                         </div>
44
45                         <div id="body" class="contentblock">
46                                 <table>
47                                 <tr>
48                                 <td><%text(_AUTOSAVEDRAFT)%></td>
49                                 <td><span id="info"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%></span></td>
50                                 </tr>
51                                 <tr>
52                                 <td><%text(_ADD_TITLE)%></td>
53                                 <td><input 
54                                         <%jsinput(title)%>
55                                         type="text" size="60" maxlength="160" 
56                                         value="<%contents(title)%>"
57                                 /></td></tr>
58                         
59                                 <tr><td>
60                                 <%text(_ADD_BODY)%>
61                                 </td><td>
62                                 <%jsbuttonbar(media)%>
63                                 <textarea 
64                                         <%jsinput(body)%>
65                                         cols="58" 
66                                         rows="12"><%contents(body)%></textarea>
67
68                                 </td></tr>
69                                 <tr>
70                                 <td><%text(_ADD_CATEGORY)%></td>
71                                 <td><%categories%></td>
72                                 </tr>
73                                 <tr>
74                                 <td><%text(_AUTOSAVEDRAFT_NOW)%></td>
75                                 <td><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="autoSaveDraft();" /></td>
76                                 </tr>
77                                 </table>
78                                         
79                         </div>
80                         
81                         <div id="more" class="contentblock">
82                                 <table>
83                                 <tr>
84                                 <td><%text(_ADD_MORE)%> <%helplink(extended)%></td>
85                                 <td>
86                                 <%jsbuttonbar(media)%>
87                                 <textarea 
88                                         <%jsinput(more)%>
89                                         cols="58" 
90                                         rows="17"><%contents(more)%></textarea>
91                                 </td></tr></table>
92                         </div>
93                         <div id="options" class="contentblock">
94                                 <table>
95                                 <%ifblogsetting(bcomments)%>
96                                         <tr>
97                                         <td><%text(_ADD_DISABLE_COMMENTS)%></td>
98                                         <td>
99                                     <input type="radio" name="closed" value="1" id="closed_yes" <%checkedonval(1,closed)%> /><label for="closed_yes"><%text(_YES)%></label>
100                                     <input type="radio" name="closed" value="0" id="closed_no" <%checkedonval(0,closed)%> /><label for="closed_no"><%text(_NO)%></label>
101                                         </td>
102                                         </tr>
103                                 <%endif%>
104                                 
105                                 <!-- The only actiontypes are 'edit', 'changedate' (no draft items can be edited) and 'delete' -->
106                                 <tr>
107                                 <td>Action</td>
108                                 <td>
109                                 <ul class="nobullets">
110                                         <li><input name="actiontype" value="edit" type="radio" checked="checked" id="act_edit" /><label for="act_edit"><%text(_BMLET_EDIT)%></label></li>
111                                         <li><input name="actiontype" value="delete" type="radio" id="act_delete" /><label for="act_delete"><%text(_BMLET_DELETE)%></label></li>
112                                         <%ifblogsetting(ballowpast)%>
113                                                 <li>
114                                                         <input name="actiontype" value="changedate" type="radio" id="act_changedate" tabindex="70" /><label for="act_changedate"><%text(_BMLET_CHANGEDATE)%></label> <%helplink(changedate)%>
115                                                                         <div class="indent">
116                                                                                 <input id="inputyear" name="year" tabindex="71" size="4" value="<%itemtime(year)%>" />年
117                                                                                 <input id="inputmonth" name="month" tabindex="72" size="2" value="<%itemtime(mon)%>" />月
118                                                                                 <input id="inputday" name="day" tabindex="73" size="2" value="<%itemtime(mday)%>" />日
119                                                                                 <input id="inputhour" name="hour" tabindex="74" size="2" value="<%itemtime(hours)%>" />時
120                                                                                 <input id="inputminutes" name="minutes" tabindex="75" size="2" value="<%itemtime(minutes)%>" />分
121                                                                                 <br />
122                                                                                 フォーマット:(yyyy)年(mm)月(dd)日 (hh)時(mm)分
123                                                                         </div>
124                                                         </li>
125                                         <%endif%>                                               
126                                 </ul>
127                                 </td></tr>
128                                 
129                                 <tr>
130                                 <td><%text(_ADD_PLUGIN_EXTRAS)%></td>
131                                 <td>
132                                 <%pluginextras%>
133                                 </td></tr>
134                                 
135                                   <%itemoptions%>
136                                 </table>
137                                 
138                         </div>
139                         
140                         <div id="preview" class="contentblock">
141                                 <h2><%text(_ADD_PREVIEW)%></h2>
142                                 
143                                 <b><span id="prevtitle">&#160;</span></b>
144                                 <br />
145                                 <span id="prevbody">&#160;</span>
146                                 <br />
147                                 <span id="prevmore">&#160;</span>
148                         </div>
149                         
150                 </div></form>
151
152         <script type="text/javascript">
153                 var xmlhttprequest = new Array();
154                 xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
155                 xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
156                 var seconds = now(); // Last AutoDraft time
157                 var checks = 0; // Number of checks since last AutoDraft
158                 var addform = document.getElementById('editform'); // The form id
159                 var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
160                 var goalurl = '../action.php'; // The PHP file where the content must be posted to
161                 var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
162                 var formtype = 'edit'; // Add or edit form
163         </script>
164
165         </body>
166         </html>
167