From 724bb471ee83f426a449bb2c7eb983c58a5de5dc Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 13 Nov 2012 12:32:11 +0530 Subject: [PATCH 1/2] added latest updates page --- home/page/latest_updates/__init__.py | 0 home/page/latest_updates/latest_updates.js | 37 ++++++++++++++++++ home/page/latest_updates/latest_updates.txt | 43 +++++++++++++++++++++ public/js/startup.js | 3 +- 4 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 home/page/latest_updates/__init__.py create mode 100644 home/page/latest_updates/latest_updates.js create mode 100644 home/page/latest_updates/latest_updates.txt diff --git a/home/page/latest_updates/__init__.py b/home/page/latest_updates/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js new file mode 100644 index 0000000000..2ff8feed00 --- /dev/null +++ b/home/page/latest_updates/latest_updates.js @@ -0,0 +1,37 @@ +erpnext.updates = [ + ["13th November 2012", [ + "General Ledger (new): Will show entries with 'Is Opening' as Opening.", + "General Ledger (new): Show against account entries if filtered by account.", + ]], + ["12th November 2012", [ + "Document Lists: Automatically Refresh lists when opened (again).", + "Messages: Popups will not be shown (annoying).", + "Email Digest: New option to get ten latest Open Support Tickets.", + "Journal Voucher: 'Against JV' will now be filtered by the Account selected.", + "Query Report: Allow user to rename and save reports.", + "Employee Leave Balance Report: Bugfix" + ]] +] + + +wn.pages['latest-updates'].onload = function(wrapper) { + wn.ui.make_app_page({ + parent: wrapper, + title: 'Latest Updates', + single_column: true + }); + + var parent = $(wrapper).find(".layout-main"); + + $("

Report issues by sending a mail to support@erpnext.com or \ + via GitHub Issues


").appendTo(parent); + + + $.each(erpnext.updates, function(i, day) { + $("

" + day[0] + "

").appendTo(parent); + $.each(day[1], function(j, item) { + $("

").html(item).appendTo(parent); + }) + $("


").appendTo(parent); + }); +} \ No newline at end of file diff --git a/home/page/latest_updates/latest_updates.txt b/home/page/latest_updates/latest_updates.txt new file mode 100644 index 0000000000..876c086de5 --- /dev/null +++ b/home/page/latest_updates/latest_updates.txt @@ -0,0 +1,43 @@ +# Page, latest-updates +[ + + # These values are common in all dictionaries + { + u'creation': '2012-11-13 11:55:09', + u'docstatus': 0, + u'modified': '2012-11-13 12:21:39', + u'modified_by': u'Administrator', + u'owner': u'Administrator' + }, + + # These values are common for all Page + { + u'doctype': u'Page', + 'module': u'Home', + u'name': u'__common__', + 'page_name': u'latest-updates', + 'standard': u'Yes', + 'title': u'Latest Updates' + }, + + # These values are common for all Page Role + { + u'doctype': u'Page Role', + u'name': u'__common__', + 'parent': u'latest-updates', + 'parentfield': u'roles', + 'parenttype': u'Page', + 'role': u'All' + }, + + # Page, latest-updates + { + u'doctype': u'Page', + u'name': u'latest-updates' + }, + + # Page Role + { + u'doctype': u'Page Role' + } +] \ No newline at end of file diff --git a/public/js/startup.js b/public/js/startup.js index 4efc2a3504..1757dc5d8e 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -53,7 +53,8 @@ erpnext.startup.start = function() { // border to the body // ------------------ $('footer').html(''); + Attributions and License | \ + Latest Updates'); // complete registration if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) { From c68fc3f3d7ee8426010eccbaa555c630a1a7068d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 13 Nov 2012 13:28:26 +0530 Subject: [PATCH 2/2] trial balance, export ledgers only and groups only --- accounts/page/trial_balance/trial_balance.js | 36 +++++++++++++++++++- home/page/latest_updates/latest_updates.js | 1 + startup/report_data_map.py | 8 +++-- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js index 3504ae0c98..3f47758f04 100644 --- a/accounts/page/trial_balance/trial_balance.js +++ b/accounts/page/trial_balance/trial_balance.js @@ -22,5 +22,39 @@ wn.pages['trial-balance'].onload = function(wrapper) { title: 'Trial Balance', single_column: true }); - erpnext.trial_balance = new erpnext.AccountTreeGrid(wrapper, 'Trial Balance'); + var TrialBalance = erpnext.AccountTreeGrid.extend({ + export: function() { + var msgbox = msgprint('

Select To Download:

\ +

Account Groups

\ +

Account Ledgers

\ +

'); + + var me = this; + + $(msgbox.body).find("button").click(function() { + var with_groups = $(msgbox.body).find("[name='with_groups']").is(":checked"); + var with_ledgers = $(msgbox.body).find("[name='with_ledgers']").is(":checked"); + + var data = wn.slickgrid_tools.get_view_data(me.columns, me.dataView, + function(row, item) { + if(with_groups) { + // pad row + for(var i=0; i