brotherton-erpnext/website/templates/html/product_search_box.html
2013-08-21 17:48:08 +05:30

29 lines
917 B
HTML

<div class="col-md-12 clearfix">
<div class="pull-right" style="margin-top: 15px; margin-bottom: 15px;">
<form class="form-search">
<div class="input-group col-md-4 col-md-offset-8">
<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>
<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>