Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-11-14 07:29:44 +01:00
commit 0314750fb0
11 changed files with 20 additions and 51 deletions

View File

@ -14,14 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.set_breadcrumbs = function(barea) {
cur_frm.frm_head.appframe.add_breadcrumb(cur_frm.docname);
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!Accounts Browser/Cost Center">\
Chart of Cost Centers</a>');
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!accounts-home">Accounts</a>');
}
cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.refresh = function(doc, cdt, cdn) {
var intro_txt = ''; var intro_txt = '';
cur_frm.toggle_display('cost_center_name', doc.__islocal); cur_frm.toggle_display('cost_center_name', doc.__islocal);

View File

@ -22,6 +22,7 @@
pscript['onload_Accounts Browser'] = function(wrapper){ pscript['onload_Accounts Browser'] = function(wrapper){
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
wrapper.appframe.add_module_tab("Accounts");
if (wn.boot.profile.can_create.indexOf("Company") !== -1) { if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); }, wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
@ -57,10 +58,7 @@ pscript['onshow_Accounts Browser'] = function(wrapper){
// set route // set route
var ctype = wn.get_route()[1] || 'Account'; var ctype = wn.get_route()[1] || 'Account';
wrapper.appframe.clear_breadcrumbs(); wrapper.appframe.set_title('Chart of '+ctype+'s');
wrapper.appframe.add_breadcrumb('Chart of '+ctype+'s');
document.title = 'Chart of '+ctype+'s';
wrapper.appframe.add_breadcrumb(' in <a href="#!accounts-home">Accounts</a>');
if(erpnext.account_chart && erpnext.account_chart.ctype != ctype) { if(erpnext.account_chart && erpnext.account_chart.ctype != ctype) {
wrapper.$company_select.change(); wrapper.$company_select.change();

View File

@ -1,6 +1,8 @@
erpnext.updates = [ erpnext.updates = [
["13th November 2012", [ ["13th November 2012", [
"Trial Balance (new): Feature to export Ledgers or Groups selectively. Indent Groups with spaces", "Customize Form View: Validate correct 'Options' for Link and Table fields.",
"Report Builder (new): Added formatters for Date, Currency, Links etc.",
"Trial Balance (new): Feature to export Ledgers or Groups selectively. Indent Groups with spaces.",
"General Ledger (new): Will show entries with 'Is Opening' as Opening.", "General Ledger (new): Will show entries with 'Is Opening' as Opening.",
"General Ledger (new): Show against account entries if filtered by account.", "General Ledger (new): Show against account entries if filtered by account.",
]], ]],

View File

@ -32,7 +32,6 @@ erpnext.modules = {
'Knowledge Base': 'questions', 'Knowledge Base': 'questions',
} }
// wn.modules is used in breadcrumbs for getting module home page
wn.provide('wn.modules'); wn.provide('wn.modules');
$.extend(wn.modules, erpnext.modules); $.extend(wn.modules, erpnext.modules);
wn.modules['Core'] = 'Setup'; wn.modules['Core'] = 'Setup';
@ -75,6 +74,15 @@ wn.module_css_map = {
'Knowledge Base': 'ultra-dark-green' 'Knowledge Base': 'ultra-dark-green'
} }
wn.get_module_color = function(module) {
try {
var color = wn.module_css_classes[wn.module_css_map[module]].middle;
} catch(e) {
var color = "#000";
}
return color;
}
wn.provide('erpnext.module_page'); wn.provide('erpnext.module_page');

View File

@ -16,6 +16,8 @@
pscript['onload_Sales Browser'] = function(wrapper){ pscript['onload_Sales Browser'] = function(wrapper){
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
wrapper.appframe.add_module_tab("Selling");
wrapper.appframe.add_button('Refresh', function() { wrapper.appframe.add_button('Refresh', function() {
wrapper.make_tree(); wrapper.make_tree();
}, 'icon-refresh'); }, 'icon-refresh');
@ -32,11 +34,7 @@ pscript['onshow_Sales Browser'] = function(wrapper){
// set route // set route
var ctype = wn.get_route()[1] || 'Territory'; var ctype = wn.get_route()[1] || 'Territory';
wrapper.appframe.clear_breadcrumbs(); wrapper.appframe.set_title(ctype+' Tree')
wrapper.appframe.add_breadcrumb(ctype+' Tree')
document.title = ctype+' Tree';
wrapper.appframe.add_breadcrumb(' in <a href="#!selling-home">Selling</a>');
if(erpnext.sales_chart && erpnext.sales_chart.ctype != ctype) { if(erpnext.sales_chart && erpnext.sales_chart.ctype != ctype) {
wrapper.make_tree(); wrapper.make_tree();

View File

@ -13,14 +13,6 @@
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.set_breadcrumbs = function(barea) {
cur_frm.frm_head.appframe.add_breadcrumb(cur_frm.docname);
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!Sales Browser/Customer Group">\
Customer Group Tree</a>');
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!selling-home">Selling</a>');
}
cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.set_root_readonly(doc); cur_frm.cscript.set_root_readonly(doc);

View File

@ -5,7 +5,7 @@
{ {
u'creation': '2012-09-18 10:50:53', u'creation': '2012-09-18 10:50:53',
u'docstatus': 0, u'docstatus': 0,
u'modified': '2012-11-12 16:13:36', u'modified': '2012-11-13 15:10:35',
u'modified_by': u'Administrator', u'modified_by': u'Administrator',
u'owner': u'Administrator' u'owner': u'Administrator'
}, },

View File

@ -14,13 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.set_breadcrumbs = function(barea) {
cur_frm.frm_head.appframe.add_breadcrumb(cur_frm.docname);
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!Sales Browser/Item Group">\
Item Group Tree</a>');
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!selling-home">Selling</a>');
}
//get query select item group //get query select item group
cur_frm.fields_dict['parent_item_group'].get_query = function(doc,cdt,cdn) { cur_frm.fields_dict['parent_item_group'].get_query = function(doc,cdt,cdn) {
return 'SELECT `tabItem Group`.`name`,`tabItem Group`.`parent_item_group` FROM `tabItem Group` WHERE `tabItem Group`.`is_group` = "Yes" AND `tabItem Group`.`docstatus`!= 2 AND `tabItem Group`.`name` !="'+doc.item_group_name+'" AND `tabItem Group`.%(key)s LIKE "%s" ORDER BY `tabItem Group`.`name` ASC LIMIT 50'; return 'SELECT `tabItem Group`.`name`,`tabItem Group`.`parent_item_group` FROM `tabItem Group` WHERE `tabItem Group`.`is_group` = "Yes" AND `tabItem Group`.`docstatus`!= 2 AND `tabItem Group`.`name` !="'+doc.item_group_name+'" AND `tabItem Group`.%(key)s LIKE "%s" ORDER BY `tabItem Group`.`name` ASC LIMIT 50';

View File

@ -14,13 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.set_breadcrumbs = function(barea) {
cur_frm.frm_head.appframe.add_breadcrumb(cur_frm.docname);
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!Sales Browser/Sales Person">\
Sales Person Tree</a>');
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!selling-home">Selling</a>');
}
cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.set_root_readonly(doc); cur_frm.cscript.set_root_readonly(doc);
} }

View File

@ -14,14 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.set_breadcrumbs = function(barea) {
cur_frm.frm_head.appframe.add_breadcrumb(cur_frm.docname);
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!Sales Browser/Territory">\
Territory Tree</a>');
cur_frm.frm_head.appframe.add_breadcrumb(' in <a href="#!selling-home">Selling</a>');
}
cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.set_root_readonly(doc); cur_frm.cscript.set_root_readonly(doc);
} }

View File

@ -16,7 +16,8 @@
pscript['onload_question-view'] = function(wrapper) { pscript['onload_question-view'] = function(wrapper) {
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe')); wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
wrapper.appframe.title('<span class="breadcrumbs"><a href="#questions">Knowledge Base</a></span>'); wrapper.appframe.title('Question');
wrapper.appframe.add_module_tab('Knowledge Base');
wrapper.add_answer_area = $('.add-answer-area').get(0); wrapper.add_answer_area = $('.add-answer-area').get(0);
} }