make port name clickable to restrict results only to that port

This commit is contained in:
Oliver Gorwits
2012-02-22 20:18:52 +00:00
parent d62d1aacf8
commit c2994bdc4f
2 changed files with 9 additions and 3 deletions

View File

@@ -23,9 +23,7 @@
[% END %] [% END %]
</td> </td>
[% IF params.c_port %] [% IF params.c_port %]
<td> <td><a class="this_port_only" href="#">[% row.port | html_entity %]</a></td>
[% row.port | html_entity %]
</td>
[% END %] [% END %]
[% IF params.c_descr %] [% IF params.c_descr %]
<td class="center_cell">[% row.descr | html_entity %]</td> <td class="center_cell">[% row.descr | html_entity %]</td>

View File

@@ -70,6 +70,14 @@
$('#ports_form').trigger('submit'); $('#ports_form').trigger('submit');
}); });
// make all port names clickable to restrict results to that port only
$('body').delegate('.this_port_only', 'click', function() {
var port = $(this).text();
sweep.val(port);
$('.field_clear_icon').show();
$('#ports_form').trigger('submit');
});
// everything starts hidden and then we show defaults // everything starts hidden and then we show defaults
$('#nd_collapse_legend').click(); $('#nd_collapse_legend').click();
}); });