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