Added some styling to the searchbox
This commit is contained in:
parent
7db15ada3e
commit
1259b2467b
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
<?=$form->input('product_search', array('label'=>'Search Product title', 'id'=>'productSearch'));?>
|
||||
|
||||
<button id="productSearchButton">Search</button>
|
||||
|
||||
<ul id="productList"></ul>
|
||||
|
||||
<div id="productsDiv"></div>
|
||||
|
|
|
|||
|
|
@ -1577,6 +1577,15 @@ div.address span {
|
|||
border: 1px solid;
|
||||
}
|
||||
|
||||
#productList {
|
||||
margin-top: 0.4em;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#productList li {
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
|
||||
table.lineItems {
|
||||
margin-top: 0.2em;
|
||||
border: 1px solid;
|
||||
|
|
@ -1682,3 +1691,4 @@ ul.document-buttons li {
|
|||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -297,12 +297,17 @@ $(function() {
|
|||
});
|
||||
|
||||
|
||||
//ProductSearch
|
||||
//Search for a Product
|
||||
$("#productSearch").live('change', function() {
|
||||
console.log("CHANGING");
|
||||
productSearch();
|
||||
});
|
||||
|
||||
$("#productSearchButton").live('click', function() {
|
||||
productSearch();
|
||||
});
|
||||
|
||||
function productSearch() {
|
||||
var searchVal = $("#productSearch").val();
|
||||
|
||||
|
||||
searchVal = searchVal.toLowerCase();
|
||||
var param = "term="+searchVal;
|
||||
|
||||
|
|
@ -314,15 +319,14 @@ $(function() {
|
|||
var link = "<li><a href=\"#\" class=\"search_product\" data-product-id=\""+id+"\">"+data[id]+"</a></li>";
|
||||
$("#productList").append(link);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//Click on a search product name.
|
||||
$(".search_product").live('click', function() {
|
||||
var productID = $(this).data('product-id');
|
||||
getProductDetails(productID);
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#productSelect").live('change',function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue