From aad1541244d04312c218b2e9bbeb4054204849e1 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 28 Nov 2011 18:31:57 +0530 Subject: [PATCH 01/28] [FIX] account : Cost Ledger Incorrect For View Accounts lp bug: https://launchpad.net/bugs/880844 fixed bzr revid: mdi@tinyerp.com-20111128130157-jo9e7g08gmro7zpp --- addons/account/project/report/cost_ledger.py | 46 +++++++++++++++----- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/addons/account/project/report/cost_ledger.py b/addons/account/project/report/cost_ledger.py index 225a85d2ee1..f571c5328bf 100644 --- a/addons/account/project/report/cost_ledger.py +++ b/addons/account/project/report/cost_ledger.py @@ -38,11 +38,32 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): 'sum_balance': self._sum_balance, }) + def _get_children(self, account_id): + result = [] + + def _get_rec(account_id): + analytic_obj = self.pool.get('account.analytic.account') + analytic_search_ids = analytic_obj.search(self.cr, self.uid, [('id', '=', account_id)]) + analytic_datas = analytic_obj.browse(self.cr, self.uid, analytic_search_ids) + + result.append(account_id) + for account in analytic_datas: + for child in account.child_ids: + result.append(child.id) + for child_id in child.child_ids: + _get_rec(child_id.id) + return result + + child_ids = _get_rec(account_id) + + return child_ids + def _lines_g(self, account_id, date1, date2): + chid_ids = self._get_children(account_id) self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id \ FROM account_account AS aa, account_analytic_line AS aal \ - WHERE (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \ - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (account_id, date1, date2)) + WHERE (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \ + GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (tuple(chid_ids), date1, date2)) res = self.cr.dictfetchall() for r in res: @@ -58,10 +79,11 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): return res def _lines_a(self, general_account_id, account_id, date1, date2): + chid_ids = self._get_children(account_id) self.cr.execute("SELECT aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ - WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) \ + WHERE (aal.general_account_id=%s) AND (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) \ AND (aal.journal_id=aaj.id) \ - ORDER BY aal.date, aaj.code, aal.code", (general_account_id, account_id, date1, date2)) + ORDER BY aal.date, aaj.code, aal.code", (general_account_id, tuple(chid_ids), date1, date2)) res = self.cr.dictfetchall() for r in res: @@ -77,11 +99,13 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): return res def _account_sum_debit(self, account_id, date1, date2): - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount>0", (account_id, date1, date2)) + chid_ids = self._get_children(account_id) + self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(chid_ids), date1, date2)) return self.cr.fetchone()[0] or 0.0 def _account_sum_credit(self, account_id, date1, date2): - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount<0", (account_id, date1, date2)) + chid_ids = self._get_children(account_id) + self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(chid_ids), date1, date2)) return self.cr.fetchone()[0] or 0.0 def _account_sum_balance(self, account_id, date1, date2): @@ -91,16 +115,18 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): def _sum_debit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) - if not ids: + chid_ids = self._get_children(ids[0]) + if not children: return 0.0 - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids), date1, date2,)) + self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(chid_ids), date1, date2,)) return self.cr.fetchone()[0] or 0.0 def _sum_credit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) - if not ids: + chid_ids = self._get_children(ids[0]) + if not children: return 0.0 - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,)) + self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(chid_ids),date1, date2,)) return self.cr.fetchone()[0] or 0.0 def _sum_balance(self, accounts, date1, date2): From 1f3a05874455dfb9416abdde35786b59637d63a2 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 30 Nov 2011 11:45:27 +0530 Subject: [PATCH 02/28] [IMP] account : Improved the code bzr revid: mdi@tinyerp.com-20111130061527-6aklmw9ejnu23dh1 --- addons/account/project/report/cost_ledger.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/account/project/report/cost_ledger.py b/addons/account/project/report/cost_ledger.py index f571c5328bf..88d5e6041f6 100644 --- a/addons/account/project/report/cost_ledger.py +++ b/addons/account/project/report/cost_ledger.py @@ -50,8 +50,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): for account in analytic_datas: for child in account.child_ids: result.append(child.id) - for child_id in child.child_ids: - _get_rec(child_id.id) + _get_rec(child.id) return result child_ids = _get_rec(account_id) @@ -116,7 +115,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): def _sum_debit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) chid_ids = self._get_children(ids[0]) - if not children: + if not chid_ids: return 0.0 self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(chid_ids), date1, date2,)) return self.cr.fetchone()[0] or 0.0 @@ -124,7 +123,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): def _sum_credit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) chid_ids = self._get_children(ids[0]) - if not children: + if not chid_ids: return 0.0 self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(chid_ids),date1, date2,)) return self.cr.fetchone()[0] or 0.0 From a01b90fa470afb4bbc3b3eb9b228fe55072ae293 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 30 Nov 2011 17:48:38 +0530 Subject: [PATCH 03/28] [IMP] account : Improved the code bzr revid: mdi@tinyerp.com-20111130121838-o6nlc4j64y3b3nca --- addons/account/project/report/cost_ledger.py | 30 ++++++++------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/addons/account/project/report/cost_ledger.py b/addons/account/project/report/cost_ledger.py index 88d5e6041f6..9955d1ccffe 100644 --- a/addons/account/project/report/cost_ledger.py +++ b/addons/account/project/report/cost_ledger.py @@ -39,23 +39,17 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): }) def _get_children(self, account_id): + analytic_obj = self.pool.get('account.analytic.account') + if not isinstance(account_id, list): + account_id = [account_id] + search_ids = analytic_obj.search(self.cr, self.uid, [('parent_id', 'child_of', account_id)]) result = [] - - def _get_rec(account_id): - analytic_obj = self.pool.get('account.analytic.account') - analytic_search_ids = analytic_obj.search(self.cr, self.uid, [('id', '=', account_id)]) - analytic_datas = analytic_obj.browse(self.cr, self.uid, analytic_search_ids) - - result.append(account_id) - for account in analytic_datas: - for child in account.child_ids: - result.append(child.id) - _get_rec(child.id) - return result - - child_ids = _get_rec(account_id) - - return child_ids + for rec in analytic_obj.browse(self.cr, self.uid, search_ids): + for child in rec.child_ids: + result.append(child.id) + if result: + result = self._get_children(result) + return search_ids + result def _lines_g(self, account_id, date1, date2): chid_ids = self._get_children(account_id) @@ -114,7 +108,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): def _sum_debit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) - chid_ids = self._get_children(ids[0]) + chid_ids = self._get_children(ids) if not chid_ids: return 0.0 self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(chid_ids), date1, date2,)) @@ -122,7 +116,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): def _sum_credit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) - chid_ids = self._get_children(ids[0]) + chid_ids = self._get_children(ids) if not chid_ids: return 0.0 self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(chid_ids),date1, date2,)) From 888b061c27203e398190f137b08687bb0b5c0e48 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Fri, 2 Dec 2011 16:06:41 +0530 Subject: [PATCH 04/28] [IMP] account : Improved the code bzr revid: mdi@tinyerp.com-20111202103641-2lr29zvdhrbri8xs --- addons/account/project/report/cost_ledger.py | 28 +++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/addons/account/project/report/cost_ledger.py b/addons/account/project/report/cost_ledger.py index 9955d1ccffe..2753b541f6b 100644 --- a/addons/account/project/report/cost_ledger.py +++ b/addons/account/project/report/cost_ledger.py @@ -26,6 +26,7 @@ from report import report_sxw class account_analytic_cost_ledger(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context) + self.analytic_acc_ids = [], self.localcontext.update( { 'time': time, 'lines_g': self._lines_g, @@ -49,14 +50,14 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): result.append(child.id) if result: result = self._get_children(result) - return search_ids + result + self.analytic_acc_ids = search_ids + result + return self.analytic_acc_ids def _lines_g(self, account_id, date1, date2): - chid_ids = self._get_children(account_id) self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id \ FROM account_account AS aa, account_analytic_line AS aal \ WHERE (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \ - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (tuple(chid_ids), date1, date2)) + GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (tuple(self.analytic_acc_ids), date1, date2)) res = self.cr.dictfetchall() for r in res: @@ -72,11 +73,10 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): return res def _lines_a(self, general_account_id, account_id, date1, date2): - chid_ids = self._get_children(account_id) self.cr.execute("SELECT aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ WHERE (aal.general_account_id=%s) AND (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) \ AND (aal.journal_id=aaj.id) \ - ORDER BY aal.date, aaj.code, aal.code", (general_account_id, tuple(chid_ids), date1, date2)) + ORDER BY aal.date, aaj.code, aal.code", (general_account_id, tuple(self.analytic_acc_ids), date1, date2)) res = self.cr.dictfetchall() for r in res: @@ -92,13 +92,11 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): return res def _account_sum_debit(self, account_id, date1, date2): - chid_ids = self._get_children(account_id) - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(chid_ids), date1, date2)) + self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(self.analytic_acc_ids), date1, date2)) return self.cr.fetchone()[0] or 0.0 def _account_sum_credit(self, account_id, date1, date2): - chid_ids = self._get_children(account_id) - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(chid_ids), date1, date2)) + self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(self.analytic_acc_ids), date1, date2)) return self.cr.fetchone()[0] or 0.0 def _account_sum_balance(self, account_id, date1, date2): @@ -108,18 +106,16 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): def _sum_debit(self, accounts, date1, date2): ids = map(lambda x: x.id, accounts) - chid_ids = self._get_children(ids) - if not chid_ids: + self.analytic_acc_ids = self._get_children(ids) + if not self.analytic_acc_ids: return 0.0 - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(chid_ids), date1, date2,)) + self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(self.analytic_acc_ids), date1, date2,)) return self.cr.fetchone()[0] or 0.0 def _sum_credit(self, accounts, date1, date2): - ids = map(lambda x: x.id, accounts) - chid_ids = self._get_children(ids) - if not chid_ids: + if not self.analytic_acc_ids: return 0.0 - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(chid_ids),date1, date2,)) + self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(self.analytic_acc_ids),date1, date2,)) return self.cr.fetchone()[0] or 0.0 def _sum_balance(self, accounts, date1, date2): From 873aaacc5085b109ee0172c41aa18986cfec2088 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 2 Jan 2012 14:38:33 +0530 Subject: [PATCH 05/28] [FIX] account, account_bank_statement_extensions, point_of_sale : account_bank_statement_extension conflicts with point_of_sale lp bug: https://launchpad.net/bugs/909124 fixed bzr revid: mdi@tinyerp.com-20120102090833-ytztgr3vsq2jkm4v --- addons/account/account_bank_statement.py | 1 + .../account_bank_statement.py | 3 +-- addons/point_of_sale/point_of_sale.py | 1 - addons/point_of_sale/point_of_sale_demo.xml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index bd31b01a41d..dcb99c0ceb8 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -468,6 +468,7 @@ class account_bank_statement_line(osv.osv): required=True), 'statement_id': fields.many2one('account.bank.statement', 'Statement', select=True, required=True, ondelete='cascade'), + 'journal_id': fields.related('statement_id', 'journal_id', type='many2one', relation='account.journal', string='Journal', store=True, readonly=True), 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'), 'move_ids': fields.many2many('account.move', 'account_bank_statement_line_move_rel', 'statement_line_id','move_id', diff --git a/addons/account_bank_statement_extensions/account_bank_statement.py b/addons/account_bank_statement_extensions/account_bank_statement.py index 3fef72f4aff..ba78c3f5e97 100644 --- a/addons/account_bank_statement_extensions/account_bank_statement.py +++ b/addons/account_bank_statement_extensions/account_bank_statement.py @@ -111,7 +111,6 @@ class account_bank_statement_line(osv.osv): help="Code to identify transactions belonging to the same globalisation level within a batch payment"), 'globalisation_amount': fields.related('globalisation_id', 'amount', type='float', relation='account.bank.statement.line.global', string='Glob. Amount', readonly=True), - 'journal_id': fields.related('statement_id', 'journal_id', type='many2one', relation='account.journal', string='Journal', store=True, readonly=True), 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed')], 'State', required=True, readonly=True), 'counterparty_name': fields.char('Counterparty Name', size=35), @@ -133,4 +132,4 @@ class account_bank_statement_line(osv.osv): account_bank_statement_line() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 2848889ec70..a52686c648d 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -596,7 +596,6 @@ account_bank_statement() class account_bank_statement_line(osv.osv): _inherit = 'account.bank.statement.line' _columns= { - 'journal_id': fields.related('statement_id','journal_id','name', store=True, string='Journal', type='char', size=64), 'pos_statement_id': fields.many2one('pos.order', ondelete='cascade'), } account_bank_statement_line() diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml index 418066ec148..0030f6cf8ae 100644 --- a/addons/point_of_sale/point_of_sale_demo.xml +++ b/addons/point_of_sale/point_of_sale_demo.xml @@ -108,7 +108,7 @@ - Cash Journal - (test) + From cad6715087c0a7a249ccc0566e1dbcc3f9ae4c64 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 16 Jan 2012 18:04:45 +0530 Subject: [PATCH 06/28] [FIX] account_voucher : Advanced payment+customer credit, wrong open balance lp bug: https://launchpad.net/bugs/901089 fixed bzr revid: mdi@tinyerp.com-20120116123445-5vogciqrwotteq5r --- addons/account_voucher/account_voucher.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 1f8c86161c1..50cde3a2c01 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -593,10 +593,6 @@ class account_voucher(osv.osv): account_move_lines = move_line_pool.browse(cr, uid, ids, context=context) for line in account_move_lines: - if line.credit and line.reconcile_partial_id and ttype == 'receipt': - continue - if line.debit and line.reconcile_partial_id and ttype == 'payment': - continue if invoice_id: if line.invoice.id == invoice_id: #if the invoice linked to the voucher line is equal to the invoice_id in context @@ -622,10 +618,6 @@ class account_voucher(osv.osv): #voucher line creation for line in account_move_lines: - if line.credit and line.reconcile_partial_id and ttype == 'receipt': - continue - if line.debit and line.reconcile_partial_id and ttype == 'payment': - continue if line.currency_id and currency_id==line.currency_id.id: amount_original = abs(line.amount_currency) amount_unreconciled = abs(line.amount_residual_currency) @@ -1051,7 +1043,7 @@ class account_voucher(osv.osv): voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id # We want to set it on the account move line as soon as the original line had a foreign currency if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency: - # we compute the amount in that foreign currency. + # we compute the amount in that foreign currency. if line.move_line_id.currency_id.id == current_currency: # if the voucher and the voucher line share the same currency, there is no computation to do sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1 @@ -1270,7 +1262,7 @@ class account_voucher_line(osv.osv): def _currency_id(self, cr, uid, ids, name, args, context=None): ''' - This function returns the currency id of a voucher line. It's either the currency of the + This function returns the currency id of a voucher line. It's either the currency of the associated move line (if any) or the currency of the voucher or the company currency. ''' res = {} From 3e1a36941cc144a03def51892457fc7683d60bc8 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 3 Feb 2012 12:08:54 +0100 Subject: [PATCH 07/28] [IMP] account: fix, simplify and optimize Cost Ledger bzr revid: rco@openerp.com-20120203110854-2p0g4gwg01u538ao --- addons/account/project/report/cost_ledger.py | 89 +++++++------------ addons/account/project/report/cost_ledger.rml | 18 ++-- 2 files changed, 42 insertions(+), 65 deletions(-) diff --git a/addons/account/project/report/cost_ledger.py b/addons/account/project/report/cost_ledger.py index 2753b541f6b..c7423675c15 100644 --- a/addons/account/project/report/cost_ledger.py +++ b/addons/account/project/report/cost_ledger.py @@ -26,7 +26,6 @@ from report import report_sxw class account_analytic_cost_ledger(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context) - self.analytic_acc_ids = [], self.localcontext.update( { 'time': time, 'lines_g': self._lines_g, @@ -38,89 +37,67 @@ class account_analytic_cost_ledger(report_sxw.rml_parse): 'sum_credit': self._sum_credit, 'sum_balance': self._sum_balance, }) + self.children = {} # a memo for the method _get_children - def _get_children(self, account_id): + def _get_children(self, accounts): + """ return all children accounts of the given accounts + :param accounts: list of browse records of 'account.analytic.account' + :return: tuple of account ids + """ analytic_obj = self.pool.get('account.analytic.account') - if not isinstance(account_id, list): - account_id = [account_id] - search_ids = analytic_obj.search(self.cr, self.uid, [('parent_id', 'child_of', account_id)]) - result = [] - for rec in analytic_obj.browse(self.cr, self.uid, search_ids): - for child in rec.child_ids: - result.append(child.id) - if result: - result = self._get_children(result) - self.analytic_acc_ids = search_ids + result - return self.analytic_acc_ids + res = set() + for account in accounts: + if account.id not in self.children: + self.children[account.id] = analytic_obj.search(self.cr, self.uid, [('parent_id', 'child_of', [account.id])]) + res.update(self.children[account.id]) + return tuple(res) - def _lines_g(self, account_id, date1, date2): + def _lines_g(self, account, date1, date2): self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id \ FROM account_account AS aa, account_analytic_line AS aal \ WHERE (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \ - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (tuple(self.analytic_acc_ids), date1, date2)) + GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (self._get_children([account]), date1, date2)) res = self.cr.dictfetchall() - for r in res: - if r['balance'] > 0: - r['debit'] = r['balance'] - r['credit'] = 0.0 - elif r['balance'] < 0: - r['debit'] = 0.0 - r['credit'] = -r['balance'] - else: - r['debit'] = 0.0 - r['credit'] = 0.0 + r['debit'] = r['balance'] if r['balance'] > 0 else 0.0 + r['credit'] = -r['balance'] if r['balance'] < 0 else 0.0 return res - def _lines_a(self, general_account_id, account_id, date1, date2): + def _lines_a(self, general_account, account, date1, date2): self.cr.execute("SELECT aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ WHERE (aal.general_account_id=%s) AND (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) \ AND (aal.journal_id=aaj.id) \ - ORDER BY aal.date, aaj.code, aal.code", (general_account_id, tuple(self.analytic_acc_ids), date1, date2)) + ORDER BY aal.date, aaj.code, aal.code", (general_account['id'], self._get_children([account]), date1, date2)) res = self.cr.dictfetchall() - for r in res: - if r['balance'] > 0: - r['debit'] = r['balance'] - r['credit'] = 0.0 - elif r['balance'] < 0: - r['debit'] = 0.0 - r['credit'] = -r['balance'] - else: - r['debit'] = 0.0 - r['credit'] = 0.0 + r['debit'] = r['balance'] if r['balance'] > 0 else 0.0 + r['credit'] = -r['balance'] if r['balance'] < 0 else 0.0 return res - def _account_sum_debit(self, account_id, date1, date2): - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(self.analytic_acc_ids), date1, date2)) - return self.cr.fetchone()[0] or 0.0 + def _account_sum_debit(self, account, date1, date2): + return self._sum_debit(self, [account], date1, date2) - def _account_sum_credit(self, account_id, date1, date2): - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(self.analytic_acc_ids), date1, date2)) - return self.cr.fetchone()[0] or 0.0 + def _account_sum_credit(self, account, date1, date2): + return self._sum_credit(self, [account], date1, date2) - def _account_sum_balance(self, account_id, date1, date2): - debit = self._account_sum_debit(account_id, date1, date2) - credit = self._account_sum_credit(account_id, date1, date2) + def _account_sum_balance(self, account, date1, date2): + debit = self._account_sum_debit(account, date1, date2) + credit = self._account_sum_credit(account, date1, date2) return (debit-credit) def _sum_debit(self, accounts, date1, date2): - ids = map(lambda x: x.id, accounts) - self.analytic_acc_ids = self._get_children(ids) - if not self.analytic_acc_ids: - return 0.0 - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(self.analytic_acc_ids), date1, date2,)) + self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", + (self._get_children(accounts), date1, date2,)) return self.cr.fetchone()[0] or 0.0 def _sum_credit(self, accounts, date1, date2): - if not self.analytic_acc_ids: - return 0.0 - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(self.analytic_acc_ids),date1, date2,)) + self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", + (self._get_children(accounts), date1, date2,)) return self.cr.fetchone()[0] or 0.0 def _sum_balance(self, accounts, date1, date2): - debit = self._sum_debit(accounts, date1, date2) or 0.0 - credit = self._sum_credit(accounts, date1, date2) or 0.0 + debit = self._sum_debit(accounts, date1, date2) + credit = self._sum_credit(accounts, date1, date2) return (debit-credit) report_sxw.report_sxw('report.account.analytic.account.cost_ledger', 'account.analytic.account', 'addons/account/project/report/cost_ledger.rml',parser=account_analytic_cost_ledger, header="internal") diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index d53467b4e93..7500b655ab3 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -229,28 +229,28 @@
- [[ repeatIn(objects,'o') ]] + [[ repeatIn(objects,'account') ]] - [[ o.code ]] + [[ account.code ]] - [[ o.complete_name ]] + [[ account.complete_name ]] - [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] + [[ formatLang (account_sum_debit(account,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] + [[ formatLang (account_sum_credit(account,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]] + [[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]]
- [[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]] + [[ repeatIn(lines_g(account,data['form']['date1'],data['form']['date2']),'move_g') ]] @@ -271,7 +271,7 @@
- [[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] + [[ repeatIn(lines_a(move_g,account,data['form']['date1'],data['form']['date2']),'move_a') ]] @@ -302,4 +302,4 @@
- \ No newline at end of file + From 871fc6a7ee0a3d729c16fc192e4d7a21eb81a188 Mon Sep 17 00:00:00 2001 From: "Jagdish Panchal (Open ERP)" Date: Wed, 15 Feb 2012 14:16:12 +0530 Subject: [PATCH 08/28] [FIX] account_voucher: add the domain on the partner_id in customer payment and Sales Reciept lp bug: https://launchpad.net/bugs/930528 fixed bzr revid: jap@tinyerp.com-20120215084612-59hmuaktrsuemvht --- addons/account_voucher/voucher_payment_receipt_view.xml | 2 +- addons/account_voucher/voucher_sales_purchase_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 1a8d3680f5f..241bd23d5bb 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -294,7 +294,7 @@
- + - + From 2ecdb960d0d6b03fb9c3dcce7798458958a8cf49 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 21 Feb 2012 17:45:36 +0100 Subject: [PATCH 09/28] [imp] refactoring of ParentedMixin bzr revid: nicolas.vanhoren@openerp.com-20120221164536-zajw6gixwu4n4xgh --- addons/edi/static/src/js/edi.js | 4 ++-- addons/point_of_sale/static/src/js/pos.js | 4 ++-- addons/share/static/src/js/share.js | 4 ++-- addons/web_livechat/static/src/js/web_livechat.js | 2 +- addons/web_uservoice/static/src/js/web_uservoice.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/edi/static/src/js/edi.js b/addons/edi/static/src/js/edi.js index 0f59768bc4e..a93086bdcaa 100644 --- a/addons/edi/static/src/js/edi.js +++ b/addons/edi/static/src/js/edi.js @@ -142,8 +142,8 @@ openerp.edi.EdiImport = openerp.web.OldWidget.extend({ }, destroy_content: function() { - _.each(_.clone(this.widget_children), function(el) { - el.stop(); + _.each(_.clone(this.getChildren()), function(el) { + el.destroy(); }); this.$element.children().remove(); }, diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index 4c2c0fec15c..c2f150f04f3 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -1117,7 +1117,7 @@ openerp.point_of_sale = function(db) { this.order = options.order; this.shop = options.shop; this.order.bind('destroy', _.bind( function() { - return this.stop(); + this.destroy(); }, this)); this.shop.bind('change:selectedOrder', _.bind( function(shop) { var selectedOrder; @@ -1384,7 +1384,7 @@ openerp.point_of_sale = function(db) { }, this)); }, this)); }, - stop: function() { + destroy: function() { $('.oe_footer').show(); $('.oe_toggle_secondary_menu').show(); pos = undefined; diff --git a/addons/share/static/src/js/share.js b/addons/share/static/src/js/share.js index 05f45aaef42..a4dfba12e28 100644 --- a/addons/share/static/src/js/share.js +++ b/addons/share/static/src/js/share.js @@ -2,7 +2,7 @@ openerp.share = function(session) { function launch_wizard(self, view, user_type) { - var action = view.widget_parent.action; + var action = view.getParent().action; var Share = new session.web.DataSet(self, 'share.wizard', view.dataset.get_context()); var domain = new session.web.CompoundDomain(view.dataset.domain); if (view.fields_view.type == 'form') { @@ -57,7 +57,7 @@ session.web.Sidebar = session.web.Sidebar.extend({ }); }, on_sidebar_click_share: function(item) { - var view = this.widget_parent + var view = this.getParent() launch_wizard(this, view); }, }); diff --git a/addons/web_livechat/static/src/js/web_livechat.js b/addons/web_livechat/static/src/js/web_livechat.js index 6351ddb2d5c..4ddc93e3e6e 100644 --- a/addons/web_livechat/static/src/js/web_livechat.js +++ b/addons/web_livechat/static/src/js/web_livechat.js @@ -89,7 +89,7 @@ openerp.web.Header.include({ this._super(); this.update_promise.then(function() { if (self.livechat) { - self.livechat.stop(); + self.livechat.destroy(); } self.livechat = new openerp.web_livechat.Livechat(self); self.livechat.prependTo(self.$element.find('div.header_corner')); diff --git a/addons/web_uservoice/static/src/js/web_uservoice.js b/addons/web_uservoice/static/src/js/web_uservoice.js index b4b63584ca5..4871fb80c9d 100644 --- a/addons/web_uservoice/static/src/js/web_uservoice.js +++ b/addons/web_uservoice/static/src/js/web_uservoice.js @@ -71,7 +71,7 @@ instance.web.Header.include({ this._super(); this.update_promise.then(function() { if (self.uservoice) { - self.uservoice.stop(); + self.uservoice.destroy(); } self.uservoice = new instance.web_uservoice.UserVoice(self); self.uservoice.prependTo(self.$element.find('div.header_corner')); From 10e55d570197d27b78bdbb3502df3a5e85edfe18 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 22 Feb 2012 15:23:23 +0100 Subject: [PATCH 10/28] [ADD] Minh's sass playground bzr revid: fme@openerp.com-20120222142323-mg2z3kndzm29xisg --- addons/web/__openerp__.py | 1 + addons/web/static/src/css/base.css | 2382 ------------------------ addons/web/static/src/css/base.sass | 3 + addons/web/static/src/css/base_old.css | 2382 ++++++++++++++++++++++++ addons/web/static/src/js/chrome.js | 2 +- 5 files changed, 2387 insertions(+), 2383 deletions(-) create mode 100644 addons/web/static/src/css/base.sass create mode 100644 addons/web/static/src/css/base_old.css diff --git a/addons/web/__openerp__.py b/addons/web/__openerp__.py index 41a58cd3a07..c628f905cd3 100644 --- a/addons/web/__openerp__.py +++ b/addons/web/__openerp__.py @@ -59,6 +59,7 @@ "static/lib/jquery.ui.timepicker/css/jquery-ui-timepicker-addon.css", "static/lib/jquery.ui.notify/css/ui.notify.css", "static/lib/jquery.tipsy/tipsy.css", + "static/src/css/base_old.css", "static/src/css/base.css", "static/src/css/data_export.css", "static/src/css/data_import.css", diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 1fac47d128c..e69de29bb2d 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,2382 +0,0 @@ -.openerp { - padding: 0; - margin: 0; - height: 100%; - font-size: 80%; - font-family: Ubuntu, Helvetica, sans-serif; -} - -.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option, -.openerp button, .openerp .ui-widget { - font-family: Ubuntu, Helvetica, sans-serif; - font-size:85%; -} - -.openerp .view-manager-main-content { - width: 100%; - padding: 0 8px 8px 8px; -} - -.openerp .oe_form_frame_cell .view-manager-main-content { - padding: 0; -} - -.oe_box { - border: 1px solid #aaf; - padding: 2px; - margin: 2px; -} - -#oe_header h2 { - margin: 2px 0; -} - -#oe_errors pre { - margin: 0; -} - -.openerp .oe-listview .oe-number { - text-align: right !important; -} -.oe-listview-header-columns { - background: #d1d1d1; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* W3C */ -} - -.openerp .oe_hide { - display: none !important; -} - -/* STATES */ -.openerp .on_logged, -.openerp .db_options_row { - display: none; -} - -/* Loading */ -.loading { - cursor: wait; -} -.openerp .loading { - display: none; - z-index: 100; - position: fixed; - top: 0; - right: 50%; - padding: 4px 12px; - background: #A61300; - color: white; - text-align: center; - border: 1px solid #900; - border-top: none; - -moz-border-radius-bottomright: 8px; - -moz-border-radius-bottomleft: 8px; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; -} -.openerp .oe_notification { - z-index: 1050; - display: none; -} -.openerp .oe_notification * { - color: white; -} - -/* Login page */ - -.login { - padding: 0; - margin: 0; - font-family: "Lucida Grande", Helvetica, Verdana, Arial; - background: url("/web/static/src/img/pattern.png") repeat; - color: #eee; - font-size: 14px; - height: 100%; -} - -.login ul, ol { - padding: 0; - margin: 0; -} - -.login li { - list-style-type: none; - padding-bottom: 4px; -} - -.login a { - color: #eee; - text-decoration: none; -} - -.login button { - float: right; - display: inline-block; - cursor: pointer; - padding: 6px 16px; - font-size: 13px; - font-family: "Lucida Grande", Helvetica, Verdana, Arial; - border: 1px solid #222222; - color: white; - margin: 0; - background: #600606; - background: -moz-linear-gradient(#b92020, #600606); - background: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606)); - background: -ms-linear-gradient(top, #b92020, #600606); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b92020', endColorstr='#600606',GradientType=0 ); - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(155, 155, 155, 0.4) inset; - -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset; -} - -.login input, .login select { - width: 252px; - font-size: 14px; - font-family: "Lucida Grande", Helvetica, Verdana, Arial; - border: 1px solid #999999; - background: whitesmoke; - -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); - -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); - -box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -.login input { - margin-bottom: 9px; - padding: 5px 6px; -} - -.login select { - padding: 1px; -} - -.login .dbpane { - position: fixed; - top: 0; - right: 8px; - padding: 5px 10px; - color: #eee; - border: solid 1px #333; - background: #1e1e1e; - background: rgba(30,30,30,0.94); - -moz-border-radius: 0 0 8px 8px; - -webkit-border-radius: 0 0 8px 8px; - border-radius: 0 0 8px 8px; -} - -.login .bottom { - position: absolute; - top: 50%; - left: 0; - right: 0; - bottom: 0; - text-shadow: 0 1px 1px #999999; - background: #600606; - background: -moz-linear-gradient(#b41616, #600606); - background: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606)); - background: -ms-linear-gradient(top, #b41616, #600606); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b41616', endColorstr='#600606',GradientType=0 ); -} - -.login .pane { - position: absolute; - top: 50%; - left: 50%; - margin: -160px -166px; - border: solid 1px #333333; - background: #1e1e1e; - background: rgba(30,30,30,0.94); - padding: 22px 32px; - text-align: left; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); - -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); - -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); -} - -.login .pane h2 { - margin-top: 0; - font-size: 18px; -} - -.login #logo { - position: absolute; - top: -70px; - left: 0; - width: 100%; - margin: 0 auto; - text-align: center; -} - -.login .footer { - position: absolute; - bottom: -40px; - left: 0; - width: 100%; - text-align: center; -} - -.login .footer a { - font-size: 13px; - margin: 0 8px; -} - -.login .footer a:hover { - text-decoration: underline; -} - -.login .openerp { - font-weight: bold; - font-family: serif; - font-size: 16px; -} - -.openerp .login { - text-align: center; -} - -.openerp .login .login_error_message { - display: none; - background-color: #b41616; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); - -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); - color: #eee; - font-size: 14px; - padding: 14px 18px; - margin-top: 15px; - text-align: center; -} - -.openerp .login.login_invalid .login_error_message { - display: inline-block; -} - - - -/* Database */ -.login .oe-database-manager { - display: none; - height: 100%; - width: 100%; - background-color: white; -} -.login.database_block .bottom, -.login.database_block .login_error_message, -.login.database_block .pane { - display: none; -} -.login.database_block .oe-database-manager { - display: block; -} - -.login .database { - float: left; - width: 202px; - height: 100%; - background: #666666; -} -.login .oe_db_options { - margin-left: 202px; - color: black; - padding-top: 20px; -} - -.login .database ul { - margin-top: 65px; -} - -ul.db_options li { - padding: 5px 0 10px 5px; - background: #949292; /* Old browsers */ - background: -moz-linear-gradient(top, #949292 30%, #6d6b6b 95%, #282828 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#949292), color-stop(95%,#6d6b6b), color-stop(100%,#282828)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* W3C */ - /* for ie9 */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */ - border: none; - /* overriding jquery ui */ - -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; - display: block; - font-weight: bold; - text-transform: uppercase; - margin: 1px; - color: #EEEEEE; - cursor: pointer; - width: 195px; - font-size: 12px; -} - -.db_option_table { - border: 1px solid #5A5858; - padding: 5px; - -moz-border-radius: 10px; -} - -table.db_option_table input.required { - background-color: #D2D2FF !important; -} - -.db_option_table label { - display: block; - text-align: right; -} - -.db_option_table input[type="text"], -.db_option_table input[type="password"], -.db_option_table input[type="file"], -.db_option_table select { - width: 300px; -} - -.option_string { - font-weight: bold; - color: #555; - width: 100%; - text-align: center; - padding: 10px 0; - font-size: large; -} - -label.error { - float: none; - color: red; - padding-left: .5em; - vertical-align: top; -} - -/* Main*/ -.openerp .main_table { - width: 100%; - height: 100%; - background: #f0eeee; -} -.openerp .oe-application { - height: 100%; -} -.openerp .oe-application-container { - width: 100%; - height: 100%; -} - -/* IE Hack - for IE < 9 - * Avoids footer to be placed statically at 100% cutting the middle of the views - * */ -.openerp .oe-application-container { - height: auto\9; - min-height: 100%\9; -} - -/* Menu */ -.openerp .menu { - height: 34px; - background: #cc4e45; /* Old browsers */ - background: -moz-linear-gradient(top, #cc4e45 0%, #b52d20 8%, #7a211a 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc4e45), color-stop(8%,#b52d20), color-stop(100%,#7a211a)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CC4E45', endColorstr='#7A211A',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* W3C */ -} -.openerp .menu td { - text-align: center; - padding:0; -} -.openerp .menu a { - display:block; - min-width: 60px; - height: 20px; - margin: 3px 2px; - padding: 0 8px; - - background: #bd5e54; /* Old browsers */ - background: -moz-linear-gradient(top, #bd5e54 0%, #90322a 60%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bd5e54), color-stop(60%,#90322a)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#BD5E54', endColorstr='#90322A',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #bd5e54 0%,#90322a 60%); /* W3C */ - - border: 1px solid #5E1A14; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - - color: #eee; - text-shadow: #222 0 1px 0; - text-decoration: none; - text-transform: uppercase; - line-height: 20px; - font-weight: bold; - font-size: 75%; - - white-space: nowrap; -} -.openerp .menu a:hover, -.openerp .menu a:focus, -.openerp .menu a.active { - background: #c6c6c6; /* Old browsers */ - background: -moz-linear-gradient(top, #c6c6c6 0%, #5c5c5c 7%, #969595 86%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c6c6c6), color-stop(7%,#5c5c5c), color-stop(86%,#969595)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C6C6C6', endColorstr='#969595',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* W3C */ - /* for ie */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5c5c5c', endColorstr='#969595',GradientType=0 ); /* IE6-9 */ - color: #fff; -} -/* Secondary Menu */ -.openerp .secondary_menu .oe_toggle_secondary_menu { - position: absolute; - cursor: pointer; - border-left: 1px solid #282828; - border-bottom: 1px solid #282828; - width: 21px; - height: 21px; - z-index: 10; - background: transparent; - color: white; - text-shadow: 0 1px 0 #333; - text-align: center; - font-size: 18px; - line-height: 18px; - right: 0; -} -.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu { - position: static; - border-left: none; - border-bottom: 1px solid #282828; - width: 21px; - height: 21px; - background: #818181; -} -.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu span.oe_menu_fold { - display: none; -} -.openerp .secondary_menu.oe_unfolded .oe_toggle_secondary_menu span.oe_menu_unfold { - display: none; -} -.openerp .secondary_menu { - width: 200px; - min-width: 200px; - border-right: 1px solid #3C3C3C; - border-bottom: 1px solid #5A5858; - background: #5A5858; - vertical-align: top; - height: 100%; - display: block; - position: relative; - font-size:85%; -} -.openerp .secondary_menu.oe_folded { - width: 20px; - min-width: 20px; - position: static; -} -.openerp .secondary_menu.oe_folded .oe_secondary_menu.active { - position: absolute; - z-index: 100; - border: 4px solid #585858; - border-color: rgba(88, 88, 88, .5); - border-radius: 4px; - min-width: 200px; -} -.openerp .secondary_menu a { - display: block; - padding: 0 5px 2px 5px; - line-height: 20px; - text-decoration: none; - white-space: nowrap; - color: white; - text-shadow: 0 1px 0 #333; -} -.openerp .oe_secondary_submenu { - background: #5A5858; -} -.openerp .secondary_menu a.oe_secondary_menu_item { - background: #949292; /* Old browsers */ - background: -moz-linear-gradient(top, #949292 0%, #6d6b6b 87%, #282828 99%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#949292), color-stop(87%,#6d6b6b), color-stop(99%,#282828)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* W3C */ - /* for ie9 */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */ - white-space: nowrap; - color: white; - text-shadow: 0 1px 0 #333; - -} -.openerp a.oe_secondary_submenu_item { - padding: 0 5px 2px 10px; -} -.openerp a.oe_secondary_submenu_item, -.openerp a.oe_secondary_menu_item { - overflow: hidden; - text-overflow: ellipsis; -} -.openerp a.oe_secondary_submenu_item:hover, -.openerp a.oe_secondary_submenu_item.leaf.active { - display: block; - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #d8d8d8 11%, #afafaf 86%, #333333 91%, #5a5858 96%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(11%,#d8d8d8), color-stop(86%,#afafaf), color-stop(91%,#333333), color-stop(96%,#5a5858)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#5A5858',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* W3C */ - padding: 0 5px 2px 10px; - line-height: 20px; - color: #3f3d3d; - text-decoration: none; - text-shadow: #fff 0 1px 0; -} -.openerp a.oe_secondary_submenu_item.submenu.opened span:before { - content: "\25be"; -} -.openerp a.oe_secondary_submenu_item.submenu span:before { - content: "\25b8"; -} - -/* Header */ -.openerp .header { - height: 65px; - background: url("/web/static/src/img/header-background.png") repeat-x scroll left top transparent; - color: #FFFFFF; - letter-spacing: 0.5px; - text-shadow: 0 1px 0 #333333; -} -.openerp .company_logo_link { - display: block; - float: left; - height: 63px; - width: 200px; - border: 1px solid white; - border-right-color: black; - border-bottom-color: black; - background: #FFFFFF; - background: -moz-linear-gradient(top, #FFFFFF 0%, #CECECE 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#CECECE)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#CECECE',GradientType=0 ); -} -.openerp .company_logo { - margin-top: 7px; - margin-left: 10px; - display: block; - background: url(/web/static/src/img/logo.png); - width:180px; - height:46px; -} -.openerp .header_title { - float: left; - font-size: 100%; - margin: 0; - padding: 4px 10px; - text-shadow: 0 1px 0 #111111; - font-weight:normal; - line-height:14px; -} -.openerp .header_title small { - color: #ccc; - font-size: 90%; - font-weight: normal; -} -.openerp .header_corner { - float: right; -} -.openerp .header_corner .block { - float: left; - height: 34px; - line-height: 34px; - /*background: url(../images/top-sep-a.png) no-repeat;*/ - border-left: 1px solid #6a6a6a; - background: #828282; - background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 ); -} -.openerp .header_corner .block a { - display: block; - color: white; - text-decoration: none; - padding: 0 10px; -} -.openerp .header_corner .block a:hover { - background: #929292; - background: -moz-linear-gradient(top, #929292 0%, #4D4D4D 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#929292), color-stop(100%,#4D4D4D)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#929292', endColorstr='#4D4D4D',GradientType=0 ); -} -.openerp .header_corner ul.block { - list-style: none; - height: 34px; - margin: 0; - padding: 0 0 0 2px; - line-height: 33px; -} -.openerp .header_corner ul.block li { - float: left; -} -.openerp .header_corner ul.block li a { - padding: 0 5px; - position: relative; - line-height: 32px; -} -.openerp .header_corner ul.block li a img { - vertical-align: middle; -} -.openerp .header_corner ul.block li a small { - position: absolute; - right: 0; - top: 5px; - padding: 1px 4px 2px; - background: rgba(0, 0, 0, 0.75); - border-radius: 7px; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; - line-height: 1em; - font-weight: bold; -} - -.openerp .logout { - font-size:80%; -} - -/* Footer */ -.openerp div.oe_footer { - background: none repeat scroll 0 0 #CCCCCC; - overflow: hidden; - padding: 5px 0; - position: relative; - -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4); - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4); -} -.openerp div.oe_footer p.oe_footer_powered { - left: 50%; - margin: 0; - padding: 0 15px; - color: #666666; - font-weight: bold; - font-size: 0.8em; - text-align: center; -} -.openerp div.oe_footer p.oe_footer_powered a { - text-decoration: none; - color: #666666; -} - - -/* Main Application */ -.openerp .oe-main-content { - padding: 0; - height: 100%; -} - -.openerp h2.oe_view_title { - font-size: 110%; - font-weight: normal; - margin: 2px 0; - color: #252424; - text-shadow: white 0 1px 0; -} -.openerp div[id^="notebook"] .oe_view_title { - font-size:85%; - padding-bottom:4px; -} - -/* View Manager */ -.openerp .oe_vm_switch { - float: right; -} -.openerp .oe-view-manager-header .oe_view_title { - font-size:150%; - padding:2px 0 0 0; -} - -/* SearchView */ -.openerp .oe_searchview_field > div { - position: relative; - white-space: nowrap; -} -.openerp .oe_searchview_field .oe_input_icon { - top: auto; - bottom: 3px; -} - -.openerp .filter_label, .openerp .filter_icon { - background: #F0F0F0; - border: 1px solid #999; - background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 ); -} -.openerp .filter_label:hover, .openerp .filter_icon:hover { - background: #F0F0F0; - background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 ); -} -.openerp .filter_label:active, .openerp .filter_icon:active { - background: #aaa; - background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 ); -} -.openerp .filter_label.enabled, .openerp .filter_icon.enabled { - background: #aaa; - filter: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - -o-box-shadow: none; - box-shadow: none; -} -.openerp .filter_icon { - height: 22px; - padding: 1px 2px 0 2px; - margin: 0; - vertical-align: bottom; -} -.openerp .filter_label { - font-weight: bold; - text-transform: uppercase; - text-shadow: #EEE 0 1px 0; - color: #4C4C4C; - white-space: nowrap; - min-height: 40px; - min-width: 75px; - padding: 2px 4px; - margin: 0; -} -.openerp .filter_label_group { - padding-right: 0.4em; - white-space: nowrap; -} - -.openerp .filter_label_group button { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - border-right: none; -} -.openerp .filter_label_group button:first-child { - -webkit-border-top-left-radius: 7px; - -webkit-border-bottom-left-radius: 7px; - -moz-border-radius-topleft: 7px; - -moz-border-radius-bottomleft: 7px; - border-top-left-radius: 7px; - border-bottom-left-radius: 7px; - border-right: none; -} -.openerp .filter_label_group button:last-child { - -webkit-border-top-right-radius: 7px; - -webkit-border-bottom-right-radius: 7px; - -moz-border-radius-topright: 7px; - -moz-border-radius-bottomright: 7px; - border-top-right-radius: 7px; - border-bottom-right-radius: 7px; - border-right: 1px solid #999; -} -.openerp .filter_label_group button.filter_icon img { - padding: 1px 8px 0 8px; -} -.openerp .filter_label_group button.filter_icon:first-child { - border-left: solid 1px #999; - margin-left: -7px; - -webkit-border-top-left-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-topleft: 0; - -moz-border-radius-bottomleft: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -.openerp .searchview_group_string { - display: block; - color: #7D7979; - font-weight: bold; - padding: 2px 0 2px 10px; - text-decoration: none; -} -.openerp .searchview_group_string:hover { - background-color: #ccc; -} -.openerp .searchview_group.folded .searchview_group_string { - background: url("/web/static/src/img/ui/group-folded.png") no-repeat scroll 0 50%; -} -.openerp .searchview_group.folded .searchview_group_content { - display: none; -} -.openerp .searchview_group.expanded .searchview_group_string { - background: url("/web/static/src/img/ui/group-expanded.png") no-repeat scroll 0 50%; -} -.openerp .searchview_group.expanded .searchview_group_content { - display: block; - padding-bottom:3px; -} - -.openerp .searchview_group_content .oe_label, .openerp .searchview_group_content .oe_label_help { - font-weight: bold; - color: #4c4c4c; -} - -.openerp .oe-searchview-render-line .oe_label, .openerp .oe-searchview-render-line .oe_label_help { - font-weight: bold; - font-size: 80%; - white-space: nowrap; -} - -.openerp .searchview_extended_group { - padding: 3px; - margin: 2px; -} - -.openerp .searchview_extended_group .oe_adv_filters_and { - border-bottom: 1px solid #8E8E8E; - text-align: center; - margin-top: -10px; -} -.openerp .searchview_extended_group .oe_adv_filters_and span { - background: #F0EEEE; - position: relative; - top: 0.5em; - padding: 0 1em 0 1em; - color: #8E8E8E; -} - -.openerp .searchview_extended_group.last_group .oe_adv_filters_and { - display: none; -} - -.openerp .oe_search-view-buttons { - padding: 2px 0 10px 0; - vertical-align:middle; -} -.openerp .oe_search-view-filters-management { - float: right; -} -.openerp .oe_search-view-filters-management, .openerp .oe_search-view-custom-filter-btn { - float:right; -} - -.openerp .searchview_extended_add_proposition span { - font-size: 0.9em; - background: url(/web/static/src/img/icons/gtk-add.png) repeat-y; - padding-left: 18px; -} - -.openerp .searchview_extended_delete_group { - float:right; - display: none; -} - -.openerp .searchview_extended_delete_prop { - text-decoration: none; -} - -.openerp .searchview_extended_delete_group span, -.openerp .searchview_extended_delete_prop span { - font-size: 0.9em; - background: url(/web/static/src/img/icons/gtk-close.png) repeat-y; - padding-left: 18px; -} -/* List */ -.openerp table.oe-listview-content { - clear: right; - width: 100%; - border-spacing: 0; - border: 1px solid silver; -} - -.openerp .oe-listview thead table { - width: 100%; - border: none; -} -.openerp .oe-listview tr.odd { - background-color: #f3f3f3; -} -.openerp .oe-listview tbody tr:hover { - background-color: #ecebf2; -} -.openerp .oe-listview tbody tr:hover { - background-color: #eae9f0; -} -.openerp .oe-listview thead table tr, -.openerp .oe-listview thead table tr:hover { - background: none; -} - -.openerp .oe-listview > table > tbody > tr > td, -.openerp .oe-listview th { - vertical-align: middle; - text-align: left; - padding: 1px 2px; -} - -.openerp .oe-record-delete button, -.openerp button.oe-edit-row-save { - border: none; - height: 12px; - width: 12px; - background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent; - cursor: pointer; -} -.openerp button.oe-edit-row-save { - background-image: url('/web/static/src/img/icons/save-document.png'); -} - -/* Could use :not selectors if they were supported by MSIE8... */ -.openerp .oe-listview > table > tbody > tr > td { - border-left: 1px solid #dadada; /*currently commenting to test with no vertical lines in list view*/ -} -.openerp .oe-listview tbody td:first-child, -.openerp .oe-listview tbody td.oe-button, -.openerp .oe-listview tbody td.oe-button, -.openerp .oe-listview tbody th.oe-record-selector, -.openerp .oe-listview tbody td.oe-record-delete { - border-left: none; -} - -.openerp .oe-listview td.oe-record-delete { - text-align: right; -} -.openerp .oe-listview th.oe-sortable { - cursor: pointer; - font-size: 75%; - text-transform: uppercase; - padding: 0; - margin: 0; - padding-left: 3px; - color: #333; -} -.openerp .oe-listview th.oe-sortable .ui-icon { - height: 60%; - margin: -6px 0 0; - display: inline; - display: inline-block; - vertical-align: middle; -} - -.openerp .oe-listview > table > tbody > tr > td { - border-bottom: 1px solid #E3E3E3; -} - - -.openerp .oe-listview td.oe-actions { - border-bottom:none; -} - -.openerp .oe-listview .oe-record-selector, .openerp .oe-listview .oe-record-edit-link { - border-bottom: 1px solid #E3E3E3; -} -.openerp .oe-listview .oe-record-edit-link { - cursor: pointer; -} - -.openerp .oe-listview .oe-field-cell { - cursor: pointer; - margin-top: 0; - margin-bottom: 0; - padding-top: 3px; - padding-bottom: 3px; - font-size: 80%; -} -.openerp .oe-listview .oe-field-cell progress { - width: 100%; -} -.openerp .oe-listview .oe-field-cell.oe-button button, -.openerp .oe-listview .oe_form_button button { - margin: 0; - padding: 0; - border: none; - background: none; - width: 16px; - box-shadow: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; -} -.openerp .oe-listview .oe-field-cell button:active { - opacity: 0.5; -} -.openerp .oe-listview .oe-field-cell button img { - cursor: pointer; -} -.openerp .oe-listview .oe-field-cell button img:hover { - opacity: 0.75; -} - -.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img { - opacity: 0.5; -} - -.openerp .oe-listview th.oe-actions { - text-align: left; - white-space: nowrap; -} -.openerp .oe-listview th.oe-list-pager { - text-align: right; - white-space: nowrap; -} -.openerp .oe-list-pager .oe-pager-state { - cursor: pointer; - font-size: 90%; - color: #555; -} - -.openerp .oe_button.oe_button_pager, -.openerp .oe-list-pager > span, -.openerp .oe_form_pager > span { - line-height: 17px; - height: 17px; - cursor: pointer; - color: gray; - font-weight: bold; - vertical-align: middle; -} -.openerp .oe_button.oe_button_pager, -.openerp .oe_button.oe_button_pager:disabled { - padding: 0 3px 0 3px; - margin: 0; - height: 17px; -} -.openerp .oe-listview .oe-group-name { - padding-right: 1em; -} -.openerp .oe-listview .oe-group-name, -.openerp .oe-listview .oe-group-pagination { - white-space: nowrap; -} - -.openerp .oe-listview tfoot td { - padding: 3px 3px 0; -} -.openerp .oe-listview .oe-list-footer { - text-align: center; - white-space: nowrap; - color: #444; - font-size: 85%; -} -.openerp .oe-listview .oe-list-footer span { - margin: 0 1em; -} -.openerp .oe-listview .oe-list-footer progress { - vertical-align:-10% !important; - width: 100%; -} - -/** list rounded corners - - rounded corners are a pain on tables: need to round not only table, but - also on the first and last children of the first and last row - */ -.openerp .oe-listview table.oe-listview-content { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.openerp .oe-listview table.oe-listview-content thead tr:first-child th:first-child { - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; -} -.openerp .oe-listview table.oe-listview-content thead tr:first-child th:last-child { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; -} -.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:first-child, -.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:first-child, -.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child th:first-child { - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:last-child, -.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:last-child, -.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child td:last-child { - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; -} - -/* Notebook */ -.openerp .oe_form_notebook { - padding: 0; - background: none; - border-width: 0; -} -.openerp .oe_form_notebook .ui-tabs-panel { - padding: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; -} -.openerp .oe_form_notebook ul.ui-tabs-nav { - padding-left: 0; - background: transparent; - border-width: 0; - border-radius: 0; - -moz-border-radius: 0; - -webkit-border-radius: 0; - line-height: 0.8em; - font-size: 95%; - color: #555; -} -.openerp .oe_form_notebook ul.ui-tabs-nav li { - font-weight: bold; -} -.openerp .oe_form_notebook .ui-tabs-panel { - background: #f9f9f9; - border-width: 1px; -} -.openerp .oe_form_notebook .ui-tabs-selected { - background: #f9f9f9; -} -/* Unedit Form */ -.openerp .field_char, -.openerp .field_date, -.openerp .field_float, -.openerp .field_selection, -.openerp a.oe_form_uri { - vertical-align: middle; - padding-top: 3px; - font-size: 90%; - color: #222; -} -.openerp a.oe_form_uri { - color: #9A0404; - line-height: 12px; -} - - - -/* Form */ -.openerp .oe_form_button_save_dirty { - display: none; -} -.openerp .oe_form_dirty > .oe_form_header > .oe_form_buttons > .oe_form_button_save { - color: white; - background: #dc5f59; - background: -moz-linear-gradient(#dc5f59, #b33630); - background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); - background: -webkit-linear-gradient(#dc5f59, #b33630); - -moz-box-shadow: none; - -webkit-box-shadow: none; - -box-shadow: none; - font-weight: bold; -} -.openerp .oe_form_frame_cell input[type="checkbox"] { - margin-top: 3px; - vertical-align: middle; -} -.openerp .oe_form_frame_cell .input[type="text"] { - padding-bottom: 1px; -} - -.openerp table.oe_frame td { - color: #4c4c4c; -} -.openerp td.oe_form_frame_cell { - padding: 2px; - position: relative; -} -.openerp .oe_frame.oe_forms { - clear: both; -} -.openerp table.oe_frame { - color: #4c4c4c; -} -.openerp fieldset.oe_group_box { - border: 1px solid #AAAAAA; - moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - background: #F9F9F9; - padding: 4px; -} -.openerp fieldset.oe_group_box legend { - font-weight: bold; -} -.openerp td.oe_form_frame_cell { - padding: 2px; - position: relative; -} -.openerp td.oe_form_field_translatable, -.openerp td.oe_form_field_many2one, -.openerp td.oe_form_field_date, -.openerp td.oe_form_field_datetime { - white-space: nowrap; -} -.openerp td.oe_form_field_boolean { - padding-top: 4px; -} -.openerp td.oe_form_frame_cell.oe_form_group { - padding: 0; -} -.openerp .required.error { - border: 1px solid #900; -} -.openerp .oe_form_buttons, .openerp .oe_list_buttons { - float: left; -} -.openerp .oe_form_pager, .openerp .oe_list_pager { - float: right; - font-size: 80%; - color: gray; - font-weight: bold; -} - -.openerp .oe_form_pager { - margin-right: 3px; -} - - -.openerp label.oe_label_help, .openerp label.oe_label, -.openerp .oe_form_paragraph, -.openerp .oe_form_field_statusbar, -.openerp .oe_forms input[type="text"], -.openerp .oe_forms input[type="password"], -.openerp .oe_forms input[type="file"], -.openerp .oe_forms select, -.openerp .oe_forms .oe_button, -.openerp .oe_forms textarea { - font-size: 85%; -} - -.openerp label.oe_label_help, .openerp label.oe_label { - display: block; - color: #4c4c4c; - font-weight: normal; -} -.openerp label.oe_label_help { - cursor: help; -} -.openerp .oe_form_frame_cell .oe_label, .openerp .oe_form_frame_cell .oe_label_help { - font-weight: normal; -} -.openerp #tiptip_content { - font-size: 12px; -} -.openerp .oe_tooltip_string { - color: #FD5; - font-weight: bold; - font-size: 13px; -} -.openerp .oe_tooltip_help { - white-space: pre-wrap; -} -.openerp .oe_tooltip_technical { - padding: 0 0 4px 0; - margin: 5px 0 0 15px; - list-style: circle; -} -.openerp .oe_tooltip_technical_title { - font-weight: bold; -} - -.openerp .oe_forms label.oe_label, .openerp .oe_forms label.oe_label_help { - margin: 3px 0 0 3px; - white-space: nowrap; -} -.openerp .oe_forms .searchview_group_content label.oe_label, .openerp .searchview_group_content .oe_forms label.oe_label_help { /* making a distinction between labels in search view and other labels */ - margin: 3px 0 0 3px; -} - -.openerp label.oe_label_help span { - font-size: 80%; - color: darkgreen; - vertical-align:top; - position: relative; - top: -4px; - padding: 0 2px; -} -.openerp .oe_align_left { - text-align: left; -} -.openerp .oe_align_right { - text-align: right; -} -.openerp .oe_align_center { - text-align: center; -} -.openerp .oe_forms .oe_form_paragraph { - margin: 3px 0 0 0; - white-space: normal; -} - -.openerp .oe_forms .oe_form_paragraph.oe_multilines { - white-space: pre; -} - -.openerp .oe_form_field_one2many .oe-actions h3.oe_view_title, -.openerp .oe_form_field_one2many_list .oe-actions h3.oe_view_title{ - display: inline; - margin: 0 0.5em 0 0; -} - -.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon, -.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon { - height: 100%; - margin-top: -9px; -} - -.openerp table.oe_frame .oe-listview-content td { - color: inherit; -} - -/* Uneditable Form View */ -.openerp .oe_form_readonly { - -} -.openerp .oe_form_readonly .oe_form_frame_cell .field_text, -.openerp .oe_form_readonly .field_char, -.openerp .oe_form_readonly .field_int, -.openerp .oe_form_readonly .field_float, -.openerp .oe_form_readonly .field_email, -.openerp .oe_form_readonly .field_date, -.openerp .oe_form_readonly .field_selection, -.openerp .oe_forms_readonly .oe_form_field_many2one { - padding: 3px 2px 2px 2px; - background-color: white; - height: 17px; -} -.openerp .oe_form_readonly .oe_form_frame_cell .field_text { - height: auto; -} -.openerp .oe_form_readonly .field_datetime { - padding: 1px 2px 2px 2px; - background-color: white; - height:19px; -} -.openerp .oe_form_readonly .oe_form_field_many2one div { - background-color:white; - height:18px; - margin-bottom:1px; - padding: 0px 2px 5px 2px; -} - -.openerp .oe_form_readonly .oe_form_field_email div { - background-color: white; - padding: 1px 2px 3px 2px; -} - - -.openerp .oe_form_readonly .oe_form_field_text div.field_text, -.openerp .oe_form_readonly .oe_form_field_text_html div.field_text_html { - white-space: pre-wrap; -} -.openerp .oe_form_readonly .oe_form_frame_cell .field_text { - min-height:100px; -} -/* Inputs */ -.openerp .oe_forms input[type="text"], -.openerp .oe_forms input[type="password"], -.openerp .oe_forms input[type="file"], -.openerp .oe_forms select, -.openerp .oe_forms textarea { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - padding: 0 2px; - margin: 0 2px; - border: 1px solid #999; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: white; - min-width: 90px; - color: #1f1f1f; -} - -.openerp .oe_forms input.field_many2one, -.openerp .oe_forms input.field_binary, -.openerp .oe_forms input.field_binary, -.openerp .oe_forms input.field_email, -.openerp .oe_forms input.field_url { - border-right: none; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0px; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0px; - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; -} -.openerp .oe_button.oe_field_button { - -webkit-border-top-left-radius: 0px; - -webkit-border-bottom-left-radius: 0px; - -moz-border-radius-topleft: 0px; - -moz-border-radius-bottomleft: 0px; - border-top-left-radius: 0px; - border-bottom-left-radius: 0px; - margin-right:-1px; - height: 22px; -} - -.openerp .oe_form_field_email button img, -.openerp .oe_form_field_url button img { - vertical-align: top; -} -/* vertically recentering filter management select tag */ -.openerp select.oe_search-view-filters-management { - margin-top:2px; -} - -.openerp .oe_forms select{ - padding-top: 2px; -} -.openerp .oe_forms input[readonly], -.openerp .oe_forms select[readonly], -.openerp .oe_forms textarea[readonly], -.openerp .oe_forms input[disabled], -.openerp .oe_forms select[disabled], -.openerp .oe_forms textarea[disabled]{ - background: #E5E5E5 !important; - color: #666; -} -.openerp .oe_forms textarea { - resize:vertical; -} -.openerp .oe_forms input[type="text"], -.openerp .oe_forms input[type="password"], -.openerp .oe_forms input[type="file"], -.openerp .oe_forms select, -.openerp .oe_forms .oe_button { - height: 22px; -} - -.openerp .oe_forms input.field_datetime { - min-width: 11em; -} -.openerp .oe_forms .oe_form_button .oe_button { - color: #4c4c4c; - white-space: nowrap; - min-width: 100%; - width: 100%; -} -@-moz-document url-prefix() { - /* Strange firefox behaviour on width: 100% + white-space: nowrap */ - .openerp .oe_forms .oe_form_button .oe_button { - width: auto; - } -} -/* IE Hack - for IE < 9 - * Avoids buttons overflow - * */ -.openerp .oe_forms .oe_form_button .oe_button { - min-width: auto\9; -} -.openerp .oe_forms .button { - height: 22px; -} -.openerp .oe_forms .oe_button span { - position: relative; - vertical-align: top; -} -.openerp .oe_input_icon { - cursor: pointer; - margin: 3px 0 0 -21px; - vertical-align: top; -} -.openerp .oe_datepicker_container { - display: none; -} -.openerp .oe_datepicker_root { - display: inline-block; -} -.openerp .oe_form_frame_cell .oe_datepicker_root { - width: 100%; -} -.openerp .oe_input_icon_disabled { - position: absolute; - cursor: default; - opacity: 0.5; - filter:alpha(opacity=50); - right: 5px; - top: 3px; -} -.openerp .oe_trad_field.touched { - border: 1px solid green !important; -} - -/* http://www.quirksmode.org/dom/inputfile.html - * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image - */ -.openerp .oe-binary-file-set { - overflow: hidden; - position: relative; -} -.openerp input.oe-binary-file { - z-index: 0; - line-height: 0; - font-size: 50px; - position: absolute; - /* Should be adjusted for all browsers */ - top: -2px; - right: 0; - opacity: 0; - filter: alpha(opacity = 0); - -ms-filter: "alpha(opacity=0)"; - margin: 0; - padding:0; -} - -/* Widgets */ -.openerp .separator { - border: 0 solid #666; -} -.openerp .separator.horizontal { - font-weight: bold; - border-bottom-width: 1px; - margin: 3px 4px 3px 1px; - height: 17px; - font-size: 95%; -} -.openerp .separator.horizontal:empty { - height: 5px; -} -.openerp .oe_form_frame_cell.oe_form_separator_vertical { - border-left: 1px solid #666; -} -.openerp td.required input, .openerp td.required select { - background-color: #D2D2FF !important; -} -.openerp td.invalid input, .openerp td.invalid select, .openerp td.invalid textarea { - background-color: #F66 !important; - border: 1px solid #D00 !important; -} -.openerp div.oe-progressbar span { - position: absolute; - margin-left: 10px; - margin-top: 5px; - font-weight: bold; -} - -/* jQuery UI override */ -.openerp .ui-widget { - font-size: 1em; -} -.openerp .oe_form_field_progressbar .ui-progressbar { - height: 22px; - font-size: 10px; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - border: 1px solid #999; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: white; - min-width: 90px; -} -.openerp tbody.ui-widget-content { - margin-bottom: 10px; - border-spacing: 4px; -} -.openerp .ui-widget-header { - background: white none; -} -/* progress bars */ -.openerp .ui-progressbar .ui-widget-header { - background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; -} - -/* Sidebar */ -.openerp .view-manager-main-table { - margin: 0; - width:100%; - border-collapse:collapse; - height:100%; -} - -.openerp .view-manager-main-table tbody { - vertical-align: top; -} - -.openerp .oe-view-manager-header { - overflow: auto; - background: url("/web/static/src/img/sep-a.gif") 0 100% repeat-x; - margin:6px 0 6px 2px; -} -.openerp .oe_form_frame_cell .oe-view-manager-header { /* Trick: remove the background when element is in a formular */ - background: none; -} - -.openerp .oe-view-manager-header h2 { - float: left; -} - -.openerp .oe_view_manager_menu_tips blockquote { - display: none; - font-size: 85%; - margin: 0; - background: #fff; - border-bottom: 1px solid #CECBCB; - padding: 1px 10px; - color: #4C4C4C; -} -.openerp .oe_view_manager_menu_tips blockquote p { - margin: 0; - padding: 6px 1px 4px; -} - -.openerp .oe_view_manager_menu_tips blockquote div { - text-align: right; - margin-right:10px; -} - -.openerp .oe_view_manager_menu_tips blockquote div button { - border: none; - background: none; - padding: 0 4px; - margin: 0; - display: inline; - text-decoration: underline; - color: inherit; -} -.openerp .oe-view-manager-logs { - clear: both; - background: #fff; - margin: 0.25em 0; - font-size: 85%; - color: #4C4C4C; - position: relative; - overflow: hidden; -} -.openerp .oe-view-manager-logs ul { - margin: 0; - padding: 0 10px; - list-style: none; -} -.openerp .oe-view-manager-logs li:before { - content: '\2192 '; -} -.openerp .oe-view-manager-logs a { - text-decoration: none; - color: inherit; -} -/* only display first three log items of a folded logs list */ -.openerp .oe-view-manager-logs.oe-folded li:nth-child(n+4) { - display: none; -} -/* display link to more logs if there are more logs to view and the logview is - currently folded */ -.openerp .oe-view-manager-logs a.oe-more-logs { - display: none; -} -.openerp .oe-view-manager-logs.oe-folded.oe-has-more a.oe-more-logs { - display: block; -} -.openerp .oe-view-manager-logs a.oe-remove-everything { - position: absolute; - top: 0; - right: 0; - cursor: pointer; -} - -.openerp .view-manager-main-sidebar { - width: 180px; - padding: 0; - margin: 0; -} - -.openerp .sidebar-main-div { - height: 100%; - border-left: 1px solid #D2CFCF; -} - -.openerp .sidebar-content { - padding: 0; - margin: 0; - width: 180px; - height: 100%; - font-size: 0.9em; -} - -.openerp .closed-sidebar .sidebar-content { - width: 22px; -} - -.openerp .closed-sidebar .sidebar-content { - display: none; -} - -.openerp .sidebar-main-div a { - color: #555; - text-decoration: none; -} - -.openerp .sidebar-main-div a:hover { - color: black; -} - -.openerp .oe-sidebar-attachments-toolbar { - margin: 4px 0 0 4px; -} -.openerp .oe-sidebar-attachments-items { - clear: both; - padding-top: 5px !important; -} -.openerp .oe-sidebar-attachments-items li { - position: relative; - padding: 0 0 3px 10px !important; -} -.openerp .oe-sidebar-attachments-items li:hover { - background: #ddd; -} -.openerp .oe-sidebar-attachments-link { - display: block; - margin-right: 15px; - overflow: hidden; -} -.openerp .oe-sidebar-attachment-delete { - position: absolute; - right: 2px; - top: 1px; - overflow: hidden; - width: 15px; - height: 15px; - padding: 1px; - border-radius: 7px; - -moz-border-radius: 7px; - -webkit-border-radius: 7px; -} -.openerp .oe-sidebar-attachment-delete:hover { - background-color: white; -} - -.openerp .view-manager-main-sidebar h2 { - margin:0; - font-size: 1.15em; - color: #8E8E8E; - text-shadow: white 0 1px 0; - padding-left: 10px; - padding-right: 21px; - height: 21px; - - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */ - background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */ - - border: 1px solid #D2CFCF; - border-right-width: 0; - border-left-width: 0; -} -.openerp .view-manager-main-sidebar h2 { - border-top-width: 0; -} - -.openerp .view-manager-main-sidebar ul { - list-style-type: none; - margin: 0; - padding: 0; - display: block; -} - -.openerp .view-manager-main-sidebar li { - display: block; - padding: 3px 3px 3px 10px; -} - -.openerp .toggle-sidebar { - cursor: pointer; - border: 1px solid #D2CFCF; - border-top-width: 0; - display: block; - background: url(/web/static/src/img/toggle-a-bg.png); - width: 21px; - height: 21px; - z-index: 10; -} -.openerp .open-sidebar .toggle-sidebar { - margin-left: 158px; - background-position: 21px 0; - position: absolute; -} -.openerp .closed-sidebar .toggle-sidebar { - border-left: none; -} -.openerp li.oe_sidebar_print { - padding-left: 20px; - background: 1px 3px url(/web/static/src/img/icons/gtk-print.png) no-repeat; -} - -.openerp .oe_sidebar_print ul { - padding-left:8px; -} - -.openerp.kitten-mode-activated .main_table { - background: url(http://placekitten.com/g/1500/800) repeat; -} -.openerp.kitten-mode-activated.clark-gable .main_table { - background: url(http://amigrave.com/ClarkGable.jpg); - background-size: 100%; -} - -.openerp.kitten-mode-activated .header { - background: url(http://placekitten.com/g/211/65) repeat; -} - -.openerp.kitten-mode-activated .secondary_menu { - background: url(http://placekitten.com/g/212/100) repeat; -} - -.openerp.kitten-mode-activated .menu { - background: #828282; - background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D)); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 ); -} -.openerp.kitten-mode-activated .menu a { - background: none; -} -.openerp.kitten-mode-activated .menu span { - background: none; -} -.openerp.kitten-mode-activated .sidebar-content li a, -.openerp.kitten-mode-activated .oe-application .view-manager-main-content h2.oe_view_title, -.openerp.kitten-mode-activated .oe-application .view-manager-main-content a.searchview_group_string, -.openerp.kitten-mode-activated .oe-application .view-manager-main-content label { - color: white; -} -.openerp.kitten-mode-activated .menu, -.openerp.kitten-mode-activated .header_corner, -.openerp.kitten-mode-activated .header_title, -.openerp.kitten-mode-activated .secondary_menu div, -.openerp.kitten-mode-activated .oe-application, -.openerp.kitten-mode-activated .oe_footer, -.openerp.kitten-mode-activated .loading, -.openerp.kitten-mode-activated .ui-dialog { - opacity:0.8; - filter:alpha(opacity=80); -} -.openerp.kitten-mode-activated .header .company_logo { - background: url(http://placekitten.com/g/180/46); -} -.openerp.kitten-mode-activated .loading { - background: #828282; - border-color: #828282; -} - -.openerp .oe-m2o-drop-down-button { - margin-left: -24px; -} -.openerp .oe-m2o-drop-down-button img { - margin-bottom: -4px; - cursor: pointer; -} -.openerp .oe-m2o input { - border-right: none; - margin-right: 0px !important; - padding-bottom: 2px !important; -} -.openerp .oe-m2o-disabled-cm { - color: grey; -} -.openerp ul[role="listbox"] li a { - font-size:80%; -} -.parent_top { - vertical-align: text-top; -} - -.openerp .oe-dialog-warning p { - padding-left: 1em; - font-size: 1.2em; - font-weight: bold; -} - -.openerp .dhx_mini_calendar { - -moz-box-shadow: none; - -khtml-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} -.openerp .oe-treeview-table { - width: 100%; - background-color : #FFFFFF; - border-spacing: 0; - -} -.openerp .oe-treeview-table tr:hover{ - color: blue; - background-color : #D8D8D8; -} -.treeview-tr, .treeview-td { - cursor: pointer; - vertical-align: top; - text-align: left; - border-bottom: 1px solid #CFCCCC; -} -.openerp .oe-treeview-table .oe-number { - text-align: right !important; -} -.treeview-tr span, .treeview-td span { - font-size: 90%; - font-weight: normal; - white-space: nowrap; - display: block; - } -.treeview-tr.oe-treeview-first { - background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat; -} -.oe-open .treeview-tr.oe-treeview-first { - background-image: url(/web/static/src/img/collapse.gif); -} -.treeview-tr.oe-treeview-first span, -.treeview-td.oe-treeview-first span { - margin-left: 16px; -} - -.treeview-header { - vertical-align: top; - background-color : #D8D8D8; - white-space: nowrap; - text-align: left; - padding: 4px 5px; -} -/* Shortcuts*/ -.oe-shortcut-toggle { - height: 20px; - margin-top: 3px; - padding: 0; - width: 24px; - cursor: pointer; - display: block; - background: url(/web/static/src/img/add-shortcut.png) no-repeat center center; - float: left; -} -.oe-shortcut-remove{ - background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center; -} -.oe-shortcuts { - position: absolute; - margin: 0; - padding: 6px 15px; - top: 37px; - left: 197px; - right: 0; - height: 17px; - line-height: 1.2; -} -.oe-shortcuts ul { - display: block; - overflow: hidden; - list-style: none; - white-space: nowrap; - padding: 0; - margin: 0; -} -.oe-shortcuts li { - cursor: pointer; - display: -moz-inline-stack; - display: inline-block; - display: inline; /*IE7 */ - color: #fff; - text-align: center; - border-left: 1px solid #909090; - padding: 0 4px; - font-size: 80%; - font-weight: normal; - vertical-align: top; -} - -.oe-shortcuts li:hover { - background-color: #666; -} -.oe-shortcuts li:first-child { - border-left: none; - padding-left: 0; -} - -ul.oe-arrow-list { - padding-left: 1.1em; - margin: 0; - white-space: nowrap; -} -ul.oe-arrow-list li { - display: inline-block; - margin-left: -1em; -} -ul.oe-arrow-list li span { - vertical-align: top; - display: inline-block; - border: 1em solid #DEDEDE; - line-height:0em; -} -ul.oe-arrow-list .oe-arrow-list-before { - border-left-color: rgba(0,0,0,0); - border-right-width:0; -} -ul.oe-arrow-list .oe-arrow-list-after { - border-color: rgba(0,0,0,0); - border-left-color: #DEDEDE; - border-right-width:0; -} -ul.oe-arrow-list li.oe-arrow-list-selected span { - border-color: #B5B9FF; -} -ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-before { - border-left-color: rgba(0,0,0,0); -} -ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after { - border-color: rgba(0,0,0,0); - border-left-color: #B5B9FF; -} -.openerp ul.oe-arrow-list li:first-child span:first-child{ - -webkit-border-top-left-radius: 3px; - -moz-border-radius-topleft: 3px; - border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - -moz-border-radius-bottomleft: 3px; - border-bottom-left-radius: 3px; -} -.openerp ul.oe-arrow-list li:last-child span:last-child{ - -webkit-border-top-right-radius: 3px; - -moz-border-radius-topright: 3px; - border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - -moz-border-radius-bottomright: 3px; - border-bottom-right-radius: 3px; -} -.openerp .oe_view_editor { - width:100%; - border-collapse : collapse; - margin-left: -12px; - - width: 100%; - background-color : white; - border-spacing: 0; -} -.openerp .oe_view_editor td{ - text-align: center; - white-space: nowrap; - border: 1px solid #D8D8D8; - - cursor: pointer; - font-size: 90%; -} -.openerp .oe_view_editor_field td{ - border: 0px !important; -} - -.openerp .oe_view_editor tr:hover { - background-color: #ecebf2; -} - - -/* Dialog traceback cases */ -.openerp .oe_error_detail{ - display: block; -} -.openerp .oe_error_send{ - display:block; -} -.openerp .oe_fielddiv{ - display:inline-block; - width:100%; -} -.openerp .oe_fielddiv input[type=text],textarea{ - width:100%; -} -/* for Alignment center */ -.openerp .oe_centeralign{ - text-align:center; -} - -.openerp .oe_applications_tiles { - color: #4C4C4C; - text-shadow: #EEE 0 1px 0; - margin: 0 20px; -} - -.openerp .oe_vm_switch { - margin:2px 0 0 0; -} - -.openerp .oe_vm_switch_form, -.openerp .oe_vm_switch_page, -.openerp .oe_vm_switch_tree, -.openerp .oe_vm_switch_list, -.openerp .oe_vm_switch_graph, -.openerp .oe_vm_switch_gantt, -.openerp .oe_vm_switch_calendar, -.openerp .oe_vm_switch_kanban, -.openerp .oe_vm_switch_diagram { - background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent; - overflow: hidden; - width: 22px; - height: 21px; - border: none; - background-position: 0px 0px; -} - -.openerp .oe_vm_switch_form span, -.openerp .oe_vm_switch_page span, -.openerp .oe_vm_switch_tree span, -.openerp .oe_vm_switch_list span, -.openerp .oe_vm_switch_graph span, -.openerp .oe_vm_switch_gantt span, -.openerp .oe_vm_switch_calendar span, -.openerp .oe_vm_switch_kanban span, -.openerp .oe_vm_switch_diagram span { - display: none; -} - -.openerp .oe_vm_switch_list { - background-position: 0px 0px; -} -.openerp .oe_vm_switch_list:active, -.openerp .oe_vm_switch_list:hover, -.openerp .oe_vm_switch_list:focus, -.openerp .oe_vm_switch_list[disabled="disabled"] { - background-position: 0px -21px; -} - -.openerp .oe_vm_switch_tree { - background-position: 0px 0px; -} -.openerp .oe_vm_switch_tree:active, -.openerp .oe_vm_switch_tree:hover, -.openerp .oe_vm_switch_tree:focus, -.openerp .oe_vm_switch_tree[disabled="disabled"] { - background-position: 0px -21px; -} - -.openerp .oe_vm_switch_form { - background-position: -22px 0px; -} -.openerp .oe_vm_switch_form:active, -.openerp .oe_vm_switch_form:hover, -.openerp .oe_vm_switch_form:focus, -.openerp .oe_vm_switch_form[disabled="disabled"] { - background-position: -22px -21px; -} - -.openerp .oe_vm_switch_page { - background-position: -22px 0px; -} -.openerp .oe_vm_switch_page:active, -.openerp .oe_vm_switch_page:hover, -.openerp .oe_vm_switch_page:focus, -.openerp .oe_vm_switch_page[disabled="disabled"] { - background-position: -22px -21px; -} -.openerp .oe_vm_switch_graph { - background-position: -44px 0px; -} -.openerp .oe_vm_switch_graph:active, -.openerp .oe_vm_switch_graph:hover, -.openerp .oe_vm_switch_graph:focus, -.openerp .oe_vm_switch_graph[disabled="disabled"] { - background-position: -44px -21px; -} - -.openerp .oe_vm_switch_gantt { - background-position: -66px 0px; -} -.openerp .oe_vm_switch_gantt:active, -.openerp .oe_vm_switch_gantt:hover, -.openerp .oe_vm_switch_gantt:focus, -.openerp .oe_vm_switch_gantt[disabled="disabled"] { - background-position: -66px -21px; -} - -.openerp .oe_vm_switch_calendar { - background-position: -88px 0px; -} -.openerp .oe_vm_switch_calendar:active, -.openerp .oe_vm_switch_calendar:hover, -.openerp .oe_vm_switch_calendar:focus, -.openerp .oe_vm_switch_calendar[disabled="disabled"] { - background-position: -88px -21px; -} -.openerp .oe_vm_switch_kanban { - background-position: -110px 0px; -} -.openerp .oe_vm_switch_kanban:active, -.openerp .oe_vm_switch_kanban:hover, -.openerp .oe_vm_switch_kanban:focus, -.openerp .oe_vm_switch_kanban[disabled="disabled"] { - background-position: -110px -21px; -} - -.openerp .oe_vm_switch_diagram { - background-position: 0px 0px; -} -.openerp .oe_vm_switch_diagram:active, -.openerp .oe_vm_switch_diagram:hover, -.openerp .oe_vm_switch_diagram:focus, -.openerp .oe_vm_switch_diagram[disabled="disabled"] { - background-position: 0px -21px; -} - -/* Buttons */ -.openerp .oe_button:link, -.openerp .oe_button:visited, -.openerp .oe_button { - display: inline-block; - border: 1px solid #ababab; - color: #404040; - font-size: 12px; - padding: 3px 10px; - text-align: center; - -o-background-size: 100% 100%; - -moz-background-size: 100% 100%; - -webkit-background-size: auto auto !important; - background-size: 100% 100%; - background: #d8d8d8 none; - background: none, -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); - background: none, -webkit-linear-gradient(#efefef, #d8d8d8); - background: none, -moz-linear-gradient(#efefef, #d8d8d8); - background: none, -o-linear-gradient(top, #efefef, #d8d8d8); - background: none, -khtml-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); - background: -ms-linear-gradient(top, #efefef, #d8d8d8); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#d8d8d8',GradientType=0 ); - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - -o-border-radius: 3px; - -ms-border-radius: 3px; - border-radius: 3px; - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; - -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); - -webkit-font-smoothing: antialiased; - outline: none; -} - -.openerp .oe_button:hover { - -o-background-size: 100% 100%; - -moz-background-size: 100% 100%; - -webkit-background-size: auto auto !important; - background-size: 100% 100%; - background: #e3e3e3 none; - background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); - background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3); - background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3); - background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3); - background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); - background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 ); - cursor: pointer; -} - -.openerp .oe_button:focus { - border: 1px solid #80bfff; - -o-background-size: 100% 100%; - -moz-background-size: 100% 100%; - -webkit-background-size: auto auto !important; - background-size: 100% 100%; - background: #e3e3e3, none; - background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); - background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3); - background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3); - background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3); - background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); - background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 ); - -moz-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; - -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; - -o-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; - box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; -} - -.openerp .oe_button:active, -.openerp .oe_button.active { - background: #e3e3e3; - background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f; - background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f; - background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f; - background: -ms-linear-gradient(top, #e3e3e3, #f6f6f6); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#f6f6f6',GradientType=0 ); - -moz-box-shadow: none, 0 0 0 transparent; - -webkit-box-shadow: none, 0 0 0 transparent; - -o-box-shadow: none, 0 0 0 transparent; - box-shadow: none, 0 0 0 transparent; -} - -.openerp .oe_button.disabled, -.openerp .oe_button:disabled { - background: #efefef !important; - border: 1px solid #d1d1d1 !important; - font-size: 12px; - padding: 3px 10px; - -moz-box-shadow: none !important, 0 0 0 transparent; - -webkit-box-shadow: none !important, 0 0 0 transparent; - -o-box-shadow: none !important, 0 0 0 transparent; - box-shadow: none !important, 0 0 0 transparent; - color: #aaaaaa !important; - cursor: default; - text-shadow: 0 1px 1px white !important; -} - -.openerp select.oe_search-view-filters-management { - font-style: oblique; - color: #999999; -} - -.openerp .oe_search-view-filters-management option, -.openerp .oe_search-view-filters-management optgroup { - font-style: normal; - color: black; -} - -/* Debug stuff */ -.openerp .oe_debug_view_log { - font-size: 95%; -} -.openerp .oe_debug_view_log label { - display: block; - width: 49%; - text-align: right; - float: left; - font-weight: bold; - color: #009; -} -.openerp .oe_debug_view_log span { - display: block; - width: 49%; - float: right; - color: #333; -} - -/* Internet Explorer Fix */ -a img { - border: none; -} diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass new file mode 100644 index 00000000000..dcb078e8903 --- /dev/null +++ b/addons/web/static/src/css/base.sass @@ -0,0 +1,3 @@ +// vim:tabstop=4:shiftwidth=4:softtabstop=4 +.openerp2 + // Minh's playground. diff --git a/addons/web/static/src/css/base_old.css b/addons/web/static/src/css/base_old.css new file mode 100644 index 00000000000..1fac47d128c --- /dev/null +++ b/addons/web/static/src/css/base_old.css @@ -0,0 +1,2382 @@ +.openerp { + padding: 0; + margin: 0; + height: 100%; + font-size: 80%; + font-family: Ubuntu, Helvetica, sans-serif; +} + +.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option, +.openerp button, .openerp .ui-widget { + font-family: Ubuntu, Helvetica, sans-serif; + font-size:85%; +} + +.openerp .view-manager-main-content { + width: 100%; + padding: 0 8px 8px 8px; +} + +.openerp .oe_form_frame_cell .view-manager-main-content { + padding: 0; +} + +.oe_box { + border: 1px solid #aaf; + padding: 2px; + margin: 2px; +} + +#oe_header h2 { + margin: 2px 0; +} + +#oe_errors pre { + margin: 0; +} + +.openerp .oe-listview .oe-number { + text-align: right !important; +} +.oe-listview-header-columns { + background: #d1d1d1; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* W3C */ +} + +.openerp .oe_hide { + display: none !important; +} + +/* STATES */ +.openerp .on_logged, +.openerp .db_options_row { + display: none; +} + +/* Loading */ +.loading { + cursor: wait; +} +.openerp .loading { + display: none; + z-index: 100; + position: fixed; + top: 0; + right: 50%; + padding: 4px 12px; + background: #A61300; + color: white; + text-align: center; + border: 1px solid #900; + border-top: none; + -moz-border-radius-bottomright: 8px; + -moz-border-radius-bottomleft: 8px; + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; +} +.openerp .oe_notification { + z-index: 1050; + display: none; +} +.openerp .oe_notification * { + color: white; +} + +/* Login page */ + +.login { + padding: 0; + margin: 0; + font-family: "Lucida Grande", Helvetica, Verdana, Arial; + background: url("/web/static/src/img/pattern.png") repeat; + color: #eee; + font-size: 14px; + height: 100%; +} + +.login ul, ol { + padding: 0; + margin: 0; +} + +.login li { + list-style-type: none; + padding-bottom: 4px; +} + +.login a { + color: #eee; + text-decoration: none; +} + +.login button { + float: right; + display: inline-block; + cursor: pointer; + padding: 6px 16px; + font-size: 13px; + font-family: "Lucida Grande", Helvetica, Verdana, Arial; + border: 1px solid #222222; + color: white; + margin: 0; + background: #600606; + background: -moz-linear-gradient(#b92020, #600606); + background: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606)); + background: -ms-linear-gradient(top, #b92020, #600606); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b92020', endColorstr='#600606',GradientType=0 ); + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(155, 155, 155, 0.4) inset; + -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset; +} + +.login input, .login select { + width: 252px; + font-size: 14px; + font-family: "Lucida Grande", Helvetica, Verdana, Arial; + border: 1px solid #999999; + background: whitesmoke; + -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + -box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.login input { + margin-bottom: 9px; + padding: 5px 6px; +} + +.login select { + padding: 1px; +} + +.login .dbpane { + position: fixed; + top: 0; + right: 8px; + padding: 5px 10px; + color: #eee; + border: solid 1px #333; + background: #1e1e1e; + background: rgba(30,30,30,0.94); + -moz-border-radius: 0 0 8px 8px; + -webkit-border-radius: 0 0 8px 8px; + border-radius: 0 0 8px 8px; +} + +.login .bottom { + position: absolute; + top: 50%; + left: 0; + right: 0; + bottom: 0; + text-shadow: 0 1px 1px #999999; + background: #600606; + background: -moz-linear-gradient(#b41616, #600606); + background: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606)); + background: -ms-linear-gradient(top, #b41616, #600606); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b41616', endColorstr='#600606',GradientType=0 ); +} + +.login .pane { + position: absolute; + top: 50%; + left: 50%; + margin: -160px -166px; + border: solid 1px #333333; + background: #1e1e1e; + background: rgba(30,30,30,0.94); + padding: 22px 32px; + text-align: left; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); + -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); + -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); +} + +.login .pane h2 { + margin-top: 0; + font-size: 18px; +} + +.login #logo { + position: absolute; + top: -70px; + left: 0; + width: 100%; + margin: 0 auto; + text-align: center; +} + +.login .footer { + position: absolute; + bottom: -40px; + left: 0; + width: 100%; + text-align: center; +} + +.login .footer a { + font-size: 13px; + margin: 0 8px; +} + +.login .footer a:hover { + text-decoration: underline; +} + +.login .openerp { + font-weight: bold; + font-family: serif; + font-size: 16px; +} + +.openerp .login { + text-align: center; +} + +.openerp .login .login_error_message { + display: none; + background-color: #b41616; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); + -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); + color: #eee; + font-size: 14px; + padding: 14px 18px; + margin-top: 15px; + text-align: center; +} + +.openerp .login.login_invalid .login_error_message { + display: inline-block; +} + + + +/* Database */ +.login .oe-database-manager { + display: none; + height: 100%; + width: 100%; + background-color: white; +} +.login.database_block .bottom, +.login.database_block .login_error_message, +.login.database_block .pane { + display: none; +} +.login.database_block .oe-database-manager { + display: block; +} + +.login .database { + float: left; + width: 202px; + height: 100%; + background: #666666; +} +.login .oe_db_options { + margin-left: 202px; + color: black; + padding-top: 20px; +} + +.login .database ul { + margin-top: 65px; +} + +ul.db_options li { + padding: 5px 0 10px 5px; + background: #949292; /* Old browsers */ + background: -moz-linear-gradient(top, #949292 30%, #6d6b6b 95%, #282828 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#949292), color-stop(95%,#6d6b6b), color-stop(100%,#282828)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* W3C */ + /* for ie9 */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */ + border: none; + /* overriding jquery ui */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + display: block; + font-weight: bold; + text-transform: uppercase; + margin: 1px; + color: #EEEEEE; + cursor: pointer; + width: 195px; + font-size: 12px; +} + +.db_option_table { + border: 1px solid #5A5858; + padding: 5px; + -moz-border-radius: 10px; +} + +table.db_option_table input.required { + background-color: #D2D2FF !important; +} + +.db_option_table label { + display: block; + text-align: right; +} + +.db_option_table input[type="text"], +.db_option_table input[type="password"], +.db_option_table input[type="file"], +.db_option_table select { + width: 300px; +} + +.option_string { + font-weight: bold; + color: #555; + width: 100%; + text-align: center; + padding: 10px 0; + font-size: large; +} + +label.error { + float: none; + color: red; + padding-left: .5em; + vertical-align: top; +} + +/* Main*/ +.openerp .main_table { + width: 100%; + height: 100%; + background: #f0eeee; +} +.openerp .oe-application { + height: 100%; +} +.openerp .oe-application-container { + width: 100%; + height: 100%; +} + +/* IE Hack - for IE < 9 + * Avoids footer to be placed statically at 100% cutting the middle of the views + * */ +.openerp .oe-application-container { + height: auto\9; + min-height: 100%\9; +} + +/* Menu */ +.openerp .menu { + height: 34px; + background: #cc4e45; /* Old browsers */ + background: -moz-linear-gradient(top, #cc4e45 0%, #b52d20 8%, #7a211a 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc4e45), color-stop(8%,#b52d20), color-stop(100%,#7a211a)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CC4E45', endColorstr='#7A211A',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* W3C */ +} +.openerp .menu td { + text-align: center; + padding:0; +} +.openerp .menu a { + display:block; + min-width: 60px; + height: 20px; + margin: 3px 2px; + padding: 0 8px; + + background: #bd5e54; /* Old browsers */ + background: -moz-linear-gradient(top, #bd5e54 0%, #90322a 60%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bd5e54), color-stop(60%,#90322a)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#BD5E54', endColorstr='#90322A',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #bd5e54 0%,#90322a 60%); /* W3C */ + + border: 1px solid #5E1A14; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + + color: #eee; + text-shadow: #222 0 1px 0; + text-decoration: none; + text-transform: uppercase; + line-height: 20px; + font-weight: bold; + font-size: 75%; + + white-space: nowrap; +} +.openerp .menu a:hover, +.openerp .menu a:focus, +.openerp .menu a.active { + background: #c6c6c6; /* Old browsers */ + background: -moz-linear-gradient(top, #c6c6c6 0%, #5c5c5c 7%, #969595 86%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c6c6c6), color-stop(7%,#5c5c5c), color-stop(86%,#969595)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C6C6C6', endColorstr='#969595',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* W3C */ + /* for ie */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5c5c5c', endColorstr='#969595',GradientType=0 ); /* IE6-9 */ + color: #fff; +} +/* Secondary Menu */ +.openerp .secondary_menu .oe_toggle_secondary_menu { + position: absolute; + cursor: pointer; + border-left: 1px solid #282828; + border-bottom: 1px solid #282828; + width: 21px; + height: 21px; + z-index: 10; + background: transparent; + color: white; + text-shadow: 0 1px 0 #333; + text-align: center; + font-size: 18px; + line-height: 18px; + right: 0; +} +.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu { + position: static; + border-left: none; + border-bottom: 1px solid #282828; + width: 21px; + height: 21px; + background: #818181; +} +.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu span.oe_menu_fold { + display: none; +} +.openerp .secondary_menu.oe_unfolded .oe_toggle_secondary_menu span.oe_menu_unfold { + display: none; +} +.openerp .secondary_menu { + width: 200px; + min-width: 200px; + border-right: 1px solid #3C3C3C; + border-bottom: 1px solid #5A5858; + background: #5A5858; + vertical-align: top; + height: 100%; + display: block; + position: relative; + font-size:85%; +} +.openerp .secondary_menu.oe_folded { + width: 20px; + min-width: 20px; + position: static; +} +.openerp .secondary_menu.oe_folded .oe_secondary_menu.active { + position: absolute; + z-index: 100; + border: 4px solid #585858; + border-color: rgba(88, 88, 88, .5); + border-radius: 4px; + min-width: 200px; +} +.openerp .secondary_menu a { + display: block; + padding: 0 5px 2px 5px; + line-height: 20px; + text-decoration: none; + white-space: nowrap; + color: white; + text-shadow: 0 1px 0 #333; +} +.openerp .oe_secondary_submenu { + background: #5A5858; +} +.openerp .secondary_menu a.oe_secondary_menu_item { + background: #949292; /* Old browsers */ + background: -moz-linear-gradient(top, #949292 0%, #6d6b6b 87%, #282828 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#949292), color-stop(87%,#6d6b6b), color-stop(99%,#282828)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* W3C */ + /* for ie9 */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */ + white-space: nowrap; + color: white; + text-shadow: 0 1px 0 #333; + +} +.openerp a.oe_secondary_submenu_item { + padding: 0 5px 2px 10px; +} +.openerp a.oe_secondary_submenu_item, +.openerp a.oe_secondary_menu_item { + overflow: hidden; + text-overflow: ellipsis; +} +.openerp a.oe_secondary_submenu_item:hover, +.openerp a.oe_secondary_submenu_item.leaf.active { + display: block; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #d8d8d8 11%, #afafaf 86%, #333333 91%, #5a5858 96%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(11%,#d8d8d8), color-stop(86%,#afafaf), color-stop(91%,#333333), color-stop(96%,#5a5858)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#5A5858',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* W3C */ + padding: 0 5px 2px 10px; + line-height: 20px; + color: #3f3d3d; + text-decoration: none; + text-shadow: #fff 0 1px 0; +} +.openerp a.oe_secondary_submenu_item.submenu.opened span:before { + content: "\25be"; +} +.openerp a.oe_secondary_submenu_item.submenu span:before { + content: "\25b8"; +} + +/* Header */ +.openerp .header { + height: 65px; + background: url("/web/static/src/img/header-background.png") repeat-x scroll left top transparent; + color: #FFFFFF; + letter-spacing: 0.5px; + text-shadow: 0 1px 0 #333333; +} +.openerp .company_logo_link { + display: block; + float: left; + height: 63px; + width: 200px; + border: 1px solid white; + border-right-color: black; + border-bottom-color: black; + background: #FFFFFF; + background: -moz-linear-gradient(top, #FFFFFF 0%, #CECECE 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#CECECE)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#CECECE',GradientType=0 ); +} +.openerp .company_logo { + margin-top: 7px; + margin-left: 10px; + display: block; + background: url(/web/static/src/img/logo.png); + width:180px; + height:46px; +} +.openerp .header_title { + float: left; + font-size: 100%; + margin: 0; + padding: 4px 10px; + text-shadow: 0 1px 0 #111111; + font-weight:normal; + line-height:14px; +} +.openerp .header_title small { + color: #ccc; + font-size: 90%; + font-weight: normal; +} +.openerp .header_corner { + float: right; +} +.openerp .header_corner .block { + float: left; + height: 34px; + line-height: 34px; + /*background: url(../images/top-sep-a.png) no-repeat;*/ + border-left: 1px solid #6a6a6a; + background: #828282; + background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 ); +} +.openerp .header_corner .block a { + display: block; + color: white; + text-decoration: none; + padding: 0 10px; +} +.openerp .header_corner .block a:hover { + background: #929292; + background: -moz-linear-gradient(top, #929292 0%, #4D4D4D 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#929292), color-stop(100%,#4D4D4D)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#929292', endColorstr='#4D4D4D',GradientType=0 ); +} +.openerp .header_corner ul.block { + list-style: none; + height: 34px; + margin: 0; + padding: 0 0 0 2px; + line-height: 33px; +} +.openerp .header_corner ul.block li { + float: left; +} +.openerp .header_corner ul.block li a { + padding: 0 5px; + position: relative; + line-height: 32px; +} +.openerp .header_corner ul.block li a img { + vertical-align: middle; +} +.openerp .header_corner ul.block li a small { + position: absolute; + right: 0; + top: 5px; + padding: 1px 4px 2px; + background: rgba(0, 0, 0, 0.75); + border-radius: 7px; + -moz-border-radius: 7px; + -webkit-border-radius: 7px; + line-height: 1em; + font-weight: bold; +} + +.openerp .logout { + font-size:80%; +} + +/* Footer */ +.openerp div.oe_footer { + background: none repeat scroll 0 0 #CCCCCC; + overflow: hidden; + padding: 5px 0; + position: relative; + -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4); + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4); +} +.openerp div.oe_footer p.oe_footer_powered { + left: 50%; + margin: 0; + padding: 0 15px; + color: #666666; + font-weight: bold; + font-size: 0.8em; + text-align: center; +} +.openerp div.oe_footer p.oe_footer_powered a { + text-decoration: none; + color: #666666; +} + + +/* Main Application */ +.openerp .oe-main-content { + padding: 0; + height: 100%; +} + +.openerp h2.oe_view_title { + font-size: 110%; + font-weight: normal; + margin: 2px 0; + color: #252424; + text-shadow: white 0 1px 0; +} +.openerp div[id^="notebook"] .oe_view_title { + font-size:85%; + padding-bottom:4px; +} + +/* View Manager */ +.openerp .oe_vm_switch { + float: right; +} +.openerp .oe-view-manager-header .oe_view_title { + font-size:150%; + padding:2px 0 0 0; +} + +/* SearchView */ +.openerp .oe_searchview_field > div { + position: relative; + white-space: nowrap; +} +.openerp .oe_searchview_field .oe_input_icon { + top: auto; + bottom: 3px; +} + +.openerp .filter_label, .openerp .filter_icon { + background: #F0F0F0; + border: 1px solid #999; + background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 ); +} +.openerp .filter_label:hover, .openerp .filter_icon:hover { + background: #F0F0F0; + background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 ); +} +.openerp .filter_label:active, .openerp .filter_icon:active { + background: #aaa; + background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 ); +} +.openerp .filter_label.enabled, .openerp .filter_icon.enabled { + background: #aaa; + filter: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; +} +.openerp .filter_icon { + height: 22px; + padding: 1px 2px 0 2px; + margin: 0; + vertical-align: bottom; +} +.openerp .filter_label { + font-weight: bold; + text-transform: uppercase; + text-shadow: #EEE 0 1px 0; + color: #4C4C4C; + white-space: nowrap; + min-height: 40px; + min-width: 75px; + padding: 2px 4px; + margin: 0; +} +.openerp .filter_label_group { + padding-right: 0.4em; + white-space: nowrap; +} + +.openerp .filter_label_group button { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + border-right: none; +} +.openerp .filter_label_group button:first-child { + -webkit-border-top-left-radius: 7px; + -webkit-border-bottom-left-radius: 7px; + -moz-border-radius-topleft: 7px; + -moz-border-radius-bottomleft: 7px; + border-top-left-radius: 7px; + border-bottom-left-radius: 7px; + border-right: none; +} +.openerp .filter_label_group button:last-child { + -webkit-border-top-right-radius: 7px; + -webkit-border-bottom-right-radius: 7px; + -moz-border-radius-topright: 7px; + -moz-border-radius-bottomright: 7px; + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; + border-right: 1px solid #999; +} +.openerp .filter_label_group button.filter_icon img { + padding: 1px 8px 0 8px; +} +.openerp .filter_label_group button.filter_icon:first-child { + border-left: solid 1px #999; + margin-left: -7px; + -webkit-border-top-left-radius: 0; + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-topleft: 0; + -moz-border-radius-bottomleft: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.openerp .searchview_group_string { + display: block; + color: #7D7979; + font-weight: bold; + padding: 2px 0 2px 10px; + text-decoration: none; +} +.openerp .searchview_group_string:hover { + background-color: #ccc; +} +.openerp .searchview_group.folded .searchview_group_string { + background: url("/web/static/src/img/ui/group-folded.png") no-repeat scroll 0 50%; +} +.openerp .searchview_group.folded .searchview_group_content { + display: none; +} +.openerp .searchview_group.expanded .searchview_group_string { + background: url("/web/static/src/img/ui/group-expanded.png") no-repeat scroll 0 50%; +} +.openerp .searchview_group.expanded .searchview_group_content { + display: block; + padding-bottom:3px; +} + +.openerp .searchview_group_content .oe_label, .openerp .searchview_group_content .oe_label_help { + font-weight: bold; + color: #4c4c4c; +} + +.openerp .oe-searchview-render-line .oe_label, .openerp .oe-searchview-render-line .oe_label_help { + font-weight: bold; + font-size: 80%; + white-space: nowrap; +} + +.openerp .searchview_extended_group { + padding: 3px; + margin: 2px; +} + +.openerp .searchview_extended_group .oe_adv_filters_and { + border-bottom: 1px solid #8E8E8E; + text-align: center; + margin-top: -10px; +} +.openerp .searchview_extended_group .oe_adv_filters_and span { + background: #F0EEEE; + position: relative; + top: 0.5em; + padding: 0 1em 0 1em; + color: #8E8E8E; +} + +.openerp .searchview_extended_group.last_group .oe_adv_filters_and { + display: none; +} + +.openerp .oe_search-view-buttons { + padding: 2px 0 10px 0; + vertical-align:middle; +} +.openerp .oe_search-view-filters-management { + float: right; +} +.openerp .oe_search-view-filters-management, .openerp .oe_search-view-custom-filter-btn { + float:right; +} + +.openerp .searchview_extended_add_proposition span { + font-size: 0.9em; + background: url(/web/static/src/img/icons/gtk-add.png) repeat-y; + padding-left: 18px; +} + +.openerp .searchview_extended_delete_group { + float:right; + display: none; +} + +.openerp .searchview_extended_delete_prop { + text-decoration: none; +} + +.openerp .searchview_extended_delete_group span, +.openerp .searchview_extended_delete_prop span { + font-size: 0.9em; + background: url(/web/static/src/img/icons/gtk-close.png) repeat-y; + padding-left: 18px; +} +/* List */ +.openerp table.oe-listview-content { + clear: right; + width: 100%; + border-spacing: 0; + border: 1px solid silver; +} + +.openerp .oe-listview thead table { + width: 100%; + border: none; +} +.openerp .oe-listview tr.odd { + background-color: #f3f3f3; +} +.openerp .oe-listview tbody tr:hover { + background-color: #ecebf2; +} +.openerp .oe-listview tbody tr:hover { + background-color: #eae9f0; +} +.openerp .oe-listview thead table tr, +.openerp .oe-listview thead table tr:hover { + background: none; +} + +.openerp .oe-listview > table > tbody > tr > td, +.openerp .oe-listview th { + vertical-align: middle; + text-align: left; + padding: 1px 2px; +} + +.openerp .oe-record-delete button, +.openerp button.oe-edit-row-save { + border: none; + height: 12px; + width: 12px; + background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent; + cursor: pointer; +} +.openerp button.oe-edit-row-save { + background-image: url('/web/static/src/img/icons/save-document.png'); +} + +/* Could use :not selectors if they were supported by MSIE8... */ +.openerp .oe-listview > table > tbody > tr > td { + border-left: 1px solid #dadada; /*currently commenting to test with no vertical lines in list view*/ +} +.openerp .oe-listview tbody td:first-child, +.openerp .oe-listview tbody td.oe-button, +.openerp .oe-listview tbody td.oe-button, +.openerp .oe-listview tbody th.oe-record-selector, +.openerp .oe-listview tbody td.oe-record-delete { + border-left: none; +} + +.openerp .oe-listview td.oe-record-delete { + text-align: right; +} +.openerp .oe-listview th.oe-sortable { + cursor: pointer; + font-size: 75%; + text-transform: uppercase; + padding: 0; + margin: 0; + padding-left: 3px; + color: #333; +} +.openerp .oe-listview th.oe-sortable .ui-icon { + height: 60%; + margin: -6px 0 0; + display: inline; + display: inline-block; + vertical-align: middle; +} + +.openerp .oe-listview > table > tbody > tr > td { + border-bottom: 1px solid #E3E3E3; +} + + +.openerp .oe-listview td.oe-actions { + border-bottom:none; +} + +.openerp .oe-listview .oe-record-selector, .openerp .oe-listview .oe-record-edit-link { + border-bottom: 1px solid #E3E3E3; +} +.openerp .oe-listview .oe-record-edit-link { + cursor: pointer; +} + +.openerp .oe-listview .oe-field-cell { + cursor: pointer; + margin-top: 0; + margin-bottom: 0; + padding-top: 3px; + padding-bottom: 3px; + font-size: 80%; +} +.openerp .oe-listview .oe-field-cell progress { + width: 100%; +} +.openerp .oe-listview .oe-field-cell.oe-button button, +.openerp .oe-listview .oe_form_button button { + margin: 0; + padding: 0; + border: none; + background: none; + width: 16px; + box-shadow: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; +} +.openerp .oe-listview .oe-field-cell button:active { + opacity: 0.5; +} +.openerp .oe-listview .oe-field-cell button img { + cursor: pointer; +} +.openerp .oe-listview .oe-field-cell button img:hover { + opacity: 0.75; +} + +.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img { + opacity: 0.5; +} + +.openerp .oe-listview th.oe-actions { + text-align: left; + white-space: nowrap; +} +.openerp .oe-listview th.oe-list-pager { + text-align: right; + white-space: nowrap; +} +.openerp .oe-list-pager .oe-pager-state { + cursor: pointer; + font-size: 90%; + color: #555; +} + +.openerp .oe_button.oe_button_pager, +.openerp .oe-list-pager > span, +.openerp .oe_form_pager > span { + line-height: 17px; + height: 17px; + cursor: pointer; + color: gray; + font-weight: bold; + vertical-align: middle; +} +.openerp .oe_button.oe_button_pager, +.openerp .oe_button.oe_button_pager:disabled { + padding: 0 3px 0 3px; + margin: 0; + height: 17px; +} +.openerp .oe-listview .oe-group-name { + padding-right: 1em; +} +.openerp .oe-listview .oe-group-name, +.openerp .oe-listview .oe-group-pagination { + white-space: nowrap; +} + +.openerp .oe-listview tfoot td { + padding: 3px 3px 0; +} +.openerp .oe-listview .oe-list-footer { + text-align: center; + white-space: nowrap; + color: #444; + font-size: 85%; +} +.openerp .oe-listview .oe-list-footer span { + margin: 0 1em; +} +.openerp .oe-listview .oe-list-footer progress { + vertical-align:-10% !important; + width: 100%; +} + +/** list rounded corners + + rounded corners are a pain on tables: need to round not only table, but + also on the first and last children of the first and last row + */ +.openerp .oe-listview table.oe-listview-content { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.openerp .oe-listview table.oe-listview-content thead tr:first-child th:first-child { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.openerp .oe-listview table.oe-listview-content thead tr:first-child th:last-child { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; +} +.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:first-child, +.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:first-child, +.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child th:first-child { + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:last-child, +.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:last-child, +.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; +} + +/* Notebook */ +.openerp .oe_form_notebook { + padding: 0; + background: none; + border-width: 0; +} +.openerp .oe_form_notebook .ui-tabs-panel { + padding: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; +} +.openerp .oe_form_notebook ul.ui-tabs-nav { + padding-left: 0; + background: transparent; + border-width: 0; + border-radius: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + line-height: 0.8em; + font-size: 95%; + color: #555; +} +.openerp .oe_form_notebook ul.ui-tabs-nav li { + font-weight: bold; +} +.openerp .oe_form_notebook .ui-tabs-panel { + background: #f9f9f9; + border-width: 1px; +} +.openerp .oe_form_notebook .ui-tabs-selected { + background: #f9f9f9; +} +/* Unedit Form */ +.openerp .field_char, +.openerp .field_date, +.openerp .field_float, +.openerp .field_selection, +.openerp a.oe_form_uri { + vertical-align: middle; + padding-top: 3px; + font-size: 90%; + color: #222; +} +.openerp a.oe_form_uri { + color: #9A0404; + line-height: 12px; +} + + + +/* Form */ +.openerp .oe_form_button_save_dirty { + display: none; +} +.openerp .oe_form_dirty > .oe_form_header > .oe_form_buttons > .oe_form_button_save { + color: white; + background: #dc5f59; + background: -moz-linear-gradient(#dc5f59, #b33630); + background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); + background: -webkit-linear-gradient(#dc5f59, #b33630); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; + font-weight: bold; +} +.openerp .oe_form_frame_cell input[type="checkbox"] { + margin-top: 3px; + vertical-align: middle; +} +.openerp .oe_form_frame_cell .input[type="text"] { + padding-bottom: 1px; +} + +.openerp table.oe_frame td { + color: #4c4c4c; +} +.openerp td.oe_form_frame_cell { + padding: 2px; + position: relative; +} +.openerp .oe_frame.oe_forms { + clear: both; +} +.openerp table.oe_frame { + color: #4c4c4c; +} +.openerp fieldset.oe_group_box { + border: 1px solid #AAAAAA; + moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + background: #F9F9F9; + padding: 4px; +} +.openerp fieldset.oe_group_box legend { + font-weight: bold; +} +.openerp td.oe_form_frame_cell { + padding: 2px; + position: relative; +} +.openerp td.oe_form_field_translatable, +.openerp td.oe_form_field_many2one, +.openerp td.oe_form_field_date, +.openerp td.oe_form_field_datetime { + white-space: nowrap; +} +.openerp td.oe_form_field_boolean { + padding-top: 4px; +} +.openerp td.oe_form_frame_cell.oe_form_group { + padding: 0; +} +.openerp .required.error { + border: 1px solid #900; +} +.openerp .oe_form_buttons, .openerp .oe_list_buttons { + float: left; +} +.openerp .oe_form_pager, .openerp .oe_list_pager { + float: right; + font-size: 80%; + color: gray; + font-weight: bold; +} + +.openerp .oe_form_pager { + margin-right: 3px; +} + + +.openerp label.oe_label_help, .openerp label.oe_label, +.openerp .oe_form_paragraph, +.openerp .oe_form_field_statusbar, +.openerp .oe_forms input[type="text"], +.openerp .oe_forms input[type="password"], +.openerp .oe_forms input[type="file"], +.openerp .oe_forms select, +.openerp .oe_forms .oe_button, +.openerp .oe_forms textarea { + font-size: 85%; +} + +.openerp label.oe_label_help, .openerp label.oe_label { + display: block; + color: #4c4c4c; + font-weight: normal; +} +.openerp label.oe_label_help { + cursor: help; +} +.openerp .oe_form_frame_cell .oe_label, .openerp .oe_form_frame_cell .oe_label_help { + font-weight: normal; +} +.openerp #tiptip_content { + font-size: 12px; +} +.openerp .oe_tooltip_string { + color: #FD5; + font-weight: bold; + font-size: 13px; +} +.openerp .oe_tooltip_help { + white-space: pre-wrap; +} +.openerp .oe_tooltip_technical { + padding: 0 0 4px 0; + margin: 5px 0 0 15px; + list-style: circle; +} +.openerp .oe_tooltip_technical_title { + font-weight: bold; +} + +.openerp .oe_forms label.oe_label, .openerp .oe_forms label.oe_label_help { + margin: 3px 0 0 3px; + white-space: nowrap; +} +.openerp .oe_forms .searchview_group_content label.oe_label, .openerp .searchview_group_content .oe_forms label.oe_label_help { /* making a distinction between labels in search view and other labels */ + margin: 3px 0 0 3px; +} + +.openerp label.oe_label_help span { + font-size: 80%; + color: darkgreen; + vertical-align:top; + position: relative; + top: -4px; + padding: 0 2px; +} +.openerp .oe_align_left { + text-align: left; +} +.openerp .oe_align_right { + text-align: right; +} +.openerp .oe_align_center { + text-align: center; +} +.openerp .oe_forms .oe_form_paragraph { + margin: 3px 0 0 0; + white-space: normal; +} + +.openerp .oe_forms .oe_form_paragraph.oe_multilines { + white-space: pre; +} + +.openerp .oe_form_field_one2many .oe-actions h3.oe_view_title, +.openerp .oe_form_field_one2many_list .oe-actions h3.oe_view_title{ + display: inline; + margin: 0 0.5em 0 0; +} + +.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon, +.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon { + height: 100%; + margin-top: -9px; +} + +.openerp table.oe_frame .oe-listview-content td { + color: inherit; +} + +/* Uneditable Form View */ +.openerp .oe_form_readonly { + +} +.openerp .oe_form_readonly .oe_form_frame_cell .field_text, +.openerp .oe_form_readonly .field_char, +.openerp .oe_form_readonly .field_int, +.openerp .oe_form_readonly .field_float, +.openerp .oe_form_readonly .field_email, +.openerp .oe_form_readonly .field_date, +.openerp .oe_form_readonly .field_selection, +.openerp .oe_forms_readonly .oe_form_field_many2one { + padding: 3px 2px 2px 2px; + background-color: white; + height: 17px; +} +.openerp .oe_form_readonly .oe_form_frame_cell .field_text { + height: auto; +} +.openerp .oe_form_readonly .field_datetime { + padding: 1px 2px 2px 2px; + background-color: white; + height:19px; +} +.openerp .oe_form_readonly .oe_form_field_many2one div { + background-color:white; + height:18px; + margin-bottom:1px; + padding: 0px 2px 5px 2px; +} + +.openerp .oe_form_readonly .oe_form_field_email div { + background-color: white; + padding: 1px 2px 3px 2px; +} + + +.openerp .oe_form_readonly .oe_form_field_text div.field_text, +.openerp .oe_form_readonly .oe_form_field_text_html div.field_text_html { + white-space: pre-wrap; +} +.openerp .oe_form_readonly .oe_form_frame_cell .field_text { + min-height:100px; +} +/* Inputs */ +.openerp .oe_forms input[type="text"], +.openerp .oe_forms input[type="password"], +.openerp .oe_forms input[type="file"], +.openerp .oe_forms select, +.openerp .oe_forms textarea { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + padding: 0 2px; + margin: 0 2px; + border: 1px solid #999; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: white; + min-width: 90px; + color: #1f1f1f; +} + +.openerp .oe_forms input.field_many2one, +.openerp .oe_forms input.field_binary, +.openerp .oe_forms input.field_binary, +.openerp .oe_forms input.field_email, +.openerp .oe_forms input.field_url { + border-right: none; + -webkit-border-top-right-radius: 0px; + -webkit-border-bottom-right-radius: 0px; + -moz-border-radius-topright: 0px; + -moz-border-radius-bottomright: 0px; + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; +} +.openerp .oe_button.oe_field_button { + -webkit-border-top-left-radius: 0px; + -webkit-border-bottom-left-radius: 0px; + -moz-border-radius-topleft: 0px; + -moz-border-radius-bottomleft: 0px; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + margin-right:-1px; + height: 22px; +} + +.openerp .oe_form_field_email button img, +.openerp .oe_form_field_url button img { + vertical-align: top; +} +/* vertically recentering filter management select tag */ +.openerp select.oe_search-view-filters-management { + margin-top:2px; +} + +.openerp .oe_forms select{ + padding-top: 2px; +} +.openerp .oe_forms input[readonly], +.openerp .oe_forms select[readonly], +.openerp .oe_forms textarea[readonly], +.openerp .oe_forms input[disabled], +.openerp .oe_forms select[disabled], +.openerp .oe_forms textarea[disabled]{ + background: #E5E5E5 !important; + color: #666; +} +.openerp .oe_forms textarea { + resize:vertical; +} +.openerp .oe_forms input[type="text"], +.openerp .oe_forms input[type="password"], +.openerp .oe_forms input[type="file"], +.openerp .oe_forms select, +.openerp .oe_forms .oe_button { + height: 22px; +} + +.openerp .oe_forms input.field_datetime { + min-width: 11em; +} +.openerp .oe_forms .oe_form_button .oe_button { + color: #4c4c4c; + white-space: nowrap; + min-width: 100%; + width: 100%; +} +@-moz-document url-prefix() { + /* Strange firefox behaviour on width: 100% + white-space: nowrap */ + .openerp .oe_forms .oe_form_button .oe_button { + width: auto; + } +} +/* IE Hack - for IE < 9 + * Avoids buttons overflow + * */ +.openerp .oe_forms .oe_form_button .oe_button { + min-width: auto\9; +} +.openerp .oe_forms .button { + height: 22px; +} +.openerp .oe_forms .oe_button span { + position: relative; + vertical-align: top; +} +.openerp .oe_input_icon { + cursor: pointer; + margin: 3px 0 0 -21px; + vertical-align: top; +} +.openerp .oe_datepicker_container { + display: none; +} +.openerp .oe_datepicker_root { + display: inline-block; +} +.openerp .oe_form_frame_cell .oe_datepicker_root { + width: 100%; +} +.openerp .oe_input_icon_disabled { + position: absolute; + cursor: default; + opacity: 0.5; + filter:alpha(opacity=50); + right: 5px; + top: 3px; +} +.openerp .oe_trad_field.touched { + border: 1px solid green !important; +} + +/* http://www.quirksmode.org/dom/inputfile.html + * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image + */ +.openerp .oe-binary-file-set { + overflow: hidden; + position: relative; +} +.openerp input.oe-binary-file { + z-index: 0; + line-height: 0; + font-size: 50px; + position: absolute; + /* Should be adjusted for all browsers */ + top: -2px; + right: 0; + opacity: 0; + filter: alpha(opacity = 0); + -ms-filter: "alpha(opacity=0)"; + margin: 0; + padding:0; +} + +/* Widgets */ +.openerp .separator { + border: 0 solid #666; +} +.openerp .separator.horizontal { + font-weight: bold; + border-bottom-width: 1px; + margin: 3px 4px 3px 1px; + height: 17px; + font-size: 95%; +} +.openerp .separator.horizontal:empty { + height: 5px; +} +.openerp .oe_form_frame_cell.oe_form_separator_vertical { + border-left: 1px solid #666; +} +.openerp td.required input, .openerp td.required select { + background-color: #D2D2FF !important; +} +.openerp td.invalid input, .openerp td.invalid select, .openerp td.invalid textarea { + background-color: #F66 !important; + border: 1px solid #D00 !important; +} +.openerp div.oe-progressbar span { + position: absolute; + margin-left: 10px; + margin-top: 5px; + font-weight: bold; +} + +/* jQuery UI override */ +.openerp .ui-widget { + font-size: 1em; +} +.openerp .oe_form_field_progressbar .ui-progressbar { + height: 22px; + font-size: 10px; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #999; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: white; + min-width: 90px; +} +.openerp tbody.ui-widget-content { + margin-bottom: 10px; + border-spacing: 4px; +} +.openerp .ui-widget-header { + background: white none; +} +/* progress bars */ +.openerp .ui-progressbar .ui-widget-header { + background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; +} + +/* Sidebar */ +.openerp .view-manager-main-table { + margin: 0; + width:100%; + border-collapse:collapse; + height:100%; +} + +.openerp .view-manager-main-table tbody { + vertical-align: top; +} + +.openerp .oe-view-manager-header { + overflow: auto; + background: url("/web/static/src/img/sep-a.gif") 0 100% repeat-x; + margin:6px 0 6px 2px; +} +.openerp .oe_form_frame_cell .oe-view-manager-header { /* Trick: remove the background when element is in a formular */ + background: none; +} + +.openerp .oe-view-manager-header h2 { + float: left; +} + +.openerp .oe_view_manager_menu_tips blockquote { + display: none; + font-size: 85%; + margin: 0; + background: #fff; + border-bottom: 1px solid #CECBCB; + padding: 1px 10px; + color: #4C4C4C; +} +.openerp .oe_view_manager_menu_tips blockquote p { + margin: 0; + padding: 6px 1px 4px; +} + +.openerp .oe_view_manager_menu_tips blockquote div { + text-align: right; + margin-right:10px; +} + +.openerp .oe_view_manager_menu_tips blockquote div button { + border: none; + background: none; + padding: 0 4px; + margin: 0; + display: inline; + text-decoration: underline; + color: inherit; +} +.openerp .oe-view-manager-logs { + clear: both; + background: #fff; + margin: 0.25em 0; + font-size: 85%; + color: #4C4C4C; + position: relative; + overflow: hidden; +} +.openerp .oe-view-manager-logs ul { + margin: 0; + padding: 0 10px; + list-style: none; +} +.openerp .oe-view-manager-logs li:before { + content: '\2192 '; +} +.openerp .oe-view-manager-logs a { + text-decoration: none; + color: inherit; +} +/* only display first three log items of a folded logs list */ +.openerp .oe-view-manager-logs.oe-folded li:nth-child(n+4) { + display: none; +} +/* display link to more logs if there are more logs to view and the logview is + currently folded */ +.openerp .oe-view-manager-logs a.oe-more-logs { + display: none; +} +.openerp .oe-view-manager-logs.oe-folded.oe-has-more a.oe-more-logs { + display: block; +} +.openerp .oe-view-manager-logs a.oe-remove-everything { + position: absolute; + top: 0; + right: 0; + cursor: pointer; +} + +.openerp .view-manager-main-sidebar { + width: 180px; + padding: 0; + margin: 0; +} + +.openerp .sidebar-main-div { + height: 100%; + border-left: 1px solid #D2CFCF; +} + +.openerp .sidebar-content { + padding: 0; + margin: 0; + width: 180px; + height: 100%; + font-size: 0.9em; +} + +.openerp .closed-sidebar .sidebar-content { + width: 22px; +} + +.openerp .closed-sidebar .sidebar-content { + display: none; +} + +.openerp .sidebar-main-div a { + color: #555; + text-decoration: none; +} + +.openerp .sidebar-main-div a:hover { + color: black; +} + +.openerp .oe-sidebar-attachments-toolbar { + margin: 4px 0 0 4px; +} +.openerp .oe-sidebar-attachments-items { + clear: both; + padding-top: 5px !important; +} +.openerp .oe-sidebar-attachments-items li { + position: relative; + padding: 0 0 3px 10px !important; +} +.openerp .oe-sidebar-attachments-items li:hover { + background: #ddd; +} +.openerp .oe-sidebar-attachments-link { + display: block; + margin-right: 15px; + overflow: hidden; +} +.openerp .oe-sidebar-attachment-delete { + position: absolute; + right: 2px; + top: 1px; + overflow: hidden; + width: 15px; + height: 15px; + padding: 1px; + border-radius: 7px; + -moz-border-radius: 7px; + -webkit-border-radius: 7px; +} +.openerp .oe-sidebar-attachment-delete:hover { + background-color: white; +} + +.openerp .view-manager-main-sidebar h2 { + margin:0; + font-size: 1.15em; + color: #8E8E8E; + text-shadow: white 0 1px 0; + padding-left: 10px; + padding-right: 21px; + height: 21px; + + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */ + background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */ + + border: 1px solid #D2CFCF; + border-right-width: 0; + border-left-width: 0; +} +.openerp .view-manager-main-sidebar h2 { + border-top-width: 0; +} + +.openerp .view-manager-main-sidebar ul { + list-style-type: none; + margin: 0; + padding: 0; + display: block; +} + +.openerp .view-manager-main-sidebar li { + display: block; + padding: 3px 3px 3px 10px; +} + +.openerp .toggle-sidebar { + cursor: pointer; + border: 1px solid #D2CFCF; + border-top-width: 0; + display: block; + background: url(/web/static/src/img/toggle-a-bg.png); + width: 21px; + height: 21px; + z-index: 10; +} +.openerp .open-sidebar .toggle-sidebar { + margin-left: 158px; + background-position: 21px 0; + position: absolute; +} +.openerp .closed-sidebar .toggle-sidebar { + border-left: none; +} +.openerp li.oe_sidebar_print { + padding-left: 20px; + background: 1px 3px url(/web/static/src/img/icons/gtk-print.png) no-repeat; +} + +.openerp .oe_sidebar_print ul { + padding-left:8px; +} + +.openerp.kitten-mode-activated .main_table { + background: url(http://placekitten.com/g/1500/800) repeat; +} +.openerp.kitten-mode-activated.clark-gable .main_table { + background: url(http://amigrave.com/ClarkGable.jpg); + background-size: 100%; +} + +.openerp.kitten-mode-activated .header { + background: url(http://placekitten.com/g/211/65) repeat; +} + +.openerp.kitten-mode-activated .secondary_menu { + background: url(http://placekitten.com/g/212/100) repeat; +} + +.openerp.kitten-mode-activated .menu { + background: #828282; + background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 ); +} +.openerp.kitten-mode-activated .menu a { + background: none; +} +.openerp.kitten-mode-activated .menu span { + background: none; +} +.openerp.kitten-mode-activated .sidebar-content li a, +.openerp.kitten-mode-activated .oe-application .view-manager-main-content h2.oe_view_title, +.openerp.kitten-mode-activated .oe-application .view-manager-main-content a.searchview_group_string, +.openerp.kitten-mode-activated .oe-application .view-manager-main-content label { + color: white; +} +.openerp.kitten-mode-activated .menu, +.openerp.kitten-mode-activated .header_corner, +.openerp.kitten-mode-activated .header_title, +.openerp.kitten-mode-activated .secondary_menu div, +.openerp.kitten-mode-activated .oe-application, +.openerp.kitten-mode-activated .oe_footer, +.openerp.kitten-mode-activated .loading, +.openerp.kitten-mode-activated .ui-dialog { + opacity:0.8; + filter:alpha(opacity=80); +} +.openerp.kitten-mode-activated .header .company_logo { + background: url(http://placekitten.com/g/180/46); +} +.openerp.kitten-mode-activated .loading { + background: #828282; + border-color: #828282; +} + +.openerp .oe-m2o-drop-down-button { + margin-left: -24px; +} +.openerp .oe-m2o-drop-down-button img { + margin-bottom: -4px; + cursor: pointer; +} +.openerp .oe-m2o input { + border-right: none; + margin-right: 0px !important; + padding-bottom: 2px !important; +} +.openerp .oe-m2o-disabled-cm { + color: grey; +} +.openerp ul[role="listbox"] li a { + font-size:80%; +} +.parent_top { + vertical-align: text-top; +} + +.openerp .oe-dialog-warning p { + padding-left: 1em; + font-size: 1.2em; + font-weight: bold; +} + +.openerp .dhx_mini_calendar { + -moz-box-shadow: none; + -khtml-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} +.openerp .oe-treeview-table { + width: 100%; + background-color : #FFFFFF; + border-spacing: 0; + +} +.openerp .oe-treeview-table tr:hover{ + color: blue; + background-color : #D8D8D8; +} +.treeview-tr, .treeview-td { + cursor: pointer; + vertical-align: top; + text-align: left; + border-bottom: 1px solid #CFCCCC; +} +.openerp .oe-treeview-table .oe-number { + text-align: right !important; +} +.treeview-tr span, .treeview-td span { + font-size: 90%; + font-weight: normal; + white-space: nowrap; + display: block; + } +.treeview-tr.oe-treeview-first { + background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat; +} +.oe-open .treeview-tr.oe-treeview-first { + background-image: url(/web/static/src/img/collapse.gif); +} +.treeview-tr.oe-treeview-first span, +.treeview-td.oe-treeview-first span { + margin-left: 16px; +} + +.treeview-header { + vertical-align: top; + background-color : #D8D8D8; + white-space: nowrap; + text-align: left; + padding: 4px 5px; +} +/* Shortcuts*/ +.oe-shortcut-toggle { + height: 20px; + margin-top: 3px; + padding: 0; + width: 24px; + cursor: pointer; + display: block; + background: url(/web/static/src/img/add-shortcut.png) no-repeat center center; + float: left; +} +.oe-shortcut-remove{ + background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center; +} +.oe-shortcuts { + position: absolute; + margin: 0; + padding: 6px 15px; + top: 37px; + left: 197px; + right: 0; + height: 17px; + line-height: 1.2; +} +.oe-shortcuts ul { + display: block; + overflow: hidden; + list-style: none; + white-space: nowrap; + padding: 0; + margin: 0; +} +.oe-shortcuts li { + cursor: pointer; + display: -moz-inline-stack; + display: inline-block; + display: inline; /*IE7 */ + color: #fff; + text-align: center; + border-left: 1px solid #909090; + padding: 0 4px; + font-size: 80%; + font-weight: normal; + vertical-align: top; +} + +.oe-shortcuts li:hover { + background-color: #666; +} +.oe-shortcuts li:first-child { + border-left: none; + padding-left: 0; +} + +ul.oe-arrow-list { + padding-left: 1.1em; + margin: 0; + white-space: nowrap; +} +ul.oe-arrow-list li { + display: inline-block; + margin-left: -1em; +} +ul.oe-arrow-list li span { + vertical-align: top; + display: inline-block; + border: 1em solid #DEDEDE; + line-height:0em; +} +ul.oe-arrow-list .oe-arrow-list-before { + border-left-color: rgba(0,0,0,0); + border-right-width:0; +} +ul.oe-arrow-list .oe-arrow-list-after { + border-color: rgba(0,0,0,0); + border-left-color: #DEDEDE; + border-right-width:0; +} +ul.oe-arrow-list li.oe-arrow-list-selected span { + border-color: #B5B9FF; +} +ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-before { + border-left-color: rgba(0,0,0,0); +} +ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after { + border-color: rgba(0,0,0,0); + border-left-color: #B5B9FF; +} +.openerp ul.oe-arrow-list li:first-child span:first-child{ + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.openerp ul.oe-arrow-list li:last-child span:last-child{ + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.openerp .oe_view_editor { + width:100%; + border-collapse : collapse; + margin-left: -12px; + + width: 100%; + background-color : white; + border-spacing: 0; +} +.openerp .oe_view_editor td{ + text-align: center; + white-space: nowrap; + border: 1px solid #D8D8D8; + + cursor: pointer; + font-size: 90%; +} +.openerp .oe_view_editor_field td{ + border: 0px !important; +} + +.openerp .oe_view_editor tr:hover { + background-color: #ecebf2; +} + + +/* Dialog traceback cases */ +.openerp .oe_error_detail{ + display: block; +} +.openerp .oe_error_send{ + display:block; +} +.openerp .oe_fielddiv{ + display:inline-block; + width:100%; +} +.openerp .oe_fielddiv input[type=text],textarea{ + width:100%; +} +/* for Alignment center */ +.openerp .oe_centeralign{ + text-align:center; +} + +.openerp .oe_applications_tiles { + color: #4C4C4C; + text-shadow: #EEE 0 1px 0; + margin: 0 20px; +} + +.openerp .oe_vm_switch { + margin:2px 0 0 0; +} + +.openerp .oe_vm_switch_form, +.openerp .oe_vm_switch_page, +.openerp .oe_vm_switch_tree, +.openerp .oe_vm_switch_list, +.openerp .oe_vm_switch_graph, +.openerp .oe_vm_switch_gantt, +.openerp .oe_vm_switch_calendar, +.openerp .oe_vm_switch_kanban, +.openerp .oe_vm_switch_diagram { + background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent; + overflow: hidden; + width: 22px; + height: 21px; + border: none; + background-position: 0px 0px; +} + +.openerp .oe_vm_switch_form span, +.openerp .oe_vm_switch_page span, +.openerp .oe_vm_switch_tree span, +.openerp .oe_vm_switch_list span, +.openerp .oe_vm_switch_graph span, +.openerp .oe_vm_switch_gantt span, +.openerp .oe_vm_switch_calendar span, +.openerp .oe_vm_switch_kanban span, +.openerp .oe_vm_switch_diagram span { + display: none; +} + +.openerp .oe_vm_switch_list { + background-position: 0px 0px; +} +.openerp .oe_vm_switch_list:active, +.openerp .oe_vm_switch_list:hover, +.openerp .oe_vm_switch_list:focus, +.openerp .oe_vm_switch_list[disabled="disabled"] { + background-position: 0px -21px; +} + +.openerp .oe_vm_switch_tree { + background-position: 0px 0px; +} +.openerp .oe_vm_switch_tree:active, +.openerp .oe_vm_switch_tree:hover, +.openerp .oe_vm_switch_tree:focus, +.openerp .oe_vm_switch_tree[disabled="disabled"] { + background-position: 0px -21px; +} + +.openerp .oe_vm_switch_form { + background-position: -22px 0px; +} +.openerp .oe_vm_switch_form:active, +.openerp .oe_vm_switch_form:hover, +.openerp .oe_vm_switch_form:focus, +.openerp .oe_vm_switch_form[disabled="disabled"] { + background-position: -22px -21px; +} + +.openerp .oe_vm_switch_page { + background-position: -22px 0px; +} +.openerp .oe_vm_switch_page:active, +.openerp .oe_vm_switch_page:hover, +.openerp .oe_vm_switch_page:focus, +.openerp .oe_vm_switch_page[disabled="disabled"] { + background-position: -22px -21px; +} +.openerp .oe_vm_switch_graph { + background-position: -44px 0px; +} +.openerp .oe_vm_switch_graph:active, +.openerp .oe_vm_switch_graph:hover, +.openerp .oe_vm_switch_graph:focus, +.openerp .oe_vm_switch_graph[disabled="disabled"] { + background-position: -44px -21px; +} + +.openerp .oe_vm_switch_gantt { + background-position: -66px 0px; +} +.openerp .oe_vm_switch_gantt:active, +.openerp .oe_vm_switch_gantt:hover, +.openerp .oe_vm_switch_gantt:focus, +.openerp .oe_vm_switch_gantt[disabled="disabled"] { + background-position: -66px -21px; +} + +.openerp .oe_vm_switch_calendar { + background-position: -88px 0px; +} +.openerp .oe_vm_switch_calendar:active, +.openerp .oe_vm_switch_calendar:hover, +.openerp .oe_vm_switch_calendar:focus, +.openerp .oe_vm_switch_calendar[disabled="disabled"] { + background-position: -88px -21px; +} +.openerp .oe_vm_switch_kanban { + background-position: -110px 0px; +} +.openerp .oe_vm_switch_kanban:active, +.openerp .oe_vm_switch_kanban:hover, +.openerp .oe_vm_switch_kanban:focus, +.openerp .oe_vm_switch_kanban[disabled="disabled"] { + background-position: -110px -21px; +} + +.openerp .oe_vm_switch_diagram { + background-position: 0px 0px; +} +.openerp .oe_vm_switch_diagram:active, +.openerp .oe_vm_switch_diagram:hover, +.openerp .oe_vm_switch_diagram:focus, +.openerp .oe_vm_switch_diagram[disabled="disabled"] { + background-position: 0px -21px; +} + +/* Buttons */ +.openerp .oe_button:link, +.openerp .oe_button:visited, +.openerp .oe_button { + display: inline-block; + border: 1px solid #ababab; + color: #404040; + font-size: 12px; + padding: 3px 10px; + text-align: center; + -o-background-size: 100% 100%; + -moz-background-size: 100% 100%; + -webkit-background-size: auto auto !important; + background-size: 100% 100%; + background: #d8d8d8 none; + background: none, -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); + background: none, -webkit-linear-gradient(#efefef, #d8d8d8); + background: none, -moz-linear-gradient(#efefef, #d8d8d8); + background: none, -o-linear-gradient(top, #efefef, #d8d8d8); + background: none, -khtml-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); + background: -ms-linear-gradient(top, #efefef, #d8d8d8); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#d8d8d8',GradientType=0 ); + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -o-border-radius: 3px; + -ms-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); + -webkit-font-smoothing: antialiased; + outline: none; +} + +.openerp .oe_button:hover { + -o-background-size: 100% 100%; + -moz-background-size: 100% 100%; + -webkit-background-size: auto auto !important; + background-size: 100% 100%; + background: #e3e3e3 none; + background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3); + background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3); + background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3); + background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 ); + cursor: pointer; +} + +.openerp .oe_button:focus { + border: 1px solid #80bfff; + -o-background-size: 100% 100%; + -moz-background-size: 100% 100%; + -webkit-background-size: auto auto !important; + background-size: 100% 100%; + background: #e3e3e3, none; + background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3); + background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3); + background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3); + background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 ); + -moz-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -o-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; + box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} + +.openerp .oe_button:active, +.openerp .oe_button.active { + background: #e3e3e3; + background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f; + background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f; + background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f; + background: -ms-linear-gradient(top, #e3e3e3, #f6f6f6); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#f6f6f6',GradientType=0 ); + -moz-box-shadow: none, 0 0 0 transparent; + -webkit-box-shadow: none, 0 0 0 transparent; + -o-box-shadow: none, 0 0 0 transparent; + box-shadow: none, 0 0 0 transparent; +} + +.openerp .oe_button.disabled, +.openerp .oe_button:disabled { + background: #efefef !important; + border: 1px solid #d1d1d1 !important; + font-size: 12px; + padding: 3px 10px; + -moz-box-shadow: none !important, 0 0 0 transparent; + -webkit-box-shadow: none !important, 0 0 0 transparent; + -o-box-shadow: none !important, 0 0 0 transparent; + box-shadow: none !important, 0 0 0 transparent; + color: #aaaaaa !important; + cursor: default; + text-shadow: 0 1px 1px white !important; +} + +.openerp select.oe_search-view-filters-management { + font-style: oblique; + color: #999999; +} + +.openerp .oe_search-view-filters-management option, +.openerp .oe_search-view-filters-management optgroup { + font-style: normal; + color: black; +} + +/* Debug stuff */ +.openerp .oe_debug_view_log { + font-size: 95%; +} +.openerp .oe_debug_view_log label { + display: block; + width: 49%; + text-align: right; + float: left; + font-weight: bold; + color: #009; +} +.openerp .oe_debug_view_log span { + display: block; + width: 49%; + float: right; + color: #333; +} + +/* Internet Explorer Fix */ +a img { + border: none; +} diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 558631c6f13..8997896a57d 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1080,7 +1080,7 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC this._current_state = null; }, render_element: function() { - this.$element.addClass("openerp"); + this.$element.addClass("openerp openerp2"); }, start: function() { var self = this; From 274086825bb3218c62e0d8d4a84927f54e189284 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 23 Feb 2012 11:39:30 +0100 Subject: [PATCH 11/28] [FIX] account, cash statement: creation through web client bzr revid: qdp-launchpad@openerp.com-20120223103930-xv7f3lumv6w3i756 --- addons/account/account_cash_statement.py | 25 ++++++------------------ 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 226e78ccef6..491ab658717 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -212,25 +212,12 @@ class account_cash_statement(osv.osv): def create(self, cr, uid, vals, context=None): if self.pool.get('account.journal').browse(cr, uid, vals['journal_id'], context=context).type == 'cash': - open_close = self._get_cash_open_close_box_lines(cr, uid, context) - if vals.get('starting_details_ids', False): - for start in vals.get('starting_details_ids'): - dict_val = start[2] - for end in open_close['end']: - if end[2]['pieces'] == dict_val['pieces']: - end[2]['number'] += dict_val['number'] - vals.update({ -# 'ending_details_ids': open_close['start'], - 'starting_details_ids': open_close['end'] - }) - else: - vals.update({ - 'ending_details_ids': False, - 'starting_details_ids': False - }) - res_id = super(account_cash_statement, self).create(cr, uid, vals, context=context) - self.write(cr, uid, [res_id], {}) - return res_id + amount_total = 0.0 + for line in vals.get('starting_details_ids',False): + if line and len(line)==3 and line[2]: + amount_total+= line[2]['pieces'] * line[2]['number'] + vals.update(balance_start= amount_total) + return super(account_cash_statement, self).create(cr, uid, vals, context=context) def write(self, cr, uid, ids, vals, context=None): """ From 08267723ea0ce9e30083a5338a1d67182978f7e6 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 23 Feb 2012 13:59:00 +0100 Subject: [PATCH 12/28] [FIX] account: cannot iter on a boolean. stupid me bzr revid: qdp-launchpad@openerp.com-20120223125900-p08apwvl38ygv9i9 --- addons/account/account_cash_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 491ab658717..2768fd83019 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -213,7 +213,7 @@ class account_cash_statement(osv.osv): def create(self, cr, uid, vals, context=None): if self.pool.get('account.journal').browse(cr, uid, vals['journal_id'], context=context).type == 'cash': amount_total = 0.0 - for line in vals.get('starting_details_ids',False): + for line in vals.get('starting_details_ids',[]): if line and len(line)==3 and line[2]: amount_total+= line[2]['pieces'] * line[2]['number'] vals.update(balance_start= amount_total) From 3644361b1f3f429e15efde6e80e1cb26456cdad8 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 23 Feb 2012 14:11:40 +0100 Subject: [PATCH 13/28] [IMP] Webclient not OldWidget anymore. Renamed template to 'WebClient' Made a seperate revision because of edi addon dependency bzr revid: fme@openerp.com-20120223131140-2p7uycfs2el6ibei --- addons/web/static/src/js/chrome.js | 12 ++++-------- addons/web/static/src/xml/base.xml | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 15d0d0fc633..63587ad59fa 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1065,12 +1065,10 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ } }); -openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebClient */{ +openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClient */{ /** * @constructs openerp.web.WebClient - * @extends openerp.web.OldWidget - * - * @param element_id + * @extends openerp.web.Widget */ init: function(parent) { var self = this; @@ -1079,11 +1077,9 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC this._current_state = null; }, - render_element: function() { - this.$element.addClass("openerp openerp2"); - }, start: function() { var self = this; + this.$element.addClass("openerp openerp2"); if (jQuery.param != undefined && jQuery.deparam(jQuery.param.querystring()).kitten != undefined) { this.$element.addClass("kitten-mode-activated"); this.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) { @@ -1123,7 +1119,7 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC var self = this; this.destroy_content(); this.show_common(); - self.$table = $(QWeb.render("Interface", {})); + self.$table = $(QWeb.render("WebClient", {})); self.$element.append(self.$table); self.header = new openerp.web.Header(self); self.header.on_logout.add(this.proxy('on_logout')); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 98d99f74ef6..3d791fbbbd1 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -17,7 +17,7 @@ - +
From 909a48e9d608a81e0e28dc381708dcd9f4af568d Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 23 Feb 2012 14:14:16 +0100 Subject: [PATCH 14/28] [FIX] Edi: webclient's template name has been changed from 'Interface' to 'WebClient' bzr revid: fme@openerp.com-20120223131416-9k6b6l8bdnqbm1ma --- addons/edi/static/src/xml/edi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/edi/static/src/xml/edi.xml b/addons/edi/static/src/xml/edi.xml index 9378e12525c..1f27c49ccdd 100644 --- a/addons/edi/static/src/xml/edi.xml +++ b/addons/edi/static/src/xml/edi.xml @@ -3,7 +3,7 @@
- + From 865ffbd4cc0a8cd16f3b0e17f7a2b28e6408262b Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 23 Feb 2012 14:55:03 +0100 Subject: [PATCH 15/28] [BREAK] Prepare main div container for new layout bzr revid: fme@openerp.com-20120223135503-e89bnthvhbv2z58a --- addons/web/static/src/css/base.sass | 46 ++++++++++++++++++++++++++++- addons/web/static/src/xml/base.xml | 36 +++++++++++----------- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index dcb078e8903..51e11840bf9 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1,3 +1,47 @@ -// vim:tabstop=4:shiftwidth=4:softtabstop=4 +// Mixins {{{ +@mixin vertical-gradient($startColor: #555, $endColor: #333) + background: $startColor + background: -moz-linear-gradient($startColor, $endColor) + background: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) + background: -webkit-linear-gradient($startColor, $endColor) + +@mixin radial-gradient($gradient) + background-position: center center + background-image: radial-gradient($gradient) + background-image: -moz-radial-gradient($gradient) + background-image: -webkit-radial-gradient(circle, $gradient) + +@mixin radius($radius: 5px) + -moz-border-radius: $radius + -webkit-border-radius: $radius + border-radius: $radius + +@mixin box-shadow($bsval: 0px 1px 4px #777) + -moz-box-shadow: $bsval + -webkit-box-shadow: $bsval + -box-shadow: $bsval + +@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s)) + -webkit-transition: $transval + -moz-transition: $transval + -ms-transition: $transval + -o-transition: $transval + transition: $transval + +@mixin opacity($opacity: .5) + filter: alpha(opacity=$opacity * 100) + -khtml-opacity: $opacity + -moz-opacity: $opacity + opacity: $opacity + +@mixin background-clip($clip: padding-box) + -webkit-background-clip: $clip + -moz-background-clip: $clip + background-clip: $clip +// }}} + .openerp2 // Minh's playground. + +// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" +// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 3d791fbbbd1..89e28398bc9 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -18,15 +18,24 @@ -
- - - - - - - - - -
+
+
-
+ +
+ +
+
+ @@ -36,16 +45,9 @@
-
- -
+ + +
From a90d466ccbb23f8bc00c6fb5bcb1ce86adbdae68 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 23 Feb 2012 16:02:30 +0100 Subject: [PATCH 16/28] [ADD] Add styles for new main menu bzr revid: fme@openerp.com-20120223150230-n935rq8bv65a6gbj --- addons/web/static/src/css/base.css | 125 ++++++++++++++++++++++++++++ addons/web/static/src/css/base.sass | 95 ++++++++++++++++++++- addons/web/static/src/js/chrome.js | 20 ++--- addons/web/static/src/xml/base.xml | 15 ++-- 4 files changed, 235 insertions(+), 20 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index e69de29bb2d..71739e8167d 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -0,0 +1,125 @@ +/* line 43, base.sass */ +.openerp2 { + padding: 0; + margin: 0; + font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif; + color: #4c4c4c; + font-size: 13px; + background: white; + position: relative; +} +/* line 53, base.sass */ +.openerp2 a { + color: #4c4c4c; + text-decoration: none; +} +/* line 59, base.sass */ +.openerp2 .oe_webclient { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} +/* line 68, base.sass */ +.openerp2 .oe_topbar { + width: 100%; + height: 31px; + border-top: solid 1px #d3d3d3; + border-bottom: solid 1px black; + background: #646060; + background: -moz-linear-gradient(#646060, #262626); + background: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626)); + background: -webkit-linear-gradient(#646060, #262626); +} +/* line 75, base.sass */ +.openerp2 .oe_topbar .oe_topbar_item { + float: left; +} +/* line 77, base.sass */ +.openerp2 .oe_topbar .oe_topbar_item li { + float: left; +} +/* line 79, base.sass */ +.openerp2 .oe_topbar .oe_topbar_item li a { + display: block; + padding: 5px 10px 7px; + line-height: 20px; + height: 20px; + color: #eeeeee; + vertical-align: top; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); +} +/* line 87, base.sass */ +.openerp2 .oe_topbar .oe_topbar_item li a:hover { + background: #303030; + color: white; + -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; +} +/* line 91, base.sass */ +.openerp2 .oe_topbar .oe_topbar_item .oe_active { + background: #303030; + font-weight: bold; + color: white; + -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; +} +/* line 97, base.sass */ +.openerp2 .oe_topbar .oe_topbar_avatar { + width: 24px; + height: 24px; + margin: -2px 2px 0 0; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} +/* line 105, base.sass */ +.openerp2 .oe_menu { + float: left; + padding: 0; + margin: 0; +} +/* line 109, base.sass */ +.openerp2 .oe_menu li { + list-style-type: none; + float: left; +} +/* line 112, base.sass */ +.openerp2 .oe_menu a { + display: block; + padding: 5px 10px 7px; + line-height: 20px; + height: 20px; + color: #eeeeee; + vertical-align: top; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); +} +/* line 120, base.sass */ +.openerp2 .oe_menu a:hover { + background: #303030; + color: white; + -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; +} +/* line 124, base.sass */ +.openerp2 .oe_menu .oe_active { + background: #303030; + font-weight: bold; + color: white; + -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; + -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; +} + +/* line 133, base.sass */ +.openerp .oe-shortcuts { + position: static; +} +/* line 135, base.sass */ +.openerp #oe_header { + clear: both; +} diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 51e11840bf9..090c0ac822f 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -41,7 +41,100 @@ // }}} .openerp2 - // Minh's playground. + // Common styles {{{ + padding: 0 + margin: 0 + font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif + color: #4c4c4c + font-size: 13px + background: white + position: relative + + a + color: #4c4c4c + text-decoration: none + // }}} + + // WebClient {{{ + .oe_webclient + position: absolute + top: 0 + bottom: 0 + left: 0 + right: 0 + // }}} + + // Topbar {{{ + .oe_topbar + width: 100% + height: 31px + border-top: solid 1px #d3d3d3 + border-bottom: solid 1px black + @include vertical-gradient(#646060, #262626) + + .oe_topbar_item + float: left + li + float: left + a + display: block + padding: 5px 10px 7px + line-height: 20px + height: 20px + color: #eee + vertical-align: top + text-shadow: 0 1px 1px rgba(0,0,0,0.2) + &:hover + background: #303030 + color: white + @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) + .oe_active + background: #303030 + font-weight: bold + color: white + @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) + + .oe_topbar_avatar + width: 24px + height: 24px + margin: -2px 2px 0 0 + @include radius(4px) + // }}} + + // Menu {{{ + .oe_menu + float: left + padding: 0 + margin: 0 + li + list-style-type: none + float: left + a + display: block + padding: 5px 10px 7px + line-height: 20px + height: 20px + color: #eee + vertical-align: top + text-shadow: 0 1px 1px rgba(0,0,0,0.2) + &:hover + background: #303030 + color: white + @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) + .oe_active + background: #303030 + font-weight: bold + color: white + @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) + // }}} + +.openerp + // Transitional overrides for old styles {{{ + .oe-shortcuts + position: static + #oe_header + clear: both + // }}} // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 63587ad59fa..9d26b39ffad 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -887,7 +887,7 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ on_toggle_fold: function() { this.$secondary_menu.toggleClass('oe_folded').toggleClass('oe_unfolded'); if (this.folded) { - this.$secondary_menu.find('.oe_secondary_menu.active').show(); + this.$secondary_menu.find('.oe_secondary_menu.oe_active').show(); } else { this.$secondary_menu.find('.oe_secondary_menu').hide(); } @@ -903,8 +903,8 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ * @param {Number} menu_id database id of the terminal menu to select */ open_menu: function (menu_id) { - this.$element.add(this.$secondary_menu).find('.active') - .removeClass('active'); + this.$element.add(this.$secondary_menu).find('.oe_active') + .removeClass('oe_active'); this.$secondary_menu.find('> .oe_secondary_menu').hide(); var $primary_menu; @@ -913,7 +913,7 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ if ($secondary_submenu.length) { for(;;) { if ($secondary_submenu.hasClass('leaf')) { - $secondary_submenu.addClass('active'); + $secondary_submenu.addClass('oe_active'); } else if ($secondary_submenu.hasClass('submenu')) { $secondary_submenu.addClass('opened') } @@ -932,9 +932,9 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ if (!$primary_menu.length) { return; } - $primary_menu.addClass('active'); + $primary_menu.addClass('oe_active'); this.$secondary_menu.find( - 'div[data-menu-parent=' + $primary_menu.data('menu') + ']').addClass('active').toggle(!this.folded); + 'div[data-menu-parent=' + $primary_menu.data('menu') + ']').addClass('oe_active').toggle(!this.folded); }, on_menu_click: function(ev, id) { id = id || 0; @@ -964,7 +964,7 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ }, do_menu_click: function($clicked_menu, manual) { var $sub_menu, $main_menu, - active = $clicked_menu.is('.active'), + active = $clicked_menu.is('.oe_active'), sub_menu_visible = false, has_submenu_items = false; @@ -980,8 +980,8 @@ openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */ has_submenu_items = !!$sub_menu.children().length; this.$secondary_menu.find('.oe_secondary_menu').hide(); - $('.active', this.$element.add(this.$secondary_menu)).removeClass('active'); - $main_menu.add($clicked_menu).add($sub_menu).addClass('active'); + $('.oe_active', this.$element.add(this.$secondary_menu)).removeClass('oe_active'); + $main_menu.add($clicked_menu).add($sub_menu).addClass('oe_active'); if (has_submenu_items) { if (!(this.folded && manual)) { @@ -1125,7 +1125,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie self.header.on_logout.add(this.proxy('on_logout')); self.header.on_action.add(this.proxy('on_menu_action')); self.header.appendTo($("#oe_header")); - self.menu = new openerp.web.Menu(self, "oe_menu", "oe_secondary_menu"); + self.menu = new openerp.web.Menu(self, "oe_menu_temporary_id", "oe_secondary_menu"); self.menu.on_action.add(this.proxy('on_menu_action')); self.menu.start(); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 89e28398bc9..81d9f5ccd09 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -20,9 +20,9 @@
-
- +
+
- + ", "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "
+
+
@@ -373,6 +375,7 @@ t-att-data-shortcut-id="shortcut.id" > +
  • @@ -383,10 +386,6 @@
-
- - -
+ From 69c4a6aa341b3b68b8c3c079c48c9533c6be7018 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 23 Feb 2012 16:40:58 +0100 Subject: [PATCH 18/28] [IMP] account_payment: improved the module description to tackle the most common pitfall linked to this module + rst compliancy of few other modules bzr revid: qdp-launchpad@openerp.com-20120223154058-llobjuc4ih9nprz8 --- addons/account_coda/__openerp__.py | 73 +++++++++++++-------------- addons/account_payment/__openerp__.py | 15 +++--- addons/knowledge/__openerp__.py | 2 +- addons/profile_tools/__openerp__.py | 2 +- addons/report_designer/__openerp__.py | 2 +- addons/users_ldap/__openerp__.py | 2 +- 6 files changed, 47 insertions(+), 49 deletions(-) diff --git a/addons/account_coda/__openerp__.py b/addons/account_coda/__openerp__.py index 8376d7ebc9d..126027a41a7 100644 --- a/addons/account_coda/__openerp__.py +++ b/addons/account_coda/__openerp__.py @@ -26,52 +26,47 @@ "category": 'Accounting & Finance', "complexity": "normal", "description": ''' - Module to import CODA bank statements. +Module to import CODA bank statements. +====================================== - Supported are CODA flat files in V2 format from Belgian bank accounts. - - CODA v1 support. - - CODA v2.2 support. - - Foreign Currency support. - - Support for all data record types (0, 1, 2, 3, 4, 8, 9). - - Parsing & logging of all Transaction Codes and Structured Format Communications. - - Automatic Financial Journal assignment via CODA configuration parameters. - - Support for multiple Journals per Bank Account Number. - - Support for multiple statements from different bank accounts in a single CODA file. - - Support for 'parsing only' CODA Bank Accounts (defined as type='info' in the CODA Bank Account configuration records). - - Multi-language CODA parsing, parsing configuration data provided for EN, NL, FR. +Supported are CODA flat files in V2 format from Belgian bank accounts. +* CODA v1 support. +* CODA v2.2 support. +* Foreign Currency support. +* Support for all data record types (0, 1, 2, 3, 4, 8, 9). +* Parsing & logging of all Transaction Codes and Structured Format Communications. +* Automatic Financial Journal assignment via CODA configuration parameters. +* Support for multiple Journals per Bank Account Number. +* Support for multiple statements from different bank accounts in a single CODA file. +* Support for 'parsing only' CODA Bank Accounts (defined as type='info' in the CODA Bank Account configuration records). +* Multi-language CODA parsing, parsing configuration data provided for EN, NL, FR. - The machine readable CODA Files are parsed and stored in human readable format in CODA Bank Statements. - Also Bank Statements are generated containing a subset of the CODA information (only those transaction lines - that are required for the creation of the Financial Accounting records). - The CODA Bank Statement is a 'read-only' object, hence remaining a reliable representation of the original CODA file - whereas the Bank Statement will get modified as required by accounting business processes. +The machine readable CODA Files are parsed and stored in human readable format in CODA Bank Statements. +Also Bank Statements are generated containing a subset of the CODA information (only those transaction lines +that are required for the creation of the Financial Accounting records). +The CODA Bank Statement is a 'read-only' object, hence remaining a reliable representation of the original CODA file +whereas the Bank Statement will get modified as required by accounting business processes. - CODA Bank Accounts configured as type 'Info' will only generate CODA Bank Statements. +CODA Bank Accounts configured as type 'Info' will only generate CODA Bank Statements. - A removal of one object in the CODA processing results in the removal of the associated objects. - The removal of a CODA File containing multiple Bank Statements will also remove those associated - statements. +A removal of one object in the CODA processing results in the removal of the associated objects. +The removal of a CODA File containing multiple Bank Statements will also remove those associated +statements. - The following reconciliation logic has been implemented in the CODA processing: - 1) The Company's Bank Account Number of the CODA statement is compared against the Bank Account Number field - of the Company's CODA Bank Account configuration records (whereby bank accounts defined in type='info' configuration records are ignored). - If this is the case an 'internal transfer' transaction is generated using the 'Internal Transfer Account' field of the CODA File Import wizard. - 2) As a second step the 'Structured Communication' field of the CODA transaction line is matched against - the reference field of in- and outgoing invoices (supported : Belgian Structured Communication Type). - 3) When the previous step doesn't find a match, the transaction counterparty is located via the - Bank Account Number configured on the OpenERP Customer and Supplier records. - 4) In case the previous steps are not successful, the transaction is generated by using the 'Default Account - for Unrecognized Movement' field of the CODA File Import wizard in order to allow further manual processing. +The following reconciliation logic has been implemented in the CODA processing: +1) The Company's Bank Account Number of the CODA statement is compared against the Bank Account Number field of the Company's CODA Bank Account configuration records (whereby bank accounts defined in type='info' configuration records are ignored). If this is the case an 'internal transfer' transaction is generated using the 'Internal Transfer Account' field of the CODA File Import wizard. +2) As a second step the 'Structured Communication' field of the CODA transaction line is matched against the reference field of in- and outgoing invoices (supported : Belgian Structured Communication Type). +3) When the previous step doesn't find a match, the transaction counterparty is located via the Bank Account Number configured on the OpenERP Customer and Supplier records. +4) In case the previous steps are not successful, the transaction is generated by using the 'Default Account for Unrecognized Movement' field of the CODA File Import wizard in order to allow further manual processing. - In stead of a manual adjustment of the generated Bank Statements, you can also re-import the CODA - after updating the OpenERP database with the information that was missing to allow automatic reconciliation. +In stead of a manual adjustment of the generated Bank Statements, you can also re-import the CODA +after updating the OpenERP database with the information that was missing to allow automatic reconciliation. - Remark on CODA V1 support: - In some cases a transaction code, transaction category or structured communication code has been given a new or clearer description in CODA V2. - The description provided by the CODA configuration tables is based upon the CODA V2.2 specifications. - If required, you can manually adjust the descriptions via the CODA configuration menu. - - ''', +Remark on CODA V1 support: +In some cases a transaction code, transaction category or structured communication code has been given a new or clearer description in CODA V2. +The description provided by the CODA configuration tables is based upon the CODA V2.2 specifications. +If required, you can manually adjust the descriptions via the CODA configuration menu. +''', "images" : ["images/coda_logs.jpeg","images/import_coda_logs.jpeg"], "depends": ['account_voucher','base_iban', 'l10n_be_invoice_bba', 'account_bank_statement_extensions'], "demo_xml": [], diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index 32ab6fb4eaa..82eff66d7d0 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -26,13 +26,16 @@ "category": "Accounting & Finance", 'complexity': "easy", "description": """ -Module to manage invoice payment. -================================= +Module to manage the payment of your supplier invoices. +======================================================= -This module provides : ----------------------- -* a more efficient way to manage invoice payment. -* a basic mechanism to easily plug various automated payment. +This module allows you to create and manage your payment orders, with purposes to +* serve as base for an easy plug-in of various automated payment mechanisms. +* provide a more efficient way to manage invoice payment. + +Warning: +-------- +This module does _not_ create accounting entries, it just records your payment order. The booking of your order must be encoded as usual through a bank statement. Indeed, it's only when you get the confirmation from your bank that your order has been accepted that you can book it in your accounting. To help you with that operation, you have a new option to import payment orders as bank statement lines. """, 'images': ['images/payment_mode.jpeg','images/payment_order.jpeg'], 'depends': ['account','account_voucher'], diff --git a/addons/knowledge/__openerp__.py b/addons/knowledge/__openerp__.py index aa6ff0a2db8..aa45834bb38 100644 --- a/addons/knowledge/__openerp__.py +++ b/addons/knowledge/__openerp__.py @@ -29,7 +29,7 @@ 'complexity': "easy", "description": """ Installer for knowledge-based Hidden. -==================================== +===================================== Makes the Knowledge Application Configuration available from where you can install document and Wiki based Hidden. diff --git a/addons/profile_tools/__openerp__.py b/addons/profile_tools/__openerp__.py index cf3545b2628..54e101df38c 100644 --- a/addons/profile_tools/__openerp__.py +++ b/addons/profile_tools/__openerp__.py @@ -29,7 +29,7 @@ 'complexity': "easy", "description": """ Installer for extra Hidden like lunch, survey, idea, share, etc. -=============================================================== +================================================================ Makes the Extra Hidden Configuration available from where you can install modules like share, lunch, pad, idea, survey and subscription. diff --git a/addons/report_designer/__openerp__.py b/addons/report_designer/__openerp__.py index 481c92ee536..f0559d8800c 100644 --- a/addons/report_designer/__openerp__.py +++ b/addons/report_designer/__openerp__.py @@ -29,7 +29,7 @@ "category": "Tools", "description": """ Installer for reporting Hidden. -============================== +=============================== Makes the Reporting Hidden Configuration available from where you can install modules like base_report_designer and base_report_creator. diff --git a/addons/users_ldap/__openerp__.py b/addons/users_ldap/__openerp__.py index 07aa7136ea3..f8733a7b261 100644 --- a/addons/users_ldap/__openerp__.py +++ b/addons/users_ldap/__openerp__.py @@ -55,7 +55,7 @@ servers supporting it, by enabling the TLS option in the LDAP configuration. For further options configuring the LDAP settings, refer to the -ldap.conf manpage :manpage:`ldap.conf(5)`. +ldap.conf manpage: manpage:`ldap.conf(5)`. Security Considerations +++++++++++++++++++++++ From 0889435d6fa569a14fc6160b0c44f4bdcd2b714d Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 23 Feb 2012 16:56:12 +0100 Subject: [PATCH 19/28] [IMP] account_payment: improved the module description to tackle the most common pitfall linked to this module bzr revid: qdp-launchpad@openerp.com-20120223155612-lncs24euy3yubdmq --- addons/account_payment/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index 82eff66d7d0..83c179801ab 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -35,7 +35,7 @@ This module allows you to create and manage your payment orders, with purposes t Warning: -------- -This module does _not_ create accounting entries, it just records your payment order. The booking of your order must be encoded as usual through a bank statement. Indeed, it's only when you get the confirmation from your bank that your order has been accepted that you can book it in your accounting. To help you with that operation, you have a new option to import payment orders as bank statement lines. +The confirmation of a payment order does _not_ create accounting entries, it just records the fact that you gave your payment order to your bank. The booking of your order must be encoded as usual through a bank statement. Indeed, it's only when you get the confirmation from your bank that your order has been accepted that you can book it in your accounting. To help you with that operation, you have a new option to import payment orders as bank statement lines. """, 'images': ['images/payment_mode.jpeg','images/payment_order.jpeg'], 'depends': ['account','account_voucher'], From b64f4c6875b099aa780c5cfd15bfcacec88c2003 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 23 Feb 2012 18:44:39 +0100 Subject: [PATCH 20/28] [ADD] Added dropdown menu. bzr revid: fme@openerp.com-20120223174439-nlyeqjobi230e7xx --- addons/web/static/src/css/base.css | 101 ++++++++++++++++++++++------ addons/web/static/src/css/base.sass | 65 +++++++++++++++++- addons/web/static/src/js/chrome.js | 77 ++++++++++++++++++++- addons/web/static/src/xml/base.xml | 19 +++++- 4 files changed, 237 insertions(+), 25 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 71739e8167d..c9774bcfa73 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,4 +1,3 @@ -/* line 43, base.sass */ .openerp2 { padding: 0; margin: 0; @@ -8,12 +7,9 @@ background: white; position: relative; } -/* line 53, base.sass */ .openerp2 a { - color: #4c4c4c; text-decoration: none; } -/* line 59, base.sass */ .openerp2 .oe_webclient { position: absolute; top: 0; @@ -21,7 +17,6 @@ left: 0; right: 0; } -/* line 68, base.sass */ .openerp2 .oe_topbar { width: 100%; height: 31px; @@ -32,15 +27,9 @@ background: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626)); background: -webkit-linear-gradient(#646060, #262626); } -/* line 75, base.sass */ -.openerp2 .oe_topbar .oe_topbar_item { - float: left; -} -/* line 77, base.sass */ .openerp2 .oe_topbar .oe_topbar_item li { float: left; } -/* line 79, base.sass */ .openerp2 .oe_topbar .oe_topbar_item li a { display: block; padding: 5px 10px 7px; @@ -50,7 +39,6 @@ vertical-align: top; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } -/* line 87, base.sass */ .openerp2 .oe_topbar .oe_topbar_item li a:hover { background: #303030; color: white; @@ -58,7 +46,6 @@ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; } -/* line 91, base.sass */ .openerp2 .oe_topbar .oe_topbar_item .oe_active { background: #303030; font-weight: bold; @@ -67,7 +54,6 @@ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; } -/* line 97, base.sass */ .openerp2 .oe_topbar .oe_topbar_avatar { width: 24px; height: 24px; @@ -76,18 +62,15 @@ -webkit-border-radius: 4px; border-radius: 4px; } -/* line 105, base.sass */ .openerp2 .oe_menu { float: left; padding: 0; margin: 0; } -/* line 109, base.sass */ .openerp2 .oe_menu li { list-style-type: none; float: left; } -/* line 112, base.sass */ .openerp2 .oe_menu a { display: block; padding: 5px 10px 7px; @@ -97,7 +80,6 @@ vertical-align: top; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } -/* line 120, base.sass */ .openerp2 .oe_menu a:hover { background: #303030; color: white; @@ -105,7 +87,6 @@ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; } -/* line 124, base.sass */ .openerp2 .oe_menu .oe_active { background: #303030; font-weight: bold; @@ -114,12 +95,90 @@ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; } +.openerp2 .oe_dropdown_menu { + float: right; + padding: 0; + margin: 0; +} +.openerp2 .oe_dropdown_menu li { + list-style-type: none; + float: left; +} +.openerp2 .oe_dropdown_menu .oe_dropdown { + position: relative; +} +.openerp2 .oe_dropdown_menu .dropdown-toggle:after { + width: 0; + height: 0; + display: inline-block; + content: "&darr"; + text-indent: -99999px; + vertical-align: top; + margin-top: 8px; + margin-left: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid white; + filter: alpha(opacity=50); + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; +} +.openerp2 .oe_dropdown_menu .oe_dropdown_options { + float: left; + background: #333333; + background: rgba(37, 37, 37, 0.9); + display: none; + position: absolute; + top: 32px; + right: -1px; + border: 0; + z-index: 900; + width: 160px; + margin-left: 0; + margin-right: 0; + padding: 6px 0; + zoom: 1; + border-color: #999999; + border-color: rgba(0, 0, 0, 0.2); + border-style: solid; + border-width: 0 1px 1px; + -moz-border-radius: 0 0 6px 6px; + -webkit-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} +.openerp2 .oe_dropdown_menu .oe_dropdown_options li { + float: none; + display: block; + background-color: none; +} +.openerp2 .oe_dropdown_menu .oe_dropdown_options li a { + display: block; + padding: 4px 15px; + clear: both; + font-weight: normal; + line-height: 18px; + color: #eeeeee; +} +.openerp2 .oe_dropdown_menu .oe_dropdown_options li a:hover { + background: #292929; + background: -moz-linear-gradient(#292929, #191919); + background: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919)); + background: -webkit-linear-gradient(#292929, #191919); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; +} -/* line 133, base.sass */ .openerp .oe-shortcuts { position: static; } -/* line 135, base.sass */ .openerp #oe_header { clear: both; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 090c0ac822f..ab144a5ceec 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -51,7 +51,6 @@ position: relative a - color: #4c4c4c text-decoration: none // }}} @@ -73,7 +72,6 @@ @include vertical-gradient(#646060, #262626) .oe_topbar_item - float: left li float: left a @@ -128,6 +126,69 @@ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) // }}} + // DropDown Menu {{{ + .oe_dropdown_menu + float: right + padding: 0 + margin: 0 + li + list-style-type: none + float: left + .oe_dropdown + position: relative + + .dropdown-toggle:after + width: 0 + height: 0 + display: inline-block + content: "&darr" + text-indent: -99999px + vertical-align: top + margin-top: 8px + margin-left: 4px + border-left: 4px solid transparent + border-right: 4px solid transparent + border-top: 4px solid white + @include opacity(0.5) + + .oe_dropdown_options + float: left + background: #333 + background: rgba(37,37,37,0.9) + display: none + position: absolute + top: 32px + right: -1px + border: 0 + z-index: 900 + width: 160px + margin-left: 0 + margin-right: 0 + padding: 6px 0 + zoom: 1 + border-color: #999 + border-color: rgba(0, 0, 0, 0.2) + border-style: solid + border-width: 0 1px 1px + @include radius(0 0 6px 6px) + @include box-shadow(0 1px 4px rgba(0,0,0,0.3)) + @include background-clip() + li + float: none + display: block + background-color: none + a + display: block + padding: 4px 15px + clear: both + font-weight: normal + line-height: 18px + color: #eee + &:hover + @include vertical-gradient(#292929, #191919) + @include box-shadow(none) + // }}} + .openerp // Transitional overrides for old styles {{{ .oe-shortcuts diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 4e648e46856..838fdb4f79f 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -984,7 +984,7 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{ return false; }, do_hide_secondary: function() { - this.$secondary_menu.hide(); + //this.$secondary_menu.hide(); }, do_show_secondary: function($sub_menu, $main_menu) { var self = this; @@ -1008,6 +1008,78 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{ } }); +openerp.web.DropDownMenu = openerp.web.Widget.extend(/** @lends openerp.web.Header# */{ + template: "DropDownMenu", + /** + * @constructs openerp.web.DropDownMenu + * @extends openerp.web.OldWidget + * + * @param parent + */ + init: function(parent) { + this._super(parent); + }, + start: function() { + var self = this; + this._super.apply(this, arguments); + $('html').bind('click', function() { + self.$element.find('.oe_dropdown_options').hide(); + }); + this.$element.find('.oe_dropdown_toggle').click(function() { + self.$element.find('.oe_dropdown_options').toggle(); + return false; + }); + this.$element.find('.oe_dropdown_options li a').click(function() { + var f = self['on_menu_' + $(this).data('menu')]; + f && f(); + self.$element.find('.oe_dropdown_options').hide(); + return false; + }); + }, + on_menu_logout: function() { + }, + on_menu_settings: function() { + var self = this; + var action_manager = new openerp.web.ActionManager(this); + var dataset = new openerp.web.DataSet (this,'res.users',this.context); + dataset.call ('action_get','',function (result){ + self.rpc('/web/action/load', {action_id:result}, function(result){ + action_manager.do_action(_.extend(result['result'], { + res_id: self.session.uid, + res_model: 'res.users', + flags: { + action_buttons: false, + search_view: false, + sidebar: false, + views_switcher: false, + pager: false + } + })); + }); + }); + this.dialog = new openerp.web.Dialog(this,{ + title: _t("Preferences"), + width: '700px', + buttons: [ + {text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }}, + {text: _t("Change password"), click: function(){ self.change_password(); }}, + {text: _t("Save"), click: function(){ + var inner_viewmanager = action_manager.inner_viewmanager; + inner_viewmanager.views[inner_viewmanager.active_view].controller.do_save() + .then(function() { + self.dialog.destroy(); + // needs to refresh interface in case language changed + window.location.reload(); + }); + } + } + ] + }).open(); + action_manager.appendTo(this.dialog); + action_manager.render(this.dialog); + } +}); + openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClient */{ /** * @constructs openerp.web.WebClient @@ -1071,6 +1143,9 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie self.menu = new openerp.web.Menu(self); self.menu.replace(this.$element.find('.oe_menu_placeholder')); self.menu.on_action.add(this.proxy('on_menu_action')); + self.dropdown_menu = new openerp.web.DropDownMenu(self); + self.dropdown_menu.replace(this.$element.find('.oe_dropdown_menu_placeholder')); + self.dropdown_menu.on_menu_logout.add(this.proxy('on_logout')); }, show_common: function() { var self = this; diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 2e78ef83848..9b361f13e8f 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -21,8 +21,9 @@
+
-
+
+
  • Settings
  • +
  • Log out
  • + + + + +
    From 73becbfe0bf721a1e0aac50f8977695ff20a0d29 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Fri, 24 Feb 2012 00:48:06 +0100 Subject: [PATCH 21/28] [IMP] sass2scss taken from ~cto-openerp/+junk/sass2scss with minor cleanups bzr revid: al@openerp.com-20120223234806-8tg83pph08dsvqie --- addons/web/controllers/main.py | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 9f113dac970..623b297233b 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -113,6 +113,57 @@ html_template = """ """ +def sass2scss(src): + # Validated by diff -u of sass2scss against: + # sass-convert -F sass -T scss openerp.sass openerp.scss + block = [] + sass = ('', block) + reComment = re.compile(r'//.*$') + reIndent = re.compile(r'^\s+') + reIgnore = re.compile(r'^\s*(//.*)?$') + reFixes = { re.compile(r'\(\((.*)\)\)') : r'(\1)', } + lastLevel = 0 + prevBlocks = {} + for l in src.split('\n'): + l = l.rstrip() + if reIgnore.search(l): continue + l = reComment.sub('', l) + l = l.rstrip() + indent = reIndent.match(l) + level = indent.end() if indent else 0 + l = l[level:] + if level>lastLevel: + prevBlocks[lastLevel] = block + newBlock = [] + block[-1] = (block[-1], newBlock) + block = newBlock + elif level=0: + out += indent+sass[0]+" {\n" + for e in sass[1]: + out += write(e, level+1) + if level>=0: + out = out.rstrip(" \n") + out += ' }\n' + if level==0: + out += "\n" + else: + out += indent+sass+";\n" + return out + return write(sass) + class WebClient(openerpweb.Controller): _cp_path = "/web/webclient" From c57c5c13cf50a8edee272045181ab48ead959a88 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Fri, 24 Feb 2012 04:47:59 +0000 Subject: [PATCH 22/28] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20120224044759-kb2nc1gspyneo64h --- addons/fetchmail/i18n/el.po | 4 +- addons/hr/i18n/de.po | 4 +- addons/hr_holidays/i18n/de.po | 4 +- addons/share/i18n/es_CR.po | 41 ++++++----- addons/stock/i18n/es_CR.po | 127 ++++++++++++++++++++++------------ 5 files changed, 113 insertions(+), 67 deletions(-) diff --git a/addons/fetchmail/i18n/el.po b/addons/fetchmail/i18n/el.po index eca0d8eb29d..09a5daac061 100644 --- a/addons/fetchmail/i18n/el.po +++ b/addons/fetchmail/i18n/el.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-02-23 04:39+0000\n" -"X-Generator: Launchpad (build 14855)\n" +"X-Launchpad-Export-Date: 2012-02-24 04:47+0000\n" +"X-Generator: Launchpad (build 14860)\n" #. module: fetchmail #: selection:fetchmail.server,state:0 diff --git a/addons/hr/i18n/de.po b/addons/hr/i18n/de.po index c2e8ba8ef31..f0adc0438bf 100644 --- a/addons/hr/i18n/de.po +++ b/addons/hr/i18n/de.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-02-23 04:39+0000\n" -"X-Generator: Launchpad (build 14855)\n" +"X-Launchpad-Export-Date: 2012-02-24 04:47+0000\n" +"X-Generator: Launchpad (build 14860)\n" #. module: hr #: model:process.node,name:hr.process_node_openerpuser0 diff --git a/addons/hr_holidays/i18n/de.po b/addons/hr_holidays/i18n/de.po index bea4edaaa41..d52460ed66d 100644 --- a/addons/hr_holidays/i18n/de.po +++ b/addons/hr_holidays/i18n/de.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-02-23 04:39+0000\n" -"X-Generator: Launchpad (build 14855)\n" +"X-Launchpad-Export-Date: 2012-02-24 04:47+0000\n" +"X-Generator: Launchpad (build 14860)\n" #. module: hr_holidays #: selection:hr.holidays.status,color_name:0 diff --git a/addons/share/i18n/es_CR.po b/addons/share/i18n/es_CR.po index bc192931c01..a0fbfaaeaf8 100644 --- a/addons/share/i18n/es_CR.po +++ b/addons/share/i18n/es_CR.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-08 01:37+0100\n" -"PO-Revision-Date: 2012-02-23 00:27+0000\n" +"PO-Revision-Date: 2012-02-23 05:16+0000\n" "Last-Translator: Freddy Gonzalez \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-02-23 04:39+0000\n" -"X-Generator: Launchpad (build 14855)\n" +"X-Launchpad-Export-Date: 2012-02-24 04:47+0000\n" +"X-Generator: Launchpad (build 14860)\n" "Language: es\n" #. module: share @@ -410,23 +410,25 @@ msgstr "" #. module: share #: field:share.wizard,view_type:0 msgid "Current View Type" -msgstr "" +msgstr "Tipo de vista actual" #. module: share #: selection:share.wizard,access_mode:0 msgid "Can view" -msgstr "" +msgstr "Puede Ver" #. module: share #: selection:share.wizard,access_mode:0 msgid "Can edit" -msgstr "" +msgstr "Puede Editar" #. module: share #: help:share.wizard,message:0 msgid "" "An optional personal message, to be included in the e-mail notification." msgstr "" +"Un mensaje personal opcional, que se incluirá en la notificación por correo " +"electrónico." #. module: share #: model:ir.model,name:share.model_res_users @@ -438,7 +440,7 @@ msgstr "res.usuarios" #: code:addons/share/wizard/share_wizard.py:635 #, python-format msgid "Sharing access could not be created" -msgstr "" +msgstr "El acceso compartido, no se pudo crear" #. module: share #: help:res.users,share:0 @@ -460,7 +462,7 @@ msgstr "Asistente de compartición" #: code:addons/share/wizard/share_wizard.py:740 #, python-format msgid "Shared access created!" -msgstr "" +msgstr "¡Acceso compartido creado!" #. module: share #: model:res.groups,comment:share.group_share_user @@ -469,6 +471,10 @@ msgid "" "Members of this groups have access to the sharing wizard, which allows them " "to invite external users to view or edit some of their documents." msgstr "" +"\n" +"Los miembros de este grupo tienen acceso al Asistente para compartir, lo que " +"les permite invitar a usuarios externos para ver o editar algunas de sus " +"documentos." #. module: share #: model:ir.model,name:share.model_res_groups @@ -485,23 +491,23 @@ msgstr "Contraseña" #. module: share #: field:share.wizard,new_users:0 msgid "Emails" -msgstr "" +msgstr "Correos electrónicos" #. module: share #: field:share.wizard,embed_option_search:0 msgid "Display search view" -msgstr "" +msgstr "Mostrar Vista de búsqueda" #. module: share #: code:addons/share/wizard/share_wizard.py:197 #, python-format msgid "No e-mail address configured" -msgstr "" +msgstr "No hay dirección de correo electrónico configurado" #. module: share #: field:share.wizard,message:0 msgid "Personal Message" -msgstr "" +msgstr "Mensaje personal" #. module: share #: code:addons/share/wizard/share_wizard.py:763 @@ -516,7 +522,7 @@ msgstr "" #. module: share #: field:share.wizard.result.line,login:0 msgid "Login" -msgstr "" +msgstr "Iniciar sesión" #. module: share #: view:res.users:0 @@ -531,7 +537,7 @@ msgstr "Modo de acceso" #. module: share #: view:share.wizard:0 msgid "Sharing: preparation" -msgstr "" +msgstr "Compartir: la preparación" #. module: share #: code:addons/share/wizard/share_wizard.py:198 @@ -540,21 +546,24 @@ msgid "" "You must configure your e-mail address in the user preferences before using " "the Share button." msgstr "" +"Usted debe configurar su dirección de correo electrónico en las preferencias " +"del usuario antes de utilizar el botón Compartir." #. module: share #: help:share.wizard,access_mode:0 msgid "Access rights to be granted on the shared documents." msgstr "" +"Los derechos de acceso que se conceden en los documentos compartidos." #. openerp-web #: /home/odo/repositories/addons/trunk/share/static/src/xml/share.xml:8 msgid "Link or embed..." -msgstr "" +msgstr "Vincular o incrustar ......" #. openerp-web #: /home/odo/repositories/addons/trunk/share/static/src/xml/share.xml:9 msgid "Share with..." -msgstr "" +msgstr "Compartir con ..." #~ msgid "Read & Write" #~ msgstr "Lectura y escritura" diff --git a/addons/stock/i18n/es_CR.po b/addons/stock/i18n/es_CR.po index 8feaf19cd2d..bf6488b4b24 100644 --- a/addons/stock/i18n/es_CR.po +++ b/addons/stock/i18n/es_CR.po @@ -7,15 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-02-08 01:37+0100\n" -"PO-Revision-Date: 2012-02-17 00:34+0000\n" -"Last-Translator: Carlos Vásquez (CLEARCORP) " -"\n" +"PO-Revision-Date: 2012-02-23 05:47+0000\n" +"Last-Translator: Freddy Gonzalez \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-02-18 04:57+0000\n" -"X-Generator: Launchpad (build 14814)\n" +"X-Launchpad-Export-Date: 2012-02-24 04:47+0000\n" +"X-Generator: Launchpad (build 14860)\n" "Language: \n" #. module: stock @@ -26,7 +25,7 @@ msgstr "Lotes de seguimiento en salida" #. module: stock #: model:ir.model,name:stock.model_stock_move_split_lines msgid "Stock move Split lines" -msgstr "" +msgstr "Stock se líneas se mueven en división" #. module: stock #: help:product.category,property_stock_account_input_categ:0 @@ -37,6 +36,12 @@ msgid "" "value for all products in this category. It can also directly be set on each " "product" msgstr "" +"Cuando se realiza en tiempo real de valuación de inventarios, artículos de " +"revistas de contraparte para todos los movimientos de stock entrantes serán " +"publicados en esta cuenta, a menos que exista un conjunto de valoración " +"específica de la cuenta en la ubicación de origen. Este es el valor por " +"defecto para todos los productos de esta categoría. También puede " +"directamente establecer en cada producto" #. module: stock #: field:stock.location,chained_location_id:0 @@ -79,7 +84,7 @@ msgstr "Número de revisión" #. module: stock #: view:stock.move:0 msgid "Orders processed Today or planned for Today" -msgstr "" +msgstr "Hoy en día los pedidos procesados ​​o previstas para hoy" #. module: stock #: view:stock.partial.move.line:0 view:stock.partial.picking:0 @@ -91,7 +96,7 @@ msgstr "Movimientos productos" #. module: stock #: model:ir.ui.menu,name:stock.menu_stock_uom_categ_form_action msgid "UoM Categories" -msgstr "" +msgstr "Categorías UdM" #. module: stock #: model:ir.actions.act_window,name:stock.action_stock_move_report @@ -131,7 +136,7 @@ msgstr "" #: code:addons/stock/wizard/stock_change_product_qty.py:87 #, python-format msgid "Quantity cannot be negative." -msgstr "" +msgstr "Cantidad no puede ser negativa." #. module: stock #: view:stock.picking:0 @@ -193,13 +198,13 @@ msgstr "Diario de inventario" #. module: stock #: view:report.stock.inventory:0 view:report.stock.move:0 msgid "Current month" -msgstr "" +msgstr "Mes actual" #. module: stock #: code:addons/stock/wizard/stock_move.py:222 #, python-format msgid "Unable to assign all lots to this move!" -msgstr "" +msgstr "¡No se puede asignar todos los lotes de este movimiento!" #. module: stock #: code:addons/stock/stock.py:2516 @@ -222,18 +227,18 @@ msgstr "¡No puede eliminar ningún registro!" #. module: stock #: view:stock.picking:0 msgid "Delivery orders to invoice" -msgstr "" +msgstr "Órdenes de entrega de la factura" #. module: stock #: view:stock.picking:0 msgid "Assigned Delivery Orders" -msgstr "" +msgstr "Asignación de órdenes de entrega" #. module: stock #: field:stock.partial.move.line,update_cost:0 #: field:stock.partial.picking.line,update_cost:0 msgid "Need cost update" -msgstr "" +msgstr "Necesita actualización de costos" #. module: stock #: code:addons/stock/wizard/stock_splitinto.py:49 @@ -304,7 +309,7 @@ msgstr "" #. module: stock #: view:stock.partial.move:0 view:stock.partial.picking:0 msgid "_Validate" -msgstr "" +msgstr "_Validar" #. module: stock #: code:addons/stock/stock.py:1149 @@ -345,6 +350,9 @@ msgid "" "Can not create Journal Entry, Input Account defined on this product and " "Valuation account on category of this product are same." msgstr "" +"No se puede crear entrada del diario, cuenta de entrada se define en esta " +"cuenta los productos y Valoración de la categoría de este producto son los " +"mismos." #. module: stock #: selection:stock.return.picking,invoice_state:0 @@ -354,7 +362,7 @@ msgstr "No facturación" #. module: stock #: view:stock.move:0 msgid "Stock moves that have been processed" -msgstr "" +msgstr "Movimientos de stock que se han procesado" #. module: stock #: model:ir.model,name:stock.model_stock_production_lot @@ -376,7 +384,7 @@ msgstr "Movimientos para este paquete" #. module: stock #: view:stock.picking:0 msgid "Incoming Shipments Available" -msgstr "" +msgstr "Envíos entrantes disponibles" #. module: stock #: selection:report.stock.inventory,location_type:0 @@ -474,7 +482,7 @@ msgstr "Dividir en" #. module: stock #: view:stock.location:0 msgid "Internal Locations" -msgstr "" +msgstr "Ubicaciones Internas" #. module: stock #: field:stock.move,price_currency_id:0 @@ -560,7 +568,7 @@ msgstr "Ubicación destino" #. module: stock #: model:ir.model,name:stock.model_stock_partial_move_line msgid "stock.partial.move.line" -msgstr "" +msgstr "stock.partial.move.line" #. module: stock #: code:addons/stock/stock.py:760 @@ -616,7 +624,7 @@ msgstr "Ubicación / Producto" #. module: stock #: field:stock.move,address_id:0 msgid "Destination Address " -msgstr "" +msgstr "Dirección de destino " #. module: stock #: code:addons/stock/stock.py:1333 @@ -664,6 +672,12 @@ msgid "" "queries regarding your account, please contact us.\n" "Thank you in advance.\n" msgstr "" +"Nuestros registros indican que los siguientes pagos siguen siendo debidos. " +"Si la cantidad\n" +"ya ha sido pagada, por favor ignore este aviso. Sin embargo, si usted tiene " +"cualquiera\n" +"consultas sobre su cuenta, póngase en contacto con nosotros.\n" +"Gracias de antemano.\n" #. module: stock #: view:stock.inventory:0 @@ -678,11 +692,15 @@ msgid "" "according to the original purchase order. You can validate the shipment " "totally or partially." msgstr "" +"Los envíos entrantes es la lista de todas las órdenes que recibe de sus " +"proveedores. Un envío entrante contiene una lista de productos que se " +"reciban de acuerdo con la orden de compra original. Puede validar el envío " +"total o parcialmente." #. module: stock #: field:stock.move.split.lines,wizard_exist_id:0 msgid "Parent Wizard (for existing lines)" -msgstr "" +msgstr "Asistente de Padres (para las líneas existentes)" #. module: stock #: view:stock.move:0 view:stock.picking:0 @@ -696,6 +714,8 @@ msgid "" "There is no inventory Valuation account defined on the product category: " "\"%s\" (id: %d)" msgstr "" +"No hay ninguna cuenta de evaluación de inventario definido en la categoría " +"de producto: \"%s\" (id:% d)" #. module: stock #: view:report.stock.move:0 @@ -753,7 +773,7 @@ msgstr "Destinatario" #. module: stock #: model:stock.location,name:stock.location_refrigerator msgid "Refrigerator" -msgstr "" +msgstr "Refrigerador" #. module: stock #: model:ir.actions.act_window,name:stock.action_location_tree @@ -789,7 +809,7 @@ msgstr "Procesar albarán" #. module: stock #: sql_constraint:stock.picking:0 msgid "Reference must be unique per Company!" -msgstr "" +msgstr "¡La referencia debe ser única por compañía!" #. module: stock #: code:addons/stock/product.py:417 @@ -816,7 +836,7 @@ msgstr "" #: code:addons/stock/product.py:75 #, python-format msgid "Valuation Account is not specified for Product Category: %s" -msgstr "" +msgstr "Cuenta de valuación no se especifica la categoría del producto:%s" #. module: stock #: field:stock.move,move_dest_id:0 @@ -890,7 +910,7 @@ msgstr "Cambiar cantidad producto" #. module: stock #: field:report.stock.inventory,month:0 msgid "unknown" -msgstr "" +msgstr "Desconocido" #. module: stock #: model:ir.model,name:stock.model_stock_inventory_merge @@ -950,7 +970,7 @@ msgstr "Buscar paquete" #. module: stock #: view:stock.picking:0 msgid "Pickings already processed" -msgstr "" +msgstr "Ganancias ya procesadas" #. module: stock #: field:stock.partial.move.line,currency:0 @@ -967,7 +987,7 @@ msgstr "Diario" #: code:addons/stock/stock.py:1345 #, python-format msgid "is scheduled %s." -msgstr "" +msgstr "Está previsto%s." #. module: stock #: help:stock.picking,location_id:0 @@ -993,7 +1013,7 @@ msgstr "Tiempo inicial de ejecución (días)" #. module: stock #: model:ir.model,name:stock.model_stock_partial_move msgid "Partial Move Processing Wizard" -msgstr "" +msgstr "Mover de procesamiento parcial Asistente" #. module: stock #: model:ir.actions.act_window,name:stock.act_stock_product_location_open @@ -1032,7 +1052,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 msgid "Confirmed Pickings" -msgstr "" +msgstr "Ganancias confirmadas" #. module: stock #: field:stock.location,stock_virtual:0 @@ -1048,7 +1068,7 @@ msgstr "Vista" #. module: stock #: view:report.stock.inventory:0 view:report.stock.move:0 msgid "Last month" -msgstr "" +msgstr "Último mes" #. module: stock #: field:stock.location,parent_left:0 @@ -1058,13 +1078,13 @@ msgstr "Padre izquierdo" #. module: stock #: field:product.category,property_stock_valuation_account_id:0 msgid "Stock Valuation Account" -msgstr "" +msgstr "Valore de cuenta de evaluación" #. module: stock #: code:addons/stock/stock.py:1349 #, python-format msgid "is waiting." -msgstr "" +msgstr "esta esperando." #. module: stock #: constraint:product.product:0 @@ -1176,6 +1196,8 @@ msgid "" "In order to cancel this inventory, you must first unpost related journal " "entries." msgstr "" +"Para cancelar este inventario, primero debe Quitar la asociación de revistas " +"relacionadas con las entradas." #. module: stock #: field:stock.picking,date_done:0 @@ -1189,11 +1211,13 @@ msgid "" "The uom rounding does not allow you to ship \"%s %s\", only roundings of " "\"%s %s\" is accepted by the uom." msgstr "" +"El redondeo de la UOM no le permite enviar \"%s%s\", redondeos sólo de " +"\"%s%s\" es aceptado por la UOM." #. module: stock #: view:stock.move:0 msgid "Stock moves that are Available (Ready to process)" -msgstr "" +msgstr "Se mueve de archivo que están disponibles (listo para procesar)" #. module: stock #: report:stock.picking.list:0 @@ -1258,7 +1282,7 @@ msgstr "Ubicaciones de empresas" #. module: stock #: view:report.stock.inventory:0 view:report.stock.move:0 msgid "Current year" -msgstr "" +msgstr "Año actual" #. module: stock #: view:report.stock.inventory:0 view:report.stock.move:0 @@ -1315,7 +1339,7 @@ msgstr "Albarán:" #. module: stock #: selection:stock.move,state:0 msgid "Waiting Another Move" -msgstr "" +msgstr "Esperando mover otro" #. module: stock #: help:product.template,property_stock_production:0 @@ -1331,7 +1355,7 @@ msgstr "" #. module: stock #: view:product.product:0 msgid "Expected Stock Variations" -msgstr "" +msgstr "Esperados variaciones de las existencias" #. module: stock #: help:stock.move,price_unit:0 @@ -1408,7 +1432,7 @@ msgstr "Desde" #. module: stock #: view:stock.picking:0 msgid "Incoming Shipments already processed" -msgstr "" +msgstr "Envíos entrantes ya procesados" #. module: stock #: code:addons/stock/wizard/stock_return_picking.py:99 @@ -1463,7 +1487,7 @@ msgstr "Tipo" #. module: stock #: view:stock.picking:0 msgid "Available Pickings" -msgstr "" +msgstr "Ganancias disponible" #. module: stock #: model:stock.location,name:stock.stock_location_5 @@ -1473,7 +1497,7 @@ msgstr "Proveedores TI genéricos" #. module: stock #: view:stock.move:0 msgid "Stock to be receive" -msgstr "" +msgstr "Archivo que se reciben" #. module: stock #: help:stock.location,valuation_out_account_id:0 @@ -1484,6 +1508,12 @@ msgid "" "the generic Stock Output Account set on the product. This has no effect for " "internal locations." msgstr "" +"Se utiliza para la valoración de inventario en tiempo real. Cuando se está " +"en una ubicación virtual (tipo interno no), esta cuenta se utiliza para " +"mantener el valor de los productos que se mueven fuera de este lugar y en " +"una ubicación interna, en lugar de la Cuenta de la salida genérica " +"establecida en el producto. Esto no tiene efecto para las ubicaciones de " +"internos." #. module: stock #: report:stock.picking.list:0 @@ -1527,7 +1557,7 @@ msgstr "Sólo puede eliminar movimientos borrador." #. module: stock #: model:ir.model,name:stock.model_stock_inventory_line_split_lines msgid "Inventory Split lines" -msgstr "" +msgstr "Lineas de inventario dividido" #. module: stock #: model:ir.actions.report.xml,name:stock.report_location_overview @@ -1544,6 +1574,8 @@ msgstr "Información general" #: view:report.stock.inventory:0 msgid "Analysis including future moves (similar to virtual stock)" msgstr "" +"El análisis incluye los movimientos futuros (similares a las existencias " +"virtual)" #. module: stock #: model:ir.actions.act_window,name:stock.action3 view:stock.tracking:0 @@ -1577,7 +1609,7 @@ msgstr "Fecha orden" #: code:addons/stock/wizard/stock_change_product_qty.py:88 #, python-format msgid "INV: %s" -msgstr "" +msgstr "INV: %s" #. module: stock #: view:stock.location:0 field:stock.location,location_id:0 @@ -1696,7 +1728,7 @@ msgstr "Estadísticas de stock" #. module: stock #: view:report.stock.move:0 msgid "Month Planned" -msgstr "" +msgstr "Mes Planeado" #. module: stock #: field:product.product,track_production:0 @@ -1706,12 +1738,12 @@ msgstr "Lotes seguimiento de fabricación" #. module: stock #: view:stock.picking:0 msgid "Is a Back Order" -msgstr "" +msgstr "Es un pedido pendiente" #. module: stock #: field:stock.location,valuation_out_account_id:0 msgid "Stock Valuation Account (Outgoing)" -msgstr "" +msgstr "Existencia de cuenta de evaluación (de salida)" #. module: stock #: model:ir.actions.act_window,name:stock.act_product_stock_move_open @@ -1752,7 +1784,7 @@ msgstr "Movimientos creados" #. module: stock #: field:stock.location,valuation_in_account_id:0 msgid "Stock Valuation Account (Incoming)" -msgstr "" +msgstr "Existencia de cuenta de evaluación (entrante)" #. module: stock #: model:stock.location,name:stock.stock_location_14 @@ -1804,6 +1836,11 @@ msgid "" "specific valuation account set on the destination location. When not set on " "the product, the one from the product category is used." msgstr "" +"Cuando se realiza en tiempo real de valuación de inventarios, artículos de " +"revistas de contraparte para todos los movimientos de valores de salida se " +"publicará en esta cuenta, a menos que exista un conjunto de valoración " +"específica de la cuenta en la ubicación de destino. Cuando no se establece " +"en el producto, la una de la categoría de producto se utiliza." #. module: stock #: view:report.stock.move:0 From 590c143fe3a6c99098d64e592126f9e68d1f3e82 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 24 Feb 2012 10:02:35 +0100 Subject: [PATCH 23/28] [FIX] account_voucher: correct fix for lp:901089 lp bug: https://launchpad.net/bugs/901089 fixed bzr revid: qdp-launchpad@openerp.com-20120224090235-ykpgfsfa3ail0pq7 --- addons/account_voucher/account_voucher.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 50cde3a2c01..50c18e603d2 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -592,7 +592,14 @@ class account_voucher(osv.osv): ids.reverse() account_move_lines = move_line_pool.browse(cr, uid, ids, context=context) + #compute the total debit/credit and look for a matching open amount or invoice for line in account_move_lines: + #if the line is partially reconciled, then we must pay attention to display it only once and in the good o2m + if line.debit and line.reconcile_partial_id and ttype == 'receipt': + continue + if line.credit and line.reconcile_partial_id and ttype == 'payment': + continue + if invoice_id: if line.invoice.id == invoice_id: #if the invoice linked to the voucher line is equal to the invoice_id in context @@ -618,6 +625,12 @@ class account_voucher(osv.osv): #voucher line creation for line in account_move_lines: + #if the line is partially reconciled, then we must pay attention to display it only once and in the good o2m + if line.debit and line.reconcile_partial_id and ttype == 'receipt': + continue + if line.credit and line.reconcile_partial_id and ttype == 'payment': + continue + if line.currency_id and currency_id==line.currency_id.id: amount_original = abs(line.amount_currency) amount_unreconciled = abs(line.amount_residual_currency) From bdf3e9bca3e4c9cfbe2d1e0f15dc75070470ce65 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 24 Feb 2012 11:23:05 +0100 Subject: [PATCH 24/28] [FIX] account_voucher: correct fix for lp:901089 lp bug: https://launchpad.net/bugs/901089 fixed bzr revid: qdp-launchpad@openerp.com-20120224102305-6yqsk0vaasydcxum --- addons/account_voucher/account_voucher.py | 25 +++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 6253720e094..3ed173cca85 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -547,6 +547,21 @@ class account_voucher(osv.osv): @return: Returns a dict which contains new values, and context """ + def _remove_noise_in_o2m(): + """if the line is partially reconciled, then we must pay attention to display it only once and + in the good o2m. + This function returns True if the line is considered as noise and should not be displayed + """ + if line.reconcile_partial_id: + sign = 1 if ttype == 'receipt' else -1 + if currency_id == line.currency_id.id: + if line.amount_residual_currency * sign <= 0: + return True + else: + if line.amount_residual * sign <= 0: + return True + return False + if context is None: context = {} context_multi_currency = context.copy() @@ -612,10 +627,7 @@ class account_voucher(osv.osv): #compute the total debit/credit and look for a matching open amount or invoice for line in account_move_lines: - #if the line is partially reconciled, then we must pay attention to display it only once and in the good o2m - if line.debit and line.reconcile_partial_id and ttype == 'receipt': - continue - if line.credit and line.reconcile_partial_id and ttype == 'payment': + if _remove_noise_in_o2m(): continue if invoice_id: @@ -643,10 +655,7 @@ class account_voucher(osv.osv): #voucher line creation for line in account_move_lines: - #if the line is partially reconciled, then we must pay attention to display it only once and in the good o2m - if line.debit and line.reconcile_partial_id and ttype == 'receipt': - continue - if line.credit and line.reconcile_partial_id and ttype == 'payment': + if _remove_noise_in_o2m(): continue if line.currency_id and currency_id==line.currency_id.id: From 881ffef8166ba077747c98fda0b22290b8d6534d Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 24 Feb 2012 12:17:13 +0100 Subject: [PATCH 25/28] [REM] hr_timesheet_invoice: removed unused report cost ledger. It was duplicated code of the same report defined in account module AND calling its rml. bzr revid: qdp-launchpad@openerp.com-20120224111713-d1j8hubz33cx5wyf --- addons/hr_timesheet_invoice/__openerp__.py | 1 - .../hr_timesheet_invoice_report.xml | 2 - .../hr_timesheet_invoice/report/__init__.py | 1 - .../report/cost_ledger.py | 174 -------- .../report/cost_ledger.rml | 404 ------------------ .../test/hr_timesheet_invoice_report.yml | 11 - .../hr_timesheet_invoice/wizard/__init__.py | 1 - ...r_timesheet_analytic_cost_ledger_report.py | 52 --- ...heet_invoice_analytic_cost_ledger_view.xml | 34 -- 9 files changed, 680 deletions(-) delete mode 100644 addons/hr_timesheet_invoice/report/cost_ledger.py delete mode 100644 addons/hr_timesheet_invoice/report/cost_ledger.rml delete mode 100644 addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_cost_ledger_report.py delete mode 100644 addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml diff --git a/addons/hr_timesheet_invoice/__openerp__.py b/addons/hr_timesheet_invoice/__openerp__.py index 9e8af9aa736..7e11fdad723 100644 --- a/addons/hr_timesheet_invoice/__openerp__.py +++ b/addons/hr_timesheet_invoice/__openerp__.py @@ -42,7 +42,6 @@ reports, etc.""", 'hr_timesheet_invoice_report.xml', 'report/report_analytic_view.xml', 'report/hr_timesheet_invoice_report_view.xml', - 'wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml', 'wizard/hr_timesheet_analytic_profit_view.xml', 'wizard/hr_timesheet_invoice_create_view.xml', 'wizard/hr_timesheet_invoice_create_final_view.xml', diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml index cc8028a8a0a..473820d5123 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml @@ -1,8 +1,6 @@ - - ). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import pooler -import time -from report import report_sxw - - -class account_analytic_cost_ledger(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context) - self.sum_revenue={} - self.account_sum_revenue={} - self.localcontext.update( { - 'time': time, - 'lines_g': self._lines_g, - 'lines_a': self._lines_a, - 'account_sum_debit': self._account_sum_debit, - 'account_sum_credit': self._account_sum_credit, - 'account_sum_balance': self._account_sum_balance, - 'account_sum_qty': self._account_sum_qty, - 'account_sum_revenue': self._account_sum_revenue, - 'account_g_sum_revenue': self._account_g_sum_revenue, - 'sum_debit': self._sum_debit, - 'sum_credit': self._sum_credit, - 'sum_balance': self._sum_balance, - 'sum_qty': self._sum_qty, - 'sum_revenue': self._sum_revenue, - }) - - def _lines_g(self, account_id, date1, date2): - self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id, sum(aal.unit_amount) AS quantity \ - FROM account_account AS aa, account_analytic_line AS aal \ - WHERE (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \ - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (account_id, date1, date2)) - res = self.cr.dictfetchall() - - for r in res: - if r['balance'] > 0: - r['debit'] = r['balance'] - r['credit'] = 0.0 - elif r['balance'] < 0: - r['debit'] = 0.0 - r['credit'] = -r['balance'] - else: - r['debit'] = 0.0 - r['credit'] = 0.0 - return res - - def _lines_a(self, general_account_id, account_id, date1, date2): - self.cr.execute("SELECT aal.id AS id, aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj, aal.unit_amount AS quantity \ - FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ - WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) \ - AND (aal.journal_id=aaj.id) \ - ORDER BY aal.date, aaj.code, aal.code", (general_account_id, account_id, date1, date2)) - res = self.cr.dictfetchall() - - line_obj = self.pool.get('account.analytic.line') - price_obj = self.pool.get('product.pricelist') - lines = {} - for l in line_obj.browse(self.cr, self.uid, [ x['id'] for x in res]): - lines[l.id] = l - if not account_id in self.sum_revenue: - self.sum_revenue[account_id] = 0.0 - if not general_account_id in self.account_sum_revenue: - self.account_sum_revenue[general_account_id] = 0.0 - for r in res: - id = r['id'] - revenue = 0.0 - if lines[id].amount < 0 and lines[id].product_id and lines[id].product_uom_id and lines[id].account_id.pricelist_id: - ctx = {'uom': lines[id].product_uom_id.id} - price = price_obj.price_get(self.cr, self.uid, [lines[id].account_id.pricelist_id.id], lines[id].product_id.id, lines[id].unit_amount, False, context=ctx)[lines[id].account_id.pricelist_id.id] - revenue = round(price * lines[id].unit_amount, 2) - r['revenue'] = revenue - self.sum_revenue[account_id] += revenue - self.account_sum_revenue[general_account_id] += revenue - if r['balance'] > 0: - r['debit'] = r['balance'] - r['credit'] = 0.0 - elif r['balance'] < 0: - r['debit'] = 0.0 - r['credit'] = -r['balance'] - else: - r['debit'] = 0.0 - r['credit'] = 0.0 - return res - - def _account_sum_debit(self, account_id, date1, date2): - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount>0", (account_id, date1, date2)) - return self.cr.fetchone()[0] or 0.0 - - def _account_sum_credit(self, account_id, date1, date2): - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount<0", (account_id, date1, date2)) - return self.cr.fetchone()[0] or 0.0 - - def _account_sum_balance(self, account_id, date1, date2): - debit = self._account_sum_debit(account_id, date1, date2) - credit = self._account_sum_credit(account_id, date1, date2) - return (debit-credit) - - def _account_sum_qty(self, account_id, date1, date2): - self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s", (account_id, date1, date2)) - return self.cr.fetchone()[0] or 0.0 - - def _account_sum_revenue(self, account_id): - return self.sum_revenue.get(account_id, 0.0) - - def _account_g_sum_revenue(self, general_account_id): - return self.account_sum_revenue.get(general_account_id, 0.0) - - def _sum_debit(self, accounts, date1, date2): - ids = map(lambda x: x.id, accounts) - if not ids: - return 0.0 - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount>0", (ids,date1, date2)) - return self.cr.fetchone()[0] or 0.0 - - def _sum_credit(self, accounts, date1, date2): - ids = map(lambda x: x.id, accounts) - if not ids: - return 0.0 - ids = map(lambda x: x.id, accounts) - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount<0", (ids, date1, date2)) - return self.cr.fetchone()[0] or 0.0 - - def _sum_balance(self, accounts, date1, date2): - debit = self._sum_debit(accounts, date1, date2) or 0.0 - credit = self._sum_credit(accounts, date1, date2) or 0.0 - return (debit-credit) - - def _sum_qty(self, accounts, date1, date2): - ids = map(lambda x: x.id, accounts) - if not ids: - return 0.0 - ids = map(lambda x: x.id, accounts) - self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id =ANY(%s) AND date>=%s AND date<=%s", (ids,date1, date2)) - return self.cr.fetchone()[0] or 0.0 - - def _sum_revenue(self, accounts): - ids = map(lambda x: x.id, accounts) - if not ids: - return 0.0 - res = 0.0 - for id in ids: - res += self.sum_revenue.get(id, 0.0) - return res - -report_sxw.report_sxw( - 'report.hr.timesheet.invoice.account.analytic.account.cost_ledger', - 'account.analytic.account', - 'addons/hr_timesheet_invoice/report/cost_ledger.rml', - parser=account_analytic_cost_ledger, header='internal') - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/hr_timesheet_invoice/report/cost_ledger.rml b/addons/hr_timesheet_invoice/report/cost_ledger.rml deleted file mode 100644 index d014dd49927..00000000000 --- a/addons/hr_timesheet_invoice/report/cost_ledger.rml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'o') ]] -
    - -
    - - - - - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml index 2340d18e3f8..adce0e97fa3 100644 --- a/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml +++ b/addons/hr_timesheet_invoice/test/hr_timesheet_invoice_report.yml @@ -7,14 +7,3 @@ (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data) -- - Print the HR Cost Ledger report through the wizard -- - !python {model: account.analytic.account}: | - import netsvc, tools, os, time - ctx={} - acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')] - ctx.update({'model': 'ir.ui.menu','active_ids': acc_ids}) - data_dict = {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')} - from tools import test_reports - test_reports.try_report_action(cr, uid, 'action_hr_timesheet_invoice_cost_ledger',wiz_data=data_dict, context=ctx, our_module='hr_timesheet_invoice') diff --git a/addons/hr_timesheet_invoice/wizard/__init__.py b/addons/hr_timesheet_invoice/wizard/__init__.py index 6dce6a7b651..b718be1acbb 100644 --- a/addons/hr_timesheet_invoice/wizard/__init__.py +++ b/addons/hr_timesheet_invoice/wizard/__init__.py @@ -22,7 +22,6 @@ import hr_timesheet_invoice_create import hr_timesheet_analytic_profit import hr_timesheet_final_invoice_create -import hr_timesheet_analytic_cost_ledger_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_cost_ledger_report.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_cost_ledger_report.py deleted file mode 100644 index 892c93252ee..00000000000 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_analytic_cost_ledger_report.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# 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 -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -import time - -from osv import osv, fields - -class hr_timesheet_analytic_cost_ledger(osv.osv_memory): - _name = 'hr.timesheet.analytic.cost.ledger' - _description = 'hr.timesheet.analytic.cost.ledger' - _columns = { - 'date1': fields.date('Start of period', required=True), - 'date2': fields.date('End of period', required=True) - } - _defaults = { - 'date1': lambda *a: time.strftime('%Y-01-01'), - 'date2': lambda *a: time.strftime('%Y-%m-%d') - } - def print_report(self, cr, uid, ids, context=None): - if context is None: - context = {} - datas = { - 'ids': 'active_ids' in context and context['active_ids'] or [], - 'model': 'account.analytic.account', - 'form': self.read(cr, uid, ids, context=context)[0] - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'hr.timesheet.invoice.account.analytic.account.cost_ledger', - 'datas': datas, - } - -hr_timesheet_analytic_cost_ledger() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml deleted file mode 100644 index 71706d9cdfe..00000000000 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Cost Ledger - hr.timesheet.analytic.cost.ledger - form - - - - - - - - -
    - [[ company.name ]] - - Cost Ledger - - - - - - - -
    - Period from startdate - - Period to enddate - - Currency - - Printing date -
    - [[ data['form']['date1'] ]] - - [[ data['form']['date2'] ]] - - [[ company.currency_id.name ]] - - [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] -
    - Date - - J.C. - - Code - - Move name - - Debit - - Credit - - Balance -
    - [[ o.code ]] [[ o.complete_name ]] -
    - [[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]] - -
    - [[ move_g['code'] ]] [[ move_g['name'] ]] - - - - -
    - [[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] - [[ move_a['date'] ]] - - [[ move_a['cj'] ]] - - [[ move_a['code'] ]] - - [[ move_a['name'] ]] - - [[ '%.2f' % move_a['debit'] ]] - - [[ '%.2f' % move_a['credit'] ]] - - [[ '%.2f' % move_a['balance'] ]] -
    - Total ([[ move_g['code'] ]]) - - [[ '%.2f' % move_g['debit'] ]] - - [[ '%.2f' % move_g['credit'] ]] - - [[ '%.2f' % move_g['balance'] ]] -
    - Total ([[ o.code ]]) - - [[ '%.2f' % (account_sum_debit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]] - - [[ '%.2f' % (account_sum_credit(o.id,data['form']['date1'],data['form']['date2']) or 0.0) ]] - - [[ '%.2f' % (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']) or 0.0)]] -
    - Total - - [[ '%.2f' % (sum_debit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]] - - [[ '%.2f' % (sum_credit(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]] - - [[ '%.2f' % (sum_balance(objects,data['form']['date1'],data['form']['date2']) or 0.0) ]] -
    a"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + pixelMargin: true + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( window.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.style.width = "2px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for ( i in { + submit: 1, + change: 1, + focusin: 1 + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + fragment.removeChild( div ); + + // Null elements to avoid leaks in IE + fragment = select = opt = marginDiv = div = input = null; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + conMarginTop, ptlm, vb, style, html, + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + conMarginTop = 1; + ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; + vb = "visibility:hidden;border:0;"; + style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; + html = "
    " + + "" + + "
    "; + + container = document.createElement("div"); + container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
    t
    "; + + tds = div.getElementsByTagName( "td" ); + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Figure out if the W3C box model works as expected + div.innerHTML = ""; + div.style.width = div.style.paddingLeft = "1px"; + jQuery.boxModel = support.boxModel = div.offsetWidth === 2; + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
    "; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.style.cssText = ptlm + vb; + div.innerHTML = html; + + outer = div.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + if ( window.getComputedStyle ) { + div.style.marginTop = "1%"; + support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; + } + + if ( typeof container.style.zoom !== "undefined" ) { + container.style.zoom = 1; + } + + body.removeChild( container ); + div = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + return support; +})(); + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, + isEvents = name === "events"; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + privateCache = thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ internalKey ] : internalKey; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ internalKey ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + } else { + elem[ internalKey ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, part, attr, name, l, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attr = elem.attributes; + for ( l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split( ".", 2 ); + parts[1] = parts[1] ? "." + parts[1] : ""; + part = parts[1] + "!"; + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); + + // Try to fetch any internally stored data first + if ( data === undefined && elem ) { + data = jQuery.data( elem, key ); + data = dataAttr( elem, key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } + + parts[1] = value; + this.each(function() { + var self = jQuery( this ); + + self.triggerHandler( "setData" + part, parts ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + part, parts ); + }); + }, null, value, arguments.length > 1, null, false ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + jQuery.isNumeric( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, + i = 0; + + if ( value && elem.nodeType === 1 ) { + attrNames = value.toLowerCase().split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + + // See #9699 for explanation of this approach (setting first, then removal) + jQuery.attr( elem, name, "" ); + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /(?:^|\s)hover(\.\S+)?\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + var attrs = elem.attributes || {}; + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || (attrs.id || {}).value === m[2]) && + (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + quick: selector && quickParse( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, origType, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + old = null; + for ( ; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + handlerQueue = [], + i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Determine handlers that should run if there are delegated events + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this.ownerDocument || this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + + // Don't process events on disabled elements (#6911, #8165) + if ( cur.disabled !== true ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = ( + handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) + ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + ret; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = true; + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { // && selector != null + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + /* falls through */ + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} +// Expose origPOS +// "global" as in regardless of relation to brackets/parens +Expr.match.globalPOS = origPOS; + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

    "; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
    "; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.globalPOS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /
    ", "
    " ], + tr: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + col: [ 2, "", "
    " ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and