From fb3f7aa747d4d196abd3963ef1cbdfae910551a5 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Tue, 10 Jan 2012 13:35:59 +0100 Subject: [PATCH 01/86] [IMP] delivery: move picking's net weight to extended view bzr revid: ls@numerigraphe.fr-20120110123559-1llywc42k606hryj --- addons/delivery/delivery_view.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index c46253777d2..47ed9d6d274 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -194,7 +194,7 @@ - + - + - + @@ -245,7 +245,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -271,7 +271,7 @@ - + From 32781b0268a8b3583869cd14809e466568ee2a7f Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Mon, 16 Jan 2012 11:34:06 +0100 Subject: [PATCH 02/86] [FIX] typo in XML file bzr revid: ls@numerigraphe.fr-20120116103406-gwx3w8zlnrnvlyyr --- addons/delivery/delivery_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 47ed9d6d274..6c9e8c85cdb 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -194,7 +194,7 @@ - @@ -207,7 +207,7 @@ - From 438cde1f2f9b6204a0cb71338eacc7dfa1fab4e9 Mon Sep 17 00:00:00 2001 From: "nicolas.bessi@camptocamp.com" <> Date: Wed, 8 Feb 2012 11:37:15 +0100 Subject: [PATCH 03/86] [FIX] l10n_ch bvr report to follow last patches of report_webkit addons bzr revid: nicolas.bessi@camptocamp.com-20120208103715-gk6upkf3b47av9h1 --- addons/l10n_ch/report/report_webkit_html.py | 154 +++++++------------- 1 file changed, 51 insertions(+), 103 deletions(-) diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py index e6f7239c4e4..72158361da7 100644 --- a/addons/l10n_ch/report/report_webkit_html.py +++ b/addons/l10n_ch/report/report_webkit_html.py @@ -20,22 +20,31 @@ ############################################################################## import time -from report import report_sxw -from report_webkit import webkit_report -from report_webkit import report_helper -from osv import osv -from tools import mod10r import sys import os import re + +from mako.template import Template +from mako.lookup import TemplateLookup +from mako import exceptions + + +from report import report_sxw +from report_webkit import webkit_report +from report_webkit import report_helper + +from osv import osv +from osv.osv import except_osv + +from tools import mod10r +from tools.translate import _ +from tools.config import config + import wizard import addons import pooler -from tools.config import config -from mako.template import Template -from mako import exceptions -from tools.translate import _ -from osv.osv import except_osv + + class l10n_ch_report_webkit_html(report_sxw.rml_parse): @@ -143,53 +152,26 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse): 'digits!\nPlease check your company ' 'information for the invoice:\n%s') %(invoice_name))) return '' + +def mako_template(text): + """Build a Mako template. + + This template uses UTF-8 encoding + """ + tmp_lookup = TemplateLookup() #we need it in order to allow inclusion and inheritance + return Template(text, input_encoding='utf-8', output_encoding='utf-8', lookup=tmp_lookup) class BVRWebKitParser(webkit_report.WebKitParser): - def setLang(self, lang): - if not lang: - lang = 'en_US' - self.localcontext['lang'] = lang - - def formatLang(self, value, digits=None, date=False, date_time=False, grouping=True, monetary=False): - """format using the know cursor, language from localcontext""" - if digits is None: - digits = self.parser_instance.get_digits(value) - if isinstance(value, (str, unicode)) and not value: - return '' - pool_lang = self.pool.get('res.lang') - lang = self.localcontext['lang'] - - lang_ids = pool_lang.search(self.parser_instance.cr, self.parser_instance.uid, [('code','=',lang)])[0] - lang_obj = pool_lang.browse(self.parser_instance.cr, self.parser_instance.uid, lang_ids) - - if date or date_time: - if not str(value): - return '' - - date_format = lang_obj.date_format - parse_format = '%Y-%m-%d' - if date_time: - value=value.split('.')[0] - date_format = date_format + " " + lang_obj.time_format - parse_format = '%Y-%m-%d %H:%M:%S' - if not isinstance(value, time.struct_time): - return time.strftime(date_format, time.strptime(value, parse_format)) - - else: - date = datetime(*value.timetuple()[:6]) - return date.strftime(date_format) - - return lang_obj.format('%.' + str(digits) + 'f', value, grouping=grouping, monetary=monetary) - def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None): """generate the PDF""" - self.parser_instance = self.parser( - cursor, + context = context or {} + if report_xml.report_type != 'webkit': + return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context) + self.parser_instance = self.parser(cursor, uid, self.name2, - context=context - ) + context=context) self.pool = pooler.get_pool(cursor.dbname) objs = self.getObjects(cursor, uid, ids, context) self.parser_instance.set_context(objs, data, ids, report_xml.report_type) @@ -201,7 +183,7 @@ class BVRWebKitParser(webkit_report.WebKitParser): if not template and report_xml.report_webkit_data : template = report_xml.report_webkit_data if not template : - raise except_osv(_('Webkit Report template not found !'), _('')) + raise except_osv(_('Error'),_('Webkit Report template not found !')) header = report_xml.webkit_header.html footer = report_xml.webkit_header.footer_html if not header and report_xml.header: @@ -210,43 +192,19 @@ class BVRWebKitParser(webkit_report.WebKitParser): _('Please set a header in company settings') ) if not report_xml.header : - #I know it could be cleaner ... - header = u""" - - - - - - - -""" - self.parser_instance.localcontext.update({'setLang':self.setLang}) - self.parser_instance.localcontext.update({'formatLang':self.formatLang}) + header = '' + default_head = addons.get_module_resource('report_webkit', 'default_header.html') + with open(default_head,'r') as f: + header = f.read() css = report_xml.webkit_header.css if not css : css = '' user = self.pool.get('res.users').browse(cursor, uid, uid) company = user.company_id - parse_template = template - #default_filters=['unicode', 'entity'] can be used to set global filter - body_mako_tpl = Template(parse_template ,input_encoding='utf-8', output_encoding='utf-8') + body_mako_tpl = mako_template(template) #BVR specific bvr_path = addons.get_module_resource(os.path.join('l10n_ch','report','bvr.mako')) - body_bvr_tpl = Template(file(bvr_path).read(), input_encoding='utf-8', output_encoding='utf-8') - + body_bvr_tpl = mako_template(file(bvr_path).read()) helper = report_helper.WebKitHelper(cursor, uid, report_xml.id, context) ##BVR Specific htmls = [] @@ -254,58 +212,48 @@ class BVRWebKitParser(webkit_report.WebKitParser): self.parser_instance.localcontext['objects'] = [obj] if not company.bvr_only: try: - html = body_mako_tpl.render( - helper=helper, + html = body_mako_tpl.render(helper=helper, css=css, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) htmls.append(html) if not company.invoice_only: try: - bvr = body_bvr_tpl.render( - helper=helper, - css=css, - _=self.translate_call, - **self.parser_instance.localcontext - ) + bvr = body_bvr_tpl.render(helper=helper, + css=css, + _=self.translate_call, + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) htmls.append(bvr) head_mako_tpl = Template(header, input_encoding='utf-8', output_encoding='utf-8') try: - head = head_mako_tpl.render( - helper=helper, + head = head_mako_tpl.render(helper=helper, css=css, _debug=False, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) foot = False if footer and company.invoice_only : foot_mako_tpl = Template(footer, input_encoding='utf-8', output_encoding='utf-8') try: - foot = foot_mako_tpl.render( - helper=helper, + foot = foot_mako_tpl.render(helper=helper, css=css, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) if report_xml.webkit_debug : try: - deb = head_mako_tpl.render( - helper=helper, + deb = head_mako_tpl.render(helper=helper, css=css, _debug=html, _=self.translate_call, - **self.parser_instance.localcontext - ) + **self.parser_instance.localcontext) except Exception, e: raise Exception(exceptions.text_error_template().render()) return (deb, 'html') From 1bf3b3b515737f6fd929250cf7f7c0d1e03a1ddf Mon Sep 17 00:00:00 2001 From: Date: Thu, 1 Mar 2012 13:21:24 +0100 Subject: [PATCH 04/86] [FIX] use a local variable row instead of res bzr revid: guewen.baconnier@camptocamp.com-20120301122124-0izdqntr76ruqtde --- addons/account/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index c1a30967aea..49ecf61ee51 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -315,8 +315,8 @@ class account_account(osv.osv): self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG, 'Status: %s'%cr.statusmessage) - for res in cr.dictfetchall(): - accounts[res['id']] = res + for row in cr.dictfetchall(): + accounts[row['id']] = row # consolidate accounts with direct children children_and_consolidated.reverse() From 2c115e6856f5c6eb7f3d730b0ccfa028b386b009 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Fri, 22 Jun 2012 16:19:32 +0200 Subject: [PATCH 05/86] [FIX] Problem with runaway cpu and/or postgres crash on analytic account analysis. lp bug: https://launchpad.net/bugs/1015995 fixed bzr revid: ronald@therp.nl-20120622141932-f6rywvd1nawn186w --- .../account_analytic_analysis.py | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 20c170cb5c0..cedcc9fa533 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -418,41 +418,25 @@ class account_analytic_account_summary_user(osv.osv): } def init(self, cr): - tools.sql.drop_view_if_exists(cr, 'account_analytic_analysis_summary_user') - cr.execute('CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS (' \ - 'SELECT ' \ - '(u.account_id * u.max_user) + u."user" AS id, ' \ - 'u.account_id AS account_id, ' \ - 'u."user" AS "user", ' \ - 'COALESCE(SUM(l.unit_amount), 0.0) AS unit_amount ' \ - 'FROM ' \ - '(SELECT ' \ - 'a.id AS account_id, ' \ - 'u1.id AS "user", ' \ - 'MAX(u2.id) AS max_user ' \ - 'FROM ' \ - 'res_users AS u1, ' \ - 'res_users AS u2, ' \ - 'account_analytic_account AS a ' \ - 'GROUP BY u1.id, a.id ' \ - ') AS u ' \ - 'LEFT JOIN ' \ - '(SELECT ' \ - 'l.account_id AS account_id, ' \ - 'l.user_id AS "user", ' \ - 'SUM(l.unit_amount) AS unit_amount ' \ - 'FROM account_analytic_line AS l, ' \ - 'account_analytic_journal AS j ' \ - 'WHERE (j.type = \'general\') and (j.id=l.journal_id) ' \ - 'GROUP BY l.account_id, l.user_id ' \ - ') AS l ' - 'ON (' \ - 'u.account_id = l.account_id ' \ - 'AND u."user" = l."user"' \ - ') ' \ - 'GROUP BY u."user", u.account_id, u.max_user' \ - ')') - + cr.execute('''CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS ( + with mu as + (select max(id) as max_user from res_users) + , lu AS + (SELECT + l.account_id AS account_id, + coalesce(l.user_id, 0) AS user_id, + SUM(l.unit_amount) AS unit_amount + FROM account_analytic_line AS l, + account_analytic_journal AS j + WHERE (j.type = 'general' ) and (j.id=l.journal_id) + GROUP BY l.account_id, l.user_id + ) + select (lu.account_id * mu.max_user) + lu.user_id as id, + lu.account_id as account_id, + lu.user_id as "user", + unit_amount + from lu, mu)''') + account_analytic_account_summary_user() class account_analytic_account_summary_month(osv.osv): From ff4342dc4f08adf10343ae700d8c9ebf89fdd2a2 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 25 Jun 2012 14:26:30 +0200 Subject: [PATCH 06/86] [ADD] signup addon bzr revid: chs@openerp.com-20120625122630-ce6hywabt512xbh6 --- addons/anonymous/static/src/xml/anonymous.xml | 2 + addons/signup/__init__.py | 2 + addons/signup/__openerp__.py | 23 +++++++ addons/signup/res_config.py | 19 ++++++ addons/signup/res_config.xml | 16 +++++ addons/signup/signup_wizard.py | 65 +++++++++++++++++++ addons/signup/signup_wizard.xml | 41 ++++++++++++ addons/signup/static/src/js/signup.js | 21 ++++++ addons/signup/static/src/xml/signup.xml | 14 ++++ 9 files changed, 203 insertions(+) create mode 100644 addons/signup/__init__.py create mode 100644 addons/signup/__openerp__.py create mode 100644 addons/signup/res_config.py create mode 100644 addons/signup/res_config.xml create mode 100644 addons/signup/signup_wizard.py create mode 100644 addons/signup/signup_wizard.xml create mode 100644 addons/signup/static/src/js/signup.js create mode 100644 addons/signup/static/src/xml/signup.xml diff --git a/addons/anonymous/static/src/xml/anonymous.xml b/addons/anonymous/static/src/xml/anonymous.xml index 4c6d2fcbf54..7429efff458 100644 --- a/addons/anonymous/static/src/xml/anonymous.xml +++ b/addons/anonymous/static/src/xml/anonymous.xml @@ -4,10 +4,12 @@ + diff --git a/addons/signup/__init__.py b/addons/signup/__init__.py new file mode 100644 index 00000000000..f15ba34bf0a --- /dev/null +++ b/addons/signup/__init__.py @@ -0,0 +1,2 @@ +import signup_wizard +import res_config diff --git a/addons/signup/__openerp__.py b/addons/signup/__openerp__.py new file mode 100644 index 00000000000..b927b9526b7 --- /dev/null +++ b/addons/signup/__openerp__.py @@ -0,0 +1,23 @@ +{ + 'name': 'Signup', + 'description': 'Allow users to register', + 'author': 'OpenERP SA', + 'version': '1.0', + 'category': 'Tools', + 'website': 'http://www.openerp.com', + 'installable': True, + 'depends': ['anonymous', 'base_setup'], + 'data': [ + 'signup_wizard.xml', + 'res_config.xml', + ], + 'js': [ + 'static/src/js/signup.js', + ], + #'css': [ + # 'static/src/css/reset_password.css', + #], + 'qweb': [ + 'static/src/xml/signup.xml', + ], +} diff --git a/addons/signup/res_config.py b/addons/signup/res_config.py new file mode 100644 index 00000000000..0c8ab8023d8 --- /dev/null +++ b/addons/signup/res_config.py @@ -0,0 +1,19 @@ +from openerp.osv import osv, fields + +class ResConfig(osv.TransientModel): + _inherit = 'base.config.settings' + + _columns = { + 'signup_user_template_id': fields.many2one('res.users', 'Template user for account creation') + } + + def get_default_user_tpl(self, cr, uid, fields, context=None): + icp = self.pool.get('ir.config_parameter') + return { + 'signup_user_template_id': icp.get_param(cr, uid, 'signup.user_template_id', 0) or False + } + + def set_user_template(self, cr, uid, ids, context=None): + config = self.browse(cr, uid, ids[0], context=context) + icp = self.pool.get('ir.config_parameter') + icp.set_param(cr, uid, 'signup.user_template_id', config.signup_user_template_id.id) diff --git a/addons/signup/res_config.xml b/addons/signup/res_config.xml new file mode 100644 index 00000000000..d2c85a33fd5 --- /dev/null +++ b/addons/signup/res_config.xml @@ -0,0 +1,16 @@ + + + + Inherit General Settings + base.config.settings + + form + + + + + + + + + diff --git a/addons/signup/signup_wizard.py b/addons/signup/signup_wizard.py new file mode 100644 index 00000000000..939e90aa21d --- /dev/null +++ b/addons/signup/signup_wizard.py @@ -0,0 +1,65 @@ +from functools import partial +from openerp.osv import osv, fields + +class res_users(osv.Model): + _inherit = 'res.users' + + _sql_constraints = [ + ('email_uniq', 'UNIQUE (user_email)', 'You can not have two users with the same email!') + ] + + +class signup_wizard(osv.TransientModel): + _name = 'signup.wizard' + _columns = { + 'name': fields.char('Name', size=64), + 'email': fields.char('Email', size=64), + 'pw': fields.char('Password', size=64), + 'cpw': fields.char('Confirm Password', size=64), + 'state': fields.selection([(x, x) for x in 'draft done missmatch'.split()], required=True), + } + _defaults = { + 'state': 'draft', + } + + def create(self, cr, uid, values, context=None): + # NOTE here, invalid values raises exceptions to avoid storing + # sensitive data into the database (which then are available to anyone) + + name = values.get('name') + email = values.get('email') + pw = values.get('pw') + cpw = values.get('cpw') + + if pw != cpw: + raise osv.except_osv('Error', 'Passwords missmatch') + + Users = self.pool.get('res.users') + + user_template_id = self.pool.get('ir.config_parameter').get_param(cr, uid, 'signup.user_template_id', 0) + if user_template_id: + func = partial(Users.copy, cr, 1, user_template_id, context=context) + else: + func = partial(Users.create, cr, 1, context=context) + + func({ + 'name': name, + 'login': email, + 'user_email': email, + 'password': pw, + 'active': True, + }) + + values = {'state': 'done'} + return super(signup_wizard, self).create(cr, uid, values, context) + + def signup(self, cr, uid, ids, context=None): + return { + 'type': 'ir.actions.client', + 'tag': 'login', + } + + def onchange_pw(self, cr, uid, ids, pw, cpw, context=None): + if pw != cpw: + return {'value': {'state': 'missmatch'}} + return {'value': {'state': 'draft'}} diff --git a/addons/signup/signup_wizard.xml b/addons/signup/signup_wizard.xml new file mode 100644 index 00000000000..ec5095ff474 --- /dev/null +++ b/addons/signup/signup_wizard.xml @@ -0,0 +1,41 @@ + + + + + signup.wizard.form + signup.wizard + form + +
+ + + + + + + +
Passwords missmatch
+
+ + +
From 13458db46f61545b63c11a60137ab2e9d8f27d9c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Thu, 28 Jun 2012 17:18:44 +0530 Subject: [PATCH 08/86] added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button bzr revid: pan@tinyerp.com-20120628114844-3c1rv4ckk888yhzo --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 2dc954c414d..09c8ac67dfc 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -584,7 +584,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_invalidclick: function() { this.$element.find(".oe_form_field").click(function () { - $(".oe_form_button_edit").effect("bounce", { times:3,distance:100 }, 500); + $(".oe_form_button_edit").effect("bounce", { times:3}, 500); }); }, on_button_cancel: function(event) { From e748c3d4cf18eb3e8defde43f46ee3eeeff0404c Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Fri, 29 Jun 2012 12:52:48 +0530 Subject: [PATCH 09/86] improoved code for [added a bounce effect when On non editable page view, if click on the content of a field, bounce the Edit button] bzr revid: pan@tinyerp.com-20120629072248-kb0vfjjo707l8vaj --- addons/web/static/src/css/base.css | 5 +---- addons/web/static/src/js/view_form.js | 7 +++++-- addons/web/static/src/xml/base.xml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 2f4111882c4..f738fe757ac 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2215,7 +2215,4 @@ } .kitten-mode-activated > * { opacity: 0.7; -} -.openerp .bounce { - float:left; -} +} \ No newline at end of file diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 09c8ac67dfc..65f825c6cf5 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -582,8 +582,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM self.set({mode: "view"}); }); }, - on_invalidclick: function() { - this.$element.find(".oe_form_field").click(function () { + on_invalidclick: function() { + var div = $("
", {id:"bounce"}); + this.$element.find(".oe_form_field").click(function () { + $(".oe_form_button_edit").wrap(div); + $("#bounce").css({"float":"left","margin-right":"4px"}); $(".oe_form_button_edit").effect("bounce", { times:3}, 500); }); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 641d37a818a..02ff528b993 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -679,8 +679,8 @@
- -
+ + From 58d7c74c1dfba66a1e56f1524d0a54bc59744b43 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Fri, 29 Jun 2012 13:11:24 +0530 Subject: [PATCH 10/86] [IMP]If the user clicks on an empty row of a list, bounce the Create button bzr revid: ggh@tinyerp.com-20120629074124-vxh7ngcyvqvb9zok --- addons/web/static/src/js/view_list.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index b5634c3443f..848c2934b17 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -285,6 +285,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$element.find('.oe_list_buttons').replaceWith(this.$buttons); } this.$buttons.find('.oe_list_add') + .wrap("
") + .css({"float":"left","margin-right":"4px"}) .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -978,6 +980,11 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } self.row_clicked(e); } + else{ + if (opts.options.$buttons){ + $(opts.options.$buttons.find('.oe_list_add')).effect("bounce", { times:5 }, 300); + } + } }); }, row_clicked: function (e, view) { From 219ad444b7a3816ee72de0c693d7e3248568945d Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Mon, 2 Jul 2012 12:55:19 +0530 Subject: [PATCH 11/86] On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120702072519-r54mncuq083jesln --- addons/web_kanban/static/src/js/kanban.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 09858b92fff..9fd2b0e77af 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,6 +415,11 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); + var click_column = this.$element.find('.oe_kanban_add'); + this.$records.click(function() { + click_column.effect("bounce", { times:3 }, 300); + }); + this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); @@ -479,6 +484,12 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ do_toggle_fold: function(compute_width) { this.$element.add(this.$records).toggleClass('oe_kanban_group_folded'); this.state.folded = this.$element.is('.oe_kanban_group_folded'); + if(this.state.folded) { + this.$element.find('.oe_kanban_add').css({"visibility": "hidden"}); + } + if(!this.state.folded) { + this.$element.find('.oe_kanban_add').css({"visibility": "visible"}); + } }, do_save_sequences: function() { var self = this; From 07575c10f2c222cc8d8c67c1a570c5497b185c35 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Tue, 3 Jul 2012 11:41:28 +0530 Subject: [PATCH 12/86] [Improved]On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120703061128-u7k490cdo8e8uuag --- addons/web_kanban/static/src/js/kanban.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 9fd2b0e77af..a840d60a59e 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,11 +415,11 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); - var click_column = this.$element.find('.oe_kanban_add'); + var click_column = this.$element.find('.oe_kanban_add'); + click_column.css({"float":"right"}); this.$records.click(function() { click_column.effect("bounce", { times:3 }, 300); }); - this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); From d26b36480b6908a0bbb2016bf914e91cea648249 Mon Sep 17 00:00:00 2001 From: ggh-openerp Date: Wed, 4 Jul 2012 11:21:06 +0530 Subject: [PATCH 13/86] [IMP]Improve code for Bounce effect in listview bzr revid: ggh@tinyerp.com-20120704055106-r3yuhcvadpel9mhy --- addons/web/static/src/css/base.css | 4 ++++ addons/web/static/src/js/corelib.js | 7 +++++++ addons/web/static/src/js/view_list.js | 11 ++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index f738fe757ac..00ecab65951 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2215,4 +2215,8 @@ } .kitten-mode-activated > * { opacity: 0.7; +} +.openerp .oe_bounce_button_left { + float: left; + margin-right: 4px; } \ No newline at end of file diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 5af51fa519a..a4b0ca97eaa 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -728,6 +728,12 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, + /* + * In button to bounce effect + */ + do_bounce: function(element) { + element.effect("bounce", { times:3}, 500); + }, do_notify: function() { if (this.getParent()) { return this.getParent().do_notify.apply(this,arguments); @@ -740,6 +746,7 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, + rpc: function(url, data, success, error) { var def = $.Deferred().then(success, error); var self = this; diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 848c2934b17..4c725c157ab 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -285,8 +285,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$element.find('.oe_list_buttons').replaceWith(this.$buttons); } this.$buttons.find('.oe_list_add') - .wrap("
") - .css({"float":"left","margin-right":"4px"}) + .wrap("
") + .addClass('oe_bounce_button_left') .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -982,9 +982,10 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } else{ if (opts.options.$buttons){ - $(opts.options.$buttons.find('.oe_list_add')).effect("bounce", { times:5 }, 300); - } - } + var a = $(opts.options.$buttons.find('.oe_list_add')); + self.view.do_bounce(a); + } + } }); }, row_clicked: function (e, view) { From e155f29f18168665b7124464150e551b38fd1936 Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Wed, 4 Jul 2012 11:38:36 +0530 Subject: [PATCH 14/86] [IMP]improve code for the bounce effect in form view bzr revid: pan@tinyerp.com-20120704060836-2y2vu2c2aj7mn8lq --- addons/web/static/src/js/view_form.js | 18 ++++++++---------- addons/web/static/src/js/view_list.js | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 65f825c6cf5..c66c287aa62 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -286,7 +286,13 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, on_record_loaded: function(record) { var self = this, set_values = []; - self.on_invalidclick(); + var div = $("
", {id:"bounce"}); + this.$element.find(".oe_form_field").click(function () { + $(".oe_form_button_edit").wrap(div); + $("#bounce").addClass('oe_bounce_button_left'); + var val_bounce = $(".oe_form_button_edit"); + self.do_bounce(val_bounce); + }); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -581,15 +587,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return this.do_save().then(function(result) { self.set({mode: "view"}); }); - }, - on_invalidclick: function() { - var div = $("
", {id:"bounce"}); - this.$element.find(".oe_form_field").click(function () { - $(".oe_form_button_edit").wrap(div); - $("#bounce").css({"float":"left","margin-right":"4px"}); - $(".oe_form_button_edit").effect("bounce", { times:3}, 500); - }); - }, + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { this.set({mode: "view"}); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 4c725c157ab..015829a0579 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -982,8 +982,8 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. } else{ if (opts.options.$buttons){ - var a = $(opts.options.$buttons.find('.oe_list_add')); - self.view.do_bounce(a); + var bounce_val = $(opts.options.$buttons.find('.oe_list_add')); + self.view.do_bounce(bounce_val); } } }); From d5572fdc8ae336da6b29cbc2e87cee96d31b4164 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 4 Jul 2012 11:49:30 +0530 Subject: [PATCH 15/86] [IMP] On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120704061930-jyw2kohww5a7enbf --- addons/web/static/src/js/corelib.js | 6 +++--- addons/web_kanban/static/src/css/kanban.css | 4 +++- addons/web_kanban/static/src/js/kanban.js | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index a4b0ca97eaa..988c419182b 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -728,11 +728,11 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, - /* - * In button to bounce effect + /** + * Add bounce effect when click on wrong area */ do_bounce: function(element) { - element.effect("bounce", { times:3}, 500); + element.effect("bounce", { times:3}, 300); }, do_notify: function() { if (this.getParent()) { diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index b65bd7dd8f4..c26620e7978 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -453,8 +453,10 @@ .openerp .oe_kanban_view .oe_kanban_color_9 { background-color: #ffc7f1; } - .openerp .oe_form .oe_kanban_view .oe_kanban_column, .openerp .oe_form .oe_kanban_view .oe_kanban_group_header { padding: 0px; background: white; } +.openerp .oe_kanban_quick_create { + float: right; +} \ No newline at end of file diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index a840d60a59e..6cce376d475 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,9 +416,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); - click_column.css({"float":"right"}); + click_column.addClass('oe_kanban_quick_create'); this.$records.click(function() { - click_column.effect("bounce", { times:3 }, 300); + self.view.do_bounce(click_column); }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { From 0a27cc3c1cd8d33e1eaa08263735bdf2c23a8b1f Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 4 Jul 2012 11:58:07 +0530 Subject: [PATCH 16/86] [IMP] On kanban view, if click inside a column, bounce the related quick create[+] bzr revid: psa@tinyerp.com-20120704062807-579ovj2h5unkxbok --- addons/web_kanban/static/src/css/kanban.css | 2 +- addons/web_kanban/static/src/js/kanban.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index c26620e7978..d3bfdb17bd9 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -457,6 +457,6 @@ padding: 0px; background: white; } -.openerp .oe_kanban_quick_create { +.openerp .oe_kanban_quick_create_bounce { float: right; } \ No newline at end of file diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 6cce376d475..66577cc1c08 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,7 +416,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); - click_column.addClass('oe_kanban_quick_create'); + click_column.addClass('oe_kanban_quick_create_bounce'); this.$records.click(function() { self.view.do_bounce(click_column); }); From a2087dc4c52fd36b74c9273a1bd165db4b783465 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 5 Jul 2012 12:19:49 +0530 Subject: [PATCH 17/86] [IMP] Bounce effect on FOLD ICON in KANBAN VIEW. bzr revid: psa@tinyerp.com-20120705064949-pw01zfhl3sesu6uz --- addons/web_kanban/static/src/js/kanban.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 66577cc1c08..c2cc8bcd17b 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,9 +416,13 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); + var fold_icon = this.$element.find('.oe_kanban_fold_icon'); click_column.addClass('oe_kanban_quick_create_bounce'); this.$records.click(function() { self.view.do_bounce(click_column); + if(self.state.folded) { + self.view.do_bounce(fold_icon); + } }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { @@ -487,7 +491,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ if(this.state.folded) { this.$element.find('.oe_kanban_add').css({"visibility": "hidden"}); } - if(!this.state.folded) { + else { this.$element.find('.oe_kanban_add').css({"visibility": "visible"}); } }, From 202238473c6eb90e539028d553265eb1ec43c87a Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Thu, 5 Jul 2012 12:27:57 +0530 Subject: [PATCH 18/86] [IMP] Improove code for form view bounce effect bzr revid: pan@tinyerp.com-20120705065757-483b5y765cvupail --- addons/web/static/src/js/view_form.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c66c287aa62..a2d849d5172 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -284,8 +284,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } this._super(); }, - on_record_loaded: function(record) { - var self = this, set_values = []; + on_invalidclick : function (){ + var self = this; var div = $("
", {id:"bounce"}); this.$element.find(".oe_form_field").click(function () { $(".oe_form_button_edit").wrap(div); @@ -293,6 +293,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM var val_bounce = $(".oe_form_button_edit"); self.do_bounce(val_bounce); }); + }, + on_record_loaded: function(record) { + var self = this, set_values = []; + self.on_invalidclick(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -586,6 +590,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM var self = this; return this.do_save().then(function(result) { self.set({mode: "view"}); + self.on_invalidclick(); }); }, on_button_cancel: function(event) { From 16eef6db4a5820ace292b6e5dc5e3b8cf388ff96 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Mon, 9 Jul 2012 15:49:54 +0530 Subject: [PATCH 19/86] [MERGE] Merged from openerp-web. bzr revid: psa@tinyerp.com-20120709101954-gdsaosq9p7wp5zff --- addons/web_kanban/static/src/js/kanban.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 26638ec762a..8dde2efe7c3 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,13 +416,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var click_column = this.$element.find('.oe_kanban_add'); - var fold_icon = this.$element.find('.oe_kanban_fold_icon'); click_column.addClass('oe_kanban_quick_create_bounce'); this.$records.click(function() { self.view.do_bounce(click_column); - if(self.state.folded) { - self.view.do_bounce(fold_icon); - } }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { @@ -488,12 +484,6 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ do_toggle_fold: function(compute_width) { this.$element.add(this.$records).toggleClass('oe_kanban_group_folded'); this.state.folded = this.$element.is('.oe_kanban_group_folded'); - if(this.state.folded) { - this.$element.find('.oe_kanban_add').css({"visibility": "hidden"}); - } - else { - this.$element.find('.oe_kanban_add').css({"visibility": "visible"}); - } }, do_save_sequences: function() { var self = this; From 9b936e7e29a6b48fa7a5c4fa703dee78b8df771d Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Mon, 9 Jul 2012 16:12:18 +0530 Subject: [PATCH 20/86] [IMP] improve code for bounce effect on non editable form view. bzr revid: pan@tinyerp.com-20120709104218-tot71riz8bww6itp --- addons/web/static/src/js/view_form.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index a65e471c6bf..2a5c0679bd2 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -92,7 +92,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this._super(); }, on_loaded: function(data) { - var self = this; + var self = this; if (!data) { throw new Error("No data provided."); } @@ -287,16 +287,18 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_invalidclick : function (){ var self = this; var div = $("
", {id:"bounce"}); - this.$element.find(".oe_form_field").click(function () { + this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { $(".oe_form_button_edit").wrap(div); $("#bounce").addClass('oe_bounce_button_left'); - var val_bounce = $(".oe_form_button_edit"); + var val_bounce = $(".oe_form_button_edit"); self.do_bounce(val_bounce); - }); + e.stopImmediatePropagation(); + }); + }, on_record_loaded: function(record) { - var self = this, set_values = []; - self.on_invalidclick(); + var self = this, set_values = []; + self.on_invalidclick(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -338,6 +340,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } self.$element.add(self.$buttons).removeClass('oe_form_dirty'); }); + }, on_form_changed: function() { this.trigger("view_content_has_changed"); @@ -596,9 +599,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_button_save: function() { var self = this; return this.do_save().then(function(result) { - self.set({mode: "view"}); - self.on_invalidclick(); + self.set({mode: "view"}); + self.on_invalidclick(); }); + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { @@ -2982,7 +2986,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ return def; }, reload_current_view: function() { - var self = this; + var self = this; return self.is_loaded = self.is_loaded.pipe(function() { var active_view = self.viewmanager.active_view; var view = self.viewmanager.views[active_view].controller; From d5e57ecdf5c37d4c0f64d2075ed87c4419323237 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 11 Jul 2012 10:34:25 +0530 Subject: [PATCH 21/86] [MERGE] Bounce effect on QUICK CREATE[+] Button in KANBAN VIEW. bzr revid: psa@tinyerp.com-20120711050425-eiywgtwi0upzmm80 --- addons/web_kanban/static/src/js/kanban.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 8dde2efe7c3..56612f3bf08 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -417,9 +417,13 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ }); var click_column = this.$element.find('.oe_kanban_add'); click_column.addClass('oe_kanban_quick_create_bounce'); - this.$records.click(function() { + this.$records.click(function(e) { + var $target = e.target; + var $currenttarget = e.currentTarget; + if ($target == $currenttarget) { self.view.do_bounce(click_column); - }); + } + }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); From 90eced57d27949e7f2ed541ca4c39a888facd181 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Wed, 11 Jul 2012 12:20:00 +0530 Subject: [PATCH 22/86] [IMP] Improved code for bounce effect on wrong click area. bzr revid: jra@tinyerp.com-20120711065000-jf3x8xca67jbsdzo --- addons/web/static/src/js/view_form.js | 27 +++++++++++------------ addons/web/static/src/js/view_list.js | 11 +++++---- addons/web_kanban/static/src/js/kanban.js | 15 +++++-------- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 2a4b707f71e..49987151528 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -92,7 +92,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this._super(); }, on_loaded: function(data) { - var self = this; + var self = this; if (!data) { throw new Error("No data provided."); } @@ -284,21 +284,20 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } this._super(); }, - on_invalidclick : function (){ + on_wrong_click : function (){ var self = this; var div = $("
", {id:"bounce"}); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - $(".oe_form_button_edit").wrap(div); - $("#bounce").addClass('oe_bounce_button_left'); - var val_bounce = $(".oe_form_button_edit"); - self.do_bounce(val_bounce); - e.stopImmediatePropagation(); - }); - + $(".oe_form_button_edit").wrap(div); + $("#bounce").addClass('oe_bounce_button_left'); + var edit_btn = $(".oe_form_button_edit"); + self.do_bounce(edit_btn); + e.stopImmediatePropagation(); + }); }, on_record_loaded: function(record) { - var self = this, set_values = []; - self.on_invalidclick(); + var self = this, set_values = []; + self.on_wrong_click(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -599,8 +598,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_button_save: function() { var self = this; return this.do_save().then(function(result) { - self.set({mode: "view"}); - self.on_invalidclick(); + self.set({mode: "view"}); + self.on_wrong_click(); }); }, @@ -2996,7 +2995,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ return def; }, reload_current_view: function() { - var self = this; + var self = this; return self.is_loaded = self.is_loaded.pipe(function() { var active_view = self.viewmanager.active_view; var view = self.viewmanager.views[active_view].controller; diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 7bf9d4ad6bf..0cb6118af3f 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -984,13 +984,12 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. throw "Could not find id in dataset" } self.row_clicked(e); - } - else{ - if (opts.options.$buttons){ - var bounce_val = $(opts.options.$buttons.find('.oe_list_add')); - self.view.do_bounce(bounce_val); - } + } else { + if (opts.options.$buttons) { + var create_btn = $(opts.options.$buttons.find('.oe_list_add')); + self.view.do_bounce(create_btn); } + } }); }, row_clicked: function (e, view) { diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 56612f3bf08..9b80e533d7f 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,15 +415,12 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); - var click_column = this.$element.find('.oe_kanban_add'); - click_column.addClass('oe_kanban_quick_create_bounce'); - this.$records.click(function(e) { - var $target = e.target; - var $currenttarget = e.currentTarget; - if ($target == $currenttarget) { - self.view.do_bounce(click_column); - } - }); + var add_btn = this.$element.find('.oe_kanban_add'); + this.$records.click(function (ev) { + if (ev.target == ev.currentTarget) { + self.view.do_bounce(add_btn); + } + }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); From a899b40b597c74b08a2c66fc486ac1f6bcfa5bca Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Wed, 11 Jul 2012 19:01:24 +0530 Subject: [PATCH 23/86] [IMP] Improved scrolling when scrolltop/scrollleft are not in range for bounce button. bzr revid: jra@tinyerp.com-20120711133124-j84maefl1b21i2jo --- addons/web/static/src/js/view_form.js | 6 ++++++ addons/web_kanban/static/src/js/kanban.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 49987151528..b17d05da165 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -291,6 +291,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM $(".oe_form_button_edit").wrap(div); $("#bounce").addClass('oe_bounce_button_left'); var edit_btn = $(".oe_form_button_edit"); + if (jQuery(window).scrollTop() > 75 ) { + $('body,html').animate({ scrollTop: 0 }, 200); + } + if (jQuery(window).scrollLeft() > 225 ) { + $('body,html').animate({ scrollLeft: 0 }, 200); + } self.do_bounce(edit_btn); e.stopImmediatePropagation(); }); diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 9b80e533d7f..903b4d32840 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -418,6 +418,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ var add_btn = this.$element.find('.oe_kanban_add'); this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { + if (jQuery(window).scrollTop() > 120 ) { + $('body,html').animate({ scrollTop: 0 }, 200); + } self.view.do_bounce(add_btn); } }); From 9b52110d4b9d644d452609d96aa73f5e91f99296 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Thu, 12 Jul 2012 16:19:25 +0530 Subject: [PATCH 24/86] [IMP] Improved bounce effect when kanban group column is folded. bzr revid: jra@tinyerp.com-20120712104925-3ouxmwk780x3pkra --- addons/web_kanban/static/src/js/kanban.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 903b4d32840..05505b26e53 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -416,12 +416,18 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.focus(); }); var add_btn = this.$element.find('.oe_kanban_add'); + var fold_btn = this.$element.find('.oe_dropdown_kanban'); this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { if (jQuery(window).scrollTop() > 120 ) { $('body,html').animate({ scrollTop: 0 }, 200); } - self.view.do_bounce(add_btn); + if (!self.state.folded) { + self.view.do_bounce(add_btn); + }else { + fold_btn.css('display','inline-block'); + self.view.do_bounce(fold_btn); + } } }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); From 7c7d94f0025256ca541b041f35109c5305c41f15 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 15:47:53 +0530 Subject: [PATCH 25/86] [IMP] Improve bounce effect to remove auto scroll and remove useless code. bzr revid: jra@tinyerp.com-20120713101753-95dnac5u3cm3mwhn --- addons/web/static/src/js/corelib.js | 1 - addons/web/static/src/js/view_form.js | 29 +++++---------------- addons/web/static/src/xml/base.xml | 2 +- addons/web_kanban/static/src/css/kanban.css | 1 + addons/web_kanban/static/src/js/kanban.js | 5 +--- 5 files changed, 10 insertions(+), 28 deletions(-) diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index a200f272a91..03b67bce405 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -746,7 +746,6 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, - rpc: function(url, data, success, error) { var def = $.Deferred().then(success, error); var self = this; diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b17d05da165..b48f33f327a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -284,26 +284,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } this._super(); }, - on_wrong_click : function (){ - var self = this; - var div = $("
", {id:"bounce"}); - this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - $(".oe_form_button_edit").wrap(div); - $("#bounce").addClass('oe_bounce_button_left'); - var edit_btn = $(".oe_form_button_edit"); - if (jQuery(window).scrollTop() > 75 ) { - $('body,html').animate({ scrollTop: 0 }, 200); - } - if (jQuery(window).scrollLeft() > 225 ) { - $('body,html').animate({ scrollLeft: 0 }, 200); - } - self.do_bounce(edit_btn); - e.stopImmediatePropagation(); - }); - }, on_record_loaded: function(record) { var self = this, set_values = []; - self.on_wrong_click(); if (!record) { this.do_warn("Form", "The record could not be found in the database.", true); return $.Deferred().reject(); @@ -345,7 +327,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } self.$element.add(self.$buttons).removeClass('oe_form_dirty'); }); - }, on_form_changed: function() { this.trigger("view_content_has_changed"); @@ -581,6 +562,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM _.each(this.fields,function(field){ field.set({"force_readonly": true}); }); + var edit_btn = $(".oe_form_button_edit"); + this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { + edit_btn.addClass('oe_bounce_button_left'); + self.do_bounce(edit_btn); + e.stopImmediatePropagation(); + }); } else { self.$element.removeClass('oe_form_readonly').addClass('oe_form_editable'); self.$buttons.find('.oe_form_buttons_edit').show(); @@ -605,10 +592,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM var self = this; return this.do_save().then(function(result) { self.set({mode: "view"}); - self.on_wrong_click(); }); - - }, + }, on_button_cancel: function(event) { if (this.can_be_discarded()) { this.set({mode: "view"}); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index f150e47b420..a8d7a061a81 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -681,7 +681,7 @@
- + diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index c5c4a8222db..fd18835de88 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -514,6 +514,7 @@ .openerp .oe_kanban_view .oe_kanban_color_9 { background-color: #ffc7f1; } + .openerp .oe_form .oe_kanban_view .oe_kanban_column, .openerp .oe_form .oe_kanban_view .oe_kanban_group_header { padding: 0px; background: white; diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 05505b26e53..524d4cdcca2 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -419,13 +419,10 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ var fold_btn = this.$element.find('.oe_dropdown_kanban'); this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { - if (jQuery(window).scrollTop() > 120 ) { - $('body,html').animate({ scrollTop: 0 }, 200); - } if (!self.state.folded) { self.view.do_bounce(add_btn); }else { - fold_btn.css('display','inline-block'); +// fold_btn.css('display','inline-block'); self.view.do_bounce(fold_btn); } } From a7f251160165c1cae3077f248554acb8ce446955 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 16:39:04 +0530 Subject: [PATCH 26/86] [IMP] Improved code. bzr revid: jra@tinyerp.com-20120713110904-25smebblug0jawx2 --- addons/web/static/src/js/view_form.js | 2 +- addons/web/static/src/js/view_list.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b48f33f327a..6139a8db5fd 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -564,7 +564,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - edit_btn.addClass('oe_bounce_button_left'); + edit_btn.wrap("
").addClass('oe_bounce_button_left'); self.do_bounce(edit_btn); e.stopImmediatePropagation(); }); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 0cb6118af3f..f10c2bee4b2 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -287,8 +287,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi this.$element.find('.oe_list_buttons').replaceWith(this.$buttons); } this.$buttons.find('.oe_list_add') - .wrap("
") - .addClass('oe_bounce_button_left') .click(this.proxy('do_add_record')) .prop('disabled', grouped && this.options.editable); this.$buttons.on('click', '.oe_list_button_import', function() { @@ -984,11 +982,10 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. throw "Could not find id in dataset" } self.row_clicked(e); - } else { - if (opts.options.$buttons) { - var create_btn = $(opts.options.$buttons.find('.oe_list_add')); - self.view.do_bounce(create_btn); - } + } else if (opts.options.$buttons) { + var create_btn = $(opts.options.$buttons.find('.oe_list_add')); + create_btn..wrap("
").addClass('oe_bounce_button_left') + self.view.do_bounce(create_btn); } }); }, From 3db53edefc82bb146f3281ecb9751e239fb2df49 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 18:33:25 +0530 Subject: [PATCH 27/86] [IMP] Improved code to create bounce effect by CSS. bzr revid: jra@tinyerp.com-20120713130325-q0c6km66nkv2qi7p --- addons/web/static/src/css/base.css | 23 +++++++++++++++++++-- addons/web/static/src/js/corelib.js | 6 ------ addons/web/static/src/js/view_form.js | 3 +-- addons/web/static/src/js/view_list.js | 3 +-- addons/web_kanban/static/src/css/kanban.css | 3 --- addons/web_kanban/static/src/js/kanban.js | 6 +++--- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 0d79e783370..293d182e6b7 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2367,7 +2367,26 @@ div.ui-widget-overlay { filter: alpha(opacity=30); opacity: 0.3; } -.openerp .oe_bounce_button_left { + +.oe_bounce_left { float: left; - margin-right: 4px; +} + +.openerp .oe_bounce { + -moz-animation:bounce .40s linear; + -webkit-animation:bounce .40s linear; +} + +@-moz-keyframes bounce { + 0%{ -moz-transform:scale(0); opacity:0;} + 50%{ -moz-transform:scale(1.3); opacity:0.4; } + 75%{ -moz-transform:scale(0.9); opacity:0.7;} + 100%{ -moz-transform:scale(1); opacity:1;} +} + +@-webkit-keyframes bounce { + 0%{ -webkit-transform:scale(0); opacity:0;} + 50%{ -webkit-transform:scale(1.3); opacity:0.4;} + 75%{ -webkit-transform:scale(0.9); opacity:0.7;} + 100%{ -webkit-transform:scale(1); opacity:1;} } \ No newline at end of file diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 03b67bce405..1ed4c4788e3 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -728,12 +728,6 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, { } return false; }, - /** - * Add bounce effect when click on wrong area - */ - do_bounce: function(element) { - element.effect("bounce", { times:3}, 300); - }, do_notify: function() { if (this.getParent()) { return this.getParent().do_notify.apply(this,arguments); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 6139a8db5fd..3c9ff030441 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -564,8 +564,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - edit_btn.wrap("
").addClass('oe_bounce_button_left'); - self.do_bounce(edit_btn); + edit_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); e.stopImmediatePropagation(); }); } else { diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index f10c2bee4b2..da93a047259 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -984,8 +984,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. self.row_clicked(e); } else if (opts.options.$buttons) { var create_btn = $(opts.options.$buttons.find('.oe_list_add')); - create_btn..wrap("
").addClass('oe_bounce_button_left') - self.view.do_bounce(create_btn); + create_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); } }); }, diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index fd18835de88..4c64a2be34b 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -518,7 +518,4 @@ .openerp .oe_form .oe_kanban_view .oe_kanban_column, .openerp .oe_form .oe_kanban_view .oe_kanban_group_header { padding: 0px; background: white; -} -.openerp .oe_kanban_quick_create_bounce { - float: right; } \ No newline at end of file diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 524d4cdcca2..dcb0ad8c0cc 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -420,10 +420,10 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ this.$records.click(function (ev) { if (ev.target == ev.currentTarget) { if (!self.state.folded) { - self.view.do_bounce(add_btn); + add_btn.wrap('
').addClass('oe_bounce'); }else { -// fold_btn.css('display','inline-block'); - self.view.do_bounce(fold_btn); +// fold_btn.css('display','inline-block'); + fold_btn.wrap('
').addClass('oe_bounce'); } } }); From cabf707734f52cd7721377f80d8efaea7056f5bc Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 13 Jul 2012 18:57:23 +0530 Subject: [PATCH 28/86] [ADD] Add comment for used bounce effect. bzr revid: jra@tinyerp.com-20120713132723-t5f7kv5gak13lks2 --- addons/web/static/src/js/view_form.js | 3 +++ addons/web/static/src/js/view_list.js | 6 +++++- addons/web_kanban/static/src/js/kanban.js | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 3c9ff030441..fa75c3e2348 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -562,6 +562,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM _.each(this.fields,function(field){ field.set({"force_readonly": true}); }); + /* + * Add bounce effect on button 'Edit' when click on readonly page view. + */ var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { edit_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index da93a047259..3b120065cc4 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -982,7 +982,11 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. throw "Could not find id in dataset" } self.row_clicked(e); - } else if (opts.options.$buttons) { + } + /* + * Add bounce effect on button 'Create' when click on empty row of list view. + */ + else if (opts.options.$buttons) { var create_btn = $(opts.options.$buttons.find('.oe_list_add')); create_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); } diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index dcb0ad8c0cc..9d794894d5b 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -415,6 +415,9 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({ self.quick.appendTo($(".oe_kanban_group_list_header", self.$records)); self.quick.focus(); }); + /* + * Add bounce effect on image '+' of kanban header when click on empty space of kanban grouped column. + */ var add_btn = this.$element.find('.oe_kanban_add'); var fold_btn = this.$element.find('.oe_dropdown_kanban'); this.$records.click(function (ev) { From 66d1d0e33493b55a7fac8340e0ce009dde363381 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Mon, 16 Jul 2012 12:35:23 +0530 Subject: [PATCH 29/86] [IMP] Improved code. bzr revid: jra@tinyerp.com-20120716070523-iim1n7ghl1a0tg6o --- addons/web/static/src/css/base.css | 23 ----------------------- addons/web/static/src/js/view_form.js | 2 +- addons/web/static/src/js/view_list.js | 2 +- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 293d182e6b7..66104b446ea 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2366,27 +2366,4 @@ div.ui-widget-overlay { background: black; filter: alpha(opacity=30); opacity: 0.3; -} - -.oe_bounce_left { - float: left; -} - -.openerp .oe_bounce { - -moz-animation:bounce .40s linear; - -webkit-animation:bounce .40s linear; -} - -@-moz-keyframes bounce { - 0%{ -moz-transform:scale(0); opacity:0;} - 50%{ -moz-transform:scale(1.3); opacity:0.4; } - 75%{ -moz-transform:scale(0.9); opacity:0.7;} - 100%{ -moz-transform:scale(1); opacity:1;} -} - -@-webkit-keyframes bounce { - 0%{ -webkit-transform:scale(0); opacity:0;} - 50%{ -webkit-transform:scale(1.3); opacity:0.4;} - 75%{ -webkit-transform:scale(0.9); opacity:0.7;} - 100%{ -webkit-transform:scale(1); opacity:1;} } \ No newline at end of file diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index fa75c3e2348..f9eaaba4b91 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -567,7 +567,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM */ var edit_btn = $(".oe_form_button_edit"); this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) { - edit_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); + edit_btn.wrap('
').css('margin-right','4px').addClass('oe_left oe_bounce'); e.stopImmediatePropagation(); }); } else { diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 3b120065cc4..a79e25a1474 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -988,7 +988,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. */ else if (opts.options.$buttons) { var create_btn = $(opts.options.$buttons.find('.oe_list_add')); - create_btn.wrap('
').css('margin-right','4px').addClass('oe_bounce_left oe_bounce'); + create_btn.wrap('
').css('margin-right','4px').addClass('oe_left oe_bounce'); } }); }, From 5bba0c8e6b899c29ff2102b94ebf6abf290e1402 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Mon, 16 Jul 2012 12:56:44 +0530 Subject: [PATCH 30/86] [ADD] Add css and sass file for bounce animation effect. bzr revid: jra@tinyerp.com-20120716072644-ls2q54fr5o8fjyd7 --- addons/web/static/src/css/base.css | 19 +++++++++++++++++ addons/web/static/src/css/base.sass | 33 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 66104b446ea..3e260601581 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2366,4 +2366,23 @@ div.ui-widget-overlay { background: black; filter: alpha(opacity=30); opacity: 0.3; +} + +.openerp .oe_bounce { + -moz-animation:bounce .40s linear; + -webkit-animation:bounce .40s linear; +} + +@-moz-keyframes bounce { + 0%{ -moz-transform:scale(0); opacity:0;} + 50%{ -moz-transform:scale(1.3); opacity:0.4; } + 75%{ -moz-transform:scale(0.9); opacity:0.7;} + 100%{ -moz-transform:scale(1); opacity:1;} +} + +@-webkit-keyframes bounce { + 0%{ -webkit-transform:scale(0); opacity:0;} + 50%{ -webkit-transform:scale(1.3); opacity:0.4;} + 75%{ -webkit-transform:scale(0.9); opacity:0.7;} + 100%{ -webkit-transform:scale(1); opacity:1;} } \ No newline at end of file diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 559125aa3c3..1410a1ce872 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1865,5 +1865,38 @@ $sheet-max-width: 860px div.ui-widget-overlay background: black @include opacity(0.3) + +.openerp .oe_bounce + -moz-animation: bounce .40s linear + -webkit-animation: bounce .40s linear + +@-moz-keyframes bounce + 0% + -moz-transform: scale(0) + opacity: 0 + 50% + -moz-transform: scale(1.3) + opacity: 0.4 + 75% + -moz-transform: scale(0.9) + opacity: 0.7 + 100% + -moz-transform: scale(1) + opacity: 1 + + +@-webkit-keyframes bounce + 0% + -webkit-transform: scale(0) + opacity: 0 + 50% + -webkit-transform: scale(1.3) + opacity: 0.4 + 75% + -webkit-transform: scale(0.9) + opacity: 0.7 + 100% + -webkit-transform: scale(1) + opacity: 1 // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: From 6d9cf3fe2dd641fdffa7f5e816728b66d0ec3c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Mon, 16 Jul 2012 11:46:37 +0200 Subject: [PATCH 31/86] [IMP] point_of_sale: no scrollbar in fullscreen mode bzr revid: fva@openerp.com-20120716094637-n2mdh94pb147ggc0 --- addons/web/static/src/js/chrome.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 094e2f184e6..7830102f9f6 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1056,10 +1056,13 @@ instance.web.WebClient = instance.web.Widget.extend({ } }, set_content_full_screen: function(fullscreen) { - if (fullscreen) + if (fullscreen){ $(".oe_webclient", this.$element).addClass("oe_content_full_screen"); - else + $("body").css({'overflow-y':'hidden'}); + }else{ $(".oe_webclient", this.$element).removeClass("oe_content_full_screen"); + $("body").css({'overflow-y':'scroll'}); + } } }); From 7a61db0b969284bc616643653606613d974c5f41 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 23 Jul 2012 17:29:15 +0530 Subject: [PATCH 32/86] [FIX] account_analytic_account : No such external ID currently defined in the system: project.group_project_user. bzr revid: mdi@tinyerp.com-20120723115915-5qrdbx01grydc8wq --- addons/account_analytic_analysis/security/ir.model.access.csv | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/account_analytic_analysis/security/ir.model.access.csv b/addons/account_analytic_analysis/security/ir.model.access.csv index 4af43dbcb2f..74425cea3dd 100644 --- a/addons/account_analytic_analysis/security/ir.model.access.csv +++ b/addons/account_analytic_analysis/security/ir.model.access.csv @@ -3,5 +3,3 @@ access_account_analytic_analysis_summary_user_sale,account_analytic_analysis.sum access_account_analytic_analysis_summary_month_sale,account_analytic_analysis.summary.month sale,model_account_analytic_analysis_summary_month,base.group_sale_salesman,1,0,0,0 access_account_analytic_analysis_summary_user,account_analytic_analysis.summary.user,model_account_analytic_analysis_summary_user,account.group_account_manager,1,0,0,0 access_account_analytic_analysis_summary_month,account_analytic_analysis.summary.month,model_account_analytic_analysis_summary_month,account.group_account_manager,1,0,0,0 -access_account_analytic_analysis_summary_user_project_user,account_analytic_analysis.summary.user project,model_account_analytic_analysis_summary_user,project.group_project_user,1,0,0,0 -access_account_analytic_analysis_summary_month_project_user,account_analytic_analysis.summary.month project,model_account_analytic_analysis_summary_month,project.group_project_user,1,0,0,0 From 69d9a3d4e26a82c1ea221b4840c827744de39f06 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Mon, 23 Jul 2012 17:35:31 +0530 Subject: [PATCH 33/86] [IMP] analytic, account_analytic_account : The field 'template_id' need to moved from 'account_analytic_analysis' module to 'analytic' so we can override 'on_change_template' from respective module(project, project_issue and hr_timesheet). bzr revid: mdi@tinyerp.com-20120723120531-38reqpofvzh69bo7 --- .../account_analytic_analysis.py | 22 ++++++++----------- .../account_analytic_analysis_view.xml | 3 --- addons/analytic/analytic.py | 12 ++++++++++ addons/analytic/analytic_view.xml | 1 + 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 6e15fe1d5a5..524d5de153a 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -455,7 +455,6 @@ class account_analytic_account(osv.osv): 'invoice_on_timesheets' : fields.boolean("Invoice On Timesheets"), 'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'), 'user_ids': fields.function(_analysis_all, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'), - 'template_id': fields.many2one('account.analytic.account', 'Template of Contract'), 'hours_qtt_est': fields.float('Estimation of Hours to Invoice'), 'est_total' : fields.function(_sum_of_fields, type="float",multi="sum_of_all", string="Total Estimation"), 'invoiced_total' : fields.function(_sum_of_fields, type="float",multi="sum_of_all", string="Total Invoiced"), @@ -483,18 +482,15 @@ class account_analytic_account(osv.osv): def on_change_template(self, cr, uid, ids, template_id, context=None): if not template_id: return {} - res = {'value':{}} - template = self.browse(cr, uid, template_id, context=context) - res['value']['date_start'] = template.date_start - res['value']['date'] = template.date - res['value']['fix_price_invoices'] = template.fix_price_invoices - res['value']['invoice_on_timesheets'] = template.invoice_on_timesheets - res['value']['quantity_max'] = template.quantity_max - res['value']['hours_qtt_est'] = template.hours_qtt_est - res['value']['amount_max'] = template.amount_max - res['value']['to_invoice'] = template.to_invoice.id - res['value']['pricelist_id'] = template.pricelist_id.id - res['value']['description'] = template.description + res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, context=context) + if template_id and 'value' in res: + template = self.browse(cr, uid, template_id, context=context) + res['value']['fix_price_invoices'] = template.fix_price_invoices + res['value']['invoice_on_timesheets'] = template.invoice_on_timesheets + res['value']['hours_qtt_est'] = template.hours_qtt_est + res['value']['amount_max'] = template.amount_max + res['value']['to_invoice'] = template.to_invoice.id + res['value']['pricelist_id'] = template.pricelist_id.id return res account_analytic_account() diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index ead87c176e3..32839063f02 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -20,9 +20,6 @@ - - -
- - - - - or - - Cancel - - - - - - - - - - or Cancel - - - - - - - @@ -1572,6 +1566,7 @@ + Export From b65161c4ead5ac5aac3090f195424acee8c79415 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 26 Jul 2012 11:19:20 +0200 Subject: [PATCH 50/86] o2m popup rename cancel in discard bzr revid: al@openerp.com-20120726091920-1rnj1vw8ef1j8w98 --- addons/web/static/src/xml/base.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index bb25ffa99a9..55353f0a748 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1227,7 +1227,7 @@ - or Cancel + or Discard From c59c7f323748ef3c81ea8c4d8bde638d43caab4e Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 26 Jul 2012 11:26:18 +0200 Subject: [PATCH 51/86] [FIX] listview dont show sidebar by default bzr revid: al@openerp.com-20120726092618-atzkidy1gpd25n6w --- addons/web/static/src/js/view_list.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 53a8c0126b2..485b4e8d59b 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -357,6 +357,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi { label: _t('Delete'), callback: this.do_delete_selected }, ]); this.sidebar.add_toolbar(this.fields_view.toolbar); + this.sidebar.$element.hide(); } }, /** @@ -493,9 +494,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi }, do_show: function () { this._super(); - if (this.sidebar) { - this.sidebar.$element.show(); - } if (this.$buttons) { this.$buttons.show(); } From dd7e7d2c56512989b17533c3eaa12cb4b754a714 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 26 Jul 2012 11:51:04 +0200 Subject: [PATCH 52/86] Removed mode in favor of actual_mode bzr revid: nicolas.vanhoren@openerp.com-20120726095104-txzid0fb9tn3t1ne --- addons/web/static/src/js/view_form.js | 41 +++++++++++++++------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 6d55ad40378..52c12407688 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -91,12 +91,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.__blur_timeout = null; this.rendering_engine = new instance.web.form.FormRenderingEngine(this); this.qweb = null; // A QWeb instance will be created if the view is a QWeb template - this.on("change:mode", this, this._check_mode); - this.set({mode: "view"}); + this.set({actual_mode: "view"}); this.has_been_loaded.then(function() { self.check_actual_mode(); self.on("change:actual_mode", self, self.check_actual_mode); - self.set({mode: self.options.initial_mode}); + self.set({actual_mode: self.options.initial_mode}); }); }, destroy: function() { @@ -107,15 +106,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.$element.off('.formBlur'); this._super(); }, - /** - * Reactualize actual_mode. - */ - _check_mode: function() { - var mode = this.get("mode"); - if (! this.datarecord.id) - mode = "create"; - this.set({actual_mode: mode}); - }, on_loaded: function(data) { var self = this; if (!data) { @@ -298,7 +288,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } return shown.pipe(function() { if (options.editable) { - self.set({mode: "edit"}); + self.to_edit_mode(); } self.$element.css('visibility', 'visible'); }); @@ -600,6 +590,21 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return $.Deferred().reject(); } }, + to_view_mode: function() { + this._check_mode("view"); + }, + to_edit_mode: function() { + this._check_mode("edit"); + }, + /** + * Reactualize actual_mode. + */ + _check_mode: function(switch_to) { + var mode = switch_to || this.get("actual_mode"); + if (! this.datarecord.id) + mode = "create"; + this.set({actual_mode: mode}); + }, check_actual_mode: function(source, options) { var self = this; if(this.get("actual_mode") === "view") { @@ -633,19 +638,19 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_button_save: function() { var self = this; return this.do_save().then(function(result) { - self.set({mode: "view"}); + self.to_view_mode(); }); }, on_button_cancel: function(event) { if (this.can_be_discarded()) { - this.set({mode: "view"}); + this.to_view_mode(); this.on_record_loaded(this.datarecord); } return false; }, on_button_new: function() { var self = this; - this.set({mode: "edit"}); + this.to_edit_mode(); return $.when(this.has_been_loaded).pipe(function() { if (self.can_be_discarded()) { return self.load_defaults(); @@ -653,7 +658,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); }, on_button_edit: function() { - return this.set({mode: "edit"}); + return this.to_edit_mode(); }, on_button_create: function() { this.dataset.index = null; @@ -666,7 +671,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM self.dataset.call('copy', [self.datarecord.id, {}, self.dataset.context]).then(function(new_id) { return self.on_created({ result : new_id }); }).then(function() { - return self.set({mode: "edit"}); + return self.to_edit_mode(); }).then(function() { def.resolve(); }); From 5d80e9a3e7dbc88ebb4c36557dee666083295524 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 26 Jul 2012 11:52:31 +0200 Subject: [PATCH 53/86] Small optimization bzr revid: nicolas.vanhoren@openerp.com-20120726095231-k30uufa9ny2bo28h --- addons/web/static/src/js/view_form.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 52c12407688..5f65affce90 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -91,11 +91,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.__blur_timeout = null; this.rendering_engine = new instance.web.form.FormRenderingEngine(this); this.qweb = null; // A QWeb instance will be created if the view is a QWeb template - this.set({actual_mode: "view"}); + self.set({actual_mode: self.options.initial_mode}); this.has_been_loaded.then(function() { - self.check_actual_mode(); self.on("change:actual_mode", self, self.check_actual_mode); - self.set({actual_mode: self.options.initial_mode}); + self.check_actual_mode(); }); }, destroy: function() { From f6e615cedc37bf91ee609aa9bd9120a6bd46e017 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 26 Jul 2012 11:56:53 +0200 Subject: [PATCH 54/86] Changed my mind about method naming bzr revid: nicolas.vanhoren@openerp.com-20120726095653-bi90exba20x8gu4n --- addons/web/static/src/js/view_form.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5f65affce90..2968fe368dc 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -312,7 +312,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return $.Deferred().reject(); } this.datarecord = record; - this._check_mode(); + this._actualize_mode(); this.set({ 'title' : record.id ? record.name : "New record" }); if (this.qweb) { @@ -590,15 +590,15 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } }, to_view_mode: function() { - this._check_mode("view"); + this._actualize_mode("view"); }, to_edit_mode: function() { - this._check_mode("edit"); + this._actualize_mode("edit"); }, /** * Reactualize actual_mode. */ - _check_mode: function(switch_to) { + _actualize_mode: function(switch_to) { var mode = switch_to || this.get("actual_mode"); if (! this.datarecord.id) mode = "create"; From 49892307b7708b8901d48da7152de80c793351b7 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 26 Jul 2012 12:08:35 +0200 Subject: [PATCH 55/86] [FIX] disable red button of kanban in popups bzr revid: al@openerp.com-20120726100835-j0ol9h0wencpp037 --- addons/web_kanban/static/src/css/kanban.css | 42 +++++++++++++++++++ addons/web_kanban/static/src/css/kanban.sass | 26 ++++++++++++ .../web_kanban/static/src/xml/web_kanban.xml | 2 +- 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 51cdc568a1e..a6f2cc7441b 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -1,3 +1,4 @@ +@charset "utf-8"; .openerp .oe_kanban_view { background: url(/web/static/src/img/form_sheetbg.png); height: inherit; @@ -525,3 +526,44 @@ padding: 0px; background: white; } + +.openerp .oe_popup_form .oe_kanban_buttons .oe_highlight { + color: #404040; + background: none; +} +.openerp .oe_popup_form .oe_kanban_buttons button.oe_highlight { + background-color: #efefef; + background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); + background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8); + background-image: -moz-linear-gradient(top, #efefef, #d8d8d8); + background-image: -ms-linear-gradient(top, #efefef, #d8d8d8); + background-image: -o-linear-gradient(top, #efefef, #d8d8d8); + background-image: linear-gradient(to bottom, #efefef, #d8d8d8); + -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; + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} +.openerp .oe_popup_form .oe_kanban_buttons button.oe_highlight:active { + background-color: #e3e3e3; + background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)); + background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -moz-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -ms-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -o-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: linear-gradient(to bottom, #e3e3e3, #f6f6f6); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; +} +.openerp .oe_popup_form .oe_kanban_buttons button.oe_highlight:hover { + background-color: #f6f6f6; + background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -moz-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3); + -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; + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 6478ea5b213..7175b398cbe 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -1,6 +1,15 @@ @charset "utf-8" // Mixins {{{ +@mixin vertical-gradient($startColor: #555, $endColor: #333) + background-color: $startColor + background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */ + background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */ + background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, $startColor, $endColor) + @mixin radial-gradient($gradient) background-position: center center background-image: -webkit-radial-gradient(circle, $gradient) @@ -439,5 +448,22 @@ padding: 0px background: #ffffff +.openerp + .oe_popup_form + .oe_kanban_buttons + .oe_highlight + color: #404040 + background: none + button.oe_highlight + @include vertical-gradient(#efefef, #d8d8d8) + @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) + button.oe_highlight:active + @include vertical-gradient(#e3e3e3, #f6f6f6) + @include box-shadow(none) + button.oe_highlight:hover + @include vertical-gradient(#f6f6f6, #e3e3e3) + @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) + + // 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_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index 7eb453371b2..820189c7b27 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -13,7 +13,7 @@
- From 712897852dd01e0e93d5dc33ee13d554ee92e51c Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 26 Jul 2012 12:27:19 +0200 Subject: [PATCH 56/86] [IMP] corrected some code documentation bzr revid: nicolas.vanhoren@openerp.com-20120726102719-ct3c5tx06izemg21 --- addons/web/static/src/js/view_form.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 39dc321f97d..4426c93c619 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -35,11 +35,8 @@ instance.web.form.FieldManagerMixin = { instance.web.views.add('form', 'instance.web.FormView'); /** * Properties: - * - mode: always "view" or "edit". Used to switch the view between page (view) and - * form (edit) mode. Depending what is indicated in the dataset, the view can still - * switch to create mode if needed. * - actual_mode: always "view", "edit" or "create". Read-only property. Determines - * the real mode used by the view. + * the mode used by the view. */ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerMixin, { /** @@ -598,9 +595,17 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return $.Deferred().reject(); } }, + /** + * Ask the view to switch to view mode if possible. The view may not do it + * if the current record is not yet saved. It will then stay in create mode. + */ to_view_mode: function() { this._actualize_mode("view"); }, + /** + * Ask the view to switch to edit mode if possible. The view may not do it + * if the current record is not yet saved. It will then stay in create mode. + */ to_edit_mode: function() { this._actualize_mode("edit"); }, From a2154e35b61a5ab3845226697a27e29e54cbd8e8 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 26 Jul 2012 12:59:30 +0200 Subject: [PATCH 57/86] [FIX] stock,delivery: rename 'Create Invoice' to 'Create Invoice/Refund' bzr revid: stw@openerp.com-20120726105930-ls0u5zfpfh9u64vr --- addons/delivery/delivery_view.xml | 2 +- addons/stock/stock_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 457b2d38c90..77c456a3930 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -299,7 +299,7 @@ stock.picking - +