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