Changeset 28821 for trunk/admin/themes/default/js/batchManagerGlobal.js
- Timestamp:
- Jun 28, 2014, 6:45:37 AM (10 years ago)
- File:
-
- 1 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 });
Note: See TracChangeset
for help on using the changeset viewer.