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