copy current search string to new form's input box

This commit is contained in:
Oliver Gorwits
2012-01-08 11:16:50 +00:00
parent fc672f0524
commit b2ff5050ff
3 changed files with 7 additions and 9 deletions

View File

@@ -31,7 +31,6 @@
$(target).html( $(target).html(
'<div class="span3 alert-message info"><p>No matching records.</p></div>' '<div class="span3 alert-message info"><p>No matching records.</p></div>'
); );
return;
} }
// looks good, update the bookmark for this search // looks good, update the bookmark for this search
$(mark).attr('href', '/search?' + query); $(mark).attr('href', '/search?' + query);
@@ -58,7 +57,13 @@
$('#' + from + '_search').toggleClass('active'); $('#' + from + '_search').toggleClass('active');
$('#' + to + '_search').toggleClass('active'); $('#' + to + '_search').toggleClass('active');
$('#' + to + '_form').trigger("submit"); var to_form = '#' + to + '_form';
var from_form = '#' + from + '_form';
// copy current search string to new form's input box
$(to_form).find("input[name=q]").val(
$(from_form).find("input[name=q]").val()
);
$(to_form).trigger("submit");
}); });
// fix green background on search checkboxes // fix green background on search checkboxes

View File

@@ -1,3 +0,0 @@
<div class="clearfix">
<input class="span3" name="q" value="[% params.q %]" type="text"/>
</div>

View File

@@ -1,4 +0,0 @@
<div class="nd_search clearfix">
<button id="vlan_submit" type="submit" class="btn info">Search Again</button>
<a id="[% tab.id %]_bookmark" href="#"><img class="nd_bookmark" src="/images/glyphicons_072_bookmark.png"></a>
</div>