[fix] Product Search

This commit is contained in:
Anand Doshi
2015-05-27 16:48:06 -04:00
parent 7f1d5efd5b
commit 81bded1afe
3 changed files with 16 additions and 3 deletions

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
frappe.ready(function() { frappe.ready(function() {
$(".product-search").remove(); $(".product-search").remove();
$('<div class="product-search">\ $('<div class="product-search pull-right">\
<form class="form-inline form-search">\ <form class="form-inline form-search">\
<div class="input-group">\ <div class="input-group">\
<input class="form-control" type="text" id="product-search" placeholder="Product Search...">\ <input class="form-control" type="text" id="product-search" placeholder="Product Search...">\
@@ -12,13 +12,13 @@ frappe.ready(function() {
</span>\ </span>\
</div>\ </div>\
</form>\ </form>\
</div>').appendTo(".page-header-right"); </div>').prependTo(".page-header-block");
$('.dropdown-toggle').dropdown(); $('.dropdown-toggle').dropdown();
$("#btn-product-search").click(function() { $("#btn-product-search").click(function() {
var txt = $("#product-search").val(); var txt = $("#product-search").val();
if(txt) { if(txt) {
window.location.href="product_search?q=" + txt; window.location.href="/product_search?q=" + txt;
} }
return false; return false;
}); });