mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 01:14:46 +00:00
fixes to products
This commit is contained in:
@@ -31,7 +31,11 @@ feed_dict = {
|
|||||||
# Support
|
# Support
|
||||||
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
'Customer Issue': ['[%(status)s] %(description)s by %(customer_name)s', '#000080'],
|
||||||
'Maintenance Visit':['To %(customer_name)s', '#4169E1'],
|
'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):
|
def make_feed(feedtype, doctype, name, owner, subject, color):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="web-main-section">
|
<div class="web-main-section">
|
||||||
<h1 class="products-category"></h1>
|
<h1 class="products-category"></h1>
|
||||||
<div class="products-search">
|
<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>
|
</div>
|
||||||
<div class="web-side-section">
|
<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),
|
run_btn: $(wrapper).find('.products-search .btn').get(0),
|
||||||
hide_refresh: true,
|
hide_refresh: true,
|
||||||
get_query: function() {
|
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 = {
|
args = {
|
||||||
searchstr: $('input[name="products-search"]').val() || '',
|
search_cond: srch ? repl(search_cond, {srch:srch}) : '',
|
||||||
cat: erpnext.products.cur_group
|
cat: erpnext.products.cur_group
|
||||||
};
|
};
|
||||||
return repl('select t1.name, t1.title, t1.thumbnail_image, \
|
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 \
|
from tabProduct t1, tabItem t2 \
|
||||||
where t1.item = t2.name \
|
where t1.item = t2.name \
|
||||||
and t2.item_group="%(cat)s" \
|
and t2.item_group="%(cat)s" \
|
||||||
and t1.short_description like "%%(searchstr)s%"', args)
|
%(search_cond)s', args)
|
||||||
},
|
},
|
||||||
render_row: function(parent, data) {
|
render_row: function(parent, data) {
|
||||||
parent.innerHTML = repl('<div style="float:left; width: 115px;">\
|
parent.innerHTML = repl('<div style="float:left; width: 115px;">\
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ wn.settings.no_history = true;
|
|||||||
|
|
||||||
wn.require('lib/js/lib/jquery.min.js');
|
wn.require('lib/js/lib/jquery.min.js');
|
||||||
wn.require('lib/js/legacy/tiny_mce_33/jquery.tinymce.js');
|
wn.require('lib/js/legacy/tiny_mce_33/jquery.tinymce.js');
|
||||||
wn.require('lib/js/wn/ui/status_bar.js');
|
|
||||||
|
|
||||||
// for datepicker
|
// for datepicker
|
||||||
wn.require('lib/js/legacy/jquery/jquery-ui.min.js')
|
wn.require('lib/js/legacy/jquery/jquery-ui.min.js')
|
||||||
|
|||||||
Reference in New Issue
Block a user