diff --git a/src/www/firewall_nat.php b/src/www/firewall_nat.php index 5b6fe57af..95acac833 100644 --- a/src/www/firewall_nat.php +++ b/src/www/firewall_nat.php @@ -203,7 +203,8 @@ $( document ).ready(function() { }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("move"); @@ -211,13 +212,16 @@ $( document ).ready(function() { }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("toggle"); $("#iform").submit(); }); + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/firewall_nat_1to1.php b/src/www/firewall_nat_1to1.php index 1794b76f6..a26bbea38 100644 --- a/src/www/firewall_nat_1to1.php +++ b/src/www/firewall_nat_1to1.php @@ -153,7 +153,8 @@ $main_buttons = array( }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("move"); @@ -161,12 +162,15 @@ $main_buttons = array( }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("toggle"); $("#iform").submit(); }); + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/firewall_nat_npt.php b/src/www/firewall_nat_npt.php index 8d1c3a430..9ae8db522 100644 --- a/src/www/firewall_nat_npt.php +++ b/src/www/firewall_nat_npt.php @@ -155,7 +155,8 @@ $main_buttons = array( }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("move"); @@ -163,13 +164,15 @@ $main_buttons = array( }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("toggle"); $("#iform").submit(); }); - + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/firewall_nat_out.php b/src/www/firewall_nat_out.php index 412230dd9..1f56b2954 100644 --- a/src/www/firewall_nat_out.php +++ b/src/www/firewall_nat_out.php @@ -224,23 +224,24 @@ include("head.inc"); }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("move"); $("#iform").submit(); - event.preventDefault(); }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); var id = $(this).attr("id").split('_').pop(-1); $("#id").val(id); $("#action").val("toggle"); $("#iform").submit(); - event.preventDefault(); }); - + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/services_dyndns.php b/src/www/services_dyndns.php index 047ef81f0..4a28fcd00 100644 --- a/src/www/services_dyndns.php +++ b/src/www/services_dyndns.php @@ -96,11 +96,14 @@ $main_buttons = array( }); }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); $.post(window.location, {act: 'toggle', id:$(this).data("id")}, function(data) { location.reload(); }); }); + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/services_rfc2136.php b/src/www/services_rfc2136.php index 8e7ba5bbd..4c236b41c 100644 --- a/src/www/services_rfc2136.php +++ b/src/www/services_rfc2136.php @@ -94,11 +94,14 @@ $main_buttons = array( }); }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); $.post(window.location, {act: 'toggle', id:$(this).data("id")}, function(data) { location.reload(); }); }); + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/system_gateways.php b/src/www/system_gateways.php index aabdb68a1..15f6eb61a 100644 --- a/src/www/system_gateways.php +++ b/src/www/system_gateways.php @@ -270,6 +270,8 @@ $( document ).ready(function() { }] }); }); + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/system_routes.php b/src/www/system_routes.php index 7c32f26ca..dd345426e 100644 --- a/src/www/system_routes.php +++ b/src/www/system_routes.php @@ -206,13 +206,16 @@ $( document ).ready(function() { }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); var id = $(this).data("id"); $("#id").val(id); $("#act").val("move"); $("#iform").submit(); }); + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/vpn_openvpn_client.php b/src/www/vpn_openvpn_client.php index 2d41b9d27..6059b6dc8 100644 --- a/src/www/vpn_openvpn_client.php +++ b/src/www/vpn_openvpn_client.php @@ -414,20 +414,22 @@ $( document ).ready(function() { }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); $.post(window.location, {act: 'toggle', id:$(this).data("id")}, function(data) { location.reload(); }); }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); $("#id").val($(this).data("id")); $("#action").val("move"); $("#iform2").submit(); }); - - + // watch scroll position and set to last known on page load + watchScrollPosition(); }); diff --git a/src/www/vpn_openvpn_csc.php b/src/www/vpn_openvpn_csc.php index 6bb410916..e877471a0 100644 --- a/src/www/vpn_openvpn_csc.php +++ b/src/www/vpn_openvpn_csc.php @@ -283,14 +283,16 @@ $( document ).ready(function() { } }); // link toggle buttons - $(".act_toggle").click(function(){ + $(".act_toggle").click(function(event){ + event.preventDefault(); $.post(window.location, {act: 'toggle', id:$(this).data("id")}, function(data) { location.reload(); }); }); // link move buttons - $(".act_move").click(function(){ + $(".act_move").click(function(event){ + event.preventDefault(); $("#id").val($(this).data("id")); $("#action").val("move"); $("#iform2").submit(); @@ -348,7 +350,8 @@ $( document ).ready(function() { $("#ntp_server_enable").change(); $("#netbios_enable").change(); } - + // watch scroll position and set to last known on page load + watchScrollPosition(); }); //]]> diff --git a/src/www/vpn_openvpn_server.php b/src/www/vpn_openvpn_server.php index 6f7f216fe..4d376eb5f 100644 --- a/src/www/vpn_openvpn_server.php +++ b/src/www/vpn_openvpn_server.php @@ -426,6 +426,8 @@ legacy_html_escape_form_data($pconfig);