refactor device ports sidebar params handling
This commit is contained in:
@@ -94,13 +94,13 @@
|
||||
[% IF tab.tag == 'ports' %]
|
||||
// to be fair I can't remember why we do this in JS and not from the app
|
||||
// perhaps because selecting form fields to go in the cookie is easier?
|
||||
var cookie = $('#ports_form').find('input,select')
|
||||
.not('#nd_port-query,input[name="q"],input[name="tab"]')
|
||||
.serializeArray();
|
||||
$('#ports_form').find('input[type="checkbox"]').map(function() {
|
||||
cookie.push({'name': 'columns', 'value': $(this).attr('name')});
|
||||
});
|
||||
$.cookie('nd_ports-form', $.param(cookie) ,{ expires: 365 });
|
||||
// var cookie = $('#ports_form').find('input,select')
|
||||
// .not('#nd_port-query,input[name="q"],input[name="tab"]')
|
||||
// .serializeArray();
|
||||
// $('#ports_form').find('input[type="checkbox"]').map(function() {
|
||||
// cookie.push({'name': 'columns', 'value': $(this).attr('name')});
|
||||
// });
|
||||
// $.cookie('nd_ports-form', $.param(cookie) ,{ expires: 365 });
|
||||
|
||||
// form reset icon on ports tab
|
||||
$('#nd_sidebar-reset-link').attr('href', uri_base + '/device?tab=[% tab.tag %]&reset=on&' +
|
||||
|
||||
Reference in New Issue
Block a user