brotherton-erpnext/website/templates/html/product_search_box.html
2013-04-18 17:43:21 +05:30

28 lines
818 B
HTML

<div class="col-span-12 clearfix">
<div class="pull-right" style="margin-top: 15px;">
<form class="form-search">
<div class="input-append">
<input type="text" class="col-span-2 search-query"
id="product-search" placeholder="Product Search..." />
<button class="btn" id="btn-product-search">
<i class="icon-search"></i></button>
</div>
</form>
</div>
<script>
// redirect to product search page
$(document).ready(function() {
$('.dropdown-toggle').dropdown()
$("#btn-product-search").click(function() {
var txt = $("#product-search").val();
if(txt) {
window.location.href="product_search.html?q=" + txt;
}
return false;
});
$("#product-search").keypress(function(e) {
if(e.which==13) $("#product-search-btn").click();
})
})
</script>
</div>