function inner_view_processing() { // enable collapser on any large vlan lists $('.nd_collapse_vlans').collapser({ target: 'next', effect: 'slide', changeText: true, expandHtml: '
Show VLANs
', collapseHtml: '
Hide VLANs
', }); } // used by the tabbing interface to make sure the correct // ajax content is loaded var path = 'device'; $(document).ready(function() { $('#nd_collapse_columns').collapser({ target: 'next', effect: 'slide', changeText: true, expandHtml: '', collapseHtml: '', }); $('#nd_collapse_portprop').collapser({ target: 'next', effect: 'slide', changeText: true, expandHtml: '', collapseHtml: '', }); $('#nd_collapse_nodeprop').collapser({ target: 'next', effect: 'slide', changeText: true, expandHtml: '', collapseHtml: '', }); $('#nd_collapse_legend').collapser({ target: 'next', effect: 'slide', changeText: true, expandHtml: '', collapseHtml: '', }); // show or hide sweeping brush icon when field has content var sweep = $('#ports_form').find("input[name=f]"); if (sweep.val() === "") { $('.field_clear_icon').hide(); } else { $('.field_clear_icon').show(); } sweep.change(function() { if ($(this).val() === "") { $('.field_clear_icon').hide(); } else { $('.field_clear_icon').show(); } }); // handler for sweeping brush icon in port filter box $('.field_clear_icon').click(function() { sweep.val(''); $('.field_clear_icon').hide(); $('#ports_form').trigger('submit'); }); // clickable device port names can simply resubmit AJAX rather than // fetch the whole page again. $('body').delegate('.this_port_only', 'click', function() { event.preventDefault(); // link is real so prevent page submit var port = $(this).text(); sweep.val(port); $('.field_clear_icon').show(); $('#ports_form').trigger('submit'); }); // everything starts hidden and then we show defaults $('#nd_collapse_legend').click(); });