[8394] | 1 | {include file='include/tag_selection.inc.tpl'} |
---|
| 2 | {include file='include/datepicker.inc.tpl'} |
---|
| 3 | |
---|
| 4 | {footer_script}{literal} |
---|
| 5 | pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); |
---|
| 6 | {/literal}{/footer_script} |
---|
| 7 | |
---|
| 8 | {combine_script id='jquery.fcbkcomplete' load='footer' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'} |
---|
[10389] | 9 | {combine_script id='jquery.progressBar' load='footer' path='plugins/regenerateThumbnails/js/jquery.progressbar.min.js'} |
---|
| 10 | {combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'} |
---|
[8394] | 11 | |
---|
| 12 | {footer_script require='jquery.fcbkcomplete'}{literal} |
---|
| 13 | jQuery(document).ready(function() { |
---|
| 14 | jQuery("#tags").fcbkcomplete({ |
---|
| 15 | json_url: "admin.php?fckb_tags=1", |
---|
[10422] | 16 | cache: false, |
---|
[8394] | 17 | filter_case: false, |
---|
| 18 | filter_hide: true, |
---|
| 19 | firstselected: true, |
---|
| 20 | filter_selected: true, |
---|
| 21 | maxitems: 100, |
---|
| 22 | newel: true |
---|
| 23 | }); |
---|
| 24 | }); |
---|
| 25 | {/literal}{/footer_script} |
---|
| 26 | |
---|
| 27 | {footer_script} |
---|
| 28 | var nb_thumbs_page = {$nb_thumbs_page}; |
---|
| 29 | var nb_thumbs_set = {$nb_thumbs_set}; |
---|
| 30 | var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}"; |
---|
[10389] | 31 | var elements = new Array(); |
---|
| 32 | var all_elements = [{','|@implode:$all_elements}]; |
---|
[8394] | 33 | |
---|
| 34 | var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}"; |
---|
| 35 | var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}"; |
---|
| 36 | var selectedMessage_all = "{'All %d photos are selected'|@translate}"; |
---|
[10389] | 37 | var regenerateThumbnailsMessage = "{'Thumbnails generation in progress...'|@translate}"; |
---|
[10454] | 38 | var regenerateWebsizeMessage = "{'Photos generation in progress...'|@translate}"; |
---|
[10553] | 39 | |
---|
| 40 | var width_str = '{'Width'|@translate}'; |
---|
| 41 | var height_str = '{'Height'|@translate}'; |
---|
| 42 | var max_width_str = '{'Maximum Width'|@translate}'; |
---|
| 43 | var max_height_str = '{'Maximum Height'|@translate}'; |
---|
[8394] | 44 | {literal} |
---|
| 45 | function str_repeat(i, m) { |
---|
| 46 | for (var o = []; m > 0; o[--m] = i); |
---|
| 47 | return o.join(''); |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | function sprintf() { |
---|
| 51 | var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = ''; |
---|
| 52 | while (f) { |
---|
| 53 | if (m = /^[^\x25]+/.exec(f)) { |
---|
| 54 | o.push(m[0]); |
---|
| 55 | } |
---|
| 56 | else if (m = /^\x25{2}/.exec(f)) { |
---|
| 57 | o.push('%'); |
---|
| 58 | } |
---|
| 59 | else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) { |
---|
| 60 | if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) { |
---|
| 61 | throw('Too few arguments.'); |
---|
| 62 | } |
---|
| 63 | if (/[^s]/.test(m[7]) && (typeof(a) != 'number')) { |
---|
| 64 | throw('Expecting number but found ' + typeof(a)); |
---|
| 65 | } |
---|
| 66 | switch (m[7]) { |
---|
| 67 | case 'b': a = a.toString(2); break; |
---|
| 68 | case 'c': a = String.fromCharCode(a); break; |
---|
| 69 | case 'd': a = parseInt(a); break; |
---|
| 70 | case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break; |
---|
| 71 | case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break; |
---|
| 72 | case 'o': a = a.toString(8); break; |
---|
| 73 | case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break; |
---|
| 74 | case 'u': a = Math.abs(a); break; |
---|
| 75 | case 'x': a = a.toString(16); break; |
---|
| 76 | case 'X': a = a.toString(16).toUpperCase(); break; |
---|
| 77 | } |
---|
| 78 | a = (/[def]/.test(m[7]) && m[2] && a >= 0 ? '+'+ a : a); |
---|
| 79 | c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' '; |
---|
| 80 | x = m[5] - String(a).length - s.length; |
---|
| 81 | p = m[5] ? str_repeat(c, x) : ''; |
---|
| 82 | o.push(s + (m[4] ? a + p : p + a)); |
---|
| 83 | } |
---|
| 84 | else { |
---|
| 85 | throw('Huh ?!'); |
---|
| 86 | } |
---|
| 87 | f = f.substring(m[0].length); |
---|
| 88 | } |
---|
| 89 | return o.join(''); |
---|
| 90 | } |
---|
| 91 | |
---|
[10389] | 92 | function progress(val, max, success) { |
---|
| 93 | jQuery('#progressBar').progressBar(val, { |
---|
| 94 | max: max, |
---|
| 95 | textFormat: 'fraction', |
---|
| 96 | boxImage: 'themes/default/images/progressbar.gif', |
---|
| 97 | barImage: 'themes/default/images/progressbg_orange.gif' |
---|
| 98 | }); |
---|
| 99 | type = success ? 'regenerateSuccess': 'regenerateError' |
---|
| 100 | s = jQuery('[name="'+type+'"]').val(); |
---|
| 101 | jQuery('[name="'+type+'"]').val(++s); |
---|
| 102 | |
---|
| 103 | if (val == max) |
---|
| 104 | jQuery('#applyAction').click(); |
---|
| 105 | } |
---|
| 106 | |
---|
[8394] | 107 | $(document).ready(function() { |
---|
| 108 | function checkPermitAction() { |
---|
| 109 | var nbSelected = 0; |
---|
| 110 | if ($("input[name=setSelected]").is(':checked')) { |
---|
| 111 | nbSelected = nb_thumbs_set; |
---|
| 112 | } |
---|
| 113 | else { |
---|
| 114 | $(".thumbnails input[type=checkbox]").each(function() { |
---|
| 115 | if ($(this).is(':checked')) { |
---|
| 116 | nbSelected++; |
---|
| 117 | } |
---|
| 118 | }); |
---|
| 119 | } |
---|
| 120 | |
---|
| 121 | if (nbSelected == 0) { |
---|
| 122 | $("#permitAction").hide(); |
---|
| 123 | $("#forbidAction").show(); |
---|
| 124 | } |
---|
| 125 | else { |
---|
| 126 | $("#permitAction").show(); |
---|
| 127 | $("#forbidAction").hide(); |
---|
| 128 | } |
---|
| 129 | |
---|
| 130 | $("#applyOnDetails").text( |
---|
| 131 | sprintf( |
---|
| 132 | applyOnDetails_pattern, |
---|
| 133 | nbSelected |
---|
| 134 | ) |
---|
| 135 | ); |
---|
| 136 | |
---|
| 137 | // display the number of currently selected photos in the "Selection" fieldset |
---|
| 138 | if (nbSelected == 0) { |
---|
| 139 | $("#selectedMessage").text( |
---|
| 140 | sprintf( |
---|
| 141 | selectedMessage_none, |
---|
| 142 | nb_thumbs_set |
---|
| 143 | ) |
---|
| 144 | ); |
---|
| 145 | } |
---|
| 146 | else if (nbSelected == nb_thumbs_set) { |
---|
| 147 | $("#selectedMessage").text( |
---|
| 148 | sprintf( |
---|
| 149 | selectedMessage_all, |
---|
| 150 | nb_thumbs_set |
---|
| 151 | ) |
---|
| 152 | ); |
---|
| 153 | } |
---|
| 154 | else { |
---|
| 155 | $("#selectedMessage").text( |
---|
| 156 | sprintf( |
---|
| 157 | selectedMessage_pattern, |
---|
| 158 | nbSelected, |
---|
| 159 | nb_thumbs_set |
---|
| 160 | ) |
---|
| 161 | ); |
---|
| 162 | } |
---|
| 163 | } |
---|
| 164 | |
---|
| 165 | $('img.thumbnail').tipTip({ |
---|
| 166 | 'delay' : 0, |
---|
| 167 | 'fadeIn' : 200, |
---|
[9466] | 168 | 'fadeOut' : 200 |
---|
[8394] | 169 | }); |
---|
| 170 | |
---|
| 171 | $("[id^=action_]").hide(); |
---|
| 172 | |
---|
[9806] | 173 | $("select[name=selectAction]").change(function () { |
---|
[8394] | 174 | $("[id^=action_]").hide(); |
---|
| 175 | $("#action_"+$(this).attr("value")).show(); |
---|
[9806] | 176 | |
---|
| 177 | if ($(this).val() != -1) { |
---|
| 178 | $("#applyActionBlock").show(); |
---|
| 179 | } |
---|
| 180 | else { |
---|
| 181 | $("#applyActionBlock").hide(); |
---|
| 182 | } |
---|
[8394] | 183 | }); |
---|
| 184 | |
---|
| 185 | $(".wrap1 label").click(function () { |
---|
| 186 | $("input[name=setSelected]").attr('checked', false); |
---|
| 187 | |
---|
| 188 | var wrap2 = $(this).children(".wrap2"); |
---|
| 189 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
| 190 | |
---|
| 191 | if ($(checkbox).is(':checked')) { |
---|
| 192 | $(wrap2).addClass("thumbSelected"); |
---|
| 193 | } |
---|
| 194 | else { |
---|
| 195 | $(wrap2).removeClass('thumbSelected'); |
---|
| 196 | } |
---|
| 197 | |
---|
| 198 | checkPermitAction(); |
---|
| 199 | }); |
---|
| 200 | |
---|
| 201 | $("#selectAll").click(function () { |
---|
[9064] | 202 | $("input[name=setSelected]").attr('checked', false); |
---|
| 203 | selectPageThumbnails(); |
---|
| 204 | checkPermitAction(); |
---|
| 205 | return false; |
---|
| 206 | }); |
---|
| 207 | |
---|
| 208 | function selectPageThumbnails() { |
---|
[8394] | 209 | $(".thumbnails label").each(function() { |
---|
| 210 | var wrap2 = $(this).children(".wrap2"); |
---|
| 211 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
| 212 | |
---|
| 213 | $(checkbox).attr('checked', true); |
---|
| 214 | $(wrap2).addClass("thumbSelected"); |
---|
| 215 | }); |
---|
[9064] | 216 | } |
---|
[8394] | 217 | |
---|
| 218 | $("#selectNone").click(function () { |
---|
| 219 | $("input[name=setSelected]").attr('checked', false); |
---|
| 220 | |
---|
| 221 | $(".thumbnails label").each(function() { |
---|
| 222 | var wrap2 = $(this).children(".wrap2"); |
---|
| 223 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
| 224 | |
---|
| 225 | $(checkbox).attr('checked', false); |
---|
| 226 | $(wrap2).removeClass("thumbSelected"); |
---|
| 227 | }); |
---|
| 228 | checkPermitAction(); |
---|
| 229 | return false; |
---|
| 230 | }); |
---|
| 231 | |
---|
| 232 | $("#selectInvert").click(function () { |
---|
| 233 | $("input[name=setSelected]").attr('checked', false); |
---|
| 234 | |
---|
| 235 | $(".thumbnails label").each(function() { |
---|
| 236 | var wrap2 = $(this).children(".wrap2"); |
---|
| 237 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
| 238 | |
---|
| 239 | $(checkbox).attr('checked', !$(checkbox).is(':checked')); |
---|
| 240 | |
---|
| 241 | if ($(checkbox).is(':checked')) { |
---|
| 242 | $(wrap2).addClass("thumbSelected"); |
---|
| 243 | } |
---|
| 244 | else { |
---|
| 245 | $(wrap2).removeClass('thumbSelected'); |
---|
| 246 | } |
---|
| 247 | }); |
---|
| 248 | checkPermitAction(); |
---|
| 249 | return false; |
---|
| 250 | }); |
---|
| 251 | |
---|
| 252 | $("#selectSet").click(function () { |
---|
[9064] | 253 | selectPageThumbnails(); |
---|
[8394] | 254 | $("input[name=setSelected]").attr('checked', true); |
---|
| 255 | checkPermitAction(); |
---|
| 256 | return false; |
---|
| 257 | }); |
---|
| 258 | |
---|
| 259 | $("input[name=remove_author]").click(function () { |
---|
| 260 | if ($(this).is(':checked')) { |
---|
| 261 | $("input[name=author]").hide(); |
---|
| 262 | } |
---|
| 263 | else { |
---|
| 264 | $("input[name=author]").show(); |
---|
| 265 | } |
---|
| 266 | }); |
---|
| 267 | |
---|
[8408] | 268 | $("input[name=remove_title]").click(function () { |
---|
[8394] | 269 | if ($(this).is(':checked')) { |
---|
[8408] | 270 | $("input[name=title]").hide(); |
---|
[8394] | 271 | } |
---|
| 272 | else { |
---|
[8408] | 273 | $("input[name=title]").show(); |
---|
[8394] | 274 | } |
---|
| 275 | }); |
---|
| 276 | |
---|
| 277 | $("input[name=remove_date_creation]").click(function () { |
---|
| 278 | if ($(this).is(':checked')) { |
---|
| 279 | $("#set_date_creation").hide(); |
---|
| 280 | } |
---|
| 281 | else { |
---|
| 282 | $("#set_date_creation").show(); |
---|
| 283 | } |
---|
| 284 | }); |
---|
| 285 | |
---|
| 286 | $(".removeFilter").click(function () { |
---|
| 287 | var filter = $(this).parent('li').attr("id"); |
---|
| 288 | filter_disable(filter); |
---|
| 289 | |
---|
| 290 | return false; |
---|
| 291 | }); |
---|
| 292 | |
---|
| 293 | function filter_enable(filter) { |
---|
| 294 | /* show the filter*/ |
---|
| 295 | $("#"+filter).show(); |
---|
| 296 | |
---|
| 297 | /* check the checkbox to declare we use this filter */ |
---|
| 298 | $("input[type=checkbox][name="+filter+"_use]").attr("checked", true); |
---|
| 299 | |
---|
| 300 | /* forbid to select this filter in the addFilter list */ |
---|
| 301 | $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled"); |
---|
| 302 | } |
---|
| 303 | |
---|
| 304 | $("#addFilter").change(function () { |
---|
| 305 | var filter = $(this).attr("value"); |
---|
| 306 | filter_enable(filter); |
---|
| 307 | $(this).attr("value", -1); |
---|
| 308 | }); |
---|
| 309 | |
---|
| 310 | function filter_disable(filter) { |
---|
| 311 | /* hide the filter line */ |
---|
| 312 | $("#"+filter).hide(); |
---|
| 313 | |
---|
| 314 | /* uncheck the checkbox to declare we do not use this filter */ |
---|
| 315 | $("input[name="+filter+"_use]").removeAttr("checked"); |
---|
| 316 | |
---|
| 317 | /* give the possibility to show it again */ |
---|
| 318 | $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled"); |
---|
| 319 | } |
---|
| 320 | |
---|
| 321 | $("#removeFilters").click(function() { |
---|
| 322 | $("#filterList li").each(function() { |
---|
| 323 | var filter = $(this).attr("id"); |
---|
| 324 | filter_disable(filter); |
---|
| 325 | }); |
---|
| 326 | return false; |
---|
| 327 | }); |
---|
| 328 | |
---|
[10389] | 329 | jQuery('#applyAction').click(function() { |
---|
[10454] | 330 | if (elements.length != 0) |
---|
| 331 | { |
---|
| 332 | return true; |
---|
| 333 | } |
---|
| 334 | else if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails') |
---|
| 335 | { |
---|
| 336 | type = 'thumbnail'; |
---|
| 337 | maxRequests = 3; |
---|
[10389] | 338 | maxwidth = jQuery('input[name="thumb_maxwidth"]').val(); |
---|
| 339 | maxheight = jQuery('input[name="thumb_maxheight"]').val(); |
---|
[10454] | 340 | regenerationText = regenerateThumbnailsMessage; |
---|
[10553] | 341 | crop = jQuery('input[name="thumb_crop"]').is(':checked'); |
---|
| 342 | follow_orientation = jQuery('input[name="thumb_follow_orientation"]').is(':checked'); |
---|
[10454] | 343 | } |
---|
| 344 | else if(jQuery('[name="selectAction"]').val() == 'regenerateWebsize') |
---|
| 345 | { |
---|
| 346 | type = 'websize'; |
---|
| 347 | maxRequests = 1; |
---|
| 348 | maxwidth = jQuery('input[name="websize_maxwidth"]').val(); |
---|
| 349 | maxheight = jQuery('input[name="websize_maxheight"]').val(); |
---|
| 350 | regenerationText = regenerateWebsizeMessage; |
---|
[10553] | 351 | crop = false; |
---|
| 352 | follow_orientation = false; |
---|
[10454] | 353 | } |
---|
| 354 | else return true; |
---|
[10389] | 355 | |
---|
[10454] | 356 | jQuery('.bulkAction').hide(); |
---|
| 357 | jQuery('#regenerationText').html(regenerationText); |
---|
| 358 | |
---|
| 359 | var queuedManager = jQuery.manageAjax.create('queued', { |
---|
| 360 | queue: true, |
---|
| 361 | cacheResponse: false, |
---|
| 362 | maxRequests: maxRequests |
---|
| 363 | }); |
---|
| 364 | |
---|
| 365 | if (jQuery('input[name="setSelected"]').attr('checked')) |
---|
| 366 | elements = all_elements; |
---|
| 367 | else |
---|
| 368 | jQuery('input[name="selection[]"]').each(function() { |
---|
| 369 | if (jQuery(this).attr('checked')) { |
---|
| 370 | elements.push(jQuery(this).val()); |
---|
| 371 | } |
---|
[10389] | 372 | }); |
---|
| 373 | |
---|
[10454] | 374 | progressBar_max = elements.length; |
---|
| 375 | todo = 0; |
---|
| 376 | |
---|
| 377 | jQuery('#applyActionBlock').hide(); |
---|
| 378 | jQuery('select[name="selectAction"]').hide(); |
---|
| 379 | jQuery('#regenerationMsg').show(); |
---|
| 380 | |
---|
| 381 | jQuery('#progressBar').progressBar(0, { |
---|
| 382 | max: progressBar_max, |
---|
| 383 | textFormat: 'fraction', |
---|
| 384 | boxImage: 'themes/default/images/progressbar.gif', |
---|
| 385 | barImage: 'themes/default/images/progressbg_orange.gif' |
---|
| 386 | }); |
---|
| 387 | |
---|
| 388 | for (i=0;i<elements.length;i++) { |
---|
| 389 | queuedManager.add({ |
---|
| 390 | type: 'GET', |
---|
| 391 | url: 'ws.php', |
---|
| 392 | data: { |
---|
| 393 | method: 'pwg.images.resize', |
---|
| 394 | type: type, |
---|
| 395 | maxwidth: maxwidth, |
---|
| 396 | maxheight: maxheight, |
---|
[10553] | 397 | crop: crop, |
---|
| 398 | follow_orientation: follow_orientation, |
---|
[10454] | 399 | image_id: elements[i], |
---|
| 400 | format: 'json' |
---|
| 401 | }, |
---|
| 402 | dataType: 'json', |
---|
| 403 | success: ( function(data) { progress(++todo, progressBar_max, data['result']) }), |
---|
| 404 | error: ( function(data) { progress(++todo, progressBar_max, false) }) |
---|
| 405 | }); |
---|
[10389] | 406 | } |
---|
[10454] | 407 | return false; |
---|
[10389] | 408 | }); |
---|
| 409 | |
---|
[10553] | 410 | function toggleCropFields(prefix) { |
---|
| 411 | if (jQuery("#"+prefix+"_crop").is(':checked')) { |
---|
| 412 | jQuery("#"+prefix+"_width_th").text(width_str); |
---|
| 413 | jQuery("#"+prefix+"_height_th").text(height_str); |
---|
| 414 | jQuery("#"+prefix+"_follow_orientation_tr").show(); |
---|
| 415 | } |
---|
| 416 | else { |
---|
| 417 | jQuery("#"+prefix+"_width_th").text(max_width_str); |
---|
| 418 | jQuery("#"+prefix+"_height_th").text(max_height_str); |
---|
| 419 | jQuery("#"+prefix+"_follow_orientation_tr").hide(); |
---|
| 420 | } |
---|
| 421 | } |
---|
| 422 | |
---|
| 423 | toggleCropFields("thumb"); |
---|
| 424 | jQuery("#thumb_crop").click(function () {toggleCropFields("thumb")}); |
---|
| 425 | |
---|
[10164] | 426 | checkPermitAction() |
---|
| 427 | }); |
---|
| 428 | |
---|
| 429 | jQuery(window).load(function() { |
---|
[10012] | 430 | var max_dim = 20; |
---|
| 431 | $(".thumbnails img").each(function () { |
---|
| 432 | if ($(this).height() > (max_dim-20)) |
---|
| 433 | max_dim = $(this).height() + 20; |
---|
| 434 | if ($(this).width() > (max_dim-20)) |
---|
| 435 | max_dim = $(this).width() + 20; |
---|
| 436 | $("ul.thumbnails span, ul.thumbnails label").css('width', max_dim+'px').css('height', max_dim+'px'); |
---|
| 437 | }); |
---|
[8394] | 438 | }); |
---|
| 439 | {/literal}{/footer_script} |
---|
| 440 | |
---|
[9815] | 441 | <div id="batchManagerGlobal"> |
---|
[8394] | 442 | |
---|
[8408] | 443 | <h2>{'Batch Manager'|@translate}</h2> |
---|
[8394] | 444 | |
---|
| 445 | <form action="{$F_ACTION}" method="post"> |
---|
| 446 | |
---|
| 447 | <fieldset> |
---|
| 448 | <legend>{'Filter'|@translate}</legend> |
---|
| 449 | |
---|
| 450 | <ul id="filterList"> |
---|
| 451 | <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}> |
---|
[8408] | 452 | <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a> |
---|
[8394] | 453 | <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}> |
---|
[8408] | 454 | {'predefined filter'|@translate} |
---|
[8394] | 455 | <select name="filter_prefilter"> |
---|
[10380] | 456 | {foreach from=$prefilters item=prefilter} |
---|
| 457 | <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> |
---|
[10354] | 458 | {/foreach} |
---|
[8394] | 459 | </select> |
---|
| 460 | </li> |
---|
| 461 | <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}> |
---|
| 462 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
| 463 | <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}> |
---|
[8408] | 464 | {'album'|@translate} |
---|
[8394] | 465 | <select style="width:400px" name="filter_category" size="1"> |
---|
| 466 | {html_options options=$filter_category_options selected=$filter_category_options_selected} |
---|
| 467 | </select> |
---|
| 468 | <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label> |
---|
| 469 | </li> |
---|
| 470 | <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}> |
---|
| 471 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
| 472 | <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}> |
---|
| 473 | {'Who can see these photos?'|@translate} |
---|
| 474 | <select name="filter_level" size="1"> |
---|
| 475 | {html_options options=$filter_level_options selected=$filter_level_options_selected} |
---|
| 476 | </select> |
---|
| 477 | </li> |
---|
| 478 | </ul> |
---|
| 479 | |
---|
| 480 | <p class="actionButtons" style=""> |
---|
| 481 | <select id="addFilter"> |
---|
[8408] | 482 | <option value="-1">{'Add a filter'|@translate}</option> |
---|
[8394] | 483 | <option disabled="disabled">------------------</option> |
---|
[8408] | 484 | <option value="filter_prefilter">{'predefined filter'|@translate}</option> |
---|
| 485 | <option value="filter_category">{'album'|@translate}</option> |
---|
[8394] | 486 | <option value="filter_level">{'Who can see these photos?'|@translate}</option> |
---|
| 487 | </select> |
---|
| 488 | <!-- <input id="removeFilters" class="submit" type="submit" value="Remove all filters" name="removeFilters"> --> |
---|
[8408] | 489 | <a id="removeFilters" href="">{'Remove all filters'|@translate}</a> |
---|
[8394] | 490 | </p> |
---|
| 491 | |
---|
| 492 | <p class="actionButtons" id="applyFilterBlock"> |
---|
[8408] | 493 | <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter"> |
---|
[8394] | 494 | </p> |
---|
| 495 | |
---|
| 496 | </fieldset> |
---|
| 497 | |
---|
| 498 | <fieldset> |
---|
| 499 | |
---|
| 500 | <legend>{'Selection'|@translate}</legend> |
---|
| 501 | |
---|
| 502 | {if !empty($thumbnails)} |
---|
| 503 | <p id="checkActions"> |
---|
| 504 | {'Select:'|@translate} |
---|
[8408] | 505 | {if $nb_thumbs_set > $nb_thumbs_page} |
---|
| 506 | <a href="#" id="selectAll">{'The whole page'|@translate}</a>, |
---|
| 507 | <a href="#" id="selectSet">{'The whole set'|@translate}</a>, |
---|
| 508 | {else} |
---|
| 509 | <a href="#" id="selectAll">{'All'|@translate}</a>, |
---|
| 510 | {/if} |
---|
[8394] | 511 | <a href="#" id="selectNone">{'None'|@translate}</a>, |
---|
| 512 | <a href="#" id="selectInvert">{'Invert'|@translate}</a> |
---|
| 513 | |
---|
| 514 | <span id="selectedMessage"></span> |
---|
| 515 | |
---|
| 516 | <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}> |
---|
| 517 | </p> |
---|
| 518 | |
---|
| 519 | <ul class="thumbnails"> |
---|
| 520 | {foreach from=$thumbnails item=thumbnail} |
---|
| 521 | {if in_array($thumbnail.ID, $selection)} |
---|
| 522 | {assign var='isSelected' value=true} |
---|
| 523 | {else} |
---|
| 524 | {assign var='isSelected' value=false} |
---|
| 525 | {/if} |
---|
| 526 | |
---|
| 527 | <li><span class="wrap1"> |
---|
| 528 | <label> |
---|
| 529 | <span class="wrap2{if $isSelected} thumbSelected{/if}"> |
---|
| 530 | {if $thumbnail.LEVEL > 0} |
---|
| 531 | <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em> |
---|
| 532 | <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em> |
---|
| 533 | {/if} |
---|
| 534 | <span> |
---|
| 535 | <img src="{$thumbnail.TN_SRC}" |
---|
| 536 | alt="{$thumbnail.FILE}" |
---|
| 537 | title="{$thumbnail.TITLE|@escape:'html'}" |
---|
| 538 | class="thumbnail"> |
---|
| 539 | </span></span> |
---|
| 540 | <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" {if $isSelected}checked="checked"{/if}> |
---|
| 541 | </label> |
---|
| 542 | </span> |
---|
| 543 | </li> |
---|
| 544 | {/foreach} |
---|
| 545 | </ul> |
---|
| 546 | |
---|
| 547 | {if !empty($navbar) } |
---|
| 548 | <div style="clear:both;"> |
---|
| 549 | |
---|
| 550 | <div style="float:left"> |
---|
| 551 | {include file='navigation_bar.tpl'|@get_extent:'navbar'} |
---|
| 552 | </div> |
---|
| 553 | |
---|
| 554 | <div style="float:right;margin-top:10px;">{'display'|@translate} |
---|
| 555 | <a href="{$U_DISPLAY}&display=20">20</a> |
---|
| 556 | · <a href="{$U_DISPLAY}&display=50">50</a> |
---|
| 557 | · <a href="{$U_DISPLAY}&display=100">100</a> |
---|
| 558 | · <a href="{$U_DISPLAY}&display=all">{'all'|@translate}</a> |
---|
[8723] | 559 | {'photos per page'|@translate} |
---|
[8394] | 560 | </div> |
---|
| 561 | </div> |
---|
| 562 | {/if} |
---|
| 563 | |
---|
| 564 | {else} |
---|
[8408] | 565 | <div>{'No photo in the current set.'|@translate}</div> |
---|
[8394] | 566 | {/if} |
---|
| 567 | </fieldset> |
---|
| 568 | |
---|
| 569 | <fieldset id="action"> |
---|
| 570 | |
---|
| 571 | <legend>{'Action'|@translate}</legend> |
---|
[8408] | 572 | <div id="forbidAction"{if count($selection) != 0}style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div> |
---|
[8394] | 573 | <div id="permitAction"{if count($selection) == 0}style="display:none"{/if}> |
---|
| 574 | |
---|
| 575 | <select name="selectAction"> |
---|
[8408] | 576 | <option value="-1">{'Choose an action'|@translate}</option> |
---|
[8394] | 577 | <option disabled="disabled">------------------</option> |
---|
| 578 | {if isset($show_delete_form) } |
---|
| 579 | <option value="delete">{'Delete selected photos'|@translate}</option> |
---|
| 580 | {/if} |
---|
[8408] | 581 | <option value="associate">{'Associate to album'|@translate}</option> |
---|
[8394] | 582 | {if !empty($dissociate_options)} |
---|
[8408] | 583 | <option value="dissociate">{'Dissociate from album'|@translate}</option> |
---|
[8394] | 584 | {/if} |
---|
| 585 | <option value="add_tags">{'add tags'|@translate}</option> |
---|
| 586 | {if !empty($DEL_TAG_SELECTION)} |
---|
| 587 | <option value="del_tags">{'remove tags'|@translate}</option> |
---|
| 588 | {/if} |
---|
| 589 | <option value="author">{'Set author'|@translate}</option> |
---|
[8408] | 590 | <option value="title">{'Set title'|@translate}</option> |
---|
[8394] | 591 | <option value="date_creation">{'Set creation date'|@translate}</option> |
---|
| 592 | <option value="level">{'Who can see these photos?'|@translate}</option> |
---|
[8422] | 593 | <option value="metadata">{'synchronize metadata'|@translate}</option> |
---|
[8394] | 594 | {if ($IN_CADDIE)} |
---|
[9124] | 595 | <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option> |
---|
[8394] | 596 | {else} |
---|
[8408] | 597 | <option value="add_to_caddie">{'add to caddie'|@translate}</option> |
---|
[8394] | 598 | {/if} |
---|
[10389] | 599 | <option value="regenerateThumbnails">{'Regenerate Thumbnails'|@translate}</option> |
---|
[10454] | 600 | <option value="regenerateWebsize">{'Regenerate Websize Photos'|@translate}</option> |
---|
[9916] | 601 | {if !empty($element_set_global_plugins_actions)} |
---|
| 602 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
| 603 | <option value="{$action.ID}">{$action.NAME}</option> |
---|
| 604 | {/foreach} |
---|
| 605 | {/if} |
---|
[8394] | 606 | </select> |
---|
| 607 | |
---|
| 608 | <!-- delete --> |
---|
| 609 | <div id="action_delete" class="bulkAction"> |
---|
| 610 | <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p> |
---|
| 611 | </div> |
---|
| 612 | |
---|
| 613 | <!-- associate --> |
---|
| 614 | <div id="action_associate" class="bulkAction"> |
---|
| 615 | <select style="width:400px" name="associate" size="1"> |
---|
| 616 | {html_options options=$associate_options } |
---|
| 617 | </select> |
---|
| 618 | </div> |
---|
| 619 | |
---|
| 620 | <!-- dissociate --> |
---|
| 621 | <div id="action_dissociate" class="bulkAction"> |
---|
| 622 | <select style="width:400px" name="dissociate" size="1"> |
---|
| 623 | {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if} |
---|
| 624 | </select> |
---|
| 625 | </div> |
---|
| 626 | |
---|
| 627 | |
---|
| 628 | <!-- add_tags --> |
---|
| 629 | <div id="action_add_tags" class="bulkAction"> |
---|
| 630 | <select id="tags" name="add_tags"> |
---|
| 631 | </select> |
---|
| 632 | </div> |
---|
| 633 | |
---|
| 634 | <!-- del_tags --> |
---|
| 635 | <div id="action_del_tags" class="bulkAction"> |
---|
| 636 | {$DEL_TAG_SELECTION} |
---|
| 637 | </div> |
---|
| 638 | |
---|
| 639 | <!-- author --> |
---|
| 640 | <div id="action_author" class="bulkAction"> |
---|
[8408] | 641 | <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br> |
---|
| 642 | {assign var='authorDefaultValue' value='Type here the author name'|@translate} |
---|
[8394] | 643 | <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;"> |
---|
| 644 | </div> |
---|
| 645 | |
---|
[8408] | 646 | <!-- title --> |
---|
| 647 | <div id="action_title" class="bulkAction"> |
---|
| 648 | <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br> |
---|
| 649 | {assign var='titleDefaultValue' value='Type here the title'|@translate} |
---|
| 650 | <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;"> |
---|
[8394] | 651 | </div> |
---|
| 652 | |
---|
| 653 | <!-- date_creation --> |
---|
| 654 | <div id="action_date_creation" class="bulkAction"> |
---|
[8408] | 655 | <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br> |
---|
[8394] | 656 | <div id="set_date_creation"> |
---|
| 657 | <select id="date_creation_day" name="date_creation_day"> |
---|
| 658 | <option value="0">--</option> |
---|
| 659 | {section name=day start=1 loop=32} |
---|
| 660 | <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option> |
---|
| 661 | {/section} |
---|
| 662 | </select> |
---|
| 663 | <select id="date_creation_month" name="date_creation_month"> |
---|
| 664 | {html_options options=$month_list selected=$DATE_CREATION_MONTH} |
---|
| 665 | </select> |
---|
| 666 | <input id="date_creation_year" |
---|
| 667 | name="date_creation_year" |
---|
| 668 | type="text" |
---|
| 669 | size="4" |
---|
| 670 | maxlength="4" |
---|
| 671 | value="{$DATE_CREATION_YEAR}"> |
---|
| 672 | <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"> |
---|
| 673 | </div> |
---|
| 674 | </div> |
---|
| 675 | |
---|
| 676 | <!-- level --> |
---|
| 677 | <div id="action_level" class="bulkAction"> |
---|
| 678 | <select name="level" size="1"> |
---|
| 679 | {html_options options=$level_options selected=$level_options_selected} |
---|
| 680 | </select> |
---|
| 681 | </div> |
---|
| 682 | |
---|
[8422] | 683 | <!-- metadata --> |
---|
| 684 | <div id="action_metadata" class="bulkAction"> |
---|
| 685 | </div> |
---|
| 686 | |
---|
[10389] | 687 | <!-- regenerate thumbnails --> |
---|
| 688 | <div id="action_regenerateThumbnails" class="bulkAction"> |
---|
[10454] | 689 | <table style="margin-left:20px;"> |
---|
[10389] | 690 | <tr> |
---|
[10553] | 691 | <th><label for="thumb_crop">{'Crop'|@translate}</label></th> |
---|
| 692 | <td><input type="checkbox" name="thumb_crop" id="thumb_crop" {if $upload_form_settings.thumb_crop}checked="checked"{/if}></td> |
---|
| 693 | </tr> |
---|
| 694 | <tr id="thumb_follow_orientation_tr"> |
---|
| 695 | <th><label for="thumb_follow_orientation">{'Follow Orientation'|@translate}</label></th> |
---|
| 696 | <td><input type="checkbox" name="thumb_follow_orientation" id="thumb_follow_orientation" {if $upload_form_settings.thumb_follow_orientation}checked="checked"{/if}></td> |
---|
| 697 | </tr> |
---|
| 698 | <tr> |
---|
| 699 | <th id="thumb_width_th">{'Maximum Width'|@translate}</th> |
---|
[10389] | 700 | <td><input type="text" name="thumb_maxwidth" value="{$upload_form_settings.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td> |
---|
| 701 | </tr> |
---|
| 702 | <tr> |
---|
[10553] | 703 | <th id="thumb_height_th">{'Maximum Height'|@translate}</th> |
---|
[10389] | 704 | <td><input type="text" name="thumb_maxheight" value="{$upload_form_settings.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td> |
---|
| 705 | </tr> |
---|
| 706 | <tr> |
---|
| 707 | <th>{'Image Quality'|@translate}</th> |
---|
| 708 | <td><input type="text" name="thumb_quality" value="{$upload_form_settings.thumb_quality}" size="3" maxlength="3"> %</td> |
---|
| 709 | </tr> |
---|
| 710 | </table> |
---|
| 711 | </div> |
---|
| 712 | |
---|
[10454] | 713 | <!-- regenerate websize --> |
---|
| 714 | <div id="action_regenerateWebsize" class="bulkAction"> |
---|
| 715 | <p> |
---|
| 716 | <img src="admin/themes/default/icon/warning.png" alt="!" style="vertical-align:middle;"> |
---|
| 717 | {'Only photos with HD can be regenerated!'|@translate} |
---|
| 718 | </p> |
---|
| 719 | |
---|
| 720 | <table style="margin:10px 20px;"> |
---|
| 721 | <tr> |
---|
| 722 | <th>{'Maximum Width'|@translate}</th> |
---|
| 723 | <td><input type="text" name="websize_maxwidth" value="{$upload_form_settings.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td> |
---|
| 724 | </tr> |
---|
| 725 | <tr> |
---|
| 726 | <th>{'Maximum Height'|@translate}</th> |
---|
| 727 | <td><input type="text" name="websize_maxheight" value="{$upload_form_settings.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td> |
---|
| 728 | </tr> |
---|
| 729 | <tr> |
---|
| 730 | <th>{'Image Quality'|@translate}</th> |
---|
| 731 | <td><input type="text" name="websize_quality" value="{$upload_form_settings.websize_quality}" size="3" maxlength="3"> %</td> |
---|
| 732 | </tr> |
---|
| 733 | </table> |
---|
| 734 | </div> |
---|
| 735 | |
---|
[10389] | 736 | <!-- progress bar --> |
---|
[10454] | 737 | <div id="regenerationMsg" class="bulkAction"> |
---|
[10389] | 738 | <p id="regenerationText" style="margin-bottom:10px;"></p> |
---|
| 739 | <span class="progressBar" id="progressBar"></span> |
---|
| 740 | <input type="hidden" name="regenerateSuccess" value="0"> |
---|
| 741 | <input type="hidden" name="regenerateError" value="0"> |
---|
| 742 | </div> |
---|
| 743 | |
---|
[9916] | 744 | <!-- plugins --> |
---|
| 745 | {if !empty($element_set_global_plugins_actions)} |
---|
| 746 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
| 747 | <div id="action_{$action.ID}" class="bulkAction"> |
---|
| 748 | {if !empty($action.CONTENT)}{$action.CONTENT}{/if} |
---|
| 749 | </div> |
---|
| 750 | {/foreach} |
---|
| 751 | {/if} |
---|
| 752 | |
---|
[8394] | 753 | <p id="applyActionBlock" style="display:none" class="actionButtons"> |
---|
[8407] | 754 | <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p> |
---|
[8394] | 755 | |
---|
| 756 | </div> <!-- #permitAction --> |
---|
| 757 | </fieldset> |
---|
| 758 | |
---|
| 759 | </form> |
---|
[9815] | 760 | |
---|
| 761 | </div> <!-- #batchManagerGlobal --> |
---|