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