brotherton-erpnext/erpnext/templates/includes/product_search_box.html

29 lines
820 B
HTML
Raw Normal View History

<div class="product-search pull-right">
<form class="form-inline form-search">
<div class="input-group">
<input class="form-control" type="text" id="product-search"
placeholder="Product Search...">
<span class="input-group-btn">
<button class="btn btn-default" type="button" id="btn-product-search">
<i class="icon-search"></i></button>
</span>
</div>
</form>
</div>
2014-04-21 16:40:15 +00:00
<script>
frappe.ready(function() {
$("#btn-product-search").click(function() {
var txt = $("#product-search").val();
if(txt) {
2015-05-27 20:48:06 +00:00
window.location.href="/product_search?q=" + txt;
2014-04-21 16:40:15 +00:00
}
return false;
});
$("#product-search").keypress(function(e) {
if(e.which==13) $("#btn-product-search").click();
});
$(".form-search").on("submit", function() { return false; });
});
</script>