diff --git a/Netdisco/share/views/js/report.js b/Netdisco/share/views/js/report.js index d3126253..e99c8d68 100644 --- a/Netdisco/share/views/js/report.js +++ b/Netdisco/share/views/js/report.js @@ -8,4 +8,8 @@ // on load, check initial Device Search Options form state, // and on each change to the form fields - $(document).ready(function() { }); + $(document).ready(function() { + var tab = '[% report.tag %]' + var target = '#' + tab + '_pane'; + }); + diff --git a/Netdisco/share/views/js/search.js b/Netdisco/share/views/js/search.js index 32193ce4..501a41d3 100644 --- a/Netdisco/share/views/js/search.js +++ b/Netdisco/share/views/js/search.js @@ -7,13 +7,16 @@ .add("#device_form .clearfix select"); // this is called by do_search to support local code - // here, when tab changes need to strike/unstrike the navbar search + // which might need to act on the newly inserted content + // but which cannot use jQuery delegation via .on() function inner_view_processing(tab) { } - // on load, check initial Device Search Options form state, - // and on each change to the form fields + // on load, establish global delegations for now and future $(document).ready(function() { + var tab = '[% tab.tag %]' + var target = '#' + tab + '_pane'; + // sidebar form fields should change colour and have bin/copy icon form_inputs.each(function() {device_form_state($(this))}); form_inputs.change(function() {device_form_state($(this))});