From 1ee2a5ac12b8daa68b8ec412f7b6b7624f502c87 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 10 Jul 2012 17:22:20 +0530 Subject: [PATCH 1/4] cost center cleanup + grid css --- .../doctype/cost_center/cost_center.txt | 109 ++++++++++++------ public/css/all-app.css | 86 ++++++-------- public/js/all-app.js | 25 ++-- 3 files changed, 120 insertions(+), 100 deletions(-) diff --git a/erpnext/accounts/doctype/cost_center/cost_center.txt b/erpnext/accounts/doctype/cost_center/cost_center.txt index b02d909370..9152f04847 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.txt +++ b/erpnext/accounts/doctype/cost_center/cost_center.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-03-27 14:35:41', + 'creation': '2012-07-03 13:30:47', 'docstatus': 0, - 'modified': '2012-03-27 14:35:41', + 'modified': '2012-07-10 16:37:55', 'modified_by': u'Administrator', 'owner': u'Administrator' }, @@ -27,7 +27,7 @@ 'section_style': u'Simple', 'server_code_error': u' ', 'show_in_menu': 0, - 'version': 109 + 'version': 1 }, # These values are common for all DocField @@ -55,6 +55,42 @@ 'name': u'Cost Center' }, + # DocPerm + { + 'amend': 0, + 'cancel': 0, + 'create': 0, + 'doctype': u'DocPerm', + 'permlevel': 1, + 'role': u'Accounts Manager', + 'submit': 0, + 'write': 0 + }, + + # DocPerm + { + 'amend': 0, + 'cancel': 1, + 'create': 1, + 'doctype': u'DocPerm', + 'permlevel': 0, + 'role': u'Accounts Manager', + 'submit': 0, + 'write': 1 + }, + + # DocPerm + { + 'amend': 0, + 'cancel': 0, + 'create': 0, + 'doctype': u'DocPerm', + 'permlevel': 1, + 'role': u'Accounts User', + 'submit': 0, + 'write': 0 + }, + # DocPerm { 'amend': 0, @@ -84,40 +120,13 @@ 'role': u'All' }, - # DocPerm + # DocField { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Accounts Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 1, - 'create': 1, - 'doctype': u'DocPerm', - 'permlevel': 0, - 'role': u'Accounts Manager', - 'submit': 0, - 'write': 1 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Accounts User', - 'submit': 0, - 'write': 0 + 'doctype': u'DocField', + 'fieldname': u'sb0', + 'fieldtype': u'Section Break', + 'label': u'Cost Center Details', + 'permlevel': 0 }, # DocField @@ -148,7 +157,7 @@ # DocField { - 'description': u'Select company name first.', + 'colour': u'White:FFF', 'doctype': u'DocField', 'fieldname': u'parent_cost_center', 'fieldtype': u'Link', @@ -178,15 +187,26 @@ # DocField { + 'colour': u'White:FFF', 'doctype': u'DocField', 'fieldname': u'company_abbr', 'fieldtype': u'Data', + 'hidden': 1, 'label': u'Company Abbr', 'oldfieldname': u'company_abbr', 'oldfieldtype': u'Data', 'permlevel': 1 }, + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'cb0', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' + }, + # DocField { 'colour': u'White:FFF', @@ -230,6 +250,19 @@ # DocField { + 'colour': u'White:FFF', + 'description': u'Define Budget for this Cost Center', + 'doctype': u'DocField', + 'fieldname': u'sb1', + 'fieldtype': u'Section Break', + 'label': u'Budget', + 'permlevel': 0 + }, + + # DocField + { + 'colour': u'White:FFF', + 'description': u'Select Budget Distribution, if you want to track based on seasonality.', 'doctype': u'DocField', 'fieldname': u'distribution_id', 'fieldtype': u'Link', @@ -242,6 +275,8 @@ # DocField { + 'colour': u'White:FFF', + 'description': u'Add rows to set budgets on Accounts. To set budget actions, see the company master.', 'doctype': u'DocField', 'fieldname': u'budget_details', 'fieldtype': u'Table', diff --git a/public/css/all-app.css b/public/css/all-app.css index ecdbe652f9..b699bef973 100644 --- a/public/css/all-app.css +++ b/public/css/all-app.css @@ -2328,7 +2328,7 @@ div.form-section-head { div.form-layout-row:first-child .form-section-head { border-top: 0px solid #ccc !important; margin-top: 0px; - padding-top: 15px; + padding-top: 0px; } div.form-section-head h3 { @@ -2355,18 +2355,6 @@ div.page_break { border-top: 1px dashed #888; } -div.grid_tbarlinks { - border-bottom: 0px; - background-color: #CCC; - padding: 4px 4px 2px 4px; - width: 190px; - float: right; - - -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; - -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; -} - - div.dialog_frm { position: relative; margin: 10px; @@ -2541,48 +2529,38 @@ div.sidebar-comment-info { * lib/css/legacy/grid.css */ - -/* Grid */ - - -/* --- Simple --- */ -.grid_wrapper_simple { - width: 100%; - margin-bottom: 8px; - border: 1px solid #AA9; -} - -.grid_head_wrapper_simple { - padding: 0px; - border-bottom: 2px solid #AAA; -} - -.grid_head_wrapper_simple td { - border-right: 1px solid #AA9; -} - -.grid_head_wrapper_simple td div { - padding: 2px; -} - -.grid_tab_wrapper_simple { -} - -.grid_cell_simple { - padding: 2px; - background-color: #fff; - border-right: 1px solid #AA9; -} - - -/* --- Normal --- */ .grid_wrapper { position: relative; overflow: auto; border: 1px solid #AAA; width: 100%; margin-bottom: 8px; - background-color: #fff; + background-color: #f8f8f8; +} + +div.grid_tbarlinks { + border-bottom: 0px; + padding: 4px 4px 2px 4px; + width: 190px; + float: right; + margin-right: 12px; + + -webkit-border-top-left-radius: 5px; + -webkit-border-top-right-radius: 5px; + -moz-border-radius-topleft: 5px; + -moz-border-radius-topright: 5px; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + + background: #dddddd; /* Old browsers */ + background: -moz-linear-gradient(top, #dddddd 0%, #bbbbbb 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dddddd), color-stop(100%,#bbbbbb)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #dddddd 0%,#bbbbbb 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #dddddd 0%,#bbbbbb 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #dddddd 0%,#bbbbbb 100%); /* IE10+ */ + background: linear-gradient(to bottom, #dddddd 0%,#bbbbbb 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dddddd', endColorstr='#bbbbbb',GradientType=0 ); /* IE6-9 */ + } .grid_tab_wrapper { @@ -2613,11 +2591,19 @@ div.sidebar-comment-info { } .grid_head_table td { - background-color: #EEE; border-right: 1px solid #AAA; border-bottom: 1px solid #AAA; height: 40px; padding: 0px; + + background: #eeeeee; /* Old browsers */ + background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */ + background: linear-gradient(to bottom, #eeeeee 0%,#cccccc 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */ } .grid_head_table td div { diff --git a/public/js/all-app.js b/public/js/all-app.js index fd55b1684c..d7ab9a8e1c 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -1747,7 +1747,7 @@ _f.Frm.prototype.setup_fields_std=function(){var fl=wn.meta.docfield_list[this.d var sec;for(var i=0;i