firewall: move click() from tr to button #6991

Plus minor cleanups.
This commit is contained in:
Franco Fichtner 2023-11-14 17:40:33 +01:00
parent 5aaada600a
commit fdc8cc34fa

View File

@ -441,7 +441,7 @@ $( document ).ready(function() {
$("#iform").submit();
});
// link move buttons
// link apply button
$("#btn_apply").click(function(event){
event.preventDefault();
$("#action").val("apply");
@ -580,21 +580,20 @@ $( document ).ready(function() {
$("#"+tmp+"-rule-count").text($("tr."+tmp+"-rule").length);
}
if ($(this).hasClass('is_collapsed')) {
$("."+tmp+"-rule").hide();
$("tr."+tmp+"-rule").hide();
}
});
});
$(".expand_type").each(function(){
$("#expand-"+$(this).data('type')+"-rules").click(function(event){
$("#expand-"+$(this).data('type')).click(function(event){
event.preventDefault();
$(this).toggleClass('is_collapsed');
$(this).parent().parent().toggleClass('is_collapsed');
// trigger category change as this will show/hide all "rule" rows (and fires an event on .opnsense-rules )
$("#fw_category").change();
});
});
// tooltip interface list
$(".interface_tooltip").tooltip({
html: true,