enable csv icon link rewrite for all pages
This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
var form = '#' + tab + '_form';
|
||||
var query = $(form).serialize();
|
||||
|
||||
// this is needed otherwise we can 404 on url with traling slash
|
||||
if (query.length) { query = '/' + query }
|
||||
|
||||
$('#nd_csv-download').attr('href', '/ajax/content/' + type + '/' + tab + query);
|
||||
$('#nd_csv-download').attr('href',
|
||||
'/ajax/content/' + type + '/' + tab + '?' + query);
|
||||
}
|
||||
|
||||
// page title includes tab name and possibly device name
|
||||
@@ -58,6 +56,7 @@
|
||||
[% FOREACH tab IN settings._search_tabs %]
|
||||
$('[% "#${tab.tag}_form" %]').submit(function (event) {
|
||||
var pgtitle = update_page_title('[% tab.tag %]');
|
||||
update_csv_download_link('search', '[% tab.tag %]');
|
||||
update_browser_history('[% tab.tag %]', pgtitle);
|
||||
copy_navbar_to_sidebar('[% tab.tag %]');
|
||||
do_search(event, '[% tab.tag %]');
|
||||
@@ -70,8 +69,10 @@
|
||||
[% FOREACH tab IN settings._device_tabs %]
|
||||
$('[% "#${tab.tag}_form" %]').submit(function (event) {
|
||||
var pgtitle = update_page_title('[% tab.tag %]');
|
||||
update_csv_download_link('device', '[% tab.tag %]');
|
||||
update_browser_history('[% tab.tag %]', pgtitle);
|
||||
copy_navbar_to_sidebar('[% tab.tag %]');
|
||||
|
||||
[% IF tab.tag == 'ports' %]
|
||||
var cookie = $('#ports_form').find('input,select')
|
||||
.not('#nd_port-query,input[name="q"],input[name="tab"]')
|
||||
@@ -81,6 +82,7 @@
|
||||
});
|
||||
$.cookie('nd_ports-form', $.param(cookie) ,{ expires: 365 });
|
||||
[% END %]
|
||||
|
||||
do_search(event, '[% tab.tag %]');
|
||||
});
|
||||
[% END %]
|
||||
@@ -99,6 +101,7 @@
|
||||
// for the admin pages
|
||||
$('[% "#${task.tag}_form" %]').submit(function (event) {
|
||||
update_page_title('[% task.tag %]');
|
||||
update_csv_download_link('task', '[% task.tag %]');
|
||||
do_search(event, '[% task.tag %]');
|
||||
});
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user