mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
new listing and changed wn.widgets.listing to wn.ui.listing
This commit is contained in:
@@ -21,7 +21,7 @@ pscript['onload_{{ doc.name }}'] = function(wrapper) {
|
||||
var side = $(wrapper).find('.web-side-section')
|
||||
.append('<h4>Recent Posts</h4>').get(0);
|
||||
|
||||
wrapper.recent_list = new wn.widgets.Listing({
|
||||
wrapper.recent_list = new wn.ui.Listing({
|
||||
parent: side,
|
||||
query: 'select name, title, left(content, 100) as content from tabBlog\
|
||||
where ifnull(published,1)=1',
|
||||
@@ -39,7 +39,7 @@ pscript['onload_{{ doc.name }}'] = function(wrapper) {
|
||||
// comments
|
||||
$(wrapper).find('.web-main-section').append('<hr><h3>Comments</h3>');
|
||||
|
||||
wrapper.comment_list = new wn.widgets.Listing({
|
||||
wrapper.comment_list = new wn.ui.Listing({
|
||||
parent: $(wrapper).find('.web-main-section').get(0),
|
||||
query: 'select comment, comment_by_fullname, modified\
|
||||
from `tabComment Widget Record` where comment_doctype="Page"\
|
||||
|
||||
@@ -30,7 +30,7 @@ pscript["onload_{{ doc.page_name }}"] = function(wrapper) {
|
||||
});
|
||||
|
||||
// similar products
|
||||
wrapper.similar = new wn.widgets.Listing({
|
||||
wrapper.similar = new wn.ui.Listing({
|
||||
parent: $(wrapper).find('.similar-products').get(0),
|
||||
hide_refresh: true,
|
||||
page_length: 5,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
erpnext.product_item_group = {}
|
||||
|
||||
erpnext.make_product_categories = function(wrapper) {
|
||||
wrapper.category_list = new wn.widgets.Listing({
|
||||
wrapper.category_list = new wn.ui.Listing({
|
||||
parent: $(wrapper).find('.more-categories').get(0),
|
||||
query: 'select label, count(t2.name) as items, t1.item_group \
|
||||
from `tabProduct Group` t1, `tabProduct` t2, tabItem t3\
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
pscript.onload_blog = function(wrapper) {
|
||||
wrapper.blog_list = new wn.widgets.Listing({
|
||||
wrapper.blog_list = new wn.ui.Listing({
|
||||
parent: $(wrapper).find('.web-main-section').get(0),
|
||||
query: 'select tabBlog.name, title, left(content, 300) as content, tabBlog.modified, \
|
||||
ifnull(first_name, "") as first_name, ifnull(last_name, "") as last_name \
|
||||
|
||||
@@ -57,7 +57,7 @@ erpnext.products.get_group = function() {
|
||||
}
|
||||
|
||||
erpnext.products.make_product_list = function(wrapper) {
|
||||
wrapper.mainlist = new wn.widgets.Listing({
|
||||
wrapper.mainlist = new wn.ui.Listing({
|
||||
parent: $(wrapper).find('.web-main-section').get(0),
|
||||
run_btn: $(wrapper).find('.products-search .btn').get(0),
|
||||
hide_refresh: true,
|
||||
|
||||
Reference in New Issue
Block a user