Version Description
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Custom Field Template |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.7 to 1.3.0
- custom-field-template-it_IT.mo +0 -0
- custom-field-template-it_IT.po +129 -125
- custom-field-template-ja.mo +0 -0
- custom-field-template-ja.po +127 -123
- custom-field-template.php +206 -98
- custom-field-template.pot +127 -123
- js/calendar.png +0 -0
- js/date.js +499 -0
- js/datePicker.css +145 -0
- js/jquery.bgiframe.js +104 -0
- js/jquery.datePicker.js +1187 -0
- readme.txt +4 -2
custom-field-template-it_IT.mo
CHANGED
Binary file
|
custom-field-template-it_IT.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template in italiano\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2009-
|
6 |
-
"PO-Revision-Date: 2009-
|
7 |
"Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
|
8 |
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -16,399 +16,403 @@ msgstr ""
|
|
16 |
"X-Poedit-Basepath: ../\n"
|
17 |
"X-Poedit-SearchPath-0: custom-field-template\n"
|
18 |
|
19 |
-
#: custom-field-template/custom-field-template.php:
|
20 |
-
#: custom-field-template/custom-field-template.php:
|
21 |
-
#: custom-field-template/custom-field-template.php:
|
22 |
-
#: custom-field-template/custom-field-template.php:
|
23 |
-
#: custom-field-template/custom-field-template.php:
|
24 |
-
#: custom-field-template/custom-field-template.php:
|
25 |
msgid "Custom Field Template"
|
26 |
msgstr "Custom Field Template"
|
27 |
|
28 |
-
#: custom-field-template/custom-field-template.php:
|
29 |
-
#: custom-field-template/custom-field-template.php:
|
30 |
msgid "Load"
|
31 |
msgstr "Carica"
|
32 |
|
33 |
-
#: custom-field-template/custom-field-template.php:
|
34 |
msgid "read more"
|
35 |
msgstr "prosegui"
|
36 |
|
37 |
-
#: custom-field-template/custom-field-template.php:
|
38 |
-
#: custom-field-template/custom-field-template.php:
|
39 |
msgid "Custom Fields"
|
40 |
msgstr "Campi personalizzati"
|
41 |
|
42 |
-
#: custom-field-template/custom-field-template.php:
|
43 |
msgid "Settings"
|
44 |
msgstr "Impostazioni"
|
45 |
|
46 |
-
#: custom-field-template/custom-field-template.php:
|
47 |
msgid "Default Template"
|
48 |
msgstr "Template predefinito"
|
49 |
|
50 |
-
#: custom-field-template/custom-field-template.php:560
|
51 |
-
#: custom-field-template/custom-field-template.php:564
|
52 |
#: custom-field-template/custom-field-template.php:576
|
53 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
54 |
#: custom-field-template/custom-field-template.php:600
|
|
|
55 |
msgid "Options updated."
|
56 |
msgstr "Le opzioni sono state aggiornate."
|
57 |
|
58 |
-
#: custom-field-template/custom-field-template.php:
|
59 |
msgid "Value Counts rebuilt."
|
60 |
msgstr "Value Counts rigenerati. "
|
61 |
|
62 |
-
#: custom-field-template/custom-field-template.php:
|
63 |
msgid "Tags rebuilt."
|
64 |
msgstr "Rigenera i tag."
|
65 |
|
66 |
-
#: custom-field-template/custom-field-template.php:
|
67 |
msgid "Options imported."
|
68 |
msgstr "Le opzioni sono state importate."
|
69 |
|
70 |
-
#: custom-field-template/custom-field-template.php:
|
71 |
msgid "Options resetted."
|
72 |
msgstr "Le opzioni sono state ripristinate."
|
73 |
|
74 |
-
#: custom-field-template/custom-field-template.php:
|
75 |
msgid "Options deleted."
|
76 |
msgstr "Le opzioni sini state cancellate:"
|
77 |
|
78 |
-
#: custom-field-template/custom-field-template.php:
|
79 |
-
#: custom-field-template/custom-field-template.php:
|
80 |
-
#: custom-field-template/custom-field-template.php:
|
81 |
-
#: custom-field-template/custom-field-template.php:
|
82 |
-
#: custom-field-template/custom-field-template.php:
|
83 |
-
#: custom-field-template/custom-field-template.php:
|
84 |
-
#: custom-field-template/custom-field-template.php:
|
85 |
-
#: custom-field-template/custom-field-template.php:
|
86 |
-
#: custom-field-template/custom-field-template.php:
|
87 |
-
#: custom-field-template/custom-field-template.php:
|
88 |
-
#: custom-field-template/custom-field-template.php:
|
89 |
-
#: custom-field-template/custom-field-template.php:
|
90 |
-
#: custom-field-template/custom-field-template.php:
|
91 |
msgid "Click to toggle"
|
92 |
msgstr "Clicca per commutare"
|
93 |
|
94 |
-
#: custom-field-template/custom-field-template.php:
|
95 |
msgid "Custom Field Template Options"
|
96 |
msgstr "Opzioni template campi personalizzati"
|
97 |
|
98 |
-
#: custom-field-template/custom-field-template.php:
|
99 |
msgid "Template Title"
|
100 |
msgstr "Nome del template:"
|
101 |
|
102 |
-
#: custom-field-template/custom-field-template.php:
|
103 |
msgid "Template Instruction"
|
104 |
msgstr "Allestimento template"
|
105 |
|
106 |
-
#: custom-field-template/custom-field-template.php:
|
107 |
-
#: custom-field-template/custom-field-template.php:
|
108 |
msgid "Post Type"
|
109 |
msgstr "Tipo di articolo"
|
110 |
|
111 |
-
#: custom-field-template/custom-field-template.php:
|
112 |
-
#: custom-field-template/custom-field-template.php:
|
113 |
msgid "Both"
|
114 |
msgstr "Entrambi"
|
115 |
|
116 |
-
#: custom-field-template/custom-field-template.php:
|
117 |
-
#: custom-field-template/custom-field-template.php:
|
118 |
msgid "Post"
|
119 |
msgstr "Articolo"
|
120 |
|
121 |
-
#: custom-field-template/custom-field-template.php:
|
122 |
-
#: custom-field-template/custom-field-template.php:
|
123 |
msgid "Page"
|
124 |
msgstr "Pagina"
|
125 |
|
126 |
-
#: custom-field-template/custom-field-template.php:
|
127 |
-
|
|
|
|
|
|
|
|
|
128 |
msgid "Category ID (comma-deliminated)"
|
129 |
msgstr "ID categoria (separa con una virgola)"
|
130 |
|
131 |
-
#: custom-field-template/custom-field-template.php:
|
132 |
msgid "Template Content"
|
133 |
msgstr "Contenuti template"
|
134 |
|
135 |
-
#: custom-field-template/custom-field-template.php:
|
136 |
msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
|
137 |
msgstr "Nel caso in cui desiderassi inserire più immagini contemporaneamente utilizza i pulsanti media del campo personalizzato"
|
138 |
|
139 |
-
#: custom-field-template/custom-field-template.php:
|
140 |
msgid "Use multiple image inset"
|
141 |
msgstr "Inserisci più immagini contemporaneamente"
|
142 |
|
143 |
-
#: custom-field-template/custom-field-template.php:
|
144 |
msgid "Caution:"
|
145 |
msgstr "Attenzione:"
|
146 |
|
147 |
-
#: custom-field-template/custom-field-template.php:
|
148 |
msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
|
149 |
msgstr "E' necessario modificare `wp-admin/includes/media.php`. Cancella o disabilita il codice nella funzione media_send_to_editor."
|
150 |
|
151 |
-
#: custom-field-template/custom-field-template.php:
|
152 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
153 |
msgstr "Nel caso in cui desiderassi sostituire le chiavi personalizzate con le etichette qualora fosse stato impostato `label`"
|
154 |
|
155 |
-
#: custom-field-template/custom-field-template.php:
|
156 |
msgid "Use labels in place of custom keys"
|
157 |
msgstr "Utilizza le etichette al posto delle chiavi personalizzate"
|
158 |
|
159 |
-
#: custom-field-template/custom-field-template.php:
|
160 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
161 |
msgstr "Nel caso in cui desiderassi aggiungere automaticamente i tag p e br nell'area di testo"
|
162 |
|
163 |
-
#: custom-field-template/custom-field-template.php:
|
164 |
msgid "Use wpautop function"
|
165 |
msgstr "Usa funzione wpautop"
|
166 |
|
167 |
-
#: custom-field-template/custom-field-template.php:
|
168 |
msgid "In case that you would like to save values automatically in switching templates"
|
169 |
msgstr "Nel caso in cui desiderassi salvare automaticamente i valori durante il cambio dei template"
|
170 |
|
171 |
-
#: custom-field-template/custom-field-template.php:
|
172 |
msgid "Use the auto save in switching templates"
|
173 |
msgstr "Salva in automatico al cambio dei template"
|
174 |
|
175 |
-
#: custom-field-template/custom-field-template.php:
|
176 |
msgid "In case that you would like to forbid to use the default custom fields."
|
177 |
msgstr "Nel caso in cui desiderassi impedire l'utilizzo dei campi personalizzati predefiniti."
|
178 |
|
179 |
-
#: custom-field-template/custom-field-template.php:
|
180 |
msgid "Disable the default custom fields"
|
181 |
msgstr "Disattiva i campi personalizzati predefiniti"
|
182 |
|
183 |
-
#: custom-field-template/custom-field-template.php:
|
184 |
msgid "In case that you would like to forbid to use the quick edit."
|
185 |
msgstr "Nel caso in cui desiderassi impedire l'utilizzo dell'editor veloce."
|
186 |
|
187 |
-
#: custom-field-template/custom-field-template.php:
|
188 |
msgid "Disable the quick edit"
|
189 |
msgstr "Disattiva l'editor veloce"
|
190 |
|
191 |
-
#: custom-field-template/custom-field-template.php:
|
192 |
msgid "In case that you would like to replace the box title with the template title."
|
193 |
msgstr "Nel caso in cui desiderassi sostituire il titolo della casella con il titolo del template."
|
194 |
|
195 |
-
#: custom-field-template/custom-field-template.php:
|
196 |
msgid "Replace the box title"
|
197 |
msgstr "Sostituisci il titolo della casella"
|
198 |
|
199 |
-
#: custom-field-template/custom-field-template.php:
|
200 |
msgid "In case that you would like to use the shortcode in the widget."
|
201 |
msgstr "Nel caso in cui desiderassi utilizzare lo shortcode nel widget"
|
202 |
|
203 |
-
#: custom-field-template/custom-field-template.php:
|
204 |
msgid "Use the shortcode in the widget"
|
205 |
msgstr "Utilizza lo shortcode nel widget"
|
206 |
|
207 |
-
#: custom-field-template/custom-field-template.php:
|
208 |
-
#: custom-field-template/custom-field-template.php:
|
209 |
-
#: custom-field-template/custom-field-template.php:
|
210 |
-
#: custom-field-template/custom-field-template.php:
|
211 |
-
#: custom-field-template/custom-field-template.php:
|
212 |
msgid "Update Options »"
|
213 |
msgstr "Aggiorna le opzioni »"
|
214 |
|
215 |
-
#: custom-field-template/custom-field-template.php:
|
216 |
msgid "ADMIN CSS"
|
217 |
msgstr "CSS AMMINISTRAZIONE"
|
218 |
|
219 |
-
#: custom-field-template/custom-field-template.php:
|
220 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
221 |
msgstr "Formato Shortcode [cft] e [cftsearch]"
|
222 |
|
223 |
-
#: custom-field-template/custom-field-template.php:
|
224 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
225 |
msgstr "[key] verrà convertito nel valore di [key]."
|
226 |
|
227 |
-
#: custom-field-template/custom-field-template.php:
|
228 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
229 |
msgstr "[cftsearch], [key] verrà convertito nell'input del campo."
|
230 |
|
231 |
-
#: custom-field-template/custom-field-template.php:
|
232 |
-
#: custom-field-template/custom-field-template.php:
|
233 |
msgid "Use PHP"
|
234 |
msgstr "Usa PHP"
|
235 |
|
236 |
-
#: custom-field-template/custom-field-template.php:
|
237 |
msgid "PHP CODE (Experimental Option)"
|
238 |
msgstr "CODICE PHP CODE (opzione sperimentale)"
|
239 |
|
240 |
-
#: custom-field-template/custom-field-template.php:
|
241 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
242 |
msgstr "Sei certo di volere salvare dei codici PHP? Se sì, fallo a tuo rischio."
|
243 |
|
244 |
-
#: custom-field-template/custom-field-template.php:
|
245 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
246 |
msgstr "`text` e `textarea`, dovrai impostare come stringa $value."
|
247 |
|
248 |
-
#: custom-field-template/custom-field-template.php:
|
249 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
250 |
msgstr "`checkbox`, `radio`, e `select`, dovrai impostare come array $values."
|
251 |
|
252 |
-
#: custom-field-template/custom-field-template.php:
|
253 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
254 |
msgstr "Hook automatico di `the_content()` (opzione sperimentale)"
|
255 |
|
256 |
-
#: custom-field-template/custom-field-template.php:
|
257 |
msgid "Position"
|
258 |
msgstr "Posizione"
|
259 |
|
260 |
-
#: custom-field-template/custom-field-template.php:
|
261 |
msgid "Before the conetnt"
|
262 |
msgstr "Davanti ai contenuti"
|
263 |
|
264 |
-
#: custom-field-template/custom-field-template.php:
|
265 |
msgid "After the conetnt"
|
266 |
msgstr "A seguire i contenuti"
|
267 |
|
268 |
-
#: custom-field-template/custom-field-template.php:
|
269 |
#, php-format
|
270 |
msgid "Inside the conetnt ([cfthook hook=%d])"
|
271 |
msgstr "Dentro il contenuto ([cfthook hook=%d])"
|
272 |
|
273 |
-
#: custom-field-template/custom-field-template.php:
|
274 |
msgid "Content"
|
275 |
msgstr "Contenuti"
|
276 |
|
277 |
-
#: custom-field-template/custom-field-template.php:
|
278 |
msgid "Apply to feeds"
|
279 |
msgstr "Applica ai feed"
|
280 |
|
281 |
-
#: custom-field-template/custom-field-template.php:
|
282 |
msgid "Rebuild Value Counts"
|
283 |
msgstr "Rigenera Value Counts"
|
284 |
|
285 |
-
#: custom-field-template/custom-field-template.php:
|
286 |
msgid "Are you sure to rebuild all value counts?"
|
287 |
msgstr "Sei certo di volere rigenerare tutti i value counts?"
|
288 |
|
289 |
-
#: custom-field-template/custom-field-template.php:
|
290 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
291 |
msgstr "I Value Counts sono utilizzati per il salvataggio temporaneo dei valori per ogni chiave. Imposta dentro ai campi `valueCount = true`."
|
292 |
|
293 |
-
#: custom-field-template/custom-field-template.php:
|
294 |
msgid "Rebuild Value Counts »"
|
295 |
msgstr "Rigenera Value Counts »"
|
296 |
|
297 |
-
#: custom-field-template/custom-field-template.php:
|
298 |
msgid "Rebuild Tags"
|
299 |
msgstr "Rigenera i tag"
|
300 |
|
301 |
-
#: custom-field-template/custom-field-template.php:
|
302 |
msgid "Are you sure to rebuild tags?"
|
303 |
msgstr "Sei certo di volere rigenerare i tag?"
|
304 |
|
305 |
-
#: custom-field-template/custom-field-template.php:
|
306 |
msgid "Rebuild Tags »"
|
307 |
msgstr "Rigenera tag »"
|
308 |
|
309 |
-
#: custom-field-template/custom-field-template.php:
|
310 |
msgid "Option List"
|
311 |
msgstr "Lista opzione"
|
312 |
|
313 |
-
#: custom-field-template/custom-field-template.php:
|
314 |
msgid "Export Options"
|
315 |
msgstr "Esporta le opzioni"
|
316 |
|
317 |
-
#: custom-field-template/custom-field-template.php:
|
318 |
msgid "Export Options »"
|
319 |
msgstr "Esporta le opzioni »"
|
320 |
|
321 |
-
#: custom-field-template/custom-field-template.php:
|
322 |
msgid "Import Options"
|
323 |
msgstr "Importa le opzioni"
|
324 |
|
325 |
-
#: custom-field-template/custom-field-template.php:
|
326 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
327 |
msgstr "Sei certo di volere cancellare le opzioni? Le opzioni personalizzate in precedenza verranno cancellate."
|
328 |
|
329 |
-
#: custom-field-template/custom-field-template.php:
|
330 |
msgid "Import Options »"
|
331 |
msgstr "Importa le opzioni »"
|
332 |
|
333 |
-
#: custom-field-template/custom-field-template.php:
|
334 |
msgid "Reset Options"
|
335 |
msgstr "Ripristina le opzioni"
|
336 |
|
337 |
-
#: custom-field-template/custom-field-template.php:
|
338 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
339 |
msgstr "Sei certo di volere ripristinare le opzioni? Le opzioni personalizzate verranno ripristinate alle predefinite."
|
340 |
|
341 |
-
#: custom-field-template/custom-field-template.php:
|
342 |
msgid "Unset Options »"
|
343 |
msgstr "Procedi »"
|
344 |
|
345 |
-
#: custom-field-template/custom-field-template.php:
|
346 |
msgid "Delete Options"
|
347 |
msgstr "Cancella le opzioni"
|
348 |
|
349 |
-
#: custom-field-template/custom-field-template.php:
|
350 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
351 |
msgstr "Sei certo di volere cancellare le opzioni? Le opzioni personalizzate verranno cancellate."
|
352 |
|
353 |
-
#: custom-field-template/custom-field-template.php:
|
354 |
msgid "Delete Options »"
|
355 |
msgstr "Cancella le opzioni »"
|
356 |
|
357 |
-
#: custom-field-template/custom-field-template.php:
|
358 |
msgid "Donation"
|
359 |
msgstr "Fai una donazione"
|
360 |
|
361 |
-
#: custom-field-template/custom-field-template.php:
|
362 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
363 |
msgstr "Qualora avesi gradito questo plugin, effettua una donazione via paypal! Grazie."
|
364 |
|
365 |
-
#: custom-field-template/custom-field-template.php:
|
366 |
-
#: custom-field-template/custom-field-template.php:
|
367 |
-
#: custom-field-template/custom-field-template.php:
|
368 |
msgid "Add New"
|
369 |
msgstr "Aggiungi nuovo"
|
370 |
|
371 |
-
#: custom-field-template/custom-field-template.php:
|
372 |
msgid "Clear"
|
373 |
msgstr "Pulisci"
|
374 |
|
375 |
-
#: custom-field-template/custom-field-template.php:
|
376 |
msgid "Select"
|
377 |
msgstr "Seleziona"
|
378 |
|
379 |
-
#: custom-field-template/custom-field-template.php:
|
380 |
msgid "Add Media"
|
381 |
msgstr "Aggiungi media"
|
382 |
|
383 |
-
#: custom-field-template/custom-field-template.php:
|
384 |
msgid "Add an Image"
|
385 |
msgstr "Aggiungi immagine"
|
386 |
|
387 |
-
#: custom-field-template/custom-field-template.php:
|
388 |
msgid "Add Video"
|
389 |
msgstr "Aggiungi video"
|
390 |
|
391 |
-
#: custom-field-template/custom-field-template.php:
|
392 |
msgid "Add Audio"
|
393 |
msgstr "Aggiungi audio"
|
394 |
|
395 |
-
#: custom-field-template/custom-field-template.php:
|
396 |
msgid "Toggle"
|
397 |
msgstr "Commuta"
|
398 |
|
399 |
-
#: custom-field-template/custom-field-template.php:
|
400 |
msgid "Initialize"
|
401 |
msgstr "Inizializza"
|
402 |
|
403 |
-
#: custom-field-template/custom-field-template.php:
|
404 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
405 |
msgstr "Sei certo di volere ripristinare le impostazioni? Verranno ricaricate le predefinite."
|
406 |
|
407 |
-
#: custom-field-template/custom-field-template.php:
|
408 |
msgid "Save"
|
409 |
msgstr "Salva"
|
410 |
|
411 |
-
#: custom-field-template/custom-field-template.php:
|
412 |
msgid "Search »"
|
413 |
msgstr "Cerca »"
|
414 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template in italiano\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-05-29 15:50+0900\n"
|
6 |
+
"PO-Revision-Date: 2009-05-29 23:08+0100\n"
|
7 |
"Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
|
8 |
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
16 |
"X-Poedit-Basepath: ../\n"
|
17 |
"X-Poedit-SearchPath-0: custom-field-template\n"
|
18 |
|
19 |
+
#: custom-field-template/custom-field-template.php:123
|
20 |
+
#: custom-field-template/custom-field-template.php:124
|
21 |
+
#: custom-field-template/custom-field-template.php:454
|
22 |
+
#: custom-field-template/custom-field-template.php:651
|
23 |
+
#: custom-field-template/custom-field-template.php:1595
|
24 |
+
#: custom-field-template/custom-field-template.php:1719
|
25 |
msgid "Custom Field Template"
|
26 |
msgstr "Custom Field Template"
|
27 |
|
28 |
+
#: custom-field-template/custom-field-template.php:163
|
29 |
+
#: custom-field-template/custom-field-template.php:1839
|
30 |
msgid "Load"
|
31 |
msgstr "Carica"
|
32 |
|
33 |
+
#: custom-field-template/custom-field-template.php:312
|
34 |
msgid "read more"
|
35 |
msgstr "prosegui"
|
36 |
|
37 |
+
#: custom-field-template/custom-field-template.php:330
|
38 |
+
#: custom-field-template/custom-field-template.php:340
|
39 |
msgid "Custom Fields"
|
40 |
msgstr "Campi personalizzati"
|
41 |
|
42 |
+
#: custom-field-template/custom-field-template.php:370
|
43 |
msgid "Settings"
|
44 |
msgstr "Impostazioni"
|
45 |
|
46 |
+
#: custom-field-template/custom-field-template.php:382
|
47 |
msgid "Default Template"
|
48 |
msgstr "Template predefinito"
|
49 |
|
|
|
|
|
50 |
#: custom-field-template/custom-field-template.php:576
|
51 |
+
#: custom-field-template/custom-field-template.php:580
|
52 |
+
#: custom-field-template/custom-field-template.php:592
|
53 |
#: custom-field-template/custom-field-template.php:600
|
54 |
+
#: custom-field-template/custom-field-template.php:616
|
55 |
msgid "Options updated."
|
56 |
msgstr "Le opzioni sono state aggiornate."
|
57 |
|
58 |
+
#: custom-field-template/custom-field-template.php:620
|
59 |
msgid "Value Counts rebuilt."
|
60 |
msgstr "Value Counts rigenerati. "
|
61 |
|
62 |
+
#: custom-field-template/custom-field-template.php:623
|
63 |
msgid "Tags rebuilt."
|
64 |
msgstr "Rigenera i tag."
|
65 |
|
66 |
+
#: custom-field-template/custom-field-template.php:632
|
67 |
msgid "Options imported."
|
68 |
msgstr "Le opzioni sono state importate."
|
69 |
|
70 |
+
#: custom-field-template/custom-field-template.php:639
|
71 |
msgid "Options resetted."
|
72 |
msgstr "Le opzioni sono state ripristinate."
|
73 |
|
74 |
+
#: custom-field-template/custom-field-template.php:643
|
75 |
msgid "Options deleted."
|
76 |
msgstr "Le opzioni sini state cancellate:"
|
77 |
|
78 |
+
#: custom-field-template/custom-field-template.php:657
|
79 |
+
#: custom-field-template/custom-field-template.php:736
|
80 |
+
#: custom-field-template/custom-field-template.php:755
|
81 |
+
#: custom-field-template/custom-field-template.php:784
|
82 |
+
#: custom-field-template/custom-field-template.php:815
|
83 |
+
#: custom-field-template/custom-field-template.php:854
|
84 |
+
#: custom-field-template/custom-field-template.php:875
|
85 |
+
#: custom-field-template/custom-field-template.php:892
|
86 |
+
#: custom-field-template/custom-field-template.php:1012
|
87 |
+
#: custom-field-template/custom-field-template.php:1028
|
88 |
+
#: custom-field-template/custom-field-template.php:1044
|
89 |
+
#: custom-field-template/custom-field-template.php:1060
|
90 |
+
#: custom-field-template/custom-field-template.php:1076
|
91 |
msgid "Click to toggle"
|
92 |
msgstr "Clicca per commutare"
|
93 |
|
94 |
+
#: custom-field-template/custom-field-template.php:658
|
95 |
msgid "Custom Field Template Options"
|
96 |
msgstr "Opzioni template campi personalizzati"
|
97 |
|
98 |
+
#: custom-field-template/custom-field-template.php:668
|
99 |
msgid "Template Title"
|
100 |
msgstr "Nome del template:"
|
101 |
|
102 |
+
#: custom-field-template/custom-field-template.php:670
|
103 |
msgid "Template Instruction"
|
104 |
msgstr "Allestimento template"
|
105 |
|
106 |
+
#: custom-field-template/custom-field-template.php:672
|
107 |
+
#: custom-field-template/custom-field-template.php:831
|
108 |
msgid "Post Type"
|
109 |
msgstr "Tipo di articolo"
|
110 |
|
111 |
+
#: custom-field-template/custom-field-template.php:674
|
112 |
+
#: custom-field-template/custom-field-template.php:832
|
113 |
msgid "Both"
|
114 |
msgstr "Entrambi"
|
115 |
|
116 |
+
#: custom-field-template/custom-field-template.php:675
|
117 |
+
#: custom-field-template/custom-field-template.php:833
|
118 |
msgid "Post"
|
119 |
msgstr "Articolo"
|
120 |
|
121 |
+
#: custom-field-template/custom-field-template.php:676
|
122 |
+
#: custom-field-template/custom-field-template.php:834
|
123 |
msgid "Page"
|
124 |
msgstr "Pagina"
|
125 |
|
126 |
+
#: custom-field-template/custom-field-template.php:677
|
127 |
+
msgid "Post ID (comma-deliminated)"
|
128 |
+
msgstr "ID articolo (separa con una virgola)"
|
129 |
+
|
130 |
+
#: custom-field-template/custom-field-template.php:679
|
131 |
+
#: custom-field-template/custom-field-template.php:835
|
132 |
msgid "Category ID (comma-deliminated)"
|
133 |
msgstr "ID categoria (separa con una virgola)"
|
134 |
|
135 |
+
#: custom-field-template/custom-field-template.php:681
|
136 |
msgid "Template Content"
|
137 |
msgstr "Contenuti template"
|
138 |
|
139 |
+
#: custom-field-template/custom-field-template.php:688
|
140 |
msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
|
141 |
msgstr "Nel caso in cui desiderassi inserire più immagini contemporaneamente utilizza i pulsanti media del campo personalizzato"
|
142 |
|
143 |
+
#: custom-field-template/custom-field-template.php:689
|
144 |
msgid "Use multiple image inset"
|
145 |
msgstr "Inserisci più immagini contemporaneamente"
|
146 |
|
147 |
+
#: custom-field-template/custom-field-template.php:689
|
148 |
msgid "Caution:"
|
149 |
msgstr "Attenzione:"
|
150 |
|
151 |
+
#: custom-field-template/custom-field-template.php:689
|
152 |
msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
|
153 |
msgstr "E' necessario modificare `wp-admin/includes/media.php`. Cancella o disabilita il codice nella funzione media_send_to_editor."
|
154 |
|
155 |
+
#: custom-field-template/custom-field-template.php:693
|
156 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
157 |
msgstr "Nel caso in cui desiderassi sostituire le chiavi personalizzate con le etichette qualora fosse stato impostato `label`"
|
158 |
|
159 |
+
#: custom-field-template/custom-field-template.php:694
|
160 |
msgid "Use labels in place of custom keys"
|
161 |
msgstr "Utilizza le etichette al posto delle chiavi personalizzate"
|
162 |
|
163 |
+
#: custom-field-template/custom-field-template.php:697
|
164 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
165 |
msgstr "Nel caso in cui desiderassi aggiungere automaticamente i tag p e br nell'area di testo"
|
166 |
|
167 |
+
#: custom-field-template/custom-field-template.php:698
|
168 |
msgid "Use wpautop function"
|
169 |
msgstr "Usa funzione wpautop"
|
170 |
|
171 |
+
#: custom-field-template/custom-field-template.php:702
|
172 |
msgid "In case that you would like to save values automatically in switching templates"
|
173 |
msgstr "Nel caso in cui desiderassi salvare automaticamente i valori durante il cambio dei template"
|
174 |
|
175 |
+
#: custom-field-template/custom-field-template.php:703
|
176 |
msgid "Use the auto save in switching templates"
|
177 |
msgstr "Salva in automatico al cambio dei template"
|
178 |
|
179 |
+
#: custom-field-template/custom-field-template.php:707
|
180 |
msgid "In case that you would like to forbid to use the default custom fields."
|
181 |
msgstr "Nel caso in cui desiderassi impedire l'utilizzo dei campi personalizzati predefiniti."
|
182 |
|
183 |
+
#: custom-field-template/custom-field-template.php:708
|
184 |
msgid "Disable the default custom fields"
|
185 |
msgstr "Disattiva i campi personalizzati predefiniti"
|
186 |
|
187 |
+
#: custom-field-template/custom-field-template.php:712
|
188 |
msgid "In case that you would like to forbid to use the quick edit."
|
189 |
msgstr "Nel caso in cui desiderassi impedire l'utilizzo dell'editor veloce."
|
190 |
|
191 |
+
#: custom-field-template/custom-field-template.php:713
|
192 |
msgid "Disable the quick edit"
|
193 |
msgstr "Disattiva l'editor veloce"
|
194 |
|
195 |
+
#: custom-field-template/custom-field-template.php:717
|
196 |
msgid "In case that you would like to replace the box title with the template title."
|
197 |
msgstr "Nel caso in cui desiderassi sostituire il titolo della casella con il titolo del template."
|
198 |
|
199 |
+
#: custom-field-template/custom-field-template.php:718
|
200 |
msgid "Replace the box title"
|
201 |
msgstr "Sostituisci il titolo della casella"
|
202 |
|
203 |
+
#: custom-field-template/custom-field-template.php:722
|
204 |
msgid "In case that you would like to use the shortcode in the widget."
|
205 |
msgstr "Nel caso in cui desiderassi utilizzare lo shortcode nel widget"
|
206 |
|
207 |
+
#: custom-field-template/custom-field-template.php:723
|
208 |
msgid "Use the shortcode in the widget"
|
209 |
msgstr "Utilizza lo shortcode nel widget"
|
210 |
|
211 |
+
#: custom-field-template/custom-field-template.php:727
|
212 |
+
#: custom-field-template/custom-field-template.php:746
|
213 |
+
#: custom-field-template/custom-field-template.php:775
|
214 |
+
#: custom-field-template/custom-field-template.php:806
|
215 |
+
#: custom-field-template/custom-field-template.php:845
|
216 |
msgid "Update Options »"
|
217 |
msgstr "Aggiorna le opzioni »"
|
218 |
|
219 |
+
#: custom-field-template/custom-field-template.php:737
|
220 |
msgid "ADMIN CSS"
|
221 |
msgstr "CSS AMMINISTRAZIONE"
|
222 |
|
223 |
+
#: custom-field-template/custom-field-template.php:756
|
224 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
225 |
msgstr "Formato Shortcode [cft] e [cftsearch]"
|
226 |
|
227 |
+
#: custom-field-template/custom-field-template.php:759
|
228 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
229 |
msgstr "[key] verrà convertito nel valore di [key]."
|
230 |
|
231 |
+
#: custom-field-template/custom-field-template.php:760
|
232 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
233 |
msgstr "[cftsearch], [key] verrà convertito nell'input del campo."
|
234 |
|
235 |
+
#: custom-field-template/custom-field-template.php:769
|
236 |
+
#: custom-field-template/custom-field-template.php:838
|
237 |
msgid "Use PHP"
|
238 |
msgstr "Usa PHP"
|
239 |
|
240 |
+
#: custom-field-template/custom-field-template.php:785
|
241 |
msgid "PHP CODE (Experimental Option)"
|
242 |
msgstr "CODICE PHP CODE (opzione sperimentale)"
|
243 |
|
244 |
+
#: custom-field-template/custom-field-template.php:787
|
245 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
246 |
msgstr "Sei certo di volere salvare dei codici PHP? Se sì, fallo a tuo rischio."
|
247 |
|
248 |
+
#: custom-field-template/custom-field-template.php:788
|
249 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
250 |
msgstr "`text` e `textarea`, dovrai impostare come stringa $value."
|
251 |
|
252 |
+
#: custom-field-template/custom-field-template.php:790
|
253 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
254 |
msgstr "`checkbox`, `radio`, e `select`, dovrai impostare come array $values."
|
255 |
|
256 |
+
#: custom-field-template/custom-field-template.php:816
|
257 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
258 |
msgstr "Hook automatico di `the_content()` (opzione sperimentale)"
|
259 |
|
260 |
+
#: custom-field-template/custom-field-template.php:826
|
261 |
msgid "Position"
|
262 |
msgstr "Posizione"
|
263 |
|
264 |
+
#: custom-field-template/custom-field-template.php:827
|
265 |
msgid "Before the conetnt"
|
266 |
msgstr "Davanti ai contenuti"
|
267 |
|
268 |
+
#: custom-field-template/custom-field-template.php:828
|
269 |
msgid "After the conetnt"
|
270 |
msgstr "A seguire i contenuti"
|
271 |
|
272 |
+
#: custom-field-template/custom-field-template.php:829
|
273 |
#, php-format
|
274 |
msgid "Inside the conetnt ([cfthook hook=%d])"
|
275 |
msgstr "Dentro il contenuto ([cfthook hook=%d])"
|
276 |
|
277 |
+
#: custom-field-template/custom-field-template.php:837
|
278 |
msgid "Content"
|
279 |
msgstr "Contenuti"
|
280 |
|
281 |
+
#: custom-field-template/custom-field-template.php:839
|
282 |
msgid "Apply to feeds"
|
283 |
msgstr "Applica ai feed"
|
284 |
|
285 |
+
#: custom-field-template/custom-field-template.php:855
|
286 |
msgid "Rebuild Value Counts"
|
287 |
msgstr "Rigenera Value Counts"
|
288 |
|
289 |
+
#: custom-field-template/custom-field-template.php:857
|
290 |
msgid "Are you sure to rebuild all value counts?"
|
291 |
msgstr "Sei certo di volere rigenerare tutti i value counts?"
|
292 |
|
293 |
+
#: custom-field-template/custom-field-template.php:861
|
294 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
295 |
msgstr "I Value Counts sono utilizzati per il salvataggio temporaneo dei valori per ogni chiave. Imposta dentro ai campi `valueCount = true`."
|
296 |
|
297 |
+
#: custom-field-template/custom-field-template.php:865
|
298 |
msgid "Rebuild Value Counts »"
|
299 |
msgstr "Rigenera Value Counts »"
|
300 |
|
301 |
+
#: custom-field-template/custom-field-template.php:876
|
302 |
msgid "Rebuild Tags"
|
303 |
msgstr "Rigenera i tag"
|
304 |
|
305 |
+
#: custom-field-template/custom-field-template.php:878
|
306 |
msgid "Are you sure to rebuild tags?"
|
307 |
msgstr "Sei certo di volere rigenerare i tag?"
|
308 |
|
309 |
+
#: custom-field-template/custom-field-template.php:882
|
310 |
msgid "Rebuild Tags »"
|
311 |
msgstr "Rigenera tag »"
|
312 |
|
313 |
+
#: custom-field-template/custom-field-template.php:893
|
314 |
msgid "Option List"
|
315 |
msgstr "Lista opzione"
|
316 |
|
317 |
+
#: custom-field-template/custom-field-template.php:1013
|
318 |
msgid "Export Options"
|
319 |
msgstr "Esporta le opzioni"
|
320 |
|
321 |
+
#: custom-field-template/custom-field-template.php:1019
|
322 |
msgid "Export Options »"
|
323 |
msgstr "Esporta le opzioni »"
|
324 |
|
325 |
+
#: custom-field-template/custom-field-template.php:1029
|
326 |
msgid "Import Options"
|
327 |
msgstr "Importa le opzioni"
|
328 |
|
329 |
+
#: custom-field-template/custom-field-template.php:1031
|
330 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
331 |
msgstr "Sei certo di volere cancellare le opzioni? Le opzioni personalizzate in precedenza verranno cancellate."
|
332 |
|
333 |
+
#: custom-field-template/custom-field-template.php:1035
|
334 |
msgid "Import Options »"
|
335 |
msgstr "Importa le opzioni »"
|
336 |
|
337 |
+
#: custom-field-template/custom-field-template.php:1045
|
338 |
msgid "Reset Options"
|
339 |
msgstr "Ripristina le opzioni"
|
340 |
|
341 |
+
#: custom-field-template/custom-field-template.php:1047
|
342 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
343 |
msgstr "Sei certo di volere ripristinare le opzioni? Le opzioni personalizzate verranno ripristinate alle predefinite."
|
344 |
|
345 |
+
#: custom-field-template/custom-field-template.php:1051
|
346 |
msgid "Unset Options »"
|
347 |
msgstr "Procedi »"
|
348 |
|
349 |
+
#: custom-field-template/custom-field-template.php:1061
|
350 |
msgid "Delete Options"
|
351 |
msgstr "Cancella le opzioni"
|
352 |
|
353 |
+
#: custom-field-template/custom-field-template.php:1063
|
354 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
355 |
msgstr "Sei certo di volere cancellare le opzioni? Le opzioni personalizzate verranno cancellate."
|
356 |
|
357 |
+
#: custom-field-template/custom-field-template.php:1067
|
358 |
msgid "Delete Options »"
|
359 |
msgstr "Cancella le opzioni »"
|
360 |
|
361 |
+
#: custom-field-template/custom-field-template.php:1077
|
362 |
msgid "Donation"
|
363 |
msgstr "Fai una donazione"
|
364 |
|
365 |
+
#: custom-field-template/custom-field-template.php:1079
|
366 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
367 |
msgstr "Qualora avesi gradito questo plugin, effettua una donazione via paypal! Grazie."
|
368 |
|
369 |
+
#: custom-field-template/custom-field-template.php:1171
|
370 |
+
#: custom-field-template/custom-field-template.php:1274
|
371 |
+
#: custom-field-template/custom-field-template.php:1352
|
372 |
msgid "Add New"
|
373 |
msgstr "Aggiungi nuovo"
|
374 |
|
375 |
+
#: custom-field-template/custom-field-template.php:1284
|
376 |
msgid "Clear"
|
377 |
msgstr "Pulisci"
|
378 |
|
379 |
+
#: custom-field-template/custom-field-template.php:1368
|
380 |
msgid "Select"
|
381 |
msgstr "Seleziona"
|
382 |
|
383 |
+
#: custom-field-template/custom-field-template.php:1429
|
384 |
msgid "Add Media"
|
385 |
msgstr "Aggiungi media"
|
386 |
|
387 |
+
#: custom-field-template/custom-field-template.php:1431
|
388 |
msgid "Add an Image"
|
389 |
msgstr "Aggiungi immagine"
|
390 |
|
391 |
+
#: custom-field-template/custom-field-template.php:1433
|
392 |
msgid "Add Video"
|
393 |
msgstr "Aggiungi video"
|
394 |
|
395 |
+
#: custom-field-template/custom-field-template.php:1435
|
396 |
msgid "Add Audio"
|
397 |
msgstr "Aggiungi audio"
|
398 |
|
399 |
+
#: custom-field-template/custom-field-template.php:1446
|
400 |
msgid "Toggle"
|
401 |
msgstr "Commuta"
|
402 |
|
403 |
+
#: custom-field-template/custom-field-template.php:1760
|
404 |
msgid "Initialize"
|
405 |
msgstr "Inizializza"
|
406 |
|
407 |
+
#: custom-field-template/custom-field-template.php:1761
|
408 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
409 |
msgstr "Sei certo di volere ripristinare le impostazioni? Verranno ricaricate le predefinite."
|
410 |
|
411 |
+
#: custom-field-template/custom-field-template.php:1764
|
412 |
msgid "Save"
|
413 |
msgstr "Salva"
|
414 |
|
415 |
+
#: custom-field-template/custom-field-template.php:2217
|
416 |
msgid "Search »"
|
417 |
msgstr "Cerca »"
|
418 |
|
custom-field-template-ja.mo
CHANGED
Binary file
|
custom-field-template-ja.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2009-
|
6 |
-
"PO-Revision-Date: 2009-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -18,401 +18,405 @@ msgstr ""
|
|
18 |
|
19 |
#: custom-field-template/custom-field-template.php:123
|
20 |
#: custom-field-template/custom-field-template.php:124
|
21 |
-
#: custom-field-template/custom-field-template.php:
|
22 |
-
#: custom-field-template/custom-field-template.php:
|
23 |
-
#: custom-field-template/custom-field-template.php:
|
24 |
-
#: custom-field-template/custom-field-template.php:
|
25 |
msgid "Custom Field Template"
|
26 |
msgstr "カスタムフィールドテンプレート"
|
27 |
|
28 |
#: custom-field-template/custom-field-template.php:163
|
29 |
-
#: custom-field-template/custom-field-template.php:
|
30 |
msgid "Load"
|
31 |
msgstr "読込"
|
32 |
|
33 |
-
#: custom-field-template/custom-field-template.php:
|
34 |
msgid "read more"
|
35 |
msgstr "続きを表示"
|
36 |
|
37 |
-
#: custom-field-template/custom-field-template.php:
|
38 |
-
#: custom-field-template/custom-field-template.php:
|
39 |
msgid "Custom Fields"
|
40 |
msgstr "カスタムフィールド"
|
41 |
|
42 |
-
#: custom-field-template/custom-field-template.php:
|
43 |
msgid "Settings"
|
44 |
msgstr "設定"
|
45 |
|
46 |
-
#: custom-field-template/custom-field-template.php:
|
47 |
msgid "Default Template"
|
48 |
msgstr "デフォルトテンプレート"
|
49 |
|
50 |
-
#: custom-field-template/custom-field-template.php:576
|
51 |
-
#: custom-field-template/custom-field-template.php:580
|
52 |
#: custom-field-template/custom-field-template.php:592
|
53 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
54 |
#: custom-field-template/custom-field-template.php:616
|
|
|
55 |
msgid "Options updated."
|
56 |
msgstr "オプションは更新されました。"
|
57 |
|
58 |
-
#: custom-field-template/custom-field-template.php:
|
59 |
msgid "Value Counts rebuilt."
|
60 |
msgstr "バリューカウントは再構築されました。"
|
61 |
|
62 |
-
#: custom-field-template/custom-field-template.php:
|
63 |
msgid "Tags rebuilt."
|
64 |
msgstr "タグは再構築されました。"
|
65 |
|
66 |
-
#: custom-field-template/custom-field-template.php:
|
67 |
msgid "Options imported."
|
68 |
msgstr "オプションはインポートされました。"
|
69 |
|
70 |
-
#: custom-field-template/custom-field-template.php:
|
71 |
msgid "Options resetted."
|
72 |
msgstr "オプションはリセットされました。"
|
73 |
|
74 |
-
#: custom-field-template/custom-field-template.php:
|
75 |
msgid "Options deleted."
|
76 |
msgstr "オプションは削除されました。"
|
77 |
|
78 |
-
#: custom-field-template/custom-field-template.php:
|
79 |
-
#: custom-field-template/custom-field-template.php:
|
80 |
-
#: custom-field-template/custom-field-template.php:
|
81 |
-
#: custom-field-template/custom-field-template.php:
|
82 |
-
#: custom-field-template/custom-field-template.php:
|
83 |
-
#: custom-field-template/custom-field-template.php:
|
84 |
-
#: custom-field-template/custom-field-template.php:
|
85 |
-
#: custom-field-template/custom-field-template.php:
|
86 |
-
#: custom-field-template/custom-field-template.php:
|
87 |
-
#: custom-field-template/custom-field-template.php:
|
88 |
-
#: custom-field-template/custom-field-template.php:
|
89 |
-
#: custom-field-template/custom-field-template.php:
|
90 |
-
#: custom-field-template/custom-field-template.php:
|
91 |
msgid "Click to toggle"
|
92 |
msgstr "クリックで切替"
|
93 |
|
94 |
-
#: custom-field-template/custom-field-template.php:
|
95 |
msgid "Custom Field Template Options"
|
96 |
msgstr "カスタムフィールドテンプレートオプション"
|
97 |
|
98 |
-
#: custom-field-template/custom-field-template.php:
|
99 |
msgid "Template Title"
|
100 |
msgstr "テンプレートタイトル"
|
101 |
|
102 |
-
#: custom-field-template/custom-field-template.php:
|
103 |
msgid "Template Instruction"
|
104 |
msgstr "テンプレートインストラクション"
|
105 |
|
106 |
-
#: custom-field-template/custom-field-template.php:
|
107 |
-
#: custom-field-template/custom-field-template.php:
|
108 |
msgid "Post Type"
|
109 |
msgstr "投稿タイプ"
|
110 |
|
111 |
-
#: custom-field-template/custom-field-template.php:
|
112 |
-
#: custom-field-template/custom-field-template.php:
|
113 |
msgid "Both"
|
114 |
msgstr "両方"
|
115 |
|
116 |
-
#: custom-field-template/custom-field-template.php:
|
117 |
-
#: custom-field-template/custom-field-template.php:
|
118 |
msgid "Post"
|
119 |
msgstr "投稿"
|
120 |
|
121 |
-
#: custom-field-template/custom-field-template.php:
|
122 |
-
#: custom-field-template/custom-field-template.php:
|
123 |
msgid "Page"
|
124 |
msgstr "ページ"
|
125 |
|
126 |
-
#: custom-field-template/custom-field-template.php:
|
127 |
msgid "Post ID (comma-deliminated)"
|
128 |
msgstr "Post ID (カンマ区切り)"
|
129 |
|
130 |
-
#: custom-field-template/custom-field-template.php:
|
131 |
-
#: custom-field-template/custom-field-template.php:
|
132 |
msgid "Category ID (comma-deliminated)"
|
133 |
msgstr "カテゴリーID (カンマ区切り)"
|
134 |
|
135 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
|
|
136 |
msgid "Template Content"
|
137 |
msgstr "テンプレートコンテンツ"
|
138 |
|
139 |
-
#: custom-field-template/custom-field-template.php:
|
140 |
msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
|
141 |
msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
|
142 |
|
143 |
-
#: custom-field-template/custom-field-template.php:
|
144 |
msgid "Use multiple image inset"
|
145 |
msgstr "複数画像挿入を利用する"
|
146 |
|
147 |
-
#: custom-field-template/custom-field-template.php:
|
148 |
msgid "Caution:"
|
149 |
msgstr "ご注意:"
|
150 |
|
151 |
-
#: custom-field-template/custom-field-template.php:
|
152 |
msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
|
153 |
msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
|
154 |
|
155 |
-
#: custom-field-template/custom-field-template.php:
|
156 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
157 |
msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
|
158 |
|
159 |
-
#: custom-field-template/custom-field-template.php:
|
160 |
msgid "Use labels in place of custom keys"
|
161 |
msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
|
162 |
|
163 |
-
#: custom-field-template/custom-field-template.php:
|
164 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
165 |
msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
|
166 |
|
167 |
-
#: custom-field-template/custom-field-template.php:
|
168 |
msgid "Use wpautop function"
|
169 |
msgstr "wpautop関数を使用する"
|
170 |
|
171 |
-
#: custom-field-template/custom-field-template.php:
|
172 |
msgid "In case that you would like to save values automatically in switching templates"
|
173 |
msgstr "テンプレート切替時自動で保存したい場合"
|
174 |
|
175 |
-
#: custom-field-template/custom-field-template.php:
|
176 |
msgid "Use the auto save in switching templates"
|
177 |
msgstr "テンプレート切替時の自動保存を使用する"
|
178 |
|
179 |
-
#: custom-field-template/custom-field-template.php:
|
180 |
msgid "In case that you would like to forbid to use the default custom fields."
|
181 |
msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
|
182 |
|
183 |
-
#: custom-field-template/custom-field-template.php:
|
184 |
msgid "Disable the default custom fields"
|
185 |
msgstr "デフォルトのカスタムフィールドを無効にする"
|
186 |
|
187 |
-
#: custom-field-template/custom-field-template.php:
|
188 |
msgid "In case that you would like to forbid to use the quick edit."
|
189 |
msgstr "クイック編集の使用を禁止する場合"
|
190 |
|
191 |
-
#: custom-field-template/custom-field-template.php:
|
192 |
msgid "Disable the quick edit"
|
193 |
msgstr "クイック編集を無効にする"
|
194 |
|
195 |
-
#: custom-field-template/custom-field-template.php:
|
196 |
msgid "In case that you would like to replace the box title with the template title."
|
197 |
msgstr "ボックスタイトルをテンプレートタイトルで置き換える場合"
|
198 |
|
199 |
-
#: custom-field-template/custom-field-template.php:
|
200 |
msgid "Replace the box title"
|
201 |
msgstr "ボックスタイトルを置き換える"
|
202 |
|
203 |
-
#: custom-field-template/custom-field-template.php:
|
204 |
msgid "In case that you would like to use the shortcode in the widget."
|
205 |
msgstr "ショートコードをウィジェットで使用したい場合"
|
206 |
|
207 |
-
#: custom-field-template/custom-field-template.php:
|
208 |
msgid "Use the shortcode in the widget"
|
209 |
msgstr "ショートコードをウィジェットで使用する"
|
210 |
|
211 |
-
#: custom-field-template/custom-field-template.php:
|
212 |
-
#: custom-field-template/custom-field-template.php:
|
213 |
-
#: custom-field-template/custom-field-template.php:
|
214 |
-
#: custom-field-template/custom-field-template.php:
|
215 |
-
#: custom-field-template/custom-field-template.php:
|
216 |
msgid "Update Options »"
|
217 |
msgstr "オプションを更新する »"
|
218 |
|
219 |
-
#: custom-field-template/custom-field-template.php:
|
220 |
msgid "ADMIN CSS"
|
221 |
msgstr "ADMIN CSS"
|
222 |
|
223 |
-
#: custom-field-template/custom-field-template.php:
|
224 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
225 |
msgstr "[cft] and [cftsearch] Shortcode Format"
|
226 |
|
227 |
-
#: custom-field-template/custom-field-template.php:
|
228 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
229 |
msgstr "[cft]では、[key]は、[key]の値に置換されます。"
|
230 |
|
231 |
-
#: custom-field-template/custom-field-template.php:
|
232 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
233 |
msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
|
234 |
|
235 |
-
#: custom-field-template/custom-field-template.php:
|
236 |
-
#: custom-field-template/custom-field-template.php:
|
237 |
msgid "Use PHP"
|
238 |
msgstr "PHPを使用する"
|
239 |
|
240 |
-
#: custom-field-template/custom-field-template.php:
|
241 |
msgid "PHP CODE (Experimental Option)"
|
242 |
msgstr "PHP CODE (Experimental Option)"
|
243 |
|
244 |
-
#: custom-field-template/custom-field-template.php:
|
245 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
246 |
msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
|
247 |
|
248 |
-
#: custom-field-template/custom-field-template.php:
|
249 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
250 |
msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
|
251 |
|
252 |
-
#: custom-field-template/custom-field-template.php:
|
253 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
254 |
msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
|
255 |
|
256 |
-
#: custom-field-template/custom-field-template.php:
|
257 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
258 |
msgstr "Auto Hook of `the_content()` (Experimental Option)"
|
259 |
|
260 |
-
#: custom-field-template/custom-field-template.php:
|
261 |
msgid "Position"
|
262 |
msgstr "位置"
|
263 |
|
264 |
-
#: custom-field-template/custom-field-template.php:
|
265 |
msgid "Before the conetnt"
|
266 |
msgstr "コンテンツの前"
|
267 |
|
268 |
-
#: custom-field-template/custom-field-template.php:
|
269 |
msgid "After the conetnt"
|
270 |
msgstr "コンテンツの後"
|
271 |
|
272 |
-
#: custom-field-template/custom-field-template.php:
|
273 |
#, php-format
|
274 |
msgid "Inside the conetnt ([cfthook hook=%d])"
|
275 |
msgstr "コンテンツの中 ([cfthook hook=%d])"
|
276 |
|
277 |
-
#: custom-field-template/custom-field-template.php:
|
278 |
msgid "Content"
|
279 |
msgstr "コンテンツ"
|
280 |
|
281 |
-
#: custom-field-template/custom-field-template.php:
|
282 |
msgid "Apply to feeds"
|
283 |
msgstr "フィードに適用する"
|
284 |
|
285 |
-
#: custom-field-template/custom-field-template.php:
|
286 |
msgid "Rebuild Value Counts"
|
287 |
msgstr "バリューカウントの再構築"
|
288 |
|
289 |
-
#: custom-field-template/custom-field-template.php:
|
290 |
msgid "Are you sure to rebuild all value counts?"
|
291 |
msgstr "本当に全てのバリューカウントを再構築しますか?"
|
292 |
|
293 |
-
#: custom-field-template/custom-field-template.php:
|
294 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
295 |
msgstr "バリューカウントはキーごとに値がどのくらいあるか一時的に保存するのに使用されます。`valueCount = true`をフィールドにセットしてください。"
|
296 |
|
297 |
-
#: custom-field-template/custom-field-template.php:
|
298 |
msgid "Rebuild Value Counts »"
|
299 |
msgstr "バリューカウントを再構築する »"
|
300 |
|
301 |
-
#: custom-field-template/custom-field-template.php:
|
302 |
msgid "Rebuild Tags"
|
303 |
msgstr "タグの再構築"
|
304 |
|
305 |
-
#: custom-field-template/custom-field-template.php:
|
306 |
msgid "Are you sure to rebuild tags?"
|
307 |
msgstr "本当に全てのタグを再構築しますか?"
|
308 |
|
309 |
-
#: custom-field-template/custom-field-template.php:
|
310 |
msgid "Rebuild Tags »"
|
311 |
msgstr "タグを再構築する »"
|
312 |
|
313 |
-
#: custom-field-template/custom-field-template.php:
|
314 |
msgid "Option List"
|
315 |
msgstr "オプションリスト"
|
316 |
|
317 |
-
#: custom-field-template/custom-field-template.php:
|
318 |
msgid "Export Options"
|
319 |
msgstr "オプションをエクスポートする"
|
320 |
|
321 |
-
#: custom-field-template/custom-field-template.php:
|
322 |
msgid "Export Options »"
|
323 |
msgstr "オプションをエクスポートする »"
|
324 |
|
325 |
-
#: custom-field-template/custom-field-template.php:
|
326 |
msgid "Import Options"
|
327 |
msgstr "オプションをインポートする"
|
328 |
|
329 |
-
#: custom-field-template/custom-field-template.php:
|
330 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
331 |
msgstr "本当にオプションをインポートしてもよろしいですか?設定したオプションは上書きされます。"
|
332 |
|
333 |
-
#: custom-field-template/custom-field-template.php:
|
334 |
msgid "Import Options »"
|
335 |
msgstr "オプションをインポートする »"
|
336 |
|
337 |
-
#: custom-field-template/custom-field-template.php:
|
338 |
msgid "Reset Options"
|
339 |
msgstr "オプションをリセットする"
|
340 |
|
341 |
-
#: custom-field-template/custom-field-template.php:
|
342 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
343 |
msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
|
344 |
|
345 |
-
#: custom-field-template/custom-field-template.php:
|
346 |
msgid "Unset Options »"
|
347 |
msgstr "オプションをリセットする »"
|
348 |
|
349 |
-
#: custom-field-template/custom-field-template.php:
|
350 |
msgid "Delete Options"
|
351 |
msgstr "オプションを削除する"
|
352 |
|
353 |
-
#: custom-field-template/custom-field-template.php:
|
354 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
355 |
msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
|
356 |
|
357 |
-
#: custom-field-template/custom-field-template.php:
|
358 |
msgid "Delete Options »"
|
359 |
msgstr "オプションを削除する »"
|
360 |
|
361 |
-
#: custom-field-template/custom-field-template.php:
|
362 |
msgid "Donation"
|
363 |
msgstr "寄付"
|
364 |
|
365 |
-
#: custom-field-template/custom-field-template.php:
|
366 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
367 |
msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
|
368 |
|
369 |
-
#: custom-field-template/custom-field-template.php:
|
370 |
-
#: custom-field-template/custom-field-template.php:
|
371 |
-
#: custom-field-template/custom-field-template.php:
|
372 |
msgid "Add New"
|
373 |
msgstr "追加"
|
374 |
|
375 |
-
#: custom-field-template/custom-field-template.php:
|
376 |
msgid "Clear"
|
377 |
msgstr "解除"
|
378 |
|
379 |
-
#: custom-field-template/custom-field-template.php:
|
380 |
msgid "Select"
|
381 |
msgstr "選択してください"
|
382 |
|
383 |
-
#: custom-field-template/custom-field-template.php:
|
384 |
msgid "Add Media"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: custom-field-template/custom-field-template.php:
|
388 |
msgid "Add an Image"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: custom-field-template/custom-field-template.php:
|
392 |
msgid "Add Video"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: custom-field-template/custom-field-template.php:
|
396 |
msgid "Add Audio"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: custom-field-template/custom-field-template.php:
|
400 |
msgid "Toggle"
|
401 |
msgstr "切り替え"
|
402 |
|
403 |
-
#: custom-field-template/custom-field-template.php:
|
404 |
msgid "Initialize"
|
405 |
msgstr "初期化"
|
406 |
|
407 |
-
#: custom-field-template/custom-field-template.php:
|
408 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
409 |
msgstr "現在値をリセットしてもよろしいですか?初期値が読み込まれます。"
|
410 |
|
411 |
-
#: custom-field-template/custom-field-template.php:
|
412 |
msgid "Save"
|
413 |
msgstr "保存"
|
414 |
|
415 |
-
#: custom-field-template/custom-field-template.php:
|
416 |
msgid "Search »"
|
417 |
msgstr "検索 »"
|
418 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-06-10 03:30+0900\n"
|
6 |
+
"PO-Revision-Date: 2009-06-10 03:30+0900\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
18 |
|
19 |
#: custom-field-template/custom-field-template.php:123
|
20 |
#: custom-field-template/custom-field-template.php:124
|
21 |
+
#: custom-field-template/custom-field-template.php:469
|
22 |
+
#: custom-field-template/custom-field-template.php:667
|
23 |
+
#: custom-field-template/custom-field-template.php:1646
|
24 |
+
#: custom-field-template/custom-field-template.php:1771
|
25 |
msgid "Custom Field Template"
|
26 |
msgstr "カスタムフィールドテンプレート"
|
27 |
|
28 |
#: custom-field-template/custom-field-template.php:163
|
29 |
+
#: custom-field-template/custom-field-template.php:1945
|
30 |
msgid "Load"
|
31 |
msgstr "読込"
|
32 |
|
33 |
+
#: custom-field-template/custom-field-template.php:319
|
34 |
msgid "read more"
|
35 |
msgstr "続きを表示"
|
36 |
|
37 |
+
#: custom-field-template/custom-field-template.php:337
|
38 |
+
#: custom-field-template/custom-field-template.php:347
|
39 |
msgid "Custom Fields"
|
40 |
msgstr "カスタムフィールド"
|
41 |
|
42 |
+
#: custom-field-template/custom-field-template.php:377
|
43 |
msgid "Settings"
|
44 |
msgstr "設定"
|
45 |
|
46 |
+
#: custom-field-template/custom-field-template.php:397
|
47 |
msgid "Default Template"
|
48 |
msgstr "デフォルトテンプレート"
|
49 |
|
|
|
|
|
50 |
#: custom-field-template/custom-field-template.php:592
|
51 |
+
#: custom-field-template/custom-field-template.php:596
|
52 |
+
#: custom-field-template/custom-field-template.php:608
|
53 |
#: custom-field-template/custom-field-template.php:616
|
54 |
+
#: custom-field-template/custom-field-template.php:632
|
55 |
msgid "Options updated."
|
56 |
msgstr "オプションは更新されました。"
|
57 |
|
58 |
+
#: custom-field-template/custom-field-template.php:636
|
59 |
msgid "Value Counts rebuilt."
|
60 |
msgstr "バリューカウントは再構築されました。"
|
61 |
|
62 |
+
#: custom-field-template/custom-field-template.php:639
|
63 |
msgid "Tags rebuilt."
|
64 |
msgstr "タグは再構築されました。"
|
65 |
|
66 |
+
#: custom-field-template/custom-field-template.php:648
|
67 |
msgid "Options imported."
|
68 |
msgstr "オプションはインポートされました。"
|
69 |
|
70 |
+
#: custom-field-template/custom-field-template.php:655
|
71 |
msgid "Options resetted."
|
72 |
msgstr "オプションはリセットされました。"
|
73 |
|
74 |
+
#: custom-field-template/custom-field-template.php:659
|
75 |
msgid "Options deleted."
|
76 |
msgstr "オプションは削除されました。"
|
77 |
|
78 |
+
#: custom-field-template/custom-field-template.php:673
|
79 |
+
#: custom-field-template/custom-field-template.php:754
|
80 |
+
#: custom-field-template/custom-field-template.php:773
|
81 |
+
#: custom-field-template/custom-field-template.php:802
|
82 |
+
#: custom-field-template/custom-field-template.php:833
|
83 |
+
#: custom-field-template/custom-field-template.php:872
|
84 |
+
#: custom-field-template/custom-field-template.php:893
|
85 |
+
#: custom-field-template/custom-field-template.php:910
|
86 |
+
#: custom-field-template/custom-field-template.php:1039
|
87 |
+
#: custom-field-template/custom-field-template.php:1055
|
88 |
+
#: custom-field-template/custom-field-template.php:1071
|
89 |
+
#: custom-field-template/custom-field-template.php:1087
|
90 |
+
#: custom-field-template/custom-field-template.php:1103
|
91 |
msgid "Click to toggle"
|
92 |
msgstr "クリックで切替"
|
93 |
|
94 |
+
#: custom-field-template/custom-field-template.php:674
|
95 |
msgid "Custom Field Template Options"
|
96 |
msgstr "カスタムフィールドテンプレートオプション"
|
97 |
|
98 |
+
#: custom-field-template/custom-field-template.php:684
|
99 |
msgid "Template Title"
|
100 |
msgstr "テンプレートタイトル"
|
101 |
|
102 |
+
#: custom-field-template/custom-field-template.php:686
|
103 |
msgid "Template Instruction"
|
104 |
msgstr "テンプレートインストラクション"
|
105 |
|
106 |
+
#: custom-field-template/custom-field-template.php:688
|
107 |
+
#: custom-field-template/custom-field-template.php:849
|
108 |
msgid "Post Type"
|
109 |
msgstr "投稿タイプ"
|
110 |
|
111 |
+
#: custom-field-template/custom-field-template.php:690
|
112 |
+
#: custom-field-template/custom-field-template.php:850
|
113 |
msgid "Both"
|
114 |
msgstr "両方"
|
115 |
|
116 |
+
#: custom-field-template/custom-field-template.php:691
|
117 |
+
#: custom-field-template/custom-field-template.php:851
|
118 |
msgid "Post"
|
119 |
msgstr "投稿"
|
120 |
|
121 |
+
#: custom-field-template/custom-field-template.php:692
|
122 |
+
#: custom-field-template/custom-field-template.php:852
|
123 |
msgid "Page"
|
124 |
msgstr "ページ"
|
125 |
|
126 |
+
#: custom-field-template/custom-field-template.php:693
|
127 |
msgid "Post ID (comma-deliminated)"
|
128 |
msgstr "Post ID (カンマ区切り)"
|
129 |
|
130 |
+
#: custom-field-template/custom-field-template.php:695
|
131 |
+
#: custom-field-template/custom-field-template.php:853
|
132 |
msgid "Category ID (comma-deliminated)"
|
133 |
msgstr "カテゴリーID (カンマ区切り)"
|
134 |
|
135 |
+
#: custom-field-template/custom-field-template.php:697
|
136 |
+
msgid "Page Template file name(s) (comma-deliminated)"
|
137 |
+
msgstr "ページテンプレートファイル名 (カンマ区切り)"
|
138 |
+
|
139 |
+
#: custom-field-template/custom-field-template.php:699
|
140 |
msgid "Template Content"
|
141 |
msgstr "テンプレートコンテンツ"
|
142 |
|
143 |
+
#: custom-field-template/custom-field-template.php:706
|
144 |
msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
|
145 |
msgstr "カスタムフィールへの画像挿入を一度に複数枚実行する場合"
|
146 |
|
147 |
+
#: custom-field-template/custom-field-template.php:707
|
148 |
msgid "Use multiple image inset"
|
149 |
msgstr "複数画像挿入を利用する"
|
150 |
|
151 |
+
#: custom-field-template/custom-field-template.php:707
|
152 |
msgid "Caution:"
|
153 |
msgstr "ご注意:"
|
154 |
|
155 |
+
#: custom-field-template/custom-field-template.php:707
|
156 |
msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
|
157 |
msgstr "`wp-admin/includes/media.php`を編集する必要があります。media_send_to_editor関数の中身を削除するかコメントアウトしてください。"
|
158 |
|
159 |
+
#: custom-field-template/custom-field-template.php:711
|
160 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
161 |
msgstr "`label`がセットされていて、カスタムフィールドのキーの代わりにラベルを表示したい場合"
|
162 |
|
163 |
+
#: custom-field-template/custom-field-template.php:712
|
164 |
msgid "Use labels in place of custom keys"
|
165 |
msgstr "カスタムフィールドのキーの代わりにラベルを使用する"
|
166 |
|
167 |
+
#: custom-field-template/custom-field-template.php:715
|
168 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
169 |
msgstr "テキストエリアでpタグ、brタグを自動的に追加したい場合"
|
170 |
|
171 |
+
#: custom-field-template/custom-field-template.php:716
|
172 |
msgid "Use wpautop function"
|
173 |
msgstr "wpautop関数を使用する"
|
174 |
|
175 |
+
#: custom-field-template/custom-field-template.php:720
|
176 |
msgid "In case that you would like to save values automatically in switching templates"
|
177 |
msgstr "テンプレート切替時自動で保存したい場合"
|
178 |
|
179 |
+
#: custom-field-template/custom-field-template.php:721
|
180 |
msgid "Use the auto save in switching templates"
|
181 |
msgstr "テンプレート切替時の自動保存を使用する"
|
182 |
|
183 |
+
#: custom-field-template/custom-field-template.php:725
|
184 |
msgid "In case that you would like to forbid to use the default custom fields."
|
185 |
msgstr "デフォルトのカスタムフィールドの使用を禁止する場合"
|
186 |
|
187 |
+
#: custom-field-template/custom-field-template.php:726
|
188 |
msgid "Disable the default custom fields"
|
189 |
msgstr "デフォルトのカスタムフィールドを無効にする"
|
190 |
|
191 |
+
#: custom-field-template/custom-field-template.php:730
|
192 |
msgid "In case that you would like to forbid to use the quick edit."
|
193 |
msgstr "クイック編集の使用を禁止する場合"
|
194 |
|
195 |
+
#: custom-field-template/custom-field-template.php:731
|
196 |
msgid "Disable the quick edit"
|
197 |
msgstr "クイック編集を無効にする"
|
198 |
|
199 |
+
#: custom-field-template/custom-field-template.php:735
|
200 |
msgid "In case that you would like to replace the box title with the template title."
|
201 |
msgstr "ボックスタイトルをテンプレートタイトルで置き換える場合"
|
202 |
|
203 |
+
#: custom-field-template/custom-field-template.php:736
|
204 |
msgid "Replace the box title"
|
205 |
msgstr "ボックスタイトルを置き換える"
|
206 |
|
207 |
+
#: custom-field-template/custom-field-template.php:740
|
208 |
msgid "In case that you would like to use the shortcode in the widget."
|
209 |
msgstr "ショートコードをウィジェットで使用したい場合"
|
210 |
|
211 |
+
#: custom-field-template/custom-field-template.php:741
|
212 |
msgid "Use the shortcode in the widget"
|
213 |
msgstr "ショートコードをウィジェットで使用する"
|
214 |
|
215 |
+
#: custom-field-template/custom-field-template.php:745
|
216 |
+
#: custom-field-template/custom-field-template.php:764
|
217 |
+
#: custom-field-template/custom-field-template.php:793
|
218 |
+
#: custom-field-template/custom-field-template.php:824
|
219 |
+
#: custom-field-template/custom-field-template.php:863
|
220 |
msgid "Update Options »"
|
221 |
msgstr "オプションを更新する »"
|
222 |
|
223 |
+
#: custom-field-template/custom-field-template.php:755
|
224 |
msgid "ADMIN CSS"
|
225 |
msgstr "ADMIN CSS"
|
226 |
|
227 |
+
#: custom-field-template/custom-field-template.php:774
|
228 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
229 |
msgstr "[cft] and [cftsearch] Shortcode Format"
|
230 |
|
231 |
+
#: custom-field-template/custom-field-template.php:777
|
232 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
233 |
msgstr "[cft]では、[key]は、[key]の値に置換されます。"
|
234 |
|
235 |
+
#: custom-field-template/custom-field-template.php:778
|
236 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
237 |
msgstr "[cftsearch]では、[key]は、インプットフィールドに置換されます。"
|
238 |
|
239 |
+
#: custom-field-template/custom-field-template.php:787
|
240 |
+
#: custom-field-template/custom-field-template.php:856
|
241 |
msgid "Use PHP"
|
242 |
msgstr "PHPを使用する"
|
243 |
|
244 |
+
#: custom-field-template/custom-field-template.php:803
|
245 |
msgid "PHP CODE (Experimental Option)"
|
246 |
msgstr "PHP CODE (Experimental Option)"
|
247 |
|
248 |
+
#: custom-field-template/custom-field-template.php:805
|
249 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
250 |
msgstr "PHPコードを保存してよろしいですか?自己責任で実行してください。"
|
251 |
|
252 |
+
#: custom-field-template/custom-field-template.php:806
|
253 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
254 |
msgstr "`text`と`textarea`は$valueを文字列としてセットしてください。"
|
255 |
|
256 |
+
#: custom-field-template/custom-field-template.php:808
|
257 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
258 |
msgstr "`checkbox`、`radio`、`select`では、配列として$valuesをセットしてください。"
|
259 |
|
260 |
+
#: custom-field-template/custom-field-template.php:834
|
261 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
262 |
msgstr "Auto Hook of `the_content()` (Experimental Option)"
|
263 |
|
264 |
+
#: custom-field-template/custom-field-template.php:844
|
265 |
msgid "Position"
|
266 |
msgstr "位置"
|
267 |
|
268 |
+
#: custom-field-template/custom-field-template.php:845
|
269 |
msgid "Before the conetnt"
|
270 |
msgstr "コンテンツの前"
|
271 |
|
272 |
+
#: custom-field-template/custom-field-template.php:846
|
273 |
msgid "After the conetnt"
|
274 |
msgstr "コンテンツの後"
|
275 |
|
276 |
+
#: custom-field-template/custom-field-template.php:847
|
277 |
#, php-format
|
278 |
msgid "Inside the conetnt ([cfthook hook=%d])"
|
279 |
msgstr "コンテンツの中 ([cfthook hook=%d])"
|
280 |
|
281 |
+
#: custom-field-template/custom-field-template.php:855
|
282 |
msgid "Content"
|
283 |
msgstr "コンテンツ"
|
284 |
|
285 |
+
#: custom-field-template/custom-field-template.php:857
|
286 |
msgid "Apply to feeds"
|
287 |
msgstr "フィードに適用する"
|
288 |
|
289 |
+
#: custom-field-template/custom-field-template.php:873
|
290 |
msgid "Rebuild Value Counts"
|
291 |
msgstr "バリューカウントの再構築"
|
292 |
|
293 |
+
#: custom-field-template/custom-field-template.php:875
|
294 |
msgid "Are you sure to rebuild all value counts?"
|
295 |
msgstr "本当に全てのバリューカウントを再構築しますか?"
|
296 |
|
297 |
+
#: custom-field-template/custom-field-template.php:879
|
298 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
299 |
msgstr "バリューカウントはキーごとに値がどのくらいあるか一時的に保存するのに使用されます。`valueCount = true`をフィールドにセットしてください。"
|
300 |
|
301 |
+
#: custom-field-template/custom-field-template.php:883
|
302 |
msgid "Rebuild Value Counts »"
|
303 |
msgstr "バリューカウントを再構築する »"
|
304 |
|
305 |
+
#: custom-field-template/custom-field-template.php:894
|
306 |
msgid "Rebuild Tags"
|
307 |
msgstr "タグの再構築"
|
308 |
|
309 |
+
#: custom-field-template/custom-field-template.php:896
|
310 |
msgid "Are you sure to rebuild tags?"
|
311 |
msgstr "本当に全てのタグを再構築しますか?"
|
312 |
|
313 |
+
#: custom-field-template/custom-field-template.php:900
|
314 |
msgid "Rebuild Tags »"
|
315 |
msgstr "タグを再構築する »"
|
316 |
|
317 |
+
#: custom-field-template/custom-field-template.php:911
|
318 |
msgid "Option List"
|
319 |
msgstr "オプションリスト"
|
320 |
|
321 |
+
#: custom-field-template/custom-field-template.php:1040
|
322 |
msgid "Export Options"
|
323 |
msgstr "オプションをエクスポートする"
|
324 |
|
325 |
+
#: custom-field-template/custom-field-template.php:1046
|
326 |
msgid "Export Options »"
|
327 |
msgstr "オプションをエクスポートする »"
|
328 |
|
329 |
+
#: custom-field-template/custom-field-template.php:1056
|
330 |
msgid "Import Options"
|
331 |
msgstr "オプションをインポートする"
|
332 |
|
333 |
+
#: custom-field-template/custom-field-template.php:1058
|
334 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
335 |
msgstr "本当にオプションをインポートしてもよろしいですか?設定したオプションは上書きされます。"
|
336 |
|
337 |
+
#: custom-field-template/custom-field-template.php:1062
|
338 |
msgid "Import Options »"
|
339 |
msgstr "オプションをインポートする »"
|
340 |
|
341 |
+
#: custom-field-template/custom-field-template.php:1072
|
342 |
msgid "Reset Options"
|
343 |
msgstr "オプションをリセットする"
|
344 |
|
345 |
+
#: custom-field-template/custom-field-template.php:1074
|
346 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
347 |
msgstr "本当にオプションをリセットしてもよろしいですか?設定したオプションはデフォルトの状態に戻ります。"
|
348 |
|
349 |
+
#: custom-field-template/custom-field-template.php:1078
|
350 |
msgid "Unset Options »"
|
351 |
msgstr "オプションをリセットする »"
|
352 |
|
353 |
+
#: custom-field-template/custom-field-template.php:1088
|
354 |
msgid "Delete Options"
|
355 |
msgstr "オプションを削除する"
|
356 |
|
357 |
+
#: custom-field-template/custom-field-template.php:1090
|
358 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
359 |
msgstr "本当にオプションを削除してもよろしいですか?設定したオプションは削除されます。"
|
360 |
|
361 |
+
#: custom-field-template/custom-field-template.php:1094
|
362 |
msgid "Delete Options »"
|
363 |
msgstr "オプションを削除する »"
|
364 |
|
365 |
+
#: custom-field-template/custom-field-template.php:1104
|
366 |
msgid "Donation"
|
367 |
msgstr "寄付"
|
368 |
|
369 |
+
#: custom-field-template/custom-field-template.php:1106
|
370 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
371 |
msgstr "このプラグインをお気に召しましたら、Paypalよりご寄付をよろしくお願いいたします。"
|
372 |
|
373 |
+
#: custom-field-template/custom-field-template.php:1199
|
374 |
+
#: custom-field-template/custom-field-template.php:1314
|
375 |
+
#: custom-field-template/custom-field-template.php:1392
|
376 |
msgid "Add New"
|
377 |
msgstr "追加"
|
378 |
|
379 |
+
#: custom-field-template/custom-field-template.php:1324
|
380 |
msgid "Clear"
|
381 |
msgstr "解除"
|
382 |
|
383 |
+
#: custom-field-template/custom-field-template.php:1408
|
384 |
msgid "Select"
|
385 |
msgstr "選択してください"
|
386 |
|
387 |
+
#: custom-field-template/custom-field-template.php:1469
|
388 |
msgid "Add Media"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: custom-field-template/custom-field-template.php:1471
|
392 |
msgid "Add an Image"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: custom-field-template/custom-field-template.php:1473
|
396 |
msgid "Add Video"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: custom-field-template/custom-field-template.php:1475
|
400 |
msgid "Add Audio"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: custom-field-template/custom-field-template.php:1486
|
404 |
msgid "Toggle"
|
405 |
msgstr "切り替え"
|
406 |
|
407 |
+
#: custom-field-template/custom-field-template.php:1819
|
408 |
msgid "Initialize"
|
409 |
msgstr "初期化"
|
410 |
|
411 |
+
#: custom-field-template/custom-field-template.php:1820
|
412 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
413 |
msgstr "現在値をリセットしてもよろしいですか?初期値が読み込まれます。"
|
414 |
|
415 |
+
#: custom-field-template/custom-field-template.php:1823
|
416 |
msgid "Save"
|
417 |
msgstr "保存"
|
418 |
|
419 |
+
#: custom-field-template/custom-field-template.php:2317
|
420 |
msgid "Search »"
|
421 |
msgstr "検索 »"
|
422 |
|
custom-field-template.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
|
|
4 |
Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
|
5 |
Description: This plugin adds the default custom fields on the Write Post/Page.
|
6 |
Author: Hiroaki Miyashita
|
7 |
-
Version: 1.
|
8 |
Author URI: http://wordpressgogo.com/
|
9 |
*/
|
10 |
|
@@ -177,6 +177,13 @@ class custom_field_template {
|
|
177 |
function custom_field_template_admin_head() {
|
178 |
global $wp_version;
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
if ( substr($wp_version, 0, 3) >= '2.7' && is_user_logged_in() && ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') ) && !strstr($_SERVER['REQUEST_URI'], 'page=') ) {
|
181 |
?>
|
182 |
<script type="text/javascript">
|
@@ -374,8 +381,16 @@ class custom_field_template {
|
|
374 |
}
|
375 |
|
376 |
function custom_field_template_admin_scripts() {
|
|
|
|
|
|
|
|
|
|
|
377 |
wp_enqueue_script( 'jquery' );
|
378 |
wp_enqueue_script( 'jquery-form' );
|
|
|
|
|
|
|
379 |
}
|
380 |
|
381 |
function install_custom_field_template_data() {
|
@@ -569,6 +584,7 @@ mediaButton = true';
|
|
569 |
$options['custom_fields'][$j]['category'] = $_POST["custom_field_template_category"][$i];
|
570 |
$options['custom_fields'][$j]['post'] = $_POST["custom_field_template_post"][$i];
|
571 |
$options['custom_fields'][$j]['post_type'] = $_POST["custom_field_template_post_type"][$i];
|
|
|
572 |
$j++;
|
573 |
}
|
574 |
}
|
@@ -678,6 +694,8 @@ mediaButton = true';
|
|
678 |
<input type="text" name="custom_field_template_post[<?php echo $i; ?>]" id="custom_field_template_post[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['custom_fields'][$i]['post']); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['post']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
679 |
<p><label for="custom_field_template_category[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
680 |
<input type="text" name="custom_field_template_category[<?php echo $i; ?>]" id="custom_field_template_category[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['custom_fields'][$i]['category']); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['category']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
|
|
|
|
681 |
<p><label for="custom_field_template_content[<?php echo $i; ?>]"><?php echo sprintf(__('Template Content', 'custom-field-template'), $i); ?></label>:<br />
|
682 |
<textarea name="custom_field_template_content[<?php echo $i; ?>]" id="custom_field_template_content[<?php echo $i; ?>]" rows="10" cols="80"><?php echo stripcslashes($options['custom_fields'][$i]['content']); ?></textarea></p>
|
683 |
</td></tr>
|
@@ -692,7 +710,7 @@ mediaButton = true';
|
|
692 |
<tr><td>
|
693 |
<p><label for="custom_field_template_replace_keys_by_labels"><?php _e('In case that you would like to replace custom keys by labels if `label` is set', 'custom-field-template'); ?></label>:<br />
|
694 |
<input type="checkbox" name="custom_field_template_replace_keys_by_labels" id="custom_field_template_replace_keys_by_labels" value="1" <?php if ($options['custom_field_template_replace_keys_by_labels']) { echo 'checked="checked"'; } ?> /> <?php _e('Use labels in place of custom keys', 'custom-field-template'); ?></p>
|
695 |
-
</td>
|
696 |
<tr><td>
|
697 |
<p><label for="custom_field_template_use_wpautop"><?php _e('In case that you would like to add p and br tags in textareas automatically', 'custom-field-template'); ?></label>:<br />
|
698 |
<input type="checkbox" name="custom_field_template_use_wpautop" id="custom_field_template_use_wpautop" value="1" <?php if ($options['custom_field_template_use_wpautop']) { echo 'checked="checked"'; } ?> /> <?php _e('Use wpautop function', 'custom-field-template'); ?></p>
|
@@ -944,6 +962,15 @@ hideKey = true<br />
|
|
944 |
<th>htmlEditor</th><td></td><td></td><td></td><td></td><td>htmlEditor = true</td>
|
945 |
</tr>
|
946 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
<th>mediaButton</th><td></td><td></td><td></td><td></td><td>mediaButton = true</td>
|
948 |
</tr>
|
949 |
<tr>
|
@@ -1127,7 +1154,7 @@ jQuery(this).addClass("closed");
|
|
1127 |
return $custom_fields;
|
1128 |
}
|
1129 |
|
1130 |
-
function make_textfield( $name, $sid, $size = 25, $default, $hideKey, $label, $code, $class, $style, $before, $after, $maxlength, $multipleButton,
|
1131 |
$onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
|
1132 |
$options = $this->get_custom_field_template_data();
|
1133 |
|
@@ -1152,7 +1179,8 @@ jQuery(this).addClass("closed");
|
|
1152 |
endif;
|
1153 |
|
1154 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1155 |
-
if ( !empty($class) ) $class = ' class="' . $class . '"';
|
|
|
1156 |
if ( !empty($style) ) $style = ' style="' . $style . '"';
|
1157 |
if ( !empty($maxlength) ) $maxlength = ' maxlength="' . $maxlength . '"';
|
1158 |
|
@@ -1166,7 +1194,7 @@ jQuery(this).addClass("closed");
|
|
1166 |
$event_output .= " " . $key . '="' . stripcslashes(trim($val)) . '"';
|
1167 |
endforeach;
|
1168 |
|
1169 |
-
if ( $multipleButton == true && $sid == 0 ) :
|
1170 |
$addfield .= '<div>';
|
1171 |
$addfield .= '<a href="#clear" onclick="jQuery(this).parent().parent().parent().clone().insertBefore(jQuery(this).parent().parent().parent()).find('."'input'".').val('."''".');jQuery(this).parent().css('."'visibility','hidden'".');jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
|
1172 |
$addfield .= '</div>';
|
@@ -1179,8 +1207,20 @@ jQuery(this).addClass("closed");
|
|
1179 |
|
1180 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
|
1181 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1182 |
-
$out .= trim($before).'<input id="' . $name . $sid . '" name="' . $name . '[]" value="' . attribute_escape(trim($value)) . '" type="text" size="' . $size . '"' . $class . $style . $maxlength . $event_output . ' />'.trim($after)
|
1183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1184 |
return $out;
|
1185 |
}
|
1186 |
|
@@ -1490,7 +1530,7 @@ EOF;
|
|
1490 |
}
|
1491 |
|
1492 |
function load_custom_field( $id = 0 ) {
|
1493 |
-
global $userdata;
|
1494 |
get_currentuserinfo();
|
1495 |
$level = $userdata->user_level;
|
1496 |
|
@@ -1508,7 +1548,10 @@ EOF;
|
|
1508 |
return;
|
1509 |
endif;
|
1510 |
|
1511 |
-
if ( $options['custom_fields'][$id]['category'] && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php')) )
|
|
|
|
|
|
|
1512 |
return;
|
1513 |
|
1514 |
if ( (!$_REQUEST['post'] || $_REQUEST['post']<0) && $options['custom_fields'][$id]['category'] && $_REQUEST['cft_mode'] != 'ajaxload' )
|
@@ -1519,9 +1562,17 @@ EOF;
|
|
1519 |
|
1520 |
if ( $options['custom_fields'][$id]['post'] ) :
|
1521 |
$post_ids = explode(',', $options['custom_fields'][$id]['post']);
|
|
|
1522 |
if ( !in_array($_REQUEST['post'], $post_ids) )
|
1523 |
return;
|
1524 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1525 |
|
1526 |
if ( $options['custom_fields'][$id]['instruction'] ) :
|
1527 |
$instruction = stripcslashes($options['custom_fields'][$id]['instruction']);
|
@@ -1541,7 +1592,7 @@ EOF;
|
|
1541 |
$out .= '</div><div' . $class . '>';
|
1542 |
}
|
1543 |
else if( $data[$i]['type'] == 'textfield' || $data[$i]['type'] == 'text' ) {
|
1544 |
-
$out .= $this->make_textfield( $title, $i, $data[$i]['size'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'], $data[$i]['style'], $data[$i]['before'], $data[$i]['after'], $data[$i]['maxlength'], $data[$i]['multipleButton'],
|
1545 |
$data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
|
1546 |
}
|
1547 |
else if( $data[$i]['type'] == 'checkbox' ) {
|
@@ -1576,7 +1627,7 @@ EOF;
|
|
1576 |
}
|
1577 |
|
1578 |
function insert_custom_field() {
|
1579 |
-
global $wp_version;
|
1580 |
$options = $this->get_custom_field_template_data();
|
1581 |
|
1582 |
if( $options == null)
|
@@ -1671,31 +1722,32 @@ EOF;
|
|
1671 |
|
1672 |
if(count($options['custom_fields'])>$options['posts'][$_REQUEST['post']] && $options['posts'][$_REQUEST['post']]) $init_id = $options['posts'][$_REQUEST['post']];
|
1673 |
else $init_id = 0;
|
1674 |
-
|
1675 |
$out .= 'jQuery(document).ready(function() {' . "\n";
|
1676 |
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
/*$out .= ' if ( getUserSetting( "editor" ) == "html" ) {
|
1684 |
jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
1685 |
-
|
1686 |
$out .= ' if(wpTinyMCEConfig) if(wpTinyMCEConfig.defaultEditor == "html") { jQuery("#edButtonPreview").trigger("click"); }' . "\n";
|
1687 |
-
|
1688 |
-
|
1689 |
-
endif;
|
1690 |
-
endfor;
|
1691 |
-
endforeach;
|
1692 |
endif;
|
|
|
|
|
|
|
1693 |
|
1694 |
if ( $options['custom_fields'] ) :
|
1695 |
foreach ( $options['custom_fields'] as $key => $val ) :
|
1696 |
if ( $val['category'] ) :
|
1697 |
$val['category'] = preg_replace('/\s/', '', $val['category']);
|
1698 |
$categories = explode(',', $val['category']);
|
|
|
1699 |
foreach($categories as $cat_id) :
|
1700 |
if ( is_numeric($cat_id) ) :
|
1701 |
$out .= ' jQuery(\'#in-category-' . $cat_id . '\').click(function(){if(jQuery(\'#in-category-' . $cat_id . '\').attr(\'checked\') == true) { if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html); });';
|
@@ -1714,7 +1766,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
1714 |
$out .= 'jQuery(\'#cft\').html(html);}});';
|
1715 |
endif;
|
1716 |
|
1717 |
-
$out .= ' }else{ jQuery(\'#cft\').html(\'\');jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val(), function(html) { jQuery(\'#cft_selectbox\').html(html);
|
1718 |
if ( $options['custom_field_template_replace_the_title'] ) :
|
1719 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . __('Custom Field Template', 'custom-field-template') . '\');';
|
1720 |
endif;
|
@@ -1724,6 +1776,13 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
1724 |
endif;
|
1725 |
endforeach;
|
1726 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1727 |
$out .= ' jQuery(\'#cftloading_img\').ajaxStart(function() { jQuery(this).show();});';
|
1728 |
$out .= ' jQuery(\'#cftloading_img\').ajaxStop(function() { jQuery(this).hide();});';
|
1729 |
$out .= '});' . "\n";
|
@@ -1779,83 +1838,124 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
1779 |
|
1780 |
echo $out;
|
1781 |
}
|
1782 |
-
|
1783 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1784 |
$options = $this->get_custom_field_template_data();
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1796 |
endif;
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1802 |
foreach ( $cat_ids as $cat_id ) :
|
1803 |
if (in_array($cat_id, $cats) ) :
|
1804 |
-
$
|
1805 |
-
break;
|
1806 |
endif;
|
1807 |
endforeach;
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
$out .= '<select id="custom_field_template_select">';
|
1812 |
-
for ( $i=0; $i < count($options['custom_fields']); $i++ ) {
|
1813 |
-
$post_ids = explode(',', $options['custom_fields'][$i]['post']);
|
1814 |
-
$catflag = "";
|
1815 |
-
if ( $options['custom_fields'][$i]['category'] ) :
|
1816 |
-
$cat_ids = explode(',', $options['custom_fields'][$i]['category']);
|
1817 |
-
foreach ( $cat_ids as $cat_id ) :
|
1818 |
-
if (in_array($cat_id, $cats) ) :
|
1819 |
-
$catflag = 1;
|
1820 |
-
break;
|
1821 |
-
endif;
|
1822 |
-
endforeach;
|
1823 |
endif;
|
1824 |
-
if ( in_array($_REQUEST['post'], $post_ids) ) :
|
1825 |
-
$out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
|
1826 |
-
elseif ( $catflag ) :
|
1827 |
-
$out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
|
1828 |
-
elseif ( $options['custom_fields'][$i]['post'] ) :
|
1829 |
-
$out .= '';
|
1830 |
-
elseif ( $options['custom_fields'][$i]['category'] ) :
|
1831 |
-
$out .= '';
|
1832 |
-
elseif ( $i == $options['posts'][$_REQUEST['post']] && isset($_REQUEST['post']) ) :
|
1833 |
-
$out .= '<option value="' . $i . '" selected="selected">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
|
1834 |
-
else :
|
1835 |
-
$out .= '<option value="' . $i . '">' . stripcslashes($options['custom_fields'][$i]['title']) . '</option>';
|
1836 |
-
endif;
|
1837 |
-
}
|
1838 |
-
$out .= '</select> ';
|
1839 |
-
$out .= '<input type="button" class="button" value="' . __('Load', 'custom-field-template') . '" onclick="if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;};';
|
1840 |
-
$out .= ' var cftloading_select = function() {jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=\'+jQuery(\'#custom_field_template_select\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
|
1841 |
-
if ( $options['custom_field_template_replace_the_title'] ) :
|
1842 |
-
$out .= 'jQuery(\'#cftdiv h3 span\').text(jQuery(\'#custom_field_template_select :selected\').text());';
|
1843 |
endif;
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1852 |
else :
|
1853 |
-
$out .= '
|
1854 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1855 |
else :
|
1856 |
-
$out .= '
|
1857 |
endif;
|
1858 |
-
|
|
|
1859 |
return $out;
|
1860 |
}
|
1861 |
|
@@ -2244,7 +2344,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2244 |
$replace[$j][0][$skey] = $sval2;
|
2245 |
$j++;
|
2246 |
endforeach;
|
2247 |
-
endforeach;
|
2248 |
|
2249 |
foreach( $replace as $rkey => $rval ) :
|
2250 |
$replace_val[$rkey] = "";
|
@@ -2459,12 +2559,16 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2459 |
global $wp_query, $wp_version, $wpdb;
|
2460 |
$options = $this->get_custom_field_template_data();
|
2461 |
|
2462 |
-
$
|
|
|
|
|
|
|
|
|
2463 |
$wp_query->is_page = '';
|
2464 |
$wp_query->is_singular = '';
|
2465 |
|
2466 |
$original_where = $where;
|
2467 |
-
|
2468 |
$where = '';
|
2469 |
|
2470 |
$count = count($options['custom_fields']);
|
@@ -2503,10 +2607,10 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2503 |
case '=' :
|
2504 |
case '<>' :
|
2505 |
case '<=>':
|
2506 |
-
$where .= " AND ROW(ID,1) IN (SELECT post_id,count(post_id) FROM
|
2507 |
break;
|
2508 |
default :
|
2509 |
-
$where .= " AND ROW(ID,1) IN (SELECT post_id,count(post_id) FROM
|
2510 |
break;
|
2511 |
endswitch;
|
2512 |
endif;
|
@@ -2523,7 +2627,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2523 |
endif;
|
2524 |
foreach ( $s as $v ) :
|
2525 |
if ( !empty($v) ) :
|
2526 |
-
$where .= " AND ROW(ID,1) IN (SELECT post_id,count(post_id) FROM
|
2527 |
endif;
|
2528 |
endforeach;
|
2529 |
endif;
|
@@ -2544,9 +2648,13 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2544 |
endif;
|
2545 |
endif;
|
2546 |
|
2547 |
-
|
|
|
|
|
|
|
|
|
2548 |
//if ( $_REQUEST['s'] ) $where .= $original_where;
|
2549 |
-
|
2550 |
return $where;
|
2551 |
}
|
2552 |
|
4 |
Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
|
5 |
Description: This plugin adds the default custom fields on the Write Post/Page.
|
6 |
Author: Hiroaki Miyashita
|
7 |
+
Version: 1.3.0
|
8 |
Author URI: http://wordpressgogo.com/
|
9 |
*/
|
10 |
|
177 |
function custom_field_template_admin_head() {
|
178 |
global $wp_version;
|
179 |
|
180 |
+
if ( !defined('WP_PLUGIN_DIR') )
|
181 |
+
$plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) );
|
182 |
+
else
|
183 |
+
$plugin_dir = dirname( plugin_basename(__FILE__) );
|
184 |
+
|
185 |
+
echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/datePicker.css" />'."\n";
|
186 |
+
|
187 |
if ( substr($wp_version, 0, 3) >= '2.7' && is_user_logged_in() && ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php') ) && !strstr($_SERVER['REQUEST_URI'], 'page=') ) {
|
188 |
?>
|
189 |
<script type="text/javascript">
|
381 |
}
|
382 |
|
383 |
function custom_field_template_admin_scripts() {
|
384 |
+
if ( !defined('WP_PLUGIN_DIR') )
|
385 |
+
$plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) );
|
386 |
+
else
|
387 |
+
$plugin_dir = dirname( plugin_basename(__FILE__) );
|
388 |
+
|
389 |
wp_enqueue_script( 'jquery' );
|
390 |
wp_enqueue_script( 'jquery-form' );
|
391 |
+
wp_enqueue_script( 'date', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/date.js', array('jquery') );
|
392 |
+
wp_enqueue_script( 'bgiframe', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.bgiframe.js', array('jquery') ) ;
|
393 |
+
wp_enqueue_script( 'datePicker', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.datePicker.js', array('jquery') );
|
394 |
}
|
395 |
|
396 |
function install_custom_field_template_data() {
|
584 |
$options['custom_fields'][$j]['category'] = $_POST["custom_field_template_category"][$i];
|
585 |
$options['custom_fields'][$j]['post'] = $_POST["custom_field_template_post"][$i];
|
586 |
$options['custom_fields'][$j]['post_type'] = $_POST["custom_field_template_post_type"][$i];
|
587 |
+
$options['custom_fields'][$j]['template_files'] = $_POST["custom_field_template_template_files"][$i];
|
588 |
$j++;
|
589 |
}
|
590 |
}
|
694 |
<input type="text" name="custom_field_template_post[<?php echo $i; ?>]" id="custom_field_template_post[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['custom_fields'][$i]['post']); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['post']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
695 |
<p><label for="custom_field_template_category[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Category ID (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
696 |
<input type="text" name="custom_field_template_category[<?php echo $i; ?>]" id="custom_field_template_category[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['custom_fields'][$i]['category']); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['category']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
697 |
+
<p><label for="custom_field_template_template_files[<?php echo $i; ?>]"><a href="javascript:void(0);" onclick="jQuery(this).parent().next().next().toggle();"><?php echo sprintf(__('Page Template file name(s) (comma-deliminated)', 'custom-field-template'), $i); ?></a></label>:<br />
|
698 |
+
<input type="text" name="custom_field_template_template_files[<?php echo $i; ?>]" id="custom_field_template_template_files[<?php echo $i; ?>]" value="<?php echo stripcslashes($options['custom_fields'][$i]['template_files']); ?>" size="80"<?php if ( empty($options['custom_fields'][$i]['template_files']) ) : echo ' style="display:none;"'; endif; ?> /></p>
|
699 |
<p><label for="custom_field_template_content[<?php echo $i; ?>]"><?php echo sprintf(__('Template Content', 'custom-field-template'), $i); ?></label>:<br />
|
700 |
<textarea name="custom_field_template_content[<?php echo $i; ?>]" id="custom_field_template_content[<?php echo $i; ?>]" rows="10" cols="80"><?php echo stripcslashes($options['custom_fields'][$i]['content']); ?></textarea></p>
|
701 |
</td></tr>
|
710 |
<tr><td>
|
711 |
<p><label for="custom_field_template_replace_keys_by_labels"><?php _e('In case that you would like to replace custom keys by labels if `label` is set', 'custom-field-template'); ?></label>:<br />
|
712 |
<input type="checkbox" name="custom_field_template_replace_keys_by_labels" id="custom_field_template_replace_keys_by_labels" value="1" <?php if ($options['custom_field_template_replace_keys_by_labels']) { echo 'checked="checked"'; } ?> /> <?php _e('Use labels in place of custom keys', 'custom-field-template'); ?></p>
|
713 |
+
</td></tr>
|
714 |
<tr><td>
|
715 |
<p><label for="custom_field_template_use_wpautop"><?php _e('In case that you would like to add p and br tags in textareas automatically', 'custom-field-template'); ?></label>:<br />
|
716 |
<input type="checkbox" name="custom_field_template_use_wpautop" id="custom_field_template_use_wpautop" value="1" <?php if ($options['custom_field_template_use_wpautop']) { echo 'checked="checked"'; } ?> /> <?php _e('Use wpautop function', 'custom-field-template'); ?></p>
|
962 |
<th>htmlEditor</th><td></td><td></td><td></td><td></td><td>htmlEditor = true</td>
|
963 |
</tr>
|
964 |
<tr>
|
965 |
+
<th>date</th><td>date = true</td><td></td><td></td><td></td><td></td>
|
966 |
+
</tr>
|
967 |
+
<tr>
|
968 |
+
<th>dateFirstDayOfWeek</th><td>dateFirstDayOfWeek = 0</td><td></td><td></td><td></td><td></td>
|
969 |
+
</tr>
|
970 |
+
<tr>
|
971 |
+
<th>dateFormat</th><td>dateFormat = yyyy/mm/dd</td><td></td><td></td><td></td><td></td>
|
972 |
+
</tr>
|
973 |
+
<tr>
|
974 |
<th>mediaButton</th><td></td><td></td><td></td><td></td><td>mediaButton = true</td>
|
975 |
</tr>
|
976 |
<tr>
|
1154 |
return $custom_fields;
|
1155 |
}
|
1156 |
|
1157 |
+
function make_textfield( $name, $sid, $size = 25, $default, $hideKey, $label, $code, $class, $style, $before, $after, $maxlength, $multipleButton, $date, $dateFirstDayOfWeek, $dateFormat,
|
1158 |
$onclick, $ondblclick, $onkeydown, $onkeypress, $onkeyup, $onmousedown, $onmouseup, $onmouseover, $onmouseout, $onmousemove, $onfocus, $onblur, $onchange, $onselect ) {
|
1159 |
$options = $this->get_custom_field_template_data();
|
1160 |
|
1179 |
endif;
|
1180 |
|
1181 |
if ( $hideKey == true ) $hide = ' class="hideKey"';
|
1182 |
+
if ( !empty($class) && $date == true ) $class = ' class="' . $class . ' datePicker"';
|
1183 |
+
elseif ( empty($class) && $date == true ) $class = ' class="datePicker"';
|
1184 |
if ( !empty($style) ) $style = ' style="' . $style . '"';
|
1185 |
if ( !empty($maxlength) ) $maxlength = ' maxlength="' . $maxlength . '"';
|
1186 |
|
1194 |
$event_output .= " " . $key . '="' . stripcslashes(trim($val)) . '"';
|
1195 |
endforeach;
|
1196 |
|
1197 |
+
if ( $multipleButton == true && $sid == 0 && $date != true ) :
|
1198 |
$addfield .= '<div>';
|
1199 |
$addfield .= '<a href="#clear" onclick="jQuery(this).parent().parent().parent().clone().insertBefore(jQuery(this).parent().parent().parent()).find('."'input'".').val('."''".');jQuery(this).parent().css('."'visibility','hidden'".');jQuery(this).parent().prev().css('."'visibility','hidden'".'); return false;">' . __('Add New', 'custom-field-template') . '</a>';
|
1200 |
$addfield .= '</div>';
|
1207 |
|
1208 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] )
|
1209 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1210 |
+
$out .= trim($before).'<input id="' . $name . $sid . '" name="' . $name . '[]" value="' . attribute_escape(trim($value)) . '" type="text" size="' . $size . '"' . $class . $style . $maxlength . $event_output . ' />'.trim($after);
|
1211 |
+
|
1212 |
+
if ( $date == true ) :
|
1213 |
+
$out .= '<script type="text/javascript">' . "\n" .
|
1214 |
+
'// <![CDATA[' . "\n";
|
1215 |
+
if ( is_numeric($dateFirstDayOfWeek) ) $out .= 'Date.firstDayOfWeek = ' . trim($dateFirstDayOfWeek) . ";\n";
|
1216 |
+
if ( $dateFormat ) $out .= 'Date.format = "' . trim($dateFormat) . '"' . ";\n";
|
1217 |
+
$out .= 'jQuery(document).ready(function() { jQuery(".datePicker").css("float", "left"); jQuery(".datePicker").datePicker(); });' . "\n" .
|
1218 |
+
'// ]]>' . "\n" .
|
1219 |
+
'</script>';
|
1220 |
+
endif;
|
1221 |
+
|
1222 |
+
$out .= '</dd></dl>'."\n";
|
1223 |
+
|
1224 |
return $out;
|
1225 |
}
|
1226 |
|
1530 |
}
|
1531 |
|
1532 |
function load_custom_field( $id = 0 ) {
|
1533 |
+
global $userdata, $post;
|
1534 |
get_currentuserinfo();
|
1535 |
$level = $userdata->user_level;
|
1536 |
|
1548 |
return;
|
1549 |
endif;
|
1550 |
|
1551 |
+
if ( $options['custom_fields'][$id]['category'] && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php')) && empty($options['custom_fields'][$id]['template_files']) )
|
1552 |
+
return;
|
1553 |
+
|
1554 |
+
if ( !empty($options['custom_fields'][$id]['template_files']) && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php')) && empty($options['custom_fields'][$id]['category']) )
|
1555 |
return;
|
1556 |
|
1557 |
if ( (!$_REQUEST['post'] || $_REQUEST['post']<0) && $options['custom_fields'][$id]['category'] && $_REQUEST['cft_mode'] != 'ajaxload' )
|
1562 |
|
1563 |
if ( $options['custom_fields'][$id]['post'] ) :
|
1564 |
$post_ids = explode(',', $options['custom_fields'][$id]['post']);
|
1565 |
+
$post_ids = array_filter( $post_ids );
|
1566 |
if ( !in_array($_REQUEST['post'], $post_ids) )
|
1567 |
return;
|
1568 |
endif;
|
1569 |
+
|
1570 |
+
if ( $options['custom_fields'][$id]['template_files'] && (isset($post->page_template) || $_REQUEST['page_template']) ) :
|
1571 |
+
$template_files = explode(',', $options['custom_fields'][$id]['template_files']);
|
1572 |
+
$template_files = array_filter( $template_files );
|
1573 |
+
if ( !in_array($post->page_template, $template_files) && !in_array($_REQUEST['page_template'], $template_files) )
|
1574 |
+
return;
|
1575 |
+
endif;
|
1576 |
|
1577 |
if ( $options['custom_fields'][$id]['instruction'] ) :
|
1578 |
$instruction = stripcslashes($options['custom_fields'][$id]['instruction']);
|
1592 |
$out .= '</div><div' . $class . '>';
|
1593 |
}
|
1594 |
else if( $data[$i]['type'] == 'textfield' || $data[$i]['type'] == 'text' ) {
|
1595 |
+
$out .= $this->make_textfield( $title, $i, $data[$i]['size'], $data[$i]['default'], $data[$i]['hideKey'], $data[$i]['label'], $data[$i]['code'], $data[$i]['class'], $data[$i]['style'], $data[$i]['before'], $data[$i]['after'], $data[$i]['maxlength'], $data[$i]['multipleButton'], $data[$i]['date'], $data[$i]['dateFirstDayOfWeek'], $data[$i]['dateFormat'],
|
1596 |
$data[$i]['onclick'], $data[$i]['ondblclick'], $data[$i]['onkeydown'], $data[$i]['onkeypress'], $data[$i]['onkeyup'], $data[$i]['onmousedown'], $data[$i]['onmouseup'], $data[$i]['onmouseover'], $data[$i]['onmouseout'], $data[$i]['onmousemove'], $data[$i]['onfocus'], $data[$i]['onblur'], $data[$i]['onchange'], $data[$i]['onselect'] );
|
1597 |
}
|
1598 |
else if( $data[$i]['type'] == 'checkbox' ) {
|
1627 |
}
|
1628 |
|
1629 |
function insert_custom_field() {
|
1630 |
+
global $wp_version, $post;
|
1631 |
$options = $this->get_custom_field_template_data();
|
1632 |
|
1633 |
if( $options == null)
|
1722 |
|
1723 |
if(count($options['custom_fields'])>$options['posts'][$_REQUEST['post']] && $options['posts'][$_REQUEST['post']]) $init_id = $options['posts'][$_REQUEST['post']];
|
1724 |
else $init_id = 0;
|
1725 |
+
|
1726 |
$out .= 'jQuery(document).ready(function() {' . "\n";
|
1727 |
|
1728 |
+
$fields = $this->get_custom_fields( $init_id );
|
1729 |
+
if ( user_can_richedit() ) :
|
1730 |
+
foreach( $fields as $title => $data ) :
|
1731 |
+
for($i = 0; $i<count($data); $i++) :
|
1732 |
+
if( $data[$i][ 'type' ] == 'textarea' && $data[$i][ 'tinyMCE' ] ) :
|
1733 |
+
if ( substr($wp_version, 0, 3) >= '2.7' ) :
|
1734 |
/*$out .= ' if ( getUserSetting( "editor" ) == "html" ) {
|
1735 |
jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
1736 |
+
else :
|
1737 |
$out .= ' if(wpTinyMCEConfig) if(wpTinyMCEConfig.defaultEditor == "html") { jQuery("#edButtonPreview").trigger("click"); }' . "\n";
|
1738 |
+
endif;
|
1739 |
+
break;
|
|
|
|
|
|
|
1740 |
endif;
|
1741 |
+
endfor;
|
1742 |
+
endforeach;
|
1743 |
+
endif;
|
1744 |
|
1745 |
if ( $options['custom_fields'] ) :
|
1746 |
foreach ( $options['custom_fields'] as $key => $val ) :
|
1747 |
if ( $val['category'] ) :
|
1748 |
$val['category'] = preg_replace('/\s/', '', $val['category']);
|
1749 |
$categories = explode(',', $val['category']);
|
1750 |
+
$categories = array_filter($categories);
|
1751 |
foreach($categories as $cat_id) :
|
1752 |
if ( is_numeric($cat_id) ) :
|
1753 |
$out .= ' jQuery(\'#in-category-' . $cat_id . '\').click(function(){if(jQuery(\'#in-category-' . $cat_id . '\').attr(\'checked\') == true) { if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&\'+jQuery(\'#categories-all :input\').fieldSerialize(), function(html) { jQuery(\'#cft_selectbox\').html(html); });';
|
1766 |
$out .= 'jQuery(\'#cft\').html(html);}});';
|
1767 |
endif;
|
1768 |
|
1769 |
+
$out .= ' }else{ jQuery(\'#cft\').html(\'\');jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val(), function(html) { jQuery(\'#cft_selectbox\').html(html); });';
|
1770 |
if ( $options['custom_field_template_replace_the_title'] ) :
|
1771 |
$out .= 'jQuery(\'#cftdiv h3 span\').text(\'' . __('Custom Field Template', 'custom-field-template') . '\');';
|
1772 |
endif;
|
1776 |
endif;
|
1777 |
endforeach;
|
1778 |
endif;
|
1779 |
+
|
1780 |
+
if ( 0 != count( get_page_templates() ) ):
|
1781 |
+
$out .= 'jQuery(\'#page_template\').change(function(){ if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;}; jQuery.get(\'?page=custom-field-template/custom-field-template.php&cft_mode=selectbox&post=\'+jQuery(\'#post_ID\').val()+\'&page_template=\'+jQuery(\'#page_template\').val(), function(html) { jQuery(\'#cft_selectbox\').html(html);});';
|
1782 |
+
$out .= 'jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&page_template=\'+jQuery(\'#page_template\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) { jQuery(\'#cft\').html(html);}});';
|
1783 |
+
$out .= '});' . "\n";
|
1784 |
+
endif;
|
1785 |
+
|
1786 |
$out .= ' jQuery(\'#cftloading_img\').ajaxStart(function() { jQuery(this).show();});';
|
1787 |
$out .= ' jQuery(\'#cftloading_img\').ajaxStop(function() { jQuery(this).hide();});';
|
1788 |
$out .= '});' . "\n";
|
1838 |
|
1839 |
echo $out;
|
1840 |
}
|
1841 |
+
|
1842 |
+
// Next collect all the custom fields templates that meet the following criteria
|
1843 |
+
// a) The post in the right category (if filtered by categories)
|
1844 |
+
// b) The post/page using the right Page Template (if filtered by page Template)
|
1845 |
+
// Return the result of the filter
|
1846 |
+
function custom_field_template_filter(){
|
1847 |
+
global $post;
|
1848 |
+
|
1849 |
$options = $this->get_custom_field_template_data();
|
1850 |
+
$filtered_cfts = array();
|
1851 |
+
|
1852 |
+
$post_id = $_REQUEST['post'];
|
1853 |
+
|
1854 |
+
// Page Categories
|
1855 |
+
$categories = get_the_category($post_id);
|
1856 |
+
$cats = array();
|
1857 |
+
if ( is_array($categories) ) foreach($categories as $category) $cats[] = $category->cat_ID;
|
1858 |
+
if ( $_REQUEST['post_category'] ) $cats = array_merge($cats, $_REQUEST['post_category']);
|
1859 |
+
|
1860 |
+
for ( $i=0; $i < count($options['custom_fields']); $i++ ) :
|
1861 |
+
// If only shows up on pages or posts if set
|
1862 |
+
if ( $options['custom_fields'][$i]['post_type'] ) :
|
1863 |
+
if ( $options['custom_fields'][$i]['post_type'] == 'post' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) )
|
1864 |
+
continue;
|
1865 |
+
if ( $options['custom_fields'][$i]['post_type'] == 'page' && (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php')) )
|
1866 |
+
continue;
|
1867 |
+
endif;
|
1868 |
+
|
1869 |
+
// Filter IDs and Pages
|
1870 |
+
$cat_ids = explode(',', $options['custom_fields'][$i]['category']);
|
1871 |
+
$template_files = explode(',', $options['custom_fields'][$i]['template_files']);
|
1872 |
+
$post_ids = explode(',', $options['custom_fields'][$i]['post']);
|
1873 |
+
// Send back empties
|
1874 |
+
$cat_ids = array_filter( $cat_ids );
|
1875 |
+
$template_files = array_filter( $template_files );
|
1876 |
+
$post_ids = array_filter( $post_ids );
|
1877 |
+
|
1878 |
+
if ( (strstr($_SERVER['REQUEST_URI'], 'wp-admin/page-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/page.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit-pages.php')) ) :
|
1879 |
+
// Check if there are page template files to filter by and there is a page template
|
1880 |
+
if ( count($template_files) && (isset($post->page_template) || $_REQUEST['page_template']) ) :
|
1881 |
+
// If the page_template is not in the template_files filter remove this custom field
|
1882 |
+
if( !in_array($post->page_template, $template_files) && !in_array($_REQUEST['page_template'], $template_files) ) :
|
1883 |
+
continue;
|
1884 |
+
endif;
|
1885 |
+
elseif ( $options['custom_fields'][$i]['category'] ) :
|
1886 |
+
continue;
|
1887 |
endif;
|
1888 |
+
endif;
|
1889 |
+
|
1890 |
+
// If there is post_ids and this post id doesn't match them skip
|
1891 |
+
if ( count($post_ids) && !in_array($_REQUEST['post'], $post_ids) ) :
|
1892 |
+
continue;
|
1893 |
+
endif;
|
1894 |
+
|
1895 |
+
if ( (strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/edit.php')) ) :
|
1896 |
+
// If there is post_ids and this post id doesn't match them skip
|
1897 |
+
if ( is_array($cat_ids) && count($cat_ids) ) :
|
1898 |
+
// If there are no categories for this post skip
|
1899 |
+
if( !count($cats) ) continue;
|
1900 |
+
// Check each cat_ids filter to see if it matches the posts cats
|
1901 |
+
$cat_match = 0;
|
1902 |
foreach ( $cat_ids as $cat_id ) :
|
1903 |
if (in_array($cat_id, $cats) ) :
|
1904 |
+
$cat_match = 1;
|
|
|
1905 |
endif;
|
1906 |
endforeach;
|
1907 |
+
// No matches found skip
|
1908 |
+
if($cat_match == 0) :
|
1909 |
+
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1910 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1911 |
endif;
|
1912 |
+
endif;
|
1913 |
+
|
1914 |
+
$options['custom_fields'][$i]['id'] = $i;
|
1915 |
+
$filtered_cfts[] = $options['custom_fields'][$i];
|
1916 |
+
|
1917 |
+
endfor;
|
1918 |
+
|
1919 |
+
return $filtered_cfts;
|
1920 |
+
}
|
1921 |
+
|
1922 |
+
function custom_field_template_selectbox() {
|
1923 |
+
$options = $this->get_custom_field_template_data();
|
1924 |
+
|
1925 |
+
if( count($options['custom_fields']) < 2 ) :
|
1926 |
+
return ' ';
|
1927 |
+
endif;
|
1928 |
+
|
1929 |
+
$filtered_cfts = $this->custom_field_template_filter();
|
1930 |
+
|
1931 |
+
if( count($filtered_cfts) < 1 ) :
|
1932 |
+
return ' ';
|
1933 |
+
endif;
|
1934 |
+
|
1935 |
+
$out .= '<select id="custom_field_template_select">';
|
1936 |
+
foreach ( $filtered_cfts as $filtered_cft ) :
|
1937 |
+
if ( $filtered_cft['id'] == $options['posts'][$_REQUEST['post']] && isset($_REQUEST['post']) ) :
|
1938 |
+
$out .= '<option value="' . $filtered_cft['id'] . '" selected="selected">' . stripcslashes($filtered_cft['title']) . '</option>';
|
1939 |
else :
|
1940 |
+
$out .= '<option value="' . $filtered_cft['id'] . '">' . stripcslashes($filtered_cft['title']) . '</option>';
|
1941 |
endif;
|
1942 |
+
endforeach;
|
1943 |
+
$out .= '</select> ';
|
1944 |
+
|
1945 |
+
$out .= '<input type="button" class="button" value="' . __('Load', 'custom-field-template') . '" onclick="if(tinyMCEID.length) { for(i=0;i<tinyMCEID.length;i++) {tinyMCE.execCommand(\'mceRemoveControl\', false, tinyMCEID[i]);} tinyMCEID.length=0;};';
|
1946 |
+
$out .= ' var cftloading_select = function() {jQuery.ajax({type: \'GET\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxload&id=\'+jQuery(\'#custom_field_template_select\').val()+\'&post=\'+jQuery(\'#post_ID\').val(), success: function(html) {';
|
1947 |
+
if ( $options['custom_field_template_replace_the_title'] ) :
|
1948 |
+
$out .= 'jQuery(\'#cftdiv h3 span\').text(jQuery(\'#custom_field_template_select :selected\').text());';
|
1949 |
+
endif;
|
1950 |
+
$out .= 'jQuery(\'#cft\').html(html);}});};';
|
1951 |
+
if ( $options['custom_field_template_use_autosave'] ) :
|
1952 |
+
$out .= 'var fields = jQuery(\'#cft :input\').fieldSerialize();';
|
1953 |
+
$out .= 'jQuery.ajax({type: \'POST\', url: \'?page=custom-field-template/custom-field-template.php&cft_mode=ajaxsave&post=\'+jQuery(\'#post_ID\').val()+\'&custom-field-template-verify-key=\'+jQuery(\'#custom-field-template-verify-key\').val()+\'&\'+fields, success: cftloading_select});';
|
1954 |
else :
|
1955 |
+
$out .= 'cftloading_select();';
|
1956 |
endif;
|
1957 |
+
$out .= '" />';
|
1958 |
+
|
1959 |
return $out;
|
1960 |
}
|
1961 |
|
2344 |
$replace[$j][0][$skey] = $sval2;
|
2345 |
$j++;
|
2346 |
endforeach;
|
2347 |
+
endforeach;
|
2348 |
|
2349 |
foreach( $replace as $rkey => $rval ) :
|
2350 |
$replace_val[$rkey] = "";
|
2559 |
global $wp_query, $wp_version, $wpdb;
|
2560 |
$options = $this->get_custom_field_template_data();
|
2561 |
|
2562 |
+
if ( $_REQUEST['no_is_search'] ) :
|
2563 |
+
$wp_query->is_search = '';
|
2564 |
+
else:
|
2565 |
+
$wp_query->is_search = 1;
|
2566 |
+
endif;
|
2567 |
$wp_query->is_page = '';
|
2568 |
$wp_query->is_singular = '';
|
2569 |
|
2570 |
$original_where = $where;
|
2571 |
+
|
2572 |
$where = '';
|
2573 |
|
2574 |
$count = count($options['custom_fields']);
|
2607 |
case '=' :
|
2608 |
case '<>' :
|
2609 |
case '<=>':
|
2610 |
+
$where .= " AND ROW(ID,1) IN (SELECT post_id,count(post_id) FROM " . $wpdb->postmeta . " WHERE (" . $wpdb->postmeta . ".meta_key = '" . $key . "' AND `" . $wpdb->postmeta . "`.meta_value " . $replace[$key][$key2][0]['operator'] . " " . trim($val3) . ") GROUP BY post_id) ";
|
2611 |
break;
|
2612 |
default :
|
2613 |
+
$where .= " AND ROW(ID,1) IN (SELECT post_id,count(post_id) FROM " . $wpdb->postmeta . " WHERE (" . $wpdb->postmeta . ".meta_key = '" . $key . "' AND `" . $wpdb->postmeta . "`.meta_value LIKE '%" . trim($val3) . "%') GROUP BY post_id) ";
|
2614 |
break;
|
2615 |
endswitch;
|
2616 |
endif;
|
2627 |
endif;
|
2628 |
foreach ( $s as $v ) :
|
2629 |
if ( !empty($v) ) :
|
2630 |
+
$where .= " AND ROW(ID,1) IN (SELECT post_id,count(post_id) FROM `" . $wpdb->postmeta . "` WHERE (`" . $wpdb->postmeta . "`.meta_value LIKE '%" . trim($v) . "%') GROUP BY post_id) ";
|
2631 |
endif;
|
2632 |
endforeach;
|
2633 |
endif;
|
2648 |
endif;
|
2649 |
endif;
|
2650 |
|
2651 |
+
if ( $_REQUEST['no_is_search'] ) :
|
2652 |
+
$where .= " AND `".$wpdb->posts."`.post_status = 'publish'";
|
2653 |
+
else :
|
2654 |
+
$where .= " AND `".$wpdb->posts."`.post_status = 'publish' GROUP BY `".$wpdb->posts."`.ID";
|
2655 |
+
endif;
|
2656 |
//if ( $_REQUEST['s'] ) $where .= $original_where;
|
2657 |
+
|
2658 |
return $where;
|
2659 |
}
|
2660 |
|
custom-field-template.pot
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2009-
|
6 |
-
"PO-Revision-Date: 2009-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -15,401 +15,405 @@ msgstr ""
|
|
15 |
|
16 |
#: custom-field-template/custom-field-template.php:123
|
17 |
#: custom-field-template/custom-field-template.php:124
|
18 |
-
#: custom-field-template/custom-field-template.php:
|
19 |
-
#: custom-field-template/custom-field-template.php:
|
20 |
-
#: custom-field-template/custom-field-template.php:
|
21 |
-
#: custom-field-template/custom-field-template.php:
|
22 |
msgid "Custom Field Template"
|
23 |
msgstr ""
|
24 |
|
25 |
#: custom-field-template/custom-field-template.php:163
|
26 |
-
#: custom-field-template/custom-field-template.php:
|
27 |
msgid "Load"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: custom-field-template/custom-field-template.php:
|
31 |
msgid "read more"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: custom-field-template/custom-field-template.php:
|
35 |
-
#: custom-field-template/custom-field-template.php:
|
36 |
msgid "Custom Fields"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: custom-field-template/custom-field-template.php:
|
40 |
msgid "Settings"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: custom-field-template/custom-field-template.php:
|
44 |
msgid "Default Template"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: custom-field-template/custom-field-template.php:576
|
48 |
-
#: custom-field-template/custom-field-template.php:580
|
49 |
#: custom-field-template/custom-field-template.php:592
|
50 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
51 |
#: custom-field-template/custom-field-template.php:616
|
|
|
52 |
msgid "Options updated."
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: custom-field-template/custom-field-template.php:
|
56 |
msgid "Value Counts rebuilt."
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: custom-field-template/custom-field-template.php:
|
60 |
msgid "Tags rebuilt."
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: custom-field-template/custom-field-template.php:
|
64 |
msgid "Options imported."
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: custom-field-template/custom-field-template.php:
|
68 |
msgid "Options resetted."
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: custom-field-template/custom-field-template.php:
|
72 |
msgid "Options deleted."
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: custom-field-template/custom-field-template.php:
|
76 |
-
#: custom-field-template/custom-field-template.php:
|
77 |
-
#: custom-field-template/custom-field-template.php:
|
78 |
-
#: custom-field-template/custom-field-template.php:
|
79 |
-
#: custom-field-template/custom-field-template.php:
|
80 |
-
#: custom-field-template/custom-field-template.php:
|
81 |
-
#: custom-field-template/custom-field-template.php:
|
82 |
-
#: custom-field-template/custom-field-template.php:
|
83 |
-
#: custom-field-template/custom-field-template.php:
|
84 |
-
#: custom-field-template/custom-field-template.php:
|
85 |
-
#: custom-field-template/custom-field-template.php:
|
86 |
-
#: custom-field-template/custom-field-template.php:
|
87 |
-
#: custom-field-template/custom-field-template.php:
|
88 |
msgid "Click to toggle"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: custom-field-template/custom-field-template.php:
|
92 |
msgid "Custom Field Template Options"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: custom-field-template/custom-field-template.php:
|
96 |
msgid "Template Title"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: custom-field-template/custom-field-template.php:
|
100 |
msgid "Template Instruction"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: custom-field-template/custom-field-template.php:
|
104 |
-
#: custom-field-template/custom-field-template.php:
|
105 |
msgid "Post Type"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: custom-field-template/custom-field-template.php:
|
109 |
-
#: custom-field-template/custom-field-template.php:
|
110 |
msgid "Both"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: custom-field-template/custom-field-template.php:
|
114 |
-
#: custom-field-template/custom-field-template.php:
|
115 |
msgid "Post"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: custom-field-template/custom-field-template.php:
|
119 |
-
#: custom-field-template/custom-field-template.php:
|
120 |
msgid "Page"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: custom-field-template/custom-field-template.php:
|
124 |
msgid "Post ID (comma-deliminated)"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: custom-field-template/custom-field-template.php:
|
128 |
-
#: custom-field-template/custom-field-template.php:
|
129 |
msgid "Category ID (comma-deliminated)"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: custom-field-template/custom-field-template.php:
|
|
|
|
|
|
|
|
|
133 |
msgid "Template Content"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: custom-field-template/custom-field-template.php:
|
137 |
msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: custom-field-template/custom-field-template.php:
|
141 |
msgid "Use multiple image inset"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: custom-field-template/custom-field-template.php:
|
145 |
msgid "Caution:"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: custom-field-template/custom-field-template.php:
|
149 |
msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: custom-field-template/custom-field-template.php:
|
153 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: custom-field-template/custom-field-template.php:
|
157 |
msgid "Use labels in place of custom keys"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: custom-field-template/custom-field-template.php:
|
161 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: custom-field-template/custom-field-template.php:
|
165 |
msgid "Use wpautop function"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: custom-field-template/custom-field-template.php:
|
169 |
msgid "In case that you would like to save values automatically in switching templates"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: custom-field-template/custom-field-template.php:
|
173 |
msgid "Use the auto save in switching templates"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: custom-field-template/custom-field-template.php:
|
177 |
msgid "In case that you would like to forbid to use the default custom fields."
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: custom-field-template/custom-field-template.php:
|
181 |
msgid "Disable the default custom fields"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: custom-field-template/custom-field-template.php:
|
185 |
msgid "In case that you would like to forbid to use the quick edit."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: custom-field-template/custom-field-template.php:
|
189 |
msgid "Disable the quick edit"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: custom-field-template/custom-field-template.php:
|
193 |
msgid "In case that you would like to replace the box title with the template title."
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: custom-field-template/custom-field-template.php:
|
197 |
msgid "Replace the box title"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: custom-field-template/custom-field-template.php:
|
201 |
msgid "In case that you would like to use the shortcode in the widget."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: custom-field-template/custom-field-template.php:
|
205 |
msgid "Use the shortcode in the widget"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: custom-field-template/custom-field-template.php:
|
209 |
-
#: custom-field-template/custom-field-template.php:
|
210 |
-
#: custom-field-template/custom-field-template.php:
|
211 |
-
#: custom-field-template/custom-field-template.php:
|
212 |
-
#: custom-field-template/custom-field-template.php:
|
213 |
msgid "Update Options »"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: custom-field-template/custom-field-template.php:
|
217 |
msgid "ADMIN CSS"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: custom-field-template/custom-field-template.php:
|
221 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: custom-field-template/custom-field-template.php:
|
225 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: custom-field-template/custom-field-template.php:
|
229 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: custom-field-template/custom-field-template.php:
|
233 |
-
#: custom-field-template/custom-field-template.php:
|
234 |
msgid "Use PHP"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: custom-field-template/custom-field-template.php:
|
238 |
msgid "PHP CODE (Experimental Option)"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: custom-field-template/custom-field-template.php:
|
242 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: custom-field-template/custom-field-template.php:
|
246 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: custom-field-template/custom-field-template.php:
|
250 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: custom-field-template/custom-field-template.php:
|
254 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: custom-field-template/custom-field-template.php:
|
258 |
msgid "Position"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: custom-field-template/custom-field-template.php:
|
262 |
msgid "Before the conetnt"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: custom-field-template/custom-field-template.php:
|
266 |
msgid "After the conetnt"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: custom-field-template/custom-field-template.php:
|
270 |
#, php-format
|
271 |
msgid "Inside the conetnt ([cfthook hook=%d])"
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: custom-field-template/custom-field-template.php:
|
275 |
msgid "Content"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: custom-field-template/custom-field-template.php:
|
279 |
msgid "Apply to feeds"
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: custom-field-template/custom-field-template.php:
|
283 |
msgid "Rebuild Value Counts"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: custom-field-template/custom-field-template.php:
|
287 |
msgid "Are you sure to rebuild all value counts?"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: custom-field-template/custom-field-template.php:
|
291 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: custom-field-template/custom-field-template.php:
|
295 |
msgid "Rebuild Value Counts »"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: custom-field-template/custom-field-template.php:
|
299 |
msgid "Rebuild Tags"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: custom-field-template/custom-field-template.php:
|
303 |
msgid "Are you sure to rebuild tags?"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: custom-field-template/custom-field-template.php:
|
307 |
msgid "Rebuild Tags »"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: custom-field-template/custom-field-template.php:
|
311 |
msgid "Option List"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: custom-field-template/custom-field-template.php:
|
315 |
msgid "Export Options"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: custom-field-template/custom-field-template.php:
|
319 |
msgid "Export Options »"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: custom-field-template/custom-field-template.php:
|
323 |
msgid "Import Options"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: custom-field-template/custom-field-template.php:
|
327 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: custom-field-template/custom-field-template.php:
|
331 |
msgid "Import Options »"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: custom-field-template/custom-field-template.php:
|
335 |
msgid "Reset Options"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: custom-field-template/custom-field-template.php:
|
339 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: custom-field-template/custom-field-template.php:
|
343 |
msgid "Unset Options »"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: custom-field-template/custom-field-template.php:
|
347 |
msgid "Delete Options"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: custom-field-template/custom-field-template.php:
|
351 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: custom-field-template/custom-field-template.php:
|
355 |
msgid "Delete Options »"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: custom-field-template/custom-field-template.php:
|
359 |
msgid "Donation"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: custom-field-template/custom-field-template.php:
|
363 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: custom-field-template/custom-field-template.php:
|
367 |
-
#: custom-field-template/custom-field-template.php:
|
368 |
-
#: custom-field-template/custom-field-template.php:
|
369 |
msgid "Add New"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: custom-field-template/custom-field-template.php:
|
373 |
msgid "Clear"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: custom-field-template/custom-field-template.php:
|
377 |
msgid "Select"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: custom-field-template/custom-field-template.php:
|
381 |
msgid "Add Media"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: custom-field-template/custom-field-template.php:
|
385 |
msgid "Add an Image"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: custom-field-template/custom-field-template.php:
|
389 |
msgid "Add Video"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: custom-field-template/custom-field-template.php:
|
393 |
msgid "Add Audio"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: custom-field-template/custom-field-template.php:
|
397 |
msgid "Toggle"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: custom-field-template/custom-field-template.php:
|
401 |
msgid "Initialize"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: custom-field-template/custom-field-template.php:
|
405 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: custom-field-template/custom-field-template.php:
|
409 |
msgid "Save"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: custom-field-template/custom-field-template.php:
|
413 |
msgid "Search »"
|
414 |
msgstr ""
|
415 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Custom Field Template\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-06-10 03:30+0900\n"
|
6 |
+
"PO-Revision-Date: 2009-06-10 03:30+0900\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
15 |
|
16 |
#: custom-field-template/custom-field-template.php:123
|
17 |
#: custom-field-template/custom-field-template.php:124
|
18 |
+
#: custom-field-template/custom-field-template.php:469
|
19 |
+
#: custom-field-template/custom-field-template.php:667
|
20 |
+
#: custom-field-template/custom-field-template.php:1646
|
21 |
+
#: custom-field-template/custom-field-template.php:1771
|
22 |
msgid "Custom Field Template"
|
23 |
msgstr ""
|
24 |
|
25 |
#: custom-field-template/custom-field-template.php:163
|
26 |
+
#: custom-field-template/custom-field-template.php:1945
|
27 |
msgid "Load"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: custom-field-template/custom-field-template.php:319
|
31 |
msgid "read more"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: custom-field-template/custom-field-template.php:337
|
35 |
+
#: custom-field-template/custom-field-template.php:347
|
36 |
msgid "Custom Fields"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: custom-field-template/custom-field-template.php:377
|
40 |
msgid "Settings"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: custom-field-template/custom-field-template.php:397
|
44 |
msgid "Default Template"
|
45 |
msgstr ""
|
46 |
|
|
|
|
|
47 |
#: custom-field-template/custom-field-template.php:592
|
48 |
+
#: custom-field-template/custom-field-template.php:596
|
49 |
+
#: custom-field-template/custom-field-template.php:608
|
50 |
#: custom-field-template/custom-field-template.php:616
|
51 |
+
#: custom-field-template/custom-field-template.php:632
|
52 |
msgid "Options updated."
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: custom-field-template/custom-field-template.php:636
|
56 |
msgid "Value Counts rebuilt."
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: custom-field-template/custom-field-template.php:639
|
60 |
msgid "Tags rebuilt."
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: custom-field-template/custom-field-template.php:648
|
64 |
msgid "Options imported."
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: custom-field-template/custom-field-template.php:655
|
68 |
msgid "Options resetted."
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: custom-field-template/custom-field-template.php:659
|
72 |
msgid "Options deleted."
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: custom-field-template/custom-field-template.php:673
|
76 |
+
#: custom-field-template/custom-field-template.php:754
|
77 |
+
#: custom-field-template/custom-field-template.php:773
|
78 |
+
#: custom-field-template/custom-field-template.php:802
|
79 |
+
#: custom-field-template/custom-field-template.php:833
|
80 |
+
#: custom-field-template/custom-field-template.php:872
|
81 |
+
#: custom-field-template/custom-field-template.php:893
|
82 |
+
#: custom-field-template/custom-field-template.php:910
|
83 |
+
#: custom-field-template/custom-field-template.php:1039
|
84 |
+
#: custom-field-template/custom-field-template.php:1055
|
85 |
+
#: custom-field-template/custom-field-template.php:1071
|
86 |
+
#: custom-field-template/custom-field-template.php:1087
|
87 |
+
#: custom-field-template/custom-field-template.php:1103
|
88 |
msgid "Click to toggle"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: custom-field-template/custom-field-template.php:674
|
92 |
msgid "Custom Field Template Options"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: custom-field-template/custom-field-template.php:684
|
96 |
msgid "Template Title"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: custom-field-template/custom-field-template.php:686
|
100 |
msgid "Template Instruction"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: custom-field-template/custom-field-template.php:688
|
104 |
+
#: custom-field-template/custom-field-template.php:849
|
105 |
msgid "Post Type"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: custom-field-template/custom-field-template.php:690
|
109 |
+
#: custom-field-template/custom-field-template.php:850
|
110 |
msgid "Both"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: custom-field-template/custom-field-template.php:691
|
114 |
+
#: custom-field-template/custom-field-template.php:851
|
115 |
msgid "Post"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: custom-field-template/custom-field-template.php:692
|
119 |
+
#: custom-field-template/custom-field-template.php:852
|
120 |
msgid "Page"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: custom-field-template/custom-field-template.php:693
|
124 |
msgid "Post ID (comma-deliminated)"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: custom-field-template/custom-field-template.php:695
|
128 |
+
#: custom-field-template/custom-field-template.php:853
|
129 |
msgid "Category ID (comma-deliminated)"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: custom-field-template/custom-field-template.php:697
|
133 |
+
msgid "Page Template file name(s) (comma-deliminated)"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: custom-field-template/custom-field-template.php:699
|
137 |
msgid "Template Content"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: custom-field-template/custom-field-template.php:706
|
141 |
msgid "In case that you would like to insert multiple images at once in use of the custom field media buttons"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: custom-field-template/custom-field-template.php:707
|
145 |
msgid "Use multiple image inset"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: custom-field-template/custom-field-template.php:707
|
149 |
msgid "Caution:"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: custom-field-template/custom-field-template.php:707
|
153 |
msgid "You need to edit `wp-admin/includes/media.php`. Delete or comment out the code in the function media_send_to_editor."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: custom-field-template/custom-field-template.php:711
|
157 |
msgid "In case that you would like to replace custom keys by labels if `label` is set"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: custom-field-template/custom-field-template.php:712
|
161 |
msgid "Use labels in place of custom keys"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: custom-field-template/custom-field-template.php:715
|
165 |
msgid "In case that you would like to add p and br tags in textareas automatically"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: custom-field-template/custom-field-template.php:716
|
169 |
msgid "Use wpautop function"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: custom-field-template/custom-field-template.php:720
|
173 |
msgid "In case that you would like to save values automatically in switching templates"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: custom-field-template/custom-field-template.php:721
|
177 |
msgid "Use the auto save in switching templates"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: custom-field-template/custom-field-template.php:725
|
181 |
msgid "In case that you would like to forbid to use the default custom fields."
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: custom-field-template/custom-field-template.php:726
|
185 |
msgid "Disable the default custom fields"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: custom-field-template/custom-field-template.php:730
|
189 |
msgid "In case that you would like to forbid to use the quick edit."
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: custom-field-template/custom-field-template.php:731
|
193 |
msgid "Disable the quick edit"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: custom-field-template/custom-field-template.php:735
|
197 |
msgid "In case that you would like to replace the box title with the template title."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: custom-field-template/custom-field-template.php:736
|
201 |
msgid "Replace the box title"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: custom-field-template/custom-field-template.php:740
|
205 |
msgid "In case that you would like to use the shortcode in the widget."
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: custom-field-template/custom-field-template.php:741
|
209 |
msgid "Use the shortcode in the widget"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: custom-field-template/custom-field-template.php:745
|
213 |
+
#: custom-field-template/custom-field-template.php:764
|
214 |
+
#: custom-field-template/custom-field-template.php:793
|
215 |
+
#: custom-field-template/custom-field-template.php:824
|
216 |
+
#: custom-field-template/custom-field-template.php:863
|
217 |
msgid "Update Options »"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: custom-field-template/custom-field-template.php:755
|
221 |
msgid "ADMIN CSS"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: custom-field-template/custom-field-template.php:774
|
225 |
msgid "[cft] and [cftsearch] Shortcode Format"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: custom-field-template/custom-field-template.php:777
|
229 |
msgid "For [cft], [key] will be converted into the value of [key]."
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: custom-field-template/custom-field-template.php:778
|
233 |
msgid "For [cftsearch], [key] will be converted into the input field."
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: custom-field-template/custom-field-template.php:787
|
237 |
+
#: custom-field-template/custom-field-template.php:856
|
238 |
msgid "Use PHP"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: custom-field-template/custom-field-template.php:803
|
242 |
msgid "PHP CODE (Experimental Option)"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: custom-field-template/custom-field-template.php:805
|
246 |
msgid "Are you sure to save PHP codes? Please do it at your own risk."
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: custom-field-template/custom-field-template.php:806
|
250 |
msgid "For `text` and `textarea`, you must set $value as an string."
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: custom-field-template/custom-field-template.php:808
|
254 |
msgid "For `checkbox`, `radio`, and `select`, you must set $values as an array."
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: custom-field-template/custom-field-template.php:834
|
258 |
msgid "Auto Hook of `the_content()` (Experimental Option)"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: custom-field-template/custom-field-template.php:844
|
262 |
msgid "Position"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: custom-field-template/custom-field-template.php:845
|
266 |
msgid "Before the conetnt"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: custom-field-template/custom-field-template.php:846
|
270 |
msgid "After the conetnt"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: custom-field-template/custom-field-template.php:847
|
274 |
#, php-format
|
275 |
msgid "Inside the conetnt ([cfthook hook=%d])"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: custom-field-template/custom-field-template.php:855
|
279 |
msgid "Content"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: custom-field-template/custom-field-template.php:857
|
283 |
msgid "Apply to feeds"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: custom-field-template/custom-field-template.php:873
|
287 |
msgid "Rebuild Value Counts"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: custom-field-template/custom-field-template.php:875
|
291 |
msgid "Are you sure to rebuild all value counts?"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: custom-field-template/custom-field-template.php:879
|
295 |
msgid "Value Counts are used for temporarily saving how many values in each key. Set `valueCount = true` into fields."
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: custom-field-template/custom-field-template.php:883
|
299 |
msgid "Rebuild Value Counts »"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: custom-field-template/custom-field-template.php:894
|
303 |
msgid "Rebuild Tags"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: custom-field-template/custom-field-template.php:896
|
307 |
msgid "Are you sure to rebuild tags?"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: custom-field-template/custom-field-template.php:900
|
311 |
msgid "Rebuild Tags »"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: custom-field-template/custom-field-template.php:911
|
315 |
msgid "Option List"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: custom-field-template/custom-field-template.php:1040
|
319 |
msgid "Export Options"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: custom-field-template/custom-field-template.php:1046
|
323 |
msgid "Export Options »"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: custom-field-template/custom-field-template.php:1056
|
327 |
msgid "Import Options"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: custom-field-template/custom-field-template.php:1058
|
331 |
msgid "Are you sure to import options? Options you set will be overwritten."
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: custom-field-template/custom-field-template.php:1062
|
335 |
msgid "Import Options »"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: custom-field-template/custom-field-template.php:1072
|
339 |
msgid "Reset Options"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: custom-field-template/custom-field-template.php:1074
|
343 |
msgid "Are you sure to reset options? Options you set will be reset to the default settings."
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: custom-field-template/custom-field-template.php:1078
|
347 |
msgid "Unset Options »"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: custom-field-template/custom-field-template.php:1088
|
351 |
msgid "Delete Options"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: custom-field-template/custom-field-template.php:1090
|
355 |
msgid "Are you sure to delete options? Options you set will be deleted."
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: custom-field-template/custom-field-template.php:1094
|
359 |
msgid "Delete Options »"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: custom-field-template/custom-field-template.php:1104
|
363 |
msgid "Donation"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: custom-field-template/custom-field-template.php:1106
|
367 |
msgid "If you liked this plugin, please make a donation via paypal! Any amount is welcome. Your support is much appreciated."
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: custom-field-template/custom-field-template.php:1199
|
371 |
+
#: custom-field-template/custom-field-template.php:1314
|
372 |
+
#: custom-field-template/custom-field-template.php:1392
|
373 |
msgid "Add New"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: custom-field-template/custom-field-template.php:1324
|
377 |
msgid "Clear"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: custom-field-template/custom-field-template.php:1408
|
381 |
msgid "Select"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: custom-field-template/custom-field-template.php:1469
|
385 |
msgid "Add Media"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: custom-field-template/custom-field-template.php:1471
|
389 |
msgid "Add an Image"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: custom-field-template/custom-field-template.php:1473
|
393 |
msgid "Add Video"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: custom-field-template/custom-field-template.php:1475
|
397 |
msgid "Add Audio"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: custom-field-template/custom-field-template.php:1486
|
401 |
msgid "Toggle"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: custom-field-template/custom-field-template.php:1819
|
405 |
msgid "Initialize"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: custom-field-template/custom-field-template.php:1820
|
409 |
msgid "Are you sure to reset current values? Default values will be loaded."
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: custom-field-template/custom-field-template.php:1823
|
413 |
msgid "Save"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: custom-field-template/custom-field-template.php:2317
|
417 |
msgid "Search »"
|
418 |
msgstr ""
|
419 |
|
js/calendar.png
ADDED
Binary file
|
js/date.js
ADDED
@@ -0,0 +1,499 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Date prototype extensions. Doesn't depend on any
|
3 |
+
* other code. Doens't overwrite existing methods.
|
4 |
+
*
|
5 |
+
* Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear,
|
6 |
+
* isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear,
|
7 |
+
* setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods
|
8 |
+
*
|
9 |
+
* Copyright (c) 2006 Jörn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
10 |
+
*
|
11 |
+
* Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString -
|
12 |
+
* I've added my name to these methods so you know who to blame if they are broken!
|
13 |
+
*
|
14 |
+
* Dual licensed under the MIT and GPL licenses:
|
15 |
+
* http://www.opensource.org/licenses/mit-license.php
|
16 |
+
* http://www.gnu.org/licenses/gpl.html
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
|
20 |
+
/**
|
21 |
+
* An Array of day names starting with Sunday.
|
22 |
+
*
|
23 |
+
* @example dayNames[0]
|
24 |
+
* @result 'Sunday'
|
25 |
+
*
|
26 |
+
* @name dayNames
|
27 |
+
* @type Array
|
28 |
+
* @cat Plugins/Methods/Date
|
29 |
+
*/
|
30 |
+
Date.dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
31 |
+
|
32 |
+
/**
|
33 |
+
* An Array of abbreviated day names starting with Sun.
|
34 |
+
*
|
35 |
+
* @example abbrDayNames[0]
|
36 |
+
* @result 'Sun'
|
37 |
+
*
|
38 |
+
* @name abbrDayNames
|
39 |
+
* @type Array
|
40 |
+
* @cat Plugins/Methods/Date
|
41 |
+
*/
|
42 |
+
Date.abbrDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
43 |
+
|
44 |
+
/**
|
45 |
+
* An Array of month names starting with Janurary.
|
46 |
+
*
|
47 |
+
* @example monthNames[0]
|
48 |
+
* @result 'January'
|
49 |
+
*
|
50 |
+
* @name monthNames
|
51 |
+
* @type Array
|
52 |
+
* @cat Plugins/Methods/Date
|
53 |
+
*/
|
54 |
+
Date.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
55 |
+
|
56 |
+
/**
|
57 |
+
* An Array of abbreviated month names starting with Jan.
|
58 |
+
*
|
59 |
+
* @example abbrMonthNames[0]
|
60 |
+
* @result 'Jan'
|
61 |
+
*
|
62 |
+
* @name monthNames
|
63 |
+
* @type Array
|
64 |
+
* @cat Plugins/Methods/Date
|
65 |
+
*/
|
66 |
+
Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
67 |
+
|
68 |
+
/**
|
69 |
+
* The first day of the week for this locale.
|
70 |
+
*
|
71 |
+
* @name firstDayOfWeek
|
72 |
+
* @type Number
|
73 |
+
* @cat Plugins/Methods/Date
|
74 |
+
* @author Kelvin Luck
|
75 |
+
*/
|
76 |
+
Date.firstDayOfWeek = 1;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc).
|
80 |
+
*
|
81 |
+
* @name format
|
82 |
+
* @type String
|
83 |
+
* @cat Plugins/Methods/Date
|
84 |
+
* @author Kelvin Luck
|
85 |
+
*/
|
86 |
+
Date.format = 'dd/mm/yyyy';
|
87 |
+
//Date.format = 'mm/dd/yyyy';
|
88 |
+
//Date.format = 'yyyy-mm-dd';
|
89 |
+
//Date.format = 'dd mmm yy';
|
90 |
+
|
91 |
+
/**
|
92 |
+
* The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear
|
93 |
+
* only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes.
|
94 |
+
*
|
95 |
+
* @name format
|
96 |
+
* @type String
|
97 |
+
* @cat Plugins/Methods/Date
|
98 |
+
* @author Kelvin Luck
|
99 |
+
*/
|
100 |
+
Date.fullYearStart = '20';
|
101 |
+
|
102 |
+
(function() {
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Adds a given method under the given name
|
106 |
+
* to the Date prototype if it doesn't
|
107 |
+
* currently exist.
|
108 |
+
*
|
109 |
+
* @private
|
110 |
+
*/
|
111 |
+
function add(name, method) {
|
112 |
+
if( !Date.prototype[name] ) {
|
113 |
+
Date.prototype[name] = method;
|
114 |
+
}
|
115 |
+
};
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Checks if the year is a leap year.
|
119 |
+
*
|
120 |
+
* @example var dtm = new Date("01/12/2008");
|
121 |
+
* dtm.isLeapYear();
|
122 |
+
* @result true
|
123 |
+
*
|
124 |
+
* @name isLeapYear
|
125 |
+
* @type Boolean
|
126 |
+
* @cat Plugins/Methods/Date
|
127 |
+
*/
|
128 |
+
add("isLeapYear", function() {
|
129 |
+
var y = this.getFullYear();
|
130 |
+
return (y%4==0 && y%100!=0) || y%400==0;
|
131 |
+
});
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Checks if the day is a weekend day (Sat or Sun).
|
135 |
+
*
|
136 |
+
* @example var dtm = new Date("01/12/2008");
|
137 |
+
* dtm.isWeekend();
|
138 |
+
* @result false
|
139 |
+
*
|
140 |
+
* @name isWeekend
|
141 |
+
* @type Boolean
|
142 |
+
* @cat Plugins/Methods/Date
|
143 |
+
*/
|
144 |
+
add("isWeekend", function() {
|
145 |
+
return this.getDay()==0 || this.getDay()==6;
|
146 |
+
});
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Check if the day is a day of the week (Mon-Fri)
|
150 |
+
*
|
151 |
+
* @example var dtm = new Date("01/12/2008");
|
152 |
+
* dtm.isWeekDay();
|
153 |
+
* @result false
|
154 |
+
*
|
155 |
+
* @name isWeekDay
|
156 |
+
* @type Boolean
|
157 |
+
* @cat Plugins/Methods/Date
|
158 |
+
*/
|
159 |
+
add("isWeekDay", function() {
|
160 |
+
return !this.isWeekend();
|
161 |
+
});
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Gets the number of days in the month.
|
165 |
+
*
|
166 |
+
* @example var dtm = new Date("01/12/2008");
|
167 |
+
* dtm.getDaysInMonth();
|
168 |
+
* @result 31
|
169 |
+
*
|
170 |
+
* @name getDaysInMonth
|
171 |
+
* @type Number
|
172 |
+
* @cat Plugins/Methods/Date
|
173 |
+
*/
|
174 |
+
add("getDaysInMonth", function() {
|
175 |
+
return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()];
|
176 |
+
});
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Gets the name of the day.
|
180 |
+
*
|
181 |
+
* @example var dtm = new Date("01/12/2008");
|
182 |
+
* dtm.getDayName();
|
183 |
+
* @result 'Saturday'
|
184 |
+
*
|
185 |
+
* @example var dtm = new Date("01/12/2008");
|
186 |
+
* dtm.getDayName(true);
|
187 |
+
* @result 'Sat'
|
188 |
+
*
|
189 |
+
* @param abbreviated Boolean When set to true the name will be abbreviated.
|
190 |
+
* @name getDayName
|
191 |
+
* @type String
|
192 |
+
* @cat Plugins/Methods/Date
|
193 |
+
*/
|
194 |
+
add("getDayName", function(abbreviated) {
|
195 |
+
return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()];
|
196 |
+
});
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Gets the name of the month.
|
200 |
+
*
|
201 |
+
* @example var dtm = new Date("01/12/2008");
|
202 |
+
* dtm.getMonthName();
|
203 |
+
* @result 'Janurary'
|
204 |
+
*
|
205 |
+
* @example var dtm = new Date("01/12/2008");
|
206 |
+
* dtm.getMonthName(true);
|
207 |
+
* @result 'Jan'
|
208 |
+
*
|
209 |
+
* @param abbreviated Boolean When set to true the name will be abbreviated.
|
210 |
+
* @name getDayName
|
211 |
+
* @type String
|
212 |
+
* @cat Plugins/Methods/Date
|
213 |
+
*/
|
214 |
+
add("getMonthName", function(abbreviated) {
|
215 |
+
return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()];
|
216 |
+
});
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Get the number of the day of the year.
|
220 |
+
*
|
221 |
+
* @example var dtm = new Date("01/12/2008");
|
222 |
+
* dtm.getDayOfYear();
|
223 |
+
* @result 11
|
224 |
+
*
|
225 |
+
* @name getDayOfYear
|
226 |
+
* @type Number
|
227 |
+
* @cat Plugins/Methods/Date
|
228 |
+
*/
|
229 |
+
add("getDayOfYear", function() {
|
230 |
+
var tmpdtm = new Date("1/1/" + this.getFullYear());
|
231 |
+
return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000);
|
232 |
+
});
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get the number of the week of the year.
|
236 |
+
*
|
237 |
+
* @example var dtm = new Date("01/12/2008");
|
238 |
+
* dtm.getWeekOfYear();
|
239 |
+
* @result 2
|
240 |
+
*
|
241 |
+
* @name getWeekOfYear
|
242 |
+
* @type Number
|
243 |
+
* @cat Plugins/Methods/Date
|
244 |
+
*/
|
245 |
+
add("getWeekOfYear", function() {
|
246 |
+
return Math.ceil(this.getDayOfYear() / 7);
|
247 |
+
});
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Set the day of the year.
|
251 |
+
*
|
252 |
+
* @example var dtm = new Date("01/12/2008");
|
253 |
+
* dtm.setDayOfYear(1);
|
254 |
+
* dtm.toString();
|
255 |
+
* @result 'Tue Jan 01 2008 00:00:00'
|
256 |
+
*
|
257 |
+
* @name setDayOfYear
|
258 |
+
* @type Date
|
259 |
+
* @cat Plugins/Methods/Date
|
260 |
+
*/
|
261 |
+
add("setDayOfYear", function(day) {
|
262 |
+
this.setMonth(0);
|
263 |
+
this.setDate(day);
|
264 |
+
return this;
|
265 |
+
});
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Add a number of years to the date object.
|
269 |
+
*
|
270 |
+
* @example var dtm = new Date("01/12/2008");
|
271 |
+
* dtm.addYears(1);
|
272 |
+
* dtm.toString();
|
273 |
+
* @result 'Mon Jan 12 2009 00:00:00'
|
274 |
+
*
|
275 |
+
* @name addYears
|
276 |
+
* @type Date
|
277 |
+
* @cat Plugins/Methods/Date
|
278 |
+
*/
|
279 |
+
add("addYears", function(num) {
|
280 |
+
this.setFullYear(this.getFullYear() + num);
|
281 |
+
return this;
|
282 |
+
});
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Add a number of months to the date object.
|
286 |
+
*
|
287 |
+
* @example var dtm = new Date("01/12/2008");
|
288 |
+
* dtm.addMonths(1);
|
289 |
+
* dtm.toString();
|
290 |
+
* @result 'Tue Feb 12 2008 00:00:00'
|
291 |
+
*
|
292 |
+
* @name addMonths
|
293 |
+
* @type Date
|
294 |
+
* @cat Plugins/Methods/Date
|
295 |
+
*/
|
296 |
+
add("addMonths", function(num) {
|
297 |
+
var tmpdtm = this.getDate();
|
298 |
+
|
299 |
+
this.setMonth(this.getMonth() + num);
|
300 |
+
|
301 |
+
if (tmpdtm > this.getDate())
|
302 |
+
this.addDays(-this.getDate());
|
303 |
+
|
304 |
+
return this;
|
305 |
+
});
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Add a number of days to the date object.
|
309 |
+
*
|
310 |
+
* @example var dtm = new Date("01/12/2008");
|
311 |
+
* dtm.addDays(1);
|
312 |
+
* dtm.toString();
|
313 |
+
* @result 'Sun Jan 13 2008 00:00:00'
|
314 |
+
*
|
315 |
+
* @name addDays
|
316 |
+
* @type Date
|
317 |
+
* @cat Plugins/Methods/Date
|
318 |
+
*/
|
319 |
+
add("addDays", function(num) {
|
320 |
+
//this.setDate(this.getDate() + num);
|
321 |
+
this.setTime(this.getTime() + (num*86400000) );
|
322 |
+
return this;
|
323 |
+
});
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Add a number of hours to the date object.
|
327 |
+
*
|
328 |
+
* @example var dtm = new Date("01/12/2008");
|
329 |
+
* dtm.addHours(24);
|
330 |
+
* dtm.toString();
|
331 |
+
* @result 'Sun Jan 13 2008 00:00:00'
|
332 |
+
*
|
333 |
+
* @name addHours
|
334 |
+
* @type Date
|
335 |
+
* @cat Plugins/Methods/Date
|
336 |
+
*/
|
337 |
+
add("addHours", function(num) {
|
338 |
+
this.setHours(this.getHours() + num);
|
339 |
+
return this;
|
340 |
+
});
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Add a number of minutes to the date object.
|
344 |
+
*
|
345 |
+
* @example var dtm = new Date("01/12/2008");
|
346 |
+
* dtm.addMinutes(60);
|
347 |
+
* dtm.toString();
|
348 |
+
* @result 'Sat Jan 12 2008 01:00:00'
|
349 |
+
*
|
350 |
+
* @name addMinutes
|
351 |
+
* @type Date
|
352 |
+
* @cat Plugins/Methods/Date
|
353 |
+
*/
|
354 |
+
add("addMinutes", function(num) {
|
355 |
+
this.setMinutes(this.getMinutes() + num);
|
356 |
+
return this;
|
357 |
+
});
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Add a number of seconds to the date object.
|
361 |
+
*
|
362 |
+
* @example var dtm = new Date("01/12/2008");
|
363 |
+
* dtm.addSeconds(60);
|
364 |
+
* dtm.toString();
|
365 |
+
* @result 'Sat Jan 12 2008 00:01:00'
|
366 |
+
*
|
367 |
+
* @name addSeconds
|
368 |
+
* @type Date
|
369 |
+
* @cat Plugins/Methods/Date
|
370 |
+
*/
|
371 |
+
add("addSeconds", function(num) {
|
372 |
+
this.setSeconds(this.getSeconds() + num);
|
373 |
+
return this;
|
374 |
+
});
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant.
|
378 |
+
*
|
379 |
+
* @example var dtm = new Date();
|
380 |
+
* dtm.zeroTime();
|
381 |
+
* dtm.toString();
|
382 |
+
* @result 'Sat Jan 12 2008 00:01:00'
|
383 |
+
*
|
384 |
+
* @name zeroTime
|
385 |
+
* @type Date
|
386 |
+
* @cat Plugins/Methods/Date
|
387 |
+
* @author Kelvin Luck
|
388 |
+
*/
|
389 |
+
add("zeroTime", function() {
|
390 |
+
this.setMilliseconds(0);
|
391 |
+
this.setSeconds(0);
|
392 |
+
this.setMinutes(0);
|
393 |
+
this.setHours(0);
|
394 |
+
return this;
|
395 |
+
});
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Returns a string representation of the date object according to Date.format.
|
399 |
+
* (Date.toString may be used in other places so I purposefully didn't overwrite it)
|
400 |
+
*
|
401 |
+
* @example var dtm = new Date("01/12/2008");
|
402 |
+
* dtm.asString();
|
403 |
+
* @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy'
|
404 |
+
*
|
405 |
+
* @name asString
|
406 |
+
* @type Date
|
407 |
+
* @cat Plugins/Methods/Date
|
408 |
+
* @author Kelvin Luck
|
409 |
+
*/
|
410 |
+
add("asString", function(format) {
|
411 |
+
var r = format || Date.format;
|
412 |
+
return r
|
413 |
+
.split('yyyy').join(this.getFullYear())
|
414 |
+
.split('yy').join((this.getFullYear() + '').substring(2))
|
415 |
+
.split('mmmm').join(this.getMonthName(false))
|
416 |
+
.split('mmm').join(this.getMonthName(true))
|
417 |
+
.split('mm').join(_zeroPad(this.getMonth()+1))
|
418 |
+
.split('dd').join(_zeroPad(this.getDate()));
|
419 |
+
});
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object
|
423 |
+
* (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere)
|
424 |
+
*
|
425 |
+
* @example var dtm = Date.fromString("12/01/2008");
|
426 |
+
* dtm.toString();
|
427 |
+
* @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy'
|
428 |
+
*
|
429 |
+
* @name fromString
|
430 |
+
* @type Date
|
431 |
+
* @cat Plugins/Methods/Date
|
432 |
+
* @author Kelvin Luck
|
433 |
+
*/
|
434 |
+
Date.fromString = function(s)
|
435 |
+
{
|
436 |
+
var f = Date.format;
|
437 |
+
var d = new Date('01/01/1977');
|
438 |
+
|
439 |
+
var mLength = 0;
|
440 |
+
|
441 |
+
var iM = f.indexOf('mmmm');
|
442 |
+
if (iM > -1) {
|
443 |
+
for (var i=0; i<Date.monthNames.length; i++) {
|
444 |
+
var mStr = s.substr(iM, Date.monthNames[i].length);
|
445 |
+
if (Date.monthNames[i] == mStr) {
|
446 |
+
mLength = Date.monthNames[i].length - 4;
|
447 |
+
break;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
d.setMonth(i);
|
451 |
+
} else {
|
452 |
+
iM = f.indexOf('mmm');
|
453 |
+
if (iM > -1) {
|
454 |
+
var mStr = s.substr(iM, 3);
|
455 |
+
for (var i=0; i<Date.abbrMonthNames.length; i++) {
|
456 |
+
if (Date.abbrMonthNames[i] == mStr) break;
|
457 |
+
}
|
458 |
+
d.setMonth(i);
|
459 |
+
} else {
|
460 |
+
d.setMonth(Number(s.substr(f.indexOf('mm'), 2)) - 1);
|
461 |
+
}
|
462 |
+
}
|
463 |
+
|
464 |
+
var iY = f.indexOf('yyyy');
|
465 |
+
|
466 |
+
if (iY > -1) {
|
467 |
+
if (iM < iY)
|
468 |
+
{
|
469 |
+
iY += mLength;
|
470 |
+
}
|
471 |
+
d.setFullYear(Number(s.substr(iY, 4)));
|
472 |
+
} else {
|
473 |
+
if (iM < iY)
|
474 |
+
{
|
475 |
+
iY += mLength;
|
476 |
+
}
|
477 |
+
// TODO - this doesn't work very well - are there any rules for what is meant by a two digit year?
|
478 |
+
d.setFullYear(Number(Date.fullYearStart + s.substr(f.indexOf('yy'), 2)));
|
479 |
+
}
|
480 |
+
var iD = f.indexOf('dd');
|
481 |
+
if (iM < iD)
|
482 |
+
{
|
483 |
+
iD += mLength;
|
484 |
+
}
|
485 |
+
d.setDate(Number(s.substr(iD, 2)));
|
486 |
+
if (isNaN(d.getTime())) {
|
487 |
+
return false;
|
488 |
+
}
|
489 |
+
return d;
|
490 |
+
};
|
491 |
+
|
492 |
+
// utility method
|
493 |
+
var _zeroPad = function(num) {
|
494 |
+
var s = '0'+num;
|
495 |
+
return s.substring(s.length-2)
|
496 |
+
//return ('0'+num).substring(-2); // doesn't work on IE :(
|
497 |
+
};
|
498 |
+
|
499 |
+
})();
|
js/datePicker.css
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
table.jCalendar {
|
4 |
+
border: 1px solid #000;
|
5 |
+
background: #aaa;
|
6 |
+
border-collapse: separate;
|
7 |
+
border-spacing: 2px;
|
8 |
+
}
|
9 |
+
table.jCalendar th {
|
10 |
+
background: #333;
|
11 |
+
color: #fff;
|
12 |
+
font-weight: bold;
|
13 |
+
padding: 3px 5px;
|
14 |
+
}
|
15 |
+
|
16 |
+
table.jCalendar td {
|
17 |
+
background: #ccc;
|
18 |
+
color: #000;
|
19 |
+
padding: 3px 5px;
|
20 |
+
text-align: center;
|
21 |
+
}
|
22 |
+
table.jCalendar td.other-month {
|
23 |
+
background: #ddd;
|
24 |
+
color: #aaa;
|
25 |
+
}
|
26 |
+
table.jCalendar td.today {
|
27 |
+
background: #666;
|
28 |
+
color: #fff;
|
29 |
+
}
|
30 |
+
table.jCalendar td.selected {
|
31 |
+
background: #f66;
|
32 |
+
color: #fff;
|
33 |
+
}
|
34 |
+
table.jCalendar td.selected.dp-hover {
|
35 |
+
background: #f33;
|
36 |
+
color: #fff;
|
37 |
+
}
|
38 |
+
table.jCalendar td.dp-hover,
|
39 |
+
table.jCalendar tr.activeWeekHover td {
|
40 |
+
background: #fff;
|
41 |
+
color: #000;
|
42 |
+
}
|
43 |
+
table.jCalendar tr.selectedWeek td {
|
44 |
+
background: #f66;
|
45 |
+
color: #fff;
|
46 |
+
}
|
47 |
+
table.jCalendar td.disabled, table.jCalendar td.disabled.dp-hover {
|
48 |
+
background: #bbb;
|
49 |
+
color: #888;
|
50 |
+
}
|
51 |
+
table.jCalendar td.unselectable,
|
52 |
+
table.jCalendar td.unselectable:hover,
|
53 |
+
table.jCalendar td.unselectable.dp-hover {
|
54 |
+
background: #bbb;
|
55 |
+
color: #888;
|
56 |
+
}
|
57 |
+
|
58 |
+
/* For the popup */
|
59 |
+
|
60 |
+
/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */
|
61 |
+
|
62 |
+
div.dp-popup {
|
63 |
+
position: relative;
|
64 |
+
background: #ccc;
|
65 |
+
font-size: 10px;
|
66 |
+
font-family: arial, sans-serif;
|
67 |
+
padding: 2px;
|
68 |
+
width: 185px;
|
69 |
+
line-height: 1.2em;
|
70 |
+
}
|
71 |
+
div#dp-popup {
|
72 |
+
position: absolute;
|
73 |
+
z-index: 199;
|
74 |
+
}
|
75 |
+
div.dp-popup h2 {
|
76 |
+
font-size: 12px;
|
77 |
+
text-align: center;
|
78 |
+
margin: 2px 0;
|
79 |
+
padding: 0;
|
80 |
+
}
|
81 |
+
a#dp-close {
|
82 |
+
font-size: 11px;
|
83 |
+
padding: 4px 0;
|
84 |
+
text-align: center;
|
85 |
+
display: block;
|
86 |
+
}
|
87 |
+
a#dp-close:hover {
|
88 |
+
text-decoration: underline;
|
89 |
+
}
|
90 |
+
div.dp-popup a {
|
91 |
+
color: #000;
|
92 |
+
text-decoration: none;
|
93 |
+
padding: 3px 2px 0;
|
94 |
+
}
|
95 |
+
div.dp-popup div.dp-nav-prev {
|
96 |
+
position: absolute;
|
97 |
+
top: 2px;
|
98 |
+
left: 4px;
|
99 |
+
width: 100px;
|
100 |
+
}
|
101 |
+
div.dp-popup div.dp-nav-prev a {
|
102 |
+
float: left;
|
103 |
+
}
|
104 |
+
/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */
|
105 |
+
div.dp-popup div.dp-nav-prev a, div.dp-popup div.dp-nav-next a {
|
106 |
+
cursor: pointer;
|
107 |
+
}
|
108 |
+
div.dp-popup div.dp-nav-prev a.disabled, div.dp-popup div.dp-nav-next a.disabled {
|
109 |
+
cursor: default;
|
110 |
+
}
|
111 |
+
div.dp-popup div.dp-nav-next {
|
112 |
+
position: absolute;
|
113 |
+
top: 2px;
|
114 |
+
right: 4px;
|
115 |
+
width: 100px;
|
116 |
+
}
|
117 |
+
div.dp-popup div.dp-nav-next a {
|
118 |
+
float: right;
|
119 |
+
}
|
120 |
+
div.dp-popup a.disabled {
|
121 |
+
cursor: default;
|
122 |
+
color: #aaa;
|
123 |
+
}
|
124 |
+
div.dp-popup td {
|
125 |
+
cursor: pointer;
|
126 |
+
}
|
127 |
+
div.dp-popup td.disabled {
|
128 |
+
cursor: default;
|
129 |
+
}
|
130 |
+
|
131 |
+
a.dp-choose-date {
|
132 |
+
float: left;
|
133 |
+
width: 16px;
|
134 |
+
height: 16px;
|
135 |
+
padding: 0;
|
136 |
+
margin: 5px 3px 0;
|
137 |
+
display: block;
|
138 |
+
text-indent: -2000px;
|
139 |
+
overflow: hidden;
|
140 |
+
background: url(calendar.png) no-repeat;
|
141 |
+
}
|
142 |
+
a.dp-choose-date.dp-disabled {
|
143 |
+
background-position: 0 -20px;
|
144 |
+
cursor: default;
|
145 |
+
}
|
js/jquery.bgiframe.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
|
2 |
+
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
3 |
+
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
4 |
+
*
|
5 |
+
* $LastChangedDate: 2007-06-20 03:23:36 +0200 (Mi, 20 Jun 2007) $
|
6 |
+
* $Rev: 2110 $
|
7 |
+
*
|
8 |
+
* Version 2.1
|
9 |
+
*/
|
10 |
+
|
11 |
+
(function($){
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The bgiframe is chainable and applies the iframe hack to get
|
15 |
+
* around zIndex issues in IE6. It will only apply itself in IE
|
16 |
+
* and adds a class to the iframe called 'bgiframe'. The iframe
|
17 |
+
* is appeneded as the first child of the matched element(s)
|
18 |
+
* with a tabIndex and zIndex of -1.
|
19 |
+
*
|
20 |
+
* By default the plugin will take borders, sized with pixel units,
|
21 |
+
* into account. If a different unit is used for the border's width,
|
22 |
+
* then you will need to use the top and left settings as explained below.
|
23 |
+
*
|
24 |
+
* NOTICE: This plugin has been reported to cause perfromance problems
|
25 |
+
* when used on elements that change properties (like width, height and
|
26 |
+
* opacity) a lot in IE6. Most of these problems have been caused by
|
27 |
+
* the expressions used to calculate the elements width, height and
|
28 |
+
* borders. Some have reported it is due to the opacity filter. All
|
29 |
+
* these settings can be changed if needed as explained below.
|
30 |
+
*
|
31 |
+
* @example $('div').bgiframe();
|
32 |
+
* @before <div><p>Paragraph</p></div>
|
33 |
+
* @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>
|
34 |
+
*
|
35 |
+
* @param Map settings Optional settings to configure the iframe.
|
36 |
+
* @option String|Number top The iframe must be offset to the top
|
37 |
+
* by the width of the top border. This should be a negative
|
38 |
+
* number representing the border-top-width. If a number is
|
39 |
+
* is used here, pixels will be assumed. Otherwise, be sure
|
40 |
+
* to specify a unit. An expression could also be used.
|
41 |
+
* By default the value is "auto" which will use an expression
|
42 |
+
* to get the border-top-width if it is in pixels.
|
43 |
+
* @option String|Number left The iframe must be offset to the left
|
44 |
+
* by the width of the left border. This should be a negative
|
45 |
+
* number representing the border-left-width. If a number is
|
46 |
+
* is used here, pixels will be assumed. Otherwise, be sure
|
47 |
+
* to specify a unit. An expression could also be used.
|
48 |
+
* By default the value is "auto" which will use an expression
|
49 |
+
* to get the border-left-width if it is in pixels.
|
50 |
+
* @option String|Number width This is the width of the iframe. If
|
51 |
+
* a number is used here, pixels will be assume. Otherwise, be sure
|
52 |
+
* to specify a unit. An experssion could also be used.
|
53 |
+
* By default the value is "auto" which will use an experssion
|
54 |
+
* to get the offsetWidth.
|
55 |
+
* @option String|Number height This is the height of the iframe. If
|
56 |
+
* a number is used here, pixels will be assume. Otherwise, be sure
|
57 |
+
* to specify a unit. An experssion could also be used.
|
58 |
+
* By default the value is "auto" which will use an experssion
|
59 |
+
* to get the offsetHeight.
|
60 |
+
* @option Boolean opacity This is a boolean representing whether or not
|
61 |
+
* to use opacity. If set to true, the opacity of 0 is applied. If
|
62 |
+
* set to false, the opacity filter is not applied. Default: true.
|
63 |
+
* @option String src This setting is provided so that one could change
|
64 |
+
* the src of the iframe to whatever they need.
|
65 |
+
* Default: "javascript:false;"
|
66 |
+
*
|
67 |
+
* @name bgiframe
|
68 |
+
* @type jQuery
|
69 |
+
* @cat Plugins/bgiframe
|
70 |
+
* @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
71 |
+
*/
|
72 |
+
$.fn.bgIframe = $.fn.bgiframe = function(s) {
|
73 |
+
// This is only for IE6
|
74 |
+
if ( $.browser.msie && parseInt($.browser.version) <= 6 ) {
|
75 |
+
s = $.extend({
|
76 |
+
top : 'auto', // auto == .currentStyle.borderTopWidth
|
77 |
+
left : 'auto', // auto == .currentStyle.borderLeftWidth
|
78 |
+
width : 'auto', // auto == offsetWidth
|
79 |
+
height : 'auto', // auto == offsetHeight
|
80 |
+
opacity : true,
|
81 |
+
src : 'javascript:false;'
|
82 |
+
}, s || {});
|
83 |
+
var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
|
84 |
+
html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
|
85 |
+
'style="display:block;position:absolute;z-index:-1;'+
|
86 |
+
(s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
|
87 |
+
'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
|
88 |
+
'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
|
89 |
+
'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
|
90 |
+
'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
|
91 |
+
'"/>';
|
92 |
+
return this.each(function() {
|
93 |
+
if ( $('> iframe.bgiframe', this).length == 0 )
|
94 |
+
this.insertBefore( document.createElement(html), this.firstChild );
|
95 |
+
});
|
96 |
+
}
|
97 |
+
return this;
|
98 |
+
};
|
99 |
+
|
100 |
+
// Add browser.version if it doesn't exist
|
101 |
+
if (!$.browser.version)
|
102 |
+
$.browser.version = navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];
|
103 |
+
|
104 |
+
})(jQuery);
|
js/jquery.datePicker.js
ADDED
@@ -0,0 +1,1187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.com/)
|
3 |
+
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
4 |
+
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
5 |
+
*
|
6 |
+
* $Id: jquery.datePicker.js 70 2009-04-05 19:25:15Z kelvin.luck $
|
7 |
+
**/
|
8 |
+
|
9 |
+
(function($){
|
10 |
+
|
11 |
+
$.fn.extend({
|
12 |
+
/**
|
13 |
+
* Render a calendar table into any matched elements.
|
14 |
+
*
|
15 |
+
* @param Object s (optional) Customize your calendars.
|
16 |
+
* @option Number month The month to render (NOTE that months are zero based). Default is today's month.
|
17 |
+
* @option Number year The year to render. Default is today's year.
|
18 |
+
* @option Function renderCallback A reference to a function that is called as each cell is rendered and which can add classes and event listeners to the created nodes. Default is no callback.
|
19 |
+
* @option Number showHeader Whether or not to show the header row, possible values are: $.dpConst.SHOW_HEADER_NONE (no header), $.dpConst.SHOW_HEADER_SHORT (first letter of each day) and $.dpConst.SHOW_HEADER_LONG (full name of each day). Default is $.dpConst.SHOW_HEADER_SHORT.
|
20 |
+
* @option String hoverClass The class to attach to each cell when you hover over it (to allow you to use hover effects in IE6 which doesn't support the :hover pseudo-class on elements other than links). Default is dp-hover. Pass false if you don't want a hover class.
|
21 |
+
* @type jQuery
|
22 |
+
* @name renderCalendar
|
23 |
+
* @cat plugins/datePicker
|
24 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
25 |
+
*
|
26 |
+
* @example $('#calendar-me').renderCalendar({month:0, year:2007});
|
27 |
+
* @desc Renders a calendar displaying January 2007 into the element with an id of calendar-me.
|
28 |
+
*
|
29 |
+
* @example
|
30 |
+
* var testCallback = function($td, thisDate, month, year)
|
31 |
+
* {
|
32 |
+
* if ($td.is('.current-month') && thisDate.getDay() == 4) {
|
33 |
+
* var d = thisDate.getDate();
|
34 |
+
* $td.bind(
|
35 |
+
* 'click',
|
36 |
+
* function()
|
37 |
+
* {
|
38 |
+
* alert('You clicked on ' + d + '/' + (Number(month)+1) + '/' + year);
|
39 |
+
* }
|
40 |
+
* ).addClass('thursday');
|
41 |
+
* } else if (thisDate.getDay() == 5) {
|
42 |
+
* $td.html('Friday the ' + $td.html() + 'th');
|
43 |
+
* }
|
44 |
+
* }
|
45 |
+
* $('#calendar-me').renderCalendar({month:0, year:2007, renderCallback:testCallback});
|
46 |
+
*
|
47 |
+
* @desc Renders a calendar displaying January 2007 into the element with an id of calendar-me. Every Thursday in the current month has a class of "thursday" applied to it, is clickable and shows an alert when clicked. Every Friday on the calendar has the number inside replaced with text.
|
48 |
+
**/
|
49 |
+
renderCalendar : function(s)
|
50 |
+
{
|
51 |
+
var dc = function(a)
|
52 |
+
{
|
53 |
+
return document.createElement(a);
|
54 |
+
};
|
55 |
+
|
56 |
+
s = $.extend({}, $.fn.datePicker.defaults, s);
|
57 |
+
|
58 |
+
if (s.showHeader != $.dpConst.SHOW_HEADER_NONE) {
|
59 |
+
var headRow = $(dc('tr'));
|
60 |
+
for (var i=Date.firstDayOfWeek; i<Date.firstDayOfWeek+7; i++) {
|
61 |
+
var weekday = i%7;
|
62 |
+
var day = Date.dayNames[weekday];
|
63 |
+
headRow.append(
|
64 |
+
jQuery(dc('th')).attr({'scope':'col', 'abbr':day, 'title':day, 'class':(weekday == 0 || weekday == 6 ? 'weekend' : 'weekday')}).html(s.showHeader == $.dpConst.SHOW_HEADER_SHORT ? day.substr(0, 1) : day)
|
65 |
+
);
|
66 |
+
}
|
67 |
+
};
|
68 |
+
|
69 |
+
var calendarTable = $(dc('table'))
|
70 |
+
.attr(
|
71 |
+
{
|
72 |
+
'cellspacing':2
|
73 |
+
}
|
74 |
+
)
|
75 |
+
.addClass('jCalendar')
|
76 |
+
.append(
|
77 |
+
(s.showHeader != $.dpConst.SHOW_HEADER_NONE ?
|
78 |
+
$(dc('thead'))
|
79 |
+
.append(headRow)
|
80 |
+
:
|
81 |
+
dc('thead')
|
82 |
+
)
|
83 |
+
);
|
84 |
+
var tbody = $(dc('tbody'));
|
85 |
+
|
86 |
+
var today = (new Date()).zeroTime();
|
87 |
+
|
88 |
+
var month = s.month == undefined ? today.getMonth() : s.month;
|
89 |
+
var year = s.year || today.getFullYear();
|
90 |
+
|
91 |
+
var currentDate = new Date(year, month, 1);
|
92 |
+
|
93 |
+
|
94 |
+
var firstDayOffset = Date.firstDayOfWeek - currentDate.getDay() + 1;
|
95 |
+
if (firstDayOffset > 1) firstDayOffset -= 7;
|
96 |
+
var weeksToDraw = Math.ceil(( (-1*firstDayOffset+1) + currentDate.getDaysInMonth() ) /7);
|
97 |
+
currentDate.addDays(firstDayOffset-1);
|
98 |
+
|
99 |
+
var doHover = function(firstDayInBounds)
|
100 |
+
{
|
101 |
+
return function()
|
102 |
+
{
|
103 |
+
if (s.hoverClass) {
|
104 |
+
var $this = $(this);
|
105 |
+
if (!s.selectWeek) {
|
106 |
+
$this.addClass(s.hoverClass);
|
107 |
+
} else if (firstDayInBounds && !$this.is('.disabled')) {
|
108 |
+
$this.parent().addClass('activeWeekHover');
|
109 |
+
}
|
110 |
+
}
|
111 |
+
}
|
112 |
+
};
|
113 |
+
var unHover = function()
|
114 |
+
{
|
115 |
+
if (s.hoverClass) {
|
116 |
+
var $this = $(this);
|
117 |
+
$this.removeClass(s.hoverClass);
|
118 |
+
$this.parent().removeClass('activeWeekHover');
|
119 |
+
}
|
120 |
+
};
|
121 |
+
|
122 |
+
var w = 0;
|
123 |
+
while (w++<weeksToDraw) {
|
124 |
+
var r = jQuery(dc('tr'));
|
125 |
+
var firstDayInBounds = s.dpController ? currentDate > s.dpController.startDate : false;
|
126 |
+
for (var i=0; i<7; i++) {
|
127 |
+
var thisMonth = currentDate.getMonth() == month;
|
128 |
+
var d = $(dc('td'))
|
129 |
+
.text(currentDate.getDate() + '')
|
130 |
+
.addClass((thisMonth ? 'current-month ' : 'other-month ') +
|
131 |
+
(currentDate.isWeekend() ? 'weekend ' : 'weekday ') +
|
132 |
+
(thisMonth && currentDate.getTime() == today.getTime() ? 'today ' : '')
|
133 |
+
)
|
134 |
+
.data('datePickerDate', currentDate.asString())
|
135 |
+
.hover(doHover(firstDayInBounds), unHover)
|
136 |
+
;
|
137 |
+
r.append(d);
|
138 |
+
if (s.renderCallback) {
|
139 |
+
s.renderCallback(d, currentDate, month, year);
|
140 |
+
}
|
141 |
+
// addDays(1) fails in some locales due to daylight savings. See issue 39.
|
142 |
+
//currentDate.addDays(1);
|
143 |
+
currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()+1);
|
144 |
+
}
|
145 |
+
tbody.append(r);
|
146 |
+
}
|
147 |
+
calendarTable.append(tbody);
|
148 |
+
|
149 |
+
return this.each(
|
150 |
+
function()
|
151 |
+
{
|
152 |
+
$(this).empty().append(calendarTable);
|
153 |
+
}
|
154 |
+
);
|
155 |
+
},
|
156 |
+
/**
|
157 |
+
* Create a datePicker associated with each of the matched elements.
|
158 |
+
*
|
159 |
+
* The matched element will receive a few custom events with the following signatures:
|
160 |
+
*
|
161 |
+
* dateSelected(event, date, $td, status)
|
162 |
+
* Triggered when a date is selected. event is a reference to the event, date is the Date selected, $td is a jquery object wrapped around the TD that was clicked on and status is whether the date was selected (true) or deselected (false)
|
163 |
+
*
|
164 |
+
* dpClosed(event, selected)
|
165 |
+
* Triggered when the date picker is closed. event is a reference to the event and selected is an Array containing Date objects.
|
166 |
+
*
|
167 |
+
* dpMonthChanged(event, displayedMonth, displayedYear)
|
168 |
+
* Triggered when the month of the popped up calendar is changed. event is a reference to the event, displayedMonth is the number of the month now displayed (zero based) and displayedYear is the year of the month.
|
169 |
+
*
|
170 |
+
* dpDisplayed(event, $datePickerDiv)
|
171 |
+
* Triggered when the date picker is created. $datePickerDiv is the div containing the date picker. Use this event to add custom content/ listeners to the popped up date picker.
|
172 |
+
*
|
173 |
+
* @param Object s (optional) Customize your date pickers.
|
174 |
+
* @option Number month The month to render when the date picker is opened (NOTE that months are zero based). Default is today's month.
|
175 |
+
* @option Number year The year to render when the date picker is opened. Default is today's year.
|
176 |
+
* @option String startDate The first date date can be selected.
|
177 |
+
* @option String endDate The last date that can be selected.
|
178 |
+
* @option Boolean inline Whether to create the datePicker as inline (e.g. always on the page) or as a model popup. Default is false (== modal popup)
|
179 |
+
* @option Boolean createButton Whether to create a .dp-choose-date anchor directly after the matched element which when clicked will trigger the showing of the date picker. Default is true.
|
180 |
+
* @option Boolean showYearNavigation Whether to display buttons which allow the user to navigate through the months a year at a time. Default is true.
|
181 |
+
* @option Boolean closeOnSelect Whether to close the date picker when a date is selected. Default is true.
|
182 |
+
* @option Boolean displayClose Whether to create a "Close" button within the date picker popup. Default is false.
|
183 |
+
* @option Boolean selectMultiple Whether a user should be able to select multiple dates with this date picker. Default is false.
|
184 |
+
* @option Number numSelectable The maximum number of dates that can be selected where selectMultiple is true. Default is a very high number.
|
185 |
+
* @option Boolean clickInput If the matched element is an input type="text" and this option is true then clicking on the input will cause the date picker to appear.
|
186 |
+
* @option Boolean rememberViewedMonth Whether the datePicker should remember the last viewed month and open on it. If false then the date picker will always open with the month for the first selected date visible.
|
187 |
+
* @option Boolean selectWeek Whether to select a complete week at a time...
|
188 |
+
* @option Number verticalPosition The vertical alignment of the popped up date picker to the matched element. One of $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM. Default is $.dpConst.POS_TOP.
|
189 |
+
* @option Number horizontalPosition The horizontal alignment of the popped up date picker to the matched element. One of $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT.
|
190 |
+
* @option Number verticalOffset The number of pixels offset from the defined verticalPosition of this date picker that it should pop up in. Default in 0.
|
191 |
+
* @option Number horizontalOffset The number of pixels offset from the defined horizontalPosition of this date picker that it should pop up in. Default in 0.
|
192 |
+
* @option (Function|Array) renderCallback A reference to a function (or an array of seperate functions) that is called as each cell is rendered and which can add classes and event listeners to the created nodes. Each callback function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year. Default is no callback.
|
193 |
+
* @option String hoverClass The class to attach to each cell when you hover over it (to allow you to use hover effects in IE6 which doesn't support the :hover pseudo-class on elements other than links). Default is dp-hover. Pass false if you don't want a hover class.
|
194 |
+
* @type jQuery
|
195 |
+
* @name datePicker
|
196 |
+
* @cat plugins/datePicker
|
197 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
198 |
+
*
|
199 |
+
* @example $('input.date-picker').datePicker();
|
200 |
+
* @desc Creates a date picker button next to all matched input elements. When the button is clicked on the value of the selected date will be placed in the corresponding input (formatted according to Date.format).
|
201 |
+
*
|
202 |
+
* @example demo/index.html
|
203 |
+
* @desc See the projects homepage for many more complex examples...
|
204 |
+
**/
|
205 |
+
datePicker : function(s)
|
206 |
+
{
|
207 |
+
if (!$.event._dpCache) $.event._dpCache = [];
|
208 |
+
|
209 |
+
// initialise the date picker controller with the relevant settings...
|
210 |
+
s = $.extend({}, $.fn.datePicker.defaults, s);
|
211 |
+
|
212 |
+
return this.each(
|
213 |
+
function()
|
214 |
+
{
|
215 |
+
var $this = $(this);
|
216 |
+
var alreadyExists = true;
|
217 |
+
|
218 |
+
if (!this._dpId) {
|
219 |
+
this._dpId = $.event.guid++;
|
220 |
+
$.event._dpCache[this._dpId] = new DatePicker(this);
|
221 |
+
alreadyExists = false;
|
222 |
+
}
|
223 |
+
|
224 |
+
if (s.inline) {
|
225 |
+
s.createButton = false;
|
226 |
+
s.displayClose = false;
|
227 |
+
s.closeOnSelect = false;
|
228 |
+
$this.empty();
|
229 |
+
}
|
230 |
+
|
231 |
+
var controller = $.event._dpCache[this._dpId];
|
232 |
+
|
233 |
+
controller.init(s);
|
234 |
+
|
235 |
+
if (!alreadyExists && s.createButton) {
|
236 |
+
// create it!
|
237 |
+
controller.button = $('<a href="#" class="dp-choose-date" title="' + $.dpText.TEXT_CHOOSE_DATE + '">' + $.dpText.TEXT_CHOOSE_DATE + '</a>')
|
238 |
+
.bind(
|
239 |
+
'click',
|
240 |
+
function()
|
241 |
+
{
|
242 |
+
$this.dpDisplay(this);
|
243 |
+
this.blur();
|
244 |
+
return false;
|
245 |
+
}
|
246 |
+
);
|
247 |
+
$this.after(controller.button);
|
248 |
+
}
|
249 |
+
|
250 |
+
if (!alreadyExists && $this.is(':text')) {
|
251 |
+
$this
|
252 |
+
.bind(
|
253 |
+
'dateSelected',
|
254 |
+
function(e, selectedDate, $td)
|
255 |
+
{
|
256 |
+
this.value = selectedDate.asString();
|
257 |
+
}
|
258 |
+
).bind(
|
259 |
+
'change',
|
260 |
+
function()
|
261 |
+
{
|
262 |
+
if (this.value == '') {
|
263 |
+
controller.clearSelected();
|
264 |
+
} else {
|
265 |
+
var d = Date.fromString(this.value);
|
266 |
+
if (d) {
|
267 |
+
controller.setSelected(d, true, true);
|
268 |
+
}
|
269 |
+
}
|
270 |
+
}
|
271 |
+
);
|
272 |
+
if (s.clickInput) {
|
273 |
+
$this.bind(
|
274 |
+
'click',
|
275 |
+
function()
|
276 |
+
{
|
277 |
+
// The change event doesn't happen until the input loses focus so we need to manually trigger it...
|
278 |
+
$this.trigger('change');
|
279 |
+
$this.dpDisplay();
|
280 |
+
}
|
281 |
+
);
|
282 |
+
}
|
283 |
+
var d = Date.fromString(this.value);
|
284 |
+
if (this.value != '' && d) {
|
285 |
+
controller.setSelected(d, true, true);
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
$this.addClass('dp-applied');
|
290 |
+
|
291 |
+
}
|
292 |
+
)
|
293 |
+
},
|
294 |
+
/**
|
295 |
+
* Disables or enables this date picker
|
296 |
+
*
|
297 |
+
* @param Boolean s Whether to disable (true) or enable (false) this datePicker
|
298 |
+
* @type jQuery
|
299 |
+
* @name dpSetDisabled
|
300 |
+
* @cat plugins/datePicker
|
301 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
302 |
+
*
|
303 |
+
* @example $('.date-picker').datePicker();
|
304 |
+
* $('.date-picker').dpSetDisabled(true);
|
305 |
+
* @desc Prevents this date picker from displaying and adds a class of dp-disabled to it (and it's associated button if it has one) for styling purposes. If the matched element is an input field then it will also set the disabled attribute to stop people directly editing the field.
|
306 |
+
**/
|
307 |
+
dpSetDisabled : function(s)
|
308 |
+
{
|
309 |
+
return _w.call(this, 'setDisabled', s);
|
310 |
+
},
|
311 |
+
/**
|
312 |
+
* Updates the first selectable date for any date pickers on any matched elements.
|
313 |
+
*
|
314 |
+
* @param String d A string representing the first selectable date (formatted according to Date.format).
|
315 |
+
* @type jQuery
|
316 |
+
* @name dpSetStartDate
|
317 |
+
* @cat plugins/datePicker
|
318 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
319 |
+
*
|
320 |
+
* @example $('.date-picker').datePicker();
|
321 |
+
* $('.date-picker').dpSetStartDate('01/01/2000');
|
322 |
+
* @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the first selectable date for each of these to the first day of the millenium.
|
323 |
+
**/
|
324 |
+
dpSetStartDate : function(d)
|
325 |
+
{
|
326 |
+
return _w.call(this, 'setStartDate', d);
|
327 |
+
},
|
328 |
+
/**
|
329 |
+
* Updates the last selectable date for any date pickers on any matched elements.
|
330 |
+
*
|
331 |
+
* @param String d A string representing the last selectable date (formatted according to Date.format).
|
332 |
+
* @type jQuery
|
333 |
+
* @name dpSetEndDate
|
334 |
+
* @cat plugins/datePicker
|
335 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
336 |
+
*
|
337 |
+
* @example $('.date-picker').datePicker();
|
338 |
+
* $('.date-picker').dpSetEndDate('01/01/2010');
|
339 |
+
* @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the last selectable date for each of these to the first Janurary 2010.
|
340 |
+
**/
|
341 |
+
dpSetEndDate : function(d)
|
342 |
+
{
|
343 |
+
return _w.call(this, 'setEndDate', d);
|
344 |
+
},
|
345 |
+
/**
|
346 |
+
* Gets a list of Dates currently selected by this datePicker. This will be an empty array if no dates are currently selected or NULL if there is no datePicker associated with the matched element.
|
347 |
+
*
|
348 |
+
* @type Array
|
349 |
+
* @name dpGetSelected
|
350 |
+
* @cat plugins/datePicker
|
351 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
352 |
+
*
|
353 |
+
* @example $('.date-picker').datePicker();
|
354 |
+
* alert($('.date-picker').dpGetSelected());
|
355 |
+
* @desc Will alert an empty array (as nothing is selected yet)
|
356 |
+
**/
|
357 |
+
dpGetSelected : function()
|
358 |
+
{
|
359 |
+
var c = _getController(this[0]);
|
360 |
+
if (c) {
|
361 |
+
return c.getSelected();
|
362 |
+
}
|
363 |
+
return null;
|
364 |
+
},
|
365 |
+
/**
|
366 |
+
* Selects or deselects a date on any matched element's date pickers. Deselcting is only useful on date pickers where selectMultiple==true. Selecting will only work if the passed date is within the startDate and endDate boundries for a given date picker.
|
367 |
+
*
|
368 |
+
* @param String d A string representing the date you want to select (formatted according to Date.format).
|
369 |
+
* @param Boolean v Whether you want to select (true) or deselect (false) this date. Optional - default = true.
|
370 |
+
* @param Boolean m Whether you want the date picker to open up on the month of this date when it is next opened. Optional - default = true.
|
371 |
+
* @param Boolean e Whether you want the date picker to dispatch events related to this change of selection. Optional - default = true.
|
372 |
+
* @type jQuery
|
373 |
+
* @name dpSetSelected
|
374 |
+
* @cat plugins/datePicker
|
375 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
376 |
+
*
|
377 |
+
* @example $('.date-picker').datePicker();
|
378 |
+
* $('.date-picker').dpSetSelected('01/01/2010');
|
379 |
+
* @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010.
|
380 |
+
**/
|
381 |
+
dpSetSelected : function(d, v, m, e)
|
382 |
+
{
|
383 |
+
if (v == undefined) v=true;
|
384 |
+
if (m == undefined) m=true;
|
385 |
+
if (e == undefined) e=true;
|
386 |
+
return _w.call(this, 'setSelected', Date.fromString(d), v, m, e);
|
387 |
+
},
|
388 |
+
/**
|
389 |
+
* Sets the month that will be displayed when the date picker is next opened. If the passed month is before startDate then the month containing startDate will be displayed instead. If the passed month is after endDate then the month containing the endDate will be displayed instead.
|
390 |
+
*
|
391 |
+
* @param Number m The month you want the date picker to display. Optional - defaults to the currently displayed month.
|
392 |
+
* @param Number y The year you want the date picker to display. Optional - defaults to the currently displayed year.
|
393 |
+
* @type jQuery
|
394 |
+
* @name dpSetDisplayedMonth
|
395 |
+
* @cat plugins/datePicker
|
396 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
397 |
+
*
|
398 |
+
* @example $('.date-picker').datePicker();
|
399 |
+
* $('.date-picker').dpSetDisplayedMonth(10, 2008);
|
400 |
+
* @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010.
|
401 |
+
**/
|
402 |
+
dpSetDisplayedMonth : function(m, y)
|
403 |
+
{
|
404 |
+
return _w.call(this, 'setDisplayedMonth', Number(m), Number(y), true);
|
405 |
+
},
|
406 |
+
/**
|
407 |
+
* Displays the date picker associated with the matched elements. Since only one date picker can be displayed at once then the date picker associated with the last matched element will be the one that is displayed.
|
408 |
+
*
|
409 |
+
* @param HTMLElement e An element that you want the date picker to pop up relative in position to. Optional - default behaviour is to pop up next to the element associated with this date picker.
|
410 |
+
* @type jQuery
|
411 |
+
* @name dpDisplay
|
412 |
+
* @cat plugins/datePicker
|
413 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
414 |
+
*
|
415 |
+
* @example $('#date-picker').datePicker();
|
416 |
+
* $('#date-picker').dpDisplay();
|
417 |
+
* @desc Creates a date picker associated with the element with an id of date-picker and then causes it to pop up.
|
418 |
+
**/
|
419 |
+
dpDisplay : function(e)
|
420 |
+
{
|
421 |
+
return _w.call(this, 'display', e);
|
422 |
+
},
|
423 |
+
/**
|
424 |
+
* Sets a function or array of functions that is called when each TD of the date picker popup is rendered to the page
|
425 |
+
*
|
426 |
+
* @param (Function|Array) a A function or an array of functions that are called when each td is rendered. Each function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year.
|
427 |
+
* @type jQuery
|
428 |
+
* @name dpSetRenderCallback
|
429 |
+
* @cat plugins/datePicker
|
430 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
431 |
+
*
|
432 |
+
* @example $('#date-picker').datePicker();
|
433 |
+
* $('#date-picker').dpSetRenderCallback(function($td, thisDate, month, year)
|
434 |
+
* {
|
435 |
+
* // do stuff as each td is rendered dependant on the date in the td and the displayed month and year
|
436 |
+
* });
|
437 |
+
* @desc Creates a date picker associated with the element with an id of date-picker and then creates a function which is called as each td is rendered when this date picker is displayed.
|
438 |
+
**/
|
439 |
+
dpSetRenderCallback : function(a)
|
440 |
+
{
|
441 |
+
return _w.call(this, 'setRenderCallback', a);
|
442 |
+
},
|
443 |
+
/**
|
444 |
+
* Sets the position that the datePicker will pop up (relative to it's associated element)
|
445 |
+
*
|
446 |
+
* @param Number v The vertical alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM
|
447 |
+
* @param Number h The horizontal alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT
|
448 |
+
* @type jQuery
|
449 |
+
* @name dpSetPosition
|
450 |
+
* @cat plugins/datePicker
|
451 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
452 |
+
*
|
453 |
+
* @example $('#date-picker').datePicker();
|
454 |
+
* $('#date-picker').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_RIGHT);
|
455 |
+
* @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be bottom and right aligned to the #date-picker element.
|
456 |
+
**/
|
457 |
+
dpSetPosition : function(v, h)
|
458 |
+
{
|
459 |
+
return _w.call(this, 'setPosition', v, h);
|
460 |
+
},
|
461 |
+
/**
|
462 |
+
* Sets the offset that the popped up date picker will have from it's default position relative to it's associated element (as set by dpSetPosition)
|
463 |
+
*
|
464 |
+
* @param Number v The vertical offset of the created date picker.
|
465 |
+
* @param Number h The horizontal offset of the created date picker.
|
466 |
+
* @type jQuery
|
467 |
+
* @name dpSetOffset
|
468 |
+
* @cat plugins/datePicker
|
469 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
470 |
+
*
|
471 |
+
* @example $('#date-picker').datePicker();
|
472 |
+
* $('#date-picker').dpSetOffset(-20, 200);
|
473 |
+
* @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be 20 pixels above and 200 pixels to the right of it's default position.
|
474 |
+
**/
|
475 |
+
dpSetOffset : function(v, h)
|
476 |
+
{
|
477 |
+
return _w.call(this, 'setOffset', v, h);
|
478 |
+
},
|
479 |
+
/**
|
480 |
+
* Closes the open date picker associated with this element.
|
481 |
+
*
|
482 |
+
* @type jQuery
|
483 |
+
* @name dpClose
|
484 |
+
* @cat plugins/datePicker
|
485 |
+
* @author Kelvin Luck (http://www.kelvinluck.com/)
|
486 |
+
*
|
487 |
+
* @example $('.date-pick')
|
488 |
+
* .datePicker()
|
489 |
+
* .bind(
|
490 |
+
* 'focus',
|
491 |
+
* function()
|
492 |
+
* {
|
493 |
+
* $(this).dpDisplay();
|
494 |
+
* }
|
495 |
+
* ).bind(
|
496 |
+
* 'blur',
|
497 |
+
* function()
|
498 |
+
* {
|
499 |
+
* $(this).dpClose();
|
500 |
+
* }
|
501 |
+
* );
|
502 |
+
* @desc Creates a date picker and makes it appear when the relevant element is focused and disappear when it is blurred.
|
503 |
+
**/
|
504 |
+
dpClose : function()
|
505 |
+
{
|
506 |
+
return _w.call(this, '_closeCalendar', false, this[0]);
|
507 |
+
},
|
508 |
+
// private function called on unload to clean up any expandos etc and prevent memory links...
|
509 |
+
_dpDestroy : function()
|
510 |
+
{
|
511 |
+
// TODO - implement this?
|
512 |
+
}
|
513 |
+
});
|
514 |
+
|
515 |
+
// private internal function to cut down on the amount of code needed where we forward
|
516 |
+
// dp* methods on the jQuery object on to the relevant DatePicker controllers...
|
517 |
+
var _w = function(f, a1, a2, a3, a4)
|
518 |
+
{
|
519 |
+
return this.each(
|
520 |
+
function()
|
521 |
+
{
|
522 |
+
var c = _getController(this);
|
523 |
+
if (c) {
|
524 |
+
c[f](a1, a2, a3, a4);
|
525 |
+
}
|
526 |
+
}
|
527 |
+
);
|
528 |
+
};
|
529 |
+
|
530 |
+
function DatePicker(ele)
|
531 |
+
{
|
532 |
+
this.ele = ele;
|
533 |
+
|
534 |
+
// initial values...
|
535 |
+
this.displayedMonth = null;
|
536 |
+
this.displayedYear = null;
|
537 |
+
this.startDate = null;
|
538 |
+
this.endDate = null;
|
539 |
+
this.showYearNavigation = null;
|
540 |
+
this.closeOnSelect = null;
|
541 |
+
this.displayClose = null;
|
542 |
+
this.rememberViewedMonth= null;
|
543 |
+
this.selectMultiple = null;
|
544 |
+
this.numSelectable = null;
|
545 |
+
this.numSelected = null;
|
546 |
+
this.verticalPosition = null;
|
547 |
+
this.horizontalPosition = null;
|
548 |
+
this.verticalOffset = null;
|
549 |
+
this.horizontalOffset = null;
|
550 |
+
this.button = null;
|
551 |
+
this.renderCallback = [];
|
552 |
+
this.selectedDates = {};
|
553 |
+
this.inline = null;
|
554 |
+
this.context = '#dp-popup';
|
555 |
+
this.settings = {};
|
556 |
+
};
|
557 |
+
$.extend(
|
558 |
+
DatePicker.prototype,
|
559 |
+
{
|
560 |
+
init : function(s)
|
561 |
+
{
|
562 |
+
this.setStartDate(s.startDate);
|
563 |
+
this.setEndDate(s.endDate);
|
564 |
+
this.setDisplayedMonth(Number(s.month), Number(s.year));
|
565 |
+
this.setRenderCallback(s.renderCallback);
|
566 |
+
this.showYearNavigation = s.showYearNavigation;
|
567 |
+
this.closeOnSelect = s.closeOnSelect;
|
568 |
+
this.displayClose = s.displayClose;
|
569 |
+
this.rememberViewedMonth = s.rememberViewedMonth;
|
570 |
+
this.selectMultiple = s.selectMultiple;
|
571 |
+
this.numSelectable = s.selectMultiple ? s.numSelectable : 1;
|
572 |
+
this.numSelected = 0;
|
573 |
+
this.verticalPosition = s.verticalPosition;
|
574 |
+
this.horizontalPosition = s.horizontalPosition;
|
575 |
+
this.hoverClass = s.hoverClass;
|
576 |
+
this.setOffset(s.verticalOffset, s.horizontalOffset);
|
577 |
+
this.inline = s.inline;
|
578 |
+
this.settings = s;
|
579 |
+
if (this.inline) {
|
580 |
+
this.context = this.ele;
|
581 |
+
this.display();
|
582 |
+
}
|
583 |
+
},
|
584 |
+
setStartDate : function(d)
|
585 |
+
{
|
586 |
+
if (d) {
|
587 |
+
this.startDate = Date.fromString(d);
|
588 |
+
}
|
589 |
+
if (!this.startDate) {
|
590 |
+
this.startDate = (new Date()).zeroTime();
|
591 |
+
}
|
592 |
+
this.setDisplayedMonth(this.displayedMonth, this.displayedYear);
|
593 |
+
},
|
594 |
+
setEndDate : function(d)
|
595 |
+
{
|
596 |
+
if (d) {
|
597 |
+
this.endDate = Date.fromString(d);
|
598 |
+
}
|
599 |
+
if (!this.endDate) {
|
600 |
+
this.endDate = (new Date('12/31/2999')); // using the JS Date.parse function which expects mm/dd/yyyy
|
601 |
+
}
|
602 |
+
if (this.endDate.getTime() < this.startDate.getTime()) {
|
603 |
+
this.endDate = this.startDate;
|
604 |
+
}
|
605 |
+
this.setDisplayedMonth(this.displayedMonth, this.displayedYear);
|
606 |
+
},
|
607 |
+
setPosition : function(v, h)
|
608 |
+
{
|
609 |
+
this.verticalPosition = v;
|
610 |
+
this.horizontalPosition = h;
|
611 |
+
},
|
612 |
+
setOffset : function(v, h)
|
613 |
+
{
|
614 |
+
this.verticalOffset = parseInt(v) || 0;
|
615 |
+
this.horizontalOffset = parseInt(h) || 0;
|
616 |
+
},
|
617 |
+
setDisabled : function(s)
|
618 |
+
{
|
619 |
+
$e = $(this.ele);
|
620 |
+
$e[s ? 'addClass' : 'removeClass']('dp-disabled');
|
621 |
+
if (this.button) {
|
622 |
+
$but = $(this.button);
|
623 |
+
$but[s ? 'addClass' : 'removeClass']('dp-disabled');
|
624 |
+
$but.attr('title', s ? '' : $.dpText.TEXT_CHOOSE_DATE);
|
625 |
+
}
|
626 |
+
if ($e.is(':text')) {
|
627 |
+
$e.attr('disabled', s ? 'disabled' : '');
|
628 |
+
}
|
629 |
+
},
|
630 |
+
setDisplayedMonth : function(m, y, rerender)
|
631 |
+
{
|
632 |
+
if (this.startDate == undefined || this.endDate == undefined) {
|
633 |
+
return;
|
634 |
+
}
|
635 |
+
var s = new Date(this.startDate.getTime());
|
636 |
+
s.setDate(1);
|
637 |
+
var e = new Date(this.endDate.getTime());
|
638 |
+
e.setDate(1);
|
639 |
+
|
640 |
+
var t;
|
641 |
+
if ((!m && !y) || (isNaN(m) && isNaN(y))) {
|
642 |
+
// no month or year passed - default to current month
|
643 |
+
t = new Date().zeroTime();
|
644 |
+
t.setDate(1);
|
645 |
+
} else if (isNaN(m)) {
|
646 |
+
// just year passed in - presume we want the displayedMonth
|
647 |
+
t = new Date(y, this.displayedMonth, 1);
|
648 |
+
} else if (isNaN(y)) {
|
649 |
+
// just month passed in - presume we want the displayedYear
|
650 |
+
t = new Date(this.displayedYear, m, 1);
|
651 |
+
} else {
|
652 |
+
// year and month passed in - that's the date we want!
|
653 |
+
t = new Date(y, m, 1)
|
654 |
+
}
|
655 |
+
// check if the desired date is within the range of our defined startDate and endDate
|
656 |
+
if (t.getTime() < s.getTime()) {
|
657 |
+
t = s;
|
658 |
+
} else if (t.getTime() > e.getTime()) {
|
659 |
+
t = e;
|
660 |
+
}
|
661 |
+
var oldMonth = this.displayedMonth;
|
662 |
+
var oldYear = this.displayedYear;
|
663 |
+
this.displayedMonth = t.getMonth();
|
664 |
+
this.displayedYear = t.getFullYear();
|
665 |
+
|
666 |
+
if (rerender && (this.displayedMonth != oldMonth || this.displayedYear != oldYear))
|
667 |
+
{
|
668 |
+
this._rerenderCalendar();
|
669 |
+
$(this.ele).trigger('dpMonthChanged', [this.displayedMonth, this.displayedYear]);
|
670 |
+
}
|
671 |
+
},
|
672 |
+
setSelected : function(d, v, moveToMonth, dispatchEvents)
|
673 |
+
{
|
674 |
+
if (d < this.startDate || d > this.endDate) {
|
675 |
+
// Don't allow people to select dates outside range...
|
676 |
+
return;
|
677 |
+
}
|
678 |
+
var s = this.settings;
|
679 |
+
if (s.selectWeek)
|
680 |
+
{
|
681 |
+
d = d.addDays(- (d.getDay() - Date.firstDayOfWeek + 7) % 7);
|
682 |
+
if (d < this.startDate) // The first day of this week is before the start date so is unselectable...
|
683 |
+
{
|
684 |
+
return;
|
685 |
+
}
|
686 |
+
}
|
687 |
+
if (v == this.isSelected(d)) // this date is already un/selected
|
688 |
+
{
|
689 |
+
return;
|
690 |
+
}
|
691 |
+
if (this.selectMultiple == false) {
|
692 |
+
this.clearSelected();
|
693 |
+
} else if (v && this.numSelected == this.numSelectable) {
|
694 |
+
// can't select any more dates...
|
695 |
+
return;
|
696 |
+
}
|
697 |
+
if (moveToMonth && (this.displayedMonth != d.getMonth() || this.displayedYear != d.getFullYear())) {
|
698 |
+
this.setDisplayedMonth(d.getMonth(), d.getFullYear(), true);
|
699 |
+
}
|
700 |
+
this.selectedDates[d.toString()] = v;
|
701 |
+
this.numSelected += v ? 1 : -1;
|
702 |
+
var selectorString = 'td.' +( d.getMonth() == this.displayedMonth ? 'current-month' : 'other-month');
|
703 |
+
var $td;
|
704 |
+
$(selectorString, this.context).each(
|
705 |
+
function()
|
706 |
+
{
|
707 |
+
if ($(this).data('datePickerDate') == d.asString()) {
|
708 |
+
$td = $(this);
|
709 |
+
if (s.selectWeek)
|
710 |
+
{
|
711 |
+
$td.parent()[v ? 'addClass' : 'removeClass']('selectedWeek');
|
712 |
+
}
|
713 |
+
$td[v ? 'addClass' : 'removeClass']('selected');
|
714 |
+
}
|
715 |
+
}
|
716 |
+
);
|
717 |
+
$('td', this.context).not('.selected')[this.selectMultiple && this.numSelected == this.numSelectable ? 'addClass' : 'removeClass']('unselectable');
|
718 |
+
|
719 |
+
if (dispatchEvents)
|
720 |
+
{
|
721 |
+
var s = this.isSelected(d);
|
722 |
+
$e = $(this.ele);
|
723 |
+
var dClone = Date.fromString(d.asString());
|
724 |
+
$e.trigger('dateSelected', [dClone, $td, s]);
|
725 |
+
$e.trigger('change');
|
726 |
+
}
|
727 |
+
},
|
728 |
+
isSelected : function(d)
|
729 |
+
{
|
730 |
+
return this.selectedDates[d.toString()];
|
731 |
+
},
|
732 |
+
getSelected : function()
|
733 |
+
{
|
734 |
+
var r = [];
|
735 |
+
for(s in this.selectedDates) {
|
736 |
+
if (this.selectedDates[s] == true) {
|
737 |
+
r.push(Date.parse(s));
|
738 |
+
}
|
739 |
+
}
|
740 |
+
return r;
|
741 |
+
},
|
742 |
+
clearSelected : function()
|
743 |
+
{
|
744 |
+
this.selectedDates = {};
|
745 |
+
this.numSelected = 0;
|
746 |
+
$('td.selected', this.context).removeClass('selected').parent().removeClass('selectedWeek');
|
747 |
+
},
|
748 |
+
display : function(eleAlignTo)
|
749 |
+
{
|
750 |
+
if ($(this.ele).is('.dp-disabled')) return;
|
751 |
+
|
752 |
+
eleAlignTo = eleAlignTo || this.ele;
|
753 |
+
var c = this;
|
754 |
+
var $ele = $(eleAlignTo);
|
755 |
+
var eleOffset = $ele.offset();
|
756 |
+
|
757 |
+
var $createIn;
|
758 |
+
var attrs;
|
759 |
+
var attrsCalendarHolder;
|
760 |
+
var cssRules;
|
761 |
+
|
762 |
+
if (c.inline) {
|
763 |
+
$createIn = $(this.ele);
|
764 |
+
attrs = {
|
765 |
+
'id' : 'calendar-' + this.ele._dpId,
|
766 |
+
'class' : 'dp-popup dp-popup-inline'
|
767 |
+
};
|
768 |
+
|
769 |
+
$('.dp-popup', $createIn).remove();
|
770 |
+
cssRules = {
|
771 |
+
};
|
772 |
+
} else {
|
773 |
+
$createIn = $('body');
|
774 |
+
attrs = {
|
775 |
+
'id' : 'dp-popup',
|
776 |
+
'class' : 'dp-popup'
|
777 |
+
};
|
778 |
+
cssRules = {
|
779 |
+
'top' : eleOffset.top + c.verticalOffset,
|
780 |
+
'left' : eleOffset.left + c.horizontalOffset
|
781 |
+
};
|
782 |
+
|
783 |
+
var _checkMouse = function(e)
|
784 |
+
{
|
785 |
+
var el = e.target;
|
786 |
+
var cal = $('#dp-popup')[0];
|
787 |
+
|
788 |
+
while (true){
|
789 |
+
if (el == cal) {
|
790 |
+
return true;
|
791 |
+
} else if (el == document) {
|
792 |
+
c._closeCalendar();
|
793 |
+
return false;
|
794 |
+
} else {
|
795 |
+
el = $(el).parent()[0];
|
796 |
+
}
|
797 |
+
}
|
798 |
+
};
|
799 |
+
this._checkMouse = _checkMouse;
|
800 |
+
|
801 |
+
c._closeCalendar(true);
|
802 |
+
$(document).bind(
|
803 |
+
'keydown.datepicker',
|
804 |
+
function(event)
|
805 |
+
{
|
806 |
+
if (event.keyCode == 27) {
|
807 |
+
c._closeCalendar();
|
808 |
+
}
|
809 |
+
}
|
810 |
+
);
|
811 |
+
}
|
812 |
+
|
813 |
+
if (!c.rememberViewedMonth)
|
814 |
+
{
|
815 |
+
var selectedDate = this.getSelected()[0];
|
816 |
+
if (selectedDate) {
|
817 |
+
selectedDate = new Date(selectedDate);
|
818 |
+
this.setDisplayedMonth(selectedDate.getMonth(), selectedDate.getFullYear(), false);
|
819 |
+
}
|
820 |
+
}
|
821 |
+
|
822 |
+
$createIn
|
823 |
+
.append(
|
824 |
+
$('<div></div>')
|
825 |
+
.attr(attrs)
|
826 |
+
.css(cssRules)
|
827 |
+
.append(
|
828 |
+
// $('<a href="#" class="selecteee">aaa</a>'),
|
829 |
+
$('<h2></h2>'),
|
830 |
+
$('<div class="dp-nav-prev"></div>')
|
831 |
+
.append(
|
832 |
+
$('<a class="dp-nav-prev-year" href="#" title="' + $.dpText.TEXT_PREV_YEAR + '"><<</a>')
|
833 |
+
.bind(
|
834 |
+
'click',
|
835 |
+
function()
|
836 |
+
{
|
837 |
+
return c._displayNewMonth.call(c, this, 0, -1);
|
838 |
+
}
|
839 |
+
),
|
840 |
+
$('<a class="dp-nav-prev-month" href="#" title="' + $.dpText.TEXT_PREV_MONTH + '"><</a>')
|
841 |
+
.bind(
|
842 |
+
'click',
|
843 |
+
function()
|
844 |
+
{
|
845 |
+
return c._displayNewMonth.call(c, this, -1, 0);
|
846 |
+
}
|
847 |
+
)
|
848 |
+
),
|
849 |
+
$('<div class="dp-nav-next"></div>')
|
850 |
+
.append(
|
851 |
+
$('<a class="dp-nav-next-year" href="#" title="' + $.dpText.TEXT_NEXT_YEAR + '">>></a>')
|
852 |
+
.bind(
|
853 |
+
'click',
|
854 |
+
function()
|
855 |
+
{
|
856 |
+
return c._displayNewMonth.call(c, this, 0, 1);
|
857 |
+
}
|
858 |
+
),
|
859 |
+
$('<a class="dp-nav-next-month" href="#" title="' + $.dpText.TEXT_NEXT_MONTH + '">></a>')
|
860 |
+
.bind(
|
861 |
+
'click',
|
862 |
+
function()
|
863 |
+
{
|
864 |
+
return c._displayNewMonth.call(c, this, 1, 0);
|
865 |
+
}
|
866 |
+
)
|
867 |
+
),
|
868 |
+
$('<div class="dp-calendar"></div>')
|
869 |
+
)
|
870 |
+
.bgIframe()
|
871 |
+
);
|
872 |
+
|
873 |
+
var $pop = this.inline ? $('.dp-popup', this.context) : $('#dp-popup');
|
874 |
+
|
875 |
+
if (this.showYearNavigation == false) {
|
876 |
+
$('.dp-nav-prev-year, .dp-nav-next-year', c.context).css('display', 'none');
|
877 |
+
}
|
878 |
+
if (this.displayClose) {
|
879 |
+
$pop.append(
|
880 |
+
$('<a href="#" id="dp-close">' + $.dpText.TEXT_CLOSE + '</a>')
|
881 |
+
.bind(
|
882 |
+
'click',
|
883 |
+
function()
|
884 |
+
{
|
885 |
+
c._closeCalendar();
|
886 |
+
return false;
|
887 |
+
}
|
888 |
+
)
|
889 |
+
);
|
890 |
+
}
|
891 |
+
c._renderCalendar();
|
892 |
+
|
893 |
+
$(this.ele).trigger('dpDisplayed', $pop);
|
894 |
+
|
895 |
+
if (!c.inline) {
|
896 |
+
if (this.verticalPosition == $.dpConst.POS_BOTTOM) {
|
897 |
+
$pop.css('top', eleOffset.top + $ele.height() - $pop.height() + c.verticalOffset);
|
898 |
+
}
|
899 |
+
if (this.horizontalPosition == $.dpConst.POS_RIGHT) {
|
900 |
+
$pop.css('left', eleOffset.left + $ele.width() - $pop.width() + c.horizontalOffset);
|
901 |
+
}
|
902 |
+
// $('.selectee', this.context).focus();
|
903 |
+
$(document).bind('mousedown.datepicker', this._checkMouse);
|
904 |
+
}
|
905 |
+
|
906 |
+
},
|
907 |
+
setRenderCallback : function(a)
|
908 |
+
{
|
909 |
+
if (a == null) return;
|
910 |
+
if (a && typeof(a) == 'function') {
|
911 |
+
a = [a];
|
912 |
+
}
|
913 |
+
this.renderCallback = this.renderCallback.concat(a);
|
914 |
+
},
|
915 |
+
cellRender : function ($td, thisDate, month, year) {
|
916 |
+
var c = this.dpController;
|
917 |
+
var d = new Date(thisDate.getTime());
|
918 |
+
|
919 |
+
// add our click handlers to deal with it when the days are clicked...
|
920 |
+
|
921 |
+
$td.bind(
|
922 |
+
'click',
|
923 |
+
function()
|
924 |
+
{
|
925 |
+
var $this = $(this);
|
926 |
+
if (!$this.is('.disabled')) {
|
927 |
+
c.setSelected(d, !$this.is('.selected') || !c.selectMultiple, false, true);
|
928 |
+
if (c.closeOnSelect) {
|
929 |
+
c._closeCalendar();
|
930 |
+
}
|
931 |
+
// TODO: Instead of this which doesn't work in IE anyway we should find the next focusable element in the document
|
932 |
+
// and pass the focus onto that. That would allow the user to continue on the form as expected...
|
933 |
+
if (!$.browser.msie)
|
934 |
+
{
|
935 |
+
$(c.ele).trigger('focus', [$.dpConst.DP_INTERNAL_FOCUS]);
|
936 |
+
}
|
937 |
+
}
|
938 |
+
}
|
939 |
+
);
|
940 |
+
|
941 |
+
if (c.isSelected(d)) {
|
942 |
+
$td.addClass('selected');
|
943 |
+
if (c.settings.selectWeek)
|
944 |
+
{
|
945 |
+
$td.parent().addClass('selectedWeek');
|
946 |
+
}
|
947 |
+
} else if (c.selectMultiple && c.numSelected == c.numSelectable) {
|
948 |
+
$td.addClass('unselectable');
|
949 |
+
}
|
950 |
+
|
951 |
+
},
|
952 |
+
_applyRenderCallbacks : function()
|
953 |
+
{
|
954 |
+
var c = this;
|
955 |
+
$('td', this.context).each(
|
956 |
+
function()
|
957 |
+
{
|
958 |
+
for (var i=0; i<c.renderCallback.length; i++) {
|
959 |
+
$td = $(this);
|
960 |
+
c.renderCallback[i].apply(this, [$td, Date.fromString($td.data('datePickerDate')), c.displayedMonth, c.displayedYear]);
|
961 |
+
}
|
962 |
+
}
|
963 |
+
);
|
964 |
+
return;
|
965 |
+
},
|
966 |
+
// ele is the clicked button - only proceed if it doesn't have the class disabled...
|
967 |
+
// m and y are -1, 0 or 1 depending which direction we want to go in...
|
968 |
+
_displayNewMonth : function(ele, m, y)
|
969 |
+
{
|
970 |
+
if (!$(ele).is('.disabled')) {
|
971 |
+
this.setDisplayedMonth(this.displayedMonth + m, this.displayedYear + y, true);
|
972 |
+
}
|
973 |
+
ele.blur();
|
974 |
+
return false;
|
975 |
+
},
|
976 |
+
_rerenderCalendar : function()
|
977 |
+
{
|
978 |
+
this._clearCalendar();
|
979 |
+
this._renderCalendar();
|
980 |
+
},
|
981 |
+
_renderCalendar : function()
|
982 |
+
{
|
983 |
+
// set the title...
|
984 |
+
$('h2', this.context).html((new Date(this.displayedYear, this.displayedMonth, 1)).asString($.dpText.HEADER_FORMAT));
|
985 |
+
|
986 |
+
// render the calendar...
|
987 |
+
$('.dp-calendar', this.context).renderCalendar(
|
988 |
+
$.extend(
|
989 |
+
{},
|
990 |
+
this.settings,
|
991 |
+
{
|
992 |
+
month : this.displayedMonth,
|
993 |
+
year : this.displayedYear,
|
994 |
+
renderCallback : this.cellRender,
|
995 |
+
dpController : this,
|
996 |
+
hoverClass : this.hoverClass
|
997 |
+
})
|
998 |
+
);
|
999 |
+
|
1000 |
+
// update the status of the control buttons and disable dates before startDate or after endDate...
|
1001 |
+
// TODO: When should the year buttons be disabled? When you can't go forward a whole year from where you are or is that annoying?
|
1002 |
+
if (this.displayedYear == this.startDate.getFullYear() && this.displayedMonth == this.startDate.getMonth()) {
|
1003 |
+
$('.dp-nav-prev-year', this.context).addClass('disabled');
|
1004 |
+
$('.dp-nav-prev-month', this.context).addClass('disabled');
|
1005 |
+
$('.dp-calendar td.other-month', this.context).each(
|
1006 |
+
function()
|
1007 |
+
{
|
1008 |
+
var $this = $(this);
|
1009 |
+
if (Number($this.text()) > 20) {
|
1010 |
+
$this.addClass('disabled');
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
);
|
1014 |
+
var d = this.startDate.getDate();
|
1015 |
+
$('.dp-calendar td.current-month', this.context).each(
|
1016 |
+
function()
|
1017 |
+
{
|
1018 |
+
var $this = $(this);
|
1019 |
+
if (Number($this.text()) < d) {
|
1020 |
+
$this.addClass('disabled');
|
1021 |
+
}
|
1022 |
+
}
|
1023 |
+
);
|
1024 |
+
} else {
|
1025 |
+
$('.dp-nav-prev-year', this.context).removeClass('disabled');
|
1026 |
+
$('.dp-nav-prev-month', this.context).removeClass('disabled');
|
1027 |
+
var d = this.startDate.getDate();
|
1028 |
+
if (d > 20) {
|
1029 |
+
// check if the startDate is last month as we might need to add some disabled classes...
|
1030 |
+
var st = this.startDate.getTime();
|
1031 |
+
var sd = new Date(st);
|
1032 |
+
sd.addMonths(1);
|
1033 |
+
if (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) {
|
1034 |
+
$('.dp-calendar td.other-month', this.context).each(
|
1035 |
+
function()
|
1036 |
+
{
|
1037 |
+
var $this = $(this);
|
1038 |
+
if (Date.fromString($this.data('datePickerDate')).getTime() < st) {
|
1039 |
+
$this.addClass('disabled');
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
);
|
1043 |
+
}
|
1044 |
+
}
|
1045 |
+
}
|
1046 |
+
if (this.displayedYear == this.endDate.getFullYear() && this.displayedMonth == this.endDate.getMonth()) {
|
1047 |
+
$('.dp-nav-next-year', this.context).addClass('disabled');
|
1048 |
+
$('.dp-nav-next-month', this.context).addClass('disabled');
|
1049 |
+
$('.dp-calendar td.other-month', this.context).each(
|
1050 |
+
function()
|
1051 |
+
{
|
1052 |
+
var $this = $(this);
|
1053 |
+
if (Number($this.text()) < 14) {
|
1054 |
+
$this.addClass('disabled');
|
1055 |
+
}
|
1056 |
+
}
|
1057 |
+
);
|
1058 |
+
var d = this.endDate.getDate();
|
1059 |
+
$('.dp-calendar td.current-month', this.context).each(
|
1060 |
+
function()
|
1061 |
+
{
|
1062 |
+
var $this = $(this);
|
1063 |
+
if (Number($this.text()) > d) {
|
1064 |
+
$this.addClass('disabled');
|
1065 |
+
}
|
1066 |
+
}
|
1067 |
+
);
|
1068 |
+
} else {
|
1069 |
+
$('.dp-nav-next-year', this.context).removeClass('disabled');
|
1070 |
+
$('.dp-nav-next-month', this.context).removeClass('disabled');
|
1071 |
+
var d = this.endDate.getDate();
|
1072 |
+
if (d < 13) {
|
1073 |
+
// check if the endDate is next month as we might need to add some disabled classes...
|
1074 |
+
var ed = new Date(this.endDate.getTime());
|
1075 |
+
ed.addMonths(-1);
|
1076 |
+
if (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) {
|
1077 |
+
$('.dp-calendar td.other-month', this.context).each(
|
1078 |
+
function()
|
1079 |
+
{
|
1080 |
+
var $this = $(this);
|
1081 |
+
if (Number($this.text()) > d) {
|
1082 |
+
$this.addClass('disabled');
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
);
|
1086 |
+
}
|
1087 |
+
}
|
1088 |
+
}
|
1089 |
+
this._applyRenderCallbacks();
|
1090 |
+
},
|
1091 |
+
_closeCalendar : function(programatic, ele)
|
1092 |
+
{
|
1093 |
+
if (!ele || ele == this.ele)
|
1094 |
+
{
|
1095 |
+
$(document).unbind('mousedown.datepicker');
|
1096 |
+
$(document).unbind('keydown.datepicker');
|
1097 |
+
this._clearCalendar();
|
1098 |
+
$('#dp-popup a').unbind();
|
1099 |
+
$('#dp-popup').empty().remove();
|
1100 |
+
if (!programatic) {
|
1101 |
+
$(this.ele).trigger('dpClosed', [this.getSelected()]);
|
1102 |
+
}
|
1103 |
+
}
|
1104 |
+
},
|
1105 |
+
// empties the current dp-calendar div and makes sure that all events are unbound
|
1106 |
+
// and expandos removed to avoid memory leaks...
|
1107 |
+
_clearCalendar : function()
|
1108 |
+
{
|
1109 |
+
// TODO.
|
1110 |
+
$('.dp-calendar td', this.context).unbind();
|
1111 |
+
$('.dp-calendar', this.context).empty();
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
);
|
1115 |
+
|
1116 |
+
// static constants
|
1117 |
+
$.dpConst = {
|
1118 |
+
SHOW_HEADER_NONE : 0,
|
1119 |
+
SHOW_HEADER_SHORT : 1,
|
1120 |
+
SHOW_HEADER_LONG : 2,
|
1121 |
+
POS_TOP : 0,
|
1122 |
+
POS_BOTTOM : 1,
|
1123 |
+
POS_LEFT : 0,
|
1124 |
+
POS_RIGHT : 1,
|
1125 |
+
DP_INTERNAL_FOCUS : 'dpInternalFocusTrigger'
|
1126 |
+
};
|
1127 |
+
// localisable text
|
1128 |
+
$.dpText = {
|
1129 |
+
TEXT_PREV_YEAR : 'Previous year',
|
1130 |
+
TEXT_PREV_MONTH : 'Previous month',
|
1131 |
+
TEXT_NEXT_YEAR : 'Next year',
|
1132 |
+
TEXT_NEXT_MONTH : 'Next month',
|
1133 |
+
TEXT_CLOSE : 'Close',
|
1134 |
+
TEXT_CHOOSE_DATE : 'Choose date',
|
1135 |
+
HEADER_FORMAT : 'mmmm yyyy'
|
1136 |
+
};
|
1137 |
+
// version
|
1138 |
+
$.dpVersion = '$Id: jquery.datePicker.js 70 2009-04-05 19:25:15Z kelvin.luck $';
|
1139 |
+
|
1140 |
+
$.fn.datePicker.defaults = {
|
1141 |
+
month : undefined,
|
1142 |
+
year : undefined,
|
1143 |
+
showHeader : $.dpConst.SHOW_HEADER_SHORT,
|
1144 |
+
startDate : undefined,
|
1145 |
+
endDate : undefined,
|
1146 |
+
inline : false,
|
1147 |
+
renderCallback : null,
|
1148 |
+
createButton : true,
|
1149 |
+
showYearNavigation : true,
|
1150 |
+
closeOnSelect : true,
|
1151 |
+
displayClose : false,
|
1152 |
+
selectMultiple : false,
|
1153 |
+
numSelectable : Number.MAX_VALUE,
|
1154 |
+
clickInput : false,
|
1155 |
+
rememberViewedMonth : true,
|
1156 |
+
selectWeek : false,
|
1157 |
+
verticalPosition : $.dpConst.POS_TOP,
|
1158 |
+
horizontalPosition : $.dpConst.POS_LEFT,
|
1159 |
+
verticalOffset : 0,
|
1160 |
+
horizontalOffset : 0,
|
1161 |
+
hoverClass : 'dp-hover'
|
1162 |
+
};
|
1163 |
+
|
1164 |
+
function _getController(ele)
|
1165 |
+
{
|
1166 |
+
if (ele._dpId) return $.event._dpCache[ele._dpId];
|
1167 |
+
return false;
|
1168 |
+
};
|
1169 |
+
|
1170 |
+
// make it so that no error is thrown if bgIframe plugin isn't included (allows you to use conditional
|
1171 |
+
// comments to only include bgIframe where it is needed in IE without breaking this plugin).
|
1172 |
+
if ($.fn.bgIframe == undefined) {
|
1173 |
+
$.fn.bgIframe = function() {return this; };
|
1174 |
+
};
|
1175 |
+
|
1176 |
+
|
1177 |
+
// clean-up
|
1178 |
+
$(window)
|
1179 |
+
.bind('unload', function() {
|
1180 |
+
var els = $.event._dpCache || [];
|
1181 |
+
for (var i in els) {
|
1182 |
+
$(els[i].ele)._dpDestroy();
|
1183 |
+
}
|
1184 |
+
});
|
1185 |
+
|
1186 |
+
|
1187 |
+
})(jQuery);
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Hiroaki Miyashita
|
|
3 |
Donate link: http://wordpressgogo.com/development/custom-field-template.html
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
-
Tested up to: 2.8
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
@@ -52,6 +52,8 @@ The Custom Field Template plugin adds the default custom fields on the Write Pos
|
|
52 |
* Adds the style attribute. (`style = color:#FF0000;`)
|
53 |
* Adds the maxlength attribute. (`maxlength = 10`)
|
54 |
* Adds the attributes of multiple fields. (`multiple = true`, `startNum = 5`, `endNum = 10`, `multipleButton = true`)
|
|
|
|
|
55 |
|
56 |
Localization
|
57 |
|
3 |
Donate link: http://wordpressgogo.com/development/custom-field-template.html
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
+
Tested up to: 2.8
|
7 |
+
Stable tag: 1.3.0
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
52 |
* Adds the style attribute. (`style = color:#FF0000;`)
|
53 |
* Adds the maxlength attribute. (`maxlength = 10`)
|
54 |
* Adds the attributes of multiple fields. (`multiple = true`, `startNum = 5`, `endNum = 10`, `multipleButton = true`)
|
55 |
+
* Adds the attributes of the date picker in `text` type. (`date = true`, `dateFirstDayOfWeek = 0`, `dateFormat = yyyy/mm/dd`)
|
56 |
+
* Adds the filter of page template file names (Thanks, Joel Pittet).
|
57 |
|
58 |
Localization
|
59 |
|