Clicking on a port to restrict search now uses AJAX instead of page get
This commit is contained in:
1
Changes
1
Changes
@@ -17,6 +17,7 @@
|
|||||||
* Replace jquery-collapser with Bootstrap's collapser
|
* Replace jquery-collapser with Bootstrap's collapser
|
||||||
* Upgraded to Twitter Bootstrap 2.1.0 - customized for 13px font 18px line
|
* Upgraded to Twitter Bootstrap 2.1.0 - customized for 13px font 18px line
|
||||||
* Factor out inventory queries to the Device ResultSet (closes #20)
|
* Factor out inventory queries to the Device ResultSet (closes #20)
|
||||||
|
* Clicking on a port to restrict search now uses AJAX instead of page get
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
[% END %]
|
[% END %]
|
||||||
</td>
|
</td>
|
||||||
[% IF params.c_port %]
|
[% IF params.c_port %]
|
||||||
<td><a class="nd_linkcell" href="[% uri_for('/device',
|
<td><a class="nd_linkcell nd_this_port_only" href="[% uri_for('/device',
|
||||||
vars.self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]">
|
vars.self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]">
|
||||||
[% row.port | html_entity %]
|
[% row.port | html_entity %]
|
||||||
</a></td>
|
</a></td>
|
||||||
|
|||||||
@@ -53,11 +53,12 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// clickable device port names can simply resubmit AJAX rather than
|
// clickable device port names can simply resubmit AJAX rather than
|
||||||
// fetch the whole page again. FIXME unused?
|
// fetch the whole page again.
|
||||||
$('.this_port_only').on('click', function() {
|
$('body').on('click', '.nd_this_port_only', function() {
|
||||||
event.preventDefault(); // link is real so prevent page submit
|
event.preventDefault(); // link is real so prevent page submit
|
||||||
|
|
||||||
var port = $(this).text();
|
var port = $(this).text();
|
||||||
|
port = $.trim(port);
|
||||||
sweep.val(port);
|
sweep.val(port);
|
||||||
|
|
||||||
$('.field_clear_icon').show();
|
$('.field_clear_icon').show();
|
||||||
|
|||||||
Reference in New Issue
Block a user