Merge pull request #3364 from anandpdoshi/anand-may-27

[fix] Product Search
This commit is contained in:
Rushabh Mehta 2015-05-28 10:19:58 +05:30
commit f4f9be9233
3 changed files with 16 additions and 3 deletions

View File

@ -48,3 +48,9 @@
.product-text {
padding: 15px 0px;
}
@media (max-width: 767px) {
.product-search {
width: 100%;
margin-bottom: 13px;
}
}

View File

@ -51,3 +51,10 @@
.product-text {
padding: 15px 0px;
}
@media (max-width: 767px) {
.product-search {
width: 100%;
margin-bottom: 13px;
}
}

View File

@ -2,7 +2,7 @@
frappe.ready(function() {
$(".product-search").remove();
$('<div class="product-search">\
$('<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...">\
@ -12,13 +12,13 @@ frappe.ready(function() {
</span>\
</div>\
</form>\
</div>').appendTo(".page-header-right");
</div>').prependTo(".page-header-block");
$('.dropdown-toggle').dropdown();
$("#btn-product-search").click(function() {
var txt = $("#product-search").val();
if(txt) {
window.location.href="product_search?q=" + txt;
window.location.href="/product_search?q=" + txt;
}
return false;
});