mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
website cleanups
This commit is contained in:
@@ -9,6 +9,6 @@
|
||||
</a>
|
||||
</div>
|
||||
<div style="height: 100px; overflow: hidden; font-size: 80%;">
|
||||
<h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4>
|
||||
<div style="margin-bottom: 2px;"><a href="{{ route or page_name }}">{{ item_name }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
</a>
|
||||
</div>
|
||||
<div style="height: 100px; overflow: hidden; font-size: 80%;">
|
||||
<h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4>
|
||||
<div><a href="{{ page_name }}">{{ item_name }}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
<div style="margin-bottom: 20px;">
|
||||
<form class="form-inline form-search row">
|
||||
<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>
|
||||
<script>
|
||||
// redirect to product search page
|
||||
frappe.ready(function() {
|
||||
$('.dropdown-toggle').dropdown();
|
||||
$("#btn-product-search").click(function() {
|
||||
var txt = $("#product-search").val();
|
||||
if(txt) {
|
||||
window.location.href="product_search?q=" + txt;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("#product-search").keypress(function(e) {
|
||||
if(e.which==13) $("#btn-product-search").click();
|
||||
});
|
||||
$(".form-search").on("submit", function() { return false; });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<script>
|
||||
frappe.ready(function() {
|
||||
$(".product-search").remove();
|
||||
|
||||
$('<div class="product-search">\
|
||||
<form class="form-inline form-search">\
|
||||
<div class="input-group">\
|
||||
<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>').appendTo(".page-header-right");
|
||||
|
||||
$('.dropdown-toggle').dropdown();
|
||||
$("#btn-product-search").click(function() {
|
||||
var txt = $("#product-search").val();
|
||||
if(txt) {
|
||||
window.location.href="product_search?q=" + txt;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("#product-search").keypress(function(e) {
|
||||
if(e.which==13) $("#btn-product-search").click();
|
||||
});
|
||||
$(".form-search").on("submit", function() { return false; });
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user