fixes to products
This commit is contained in:
parent
f35992f695
commit
8b96b05163
@ -31,7 +31,11 @@ feed_dict = {
|
||||
# Support
|
||||
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
||||
'Maintenance Visit':['To %(customer_name)s', '#4169E1'],
|
||||
'Support Ticket': ['[%(status)s] %(subject)s', '#000080']
|
||||
'Support Ticket': ['[%(status)s] %(subject)s', '#000080'],
|
||||
|
||||
# Website
|
||||
'Web Page': ['%(title)s', '#00080'],
|
||||
'Blog': ['%(title)s', '#00080']
|
||||
}
|
||||
|
||||
def make_feed(feedtype, doctype, name, owner, subject, color):
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="web-main-section">
|
||||
<h1 class="products-category"></h1>
|
||||
<div class="products-search">
|
||||
<input name="products-search" /><button class="btn">Search</button>
|
||||
<input name="products-search" /><button class="btn" style="margin-left: 7px">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="web-side-section">
|
||||
|
@ -46,8 +46,11 @@ erpnext.products.make_product_list = function(wrapper) {
|
||||
run_btn: $(wrapper).find('.products-search .btn').get(0),
|
||||
hide_refresh: true,
|
||||
get_query: function() {
|
||||
var srch = $('input[name="products-search"]').val()
|
||||
var search_cond = 'and (t1.short_description like "%%(srch)s%"\
|
||||
or t1.title like "%%(srch)s%")';
|
||||
args = {
|
||||
searchstr: $('input[name="products-search"]').val() || '',
|
||||
search_cond: srch ? repl(search_cond, {srch:srch}) : '',
|
||||
cat: erpnext.products.cur_group
|
||||
};
|
||||
return repl('select t1.name, t1.title, t1.thumbnail_image, \
|
||||
@ -55,7 +58,7 @@ erpnext.products.make_product_list = function(wrapper) {
|
||||
from tabProduct t1, tabItem t2 \
|
||||
where t1.item = t2.name \
|
||||
and t2.item_group="%(cat)s" \
|
||||
and t1.short_description like "%%(searchstr)s%"', args)
|
||||
%(search_cond)s', args)
|
||||
},
|
||||
render_row: function(parent, data) {
|
||||
parent.innerHTML = repl('<div style="float:left; width: 115px;">\
|
||||
|
Loading…
x
Reference in New Issue
Block a user