diff options
| author | Darshan Kalola (OpenERP) <dka@tinyerp.com> | 2014-03-31 15:02:50 +0530 |
|---|---|---|
| committer | Darshan Kalola (OpenERP) <dka@tinyerp.com> | 2014-03-31 15:02:50 +0530 |
| commit | ad99e8cfaebd2d686d48f6d7928ebefaa852d547 (patch) | |
| tree | 28f6b719c4c250b7397c6a39db260d8e91f5c023 /addons/web | |
| parent | 48388c9ad4d338050b065bdc0904a2a09ec225af (diff) | |
| parent | fc760dd0d03a07bf0c5833d93b3bcd7566a12e66 (diff) | |
[MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140331093250-wq0tgglwqvlgyw53
Diffstat (limited to 'addons/web')
81 files changed, 548 insertions, 581 deletions
diff --git a/addons/web/__init__.py b/addons/web/__init__.py index 5a0289cef6d..71b16f2ea19 100644 --- a/addons/web/__init__.py +++ b/addons/web/__init__.py @@ -6,6 +6,3 @@ sys.modules['openerp.addons.web.http'] = openerp.http http = openerp.http import controllers -import cli - -wsgi_postload = http.wsgi_postload diff --git a/addons/web/__openerp__.py b/addons/web/__openerp__.py index 72f1610177c..2855441bf6b 100644 --- a/addons/web/__openerp__.py +++ b/addons/web/__openerp__.py @@ -11,7 +11,6 @@ This module provides the core of the OpenERP Web Client. """, 'depends': ['base'], 'auto_install': True, - 'post_load': 'wsgi_postload', 'data': [ 'views/webclient_templates.xml', ], @@ -87,7 +86,6 @@ This module provides the core of the OpenERP Web Client. "static/test/data.js", "static/test/list-utils.js", "static/test/formats.js", - "static/test/jsonrpc.js", "static/test/rpc-misordered.js", "static/test/evals.js", "static/test/search.js", diff --git a/addons/web/cli/__init__.py b/addons/web/cli/__init__.py deleted file mode 100644 index 823c140bb79..00000000000 --- a/addons/web/cli/__init__.py +++ /dev/null @@ -1 +0,0 @@ -import test_js diff --git a/addons/web/cli/test_js.py b/addons/web/cli/test_js.py deleted file mode 100644 index b3a8e634b72..00000000000 --- a/addons/web/cli/test_js.py +++ /dev/null @@ -1,35 +0,0 @@ -import logging -import optparse -import sys - -import unittest2 - -import openerp -import openerp.addons.web.tests - -_logger = logging.getLogger(__name__) - -class TestJs(openerp.cli.Command): - def run(self, args): - self.parser = parser = optparse.OptionParser() - parser.add_option("-d", "--database", dest="db_name", default=False, help="specify the database name") - parser.add_option("--xmlrpc-port", dest="xmlrpc_port", default=8069, help="specify the TCP port for the XML-RPC protocol", type="int") - # proably need to add both --superadmin-password and --database-admin-password - self.parser.parse_args(args) - - # test ony uses db_name xmlrpc_port admin_passwd, so use the server one for the actual parsing - - config = openerp.tools.config - config.parse_config(args) - # needed until runbot is fixed - config['db_password'] = config['admin_passwd'] - - # run js tests - openerp.netsvc.init_alternative_logger() - suite = unittest2.TestSuite() - suite.addTests(unittest2.TestLoader().loadTestsFromModule(openerp.addons.web.tests.test_js)) - r = unittest2.TextTestRunner(verbosity=2).run(suite) - if r.errors or r.failures: - sys.exit(1) - -# vim:et:ts=4:sw=4: diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index a9f56a2099c..fb6cded7c2d 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -14,6 +14,7 @@ import hashlib import os import re import simplejson +import sys import time import urllib2 import zlib @@ -37,10 +38,14 @@ from openerp.http import request, serialize_exception as _serialize_exception _logger = logging.getLogger(__name__) -env = jinja2.Environment( - loader=jinja2.PackageLoader('openerp.addons.web', "views"), - autoescape=True -) +if hasattr(sys, 'frozen'): + # When running on compiled windows binary, we don't have access to package loader. + path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'views')) + loader = jinja2.FileSystemLoader(path) +else: + loader = jinja2.PackageLoader('openerp.addons.web', "views") + +env = jinja2.Environment(loader=loader, autoescape=True) env.filters["json"] = simplejson.dumps #---------------------------------------------------------- @@ -359,7 +364,13 @@ def manifest_glob(extension, addons=None, db=None, include_remotes=False): r.append((None, pattern)) else: for path in glob.glob(os.path.normpath(os.path.join(addons_path, addon, pattern))): - r.append((path, fs2web(path[len(addons_path):]))) + # Hack for IE, who limit 288Ko, 4095 rules, 31 sheets + # http://support.microsoft.com/kb/262161/en + if pattern == "static/lib/bootstrap/css/bootstrap.css": + if include_remotes: + r.insert(0, (None, fs2web(path[len(addons_path):]))) + else: + r.append((path, fs2web(path[len(addons_path):]))) return r def manifest_list(extension, mods=None, db=None, debug=False): @@ -424,6 +435,15 @@ def set_cookie_and_redirect(redirect_url): redirect.autocorrect_location_header = False return redirect +def login_redirect(): + url = '/web/login?' + if request.debug: + url += 'debug&' + return """<html><head><script> + window.location = '%sredirect=' + encodeURIComponent(window.location); + </script></head></html> + """ % (url,) + def load_actions_from_ir_values(key, key2, models, meta): Values = request.session.model('ir.values') actions = Values.get(key, key2, models, meta, request.context) @@ -622,7 +642,7 @@ class Home(http.Controller): @http.route('/', type='http', auth="none") def index(self, s_action=None, db=None, **kw): - return http.local_redirect('/web', query=request.params) + return http.local_redirect('/web', query=request.params, keep_hash=True) @http.route('/web', type='http', auth="none") def web_client(self, s_action=None, **kw): @@ -635,7 +655,7 @@ class Home(http.Controller): } return render_bootstrap_template("web.webclient_bootstrap", headers=headers) else: - return http.local_redirect('/web/login', query=request.params) + return login_redirect() @http.route('/web/login', type='http', auth="none") def web_login(self, redirect=None, **kw): @@ -930,10 +950,11 @@ class Database(http.Controller): return simplejson.dumps([[],[{'error': openerp.tools.ustr(e), 'title': _('Backup Database')}]]) @http.route('/web/database/restore', type='http', auth="none") - def restore(self, db_file, restore_pwd, new_db): + def restore(self, db_file, restore_pwd, new_db, mode): try: + copy = mode == 'copy' data = base64.b64encode(db_file.read()) - request.session.proxy("db").restore(restore_pwd, new_db, data) + request.session.proxy("db").restore(restore_pwd, new_db, data, copy) return '' except openerp.exceptions.AccessDenied, e: raise Exception("AccessDenied") @@ -1598,8 +1619,8 @@ class Export(http.Controller): model, map(operator.itemgetter('name'), export_fields_list)) return [ - {'name': field_name, 'label': fields_data[field_name]} - for field_name in fields_data.keys() + {'name': field['name'], 'label': fields_data[field['name']]} + for field in export_fields_list ] def fields_info(self, model, export_fields): diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py index c99efed4294..a51b619d49f 100644 --- a/addons/web/controllers/testing.py +++ b/addons/web/controllers/testing.py @@ -157,10 +157,3 @@ class TestRunnerController(http.Controller): # replace OS path separators (from join & normpath) by URI ones yield path[len(root):].replace(os.path.sep, '/') - @http.route('/web/tests/set_session_value', type='json', auth="none") - def set_session_value(self, value): - request.session.some_test_value = value - - @http.route('/web/tests/get_session_value', type='json', auth="none") - def get_session_value(self): - return request.session.some_test_value diff --git a/addons/web/i18n/ar.po b/addons/web/i18n/ar.po index ea70d92a9be..db34b4ff088 100644 --- a/addons/web/i18n/ar.po +++ b/addons/web/i18n/ar.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/bg.po b/addons/web/i18n/bg.po index a0f95abe051..423e372cb8a 100644 --- a/addons/web/i18n/bg.po +++ b/addons/web/i18n/bg.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/bn.po b/addons/web/i18n/bn.po index b0d26cc7361..76df35e4e41 100644 --- a/addons/web/i18n/bn.po +++ b/addons/web/i18n/bn.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/bs.po b/addons/web/i18n/bs.po index 2dc7e326cf9..9c1a9d1022f 100644 --- a/addons/web/i18n/bs.po +++ b/addons/web/i18n/bs.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/ca.po b/addons/web/i18n/ca.po index 9311f906fde..7a1b4d7c461 100644 --- a/addons/web/i18n/ca.po +++ b/addons/web/i18n/ca.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/cs.po b/addons/web/i18n/cs.po index 0a83fbd5c4f..095c53828f0 100644 --- a/addons/web/i18n/cs.po +++ b/addons/web/i18n/cs.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" "X-Poedit-Language: Czech\n" #. module: web @@ -1610,7 +1610,7 @@ msgstr "Mažu databázi" #: code:addons/web/static/src/xml/base.xml:467 #, python-format msgid "Powered by" -msgstr "" +msgstr "Založeno na" #. module: web #. openerp-web diff --git a/addons/web/i18n/da.po b/addons/web/i18n/da.po index 87420dcdd88..548cadd8e03 100644 --- a/addons/web/i18n/da.po +++ b/addons/web/i18n/da.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/de.po b/addons/web/i18n/de.po index af36dbaf48e..819dd1dda10 100644 --- a/addons/web/i18n/de.po +++ b/addons/web/i18n/de.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/en_AU.po b/addons/web/i18n/en_AU.po index c6bf693f81f..eda8146e2b3 100644 --- a/addons/web/i18n/en_AU.po +++ b/addons/web/i18n/en_AU.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/en_GB.po b/addons/web/i18n/en_GB.po index c9ad0572918..bd0b3398fd4 100644 --- a/addons/web/i18n/en_GB.po +++ b/addons/web/i18n/en_GB.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/es.po b/addons/web/i18n/es.po index 5c153ee7d4a..4c02281544e 100644 --- a/addons/web/i18n/es.po +++ b/addons/web/i18n/es.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/es_CL.po b/addons/web/i18n/es_CL.po index 881087edd5f..c64879982dc 100644 --- a/addons/web/i18n/es_CL.po +++ b/addons/web/i18n/es_CL.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/es_CR.po b/addons/web/i18n/es_CR.po index 29fd4d26797..53d4bfac330 100644 --- a/addons/web/i18n/es_CR.po +++ b/addons/web/i18n/es_CR.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" "Language: es\n" #. module: web diff --git a/addons/web/i18n/es_DO.po b/addons/web/i18n/es_DO.po index f75f68af8c0..41a5ebdea78 100644 --- a/addons/web/i18n/es_DO.po +++ b/addons/web/i18n/es_DO.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/es_EC.po b/addons/web/i18n/es_EC.po index c6c0f47fcd5..0f0034fa0ad 100644 --- a/addons/web/i18n/es_EC.po +++ b/addons/web/i18n/es_EC.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/es_MX.po b/addons/web/i18n/es_MX.po index bc79eeae4ec..2437e467ff4 100644 --- a/addons/web/i18n/es_MX.po +++ b/addons/web/i18n/es_MX.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/es_PE.po b/addons/web/i18n/es_PE.po index 9ac3c8e889f..7f2c94bc45b 100644 --- a/addons/web/i18n/es_PE.po +++ b/addons/web/i18n/es_PE.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/et.po b/addons/web/i18n/et.po index b8af4cd1b05..22c95f85d36 100644 --- a/addons/web/i18n/et.po +++ b/addons/web/i18n/et.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/eu.po b/addons/web/i18n/eu.po index 7022d59d28c..146e189f42e 100644 --- a/addons/web/i18n/eu.po +++ b/addons/web/i18n/eu.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/fa.po b/addons/web/i18n/fa.po index 414e2ca735e..a0881fccb62 100644 --- a/addons/web/i18n/fa.po +++ b/addons/web/i18n/fa.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/fi.po b/addons/web/i18n/fi.po index 955357d70b8..c8c03c42b83 100644 --- a/addons/web/i18n/fi.po +++ b/addons/web/i18n/fi.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/fr.po b/addons/web/i18n/fr.po index 2711d8e9cc2..63e1d7641b7 100644 --- a/addons/web/i18n/fr.po +++ b/addons/web/i18n/fr.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/fr_CA.po b/addons/web/i18n/fr_CA.po index f531089aaa3..8db5cbc378f 100644 --- a/addons/web/i18n/fr_CA.po +++ b/addons/web/i18n/fr_CA.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/gl.po b/addons/web/i18n/gl.po index 75f27497162..429ed7d8410 100644 --- a/addons/web/i18n/gl.po +++ b/addons/web/i18n/gl.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/gu.po b/addons/web/i18n/gu.po index c23b149e96c..54316a9182b 100644 --- a/addons/web/i18n/gu.po +++ b/addons/web/i18n/gu.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/he.po b/addons/web/i18n/he.po index 3fccd5d4f9c..48773ec1299 100644 --- a/addons/web/i18n/he.po +++ b/addons/web/i18n/he.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/hi.po b/addons/web/i18n/hi.po index 850f3775ddf..212c50f7c53 100644 --- a/addons/web/i18n/hi.po +++ b/addons/web/i18n/hi.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/hr.po b/addons/web/i18n/hr.po index 28c054b851b..c9f970acf8e 100644 --- a/addons/web/i18n/hr.po +++ b/addons/web/i18n/hr.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/hu.po b/addons/web/i18n/hu.po index 4d40e5156c3..c0fcb1f3238 100644 --- a/addons/web/i18n/hu.po +++ b/addons/web/i18n/hu.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/id.po b/addons/web/i18n/id.po index dddaba3d271..e60a0546190 100644 --- a/addons/web/i18n/id.po +++ b/addons/web/i18n/id.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/it.po b/addons/web/i18n/it.po index 000bc5c8907..b73f9f24fc5 100644 --- a/addons/web/i18n/it.po +++ b/addons/web/i18n/it.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/ja.po b/addons/web/i18n/ja.po index 750a25b7713..5805f935695 100644 --- a/addons/web/i18n/ja.po +++ b/addons/web/i18n/ja.po @@ -14,15 +14,15 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:147 #, python-format msgid "Default language:" -msgstr "デフォルトの言語:" +msgstr "デフォルト言語:" #. module: web #. openerp-web @@ -503,7 +503,7 @@ msgstr "ログ (perm_read) のビュー" #: code:addons/web/static/src/js/view_form.js:1071 #, python-format msgid "Set Default" -msgstr "デフォルトに設定" +msgstr "デフォルト値設定" #. module: web #. openerp-web @@ -524,7 +524,7 @@ msgstr "数十秒前" #: code:addons/web/static/src/xml/base.xml:873 #, python-format msgid "Condition:" -msgstr "状態:" +msgstr "条件:" #. module: web #. openerp-web @@ -1564,7 +1564,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:899 #, python-format msgid "All users" -msgstr "全てのユーザ" +msgstr "全ユーザ" #. module: web #. openerp-web @@ -1664,7 +1664,7 @@ msgstr "" #: code:addons/web/static/src/js/view_form.js:1078 #, python-format msgid "Save default" -msgstr "デフォルトに保存" +msgstr "デフォルト値保存" #. module: web #. openerp-web @@ -1693,7 +1693,7 @@ msgstr "項目は空です。何も保存するものはありません。" #: code:addons/web/static/src/xml/base.xml:567 #, python-format msgid "Manage Views" -msgstr "ビューの管理" +msgstr "ビュー管理" #. module: web #. openerp-web @@ -1757,7 +1757,7 @@ msgstr "次の理由でインポートに失敗しました:" #: code:addons/web/static/src/xml/base.xml:561 #, python-format msgid "JS Tests" -msgstr "" +msgstr "JSテスト" #. module: web #. openerp-web @@ -1836,7 +1836,7 @@ msgstr "ドメイン:" #: code:addons/web/static/src/xml/base.xml:856 #, python-format msgid "Default:" -msgstr "デフォルト:" +msgstr "デフォルト値:" #. module: web #. openerp-web @@ -1928,7 +1928,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:559 #, python-format msgid "Set Defaults" -msgstr "" +msgstr "デフォルト値設定" #. module: web #. openerp-web @@ -2417,7 +2417,7 @@ msgstr "ID:" #: code:addons/web/static/src/xml/base.xml:892 #, python-format msgid "Only you" -msgstr "あなただけ" +msgstr "自分のみ" #. module: web #. openerp-web diff --git a/addons/web/i18n/ka.po b/addons/web/i18n/ka.po index 0c302dec921..fc232fb2dd0 100644 --- a/addons/web/i18n/ka.po +++ b/addons/web/i18n/ka.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/ko.po b/addons/web/i18n/ko.po index 3cdc1ad9ab7..da4357fc60b 100644 --- a/addons/web/i18n/ko.po +++ b/addons/web/i18n/ko.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/lo.po b/addons/web/i18n/lo.po index 301fb051251..eda66545fa6 100644 --- a/addons/web/i18n/lo.po +++ b/addons/web/i18n/lo.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/lt.po b/addons/web/i18n/lt.po index be63a02e365..e2a842ef239 100644 --- a/addons/web/i18n/lt.po +++ b/addons/web/i18n/lt.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/lv.po b/addons/web/i18n/lv.po index 1d6e83b44b0..fde422c8c73 100644 --- a/addons/web/i18n/lv.po +++ b/addons/web/i18n/lv.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/mk.po b/addons/web/i18n/mk.po index d65b6de0bfd..fb202b527c7 100644 --- a/addons/web/i18n/mk.po +++ b/addons/web/i18n/mk.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/mn.po b/addons/web/i18n/mn.po index 8e64edf79b7..a3faf28c9ef 100644 --- a/addons/web/i18n/mn.po +++ b/addons/web/i18n/mn.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/nb.po b/addons/web/i18n/nb.po index 2c0b51917a9..9cfbd2abb39 100644 --- a/addons/web/i18n/nb.po +++ b/addons/web/i18n/nb.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/nl.po b/addons/web/i18n/nl.po index 3e59f4e30a2..df579aae021 100644 --- a/addons/web/i18n/nl.po +++ b/addons/web/i18n/nl.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: 2014-02-26 06:31+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:08+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/nl_BE.po b/addons/web/i18n/nl_BE.po index ffbb636c6ee..1e4825c91cf 100644 --- a/addons/web/i18n/nl_BE.po +++ b/addons/web/i18n/nl_BE.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/pl.po b/addons/web/i18n/pl.po index 902eff0fd72..e46855162b3 100644 --- a/addons/web/i18n/pl.po +++ b/addons/web/i18n/pl.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/pt.po b/addons/web/i18n/pt.po index d516feabdca..e37c4848313 100644 --- a/addons/web/i18n/pt.po +++ b/addons/web/i18n/pt.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/pt_BR.po b/addons/web/i18n/pt_BR.po index cbb3ac80b6f..212785b4165 100644 --- a/addons/web/i18n/pt_BR.po +++ b/addons/web/i18n/pt_BR.po @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/ro.po b/addons/web/i18n/ro.po index c6334f3f7c2..f056d09a3e3 100644 --- a/addons/web/i18n/ro.po +++ b/addons/web/i18n/ro.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/ru.po b/addons/web/i18n/ru.po index bc88423f10a..237acd3e0f6 100644 --- a/addons/web/i18n/ru.po +++ b/addons/web/i18n/ru.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:09+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/sk.po b/addons/web/i18n/sk.po index 8a105503c59..d909efec36c 100644 --- a/addons/web/i18n/sk.po +++ b/addons/web/i18n/sk.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: 2014-02-26 06:32+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/sl.po b/addons/web/i18n/sl.po index 859d7f5d41e..a88bbf7daf1 100644 --- a/addons/web/i18n/sl.po +++ b/addons/web/i18n/sl.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/sq.po b/addons/web/i18n/sq.po index 2742e478618..3d6fda95236 100644 --- a/addons/web/i18n/sq.po +++ b/addons/web/i18n/sq.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: 2014-02-26 06:30+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:07+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/sr@latin.po b/addons/web/i18n/sr@latin.po index cf8f6d8e9af..5b34291ded2 100644 --- a/addons/web/i18n/sr@latin.po +++ b/addons/web/i18n/sr@latin.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/sv.po b/addons/web/i18n/sv.po index 0edd52fe806..6ff6fae0ecb 100644 --- a/addons/web/i18n/sv.po +++ b/addons/web/i18n/sv.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/th.po b/addons/web/i18n/th.po index 88026744245..2dd297df24b 100644 --- a/addons/web/i18n/th.po +++ b/addons/web/i18n/th.po @@ -14,15 +14,15 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:147 #, python-format msgid "Default language:" -msgstr "ภาษาหลัก:" +msgstr "ภาษาหลัก" #. module: web #. openerp-web @@ -475,7 +475,7 @@ msgstr "เปิดใช้งานโหมดนักพัฒนา" #: code:addons/web/static/src/js/chrome.js:341 #, python-format msgid "Loading (%d)" -msgstr "กำลังโหลด (% d)" +msgstr "กำลังโหลด (%d)" #. module: web #. openerp-web diff --git a/addons/web/i18n/tr.po b/addons/web/i18n/tr.po index f3560dde562..769ee2bf353 100644 --- a/addons/web/i18n/tr.po +++ b/addons/web/i18n/tr.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/uk.po b/addons/web/i18n/uk.po index 68a5bb8596b..4fd02130ca9 100644 --- a/addons/web/i18n/uk.po +++ b/addons/web/i18n/uk.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/vi.po b/addons/web/i18n/vi.po index c524c1405ec..bca4db09747 100644 --- a/addons/web/i18n/vi.po +++ b/addons/web/i18n/vi.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:10+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/zh_CN.po b/addons/web/i18n/zh_CN.po index 8613e959731..7e884a20c60 100644 --- a/addons/web/i18n/zh_CN.po +++ b/addons/web/i18n/zh_CN.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/i18n/zh_TW.po b/addons/web/i18n/zh_TW.po index f6abfc51867..2b68332b537 100644 --- a/addons/web/i18n/zh_TW.po +++ b/addons/web/i18n/zh_TW.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: 2014-02-26 06:33+0000\n" -"X-Generator: Launchpad (build 16935)\n" +"X-Launchpad-Export-Date: 2014-03-24 06:11+0000\n" +"X-Generator: Launchpad (build 16967)\n" #. module: web #. openerp-web diff --git a/addons/web/static/lib/cleditor/jquery.cleditor.css b/addons/web/static/lib/cleditor/jquery.cleditor.css index 6ac490bcfc4..19669406947 100644 --- a/addons/web/static/lib/cleditor/jquery.cleditor.css +++ b/addons/web/static/lib/cleditor/jquery.cleditor.css @@ -6,7 +6,7 @@ .cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('images/buttons.gif')}
.cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
.cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
-.cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
+.cleditorPopup {border:solid 1px #999; background-color:white; color:#333333; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
.cleditorList div {padding:2px 4px 2px 4px}
.cleditorList p,
.cleditorList h1,
diff --git a/addons/web/static/lib/cleditor/jquery.cleditor.js b/addons/web/static/lib/cleditor/jquery.cleditor.js index 3de9089443d..cf98288d6c6 100644 --- a/addons/web/static/lib/cleditor/jquery.cleditor.js +++ b/addons/web/static/lib/cleditor/jquery.cleditor.js @@ -1,18 +1,13 @@ -/**
- @preserve CLEditor WYSIWYG HTML Editor v1.3.0
- http://premiumsoftware.net/cleditor
+/*!
+ CLEditor WYSIWYG HTML Editor v1.4.4
+ http://premiumsoftware.net/CLEditor
requires jQuery v1.4.2 or later
Copyright 2010, Chris Landowski, Premium Software, LLC
Dual licensed under the MIT or GPL Version 2 licenses.
*/
-// ==ClosureCompiler==
-// @compilation_level SIMPLE_OPTIMIZATIONS
-// @output_file_name jquery.cleditor.min.js
-// ==/ClosureCompiler==
-
-(function($) {
+(function ($) {
//==============
// jQuery Plugin
@@ -22,7 +17,7 @@ // Define the defaults used for all new cleditor instances
defaultOptions: {
- width: 500, // width not including margins, borders or padding
+ width: 'auto', // width not including margins, borders or padding
height: 250, // height not including margins, borders or padding
controls: // controls to add to the toolbar
"bold italic underline strikethrough subscript superscript | font size " +
@@ -46,7 +41,7 @@ [["Paragraph", "<p>"], ["Header 1", "<h1>"], ["Header 2", "<h2>"],
["Header 3", "<h3>"], ["Header 4","<h4>"], ["Header 5","<h5>"],
["Header 6","<h6>"]],
- useCSS: false, // use CSS to style HTML when possible (not supported in ie)
+ useCSS: true, // use CSS to style HTML when possible (not supported in ie)
docType: // Document type contained within the editor
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
docCSSFile: // CSS file used to style the document contained within the editor
@@ -57,7 +52,7 @@ // Define all usable toolbar buttons - the init string property is
// expanded during initialization back into the buttons object and
- // seperate object properties are created for each button.
+ // separate object properties are created for each button.
// e.g. buttons.size.title = "Font Size"
buttons: {
// name,title,command,popupName (""=use name)
@@ -109,7 +104,7 @@ // Loop through all matching textareas and create the editors
this.each(function(idx, elem) {
- if (elem.tagName == "TEXTAREA") {
+ if (elem.tagName.toUpperCase() === "TEXTAREA") {
var data = $.data(elem, CLEDITOR);
if (!data) data = new cleditor(elem, options);
$result = $result.add(data);
@@ -129,6 +124,7 @@ // Misc constants
BACKGROUND_COLOR = "backgroundColor",
+ BLURRED = "blurred",
BUTTON = "button",
BUTTON_NAME = "buttonName",
CHANGE = "change",
@@ -136,6 +132,7 @@ CLICK = "click",
DISABLED = "disabled",
DIV_TAG = "<div>",
+ FOCUSED = "focused",
TRANSPARENT = "transparent",
UNSELECTABLE = "unselectable",
@@ -152,12 +149,15 @@ PROMPT_CLASS = "cleditorPrompt", // prompt popup divs inside body
MSG_CLASS = "cleditorMsg", // message popup div inside body
- // Test for ie
- ie = $.browser.msie,
- ie6 = /msie\s6/i.test(navigator.userAgent),
+ // Browser detection
+ ua = navigator.userAgent.toLowerCase(),
+ ie = /msie/.test(ua),
+ ie6 = /msie\s6/.test(ua),
+ iege11 = /(trident)(?:.*rv:([\w.]+))?/.test(ua),
+ webkit = /webkit/.test(ua),
// Test for iPhone/iTouch/iPad
- iOS = /iphone|ipad|ipod/i.test(navigator.userAgent),
+ iOS = /iphone|ipad|ipod/i.test(ua),
// Popups are created once as needed and shared by all editor instances
popups = {},
@@ -223,19 +223,26 @@ var $group = $(DIV_TAG)
.addClass(GROUP_CLASS)
.appendTo($toolbar);
+
+ // Initialize the group width
+ var groupWidth = 0;
// Add the buttons to the toolbar
$.each(options.controls.split(" "), function(idx, buttonName) {
if (buttonName === "") return true;
// Divider
- if (buttonName == "|") {
+ if (buttonName === "|") {
// Add a new divider to the group
var $div = $(DIV_TAG)
.addClass(DIVIDER_CLASS)
.appendTo($group);
+ // Update the group width
+ $group.width(groupWidth + 1);
+ groupWidth = 0;
+
// Create a new group
$group = $(DIV_TAG)
.addClass(GROUP_CLASS)
@@ -258,6 +265,10 @@ .appendTo($group)
.hover(hoverEnter, hoverLeave);
+ // Update the group width
+ groupWidth += 24;
+ $group.width(groupWidth + 1);
+
// Prepare the button image
var map = {};
if (button.css) map = button.css;
@@ -295,7 +306,7 @@ // Bind the window resize event when the width or height is auto or %
if (/auto|%/.test("" + options.width + options.height))
- $(window).resize(function() {
+ $(window).bind('resize.cleditor', function () {
//Forcefully blurred iframe contentWindow, chrome, IE, safari doesn't trigger blur on window resize and due to which text disappears
var contentWindow = editor.$frame[0].contentWindow;
if(!$.browser.mozilla && contentWindow){
@@ -306,7 +317,6 @@ refresh(editor);
}
});
-
// Create the iframe and resize the controls
refresh(editor);
@@ -347,13 +357,26 @@ return editor;
};
});
+
+ // blurred - shortcut for .bind("blurred", handler) or .trigger("blurred")
+ fn.blurred = function(handler) {
+ var $this = $(this);
+ return handler ? $this.bind(BLURRED, handler) : $this.trigger(BLURRED);
+ };
// change - shortcut for .bind("change", handler) or .trigger("change")
- fn.change = function(handler) {
+ fn.change = function change(handler) {
+ console.log('change test');
var $this = $(this);
return handler ? $this.bind(CHANGE, handler) : $this.trigger(CHANGE);
};
+ // focused - shortcut for .bind("focused", handler) or .trigger("focused")
+ fn.focused = function(handler) {
+ var $this = $(this);
+ return handler ? $this.bind(FOCUSED, handler) : $this.trigger(FOCUSED);
+ };
+
//===============
// Event Handlers
//===============
@@ -369,7 +392,7 @@ popup = popups[popupName];
// Check if disabled
- if (editor.disabled || $(buttonDiv).attr(DISABLED) == DISABLED)
+ if (editor.disabled || $(buttonDiv).attr(DISABLED) === DISABLED)
return;
// Fire the buttonClick event
@@ -387,7 +410,7 @@ return false;
// Toggle source
- if (buttonName == "source") {
+ if (buttonName === "source") {
// Show the iframe
if (sourceMode(editor)) {
@@ -418,10 +441,10 @@ var $popup = $(popup);
// URL
- if (popupName == "url") {
+ if (popupName === "url") {
// Check for selection before showing the link url popup
- if (buttonName == "link" && selectedText(editor) === "") {
+ if (buttonName === "link" && selectedText(editor) === "") {
showMessage(editor, "A selection is required when inserting a link.", buttonDiv);
return false;
}
@@ -447,7 +470,7 @@ }
// Paste as Text
- else if (popupName == "pastetext") {
+ else if (popupName === "pastetext") {
// Wire up the submit button click event handler
$popup.children(":button")
@@ -475,13 +498,13 @@ return false; // stop propagination to document click
}
- // propaginate to documnt click
+ // propaginate to document click
return;
}
// Print
- else if (buttonName == "print")
+ else if (buttonName === "print")
editor.$frame[0].contentWindow.print();
// All other buttons
@@ -526,19 +549,19 @@ useCSS = editor.options.useCSS;
// Get the command value
- if (buttonName == "font")
+ if (buttonName === "font")
// Opera returns the fontfamily wrapped in quotes
value = target.style.fontFamily.replace(/"/g, "");
- else if (buttonName == "size") {
- if (target.tagName == "DIV")
+ else if (buttonName === "size") {
+ if (target.tagName.toUpperCase() === "DIV")
target = target.children[0];
value = target.innerHTML;
}
- else if (buttonName == "style")
+ else if (buttonName === "style")
value = "<" + target.tagName + ">";
- else if (buttonName == "color")
+ else if (buttonName === "color")
value = hex(target.style.backgroundColor);
- else if (buttonName == "highlight") {
+ else if (buttonName === "highlight") {
value = hex(target.style.backgroundColor);
if (ie) command = 'backcolor';
else useCSS = true;
@@ -610,7 +633,7 @@ $popup.html(popupContent);
// Color
- else if (popupName == "color") {
+ else if (popupName === "color") {
var colors = options.colors.split(" ");
if (colors.length < 10)
$popup.width("auto");
@@ -622,7 +645,7 @@ }
// Font
- else if (popupName == "font")
+ else if (popupName === "font")
$.each(options.fonts.split(","), function(idx, font) {
$(DIV_TAG).appendTo($popup)
.css("fontFamily", font)
@@ -630,28 +653,28 @@ });
// Size
- else if (popupName == "size")
+ else if (popupName === "size")
$.each(options.sizes.split(","), function(idx, size) {
$(DIV_TAG).appendTo($popup)
- .html("<font size=" + size + ">" + size + "</font>");
+ .html('<font size="' + size + '">' + size + '</font>');
});
// Style
- else if (popupName == "style")
+ else if (popupName === "style")
$.each(options.styles, function(idx, style) {
$(DIV_TAG).appendTo($popup)
.html(style[1] + style[0] + style[1].replace("<", "</"));
});
// URL
- else if (popupName == "url") {
- $popup.html('Enter URL:<br><input type=text value="http://" size=35><br><input type=button value="Submit">');
+ else if (popupName === "url") {
+ $popup.html('Enter URL:<br /><input type="text" value="http://" size="35" /><br /><input type="button" value="Submit" />');
popupTypeClass = PROMPT_CLASS;
}
// Paste as Text
- else if (popupName == "pastetext") {
- $popup.html('Paste your content here and click submit.<br /><textarea cols=40 rows=3></textarea><br /><input type=button value=Submit>');
+ else if (popupName === "pastetext") {
+ $popup.html('Paste your content here and click submit.<br /><textarea cols="40" rows="3"></textarea><br /><input type="button" value="Submit" />');
popupTypeClass = PROMPT_CLASS;
}
@@ -720,12 +743,12 @@ }
// Execute the command and check for error
- var success = true, description;
- if (ie && command.toLowerCase() == "inserthtml")
+ var success = true, message;
+ if (ie && command.toLowerCase() === "inserthtml")
getRange(editor).pasteHTML(value);
else {
try { success = editor.doc.execCommand(command, 0, value || null); }
- catch (err) { description = err.description; success = false; }
+ catch (err) { message = err.message; success = false; }
if (!success) {
if ("cutcopypaste".indexOf(command) > -1)
showMessage(editor, "For security reasons, your browser does not support the " +
@@ -733,13 +756,14 @@ button);
else
showMessage(editor,
- (description ? description : "Error executing the " + command + " command."),
+ (message ? message : "Error executing the " + command + " command."),
button);
}
}
- // Enable the buttons
+ // Enable the buttons and update the textarea
refreshButtons(editor);
+ updateTextArea(editor, true);
return success;
}
@@ -765,19 +789,26 @@ return editor.$frame[0].contentWindow.getSelection();
}
- // Returns the hex value for the passed in string.
- // hex("rgb(255, 0, 0)"); // #FF0000
- // hex("#FF0000"); // #FF0000
- // hex("#F00"); // #FF0000
+ // hex - returns the hex value for the passed in color string
function hex(s) {
- var m = /rgba?\((\d+), (\d+), (\d+)/.exec(s),
- c = s.split("");
+
+ // hex("rgb(255, 0, 0)") returns #FF0000
+ var m = /rgba?\((\d+), (\d+), (\d+)/.exec(s);
if (m) {
- s = ( m[1] << 16 | m[2] << 8 | m[3] ).toString(16);
+ s = (m[1] << 16 | m[2] << 8 | m[3]).toString(16);
while (s.length < 6)
s = "0" + s;
+ return "#" + s;
}
- return "#" + (s.length == 6 ? s : c[1] + c[1] + c[2] + c[2] + c[3] + c[3]);
+
+ // hex("#F00") returns #FF0000
+ var c = s.split("");
+ if (s.length === 4)
+ return "#" + c[1] + c[1] + c[2] + c[2] + c[3] + c[3];
+
+ // hex("#FF0000") returns #FF0000
+ return s;
+
}
// hidePopups - hides all popups
@@ -792,9 +823,8 @@ // imagesPath - returns the path to the images folder
function imagesPath() {
- var cssFile = "jquery.cleditor.css",
- href = $("link[href$='" + cssFile +"']").attr("href");
- return href.substr(0, href.length - cssFile.length) + "images/";
+ var href = $("link[href*=cleditor]").attr("href");
+ return href.replace(/^(.*\/)[^\/]+$/, '$1') + "images/";
}
// imageUrl - Returns the css url string for a filemane
@@ -813,7 +843,7 @@ editor.$frame.remove();
// Create a new iframe
- var $frame = editor.$frame = $('<iframe frameborder="0" src="javascript:true;">')
+ var $frame = editor.$frame = $('<iframe frameborder="0" src="javascript:true;" />')
.hide()
.appendTo($main);
@@ -833,14 +863,14 @@ // Work around for bug in IE which causes the editor to lose
// focus when clicking below the end of the document.
- if (ie)
+ if (ie || iege11)
$doc.click(function() {focus(editor);});
// Load the content
updateFrame(editor);
// Bind the ie specific iframe event handlers
- if (ie) {
+ if (ie || iege11) {
// Save the current user selection. This code is needed since IE will
// reset the selection just after the beforedeactivate event and just
@@ -848,19 +878,19 @@ $doc.bind("beforedeactivate beforeactivate selectionchange keypress", function(e) {
// Flag the editor as inactive
- if (e.type == "beforedeactivate")
+ if (e.type === "beforedeactivate")
editor.inactive = true;
-
- // Get rid of the bogus selection and flag the editor as active
- else if (e.type == "beforeactivate") {
+
+ // Get rid of the bogus selection and flag the editor as active
+ else if (e.type === "beforeactivate") {
if (!editor.inactive && editor.range && editor.range.length > 1)
editor.range.shift();
delete editor.inactive;
}
- // Save the selection when the editor is active
+ // Save the selection when the editor is active
else if (!editor.inactive) {
- if (!editor.range)
+ if (!editor.range)
editor.range = [];
editor.range.unshift(getRange(editor));
@@ -871,22 +901,31 @@ });
- // Restore the text range when the iframe gains focus
+ // Restore the text range and trigger focused event when the iframe gains focus
$frame.focus(function() {
restoreRange(editor);
+ $(editor).triggerHandler(FOCUSED);
+ });
+
+ // Trigger blurred event when the iframe looses focus
+ $frame.blur(function() {
+ $(editor).triggerHandler(BLURRED);
});
}
- // Update the textarea when the iframe loses focus
- ($.browser.mozilla ? $doc : $(contentWindow)).blur(function() {
- updateTextArea(editor, true);
- });
+ // Trigger focused and blurred events for all other browsers
+ else {
+ $(editor.$frame[0].contentWindow)
+ .focus(function () { $(editor).triggerHandler(FOCUSED); })
+ .blur(function () { $(editor).triggerHandler(BLURRED); });
+ }
- // Enable the toolbar buttons as the user types or clicks
+ // Enable the toolbar buttons and update the textarea as the user types or clicks
$doc.click(hidePopups)
.bind("keyup mouseup", function() {
refreshButtons(editor);
+ updateTextArea(editor, true);
});
// Show the textarea for iPhone/iTouch/iPad or
@@ -906,7 +945,7 @@ $toolbar.height(hgt);
// Resize the iframe
- hgt = (/%/.test("" + options.height) ? $main.height() : parseInt(options.height)) - hgt;
+ hgt = (/%/.test("" + options.height) ? $main.height() : parseInt(options.height, 10)) - hgt;
$frame.width(wid).height(hgt);
// Resize the textarea. IE6 textareas have a 1px top
@@ -927,7 +966,7 @@ function refreshButtons(editor) {
// Webkit requires focus before queryCommandEnabled will return anything but false
- if (!iOS && $.browser.webkit && !editor.focused) {
+ if (!iOS && webkit && !editor.focused) {
editor.$frame[0].contentWindow.focus();
window.focus();
editor.focused = true;
@@ -963,14 +1002,14 @@ if (enabled === undefined)
enabled = true;
}
- else if (((inSourceMode || iOS) && button.name != "source") ||
- (ie && (command == "undo" || command == "redo")))
+ else if (((inSourceMode || iOS) && button.name !== "source") ||
+ (ie && (command === "undo" || command === "redo")))
enabled = false;
- else if (command && command != "print") {
- if (ie && command == "hilitecolor")
+ else if (command && command !== "print") {
+ if (ie && command === "hilitecolor")
command = "backcolor";
// IE does not support inserthtml, so it's always enabled
- if (!ie || command != "inserthtml") {
+ if (!ie || command !== "inserthtml") {
try {enabled = queryObj.queryCommandEnabled(command);}
catch (err) {enabled = false;}
}
@@ -991,8 +1030,12 @@ // restoreRange - restores the current ie selection
function restoreRange(editor) {
- if (ie && editor.range)
- editor.range[0].select();
+ if (editor.range) {
+ if (ie)
+ editor.range[0].select();
+ else if (iege11)
+ getSelection(editor).addRange(editor.range[0]);
+ }
}
// select - selects all the text in either the textarea or iframe
@@ -1084,7 +1127,7 @@ // of potentially heavy updateFrame callbacks.
if (updateFrameCallback) {
var sum = checksum(code);
- if (checkForChange && editor.areaChecksum == sum)
+ if (checkForChange && editor.areaChecksum === sum)
return;
editor.areaChecksum = sum;
}
@@ -1100,7 +1143,7 @@ editor.frameChecksum = checksum(html);
// Update the iframe and trigger the change event
- if (html != $body.html()) {
+ if (html !== $body.html()) {
$body.html(html);
$(editor).triggerHandler(CHANGE);
}
@@ -1119,7 +1162,7 @@ // of potentially heavy updateTextArea callbacks.
if (updateTextAreaCallback) {
var sum = checksum(html);
- if (checkForChange && editor.frameChecksum == sum)
+ if (checkForChange && editor.frameChecksum === sum)
return;
editor.frameChecksum = sum;
}
@@ -1132,7 +1175,7 @@ editor.areaChecksum = checksum(code);
// Update the textarea and trigger the change event
- if (code != $area.val()) {
+ if (code !== $area.val()) {
$area.val(code);
$(editor).triggerHandler(CHANGE);
}
diff --git a/addons/web/static/lib/cleditor/jquery.cleditor.min.js b/addons/web/static/lib/cleditor/jquery.cleditor.min.js deleted file mode 100644 index 5afec048867..00000000000 --- a/addons/web/static/lib/cleditor/jquery.cleditor.min.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - CLEditor WYSIWYG HTML Editor v1.3.0 - http://premiumsoftware.net/cleditor - requires jQuery v1.4.2 or later - - Copyright 2010, Chris Landowski, Premium Software, LLC - Dual licensed under the MIT or GPL Version 2 licenses. -*/ -(function(e){function aa(a){var b=this,c=a.target,d=e.data(c,x),h=s[d],f=h.popupName,i=p[f];if(!(b.disabled||e(c).attr(n)==n)){var g={editor:b,button:c,buttonName:d,popup:i,popupName:f,command:h.command,useCSS:b.options.useCSS};if(h.buttonClick&&h.buttonClick(a,g)===false)return false;if(d=="source"){if(t(b)){delete b.range;b.$area.hide();b.$frame.show();c.title=h.title}else{b.$frame.hide();b.$area.show();c.title="Show Rich Text"}setTimeout(function(){u(b)},100)}else if(!t(b))if(f){var j=e(i);if(f== -"url"){if(d=="link"&&M(b)===""){z(b,"A selection is required when inserting a link.",c);return false}j.children(":button").unbind(q).bind(q,function(){var k=j.find(":text"),o=e.trim(k.val());o!==""&&v(b,g.command,o,null,g.button);k.val("http://");r();w(b)})}else f=="pastetext"&&j.children(":button").unbind(q).bind(q,function(){var k=j.find("textarea"),o=k.val().replace(/\n/g,"<br />");o!==""&&v(b,g.command,o,null,g.button);k.val("");r();w(b)});if(c!==e.data(i,A)){N(b,i,c);return false}return}else if(d== -"print")b.$frame[0].contentWindow.print();else if(!v(b,g.command,g.value,g.useCSS,c))return false;w(b)}}function O(a){a=e(a.target).closest("div");a.css(H,a.data(x)?"#FFF":"#FFC")}function P(a){e(a.target).closest("div").css(H,"transparent")}function ba(a){var b=a.data.popup,c=a.target;if(!(b===p.msg||e(b).hasClass(B))){var d=e.data(b,A),h=e.data(d,x),f=s[h],i=f.command,g,j=this.options.useCSS;if(h=="font")g=c.style.fontFamily.replace(/"/g,"");else if(h=="size"){if(c.tagName=="DIV")c=c.children[0]; -g=c.innerHTML}else if(h=="style")g="<"+c.tagName+">";else if(h=="color")g=Q(c.style.backgroundColor);else if(h=="highlight"){g=Q(c.style.backgroundColor);if(l)i="backcolor";else j=true}b={editor:this,button:d,buttonName:h,popup:b,popupName:f.popupName,command:i,value:g,useCSS:j};if(!(f.popupClick&&f.popupClick(a,b)===false)){if(b.command&&!v(this,b.command,b.value,b.useCSS,d))return false;r();w(this)}}}function C(a){for(var b=1,c=0,d=0;d<a.length;++d){b=(b+a.charCodeAt(d))%65521;c=(c+b)%65521}return c<< -16|b}function R(a,b,c,d,h){if(p[a])return p[a];var f=e(m).hide().addClass(ca).appendTo("body");if(d)f.html(d);else if(a=="color"){b=b.colors.split(" ");b.length<10&&f.width("auto");e.each(b,function(i,g){e(m).appendTo(f).css(H,"#"+g)});c=da}else if(a=="font")e.each(b.fonts.split(","),function(i,g){e(m).appendTo(f).css("fontFamily",g).html(g)});else if(a=="size")e.each(b.sizes.split(","),function(i,g){e(m).appendTo(f).html("<font size="+g+">"+g+"</font>")});else if(a=="style")e.each(b.styles,function(i, -g){e(m).appendTo(f).html(g[1]+g[0]+g[1].replace("<","</"))});else if(a=="url"){f.html('Enter URL:<br><input type=text value="http://" size=35><br><input type=button value="Submit">');c=B}else if(a=="pastetext"){f.html("Paste your content here and click submit.<br /><textarea cols=40 rows=3></textarea><br /><input type=button value=Submit>");c=B}if(!c&&!d)c=S;f.addClass(c);l&&f.attr(I,"on").find("div,font,p,h1,h2,h3,h4,h5,h6").attr(I,"on");if(f.hasClass(S)||h===true)f.children().hover(O,P);p[a]=f[0]; -return f[0]}function T(a,b){if(b){a.$area.attr(n,n);a.disabled=true}else{a.$area.removeAttr(n);delete a.disabled}try{if(l)a.doc.body.contentEditable=!b;else a.doc.designMode=!b?"on":"off"}catch(c){}u(a)}function v(a,b,c,d,h){D(a);if(!l){if(d===undefined||d===null)d=a.options.useCSS;a.doc.execCommand("styleWithCSS",0,d.toString())}d=true;var f;if(l&&b.toLowerCase()=="inserthtml")y(a).pasteHTML(c);else{try{d=a.doc.execCommand(b,0,c||null)}catch(i){f=i.description;d=false}d||("cutcopypaste".indexOf(b)> --1?z(a,"For security reasons, your browser does not support the "+b+" command. Try using the keyboard shortcut or context menu instead.",h):z(a,f?f:"Error executing the "+b+" command.",h))}u(a);return d}function w(a){setTimeout(function(){t(a)?a.$area.focus():a.$frame[0].contentWindow.focus();u(a)},0)}function y(a){if(l)return J(a).createRange();return J(a).getRangeAt(0)}function J(a){if(l)return a.doc.selection;return a.$frame[0].contentWindow.getSelection()}function Q(a){var b=/rgba?\((\d+), (\d+), (\d+)/.exec(a), -c=a.split("");if(b)for(a=(b[1]<<16|b[2]<<8|b[3]).toString(16);a.length<6;)a="0"+a;return"#"+(a.length==6?a:c[1]+c[1]+c[2]+c[2]+c[3]+c[3])}function r(){e.each(p,function(a,b){e(b).hide().unbind(q).removeData(A)})}function U(){var a=e("link[href$='jquery.cleditor.css']").attr("href");return a.substr(0,a.length-19)+"images/"}function K(a){var b=a.$main,c=a.options;a.$frame&&a.$frame.remove();var d=a.$frame=e('<iframe frameborder="0" src="javascript:true;">').hide().appendTo(b),h=d[0].contentWindow,f= -a.doc=h.document,i=e(f);f.open();f.write(c.docType+"<html>"+(c.docCSSFile===""?"":'<head><link rel="stylesheet" type="text/css" href="'+c.docCSSFile+'" /></head>')+'<body style="'+c.bodyStyle+'"></body></html>');f.close();l&&i.click(function(){w(a)});E(a);if(l){i.bind("beforedeactivate beforeactivate selectionchange keypress",function(g){if(g.type=="beforedeactivate")a.inactive=true;else if(g.type=="beforeactivate"){!a.inactive&&a.range&&a.range.length>1&&a.range.shift();delete a.inactive}else if(!a.inactive){if(!a.range)a.range= -[];for(a.range.unshift(y(a));a.range.length>2;)a.range.pop()}});d.focus(function(){D(a)})}(e.browser.mozilla?i:e(h)).blur(function(){V(a,true)});i.click(r).bind("keyup mouseup",function(){u(a)});L?a.$area.show():d.show();e(function(){var g=a.$toolbar,j=g.children("div:last"),k=b.width();j=j.offset().top+j.outerHeight()-g.offset().top+1;g.height(j);j=(/%/.test(""+c.height)?b.height():parseInt(c.height))-j;d.width(k).height(j);a.$area.width(k).height(ea?j-2:j);T(a,a.disabled);u(a)})}function u(a){if(!L&& -e.browser.webkit&&!a.focused){a.$frame[0].contentWindow.focus();window.focus();a.focused=true}var b=a.doc;if(l)b=y(a);var c=t(a);e.each(a.$toolbar.find("."+W),function(d,h){var f=e(h),i=e.cleditor.buttons[e.data(h,x)],g=i.command,j=true;if(a.disabled)j=false;else if(i.getEnabled){j=i.getEnabled({editor:a,button:h,buttonName:i.name,popup:p[i.popupName],popupName:i.popupName,command:i.command,useCSS:a.options.useCSS});if(j===undefined)j=true}else if((c||L)&&i.name!="source"||l&&(g=="undo"||g=="redo"))j= -false;else if(g&&g!="print"){if(l&&g=="hilitecolor")g="backcolor";if(!l||g!="inserthtml")try{j=b.queryCommandEnabled(g)}catch(k){j=false}}if(j){f.removeClass(X);f.removeAttr(n)}else{f.addClass(X);f.attr(n,n)}})}function D(a){l&&a.range&&a.range[0].select()}function M(a){D(a);if(l)return y(a).text;return J(a).toString()}function z(a,b,c){var d=R("msg",a.options,fa);d.innerHTML=b;N(a,d,c)}function N(a,b,c){var d,h,f=e(b);if(c){var i=e(c);d=i.offset();h=--d.left;d=d.top+i.height()}else{i=a.$toolbar; -d=i.offset();h=Math.floor((i.width()-f.width())/2)+d.left;d=d.top+i.height()-2}r();f.css({left:h,top:d}).show();if(c){e.data(b,A,c);f.bind(q,{popup:b},e.proxy(ba,a))}setTimeout(function(){f.find(":text,textarea").eq(0).focus().select()},100)}function t(a){return a.$area.is(":visible")}function E(a,b){var c=a.$area.val(),d=a.options,h=d.updateFrame,f=e(a.doc.body);if(h){var i=C(c);if(b&&a.areaChecksum==i)return;a.areaChecksum=i}c=h?h(c):c;c=c.replace(/<(?=\/?script)/ig,"<");if(d.updateTextArea)a.frameChecksum= -C(c);if(c!=f.html()){f.html(c);e(a).triggerHandler(F)}}function V(a,b){var c=e(a.doc.body).html(),d=a.options,h=d.updateTextArea,f=a.$area;if(h){var i=C(c);if(b&&a.frameChecksum==i)return;a.frameChecksum=i}c=h?h(c):c;if(d.updateFrame)a.areaChecksum=C(c);if(c!=f.val()){f.val(c);e(a).triggerHandler(F)}}e.cleditor={defaultOptions:{width:500,height:250,controls:"bold italic underline strikethrough subscript superscript | font size style | color highlight removeformat | bullets numbering | outdent indent | alignleft center alignright justify | undo redo | rule image link unlink | cut copy paste pastetext | print source", -colors:"FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C 999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C 666 900 C60 C93 990 090 399 33F 60C 939 333 600 930 963 660 060 366 009 339 636 000 300 630 633 330 030 033 006 309 303",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond,Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",sizes:"1,2,3,4,5,6,7",styles:[["Paragraph","<p>"],["Header 1","<h1>"],["Header 2","<h2>"], -["Header 3","<h3>"],["Header 4","<h4>"],["Header 5","<h5>"],["Header 6","<h6>"]],useCSS:false,docType:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',docCSSFile:"",bodyStyle:"margin:4px; font:10pt Arial,Verdana; cursor:text"},buttons:{init:"bold,,|italic,,|underline,,|strikethrough,,|subscript,,|superscript,,|font,,fontname,|size,Font Size,fontsize,|style,,formatblock,|color,Font Color,forecolor,|highlight,Text Highlight Color,hilitecolor,color|removeformat,Remove Formatting,|bullets,,insertunorderedlist|numbering,,insertorderedlist|outdent,,|indent,,|alignleft,Align Text Left,justifyleft|center,,justifycenter|alignright,Align Text Right,justifyright|justify,,justifyfull|undo,,|redo,,|rule,Insert Horizontal Rule,inserthorizontalrule|image,Insert Image,insertimage,url|link,Insert Hyperlink,createlink,url|unlink,Remove Hyperlink,|cut,,|copy,,|paste,,|pastetext,Paste as Text,inserthtml,|print,,|source,Show Source"}, -imagesPath:function(){return U()}};e.fn.cleditor=function(a){var b=e([]);this.each(function(c,d){if(d.tagName=="TEXTAREA"){var h=e.data(d,Y);h||(h=new cleditor(d,a));b=b.add(h)}});return b};var H="backgroundColor",A="button",x="buttonName",F="change",Y="cleditor",q="click",n="disabled",m="<div>",I="unselectable",W="cleditorButton",X="cleditorDisabled",ca="cleditorPopup",S="cleditorList",da="cleditorColor",B="cleditorPrompt",fa="cleditorMsg",l=e.browser.msie,ea=/msie\s6/i.test(navigator.userAgent), -L=/iphone|ipad|ipod/i.test(navigator.userAgent),p={},Z,s=e.cleditor.buttons;e.each(s.init.split("|"),function(a,b){var c=b.split(","),d=c[0];s[d]={stripIndex:a,name:d,title:c[1]===""?d.charAt(0).toUpperCase()+d.substr(1):c[1],command:c[2]===""?d:c[2],popupName:c[3]===""?d:c[3]}});delete s.init;cleditor=function(a,b){var c=this;c.options=b=e.extend({},e.cleditor.defaultOptions,b);var d=c.$area=e(a).hide().data(Y,c).blur(function(){E(c,true)}),h=c.$main=e(m).addClass("cleditorMain").width(b.width).height(b.height), -f=c.$toolbar=e(m).addClass("cleditorToolbar").appendTo(h),i=e(m).addClass("cleditorGroup").appendTo(f);e.each(b.controls.split(" "),function(g,j){if(j==="")return true;if(j=="|"){e(m).addClass("cleditorDivider").appendTo(i);i=e(m).addClass("cleditorGroup").appendTo(f)}else{var k=s[j],o=e(m).data(x,k.name).addClass(W).attr("title",k.title).bind(q,e.proxy(aa,c)).appendTo(i).hover(O,P),G={};if(k.css)G=k.css;else if(k.image)G.backgroundImage="url("+U()+k.image+")";if(k.stripIndex)G.backgroundPosition= -k.stripIndex*-24;o.css(G);l&&o.attr(I,"on");k.popupName&&R(k.popupName,b,k.popupClass,k.popupContent,k.popupHover)}});h.insertBefore(d).append(d);if(!Z){e(document).click(function(g){g=e(g.target);g.add(g.parents()).is("."+B)||r()});Z=true}/auto|%/.test(""+b.width+b.height)&&e(window).resize(function(){K(c)});K(c)};var $=cleditor.prototype;e.each([["clear",function(a){a.$area.val("");E(a)}],["disable",T],["execCommand",v],["focus",w],["hidePopups",r],["sourceMode",t,true],["refresh",K],["select", -function(a){setTimeout(function(){t(a)?a.$area.select():v(a,"selectall")},0)}],["selectedHTML",function(a){D(a);a=y(a);if(l)return a.htmlText;var b=e("<layer>")[0];b.appendChild(a.cloneContents());return b.innerHTML},true],["selectedText",M,true],["showMessage",z],["updateFrame",E],["updateTextArea",V]],function(a,b){$[b[0]]=function(){for(var c=[this],d=0;d<arguments.length;d++)c.push(arguments[d]);c=b[1].apply(this,c);if(b[2])return c;return this}});$.change=function(a){var b=e(this);return a?b.bind(F, -a):b.trigger(F)}})(jQuery);
\ No newline at end of file diff --git a/addons/web/static/lib/fontawesome/css/font-awesome.css b/addons/web/static/lib/fontawesome/css/font-awesome.css index 048cff97398..7fa0e6f467b 100644 --- a/addons/web/static/lib/fontawesome/css/font-awesome.css +++ b/addons/web/static/lib/fontawesome/css/font-awesome.css @@ -13,7 +13,7 @@ } .fa { display: inline-block; - font-family: FontAwesome; + font-family: FontAwesome !important; font-style: normal; font-weight: normal; line-height: 1; diff --git a/addons/web/static/lib/underscore/underscore.js b/addons/web/static/lib/underscore/underscore.js index b50115df5c1..ca61fdc3a4b 100644 --- a/addons/web/static/lib/underscore/underscore.js +++ b/addons/web/static/lib/underscore/underscore.js @@ -1,6 +1,6 @@ -// Underscore.js 1.5.2 +// Underscore.js 1.6.0 // http://underscorejs.org -// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { @@ -65,7 +65,7 @@ } // Current version. - _.VERSION = '1.5.2'; + _.VERSION = '1.6.0'; // Collection Functions // -------------------- @@ -74,7 +74,7 @@ // Handles objects with the built-in `forEach`, arrays, and raw objects. // Delegates to **ECMAScript 5**'s native `forEach` if available. var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; + if (obj == null) return obj; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { @@ -87,6 +87,7 @@ if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; } } + return obj; }; // Return the results of applying the iterator to each element. @@ -152,10 +153,10 @@ }; // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { + _.find = _.detect = function(obj, predicate, context) { var result; any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { + if (predicate.call(context, value, index, list)) { result = value; return true; } @@ -166,33 +167,33 @@ // Return all the elements that pass a truth test. // Delegates to **ECMAScript 5**'s native `filter` if available. // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { + _.filter = _.select = function(obj, predicate, context) { var results = []; if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); + if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results.push(value); + if (predicate.call(context, value, index, list)) results.push(value); }); return results; }; // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { + _.reject = function(obj, predicate, context) { return _.filter(obj, function(value, index, list) { - return !iterator.call(context, value, index, list); + return !predicate.call(context, value, index, list); }, context); }; // Determine whether all of the elements match a truth test. // Delegates to **ECMAScript 5**'s native `every` if available. // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - iterator || (iterator = _.identity); + _.every = _.all = function(obj, predicate, context) { + predicate || (predicate = _.identity); var result = true; if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); + if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context); each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; + if (!(result = result && predicate.call(context, value, index, list))) return breaker; }); return !!result; }; @@ -200,13 +201,13 @@ // Determine if at least one element in the object matches a truth test. // Delegates to **ECMAScript 5**'s native `some` if available. // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); + var any = _.some = _.any = function(obj, predicate, context) { + predicate || (predicate = _.identity); var result = false; if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); + if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; + if (result || (result = predicate.call(context, value, index, list))) return breaker; }); return !!result; }; @@ -232,25 +233,19 @@ // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); + return _.map(obj, _.property(key)); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. - _.where = function(obj, attrs, first) { - if (_.isEmpty(attrs)) return first ? void 0 : []; - return _[first ? 'find' : 'filter'](obj, function(value) { - for (var key in attrs) { - if (attrs[key] !== value[key]) return false; - } - return true; - }); + _.where = function(obj, attrs) { + return _.filter(obj, _.matches(attrs)); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { - return _.where(obj, attrs, true); + return _.find(obj, _.matches(attrs)); }; // Return the maximum element or (element-based computation). @@ -260,13 +255,15 @@ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.max.apply(Math, obj); } - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity, value: -Infinity}; + var result = -Infinity, lastComputed = -Infinity; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; - computed > result.computed && (result = {value : value, computed : computed}); + if (computed > lastComputed) { + result = value; + lastComputed = computed; + } }); - return result.value; + return result; }; // Return the minimum element (or element-based computation). @@ -274,16 +271,18 @@ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.min.apply(Math, obj); } - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity, value: Infinity}; + var result = Infinity, lastComputed = Infinity; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); + if (computed < lastComputed) { + result = value; + lastComputed = computed; + } }); - return result.value; + return result; }; - // Shuffle an array, using the modern version of the + // Shuffle an array, using the modern version of the // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). _.shuffle = function(obj) { var rand; @@ -297,11 +296,12 @@ return shuffled; }; - // Sample **n** random values from an array. - // If **n** is not specified, returns a single random element from the array. + // Sample **n** random values from a collection. + // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `map`. _.sample = function(obj, n, guard) { - if (arguments.length < 2 || guard) { + if (n == null || guard) { + if (obj.length !== +obj.length) obj = _.values(obj); return obj[_.random(obj.length - 1)]; } return _.shuffle(obj).slice(0, Math.max(0, n)); @@ -309,12 +309,14 @@ // An internal function to generate lookup iterators. var lookupIterator = function(value) { - return _.isFunction(value) ? value : function(obj){ return obj[value]; }; + if (value == null) return _.identity; + if (_.isFunction(value)) return value; + return _.property(value); }; // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, value, context) { - var iterator = lookupIterator(value); + _.sortBy = function(obj, iterator, context) { + iterator = lookupIterator(iterator); return _.pluck(_.map(obj, function(value, index, list) { return { value: value, @@ -334,9 +336,9 @@ // An internal function used for aggregate "group by" operations. var group = function(behavior) { - return function(obj, value, context) { + return function(obj, iterator, context) { var result = {}; - var iterator = value == null ? _.identity : lookupIterator(value); + iterator = lookupIterator(iterator); each(obj, function(value, index) { var key = iterator.call(context, value, index, obj); behavior(result, key, value); @@ -348,7 +350,7 @@ // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. _.groupBy = group(function(result, key, value) { - (_.has(result, key) ? result[key] : (result[key] = [])).push(value); + _.has(result, key) ? result[key].push(value) : result[key] = [value]; }); // Indexes the object's values by a criterion, similar to `groupBy`, but for @@ -367,7 +369,7 @@ // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iterator, context) { - iterator = iterator == null ? _.identity : lookupIterator(iterator); + iterator = lookupIterator(iterator); var value = iterator.call(context, obj); var low = 0, high = array.length; while (low < high) { @@ -399,7 +401,9 @@ // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; - return (n == null) || guard ? array[0] : slice.call(array, 0, n); + if ((n == null) || guard) return array[0]; + if (n < 0) return []; + return slice.call(array, 0, n); }; // Returns everything but the last entry of the array. Especially useful on @@ -414,11 +418,8 @@ // values in the array. The **guard** check allows it to work with `_.map`. _.last = function(array, n, guard) { if (array == null) return void 0; - if ((n == null) || guard) { - return array[array.length - 1]; - } else { - return slice.call(array, Math.max(array.length - n, 0)); - } + if ((n == null) || guard) return array[array.length - 1]; + return slice.call(array, Math.max(array.length - n, 0)); }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. @@ -459,6 +460,17 @@ return _.difference(array, slice.call(arguments, 1)); }; + // Split an array into two arrays: one whose elements all satisfy the given + // predicate, and one whose elements all do not satisfy the predicate. + _.partition = function(array, predicate, context) { + predicate = lookupIterator(predicate); + var pass = [], fail = []; + each(array, function(elem) { + (predicate.call(context, elem) ? pass : fail).push(elem); + }); + return [pass, fail]; + }; + // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. @@ -492,7 +504,7 @@ var rest = slice.call(arguments, 1); return _.filter(_.uniq(array), function(item) { return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; + return _.contains(other, item); }); }); }; @@ -507,7 +519,7 @@ // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { - var length = _.max(_.pluck(arguments, "length").concat(0)); + var length = _.max(_.pluck(arguments, 'length').concat(0)); var results = new Array(length); for (var i = 0; i < length; i++) { results[i] = _.pluck(arguments, '' + i); @@ -613,19 +625,27 @@ }; // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. + // arguments pre-filled, without changing its dynamic `this` context. _ acts + // as a placeholder, allowing any combination of arguments to be pre-filled. _.partial = function(func) { - var args = slice.call(arguments, 1); + var boundArgs = slice.call(arguments, 1); return function() { - return func.apply(this, args.concat(slice.call(arguments))); + var position = 0; + var args = boundArgs.slice(); + for (var i = 0, length = args.length; i < length; i++) { + if (args[i] === _) args[i] = arguments[position++]; + } + while (position < arguments.length) args.push(arguments[position++]); + return func.apply(this, args); }; }; - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. + // Bind a number of an object's methods to that object. Remaining arguments + // are the method names to be bound. Useful for ensuring that all callbacks + // defined on an object belong to it. _.bindAll = function(obj) { var funcs = slice.call(arguments, 1); - if (funcs.length === 0) throw new Error("bindAll must be passed function names"); + if (funcs.length === 0) throw new Error('bindAll must be passed function names'); each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); return obj; }; @@ -664,12 +684,13 @@ var previous = 0; options || (options = {}); var later = function() { - previous = options.leading === false ? 0 : new Date; + previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); + context = args = null; }; return function() { - var now = new Date; + var now = _.now(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; @@ -679,6 +700,7 @@ timeout = null; previous = now; result = func.apply(context, args); + context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } @@ -692,24 +714,33 @@ // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { var timeout, args, context, timestamp, result; + + var later = function() { + var last = _.now() - timestamp; + if (last < wait) { + timeout = setTimeout(later, wait - last); + } else { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + context = args = null; + } + } + }; + return function() { context = this; args = arguments; - timestamp = new Date(); - var later = function() { - var last = (new Date()) - timestamp; - if (last < wait) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) result = func.apply(context, args); - } - }; + timestamp = _.now(); var callNow = immediate && !timeout; if (!timeout) { timeout = setTimeout(later, wait); } - if (callNow) result = func.apply(context, args); + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + return result; }; }; @@ -731,11 +762,7 @@ // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { - return function() { - var args = [func]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; + return _.partial(wrapper, func); }; // Returns a function that is the composition of a list of functions, each @@ -765,8 +792,9 @@ // Retrieve the names of an object's properties. // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); + _.keys = function(obj) { + if (!_.isObject(obj)) return []; + if (nativeKeys) return nativeKeys(obj); var keys = []; for (var key in obj) if (_.has(obj, key)) keys.push(key); return keys; @@ -921,7 +949,8 @@ // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))) { + _.isFunction(bCtor) && (bCtor instanceof bCtor)) + && ('constructor' in a && 'constructor' in b)) { return false; } // Add the first object to the stack of traversed objects. @@ -1061,6 +1090,30 @@ return value; }; + _.constant = function(value) { + return function () { + return value; + }; + }; + + _.property = function(key) { + return function(obj) { + return obj[key]; + }; + }; + + // Returns a predicate for checking whether an object has a given set of `key:value` pairs. + _.matches = function(attrs) { + return function(obj) { + if (obj === attrs) return true; //avoid comparing an object to itself. + for (var key in attrs) { + if (attrs[key] !== obj[key]) + return false; + } + return true; + } + }; + // Run a function **n** times. _.times = function(n, iterator, context) { var accum = Array(Math.max(0, n)); @@ -1077,6 +1130,9 @@ return min + Math.floor(Math.random() * (max - min + 1)); }; + // A (possibly faster) way to get the current timestamp as an integer. + _.now = Date.now || function() { return new Date().getTime(); }; + // List of HTML entities for escaping. var entityMap = { escape: { @@ -1273,4 +1329,16 @@ }); + // AMD registration happens at the end for compatibility with AMD loaders + // that may not enforce next-turn semantics on modules. Even though general + // practice for AMD registration is to be anonymous, underscore registers + // as a named module because, like jQuery, it is a base library that is + // popular enough to be bundled in a third party lib, but not be part of + // an AMD load request. Those cases could generate an error when an + // anonymous define() is called outside of a loader request. + if (typeof define === 'function' && define.amd) { + define('underscore', [], function() { + return _; + }); + } }).call(this); diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index e43a2fb654e..6a20442ed41 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,4 +1,4 @@ -@charset "UTF-8"; +@charset "utf-8"; @font-face { font-family: "mnmliconsRegular"; src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot"); @@ -2339,10 +2339,9 @@ } .openerp .oe_form .oe_form_embedded_html { position: relative; - width: 600px; - margin-left: 130px; - margin-top: 32px; - margin-bottom: 32px; + width: 100%; + margin: auto; + overflow: auto; text-align: justify; } .openerp .oe_form .oe_form_field_html .oe_input_icon { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index b19db9e4ebd..38a47eed1c5 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1893,10 +1893,9 @@ $sheet-padding: 16px overflow: hidden .oe_form_embedded_html position: relative - width: 600px - margin-left: 130px - margin-top: 32px - margin-bottom: 32px + width: 100% + margin: auto + overflow: auto text-align: justify .oe_form_field_html .oe_input_icon float: right diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 9b87d416206..8e5df84e2c3 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1337,12 +1337,13 @@ instance.web.WebClient = instance.web.Client.extend({ if (_.isEmpty(state) || state.action == "login") { self.menu.has_been_loaded.done(function() { new instance.web.Model("res.users").call("read", [self.session.uid, ["action_id"]]).done(function(data) { - var first_menu_id = self.menu.$el.find("a:first").data("menu"); - if(first_menu_id) - self.menu.menu_click(first_menu_id); - if(data.action_id) { self.action_manager.do_action(data.action_id[0]); + self.menu.open_action(data.action_id[0]); + } else { + var first_menu_id = self.menu.$el.find("a:first").data("menu"); + if(first_menu_id) + self.menu.menu_click(first_menu_id); } }); }); diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index cc595c30688..517afa7f5c2 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -221,11 +221,12 @@ instance.web.QueryGroup = instance.web.Class.extend({ {__context: {group_by: []}, __domain: []}, read_group_group); + var raw_field = grouping_field && grouping_field.split(':')[0]; var aggregates = {}; _(fixed_group).each(function (value, key) { if (key.indexOf('__') === 0 - || key === grouping_field - || key === grouping_field + '_count') { + || key === raw_field + || key === raw_field + '_count') { return; } aggregates[key] = value || 0; @@ -234,7 +235,6 @@ instance.web.QueryGroup = instance.web.Class.extend({ this.model = new instance.web.Model( model, fixed_group.__context, fixed_group.__domain); - var raw_field = grouping_field && grouping_field.split(':')[0]; var group_size = fixed_group[raw_field + '_count'] || fixed_group.__count || 0; var leaf_group = fixed_group.__context.group_by.length === 0; @@ -448,7 +448,8 @@ instance.web.DataSet = instance.web.Class.extend(instance.web.PropertiesMixin, * Read records. * * @param {Array} ids identifiers of the records to read - * @param {Array} fields fields to read and return, by default all fields are returned + * @param {Array} [fields] fields to read and return, by default all fields are returned + * @param {Object} [options] * @returns {$.Deferred} */ read_ids: function (ids, fields, options) { @@ -456,10 +457,20 @@ instance.web.DataSet = instance.web.Class.extend(instance.web.PropertiesMixin, return $.Deferred().resolve([]); options = options || {}; - // TODO: reorder results to match ids list return this._model.call('read', - [ids, fields || false], - {context: this.get_context(options.context)}); + [ids, fields || false], + {context: this.get_context(options.context)}) + .then(function (records) { + if (records.length <= 1) { return records; } + var indexes = {}; + for (var i = 0; i < ids.length; i++) { + indexes[ids[i]] = i; + } + records.sort(function (a, b) { + return indexes[a.id] - indexes[b.id]; + }); + return records; + }); }, /** * Read a slice of the records represented by this DataSet, based on its @@ -904,6 +915,10 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({ sign = -1; field = field.slice(1); } + //m2o should be searched based on value[1] not based whole value(i.e. [id, value]) + if(_.isArray(a[field]) && a[field].length == 2 && _.isString(a[field][1])){ + return sign * compare(a[field][1], b[field][1]); + } return sign * compare(a[field], b[field]); }, 0); }); diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index 2725e18ea6e..252a5a378cc 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -119,6 +119,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ if (select_exp.val()) { self.exports.unlink([parseInt(select_exp.val(), 10)]); select_exp.remove(); + self.$el.find("#fields_list option").remove(); if (self.$el.find('#saved_export_list option').length <= 1) { self.$el.find('#ExistsExportList').hide(); } @@ -166,18 +167,16 @@ instance.web.DataExport = instance.web.Dialog.extend({ export_fields: _(fields).map(function (field) { return [0, 0, {name: field}]; }) - }, function (export_list_id) { - if (!export_list_id.result) { + }).then(function (export_list_id) { + if (!export_list_id) { return; } - self.$el.find("#saved_export_list").append( - new Option(value, export_list_id.result)); - if (self.$el.find("#saved_export_list").is(":hidden")) { + if (!self.$el.find("#saved_export_list").length || self.$el.find("#saved_export_list").is(":hidden")) { self.show_exports_list(); } + self.$el.find("#saved_export_list").append( new Option(value, export_list_id) ); }); this.on_show_save_list(); - this.$el.find("#fields_list option").remove(); }, on_click: function(id, record) { var self = this; diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index b667d135bdd..7c04ad40149 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -355,7 +355,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea } }, 'autocompleteopen': function () { - this.$el.autocomplete('widget').css('z-index', 1004); + this.$el.autocomplete('widget').css('z-index', 9999); }, }, /** @@ -677,6 +677,11 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea * @returns instance.web.search.Field */ make_field: function (item, field, parent) { + // M2O combined with selection widget is pointless and broken in search views, + // but has been used in the past for unsupported hacks -> ignore it + if (field.type === "many2one" && item.attrs.widget === "selection"){ + item.attrs.widget = undefined; + } var obj = instance.web.search.fields.get_any( [item.attrs.widget, field.type]); if(obj) { return new (obj) (item, field, parent || this); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index f1fc377fa94..3dc148bc7c1 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2835,9 +2835,7 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan var def; if (this.field.type === "many2one") { var model = new openerp.Model(openerp.session, this.field.relation); - def = model.call("search", [this.get("domain")], {"context": this.build_context()}).then(function(record_ids) { - return model.call("name_get", [record_ids] , {"context": self.build_context()}); - }); + def = model.call("name_search", ['', this.get("domain")], {"context": this.build_context()}); } else { var values = _.reject(this.field.selection, function (v) { return v[0] === false && v[1] === ''; }); def = $.when(values); @@ -3127,7 +3125,8 @@ instance.web.form.CompletionFieldMixin = { if (self.options.quick_create === undefined || self.options.quick_create) { new instance.web.DataSet(this, this.field.relation, self.build_context()) .name_create(name).done(function(data) { - self.add_id(data[0]); + if (!self.get('effective_readonly')) + self.add_id(data[0]); }).fail(function(error, event) { event.preventDefault(); slow_create(); @@ -5007,7 +5006,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend this.searchview.on('search_data', self, function(domains, contexts, groupbys) { if (self.initial_ids) { self.do_search(domains.concat([[["id", "in", self.initial_ids]], self.domain]), - contexts, groupbys); + contexts.concat(self.context), groupbys); self.initial_ids = undefined; } else { self.do_search(domains.concat([self.domain]), contexts.concat(self.context), groupbys); diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index e01ab29f914..7426c70838c 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -408,6 +408,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi if (total) { var range_start = this.page * limit + 1; var range_stop = range_start - 1 + limit; + if (this.records.length) { + range_stop = range_start - 1 + this.records.length; + } if (range_stop > total) { range_stop = total; } @@ -602,7 +605,17 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi _(ids).each(function (id) { self.records.remove(self.records.get(id)); }); - self.configure_pager(self.dataset); + if (self.records.length === 0 && self.dataset.size() > 0) { + //Trigger previous manually to navigate to previous page, + //If all records are deleted on current page. + self.$pager.find('ul li:first a').trigger('click'); + } else if (self.dataset.size() == self.limit()) { + //Reload listview to update current page with next page records + //because pager going to be hidden if dataset.size == limit + self.reload(); + } else { + self.configure_pager(self.dataset); + } self.compute_aggregates(); }); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 80b82c1f40b..7ba06b69095 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -231,17 +231,24 @@ </div> <table align="center" class="db_option_table"> <tr> - <td><label for="restore_db">File:</label></td> - <td><input type="file" name="db_file" class="required" autofocus="autofocus"/></td> + <td><label for="restore_pwd">Master Password:</label></td> + <td><input type="password" name="restore_pwd" class="required" autofocus="autofocus"/></td> </tr> <tr> - <td><label for="restore_pwd">Master Password:</label></td> - <td><input type="password" name="restore_pwd" class="required"/></td> + <td><label for="restore_db">File:</label></td> + <td><input type="file" name="db_file" class="required"/></td> </tr> <tr> <td><label for="new_db">New database name:</label></td> <td><input type="text" name="new_db" class="required"/></td> </tr> + <tr> + <td><label for="mode">Mode:</label></td> + <td><select name="mode" class="required"> + <option value="restore">Backup Restore</option> + <option value="copy">Copy of an existing database</option> + </select></td> + </tr> </table> </form> <form id="db_change_password" name="change_pwd_form" style="display: none;"> diff --git a/addons/web/static/test/data.js b/addons/web/static/test/data.js index d7a957ad920..2228709e8bb 100644 --- a/addons/web/static/test/data.js +++ b/addons/web/static/test/data.js @@ -1,3 +1,32 @@ +openerp.testing.section('data.dataset', { + rpc: 'mock', + dependencies: ['web.data'], +}, function (test) { + test('read_ids', {asserts: 2}, function (instance, _, mock) { + var d = new instance.web.DataSet(null, 'foo'); + mock('foo:read', function (args) { + var ids = args[0]; + deepEqual(ids, [3, 1, 2]); + return [ + {id: 1, a: 'bar'}, + {id: 2, a: 'baz'}, + {id: 3, a: 'foo'} + ]; + }); + + return d.read_ids([3, 1, 2]).then(function (records) { + deepEqual( + records, + [ + {id: 3, a: 'foo'}, + {id: 1, a: 'bar'}, + {id: 2, a: 'baz'} + ] + ) + }); + }) +}); + openerp.testing.section('data.model.group_by', { rpc: 'mock', dependencies: ['web.data'], diff --git a/addons/web/static/test/jsonrpc.js b/addons/web/static/test/jsonrpc.js deleted file mode 100644 index 3b7140bacff..00000000000 --- a/addons/web/static/test/jsonrpc.js +++ /dev/null @@ -1,152 +0,0 @@ -(function() { - -var ropenerp = window.openerp; - -var openerp = ropenerp.declare($, _, QWeb2); - -ropenerp.testing.section('jsonrpc', {}, -function (test) { - test('basic-jsonrpc', {asserts: 1}, function () { - var session = new openerp.Session(); - return session.rpc("/gen_session_id", {}).then(function(result) { - ok(result.length > 0, "Result returned by /gen_session_id"); - }); - }); - test('basic-jsonprpc', {asserts: 1}, function () { - var session = new openerp.Session(); - session.origin_server = false; - return session.rpc("/gen_session_id", {}).then(function(result) { - ok(result.length > 0, "Result returned by /gen_session_id"); - }); - }); - // desactivated because the phantomjs runner crash - /*test('basic-jsonprpc2', {asserts: 1}, function () { - var session = new openerp.Session(); - session.origin_server = false; - return session.rpc("/gen_session_id", {}, {force2step: true}).then(function(result) { - ok(result.length > 0, "Result returned by /gen_session_id"); - }); - });*/ - test('session-jsonrpc', {asserts: 2}, function () { - var session = new openerp.Session(); - var tmp = _.uniqueId("something"); - return session.rpc("/web/tests/set_session_value", {value: tmp}).then(function() { - ok(true, "set_session returned"); - return session.rpc("/web/tests/get_session_value", {}); - }).then(function(result) { - equal(result, tmp, "Got the same value from the session"); - }); - }); - test('session-jsonprpc', {asserts: 2}, function () { - var session = new openerp.Session(); - session.origin_server = false; - var tmp = _.uniqueId("something"); - return session.rpc("/web/tests/set_session_value", {value: tmp}).then(function() { - ok(true, "set_session returned"); - return session.rpc("/web/tests/get_session_value", {}); - }).then(function(result) { - equal(result, tmp, "Got the same value from the session"); - }); - }); - // desactivated because the phantomjs runner crash - /*test('session-jsonprpc2', {asserts: 2}, function () { - var session = new openerp.Session(); - session.origin_server = false; - var tmp = _.uniqueId("something"); - return session.rpc("/web/tests/set_session_value", {value: tmp}, {force2step: true}).then(function() { - ok(true, "set_session returned"); - return session.rpc("/web/tests/get_session_value", {}, {force2step: true}); - }).then(function(result) { - equal(result, tmp, "Got the same value from the session"); - }); - });*/ - test('overridesession-jsonrpc', {asserts: 4}, function () { - var origin_session = new openerp.Session(); - var origin_tmp = _.uniqueId("something"); - var session = new openerp.Session(null, null, {override_session: true}); - var tmp = _.uniqueId("something_else"); - return session.rpc("/web/tests/set_session_value", {value: tmp}).then(function() { - ok(true, "set_session returned"); - return origin_session.rpc("/web/tests/set_session_value", {value: origin_tmp}); - }).then(function(result) { - ok(true, "set_session on origin returned"); - return session.rpc("/web/tests/get_session_value", {}); - }).then(function(result) { - equal(result, tmp, "Got the same value from the session"); - notEqual(result, origin_tmp, "Values in the different sessions should be different"); - }); - }); - test('overridesession-jsonprpc', {asserts: 4}, function () { - var origin_session = new openerp.Session(); - var origin_tmp = _.uniqueId("something"); - var session = new openerp.Session(null, null, {override_session: true}); - var tmp = _.uniqueId("something_else"); - session.origin_server = false; - return session.rpc("/web/tests/set_session_value", {value: tmp}).then(function() { - ok(true, "set_session returned"); - return origin_session.rpc("/web/tests/set_session_value", {value: origin_tmp}); - }).then(function(result) { - ok(true, "set_session on origin returned"); - return session.rpc("/web/tests/get_session_value", {}); - }).then(function(result) { - equal(result, tmp, "Got the same value from the session"); - notEqual(result, origin_tmp, "Values in the different sessions should be different"); - }); - }); - // desactivated because the phantomjs runner crash - /*test('overridesession-jsonprpc2', {asserts: 4}, function () { - var origin_session = new openerp.Session(); - var origin_tmp = _.uniqueId("something"); - var session = new openerp.Session(null, null, {override_session: true}); - var tmp = _.uniqueId("something_else"); - session.origin_server = false; - return session.rpc("/web/tests/set_session_value", {value: tmp}, {force2step: true}).then(function() { - ok(true, "set_session returned"); - return origin_session.rpc("/web/tests/set_session_value", {value: origin_tmp}); - }).then(function(result) { - ok(true, "set_session on origin returned"); - return session.rpc("/web/tests/get_session_value", {}, {force2step: true}); - }).then(function(result) { - equal(result, tmp, "Got the same value from the session"); - notEqual(result, origin_tmp, "Values in the different sessions should be different"); - }); - });*/ - test('timeout-jsonrpc', {asserts: 1}, function () { - var session = new openerp.Session(); - return session.rpc("/gen_session_id", {}, {timeout: 1}).then(function() { - ok(false, "the request incorrectly succeeded"); - return $.when(); - }, function(a, e) { - e.preventDefault(); - ok(true, "the request correctly failed"); - return $.when(); - }); - }); - test('timeout-jsonprpc', {asserts: 1}, function () { - var session = new openerp.Session(); - session.origin_server = false; - return session.rpc("/gen_session_id", {}, {timeout: 1}).then(function() { - ok(false, "the request incorrectly succeeded"); - return $.when(); - }, function(a, e) { - e.preventDefault(); - ok(true, "the request correctly failed"); - return $.when(); - }); - }); - // desactivated because the phantomjs runner crash - /*test('timeout-jsonprpc2', {asserts: 1}, function () { - var session = new openerp.Session(); - session.origin_server = false; - return session.rpc("/gen_session_id", {}, {force2step: true, timeout: 1}).then(function() { - ok(false, "the request incorrectly succeeded"); - return $.when(); - }, function(a, e) { - e.preventDefault(); - ok(true, "the request correctly failed"); - return $.when(); - }); - });*/ -}); - -})(); diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml index 8964252df86..46bae5f83ca 100644 --- a/addons/web/views/webclient_templates.xml +++ b/addons/web/views/webclient_templates.xml @@ -102,7 +102,7 @@ <div class="form-group field-password"> <label for="password" class="control-label">Password</label> - <input type="password" name="password" id="password" class="form-control" required="required"/> + <input type="password" name="password" id="password" class="form-control" required="required" t-att-autofocus="'autofocus' if login else None"/> </div> <p class="alert alert-danger" t-if="error"> |
