mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
os-firewall: only use uuid reference on initial load (https://github.com/opnsense/plugins/issues/1720)
This commit is contained in:
committed by
Ad Schellevis
parent
66e2b7a340
commit
8d53eece0b
@@ -1,5 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
let initial_load = true;
|
||||||
let grid = $("#grid-rules").UIBootgrid({
|
let grid = $("#grid-rules").UIBootgrid({
|
||||||
search:'/api/firewall/filter/searchItem/',
|
search:'/api/firewall/filter/searchItem/',
|
||||||
get:'/api/firewall/filter/getItem/',
|
get:'/api/firewall/filter/getItem/',
|
||||||
@@ -12,7 +13,10 @@
|
|||||||
// open edit dialog when opened with a uuid reference
|
// open edit dialog when opened with a uuid reference
|
||||||
if (window.location.hash !== "" && window.location.hash.split("-").length >= 4) {
|
if (window.location.hash !== "" && window.location.hash.split("-").length >= 4) {
|
||||||
grid.on('loaded.rs.jquery.bootgrid', function(){
|
grid.on('loaded.rs.jquery.bootgrid', function(){
|
||||||
$(".command-edit:eq(0)").clone(true).data('row-id', window.location.hash.substr(1)).click();
|
if (initial_load) {
|
||||||
|
$(".command-edit:eq(0)").clone(true).data('row-id', window.location.hash.substr(1)).click();
|
||||||
|
initial_load = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user