Changeset 28821 for trunk/admin/themes/default
- Timestamp:
- Jun 28, 2014, 6:45:37 AM (10 years ago)
- Location:
- trunk/admin/themes/default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/js/batchManagerGlobal.js
r28806 r28821 1 2 /* ********** Filters*/ 3 function filter_enable(filter) { 4 /* show the filter*/ 5 $("#"+filter).show(); 6 7 /* check the checkbox to declare we use this filter */ 8 $("input[type=checkbox][name="+filter+"_use]").prop("checked", true); 9 10 /* forbid to select this filter in the addFilter list */ 11 $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled"); 12 } 13 14 function filter_disable(filter) { 15 /* hide the filter line */ 16 $("#"+filter).hide(); 17 18 /* uncheck the checkbox to declare we do not use this filter */ 19 $("input[name="+filter+"_use]").prop("checked", false); 20 21 /* give the possibility to show it again */ 22 $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled"); 23 } 24 25 $(".removeFilter").click(function () { 26 var filter = $(this).parent('li').attr("id"); 27 filter_disable(filter); 28 29 return false; 30 }); 31 32 $("#addFilter").change(function () { 33 var filter = $(this).prop("value"); 34 filter_enable(filter); 35 $(this).prop("value", -1); 36 }); 37 38 $("#removeFilters").click(function() { 39 $("#filterList li").each(function() { 40 var filter = $(this).attr("id"); 41 filter_disable(filter); 42 }); 43 return false; 44 }); 45 46 47 48 /* ********** Thumbs */ 1 49 2 50 /* Shift-click: select all photos between the click and the shift+click */ … … 44 92 }); 45 93 94 jQuery("a.preview-box").colorbox(); 95 96 97 98 /* ********** Actions*/ 99 46 100 jQuery('[data-datepicker]').pwgDatepicker({ 47 101 showTimepicker: true, … … 49 103 }); 50 104 51 jQuery("a.preview-box").colorbox(); 105 jQuery('[data-add-album]').pwgAddAlbum({ cache: categoriesCache }); 106 107 $("input[name=remove_author]").click(function () { 108 if ($(this).is(':checked')) { 109 $("input[name=author]").hide(); 110 } 111 else { 112 $("input[name=author]").show(); 113 } 114 }); 115 116 $("input[name=remove_title]").click(function () { 117 if ($(this).is(':checked')) { 118 $("input[name=title]").hide(); 119 } 120 else { 121 $("input[name=title]").show(); 122 } 123 }); 124 125 $("input[name=remove_date_creation]").click(function () { 126 if ($(this).is(':checked')) { 127 $("#set_date_creation").hide(); 128 } 129 else { 130 $("#set_date_creation").show(); 131 } 132 }); -
trunk/admin/themes/default/template/batch_manager_global.tpl
r28806 r28821 1 1 {include file='include/datepicker.inc.tpl' load_mode='async'} 2 2 {include file='include/colorbox.inc.tpl' load_mode='async'} 3 {include file='include/add_album.inc.tpl' }3 {include file='include/add_album.inc.tpl' load_mode='async'} 4 4 5 5 {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} … … 36 36 'Add': '{'Create'|translate}' 37 37 }}); 38 38 39 39 {* <!-- CATEGORIES --> *} 40 varcategoriesCache = new CategoriesCache({40 window.categoriesCache = new CategoriesCache({ 41 41 serverKey: '{$CACHE_KEYS.categories}', 42 42 serverId: '{$CACHE_KEYS._hash}', 43 43 rootUrl: '{$ROOT_URL}' 44 44 }); 45 45 46 46 categoriesCache.selectize(jQuery('[data-selectize=categories]'), { 47 47 filter: function(categories, options) { … … 50 50 return !cat.dir; 51 51 }); 52 52 53 53 if (filtered.length > 0) { 54 54 jQuery('.albumDissociate').show(); 55 55 options.default = filtered[0].id; 56 56 } 57 57 58 58 return filtered; 59 59 } … … 63 63 } 64 64 }); 65 66 jQuery('[data-add-album]').pwgAddAlbum({ cache: categoriesCache }); 65 67 66 }); 68 67 … … 76 75 done: 0, 77 76 total: 0, 78 77 79 78 finished: function() {ldelim} 80 79 return derivatives.done == derivatives.total && derivatives.elements && derivatives.elements.length==0; … … 86 85 var selectedMessage_all = "{'All %d photos are selected'|@translate}"; 87 86 88 var width_str = '{'Width'|@translate}';89 var height_str = '{'Height'|@translate}';90 var max_width_str = '{'Maximum width'|@translate}';91 var max_height_str = '{'Maximum height'|@translate}';92 87 {literal} 93 94 88 function progress(success) { 95 89 jQuery('#progressBar').progressBar(derivatives.done, { … … 193 187 194 188 if ($(checkbox).is(':checked')) { 195 $(wrap2).addClass("thumbSelected"); 189 $(wrap2).addClass("thumbSelected"); 196 190 } 197 191 else { 198 $(wrap2).removeClass('thumbSelected'); 192 $(wrap2).removeClass('thumbSelected'); 199 193 } 200 194 … … 215 209 216 210 $(checkbox).prop('checked', true); 217 $(wrap2).addClass("thumbSelected"); 211 $(wrap2).addClass("thumbSelected"); 218 212 }); 219 213 } … … 227 221 228 222 $(checkbox).prop('checked', false); 229 $(wrap2).removeClass("thumbSelected"); 223 $(wrap2).removeClass("thumbSelected"); 230 224 }); 231 225 checkPermitAction(); … … 243 237 244 238 if ($(checkbox).is(':checked')) { 245 $(wrap2).addClass("thumbSelected"); 239 $(wrap2).addClass("thumbSelected"); 246 240 } 247 241 else { 248 $(wrap2).removeClass('thumbSelected'); 242 $(wrap2).removeClass('thumbSelected'); 249 243 } 250 244 }); … … 260 254 }); 261 255 262 $("input[name=remove_author]").click(function () {263 if ($(this).is(':checked')) {264 $("input[name=author]").hide();265 }266 else {267 $("input[name=author]").show();268 }269 });270 271 $("input[name=remove_title]").click(function () {272 if ($(this).is(':checked')) {273 $("input[name=title]").hide();274 }275 else {276 $("input[name=title]").show();277 }278 });279 280 $("input[name=remove_date_creation]").click(function () {281 if ($(this).is(':checked')) {282 $("#set_date_creation").hide();283 }284 else {285 $("#set_date_creation").show();286 }287 });288 289 $(".removeFilter").click(function () {290 var filter = $(this).parent('li').attr("id");291 filter_disable(filter);292 293 return false;294 });295 296 function filter_enable(filter) {297 /* show the filter*/298 $("#"+filter).show();299 300 /* check the checkbox to declare we use this filter */301 $("input[type=checkbox][name="+filter+"_use]").prop("checked", true);302 303 /* forbid to select this filter in the addFilter list */304 $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled");305 }306 307 $("#addFilter").change(function () {308 var filter = $(this).prop("value");309 filter_enable(filter);310 $(this).prop("value", -1);311 });312 313 function filter_disable(filter) {314 /* hide the filter line */315 $("#"+filter).hide();316 317 /* uncheck the checkbox to declare we do not use this filter */318 $("input[name="+filter+"_use]").prop("checked", false);319 320 /* give the possibility to show it again */321 $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled");322 }323 324 $("#removeFilters").click(function() {325 $("#filterList li").each(function() {326 var filter = $(this).attr("id");327 filter_disable(filter);328 });329 return false;330 });331 256 332 257 jQuery('#applyAction').click(function() { … … 338 263 return confirm(are_you_sure); 339 264 } 340 265 341 266 if (action != 'generate_derivatives' 342 267 || derivatives.finished() ) … … 347 272 jQuery('.bulkAction').hide(); 348 273 349 var queuedManager = jQuery.manageAjax.create('queued', { 350 queue: true, 274 var queuedManager = jQuery.manageAjax.create('queued', { 275 queue: true, 351 276 cacheResponse: false, 352 277 maxRequests: 1 … … 366 291 jQuery('select[name="selectAction"]').hide(); 367 292 jQuery('#regenerationMsg').show(); 368 293 369 294 progress(); 370 295 getDerivativeUrls(); … … 393 318 for (var i=0; i < data.result.urls.length; i++) { 394 319 jQuery.manageAjax.add("queued", { 395 type: 'GET', 396 url: data.result.urls[i] + "&ajaxload=true", 320 type: 'GET', 321 url: data.result.urls[i] + "&ajaxload=true", 397 322 dataType: 'json', 398 323 success: ( function(data) { derivatives.done++; progress(true) }), … … 407 332 408 333 checkPermitAction(); 409 334 410 335 /* dimensions sliders */ 411 336 /** … … 418 343 } 419 344 } 420 345 421 346 return 0; 422 347 } … … 518 443 } 519 444 }); 520 445 521 446 $("a.dimensions-choice").click(function() {ldelim} 522 447 var type = jQuery(this).data("type"); … … 528 453 ); 529 454 530 $("#filter_dimension_"+type+"_slider").slider("values", 1, 455 $("#filter_dimension_"+type+"_slider").slider("values", 1, 531 456 getSliderKeyFromValue(max, dimension_values[type]) 532 457 ); … … 557 482 </select> 558 483 </li> 559 484 560 485 <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}> 561 486 <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> … … 566 491 <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label> 567 492 </li> 568 493 569 494 <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}> 570 495 <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> … … 577 502 <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> 578 503 </li> 579 504 580 505 <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}> 581 506 <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> … … 587 512 <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> 588 513 </li> 589 514 590 515 <li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}> 591 516 <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> 592 517 <input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}> 593 518 {'Dimensions'|@translate} 594 519 595 520 <blockquote> 596 521 {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span> 597 522 | <a class="dimensions-choice" data-type="width" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|@translate}</a> 598 523 <div id="filter_dimension_width_slider"></div> 599 524 600 525 {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span> 601 526 | <a class="dimensions-choice" data-type="height" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|@translate}</a> 602 527 <div id="filter_dimension_height_slider"></div> 603 528 604 529 {'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> 605 530 {if isset($dimensions.ratio_portrait)} … … 618 543 <div id="filter_dimension_ratio_slider"></div> 619 544 </blockquote> 620 545 621 546 <input type="hidden" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}"> 622 547 <input type="hidden" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}"> … … 815 740 {assign var='authorDefaultValue' value='Type here the author name'|@translate} 816 741 <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;"> 817 </div> 742 </div> 818 743 819 744 <!-- title --> … … 882 807 {/footer_script} 883 808 </div> 884 809 885 810 <!-- progress bar --> 886 811 <div id="regenerationMsg" class="bulkAction" style="display:none"> -
trunk/admin/themes/default/template/header.tpl
r28690 r28821 11 11 12 12 {strip} 13 {combine_css path="admin/themes/default/fontello/css/fontello.css" order=-10} 13 14 {foreach from=$themes item=theme} 14 15 {if $theme.load_css} … … 19 20 {/if} 20 21 {/foreach} 21 22 {combine_css path="admin/themes/default/fontello/css/fontello.css"}23 22 24 23 {combine_script id='jquery' path='themes/default/js/jquery.min.js'}
Note: See TracChangeset
for help on using the changeset viewer.