Changeset 7609
- Timestamp:
- 12/05/12 09:44:10 (11 years ago)
- Location:
- trunk/prototype/modules/filters
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/filters/filters.css
r7596 r7609 124 124 .filter-manager-window .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 125 125 126 /*Custom zebraDialog - INICIO*/ 127 .custom-zebra-filter{ 128 z-index: 9999 !important; 129 } 130 div.ZebraDialogOverlay { 131 z-index: 9998 !important; 132 } 133 /*Custom zebraDialog - FIM*/ -
trunk/prototype/modules/filters/filters.js
r7484 r7609 48 48 if($.trim(list_container.find('[name="name"]').val()) == ""){ 49 49 $.Zebra_Dialog(get_lang("No name filled"),{ 50 'overlay_opacity': '0.5', 51 'custom_class': 'custom-zebra-filter', 50 52 'onClose': function(caption) { 51 53 list_container.find('[name="name"]').focus(); … … 56 58 }else if($.trim(list_container.find('[name="name"]').val()) == "vacation"){ 57 59 $.Zebra_Dialog(get_lang("Invalid name, 'vacation' is a reserved word"),{ 60 'overlay_opacity': '0.5', 61 'custom_class': 'custom-zebra-filter', 58 62 'onClose': function(caption) { 59 63 list_container.find('[name="name"]').val("").focus(); … … 68 72 if(filter_list[index].name == list_container.find('[name="name"]').val()){ 69 73 $.Zebra_Dialog(get_lang("There is already a filter with this name"),{ 74 'overlay_opacity': '0.5', 75 'custom_class': 'custom-zebra-filter', 70 76 'onClose': function(caption) { 71 77 list_container.find('[name="name"]').val("").focus(); … … 88 94 if($(".sizeRule").val() != "" && er_num.test($(".sizeRule").val()) == false) { 89 95 $.Zebra_Dialog(get_lang("Size rule must be a number"),{ 96 'overlay_opacity': '0.5', 97 'custom_class': 'custom-zebra-filter', 90 98 'onClose': function(caption) { 91 99 list_container.find('[name="actionType[]"]:checked').parent().find("input:text, textarea").focus(); … … 102 110 if(criteria == ""){ 103 111 $.Zebra_Dialog(get_lang("No criteria filled"),{ 112 'overlay_opacity': '0.5', 113 'custom_class': 'custom-zebra-filter', 104 114 'onClose': function(caption) { 105 115 list_container.find('[name="criteriaValue[]"]:first').focus(); … … 112 122 if($.trim(list_container.find('[name="actionType[]"]:checked').parent().find("input:text, textarea").val()) == ""){ 113 123 $.Zebra_Dialog(get_lang("Fill the action value"),{ 124 'overlay_opacity': '0.5', 125 'custom_class': 'custom-zebra-filter', 114 126 'onClose': function(caption) { 115 127 list_container.find('[name="actionType[]"]:checked').parent().find("input:text, textarea").focus(); … … 121 133 if(er_mail.test($.trim(list_container.find('[value="redirect"]:checked').parent().find("input:text").val())) == false && list_container.find('[name="actionType[]"]:checked').val() == 'redirect'){ 122 134 $.Zebra_Dialog(get_lang("Invalid mail"),{ 135 'overlay_opacity': '0.5', 136 'custom_class': 'custom-zebra-filter', 123 137 'onClose': function(caption) { 124 138 list_container.find('[name="actionType[]"]:checked').parent().find("input:text, textarea").focus(); … … 141 155 }); 142 156 if(hasValue){ 143 $.Zebra_Dialog('<strong>'+get_lang('Filter with alert')+'</strong><br>'+get_lang('If more than one criterion for the filter, the "Meeting all the criteria" must be selected')); 157 $.Zebra_Dialog('<strong>'+get_lang('Filter with alert')+'</strong><br>'+get_lang('If more than one criterion for the filter, the "Meeting all the criteria" must be selected'),{ 158 'overlay_opacity': '0.5', 159 'custom_class': 'custom-zebra-filter' 160 }); 144 161 return false; 145 162 } 146 163 }else{ 147 $.Zebra_Dialog('<strong>'+get_lang('Filter with alert')+'</strong><br>'+get_lang('The filter should be set as a criteria "Sender" and action "Archive folder"')); 164 $.Zebra_Dialog('<strong>'+get_lang('Filter with alert')+'</strong><br>'+get_lang('The filter should be set as a criteria "Sender" and action "Archive folder"'),{ 165 'overlay_opacity': '0.5', 166 'custom_class': 'custom-zebra-filter' 167 }); 148 168 return false; 149 169 } … … 225 245 if((filter.actions[i].type == "fileinto" && first_fileinto_action) || filter.actions[i].type == "setflag"){ 226 246 actions.parent().find('[value="'+filter.actions[i].parameter+'"]').attr("selected", "selected"); 227 if(filter.actions[i].type == "fileinto")228 first_fileinto_action =false;247 // if(filter.actions[i].type == "fileinto") 248 // first_fileinto_action =false; 229 249 } 230 250 /*A condição abaixo é executada quando uma segunda action do tipo "fileinto" for encontrada*/ 231 251 if(filter.actions[i].type == "fileinto" && !first_fileinto_action){ 232 252 $('.fileintoInbox').attr('checked', 'True'); 233 continue;234 } 235 /*O comando "continue" da condição acima faz com que estas linhas restantes sejam ignoradas*/ 236 actions.filter( '[value="' + filter.actions[i].type + '"]' ).attr("checked", "True"); 237 actions.filter( '[value="' + filter.actions[i].type + '"]' ).val( filter.actions[i].type ) 238 .siblings( '[name="actionParameter[]"]' ).val( filter.actions[i].parameter ); 253 }else{ 254 first_fileinto_action =false; 255 actions.filter( '[value="' + filter.actions[i].type + '"]' ).attr("checked", "True"); 256 actions.filter( '[value="' + filter.actions[i].type + '"]' ).val( filter.actions[i].type ) 257 .siblings( '[name="actionParameter[]"]' ).val( filter.actions[i].parameter ); 258 } 239 259 } 240 260 isExact.filter('[value="'+(filter.isExact != "false"? "and" : "or")+'"]').attr("checked", "True"); … … 401 421 DataLayer.remove( 'filter', filters[index].id ); 402 422 DataLayer.commit("filter", false, function(){ 403 $.Zebra_Dialog(get_lang("Lock User") + " " + email + " " + get_lang("removed")); 423 $.Zebra_Dialog(get_lang("Lock User") + " " + email + " " + get_lang("removed"),{ 424 'overlay_opacity': '0.5', 425 'custom_class': 'custom-zebra-filter' 426 }); 404 427 list_filters(); 405 428 getFromAlertRules(); … … 420 443 }); 421 444 DataLayer.commit("filter", false, function(){ 422 $.Zebra_Dialog(get_lang("User") + " " + email + " " + get_lang("blocked")); 445 $.Zebra_Dialog(get_lang("User") + " " + email + " " + get_lang("blocked"),{ 446 'overlay_opacity': '0.5', 447 'custom_class': 'custom-zebra-filter' 448 }); 423 449 list_filters(); 424 450 getFromAlertRules(); … … 746 772 'title': get_lang("Exclusion Confirmation"), 747 773 'buttons': [get_lang('Yes'), get_lang('No')], 774 'overlay_opacity': '0.5', 775 'custom_class': 'custom-zebra-filter', 748 776 'onClose': function(caption) { 749 777 if(caption == get_lang('Yes')){ … … 793 821 'title': get_lang("Exclusion Confirmation"), 794 822 'buttons': [get_lang('Yes'), get_lang('No')], 823 'overlay_opacity': '0.5', 824 'custom_class': 'custom-zebra-filter', 795 825 'onClose': function(caption) { 796 826 if(caption == get_lang('Yes')){ … … 866 896 }).end().filter(".submit").click(function(){ 867 897 if(list_container.find(".vacation-details-container .filter-textarea").val().length <= 0){ 868 $.Zebra_Dialog(get_lang('Write a message')); 898 $.Zebra_Dialog(get_lang('Write a message'),{ 899 'overlay_opacity': '0.5', 900 'custom_class': 'custom-zebra-filter' 901 }); 869 902 list_container.find(".vacation-details-container .filter-textarea").focus(); 870 903 }else{
Note: See TracChangeset
for help on using the changeset viewer.