From 4c56275d2655308001c3592a756ab29e8d95a2d7 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 14 Jun 2012 11:05:09 +0530 Subject: [PATCH] appframe is now heading --- .../page/accounts_home/accounts_home.html | 2 - .../page/accounts_home/accounts_home.js | 2 +- .../buying/page/buying_home/buying_home.html | 2 - .../buying/page/buying_home/buying_home.js | 2 +- erpnext/hr/page/hr_home/hr_home.html | 2 - erpnext/hr/page/hr_home/hr_home.js | 2 +- .../page/production_home/production_home.html | 2 - .../page/production_home/production_home.js | 2 +- .../page/projects_home/projects_home.html | 2 - .../page/projects_home/projects_home.js | 2 +- .../page/selling_home/selling_home.html | 2 - .../selling/page/selling_home/selling_home.js | 2 +- erpnext/setup/page/setup/setup.html | 264 +++++++++--------- erpnext/setup/page/setup/setup.js | 1 + erpnext/startup/js/modules.js | 4 +- erpnext/stock/page/stock_home/stock_home.html | 2 - erpnext/stock/page/stock_home/stock_home.js | 2 +- .../page/support_home/support_home.html | 2 - .../support/page/support_home/support_home.js | 2 +- .../page/website_home/website_home.html | 3 - .../website/page/website_home/website_home.js | 2 +- public/css/all-app.css | 21 +- public/css/all-web.css | 16 +- public/js/all-app.js | 27 +- 24 files changed, 180 insertions(+), 190 deletions(-) diff --git a/erpnext/accounts/page/accounts_home/accounts_home.html b/erpnext/accounts/page/accounts_home/accounts_home.html index 398f1e46f3..4f43f66295 100644 --- a/erpnext/accounts/page/accounts_home/accounts_home.html +++ b/erpnext/accounts/page/accounts_home/accounts_home.html @@ -1,8 +1,6 @@
-

Accounts

-

Journal Voucher

General Ledger Entries

diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js index 9915226f86..d7dceaf2c2 100644 --- a/erpnext/accounts/page/accounts_home/accounts_home.js +++ b/erpnext/accounts/page/accounts_home/accounts_home.js @@ -16,7 +16,7 @@ pscript['onload_accounts-home'] = function(wrapper) { erpnext.module_page.setup_page('Accounts', wrapper); - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Accounts'); if(wn.control_panel.country!='India') { $('.india-specific').toggle(false); diff --git a/erpnext/buying/page/buying_home/buying_home.html b/erpnext/buying/page/buying_home/buying_home.html index ee10d10c28..ff8b0ab610 100644 --- a/erpnext/buying/page/buying_home/buying_home.html +++ b/erpnext/buying/page/buying_home/buying_home.html @@ -1,8 +1,6 @@
-

Buying

-

Purchase Request

Request for purchase

diff --git a/erpnext/buying/page/buying_home/buying_home.js b/erpnext/buying/page/buying_home/buying_home.js index 646ed0b178..65803cca54 100644 --- a/erpnext/buying/page/buying_home/buying_home.js +++ b/erpnext/buying/page/buying_home/buying_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_buying-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Buying'); erpnext.module_page.setup_page('Buying', wrapper); } \ No newline at end of file diff --git a/erpnext/hr/page/hr_home/hr_home.html b/erpnext/hr/page/hr_home/hr_home.html index 7f0c65d945..7f8fe73a0f 100644 --- a/erpnext/hr/page/hr_home/hr_home.html +++ b/erpnext/hr/page/hr_home/hr_home.html @@ -1,8 +1,6 @@
-

Human Resources

-

Attendance

Attendance Mark

diff --git a/erpnext/hr/page/hr_home/hr_home.js b/erpnext/hr/page/hr_home/hr_home.js index 1971b4690b..1286609587 100644 --- a/erpnext/hr/page/hr_home/hr_home.js +++ b/erpnext/hr/page/hr_home/hr_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_hr-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area') ,'Human Resources'); erpnext.module_page.setup_page('HR', wrapper); } \ No newline at end of file diff --git a/erpnext/production/page/production_home/production_home.html b/erpnext/production/page/production_home/production_home.html index 6cb2182938..50f99b33e6 100644 --- a/erpnext/production/page/production_home/production_home.html +++ b/erpnext/production/page/production_home/production_home.html @@ -1,8 +1,6 @@
-

Production

-

Production Order

Orders for manufacturing

diff --git a/erpnext/production/page/production_home/production_home.js b/erpnext/production/page/production_home/production_home.js index af4ba9db9e..a4bb398eea 100644 --- a/erpnext/production/page/production_home/production_home.js +++ b/erpnext/production/page/production_home/production_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_production-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Production'); erpnext.module_page.setup_page('Production', wrapper); } \ No newline at end of file diff --git a/erpnext/projects/page/projects_home/projects_home.html b/erpnext/projects/page/projects_home/projects_home.html index 81235a2f90..fed846c985 100644 --- a/erpnext/projects/page/projects_home/projects_home.html +++ b/erpnext/projects/page/projects_home/projects_home.html @@ -1,8 +1,6 @@
-

Projects

-

Task

Project activity / task

diff --git a/erpnext/projects/page/projects_home/projects_home.js b/erpnext/projects/page/projects_home/projects_home.js index 187fc57825..5ff50c9a98 100644 --- a/erpnext/projects/page/projects_home/projects_home.js +++ b/erpnext/projects/page/projects_home/projects_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_projects-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Projects'); erpnext.module_page.setup_page('Projects', wrapper); } \ No newline at end of file diff --git a/erpnext/selling/page/selling_home/selling_home.html b/erpnext/selling/page/selling_home/selling_home.html index 05f985895c..acadfd63ff 100644 --- a/erpnext/selling/page/selling_home/selling_home.html +++ b/erpnext/selling/page/selling_home/selling_home.html @@ -1,8 +1,6 @@
-

Selling

-

Lead

Prospective customers

diff --git a/erpnext/selling/page/selling_home/selling_home.js b/erpnext/selling/page/selling_home/selling_home.js index 2561ee4645..1fe0e09d10 100644 --- a/erpnext/selling/page/selling_home/selling_home.js +++ b/erpnext/selling/page/selling_home/selling_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_selling-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Selling'); erpnext.module_page.setup_page('Selling', wrapper); } \ No newline at end of file diff --git a/erpnext/setup/page/setup/setup.html b/erpnext/setup/page/setup/setup.html index 9cc84e86c8..70143a4c20 100644 --- a/erpnext/setup/page/setup/setup.html +++ b/erpnext/setup/page/setup/setup.html @@ -1,134 +1,134 @@ -
- × -

Setup

-
-
-

Company

-

- Companies
- List of companies (not customers / suppliers) -

-

- Fiscal Years
- Financial Years for books of accounts -

-

- Currencies
- Currency Master -

+
+
+
+
+

Company

+

+ Companies
+ List of companies (not customers / suppliers) +

+

+ Fiscal Years
+ Financial Years for books of accounts +

+

+ Currencies
+ Currency Master +

+
+
+

Users and Permissions

+

+ Users
+ Add/remove users, set roles, passwords etc +

+

+ Permission Manager
+ Set permissions on transactions / masters +

+

+ Amount based Authorization Rules
+ Restrict submission rights based on amount +

+
+
+

Data

+

+ Data Import Tool
+ Import data from spreadsheet (csv) files +

+

+ Global Defaults
+ Set default values for entry +

+

+ Recycle Bin
+ Un-trash items +

+

+ Rename Master
+ Rename a single master record +

+

+ Rename Many
+ Rename by uploading a csv file +

+
+
+

Email and Notifications

+

+ Email Settings
+ Out going mail server and support ticket mailbox +

+

+ Auto Notifications
+ Automatic email sending to customers and suppliers +

+

+ Email Digests
+ Daily, weekly, monthly email Digests +

+

+ SMS Setup
+ Setup outgoing SMS via your bulk SMS provider +

+

+ Send Bulk SMS
+ Send bulk SMS to leads, customers, contacts +

+
+
+

Customize ERPNext

+

+ Customize Forms
+ Change entry properties (hide fields, make mandatory etc) +

+

+ Custom Fields
+ Add fields to forms +

+

+ Custom Scripts
+ Add custom code to forms +

+

+ Disable Features
+ Simplify entry forms by disabling features +

+

+ Modules Setup
+ Show, hide modules +

+

+ Numbering Series
+ Set multiple numbering series for transactions +

+
+
+

Branding and Printing

+

+ Letter Heads
+ Letter heads for print +

+

+ Print Formats
+ HTML print formats for quotes, invoices etc +

+

+ Print Headings
+ Add headers for standard print formats +

+ +

+ Style Settings
+ Change background fonts etc +

+
+
-
-

Users and Permissions

-

- Users
- Add/remove users, set roles, passwords etc -

-

- Permission Manager
- Set permissions on transactions / masters -

-

- Amount based Authorization Rules
- Restrict submission rights based on amount -

-
-
-

Data

-

- Data Import Tool
- Import data from spreadsheet (csv) files -

-

- Global Defaults
- Set default values for entry -

-

- Recycle Bin
- Un-trash items -

-

- Rename Master
- Rename a single master record -

-

- Rename Many
- Rename by uploading a csv file -

-
-
-

Email and Notifications

-

- Email Settings
- Out going mail server and support ticket mailbox -

-

- Auto Notifications
- Automatic email sending to customers and suppliers -

-

- Email Digests
- Daily, weekly, monthly email Digests -

-

- SMS Setup
- Setup outgoing SMS via your bulk SMS provider -

-

- Send Bulk SMS
- Send bulk SMS to leads, customers, contacts -

-
-
-

Customize ERPNext

-

- Customize Forms
- Change entry properties (hide fields, make mandatory etc) -

-

- Custom Fields
- Add fields to forms -

-

- Custom Scripts
- Add custom code to forms -

-

- Disable Features
- Simplify entry forms by disabling features -

-

- Modules Setup
- Show, hide modules -

-

- Numbering Series
- Set multiple numbering series for transactions -

-
-
-

Branding and Printing

-

- Letter Heads
- Letter heads for print -

-

- Print Formats
- HTML print formats for quotes, invoices etc -

-

- Print Headings
- Add headers for standard print formats -

- -

- Style Settings
- Change background fonts etc -

-
-
diff --git a/erpnext/setup/page/setup/setup.js b/erpnext/setup/page/setup/setup.js index 3ee002747b..6c88a90b1c 100644 --- a/erpnext/setup/page/setup/setup.js +++ b/erpnext/setup/page/setup/setup.js @@ -15,5 +15,6 @@ // along with this program. If not, see . pscript.onload_Setup = function(wrapper) { + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Setup'); erpnext.module_page.hide_links(wrapper); } \ No newline at end of file diff --git a/erpnext/startup/js/modules.js b/erpnext/startup/js/modules.js index 16a32d3ba6..a3e7ee8ee8 100644 --- a/erpnext/startup/js/modules.js +++ b/erpnext/startup/js/modules.js @@ -101,8 +101,8 @@ erpnext.module_page.make_list = function(module, wrapper) { // show link to all reports $parent1.find('.list-toolbar-wrapper') .prepend(""); + [ List Of All Reports ]
"); $parent2.find('.list-toolbar-wrapper') .prepend(""); + [ List Of All Reports (New) ]
"); } \ No newline at end of file diff --git a/erpnext/stock/page/stock_home/stock_home.html b/erpnext/stock/page/stock_home/stock_home.html index d1b2507df1..ef941ab66f 100644 --- a/erpnext/stock/page/stock_home/stock_home.html +++ b/erpnext/stock/page/stock_home/stock_home.html @@ -1,8 +1,6 @@
-

Stock

-

Stock Entry

Transfer stock from one warehouse to another

diff --git a/erpnext/stock/page/stock_home/stock_home.js b/erpnext/stock/page/stock_home/stock_home.js index 7df9b275e9..97f5ec9236 100644 --- a/erpnext/stock/page/stock_home/stock_home.js +++ b/erpnext/stock/page/stock_home/stock_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_stock-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Stock'); erpnext.module_page.setup_page('Stock', wrapper); } \ No newline at end of file diff --git a/erpnext/support/page/support_home/support_home.html b/erpnext/support/page/support_home/support_home.html index 9404f12ac7..ebc6f7173a 100644 --- a/erpnext/support/page/support_home/support_home.html +++ b/erpnext/support/page/support_home/support_home.html @@ -1,8 +1,6 @@
-

Support

-

Support Ticket

Support queries from customers via email or website

diff --git a/erpnext/support/page/support_home/support_home.js b/erpnext/support/page/support_home/support_home.js index 3b95eb652a..99b109fdf2 100644 --- a/erpnext/support/page/support_home/support_home.js +++ b/erpnext/support/page/support_home/support_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_support-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Support'); erpnext.module_page.setup_page('Support', wrapper); } \ No newline at end of file diff --git a/erpnext/website/page/website_home/website_home.html b/erpnext/website/page/website_home/website_home.html index 76dab6a59c..20b543bcd1 100644 --- a/erpnext/website/page/website_home/website_home.html +++ b/erpnext/website/page/website_home/website_home.html @@ -1,9 +1,6 @@
-

Website

-
-

Web Page

Static (content) web page

diff --git a/erpnext/website/page/website_home/website_home.js b/erpnext/website/page/website_home/website_home.js index 51f12baaa7..15391ec434 100644 --- a/erpnext/website/page/website_home/website_home.js +++ b/erpnext/website/page/website_home/website_home.js @@ -15,6 +15,6 @@ // along with this program. If not, see . pscript['onload_website-home'] = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area')); + wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Website'); erpnext.module_page.setup_page('Website', wrapper); } \ No newline at end of file diff --git a/public/css/all-app.css b/public/css/all-app.css index 84ac2758c3..93dfe47ebf 100644 --- a/public/css/all-app.css +++ b/public/css/all-app.css @@ -2314,6 +2314,11 @@ div.form-title { border-bottom: 1px solid #eee; } +.appframe-titlebar .label { + vertical-align: middle; + margin-right: 7px; +} + div.form-section-head { margin: 11px -15px 3px -15px; border-top: 1px solid #ccc; @@ -3237,12 +3242,8 @@ div.stat-bar { * lib/css/ui/views.css */ -.breadcrumbs { - color: #000000; -} - -.breadcrumbs a { - color: #000000; +.breadcrumb-area, .breadcrumb-area span { + vertical-align: middle; } div.appframe-titlebar { @@ -3260,6 +3261,14 @@ div.appframe-titlebar { border-radius: 5px 5px 0px 0px; -webkit-border-radius: 5px 5px 0px 0px; -moz-border-radius: 5px 5px 0px 0px; + + text-shadow: 0px 1px 1px #fff; + color: #555; +} + +span.appframe-title { + font-size: 160%; + font-weight: bold; } div.appframe-toolbar { diff --git a/public/css/all-web.css b/public/css/all-web.css index ec2fbcd333..a2de6b612e 100644 --- a/public/css/all-web.css +++ b/public/css/all-web.css @@ -2493,12 +2493,8 @@ div.stat-bar { * lib/css/ui/views.css */ -.breadcrumbs { - color: #000000; -} - -.breadcrumbs a { - color: #000000; +.breadcrumb-area, .breadcrumb-area span { + vertical-align: middle; } div.appframe-titlebar { @@ -2516,6 +2512,14 @@ div.appframe-titlebar { border-radius: 5px 5px 0px 0px; -webkit-border-radius: 5px 5px 0px 0px; -moz-border-radius: 5px 5px 0px 0px; + + text-shadow: 0px 1px 1px #fff; + color: #555; +} + +span.appframe-title { + font-size: 160%; + font-weight: bold; } div.appframe-toolbar { diff --git a/public/js/all-app.js b/public/js/all-app.js index 10cc23f408..32a2e2965b 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -950,11 +950,9 @@ wn.ui.misc.about_dialog.show();} */ wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.show=function(doctype){var page_name=wn.get_route_str();if(wn.pages[page_name]){wn.container.change_to(wn.pages[page_name]);}else{var route=wn.get_route();if(route[1]){wn.model.with_doctype(route[1],function(r){if(r&&r['403']){return;} new wn.views.DocListView(route[1]);});}}} -wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype){this.doctype=doctype;this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;var page_name=wn.get_route_str();var page=wn.container.add_page(page_name);wn.container.change_to(page_name);this.$page=$(page);this.$page.html(repl('
\ +wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype){this.doctype=doctype;this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;var page_name=wn.get_route_str();var page=wn.container.add_page(page_name);wn.container.change_to(page_name);this.$page=$(page);this.$page.html('
\
\
\ -

%(label)s

\ -
\
Loading...
\
\
\ @@ -966,7 +964,7 @@ wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype){this.doctype=d
\
\
\ -
',{label:this.label}));this.appframe=new wn.ui.AppFrame(this.$page.find('.appframe-area'));wn.views.breadcrumbs($('').appendTo(this.appframe.$titlebar),locals.DocType[this.doctype].module);},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.make_report_button();me.add_delete_option();},make_report_button:function(){var me=this;if(wn.boot.profile.can_get_report.indexOf(this.doctype)!=-1){this.appframe.add_button('Build Report',function(){wn.set_route('Report2',me.doctype);},'icon-th')}},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1 +
');this.appframe=new wn.ui.AppFrame(this.$page.find('.appframe-area'));wn.views.breadcrumbs($('').appendTo(this.appframe.$titlebar),locals.DocType[this.doctype].module,this.doctype);},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.make_report_button();me.add_delete_option();},make_report_button:function(){var me=this;if(wn.boot.profile.can_get_report.indexOf(this.doctype)!=-1){this.appframe.add_button('Build Report',function(){wn.set_route('Report2',me.doctype);},'icon-th')}},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1 else return null;}).length;if(this.can_submit){this.$page.find('.show-docstatus').removeClass('hide');this.$page.find('.show-docstatus input').click(function(){me.run();})}},setup_listview:function(){if(this.meta.__listjs){eval(this.meta.__listjs);this.listview=new wn.doclistviews[this.doctype](this);}else{this.listview=new wn.views.ListView(this);} this.listview.parent=this;this.wrapper=this.$page.find('.wnlist-area');this.page_length=20;this.allow_delete=true;},init_list:function(auto_run){this.make({method:'webnotes.widgets.doclistview.get',get_args:this.get_args,parent:this.wrapper,start:0,page_length:this.page_length,show_filters:true,show_grid:true,new_doctype:this.doctype,allow_delete:this.allow_delete,no_result_message:this.make_no_result(),columns:this.listview.fields});if((auto_run!==false)&&(auto_run!==0))this.run();},make_no_result:function(){return repl('

No %(doctype_label)s found

\ %(description)s\ @@ -1270,7 +1268,7 @@ function loaddocbrowser(dt){wn.set_route('List',dt);} * lib/js/legacy/wn/page_layout.js */ wn.PageLayout=function(args){$.extend(this,args) -this.wrapper=$a(this.parent,'div','layout-wrapper layout-wrapper-background');this.head=$a(this.wrapper,'div');this.main=$a(this.wrapper,'div','layout-main-section');this.sidebar_area=$a(this.wrapper,'div','layout-side-section');$a(this.wrapper,'div','',{clear:'both'});this.main_head=$a(this.main,'div','form-title');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}} +this.wrapper=$a(this.parent,'div','layout-wrapper layout-wrapper-background');this.head=$a(this.wrapper,'div');this.main=$a(this.wrapper,'div','layout-main-section');this.sidebar_area=$a(this.wrapper,'div','layout-side-section');$a(this.wrapper,'div','',{clear:'both'});this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}} /* * lib/js/legacy/wn/widgets/page_sidebar.js */ @@ -1458,11 +1456,8 @@ return false;} /* * lib/js/wn/views/breadcrumbs.js */ -wn.provide('wn.views');wn.views.breadcrumbs=function(parent,module,doctype,name){$(parent).empty();var $bspan=$(repl('\ - Home',{home_page:wn.boot.home_page}));if(module&&wn.modules[module]){$bspan.append(repl(' / %(module)s Home',{module:module,module_page:wn.modules[module]}))} -if(doctype&&(locals.DocType[doctype]&&!locals.DocType[doctype].issingle)){$bspan.append(repl(' / %(doctype)s',{doctype:doctype}))} -if(name){$bspan.append(' / '+name.bold())} -$bspan.appendTo(parent);} +wn.provide('wn.views');wn.views.breadcrumbs=function(parent,module,doctype,name){$(parent).empty();var $bspan=$(parent);if(name){$bspan.append(''+name+'');}else if(doctype){$bspan.append(''+doctype+' List ');}else if(module){$bspan.append(''+module+'');} +if(name&&doctype&&(!locals['DocType'][doctype].issingle)){$bspan.append(repl(' in %(doctype)s List',{doctype:doctype}))};if(doctype&&module&&wn.modules&&wn.modules[module]){$bspan.append(repl(' in %(module)s',{module:module,module_page:wn.modules[module]}))}} /* * lib/js/legacy/widgets/form/fields.js */ @@ -1694,11 +1689,11 @@ d.cur_frm=f;d.dn=dn;d.table_form=f.meta.istable;f.refresh(dn);$(f.page_layout.wr * lib/js/legacy/widgets/form/form_header.js */ _f.FrmHeader=Class.extend({init:function(parent,frm){this.appframe=new wn.ui.AppFrame(parent) -this.appframe.$titlebar.append('\ +this.appframe.$titlebar.append('\ ');this.$w=this.appframe.$w;},refresh:function(){wn.views.breadcrumbs($(this.$w.find('.breadcrumb-area')),cur_frm.meta.module,cur_frm.meta.name,cur_frm.docname);this.refresh_labels();this.refresh_toolbar();},refresh_labels:function(){var labinfo={0:['Saved','label-success'],1:['Submitted','label-info'],2:['Cancelled','label-important']}[cint(cur_frm.doc.docstatus)];if(labinfo[0]=='Saved'&&cur_frm.meta.is_submittable){labinfo[0]='Saved, to Submit';} if(cur_frm.doc.__unsaved||cur_frm.doc.__islocal){labinfo[0]='Not Saved';labinfo[1]='label-warning'} -this.set_label(labinfo);if(cur_frm.doc.__unsaved&&cint(cur_frm.doc.docstatus)==1&&this.appframe.buttons['Update']){this.appframe.buttons['Update'].toggle(true);}},set_label:function(labinfo){this.$w.find('.label-area').html(repl('\ - %(lab_status)s',{lab_status:labinfo[0],lab_class:labinfo[1]}));},refresh_toolbar:function(){this.appframe.clear_buttons();var p=cur_frm.get_doc_perms();if(cur_frm.meta.read_only_onload&&!cur_frm.doc.__islocal){if(!cur_frm.editable) +this.set_label(labinfo);if(cur_frm.doc.__unsaved&&cint(cur_frm.doc.docstatus)==1&&this.appframe.buttons['Update']){this.appframe.buttons['Update'].toggle(true);}},set_label:function(labinfo){this.$w.find('.label').remove();$(repl('\ + %(lab_status)s',{lab_status:labinfo[0],lab_class:labinfo[1]})).insertBefore(this.$w.find('.breadcrumb-area'))},refresh_toolbar:function(){this.appframe.clear_buttons();var p=cur_frm.get_doc_perms();if(cur_frm.meta.read_only_onload&&!cur_frm.doc.__islocal){if(!cur_frm.editable) this.appframe.add_button('Edit',function(){cur_frm.edit_doc();},'icon-pencil');else this.appframe.add_button('Print View',function(){cur_frm.is_editable[cur_frm.docname]=0;cur_frm.refresh();},'icon-print');} var docstatus=cint(cur_frm.doc.docstatus);if(docstatus==0&&p[WRITE]){this.appframe.add_button('Save',function(){cur_frm.save('Save');},'');this.appframe.buttons['Save'].addClass('btn-info');} @@ -1765,7 +1760,7 @@ _f.Frm.prototype.defocus_rest=function(){if(_f.cur_grid_cell)_f.cur_grid_cell.gr _f.Frm.prototype.get_doc_perms=function(){var p=[0,0,0,0,0,0];for(var i=0;i';if(this.frm_head)this.frm_head.refresh();if(wn.ui.toolbar.recent) +if(this.frm_head)this.frm_head.refresh();if(wn.ui.toolbar.recent) wn.ui.toolbar.recent.add(this.doctype,this.docname,1);} _f.Frm.prototype.check_doc_perm=function(){var dt=this.parent_doctype?this.parent_doctype:this.doctype;var dn=this.parent_docname?this.parent_docname:this.docname;this.perm=get_perm(dt,dn);this.orig_perm=get_perm(dt,dn,1);if(!this.perm[0][READ]){if(user=='Guest'){if(_f.temp_access[dt]&&_f.temp_access[dt][dn]){this.perm=[[1,0,0]] return 1;}} @@ -2278,8 +2273,8 @@ erpnext.module_page.make_list=function(module,wrapper){var $w=$(wrapper).find('. %(criteria_name)s',data))},args:{module:module},no_refresh:true,callback:function(r){erpnext.module_page.hide_links($parent1)}});wrapper.list1.run();wrapper.list2=new wn.ui.Listing({parent:$parent2,method:'utilities.get_report_list',render_row:function(row,data){$(row).html(repl('\ %(name)s',data))},args:{module:module},no_refresh:true,callback:function(r){erpnext.module_page.hide_links($parent2)}});wrapper.list2.run();$parent1.find('.list-toolbar-wrapper').prepend("");$parent2.find('.list-toolbar-wrapper').prepend("");} + [ List Of All Reports ]
");$parent2.find('.list-toolbar-wrapper').prepend("");} /* * erpnext/startup/js/toolbar.js */