fixes to products
diff --git a/erpnext/home/__init__.py b/erpnext/home/__init__.py
index 5ebf7c0..d41b262 100644
--- a/erpnext/home/__init__.py
+++ b/erpnext/home/__init__.py
@@ -31,7 +31,11 @@
# 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):
diff --git a/erpnext/website/page/products/products.html b/erpnext/website/page/products/products.html
index 4ef5bf4..d12004e 100644
--- a/erpnext/website/page/products/products.html
+++ b/erpnext/website/page/products/products.html
@@ -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">
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
index 0e7dec5..ca30fee 100644
--- a/erpnext/website/page/products/products.js
+++ b/erpnext/website/page/products/products.js
@@ -46,8 +46,11 @@
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 @@
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;">\
diff --git a/js/app.js b/js/app.js
index 6b72451..cba6a84 100644
--- a/js/app.js
+++ b/js/app.js
@@ -12,7 +12,6 @@
wn.require('lib/js/lib/jquery.min.js');
wn.require('lib/js/legacy/tiny_mce_33/jquery.tinymce.js');
-wn.require('lib/js/wn/ui/status_bar.js');
// for datepicker
wn.require('lib/js/legacy/jquery/jquery-ui.min.js')