From 0aec0e1a63ee29ea2368d779d1b7fa064d905f2f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 10 Jul 2012 14:24:45 +0530 Subject: [PATCH 01/97] repost balance button removed from period closing voucher --- .../period_closing_voucher.py | 288 ++++++++---------- .../period_closing_voucher.txt | 41 +-- 2 files changed, 130 insertions(+), 199 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 1b59bc616e..184df70c15 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -8,11 +8,11 @@ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # Please edit this list and import only required elements import webnotes @@ -34,179 +34,147 @@ convert_to_lists = webnotes.conn.convert_to_lists class DocType: - def __init__(self,d,dl): - self.doc, self.doclist = d, dl - self.td, self.tc = 0, 0 - self.year_start_date = '' - self.year_end_date = '' + def __init__(self,d,dl): + self.doc, self.doclist = d, dl + self.td, self.tc = 0, 0 + self.year_start_date = '' + self.year_end_date = '' - # Validate Account Head - #============================================================ - def validate_account_head(self): - acc_det = sql("select debit_or_credit, is_pl_account, group_or_ledger, company from `tabAccount` where name = '%s'" % (self.doc.closing_account_head)) + def validate_account_head(self): + acc_det = sql("select debit_or_credit, is_pl_account, group_or_ledger, company from `tabAccount` where name = '%s'" % (self.doc.closing_account_head)) - # Account should be under liability - if cstr(acc_det[0][0]) != 'Credit' or cstr(acc_det[0][1]) != 'No': - msgprint("Account: %s must be created under 'Source of Funds'" % self.doc.closing_account_head) - raise Exception - - # Account must be a ledger - if cstr(acc_det[0][2]) != 'Ledger': - msgprint("Account %s must be a ledger" % self.doc.closing_account_head) - raise Exception - - # Account should belong to company selected - if cstr(acc_det[0][3]) != self.doc.company: - msgprint("Account %s does not belong to Company %s ." % (self.doc.closing_account_head, self.doc.company)) - raise Exception + # Account should be under liability + if cstr(acc_det[0][0]) != 'Credit' or cstr(acc_det[0][1]) != 'No': + msgprint("Account: %s must be created under 'Source of Funds'" % self.doc.closing_account_head) + raise Exception + + # Account must be a ledger + if cstr(acc_det[0][2]) != 'Ledger': + msgprint("Account %s must be a ledger" % self.doc.closing_account_head) + raise Exception + + # Account should belong to company selected + if cstr(acc_det[0][3]) != self.doc.company: + msgprint("Account %s does not belong to Company %s ." % (self.doc.closing_account_head, self.doc.company)) + raise Exception - # validate posting date - #============================================================= - def validate_posting_date(self): - yr = sql("select start_date, end_date from `tabPeriod` where period_name = '%s'" % (self.doc.fiscal_year)) - self.year_start_date = yr and yr[0][0] or '' - self.year_end_date = yr and yr[0][1] or '' - - # Posting Date should be within closing year - if getdate(self.doc.posting_date) < self.year_start_date or getdate(self.doc.posting_date) > self.year_end_date: - msgprint("Posting Date should be within Closing Fiscal Year") - raise Exception - # Period Closing Entry - pce = sql("select name from `tabPeriod Closing Voucher` where posting_date > '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.posting_date, self.doc.fiscal_year)) - if pce and pce[0][0]: - msgprint("Another Period Closing Entry: %s has been made after posting date: %s" % (cstr(pce[0][0]), self.doc.posting_date)) - raise Exception - - # Validate closing entry requirement - #========================================================== - def validate_pl_balances(self): - income_bal = sql("select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, tabAccount t2 where t1.account = t2.name and t1.posting_date between '%s' and '%s' and t2.debit_or_credit = 'Credit' and t2.group_or_ledger = 'Ledger' and ifnull(t2.freeze_account, 'No') = 'No' and t2.is_pl_account = 'Yes' and t2.docstatus < 2 and t2.company = '%s'" % (self.year_start_date, self.doc.posting_date, self.doc.company)) - expense_bal = sql("select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, tabAccount t2 where t1.account = t2.name and t1.posting_date between '%s' and '%s' and t2.debit_or_credit = 'Debit' and t2.group_or_ledger = 'Ledger' and ifnull(t2.freeze_account, 'No') = 'No' and t2.is_pl_account = 'Yes' and t2.docstatus < 2 and t2.company = '%s'" % (self.year_start_date, self.doc.posting_date, self.doc.company)) - - income_bal = income_bal and income_bal[0][0] or 0 - expense_bal = expense_bal and expense_bal[0][0] or 0 - - if not income_bal and not expense_bal: - msgprint("Both Income and Expense balances are zero. No Need to make Period Closing Entry.") - raise Exception - - # Get account (pl) specific balance - #=========================================================== - def get_pl_balances(self, d_or_c): - acc_bal = sql("select t1.account, sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, `tabAccount` t2 where t1.account = t2.name and t2.group_or_ledger = 'Ledger' and ifnull(t2.freeze_account, 'No') = 'No' and ifnull(t2.is_pl_account, 'No') = 'Yes' and ifnull(is_cancelled, 'No') = 'No' and t2.debit_or_credit = '%s' and t2.docstatus < 2 and t2.company = '%s' and t1.posting_date between '%s' and '%s' group by t1.account " % (d_or_c, self.doc.company, self.year_start_date, self.doc.posting_date)) - return acc_bal + def validate_posting_date(self): + yr = sql("select start_date, end_date from `tabPeriod` where period_name = '%s'" % (self.doc.fiscal_year)) + self.year_start_date = yr and yr[0][0] or '' + self.year_end_date = yr and yr[0][1] or '' + + # Posting Date should be within closing year + if getdate(self.doc.posting_date) < self.year_start_date or getdate(self.doc.posting_date) > self.year_end_date: + msgprint("Posting Date should be within Closing Fiscal Year") + raise Exception - - # Makes GL Entries - # ========================================================== - def make_gl_entries(self, acc_det): - for a in acc_det: - if flt(a[1]): - fdict = { - 'account': a[0], - 'cost_center': '', - 'against': '', - 'debit': flt(a[1]) < 0 and -1*flt(a[1]) or 0, - 'credit': flt(a[1]) > 0 and flt(a[1]) or 0, - 'remarks': self.doc.remarks, - 'voucher_type': self.doc.doctype, - 'voucher_no': self.doc.name, - 'transaction_date': self.doc.transaction_date, - 'posting_date': self.doc.posting_date, - 'fiscal_year': self.doc.fiscal_year, - 'against_voucher': '', - 'against_voucher_type': '', - 'company': self.doc.company, - 'is_opening': 'No', - 'aging_date': self.doc.posting_date - } - - self.save_entry(fdict) - + # Period Closing Entry + pce = sql("select name from `tabPeriod Closing Voucher` where posting_date > '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.posting_date, self.doc.fiscal_year)) + if pce and pce[0][0]: + msgprint("Another Period Closing Entry: %s has been made after posting date: %s" % (cstr(pce[0][0]), self.doc.posting_date)) + raise Exception + + + def validate_pl_balances(self): + income_bal = sql("select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, tabAccount t2 where t1.account = t2.name and t1.posting_date between '%s' and '%s' and t2.debit_or_credit = 'Credit' and t2.group_or_ledger = 'Ledger' and ifnull(t2.freeze_account, 'No') = 'No' and t2.is_pl_account = 'Yes' and t2.docstatus < 2 and t2.company = '%s'" % (self.year_start_date, self.doc.posting_date, self.doc.company)) + expense_bal = sql("select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, tabAccount t2 where t1.account = t2.name and t1.posting_date between '%s' and '%s' and t2.debit_or_credit = 'Debit' and t2.group_or_ledger = 'Ledger' and ifnull(t2.freeze_account, 'No') = 'No' and t2.is_pl_account = 'Yes' and t2.docstatus < 2 and t2.company = '%s'" % (self.year_start_date, self.doc.posting_date, self.doc.company)) + + income_bal = income_bal and income_bal[0][0] or 0 + expense_bal = expense_bal and expense_bal[0][0] or 0 + + if not income_bal and not expense_bal: + msgprint("Both Income and Expense balances are zero. No Need to make Period Closing Entry.") + raise Exception + + + def get_pl_balances(self, d_or_c): + """Get account (pl) specific balance""" + acc_bal = sql("select t1.account, sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) from `tabGL Entry` t1, `tabAccount` t2 where t1.account = t2.name and t2.group_or_ledger = 'Ledger' and ifnull(t2.freeze_account, 'No') = 'No' and ifnull(t2.is_pl_account, 'No') = 'Yes' and ifnull(is_cancelled, 'No') = 'No' and t2.debit_or_credit = '%s' and t2.docstatus < 2 and t2.company = '%s' and t1.posting_date between '%s' and '%s' group by t1.account " % (d_or_c, self.doc.company, self.year_start_date, self.doc.posting_date)) + return acc_bal + + + def make_gl_entries(self, acc_det): + for a in acc_det: + if flt(a[1]): + fdict = { + 'account': a[0], + 'cost_center': '', + 'against': '', + 'debit': flt(a[1]) < 0 and -1*flt(a[1]) or 0, + 'credit': flt(a[1]) > 0 and flt(a[1]) or 0, + 'remarks': self.doc.remarks, + 'voucher_type': self.doc.doctype, + 'voucher_no': self.doc.name, + 'transaction_date': self.doc.transaction_date, + 'posting_date': self.doc.posting_date, + 'fiscal_year': self.doc.fiscal_year, + 'against_voucher': '', + 'against_voucher_type': '', + 'company': self.doc.company, + 'is_opening': 'No', + 'aging_date': self.doc.posting_date + } + + self.save_entry(fdict) + + + def save_entry(self, fdict, is_cancel = 'No'): + # Create new GL entry object and map values + le = Document('GL Entry') + for k in fdict: + le.fields[k] = fdict[k] + + le_obj = get_obj(doc=le) + # validate except on_cancel + if is_cancel == 'No': + le_obj.validate() + + # update total debit / credit except on_cancel + self.td += flt(le.credit) + self.tc += flt(le.debit) + + # save + le.save(1) + le_obj.on_update(adv_adj = '', cancel = '') - # Save GL Entry - # ========================================================== - def save_entry(self, fdict, is_cancel = 'No'): - # Create new GL entry object and map values - le = Document('GL Entry') - for k in fdict: - le.fields[k] = fdict[k] - - le_obj = get_obj(doc=le) - # validate except on_cancel - if is_cancel == 'No': - le_obj.validate() - - # update total debit / credit except on_cancel - self.td += flt(le.credit) - self.tc += flt(le.debit) + + def validate(self): + # validate account head + self.validate_account_head() - # save - le.save(1) - le_obj.on_update(adv_adj = '', cancel = '') - + # validate posting date + self.validate_posting_date() - # Reposting Balances - # ========================================================== - def repost_account_balances(self): - # Get Next Fiscal Year - fy = sql("select name, is_fiscal_year_closed from `tabFiscal Year` where name = '%s' and past_year = '%s'" % (self.doc.next_fiscal_year, self.doc.fiscal_year)) - if not fy: - msgprint("There is no Fiscal Year with Name " + cstr(self.doc.next_fiscal_year) + " and Past Year " + cstr(self.doc.fiscal_year)) - raise Exception - - if fy and fy[0][1] == 'Yes': - msgprint("Fiscal Year %s has been closed." % cstr(fy[1])) - raise Exception - - # Repost Balances - get_obj('Fiscal Year', fy[0][0]).repost() - - - # Validation - # =========================================================== - def validate(self): - - # validate account head - self.validate_account_head() - - # validate posting date - self.validate_posting_date() - - # check if pl balance: - self.validate_pl_balances() + # check if pl balance: + self.validate_pl_balances() - # On Submit - # =========================================================== - def on_submit(self): - - # Makes closing entries for Expense Account - in_acc_det = self.get_pl_balances('Credit') - self.make_gl_entries(in_acc_det) + def on_submit(self): + + # Makes closing entries for Expense Account + in_acc_det = self.get_pl_balances('Credit') + self.make_gl_entries(in_acc_det) - # Makes closing entries for Expense Account - ex_acc_det = self.get_pl_balances('Debit') - self.make_gl_entries(ex_acc_det) + # Makes closing entries for Expense Account + ex_acc_det = self.get_pl_balances('Debit') + self.make_gl_entries(ex_acc_det) - # Makes Closing entry for Closing Account Head - bal = self.tc - self.td - self.make_gl_entries([[self.doc.closing_account_head, flt(bal)]]) + # Makes Closing entry for Closing Account Head + bal = self.tc - self.td + self.make_gl_entries([[self.doc.closing_account_head, flt(bal)]]) - # On Cancel - # ============================================================= - def on_cancel(self): - # get all submit entries of current closing entry voucher - gl_entries = sql("select account, debit, credit from `tabGL Entry` where voucher_type = 'Period Closing Voucher' and voucher_no = '%s' and ifnull(is_cancelled, 'No') = 'No'" % (self.doc.name)) + def on_cancel(self): + # get all submit entries of current closing entry voucher + gl_entries = sql("select account, debit, credit from `tabGL Entry` where voucher_type = 'Period Closing Voucher' and voucher_no = '%s' and ifnull(is_cancelled, 'No') = 'No'" % (self.doc.name)) - # Swap Debit & Credit Column and make gl entry - for gl in gl_entries: - fdict = {'account': gl[0], 'cost_center': '', 'against': '', 'debit': flt(gl[2]), 'credit' : flt(gl[1]), 'remarks': self.doc.cancel_reason, 'voucher_type': self.doc.doctype, 'voucher_no': self.doc.name, 'transaction_date': self.doc.transaction_date, 'posting_date': self.doc.posting_date, 'fiscal_year': self.doc.fiscal_year, 'against_voucher': '', 'against_voucher_type': '', 'company': self.doc.company, 'is_opening': 'No', 'aging_date': 'self.doc.posting_date'} - self.save_entry(fdict, is_cancel = 'Yes') + # Swap Debit & Credit Column and make gl entry + for gl in gl_entries: + fdict = {'account': gl[0], 'cost_center': '', 'against': '', 'debit': flt(gl[2]), 'credit' : flt(gl[1]), 'remarks': self.doc.cancel_reason, 'voucher_type': self.doc.doctype, 'voucher_no': self.doc.name, 'transaction_date': self.doc.transaction_date, 'posting_date': self.doc.posting_date, 'fiscal_year': self.doc.fiscal_year, 'against_voucher': '', 'against_voucher_type': '', 'company': self.doc.company, 'is_opening': 'No', 'aging_date': 'self.doc.posting_date'} + self.save_entry(fdict, is_cancel = 'Yes') - # Update is_cancelled = 'Yes' to all gl entries for current voucher - sql("update `tabGL Entry` set is_cancelled = 'Yes' where voucher_type = '%s' and voucher_no = '%s'" % (self.doc.doctype, self.doc.name)) + # Update is_cancelled = 'Yes' to all gl entries for current voucher + sql("update `tabGL Entry` set is_cancelled = 'Yes' where voucher_type = '%s' and voucher_no = '%s'" % (self.doc.doctype, self.doc.name)) \ No newline at end of file diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt index c70745e7e2..f56c1b0c93 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2012-04-13 11:56:17', + 'creation': '2012-06-11 12:09:52', 'docstatus': 0, - 'modified': '2012-05-31 11:38:17', + 'modified': '2012-07-10 14:21:21', 'modified_by': u'Administrator', 'owner': u'jai@webnotestech.com' }, @@ -273,42 +273,5 @@ 'permlevel': 0, 'print_hide': 1, 'search_index': 0 - }, - - # DocField - { - 'doctype': u'DocField', - 'fieldname': u'repost_account_balances', - 'fieldtype': u'Section Break', - 'label': u'Repost Account Balances', - 'oldfieldtype': u'Section Break', - 'options': u'Simple', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'doctype': u'DocField', - 'fieldname': u'next_fiscal_year', - 'fieldtype': u'Select', - 'label': u'Fiscal Year (For Reposting)', - 'oldfieldname': u'next_fiscal_year', - 'oldfieldtype': u'Select', - 'options': u'link:Fiscal Year', - 'permlevel': 0 - }, - - # DocField - { - 'allow_on_submit': 1, - 'colour': u'White:FFF', - 'doctype': u'DocField', - 'fieldname': u'repost', - 'fieldtype': u'Button', - 'label': u'Repost', - 'oldfieldtype': u'Button', - 'options': u'repost_account_balances', - 'permlevel': 0 } ] \ No newline at end of file From 1ee2a5ac12b8daa68b8ec412f7b6b7624f502c87 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 10 Jul 2012 17:22:20 +0530 Subject: [PATCH 02/97] 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