mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
updates to product_page (search) and kb fix
This commit is contained in:
@@ -20,15 +20,19 @@
|
||||
<div class="layout-wrapper layout-wrapper-background">
|
||||
<div class="web-content" id="content-product-{{ name }}">
|
||||
<div class="layout-main" style="padding: 30px;">
|
||||
{% include 'html/product_search.html' %}
|
||||
{% include 'html/product_search_box.html' %}
|
||||
<h1>{{ item_name }}</h1>
|
||||
<div class="product-page-content">
|
||||
<div class="span6">
|
||||
{% if website_image %}
|
||||
<image class="item-main-image" src="files/{{ website_image }}" />
|
||||
{% else %}
|
||||
<div class="img-area"></div>
|
||||
<span style="font-size: 11px">This is an auto-generated Image</span>
|
||||
<div class="img-area">
|
||||
<div style='background-color: #eee; padding: 40px;
|
||||
width: 32px; font-size: 32px; color: #888;'>
|
||||
<i class='icon-camera'></i></div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
<br><br>
|
||||
</div>
|
||||
@@ -51,7 +55,7 @@
|
||||
{% for d in obj.doclist.get(
|
||||
{"doctype":"Item Website Specification"}) %}
|
||||
<tr>
|
||||
<td>{{ d.label }}</td>
|
||||
<td style="min-width: 150px;">{{ d.label }}</td>
|
||||
<td>{{ d.description }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<div class="pull-right">
|
||||
<form class="form-search">
|
||||
<div class="input-append">
|
||||
<input type="text" class="span2 search-query" id="product-search">
|
||||
<button class="btn"><i class="icon-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
24
website/templates/html/product_search_box.html
Normal file
24
website/templates/html/product_search_box.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="pull-right">
|
||||
<form class="form-search">
|
||||
<div class="input-append">
|
||||
<input type="text" class="span2 search-query" id="product-search">
|
||||
<button class="btn" id="btn-product-search">
|
||||
<i class="icon-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
// redirect to product search page
|
||||
$(document).ready(function() {
|
||||
$("#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>
|
||||
Reference in New Issue
Block a user