1 | {include file='include/tag_selection.inc.tpl'} |
---|
2 | {include file='include/datepicker.inc.tpl'} |
---|
3 | {include file='include/colorbox.inc.tpl'} |
---|
4 | {include file='include/add_album.inc.tpl'} |
---|
5 | {combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'} |
---|
6 | {combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"} |
---|
7 | |
---|
8 | {footer_script}{literal} |
---|
9 | pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); |
---|
10 | {/literal}{/footer_script} |
---|
11 | |
---|
12 | {footer_script}{literal} |
---|
13 | /* Shift-click: select all photos between the click and the shift+click */ |
---|
14 | jQuery(document).ready(function() { |
---|
15 | var last_clicked=0; |
---|
16 | var last_clickedstatus=true; |
---|
17 | jQuery.fn.enableShiftClick = function() { |
---|
18 | var inputs = []; |
---|
19 | var count=0; |
---|
20 | this.find('input[type=checkbox]').each(function() { |
---|
21 | var pos=count; |
---|
22 | inputs[count++]=this; |
---|
23 | $(this).bind("shclick", function (dummy,event) { |
---|
24 | if (event.shiftKey) { |
---|
25 | var first = last_clicked; |
---|
26 | var last = pos; |
---|
27 | if (first > last) { |
---|
28 | first=pos; |
---|
29 | last=last_clicked; |
---|
30 | } |
---|
31 | |
---|
32 | for (var i=first; i<=last;i++) { |
---|
33 | input = $(inputs[i]); |
---|
34 | $(input).attr('checked', last_clickedstatus); |
---|
35 | if (last_clickedstatus) |
---|
36 | { |
---|
37 | $(input).siblings("span.wrap2").addClass("thumbSelected"); |
---|
38 | } |
---|
39 | else |
---|
40 | { |
---|
41 | $(input).siblings("span.wrap2").removeClass("thumbSelected"); |
---|
42 | } |
---|
43 | } |
---|
44 | } |
---|
45 | else { |
---|
46 | last_clicked = pos; |
---|
47 | last_clickedstatus = this.checked; |
---|
48 | } |
---|
49 | return true; |
---|
50 | }); |
---|
51 | $(this).click(function(event) {console.log(event.shiftKey);$(this).triggerHandler("shclick",event)}); |
---|
52 | }); |
---|
53 | } |
---|
54 | $('ul.thumbnails').enableShiftClick(); |
---|
55 | }); |
---|
56 | {/literal}{/footer_script} |
---|
57 | |
---|
58 | {combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'} |
---|
59 | {combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'} |
---|
60 | {combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'} |
---|
61 | |
---|
62 | {footer_script require='jquery.tokeninput'} |
---|
63 | jQuery(document).ready(function() {ldelim} |
---|
64 | jQuery("a.preview-box").colorbox(); |
---|
65 | |
---|
66 | var tag_src = [{foreach from=$tags item=tag name=tags}{ldelim}name:"{$tag.name|@escape:'javascript'}",id:"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}]; |
---|
67 | jQuery("#tags").tokenInput( |
---|
68 | tag_src, |
---|
69 | {ldelim} |
---|
70 | hintText: '{'Type in a search term'|@translate}', |
---|
71 | noResultsText: '{'No results'|@translate}', |
---|
72 | searchingText: '{'Searching...'|@translate}', |
---|
73 | newText: ' ({'new'|@translate})', |
---|
74 | animateDropdown: false, |
---|
75 | preventDuplicates: true, |
---|
76 | allowCreation: true |
---|
77 | } |
---|
78 | ); |
---|
79 | |
---|
80 | jQuery("#tagsFilter").tokenInput( |
---|
81 | tag_src, |
---|
82 | {ldelim} |
---|
83 | hintText: '{'Type in a search term'|@translate}', |
---|
84 | noResultsText: '{'No results'|@translate}', |
---|
85 | searchingText: '{'Searching...'|@translate}', |
---|
86 | animateDropdown: false, |
---|
87 | preventDuplicates: true, |
---|
88 | allowCreation: false |
---|
89 | } |
---|
90 | ); |
---|
91 | |
---|
92 | }); |
---|
93 | {/footer_script} |
---|
94 | |
---|
95 | {footer_script} |
---|
96 | var nb_thumbs_page = {$nb_thumbs_page}; |
---|
97 | var nb_thumbs_set = {$nb_thumbs_set}; |
---|
98 | var are_you_sure = "{'Are you sure?'|@translate|@escape:'javascript'}"; |
---|
99 | var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}"; |
---|
100 | var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}]; |
---|
101 | var derivatives = {ldelim} |
---|
102 | elements: null, |
---|
103 | done: 0, |
---|
104 | total: 0, |
---|
105 | |
---|
106 | finished: function() {ldelim} |
---|
107 | return derivatives.done == derivatives.total && derivatives.elements && derivatives.elements.length==0; |
---|
108 | } |
---|
109 | }; |
---|
110 | |
---|
111 | var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}"; |
---|
112 | var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}"; |
---|
113 | var selectedMessage_all = "{'All %d photos are selected'|@translate}"; |
---|
114 | |
---|
115 | var width_str = '{'Width'|@translate}'; |
---|
116 | var height_str = '{'Height'|@translate}'; |
---|
117 | var max_width_str = '{'Maximum width'|@translate}'; |
---|
118 | var max_height_str = '{'Maximum height'|@translate}'; |
---|
119 | {literal} |
---|
120 | function str_repeat(i, m) { |
---|
121 | for (var o = []; m > 0; o[--m] = i); |
---|
122 | return o.join(''); |
---|
123 | } |
---|
124 | |
---|
125 | function sprintf() { |
---|
126 | var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = ''; |
---|
127 | while (f) { |
---|
128 | if (m = /^[^\x25]+/.exec(f)) { |
---|
129 | o.push(m[0]); |
---|
130 | } |
---|
131 | else if (m = /^\x25{2}/.exec(f)) { |
---|
132 | o.push('%'); |
---|
133 | } |
---|
134 | else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) { |
---|
135 | if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) { |
---|
136 | throw('Too few arguments.'); |
---|
137 | } |
---|
138 | if (/[^s]/.test(m[7]) && (typeof(a) != 'number')) { |
---|
139 | throw('Expecting number but found ' + typeof(a)); |
---|
140 | } |
---|
141 | switch (m[7]) { |
---|
142 | case 'b': a = a.toString(2); break; |
---|
143 | case 'c': a = String.fromCharCode(a); break; |
---|
144 | case 'd': a = parseInt(a); break; |
---|
145 | case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break; |
---|
146 | case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break; |
---|
147 | case 'o': a = a.toString(8); break; |
---|
148 | case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break; |
---|
149 | case 'u': a = Math.abs(a); break; |
---|
150 | case 'x': a = a.toString(16); break; |
---|
151 | case 'X': a = a.toString(16).toUpperCase(); break; |
---|
152 | } |
---|
153 | a = (/[def]/.test(m[7]) && m[2] && a >= 0 ? '+'+ a : a); |
---|
154 | c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' '; |
---|
155 | x = m[5] - String(a).length - s.length; |
---|
156 | p = m[5] ? str_repeat(c, x) : ''; |
---|
157 | o.push(s + (m[4] ? a + p : p + a)); |
---|
158 | } |
---|
159 | else { |
---|
160 | throw('Huh ?!'); |
---|
161 | } |
---|
162 | f = f.substring(m[0].length); |
---|
163 | } |
---|
164 | return o.join(''); |
---|
165 | } |
---|
166 | |
---|
167 | function progress(success) { |
---|
168 | jQuery('#progressBar').progressBar(derivatives.done, { |
---|
169 | max: derivatives.total, |
---|
170 | textFormat: 'fraction', |
---|
171 | boxImage: 'themes/default/images/progressbar.gif', |
---|
172 | barImage: 'themes/default/images/progressbg_orange.gif' |
---|
173 | }); |
---|
174 | if (success !== undefined) { |
---|
175 | var type = success ? 'regenerateSuccess': 'regenerateError', |
---|
176 | s = jQuery('[name="'+type+'"]').val(); |
---|
177 | jQuery('[name="'+type+'"]').val(++s); |
---|
178 | } |
---|
179 | |
---|
180 | if (derivatives.finished()) { |
---|
181 | jQuery('#applyAction').click(); |
---|
182 | } |
---|
183 | } |
---|
184 | |
---|
185 | $(document).ready(function() { |
---|
186 | function checkPermitAction() { |
---|
187 | var nbSelected = 0; |
---|
188 | if ($("input[name=setSelected]").is(':checked')) { |
---|
189 | nbSelected = nb_thumbs_set; |
---|
190 | } |
---|
191 | else { |
---|
192 | nbSelected = $(".thumbnails input[type=checkbox]").filter(':checked').length; |
---|
193 | } |
---|
194 | |
---|
195 | if (nbSelected == 0) { |
---|
196 | $("#permitAction").hide(); |
---|
197 | $("#forbidAction").show(); |
---|
198 | } |
---|
199 | else { |
---|
200 | $("#permitAction").show(); |
---|
201 | $("#forbidAction").hide(); |
---|
202 | } |
---|
203 | |
---|
204 | $("#applyOnDetails").text( |
---|
205 | sprintf( |
---|
206 | applyOnDetails_pattern, |
---|
207 | nbSelected |
---|
208 | ) |
---|
209 | ); |
---|
210 | |
---|
211 | // display the number of currently selected photos in the "Selection" fieldset |
---|
212 | if (nbSelected == 0) { |
---|
213 | $("#selectedMessage").text( |
---|
214 | sprintf( |
---|
215 | selectedMessage_none, |
---|
216 | nb_thumbs_set |
---|
217 | ) |
---|
218 | ); |
---|
219 | } |
---|
220 | else if (nbSelected == nb_thumbs_set) { |
---|
221 | $("#selectedMessage").text( |
---|
222 | sprintf( |
---|
223 | selectedMessage_all, |
---|
224 | nb_thumbs_set |
---|
225 | ) |
---|
226 | ); |
---|
227 | } |
---|
228 | else { |
---|
229 | $("#selectedMessage").text( |
---|
230 | sprintf( |
---|
231 | selectedMessage_pattern, |
---|
232 | nbSelected, |
---|
233 | nb_thumbs_set |
---|
234 | ) |
---|
235 | ); |
---|
236 | } |
---|
237 | } |
---|
238 | |
---|
239 | $('.thumbnails img').tipTip({ |
---|
240 | 'delay' : 0, |
---|
241 | 'fadeIn' : 200, |
---|
242 | 'fadeOut' : 200 |
---|
243 | }); |
---|
244 | |
---|
245 | $("[id^=action_]").hide(); |
---|
246 | |
---|
247 | $("select[name=selectAction]").change(function () { |
---|
248 | $("[id^=action_]").hide(); |
---|
249 | $("#action_"+$(this).attr("value")).show(); |
---|
250 | |
---|
251 | /* make sure the #albumSelect is on the right select box so that the */ |
---|
252 | /* "add new album" popup fills the right select box */ |
---|
253 | if ("associate" == $(this).attr("value") || "move" == $(this).attr("value")) { |
---|
254 | jQuery("#albumSelect").removeAttr("id"); |
---|
255 | jQuery("#action_"+$(this).attr("value")+" select").attr("id", "albumSelect"); |
---|
256 | } |
---|
257 | |
---|
258 | if ($(this).val() != -1) { |
---|
259 | $("#applyActionBlock").show(); |
---|
260 | } |
---|
261 | else { |
---|
262 | $("#applyActionBlock").hide(); |
---|
263 | } |
---|
264 | }); |
---|
265 | |
---|
266 | $(".wrap1 label").click(function (event) { |
---|
267 | $("input[name=setSelected]").attr('checked', false); |
---|
268 | |
---|
269 | var wrap2 = $(this).children(".wrap2"); |
---|
270 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
271 | |
---|
272 | checkbox.triggerHandler("shclick",event); |
---|
273 | |
---|
274 | if ($(checkbox).is(':checked')) { |
---|
275 | $(wrap2).addClass("thumbSelected"); |
---|
276 | } |
---|
277 | else { |
---|
278 | $(wrap2).removeClass('thumbSelected'); |
---|
279 | } |
---|
280 | |
---|
281 | checkPermitAction(); |
---|
282 | }); |
---|
283 | |
---|
284 | $("#selectAll").click(function () { |
---|
285 | $("input[name=setSelected]").attr('checked', false); |
---|
286 | selectPageThumbnails(); |
---|
287 | checkPermitAction(); |
---|
288 | return false; |
---|
289 | }); |
---|
290 | |
---|
291 | function selectPageThumbnails() { |
---|
292 | $(".thumbnails label").each(function() { |
---|
293 | var wrap2 = $(this).children(".wrap2"); |
---|
294 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
295 | |
---|
296 | $(checkbox).attr('checked', true); |
---|
297 | $(wrap2).addClass("thumbSelected"); |
---|
298 | }); |
---|
299 | } |
---|
300 | |
---|
301 | $("#selectNone").click(function () { |
---|
302 | $("input[name=setSelected]").attr('checked', false); |
---|
303 | |
---|
304 | $(".thumbnails label").each(function() { |
---|
305 | var wrap2 = $(this).children(".wrap2"); |
---|
306 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
307 | |
---|
308 | $(checkbox).attr('checked', false); |
---|
309 | $(wrap2).removeClass("thumbSelected"); |
---|
310 | }); |
---|
311 | checkPermitAction(); |
---|
312 | return false; |
---|
313 | }); |
---|
314 | |
---|
315 | $("#selectInvert").click(function () { |
---|
316 | $("input[name=setSelected]").attr('checked', false); |
---|
317 | |
---|
318 | $(".thumbnails label").each(function() { |
---|
319 | var wrap2 = $(this).children(".wrap2"); |
---|
320 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
321 | |
---|
322 | $(checkbox).attr('checked', !$(checkbox).is(':checked')); |
---|
323 | |
---|
324 | if ($(checkbox).is(':checked')) { |
---|
325 | $(wrap2).addClass("thumbSelected"); |
---|
326 | } |
---|
327 | else { |
---|
328 | $(wrap2).removeClass('thumbSelected'); |
---|
329 | } |
---|
330 | }); |
---|
331 | checkPermitAction(); |
---|
332 | return false; |
---|
333 | }); |
---|
334 | |
---|
335 | $("#selectSet").click(function () { |
---|
336 | selectPageThumbnails(); |
---|
337 | $("input[name=setSelected]").attr('checked', true); |
---|
338 | checkPermitAction(); |
---|
339 | return false; |
---|
340 | }); |
---|
341 | |
---|
342 | $("input[name=remove_author]").click(function () { |
---|
343 | if ($(this).is(':checked')) { |
---|
344 | $("input[name=author]").hide(); |
---|
345 | } |
---|
346 | else { |
---|
347 | $("input[name=author]").show(); |
---|
348 | } |
---|
349 | }); |
---|
350 | |
---|
351 | $("input[name=remove_title]").click(function () { |
---|
352 | if ($(this).is(':checked')) { |
---|
353 | $("input[name=title]").hide(); |
---|
354 | } |
---|
355 | else { |
---|
356 | $("input[name=title]").show(); |
---|
357 | } |
---|
358 | }); |
---|
359 | |
---|
360 | $("input[name=remove_date_creation]").click(function () { |
---|
361 | if ($(this).is(':checked')) { |
---|
362 | $("#set_date_creation").hide(); |
---|
363 | } |
---|
364 | else { |
---|
365 | $("#set_date_creation").show(); |
---|
366 | } |
---|
367 | }); |
---|
368 | |
---|
369 | $(".removeFilter").click(function () { |
---|
370 | var filter = $(this).parent('li').attr("id"); |
---|
371 | filter_disable(filter); |
---|
372 | |
---|
373 | return false; |
---|
374 | }); |
---|
375 | |
---|
376 | function filter_enable(filter) { |
---|
377 | /* show the filter*/ |
---|
378 | $("#"+filter).show(); |
---|
379 | |
---|
380 | /* check the checkbox to declare we use this filter */ |
---|
381 | $("input[type=checkbox][name="+filter+"_use]").attr("checked", true); |
---|
382 | |
---|
383 | /* forbid to select this filter in the addFilter list */ |
---|
384 | $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled"); |
---|
385 | } |
---|
386 | |
---|
387 | $("#addFilter").change(function () { |
---|
388 | var filter = $(this).attr("value"); |
---|
389 | filter_enable(filter); |
---|
390 | $(this).attr("value", -1); |
---|
391 | }); |
---|
392 | |
---|
393 | function filter_disable(filter) { |
---|
394 | /* hide the filter line */ |
---|
395 | $("#"+filter).hide(); |
---|
396 | |
---|
397 | /* uncheck the checkbox to declare we do not use this filter */ |
---|
398 | $("input[name="+filter+"_use]").removeAttr("checked"); |
---|
399 | |
---|
400 | /* give the possibility to show it again */ |
---|
401 | $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled"); |
---|
402 | } |
---|
403 | |
---|
404 | $("#removeFilters").click(function() { |
---|
405 | $("#filterList li").each(function() { |
---|
406 | var filter = $(this).attr("id"); |
---|
407 | filter_disable(filter); |
---|
408 | }); |
---|
409 | return false; |
---|
410 | }); |
---|
411 | |
---|
412 | jQuery('#applyAction').click(function() { |
---|
413 | var action = jQuery('[name="selectAction"]').val(); |
---|
414 | if (action == 'delete_derivatives') { |
---|
415 | var d_count = $('#action_delete_derivatives input[type=checkbox]').filter(':checked').length |
---|
416 | , e_count = $('input[name="setSelected"]').is(':checked') ? nb_thumbs_set : $('.thumbnails input[type=checkbox]').filter(':checked').length; |
---|
417 | if (d_count*e_count > 500) |
---|
418 | return confirm(are_you_sure); |
---|
419 | } |
---|
420 | |
---|
421 | if (action != 'generate_derivatives' |
---|
422 | || derivatives.finished() ) |
---|
423 | { |
---|
424 | return true; |
---|
425 | } |
---|
426 | |
---|
427 | jQuery('.bulkAction').hide(); |
---|
428 | |
---|
429 | var queuedManager = jQuery.manageAjax.create('queued', { |
---|
430 | queue: true, |
---|
431 | cacheResponse: false, |
---|
432 | maxRequests: 1 |
---|
433 | }); |
---|
434 | |
---|
435 | derivatives.elements = []; |
---|
436 | if (jQuery('input[name="setSelected"]').attr('checked')) |
---|
437 | derivatives.elements = all_elements; |
---|
438 | else |
---|
439 | jQuery('.thumbnails input[type=checkbox]').each(function() { |
---|
440 | if (jQuery(this).attr('checked')) { |
---|
441 | derivatives.elements.push(jQuery(this).val()); |
---|
442 | } |
---|
443 | }); |
---|
444 | |
---|
445 | jQuery('#applyActionBlock').hide(); |
---|
446 | jQuery('select[name="selectAction"]').hide(); |
---|
447 | jQuery('#regenerationMsg').show(); |
---|
448 | |
---|
449 | progress(); |
---|
450 | getDerivativeUrls(); |
---|
451 | return false; |
---|
452 | }); |
---|
453 | |
---|
454 | function getDerivativeUrls() { |
---|
455 | var ids = derivatives.elements.splice(0, 500); |
---|
456 | var params = {max_urls: 100000, ids: ids, types: []}; |
---|
457 | jQuery("#action_generate_derivatives input").each( function(i, t) { |
---|
458 | if ($(t).attr("checked")) |
---|
459 | params.types.push( t.value ); |
---|
460 | } ); |
---|
461 | |
---|
462 | jQuery.ajax( { |
---|
463 | type: "POST", |
---|
464 | url: 'ws.php?format=json&method=pwg.getMissingDerivatives', |
---|
465 | data: params, |
---|
466 | dataType: "json", |
---|
467 | success: function(data) { |
---|
468 | if (!data.stat || data.stat != "ok") { |
---|
469 | return; |
---|
470 | } |
---|
471 | derivatives.total += data.result.urls.length; |
---|
472 | progress(); |
---|
473 | for (var i=0; i < data.result.urls.length; i++) { |
---|
474 | jQuery.manageAjax.add("queued", { |
---|
475 | type: 'GET', |
---|
476 | url: data.result.urls[i] + "&ajaxload=true", |
---|
477 | dataType: 'json', |
---|
478 | success: ( function(data) { derivatives.done++; progress(true) }), |
---|
479 | error: ( function(data) { derivatives.done++; progress(false) }) |
---|
480 | }); |
---|
481 | } |
---|
482 | if (derivatives.elements.length) |
---|
483 | setTimeout( getDerivativeUrls, 25 * (derivatives.total-derivatives.done)); |
---|
484 | } |
---|
485 | } ); |
---|
486 | } |
---|
487 | |
---|
488 | checkPermitAction(); |
---|
489 | |
---|
490 | /* dimensions sliders */ |
---|
491 | /** |
---|
492 | * find the key from a value in the startStopValues array |
---|
493 | */ |
---|
494 | function getSliderKeyFromValue(value, values) { |
---|
495 | for (var key in values) { |
---|
496 | if (values[key] == value) { |
---|
497 | return key; |
---|
498 | } |
---|
499 | } |
---|
500 | |
---|
501 | return 0; |
---|
502 | } |
---|
503 | |
---|
504 | {/literal} |
---|
505 | var dimension_values = {ldelim} |
---|
506 | 'width':[{$dimensions.widths}], |
---|
507 | 'height':[{$dimensions.heights}], |
---|
508 | 'ratio':[{$dimensions.ratios}] |
---|
509 | }; |
---|
510 | |
---|
511 | $("#filter_dimension_width_slider").slider({ldelim} |
---|
512 | range: true, |
---|
513 | min: 0, |
---|
514 | max: dimension_values['width'].length - 1, |
---|
515 | values: [ |
---|
516 | getSliderKeyFromValue({$dimensions.selected.min_width}, dimension_values['width']), |
---|
517 | getSliderKeyFromValue({$dimensions.selected.max_width}, dimension_values['width']) |
---|
518 | ], |
---|
519 | slide: function(event, ui) {ldelim} |
---|
520 | $("input[name='filter_dimension_min_width']").val(dimension_values['width'][ui.values[0]]); |
---|
521 | $("input[name='filter_dimension_max_width']").val(dimension_values['width'][ui.values[1]]); |
---|
522 | |
---|
523 | $("#filter_dimension_width_info").html(sprintf( |
---|
524 | "{'between %d and %d pixels'|@translate}", |
---|
525 | dimension_values['width'][ui.values[0]], |
---|
526 | dimension_values['width'][ui.values[1]] |
---|
527 | )); |
---|
528 | }, |
---|
529 | change: function(event, ui) {ldelim} |
---|
530 | $("input[name='filter_dimension_min_width']").val(dimension_values['width'][ui.values[0]]); |
---|
531 | $("input[name='filter_dimension_max_width']").val(dimension_values['width'][ui.values[1]]); |
---|
532 | |
---|
533 | $("#filter_dimension_width_info").html(sprintf( |
---|
534 | "{'between %d and %d pixels'|@translate}", |
---|
535 | dimension_values['width'][ui.values[0]], |
---|
536 | dimension_values['width'][ui.values[1]] |
---|
537 | )); |
---|
538 | } |
---|
539 | }); |
---|
540 | |
---|
541 | $("#filter_dimension_height_slider").slider({ldelim} |
---|
542 | range: true, |
---|
543 | min: 0, |
---|
544 | max: dimension_values['height'].length - 1, |
---|
545 | values: [ |
---|
546 | getSliderKeyFromValue({$dimensions.selected.min_height}, dimension_values['height']), |
---|
547 | getSliderKeyFromValue({$dimensions.selected.max_height}, dimension_values['height']) |
---|
548 | ], |
---|
549 | slide: function(event, ui) {ldelim} |
---|
550 | $("input[name='filter_dimension_min_height']").val(dimension_values['height'][ui.values[0]]); |
---|
551 | $("input[name='filter_dimension_max_height']").val(dimension_values['height'][ui.values[1]]); |
---|
552 | |
---|
553 | $("#filter_dimension_height_info").html(sprintf( |
---|
554 | "{'between %d and %d pixels'|@translate}", |
---|
555 | dimension_values['height'][ui.values[0]], |
---|
556 | dimension_values['height'][ui.values[1]] |
---|
557 | )); |
---|
558 | }, |
---|
559 | change: function(event, ui) {ldelim} |
---|
560 | $("input[name='filter_dimension_min_height']").val(dimension_values['height'][ui.values[0]]); |
---|
561 | $("input[name='filter_dimension_max_height']").val(dimension_values['height'][ui.values[1]]); |
---|
562 | |
---|
563 | $("#filter_dimension_height_info").html(sprintf( |
---|
564 | "{'between %d and %d pixels'|@translate}", |
---|
565 | dimension_values['height'][ui.values[0]], |
---|
566 | dimension_values['height'][ui.values[1]] |
---|
567 | )); |
---|
568 | } |
---|
569 | }); |
---|
570 | |
---|
571 | $("#filter_dimension_ratio_slider").slider({ldelim} |
---|
572 | range: true, |
---|
573 | min: 0, |
---|
574 | max: dimension_values['ratio'].length - 1, |
---|
575 | values: [ |
---|
576 | getSliderKeyFromValue({$dimensions.selected.min_ratio}, dimension_values['ratio']), |
---|
577 | getSliderKeyFromValue({$dimensions.selected.max_ratio}, dimension_values['ratio']) |
---|
578 | ], |
---|
579 | slide: function(event, ui) {ldelim} |
---|
580 | $("input[name='filter_dimension_min_ratio']").val(dimension_values['ratio'][ui.values[0]]); |
---|
581 | $("input[name='filter_dimension_max_ratio']").val(dimension_values['ratio'][ui.values[1]]); |
---|
582 | |
---|
583 | $("#filter_dimension_ratio_info").html(sprintf( |
---|
584 | "{'between %.2f and %.2f'|@translate}", |
---|
585 | dimension_values['ratio'][ui.values[0]], |
---|
586 | dimension_values['ratio'][ui.values[1]] |
---|
587 | )); |
---|
588 | }, |
---|
589 | change: function(event, ui) {ldelim} |
---|
590 | $("input[name='filter_dimension_min_ratio']").val(dimension_values['ratio'][ui.values[0]]); |
---|
591 | $("input[name='filter_dimension_max_ratio']").val(dimension_values['ratio'][ui.values[1]]); |
---|
592 | |
---|
593 | $("#filter_dimension_ratio_info").html(sprintf( |
---|
594 | "{'between %.2f and %.2f'|@translate}", |
---|
595 | dimension_values['ratio'][ui.values[0]], |
---|
596 | dimension_values['ratio'][ui.values[1]] |
---|
597 | )); |
---|
598 | } |
---|
599 | }); |
---|
600 | |
---|
601 | $("a.dimensions-choice").click(function() {ldelim} |
---|
602 | var type = jQuery(this).data("type"); |
---|
603 | var min = jQuery(this).data("min"); |
---|
604 | var max = jQuery(this).data("max"); |
---|
605 | |
---|
606 | $("#filter_dimension_"+ type +"_slider").slider("values", 0, |
---|
607 | getSliderKeyFromValue(min, dimension_values[type]) |
---|
608 | ); |
---|
609 | |
---|
610 | $("#filter_dimension_"+type+"_slider").slider("values", 1, |
---|
611 | getSliderKeyFromValue(max, dimension_values[type]) |
---|
612 | ); |
---|
613 | }); |
---|
614 | }); |
---|
615 | |
---|
616 | {/footer_script} |
---|
617 | |
---|
618 | <div id="batchManagerGlobal"> |
---|
619 | |
---|
620 | <h2>{'Batch Manager'|@translate}</h2> |
---|
621 | |
---|
622 | <form action="{$F_ACTION}" method="post"> |
---|
623 | <input type="hidden" name="start" value="{$START}"> |
---|
624 | |
---|
625 | <fieldset> |
---|
626 | <legend>{'Filter'|@translate}</legend> |
---|
627 | |
---|
628 | <ul id="filterList"> |
---|
629 | <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}> |
---|
630 | <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a> |
---|
631 | <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}> |
---|
632 | {'Predefined filter'|@translate} |
---|
633 | <select name="filter_prefilter"> |
---|
634 | {foreach from=$prefilters item=prefilter} |
---|
635 | <option value="{$prefilter.ID}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> |
---|
636 | {/foreach} |
---|
637 | </select> |
---|
638 | </li> |
---|
639 | |
---|
640 | <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}> |
---|
641 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
642 | <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}> |
---|
643 | {'Album'|@translate} |
---|
644 | <select style="width:400px" name="filter_category" size="1"> |
---|
645 | {html_options options=$category_full_name_options selected=$filter_category_selected} |
---|
646 | </select> |
---|
647 | <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label> |
---|
648 | </li> |
---|
649 | |
---|
650 | <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}> |
---|
651 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
652 | <input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}> |
---|
653 | {'Tags'|@translate} |
---|
654 | <select id="tagsFilter" name="filter_tags"> |
---|
655 | {if isset($filter_tags)}{foreach from=$filter_tags item=tag} |
---|
656 | <option value="{$tag.id}">{$tag.name}</option> |
---|
657 | {/foreach}{/if} |
---|
658 | </select> |
---|
659 | <label><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label> |
---|
660 | <label><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label> |
---|
661 | </li> |
---|
662 | |
---|
663 | <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}> |
---|
664 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
665 | <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}> |
---|
666 | {'Privacy level'|@translate} |
---|
667 | <select name="filter_level" size="1"> |
---|
668 | {html_options options=$filter_level_options selected=$filter_level_options_selected} |
---|
669 | </select> |
---|
670 | <label><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label> |
---|
671 | </li> |
---|
672 | |
---|
673 | <li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}> |
---|
674 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
675 | <input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}> |
---|
676 | {'Dimensions'|@translate} |
---|
677 | |
---|
678 | <blockquote> |
---|
679 | {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_width:$dimensions.selected.max_width}</span> |
---|
680 | | <a class="dimensions-choice" data-type="width" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|@translate}</a> |
---|
681 | <div id="filter_dimension_width_slider"></div> |
---|
682 | |
---|
683 | {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate|sprintf:$dimensions.selected.min_height:$dimensions.selected.max_height}</span> |
---|
684 | | <a class="dimensions-choice" data-type="height" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|@translate}</a> |
---|
685 | <div id="filter_dimension_height_slider"></div> |
---|
686 | |
---|
687 | {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate|sprintf:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span> |
---|
688 | {if isset($dimensions.ratio_portrait)} |
---|
689 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|@translate}</a> |
---|
690 | {/if} |
---|
691 | {if isset($dimensions.ratio_square)} |
---|
692 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_square.min}" data-max="{$dimensions.ratio_square.max}">{'square'|@translate}</a> |
---|
693 | {/if} |
---|
694 | {if isset($dimensions.ratio_landscape)} |
---|
695 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_landscape.min}" data-max="{$dimensions.ratio_landscape.max}">{'Landscape'|@translate}</a> |
---|
696 | {/if} |
---|
697 | {if isset($dimensions.ratio_panorama)} |
---|
698 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_panorama.min}" data-max="{$dimensions.ratio_panorama.max}">{'Panorama'|@translate}</a> |
---|
699 | {/if} |
---|
700 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.bounds.min_ratio}" data-max="{$dimensions.bounds.max_ratio}">{'Reset'|@translate}</a> |
---|
701 | <div id="filter_dimension_ratio_slider"></div> |
---|
702 | </blockquote> |
---|
703 | |
---|
704 | <input type="hidden" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}"> |
---|
705 | <input type="hidden" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}"> |
---|
706 | <input type="hidden" name="filter_dimension_min_height" value="{$dimensions.selected.min_height}"> |
---|
707 | <input type="hidden" name="filter_dimension_max_height" value="{$dimensions.selected.max_height}"> |
---|
708 | <input type="hidden" name="filter_dimension_min_ratio" value="{$dimensions.selected.min_ratio}"> |
---|
709 | <input type="hidden" name="filter_dimension_max_ratio" value="{$dimensions.selected.max_ratio}"> |
---|
710 | </li> |
---|
711 | </ul> |
---|
712 | |
---|
713 | <p class="actionButtons"> |
---|
714 | <select id="addFilter"> |
---|
715 | <option value="-1">{'Add a filter'|@translate}</option> |
---|
716 | <option disabled="disabled">------------------</option> |
---|
717 | <option value="filter_prefilter" {if isset($filter.prefilter)}disabled="disabled"{/if}>{'Predefined filter'|@translate}</option> |
---|
718 | <option value="filter_category" {if isset($filter.category)}disabled="disabled"{/if}>{'Album'|@translate}</option> |
---|
719 | <option value="filter_tags" {if isset($filter.tags)}disabled="disabled"{/if}>{'Tags'|@translate}</option> |
---|
720 | <option value="filter_level" {if isset($filter.level)}disabled="disabled"{/if}>{'Privacy level'|@translate}</option> |
---|
721 | <option value="filter_dimension" {if isset($filter.dimension)}disabled="disabled"{/if}>{'Dimensions'|@translate}</option> |
---|
722 | </select> |
---|
723 | <a id="removeFilters" href="">{'Remove all filters'|@translate}</a> |
---|
724 | </p> |
---|
725 | |
---|
726 | <p class="actionButtons" id="applyFilterBlock"> |
---|
727 | <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter"> |
---|
728 | </p> |
---|
729 | |
---|
730 | </fieldset> |
---|
731 | |
---|
732 | <fieldset> |
---|
733 | |
---|
734 | <legend>{'Selection'|@translate}</legend> |
---|
735 | |
---|
736 | {if !empty($thumbnails)} |
---|
737 | <p id="checkActions"> |
---|
738 | {'Select:'|@translate} |
---|
739 | {if $nb_thumbs_set > $nb_thumbs_page} |
---|
740 | <a href="#" id="selectAll">{'The whole page'|@translate}</a>, |
---|
741 | <a href="#" id="selectSet">{'The whole set'|@translate}</a>, |
---|
742 | {else} |
---|
743 | <a href="#" id="selectAll">{'All'|@translate}</a>, |
---|
744 | {/if} |
---|
745 | <a href="#" id="selectNone">{'None'|@translate}</a>, |
---|
746 | <a href="#" id="selectInvert">{'Invert'|@translate}</a> |
---|
747 | |
---|
748 | <span id="selectedMessage"></span> |
---|
749 | |
---|
750 | <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}> |
---|
751 | </p> |
---|
752 | |
---|
753 | <ul class="thumbnails"> |
---|
754 | {html_style} |
---|
755 | UL.thumbnails SPAN.wrap2{ldelim} |
---|
756 | width: {$thumb_params->max_width()+2}px; |
---|
757 | } |
---|
758 | UL.thumbnails SPAN.wrap2 {ldelim} |
---|
759 | height: {$thumb_params->max_height()+25}px; |
---|
760 | } |
---|
761 | {/html_style} |
---|
762 | {foreach from=$thumbnails item=thumbnail} |
---|
763 | {assign var='isSelected' value=$thumbnail.id|@in_array:$selection} |
---|
764 | <li> |
---|
765 | <span class="wrap1"> |
---|
766 | <label> |
---|
767 | <input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}> |
---|
768 | <span class="wrap2{if $isSelected} thumbSelected{/if}"> |
---|
769 | <div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> · <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div> |
---|
770 | {if $thumbnail.level > 0} |
---|
771 | <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em> |
---|
772 | <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.level))}</em> |
---|
773 | {/if} |
---|
774 | <img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}> |
---|
775 | </span> |
---|
776 | </label> |
---|
777 | </span> |
---|
778 | </li> |
---|
779 | {/foreach} |
---|
780 | </ul> |
---|
781 | |
---|
782 | {if !empty($navbar) } |
---|
783 | <div style="clear:both;"> |
---|
784 | |
---|
785 | <div style="float:left"> |
---|
786 | {include file='navigation_bar.tpl'|@get_extent:'navbar'} |
---|
787 | </div> |
---|
788 | |
---|
789 | <div style="float:right;margin-top:10px;">{'display'|@translate} |
---|
790 | <a href="{$U_DISPLAY}&display=20">20</a> |
---|
791 | · <a href="{$U_DISPLAY}&display=50">50</a> |
---|
792 | · <a href="{$U_DISPLAY}&display=100">100</a> |
---|
793 | · <a href="{$U_DISPLAY}&display=all">{'all'|@translate}</a> |
---|
794 | {'photos per page'|@translate} |
---|
795 | </div> |
---|
796 | </div> |
---|
797 | {/if} |
---|
798 | |
---|
799 | {else} |
---|
800 | <div>{'No photo in the current set.'|@translate}</div> |
---|
801 | {/if} |
---|
802 | </fieldset> |
---|
803 | |
---|
804 | <fieldset id="action"> |
---|
805 | |
---|
806 | <legend>{'Action'|@translate}</legend> |
---|
807 | <div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div> |
---|
808 | <div id="permitAction"{if count($selection) == 0} style="display:none"{/if}> |
---|
809 | |
---|
810 | <select name="selectAction"> |
---|
811 | <option value="-1">{'Choose an action'|@translate}</option> |
---|
812 | <option disabled="disabled">------------------</option> |
---|
813 | <option value="delete">{'Delete selected photos'|@translate}</option> |
---|
814 | <option value="associate">{'Associate to album'|@translate}</option> |
---|
815 | <option value="move">{'Move to album'|@translate}</option> |
---|
816 | {if !empty($dissociate_options)} |
---|
817 | <option value="dissociate">{'Dissociate from album'|@translate}</option> |
---|
818 | {/if} |
---|
819 | <option value="add_tags">{'Add tags'|@translate}</option> |
---|
820 | {if !empty($DEL_TAG_SELECTION)} |
---|
821 | <option value="del_tags">{'remove tags'|@translate}</option> |
---|
822 | {/if} |
---|
823 | <option value="author">{'Set author'|@translate}</option> |
---|
824 | <option value="title">{'Set title'|@translate}</option> |
---|
825 | <option value="date_creation">{'Set creation date'|@translate}</option> |
---|
826 | <option value="level">{'Who can see these photos?'|@translate}</option> |
---|
827 | <option value="metadata">{'Synchronize metadata'|@translate}</option> |
---|
828 | {if ($IN_CADDIE)} |
---|
829 | <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option> |
---|
830 | {else} |
---|
831 | <option value="add_to_caddie">{'Add to caddie'|@translate}</option> |
---|
832 | {/if} |
---|
833 | <option value="delete_derivatives">{'Delete multiple size images'|@translate}</option> |
---|
834 | <option value="generate_derivatives">{'Generate multiple size images'|@translate}</option> |
---|
835 | {if !empty($element_set_global_plugins_actions)} |
---|
836 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
837 | <option value="{$action.ID}">{$action.NAME}</option> |
---|
838 | {/foreach} |
---|
839 | {/if} |
---|
840 | </select> |
---|
841 | |
---|
842 | <!-- delete --> |
---|
843 | <div id="action_delete" class="bulkAction"> |
---|
844 | <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p> |
---|
845 | </div> |
---|
846 | |
---|
847 | <!-- associate --> |
---|
848 | <div id="action_associate" class="bulkAction"> |
---|
849 | <select style="width:400px" name="associate" size="1"> |
---|
850 | {html_options options=$category_full_name_options} |
---|
851 | </select> |
---|
852 | <br>{'... or '|@translate} <a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> |
---|
853 | </div> |
---|
854 | |
---|
855 | <!-- move --> |
---|
856 | <div id="action_move" class="bulkAction"> |
---|
857 | <select style="width:400px" name="move" size="1"> |
---|
858 | {html_options options=$category_full_name_options} |
---|
859 | </select> |
---|
860 | <br>{'... or '|@translate} <a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> |
---|
861 | </div> |
---|
862 | |
---|
863 | |
---|
864 | <!-- dissociate --> |
---|
865 | <div id="action_dissociate" class="bulkAction"> |
---|
866 | <select style="width:400px" name="dissociate" size="1"> |
---|
867 | {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if} |
---|
868 | </select> |
---|
869 | </div> |
---|
870 | |
---|
871 | |
---|
872 | <!-- add_tags --> |
---|
873 | <div id="action_add_tags" class="bulkAction"> |
---|
874 | <select id="tags" name="add_tags"> |
---|
875 | </select> |
---|
876 | </div> |
---|
877 | |
---|
878 | <!-- del_tags --> |
---|
879 | <div id="action_del_tags" class="bulkAction"> |
---|
880 | {if !empty($DEL_TAG_SELECTION)}{$DEL_TAG_SELECTION}{/if} |
---|
881 | </div> |
---|
882 | |
---|
883 | <!-- author --> |
---|
884 | <div id="action_author" class="bulkAction"> |
---|
885 | <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br> |
---|
886 | {assign var='authorDefaultValue' value='Type here the author name'|@translate} |
---|
887 | <input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue}' : this.value;"> |
---|
888 | </div> |
---|
889 | |
---|
890 | <!-- title --> |
---|
891 | <div id="action_title" class="bulkAction"> |
---|
892 | <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br> |
---|
893 | {assign var='titleDefaultValue' value='Type here the title'|@translate} |
---|
894 | <input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue}' : this.value;"> |
---|
895 | </div> |
---|
896 | |
---|
897 | <!-- date_creation --> |
---|
898 | <div id="action_date_creation" class="bulkAction"> |
---|
899 | <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br> |
---|
900 | <div id="set_date_creation"> |
---|
901 | <select id="date_creation_day" name="date_creation_day"> |
---|
902 | <option value="0">--</option> |
---|
903 | {section name=day start=1 loop=32} |
---|
904 | <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option> |
---|
905 | {/section} |
---|
906 | </select> |
---|
907 | <select id="date_creation_month" name="date_creation_month"> |
---|
908 | {html_options options=$month_list selected=$DATE_CREATION_MONTH} |
---|
909 | </select> |
---|
910 | <input id="date_creation_year" |
---|
911 | name="date_creation_year" |
---|
912 | type="text" |
---|
913 | size="4" |
---|
914 | maxlength="4" |
---|
915 | value="{$DATE_CREATION_YEAR}"> |
---|
916 | <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"> |
---|
917 | </div> |
---|
918 | </div> |
---|
919 | |
---|
920 | <!-- level --> |
---|
921 | <div id="action_level" class="bulkAction"> |
---|
922 | <select name="level" size="1"> |
---|
923 | {html_options options=$level_options selected=$level_options_selected} |
---|
924 | </select> |
---|
925 | </div> |
---|
926 | |
---|
927 | <!-- metadata --> |
---|
928 | <div id="action_metadata" class="bulkAction"> |
---|
929 | </div> |
---|
930 | |
---|
931 | <!-- generate derivatives --> |
---|
932 | <div id="action_generate_derivatives" class="bulkAction"> |
---|
933 | <a href="javascript:selectGenerateDerivAll()">{'All'|@translate}</a>, |
---|
934 | <a href="javascript:selectGenerateDerivNone()">{'None'|@translate}</a> |
---|
935 | <br> |
---|
936 | {foreach from=$generate_derivatives_types key=type item=disp} |
---|
937 | <label><input type="checkbox" name="generate_derivatives_type[]" value="{$type}"> {$disp}</label> |
---|
938 | {/foreach} |
---|
939 | {footer_script} |
---|
940 | function selectGenerateDerivAll() {ldelim} |
---|
941 | $("#action_generate_derivatives input[type=checkbox]").attr("checked", true); |
---|
942 | } |
---|
943 | function selectGenerateDerivNone() {ldelim} |
---|
944 | $("#action_generate_derivatives input[type=checkbox]").attr("checked", false); |
---|
945 | } |
---|
946 | {/footer_script} |
---|
947 | </div> |
---|
948 | |
---|
949 | <!-- delete derivatives --> |
---|
950 | <div id="action_delete_derivatives" class="bulkAction"> |
---|
951 | <a href="javascript:selectDelDerivAll()">{'All'|@translate}</a>, |
---|
952 | <a href="javascript:selectDelDerivNone()">{'None'|@translate}</a> |
---|
953 | <br> |
---|
954 | {foreach from=$del_derivatives_types key=type item=disp} |
---|
955 | <label><input type="checkbox" name="del_derivatives_type[]" value="{$type}"> {$disp}</label> |
---|
956 | {/foreach} |
---|
957 | {footer_script} |
---|
958 | function selectDelDerivAll() {ldelim} |
---|
959 | $("#action_delete_derivatives input[type=checkbox]").attr("checked", true); |
---|
960 | } |
---|
961 | function selectDelDerivNone() {ldelim} |
---|
962 | $("#action_delete_derivatives input[type=checkbox]").attr("checked", false); |
---|
963 | } |
---|
964 | {/footer_script} |
---|
965 | </div> |
---|
966 | |
---|
967 | <!-- progress bar --> |
---|
968 | <div id="regenerationMsg" class="bulkAction" style="display:none"> |
---|
969 | <p id="regenerationText" style="margin-bottom:10px;">{'Generate multiple size images'|@translate}</p> |
---|
970 | <span class="progressBar" id="progressBar"></span> |
---|
971 | <input type="hidden" name="regenerateSuccess" value="0"> |
---|
972 | <input type="hidden" name="regenerateError" value="0"> |
---|
973 | </div> |
---|
974 | |
---|
975 | <!-- plugins --> |
---|
976 | {if !empty($element_set_global_plugins_actions)} |
---|
977 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
978 | <div id="action_{$action.ID}" class="bulkAction"> |
---|
979 | {if !empty($action.CONTENT)}{$action.CONTENT}{/if} |
---|
980 | </div> |
---|
981 | {/foreach} |
---|
982 | {/if} |
---|
983 | |
---|
984 | <p id="applyActionBlock" style="display:none" class="actionButtons"> |
---|
985 | <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p> |
---|
986 | |
---|
987 | </div> <!-- #permitAction --> |
---|
988 | </fieldset> |
---|
989 | |
---|
990 | </form> |
---|
991 | |
---|
992 | </div> <!-- #batchManagerGlobal --> |
---|