diff --git a/addons/web/__openerp__.py b/addons/web/__openerp__.py index 9e8e258dedc..3d9d1a4333d 100644 --- a/addons/web/__openerp__.py +++ b/addons/web/__openerp__.py @@ -3,8 +3,10 @@ "category": "Hidden", "description": """ - OpenERP Web core module. - This module provides the core of the OpenERP Web Client. +OpenERP Web core module. +======================== + +This module provides the core of the OpenERP Web Client. """, "depends" : [], 'auto_install': True, @@ -20,6 +22,7 @@ "static/lib/jquery.form/jquery.form.js", "static/lib/jquery.validate/jquery.validate.js", "static/lib/jquery.ba-bbq/jquery.ba-bbq.js", + "static/lib/spinjs/spin.js", "static/lib/jquery.blockUI/jquery.blockUI.js", "static/lib/jquery.ui/js/jquery-ui-1.8.17.custom.min.js", "static/lib/jquery.ui.timepicker/js/jquery-ui-timepicker-addon.js", diff --git a/addons/web/common/http.py b/addons/web/common/http.py index bb87d719bad..f1426d76d27 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -425,11 +425,14 @@ class DisableCacheMiddleware(object): def start_wrapped(status, headers): referer = environ.get('HTTP_REFERER', '') parsed = urlparse.urlparse(referer) - debug = not urlparse.parse_qs(parsed.query).has_key('debug') - filtered_headers = [(k,v) for k,v in headers if not (k=='Last-Modified' or (debug and k=='Cache-Control'))] + debug = parsed.query.count('debug') >= 1 + nh = dict(headers) + if 'Last-Modified' in nh: del nh['Last-Modified'] if debug: - filtered_headers.append(('Cache-Control', 'no-cache')) - start_response(status, filtered_headers) + if 'Expires' in nh: del nh['Expires'] + if 'Etag' in nh: del nh['Etag'] + nh['Cache-Control'] = 'no-cache' + start_response(status, nh.items()) return self.app(environ, start_wrapped) class Root(object): diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 7f9710f8aa6..e4c576fecae 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -194,9 +194,12 @@ class WebClient(openerpweb.Controller): if mods is not None: path += '?mods=' + mods return [path] - # old code to force cache reloading - #return ['%s?debug=%s' % (wp, os.path.getmtime(fp)) for fp, wp in self.manifest_glob(req, mods, extension)] - return [el[1] for el in self.manifest_glob(req, mods, extension)] + no_sugar = req.httprequest.environ["QUERY_STRING"].count("no_sugar") >= 1 + no_sugar = no_sugar or req.httprequest.environ.get('HTTP_REFERER', '').count("no_sugar") >= 1 + if not no_sugar: + return ['%s?debug=%s' % (wp, os.path.getmtime(fp)) for fp, wp in self.manifest_glob(req, mods, extension)] + else: + return [el[1] for el in self.manifest_glob(req, mods, extension)] @openerpweb.jsonrequest def csslist(self, req, mods=None): @@ -994,6 +997,16 @@ class DataSet(openerpweb.Controller): elif isinstance(kwargs[k], common.nonliterals.BaseDomain): kwargs[k] = req.session.eval_domain(kwargs[k]) + # Temporary implements future display_name special field for model#read() + if method == 'read' and kwargs.get('context') and kwargs['context'].get('future_display_name'): + if 'display_name' in args[1]: + names = req.session.model(model).name_get(args[0], **kwargs) + args[1].remove('display_name') + r = getattr(req.session.model(model), method)(*args, **kwargs) + for i in range(len(r)): + r[i]['display_name'] = names[i][1] or "%s#%d" % (model, names[i][0]) + return r + return getattr(req.session.model(model), method)(*args, **kwargs) @openerpweb.jsonrequest diff --git a/addons/web/i18n/fr_CA.po b/addons/web/i18n/fr_CA.po index f6426975e7d..327e221c0e9 100644 --- a/addons/web/i18n/fr_CA.po +++ b/addons/web/i18n/fr_CA.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-07-25 04:52+0000\n" +"X-Launchpad-Export-Date: 2012-07-26 04:50+0000\n" "X-Generator: Launchpad (build 15679)\n" #. openerp-web diff --git a/addons/web/i18n/pt_BR.po b/addons/web/i18n/pt_BR.po index 789202e6474..b76288d0387 100644 --- a/addons/web/i18n/pt_BR.po +++ b/addons/web/i18n/pt_BR.po @@ -8,179 +8,183 @@ msgstr "" "Project-Id-Version: openerp-web\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-07-02 09:06+0200\n" -"PO-Revision-Date: 2012-02-16 01:36+0000\n" -"Last-Translator: Rafael Sales - http://www.tompast.com.br \n" +"PO-Revision-Date: 2012-07-30 00:28+0000\n" +"Last-Translator: Fábio Martinelli \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-07-03 05:54+0000\n" -"X-Generator: Launchpad (build 15531)\n" +"X-Launchpad-Export-Date: 2012-07-31 05:10+0000\n" +"X-Generator: Launchpad (build 15702)\n" #. openerp-web -#: addons/web/static/src/js/chrome.js:170 -#: addons/web/static/src/js/chrome.js:196 -#: addons/web/static/src/js/chrome.js:364 -#: addons/web/static/src/js/view_form.js:531 -#: addons/web/static/src/js/view_form.js:1665 -#: addons/web/static/src/xml/base.xml:1641 +#: addons/web/static/src/js/chrome.js:176 +#: addons/web/static/src/js/chrome.js:202 +#: addons/web/static/src/js/chrome.js:380 +#: addons/web/static/src/js/view_form.js:457 +#: addons/web/static/src/js/view_form.js:1292 +#: addons/web/static/src/xml/base.xml:1701 msgid "Ok" msgstr "Ok" #. openerp-web -#: addons/web/static/src/js/chrome.js:178 +#: addons/web/static/src/js/chrome.js:184 msgid "Send OpenERP Enterprise Report" msgstr "Enviar Relatório OpenERP Enterprise" #. openerp-web -#: addons/web/static/src/js/chrome.js:192 +#: addons/web/static/src/js/chrome.js:198 msgid "Dont send" msgstr "Não enviar" #. openerp-web -#: addons/web/static/src/js/chrome.js:212 -#: addons/web/static/src/js/chrome.js:914 +#: addons/web/static/src/js/chrome.js:1119 msgid "Client Error" msgstr "Erro no aplicativo cliente" #. openerp-web -#: addons/web/static/src/js/chrome.js:253 +#: addons/web/static/src/js/chrome.js:260 #, python-format msgid "Loading (%d)" msgstr "Carregando (%d)" #. openerp-web -#: addons/web/static/src/js/chrome.js:276 +#: addons/web/static/src/js/chrome.js:292 msgid "Invalid database name" msgstr "Nome de banco de dados inválido" #. openerp-web -#: addons/web/static/src/js/chrome.js:402 +#: addons/web/static/src/js/chrome.js:455 msgid "Backed" msgstr "Copiado" #. openerp-web -#: addons/web/static/src/js/chrome.js:402 +#: addons/web/static/src/js/chrome.js:456 msgid "Database backed up successfully" msgstr "Backup do banco de dado realizado com sucesso" #. openerp-web -#: addons/web/static/src/js/chrome.js:442 +#: addons/web/static/src/js/chrome.js:499 msgid "Restored" msgstr "Restaurado" #. openerp-web -#: addons/web/static/src/js/chrome.js:442 +#: addons/web/static/src/js/chrome.js:499 msgid "Database restored successfully" msgstr "Banco de dados restaurado com sucesso" #. openerp-web -#: addons/web/static/src/js/chrome.js:735 -#: addons/web/static/src/xml/base.xml:259 -#: addons/web/static/src/xml/base.xml:367 +#: addons/web/static/src/js/chrome.js:783 +#: addons/web/static/src/xml/base.xml:226 +#: addons/web/static/src/xml/base.xml:1735 msgid "Change Password" msgstr "Alterar Senha" #. openerp-web -#: addons/web/static/src/js/chrome.js:809 -#: addons/web/static/src/xml/base.xml:326 +#: addons/web/static/src/js/chrome.js:759 +#: addons/web/static/src/xml/base.xml:356 msgid "Preferences" msgstr "Preferências" #. openerp-web -#: addons/web/static/src/js/chrome.js:812 +#: addons/web/static/src/js/chrome.js:763 msgid "Change password" msgstr "Alterar Senha" #. openerp-web -#: addons/web/static/src/js/chrome.js:813 -#: addons/web/static/src/js/view_editor.js:96 -#: addons/web/static/src/js/view_editor.js:832 -#: addons/web/static/src/js/view_editor.js:960 -#: addons/web/static/src/js/view_form.js:1660 -#: addons/web/static/src/xml/base.xml:1468 -#: addons/web/static/src/xml/base.xml:1478 +#: addons/web/static/src/js/chrome.js:762 +#: addons/web/static/src/js/search.js:241 +#: addons/web/static/src/js/search.js:300 +#: addons/web/static/src/js/view_editor.js:95 +#: addons/web/static/src/js/view_editor.js:836 +#: addons/web/static/src/js/view_editor.js:962 +#: addons/web/static/src/js/view_form.js:1287 +#: addons/web/static/src/xml/base.xml:743 +#: addons/web/static/src/xml/base.xml:1502 +#: addons/web/static/src/xml/base.xml:1512 +#: addons/web/static/src/xml/base.xml:1521 msgid "Cancel" msgstr "Cancelar" #. openerp-web -#: addons/web/static/src/js/chrome.js:814 -#: addons/web/static/src/js/view_editor.js:74 -#: addons/web/static/src/js/views.js:899 addons/web/static/src/xml/base.xml:687 -#: addons/web/static/src/xml/base.xml:1384 -#: addons/web/static/src/xml/base.xml:1472 +#: addons/web/static/src/js/chrome.js:764 +#: addons/web/static/src/js/view_editor.js:73 +#: addons/web/static/src/js/views.js:967 addons/web/static/src/xml/base.xml:742 +#: addons/web/static/src/xml/base.xml:1506 +#: addons/web/static/src/xml/base.xml:1520 msgid "Save" msgstr "Salvar" #. openerp-web -#: addons/web/static/src/js/chrome.js:839 +#: addons/web/static/src/js/chrome.js:680 +#: addons/web/static/src/xml/base.xml:359 msgid "About" msgstr "Sobre" #. openerp-web -#: addons/web/static/src/js/chrome.js:856 +#: addons/web/static/src/js/chrome.js:1052 msgid "OpenERP - Unsupported/Community Version" -msgstr "OpenERP - Versão da Comunidade/Não Suportada" +msgstr "Versão da Comunidade - Sem suporte oficial da OpenERP S/A" #. openerp-web #: addons/web/static/src/js/coresetup.js:619 msgid "less than a minute ago" -msgstr "" +msgstr "menos de um minuto atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:620 msgid "about a minute ago" -msgstr "" +msgstr "por volta de um minuto atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:621 #, python-format msgid "%d minutes ago" -msgstr "" +msgstr "%d minutos atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:622 msgid "about an hour ago" -msgstr "" +msgstr "por volta de uma hora atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:623 #, python-format msgid "%d hours ago" -msgstr "" +msgstr "%d horas atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:624 msgid "a day ago" -msgstr "" +msgstr "há um dia" #. openerp-web #: addons/web/static/src/js/coresetup.js:625 #, python-format msgid "%d days ago" -msgstr "" +msgstr "%d dias atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:626 msgid "about a month ago" -msgstr "" +msgstr "por volta de um mês atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:627 #, python-format msgid "%d months ago" -msgstr "" +msgstr "%d meses atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:628 msgid "about a year ago" -msgstr "" +msgstr "por volta de um ano atrás" #. openerp-web #: addons/web/static/src/js/coresetup.js:629 #, python-format msgid "%d years ago" -msgstr "" +msgstr "%d anos atrás" #. openerp-web #: addons/web/static/src/js/data_export.js:6 @@ -191,10 +195,10 @@ msgstr "Exportar Dados" #: addons/web/static/src/js/data_export.js:19 #: addons/web/static/src/js/data_import.js:70 #: addons/web/static/src/js/view_editor.js:49 -#: addons/web/static/src/js/view_editor.js:399 -#: addons/web/static/src/js/view_form.js:891 -#: addons/web/static/src/js/view_form.js:3901 -#: addons/web/static/src/js/views.js:900 +#: addons/web/static/src/js/view_editor.js:398 +#: addons/web/static/src/js/view_form.js:734 +#: addons/web/static/src/js/view_form.js:3298 +#: addons/web/static/src/js/views.js:968 msgid "Close" msgstr "Fechar" @@ -204,17 +208,17 @@ msgid "Export To File" msgstr "Exportar para Arquivo" #. openerp-web -#: addons/web/static/src/js/data_export.js:125 +#: addons/web/static/src/js/data_export.js:126 msgid "Please enter save field list name" msgstr "Por favor, entre o nome da lista de campos salva" #. openerp-web -#: addons/web/static/src/js/data_export.js:360 +#: addons/web/static/src/js/data_export.js:362 msgid "Please select fields to save export list..." msgstr "Por favor, selecione os campos para salvar na lista de exportação" #. openerp-web -#: addons/web/static/src/js/data_export.js:373 +#: addons/web/static/src/js/data_export.js:375 msgid "Please select fields to export..." msgstr "Por favor, selecione os campos para exportar..." @@ -239,42 +243,44 @@ msgid "" "Destination fields should only be selected once, some fields are selected " "more than once:" msgstr "" +"Campos de destino devem ser selecionados apenas uma vez, alguns campos foram " +"selecionados mais de uma vez:" #. openerp-web #: addons/web/static/src/js/data_import.js:383 msgid "*Required Fields are not selected :" -msgstr "" +msgstr "*Campos Obrigatórios não selecionados :" #. openerp-web -#: addons/web/static/src/js/formats.js:141 +#: addons/web/static/src/js/formats.js:139 #, python-format msgid "(%d records)" -msgstr "" +msgstr "(%d registos)" #. openerp-web -#: addons/web/static/src/js/formats.js:327 -#: addons/web/static/src/js/view_form.js:4301 +#: addons/web/static/src/js/formats.js:325 +#: addons/web/static/src/js/view_page.js:268 msgid "Download" msgstr "Download" #. openerp-web -#: addons/web/static/src/js/formats.js:332 +#: addons/web/static/src/js/formats.js:330 #, python-format msgid "Download \"%s\"" msgstr "Download \"%s\"" #. openerp-web -#: addons/web/static/src/js/search.js:798 +#: addons/web/static/src/js/search.js:437 msgid "Invalid Search" msgstr "Pesquisa Inválida" #. openerp-web -#: addons/web/static/src/js/search.js:798 +#: addons/web/static/src/js/search.js:437 msgid "triggered from search view" msgstr "desencadeada a partir da visão de busca" #. openerp-web -#: addons/web/static/src/js/search.js:839 +#: addons/web/static/src/js/search.js:528 #, python-format msgid "Incorrect value for field %(fieldname)s: [%(value)s] is %(message)s" msgstr "Valor incorreto para campo %(fieldname)s: [%(value)s] é %(message)s" @@ -283,48 +289,48 @@ msgstr "Valor incorreto para campo %(fieldname)s: [%(value)s] é %(message)s" #: addons/web/static/src/js/search.js:948 #, python-format msgid "Filter on: %s" -msgstr "" +msgstr "Filtrar por: %s" #. openerp-web #: addons/web/static/src/js/search.js:999 msgid "Filter" -msgstr "" +msgstr "Filtrar" #. openerp-web #: addons/web/static/src/js/search.js:1108 #, python-format msgid "Group by: %s" -msgstr "" +msgstr "Agrupar por: %s" #. openerp-web #: addons/web/static/src/js/search.js:1132 msgid "GroupBy" -msgstr "" +msgstr "AgruparPor" #. openerp-web #: addons/web/static/src/js/search.js:1267 #, python-format msgid "Search %(field)s for: %(value)s" -msgstr "" +msgstr "Procurar %(field)s por: %(value)s" #. openerp-web -#: addons/web/static/src/js/search.js:1301 +#: addons/web/static/src/js/search.js:869 msgid "not a valid integer" msgstr "não é um número inteiro válido" #. openerp-web -#: addons/web/static/src/js/search.js:1315 +#: addons/web/static/src/js/search.js:883 msgid "not a valid number" msgstr "não é um número válido" #. openerp-web -#: addons/web/static/src/js/search.js:1398 -#: addons/web/static/src/xml/base.xml:840 +#: addons/web/static/src/js/search.js:962 +#: addons/web/static/src/xml/base.xml:973 msgid "Yes" msgstr "Sim" #. openerp-web -#: addons/web/static/src/js/search.js:1399 +#: addons/web/static/src/js/search.js:963 msgid "No" msgstr "Não" @@ -332,97 +338,106 @@ msgstr "Não" #: addons/web/static/src/js/search.js:1416 #, python-format msgid "Search %(field)s at: %(value)s" -msgstr "" +msgstr "Procurar %(field)s em: %(value)s" #. openerp-web -#: addons/web/static/src/js/search.js:1622 -#: addons/web/static/src/xml/base.xml:1229 +#: addons/web/static/src/xml/base.xml:1286 msgid "Filters" msgstr "Filtros" #. openerp-web #: addons/web/static/src/js/search.js:1762 msgid "Advanced" -msgstr "" +msgstr "Avançado" #. openerp-web #: addons/web/static/src/js/search.js:1853 #, python-format msgid "%(field)s %(operator)s \"%(value)s\"" -msgstr "" +msgstr "%(field)s %(operator)s \"%(value)s\"" #. openerp-web -#: addons/web/static/src/js/search.js:1888 +#: addons/web/static/src/js/search.js:1341 msgid "contains" msgstr "contém" #. openerp-web -#: addons/web/static/src/js/search.js:1889 +#: addons/web/static/src/js/search.js:1342 msgid "doesn't contain" msgstr "não contém" #. openerp-web -#: addons/web/static/src/js/search.js:1890 -#: addons/web/static/src/js/search.js:1900 -#: addons/web/static/src/js/search.js:1928 -#: addons/web/static/src/js/search.js:1952 +#: addons/web/static/src/js/search.js:1343 +#: addons/web/static/src/js/search.js:1359 +#: addons/web/static/src/js/search.js:1380 +#: addons/web/static/src/js/search.js:1401 +#: addons/web/static/src/js/search.js:1424 msgid "is equal to" msgstr "é igual a" #. openerp-web -#: addons/web/static/src/js/search.js:1891 -#: addons/web/static/src/js/search.js:1901 -#: addons/web/static/src/js/search.js:1929 -#: addons/web/static/src/js/search.js:1953 +#: addons/web/static/src/js/search.js:1344 +#: addons/web/static/src/js/search.js:1360 +#: addons/web/static/src/js/search.js:1381 +#: addons/web/static/src/js/search.js:1402 +#: addons/web/static/src/js/search.js:1425 msgid "is not equal to" msgstr "é diferente de" #. openerp-web -#: addons/web/static/src/js/search.js:1902 -#: addons/web/static/src/js/search.js:1930 -#: addons/web/static/src/js/search.js:1954 +#: addons/web/static/src/js/search.js:1345 +#: addons/web/static/src/js/search.js:1361 +#: addons/web/static/src/js/search.js:1382 +#: addons/web/static/src/js/search.js:1403 +#: addons/web/static/src/js/search.js:1426 msgid "greater than" msgstr "maior que" #. openerp-web -#: addons/web/static/src/js/search.js:1903 -#: addons/web/static/src/js/search.js:1931 -#: addons/web/static/src/js/search.js:1955 +#: addons/web/static/src/js/search.js:1346 +#: addons/web/static/src/js/search.js:1362 +#: addons/web/static/src/js/search.js:1383 +#: addons/web/static/src/js/search.js:1404 +#: addons/web/static/src/js/search.js:1427 msgid "less than" msgstr "menor que" #. openerp-web -#: addons/web/static/src/js/search.js:1904 -#: addons/web/static/src/js/search.js:1932 -#: addons/web/static/src/js/search.js:1956 +#: addons/web/static/src/js/search.js:1347 +#: addons/web/static/src/js/search.js:1363 +#: addons/web/static/src/js/search.js:1384 +#: addons/web/static/src/js/search.js:1405 +#: addons/web/static/src/js/search.js:1428 msgid "greater or equal than" msgstr "maior ou igual a" #. openerp-web -#: addons/web/static/src/js/search.js:1905 -#: addons/web/static/src/js/search.js:1933 -#: addons/web/static/src/js/search.js:1957 +#: addons/web/static/src/js/search.js:1348 +#: addons/web/static/src/js/search.js:1364 +#: addons/web/static/src/js/search.js:1385 +#: addons/web/static/src/js/search.js:1406 +#: addons/web/static/src/js/search.js:1429 msgid "less or equal than" msgstr "menor ou igual a" #. openerp-web -#: addons/web/static/src/js/search.js:1947 -#: addons/web/static/src/js/search.js:1973 +#: addons/web/static/src/js/search.js:1419 +#: addons/web/static/src/js/search.js:1444 msgid "is" msgstr "é" #. openerp-web -#: addons/web/static/src/js/search.js:1974 +#: addons/web/static/src/js/search.js:1445 msgid "is not" msgstr "não é" #. openerp-web -#: addons/web/static/src/js/search.js:1988 +#: addons/web/static/src/js/search.js:1459 msgid "is true" msgstr "é verdadeiro" #. openerp-web -#: addons/web/static/src/js/search.js:1989 +#: addons/web/static/src/js/search.js:1460 msgid "is false" msgstr "é falso" @@ -435,195 +450,194 @@ msgstr "Administrar Visões (%s)" #. openerp-web #: addons/web/static/src/js/view_editor.js:46 #: addons/web/static/src/js/view_list.js:17 -#: addons/web/static/src/xml/base.xml:121 -#: addons/web/static/src/xml/base.xml:164 -#: addons/web/static/src/xml/base.xml:684 +#: addons/web/static/src/xml/base.xml:100 +#: addons/web/static/src/xml/base.xml:327 +#: addons/web/static/src/xml/base.xml:761 msgid "Create" msgstr "Criar" #. openerp-web #: addons/web/static/src/js/view_editor.js:47 -#: addons/web/static/src/xml/base.xml:456 -#: addons/web/static/src/xml/base.xml:683 +#: addons/web/static/src/xml/base.xml:483 +#: addons/web/static/src/xml/base.xml:760 msgid "Edit" msgstr "Editar" #. openerp-web #: addons/web/static/src/js/view_editor.js:48 -#: addons/web/static/src/xml/base.xml:1595 +#: addons/web/static/src/xml/base.xml:1653 msgid "Remove" msgstr "Remover" #. openerp-web -#: addons/web/static/src/js/view_editor.js:72 +#: addons/web/static/src/js/view_editor.js:71 #, python-format msgid "Create a view (%s)" msgstr "Criar a visão (%s)" #. openerp-web -#: addons/web/static/src/js/view_editor.js:169 +#: addons/web/static/src/js/view_editor.js:168 msgid "Do you really want to remove this view?" msgstr "Deseja remover essa visão?" #. openerp-web -#: addons/web/static/src/js/view_editor.js:365 +#: addons/web/static/src/js/view_editor.js:364 #, python-format msgid "View Editor %d - %s" msgstr "Editar Visão %d - %s" #. openerp-web -#: addons/web/static/src/js/view_editor.js:368 +#: addons/web/static/src/js/view_editor.js:367 msgid "Inherited View" msgstr "View herdada" #. openerp-web -#: addons/web/static/src/js/view_editor.js:372 +#: addons/web/static/src/js/view_editor.js:371 msgid "Do you really wants to create an inherited view here?" msgstr "Quer realmente criar uma view herdada aqui?" #. openerp-web -#: addons/web/static/src/js/view_editor.js:382 +#: addons/web/static/src/js/view_editor.js:381 msgid "Preview" msgstr "Pré-visualizar" #. openerp-web -#: addons/web/static/src/js/view_editor.js:502 +#: addons/web/static/src/js/view_editor.js:501 msgid "Do you really want to remove this node?" msgstr "Deseja remover esse nó?" #. openerp-web -#: addons/web/static/src/js/view_editor.js:811 -#: addons/web/static/src/js/view_editor.js:937 +#: addons/web/static/src/js/view_editor.js:815 +#: addons/web/static/src/js/view_editor.js:939 msgid "Properties" msgstr "Propriedades" #. openerp-web -#: addons/web/static/src/js/view_editor.js:814 -#: addons/web/static/src/js/view_editor.js:940 +#: addons/web/static/src/js/view_editor.js:818 +#: addons/web/static/src/js/view_editor.js:942 msgid "Update" msgstr "Atualizar" #. openerp-web -#: addons/web/static/src/js/view_form.js:43 +#: addons/web/static/src/js/view_form.js:16 +#: addons/web/static/src/js/view_form.js:210 msgid "Form" msgstr "Formulário" #. openerp-web -#: addons/web/static/src/js/view_form.js:147 -#: addons/web/static/src/js/view_list.js:358 -#: addons/web/static/src/xml/base.xml:1653 +#: addons/web/static/src/xml/base.xml:632 +#: addons/web/static/src/xml/base.xml:763 +#: addons/web/static/src/xml/base.xml:1714 msgid "Delete" msgstr "Excluir" #. openerp-web -#: addons/web/static/src/js/view_form.js:148 +#: addons/web/static/src/xml/base.xml:762 msgid "Duplicate" msgstr "Duplicar" #. openerp-web -#: addons/web/static/src/js/view_form.js:149 -#: addons/web/static/src/js/view_form.js:885 +#: addons/web/static/src/js/view_form.js:133 +#: addons/web/static/src/js/view_form.js:728 msgid "Set Default" msgstr "Definir como Padrão" #. openerp-web -#: addons/web/static/src/js/view_form.js:643 +#: addons/web/static/src/js/view_page.js:59 msgid "Do you really want to delete this record?" msgstr "Deseja remover esse registro?" #. openerp-web -#: addons/web/static/src/js/view_form.js:657 +#: addons/web/static/src/js/view_form.js:508 msgid "" "Warning, the record has been modified, your changes will be discarded." msgstr "Aviso, o registro foi modificado, suas alterações serão descartadas." #. openerp-web -#: addons/web/static/src/js/view_form.js:892 +#: addons/web/static/src/js/view_form.js:735 msgid "Save default" msgstr "Salvar padrão" #. openerp-web -#: addons/web/static/src/js/view_form.js:1402 +#: addons/web/static/src/js/view_form.js:867 #, python-format msgid "Unknown operator %s in domain %s" msgstr "Operador desconhecido %s no domínio %s" #. openerp-web -#: addons/web/static/src/js/view_form.js:1410 +#: addons/web/static/src/js/view_form.js:875 #, python-format msgid "Unknown field %s in domain %s" msgstr "Campo desconhecido %s no domínio %s" #. openerp-web -#: addons/web/static/src/js/view_form.js:1448 +#: addons/web/static/src/js/view_form.js:913 #, python-format msgid "Unsupported operator %s in domain %s" msgstr "Operador não suportado %s no domínio %s" #. openerp-web -#: addons/web/static/src/js/view_form.js:1657 +#: addons/web/static/src/js/view_form.js:1284 msgid "Confirm" msgstr "Confirmar" #. openerp-web -#: addons/web/static/src/js/view_form.js:2478 +#: addons/web/static/src/js/view_form.js:2193 msgid "   Search More..." msgstr "   Procurar Mais..." #. openerp-web -#: addons/web/static/src/js/view_form.js:2488 +#: addons/web/static/src/js/view_form.js:2211 #, python-format msgid "   Create \"%s\"" msgstr "   Criar \"%s\"" #. openerp-web -#: addons/web/static/src/js/view_form.js:2494 +#: addons/web/static/src/js/view_form.js:2217 msgid "   Create and Edit..." msgstr "   Criar e Editar..." #. openerp-web -#: addons/web/static/src/js/view_form.js:2527 +#: addons/web/static/src/js/view_form.js:2250 +#: addons/web/static/src/js/views.js:680 msgid "Search: " msgstr "Pesquisar: " #. openerp-web -#: addons/web/static/src/js/view_form.js:2527 -#: addons/web/static/src/js/view_form.js:3210 +#: addons/web/static/src/js/view_form.js:2250 +#: addons/web/static/src/js/view_form.js:2738 msgid "Create: " msgstr "Criar: " #. openerp-web -#: addons/web/static/src/js/view_form.js:2596 -#: addons/web/static/src/js/view_form.js:3125 -#: addons/web/static/src/js/view_form.js:3238 -#: addons/web/static/src/js/view_form.js:3586 -#: addons/web/static/src/js/view_form.js:3702 +#: addons/web/static/src/js/view_form.js:2040 +#: addons/web/static/src/js/view_form.js:2766 +#: addons/web/static/src/js/view_form.js:2991 msgid "Open: " msgstr "Aberto: " #. openerp-web -#: addons/web/static/src/js/view_form.js:3517 -#: addons/web/static/src/js/view_form.js:3644 -#: addons/web/static/src/xml/base.xml:1184 -#: addons/web/static/src/xml/base.xml:1594 +#: addons/web/static/src/js/view_form.js:2911 +#: addons/web/static/src/xml/base.xml:755 +#: addons/web/static/src/xml/base.xml:777 +#: addons/web/static/src/xml/base.xml:1652 msgid "Add" msgstr "Adicionar" #. openerp-web -#: addons/web/static/src/js/view_form.js:3566 -#: addons/web/static/src/js/view_form.js:3684 +#: addons/web/static/src/js/view_form.js:2971 msgid "Add: " msgstr "Adicionar: " #. openerp-web #: addons/web/static/src/js/view_form.js:4230 msgid "Save As..." -msgstr "" +msgstr "Salvar como..." #. openerp-web #: addons/web/static/src/js/view_form.js:4230 msgid "The field is empty, there's nothing to save !" -msgstr "" +msgstr "O campo está vazio, não tem nada para salvar!" #. openerp-web #: addons/web/static/src/js/view_list.js:8 @@ -631,51 +645,49 @@ msgid "List" msgstr "Lista" #. openerp-web -#: addons/web/static/src/js/view_list.js:338 +#: addons/web/static/src/js/view_list.js:277 msgid "Unlimited" msgstr "Ilimitado" #. openerp-web -#: addons/web/static/src/js/view_list.js:356 -#: addons/web/static/src/xml/base.xml:622 -#: addons/web/static/src/xml/base.xml:1657 +#: addons/web/static/src/js/views.js:819 +#: addons/web/static/src/xml/base.xml:1742 msgid "Import" msgstr "Importar" #. openerp-web -#: addons/web/static/src/js/view_list.js:357 -#: addons/web/static/src/xml/base.xml:1554 +#: addons/web/static/src/js/views.js:822 +#: addons/web/static/src/xml/base.xml:1612 msgid "Export" msgstr "Exportar" #. openerp-web -#: addons/web/static/src/js/view_list.js:436 +#: addons/web/static/src/js/view_list.js:374 msgid "Group" msgstr "Grupo" #. openerp-web -#: addons/web/static/src/js/view_list.js:623 +#: addons/web/static/src/js/view_list.js:549 msgid "Do you really want to remove these records?" msgstr "Deseja remover esse registro?" #. openerp-web -#: addons/web/static/src/js/view_list.js:716 -#: addons/web/static/src/js/views.js:820 +#: addons/web/static/src/js/views.js:925 msgid "Warning" msgstr "Atenção" #. openerp-web #: addons/web/static/src/js/view_list.js:716 msgid "You must select at least one record." -msgstr "" +msgstr "Você precisa selecionar ao menos um registro." #. openerp-web -#: addons/web/static/src/js/view_list.js:1332 +#: addons/web/static/src/js/view_list.js:1243 msgid "Undefined" msgstr "Indefinida" #. openerp-web -#: addons/web/static/src/js/view_list.js:1428 +#: addons/web/static/src/js/view_list.js:1342 #, python-format msgid "%(page)d/%(page_count)d" msgstr "%(page)d/%(page_count)d" @@ -686,84 +698,84 @@ msgid "Tree" msgstr "Árvore" #. openerp-web -#: addons/web/static/src/js/views.js:566 addons/web/static/src/xml/base.xml:452 +#: addons/web/static/src/js/views.js:570 addons/web/static/src/xml/base.xml:480 msgid "Fields View Get" msgstr "Fields View Get" #. openerp-web -#: addons/web/static/src/js/views.js:574 +#: addons/web/static/src/js/views.js:578 #, python-format msgid "View Log (%s)" msgstr "Ver o Log (%s)" #. openerp-web -#: addons/web/static/src/js/views.js:604 +#: addons/web/static/src/js/views.js:605 #, python-format msgid "Model %s fields" msgstr "Modelo %s campos" #. openerp-web -#: addons/web/static/src/js/views.js:614 addons/web/static/src/xml/base.xml:455 +#: addons/web/static/src/js/views.js:615 addons/web/static/src/xml/base.xml:482 msgid "Manage Views" msgstr "Administrar Visões" #. openerp-web -#: addons/web/static/src/js/views.js:615 +#: addons/web/static/src/js/views.js:616 msgid "Could not find current view declaration" msgstr "Não foi possível encontrar a declaração da visão atual" #. openerp-web #: addons/web/static/src/js/views.js:716 msgid "Print" -msgstr "" +msgstr "Imprimir" #. openerp-web #: addons/web/static/src/js/views.js:717 msgid "Attachment" -msgstr "" +msgstr "Anexo" #. openerp-web #: addons/web/static/src/js/views.js:718 addons/web/static/src/xml/base.xml:276 msgid "More" -msgstr "" +msgstr "Mais" #. openerp-web -#: addons/web/static/src/js/views.js:726 +#: addons/web/static/src/js/views.js:810 msgid "Translate" msgstr "Traduzir" #. openerp-web -#: addons/web/static/src/js/views.js:726 +#: addons/web/static/src/js/views.js:812 msgid "Technical translation" msgstr "Tradução Técnica" #. openerp-web -#: addons/web/static/src/js/views.js:820 +#: addons/web/static/src/js/views.js:924 msgid "You must choose at least one record." msgstr "Você deve escolher pelo menos um registro." #. openerp-web #: addons/web/static/src/js/views.js:875 msgid "Uploading..." -msgstr "" +msgstr "Enviando..." #. openerp-web #: addons/web/static/src/js/views.js:885 msgid "Do you really want to delete this attachment ?" -msgstr "" +msgstr "Você deseja excluir este anexo?" #. openerp-web -#: addons/web/static/src/js/views.js:894 +#: addons/web/static/src/js/views.js:962 msgid "Translations" msgstr "Traduções" #. openerp-web -#: addons/web/static/src/xml/base.xml:9 +#: addons/web/static/src/xml/base.xml:52 msgid "Loading..." msgstr "Carregando..." #. openerp-web -#: addons/web/static/src/xml/base.xml:48 +#: addons/web/static/src/xml/base.xml:251 msgid "" "Your version of OpenERP is unsupported. Support & maintenance services are " "available here:" @@ -772,265 +784,266 @@ msgstr "" "disponíveis aqui:" #. openerp-web -#: addons/web/static/src/xml/base.xml:48 +#: addons/web/static/src/xml/base.xml:251 msgid "OpenERP Entreprise" msgstr "OpenERP Entreprise" #. openerp-web -#: addons/web/static/src/xml/base.xml:53 +#: addons/web/static/src/xml/base.xml:256 msgid "OpenERP Enterprise Contract." msgstr "Contrato Corporativo OpenERP" #. openerp-web -#: addons/web/static/src/xml/base.xml:54 +#: addons/web/static/src/xml/base.xml:257 msgid "Your report will be sent to the OpenERP Enterprise team." msgstr "Seu relatório será enviado à equipe do OpenERP" #. openerp-web -#: addons/web/static/src/xml/base.xml:56 +#: addons/web/static/src/xml/base.xml:259 msgid "Summary:" msgstr "Resumo:" #. openerp-web -#: addons/web/static/src/xml/base.xml:60 +#: addons/web/static/src/xml/base.xml:263 msgid "Description:" msgstr "Descrição :" #. openerp-web -#: addons/web/static/src/xml/base.xml:64 +#: addons/web/static/src/xml/base.xml:267 msgid "What you did:" msgstr "O que você fez:" #. openerp-web -#: addons/web/static/src/xml/base.xml:80 +#: addons/web/static/src/xml/base.xml:297 msgid "Invalid username or password" msgstr "Nome de usuário ou senha inválidos" #. openerp-web -#: addons/web/static/src/xml/base.xml:84 addons/web/static/src/xml/base.xml:174 -#: addons/web/static/src/xml/base.xml:200 +#: addons/web/static/src/xml/base.xml:116 +#: addons/web/static/src/xml/base.xml:150 +#: addons/web/static/src/xml/base.xml:301 msgid "Database:" msgstr "Banco de Dados:" #. openerp-web -#: addons/web/static/src/xml/base.xml:89 +#: addons/web/static/src/xml/base.xml:306 msgid "Username" msgstr "Nome do usuário" #. openerp-web -#: addons/web/static/src/xml/base.xml:91 addons/web/static/src/xml/base.xml:125 +#: addons/web/static/src/xml/base.xml:308 +#: addons/web/static/src/xml/base.xml:331 msgid "Password" msgstr "Senha" #. openerp-web -#: addons/web/static/src/xml/base.xml:93 +#: addons/web/static/src/xml/base.xml:310 msgid "Log in" msgstr "Autenticar" #. openerp-web -#: addons/web/static/src/xml/base.xml:97 +#: addons/web/static/src/xml/base.xml:314 msgid "Manage Databases" msgstr "Administrar bancos de dados" #. openerp-web -#: addons/web/static/src/xml/base.xml:98 addons/web/static/src/xml/base.xml:389 +#: addons/web/static/src/xml/base.xml:44 addons/web/static/src/xml/base.xml:315 msgid "Powered by" msgstr "Desenvolvido Por" #. openerp-web -#: addons/web/static/src/xml/base.xml:98 addons/web/static/src/xml/base.xml:334 +#: addons/web/static/src/xml/base.xml:44 addons/web/static/src/xml/base.xml:315 +#: addons/web/static/src/xml/base.xml:1819 msgid "OpenERP" msgstr "OpenERP" #. openerp-web -#: addons/web/static/src/xml/base.xml:122 -#: addons/web/static/src/xml/base.xml:189 +#: addons/web/static/src/xml/base.xml:132 +#: addons/web/static/src/xml/base.xml:328 msgid "Drop" msgstr "Soltar" #. openerp-web -#: addons/web/static/src/xml/base.xml:123 -#: addons/web/static/src/xml/base.xml:215 +#: addons/web/static/src/xml/base.xml:166 +#: addons/web/static/src/xml/base.xml:329 msgid "Backup" msgstr "Cópia de Segurança" #. openerp-web -#: addons/web/static/src/xml/base.xml:124 -#: addons/web/static/src/xml/base.xml:237 +#: addons/web/static/src/xml/base.xml:195 +#: addons/web/static/src/xml/base.xml:330 msgid "Restore" msgstr "Restaurar" #. openerp-web -#: addons/web/static/src/xml/base.xml:126 +#: addons/web/static/src/xml/base.xml:332 msgid "Back to Login" msgstr "Voltar ao Login" #. openerp-web -#: addons/web/static/src/xml/base.xml:131 +#: addons/web/static/src/xml/base.xml:61 msgid "CREATE DATABASE" msgstr "CRIAR BANCO DE DADOS" #. openerp-web -#: addons/web/static/src/xml/base.xml:134 -#: addons/web/static/src/xml/base.xml:247 +#: addons/web/static/src/xml/base.xml:68 addons/web/static/src/xml/base.xml:211 msgid "Master password:" msgstr "Senha Super Admin:" #. openerp-web -#: addons/web/static/src/xml/base.xml:138 -#: addons/web/static/src/xml/base.xml:233 +#: addons/web/static/src/xml/base.xml:72 addons/web/static/src/xml/base.xml:191 msgid "New database name:" msgstr "Nome do Novo banco de dados:" #. openerp-web -#: addons/web/static/src/xml/base.xml:142 +#: addons/web/static/src/xml/base.xml:77 msgid "Load Demonstration data:" msgstr "Carregar dados de demonstração:" #. openerp-web -#: addons/web/static/src/xml/base.xml:146 +#: addons/web/static/src/xml/base.xml:81 msgid "Default language:" msgstr "Idioma padrão:" #. openerp-web -#: addons/web/static/src/xml/base.xml:156 +#: addons/web/static/src/xml/base.xml:91 msgid "Admin password:" msgstr "Senha do Administrador" #. openerp-web -#: addons/web/static/src/xml/base.xml:160 +#: addons/web/static/src/xml/base.xml:95 msgid "Confirm password:" msgstr "Confirmar Senha:" #. openerp-web -#: addons/web/static/src/xml/base.xml:171 +#: addons/web/static/src/xml/base.xml:109 msgid "DROP DATABASE" msgstr "EXCLUIR BANCO DE DADOS" #. openerp-web -#: addons/web/static/src/xml/base.xml:185 -#: addons/web/static/src/xml/base.xml:211 -#: addons/web/static/src/xml/base.xml:229 +#: addons/web/static/src/xml/base.xml:128 +#: addons/web/static/src/xml/base.xml:162 +#: addons/web/static/src/xml/base.xml:187 msgid "Master Password:" msgstr "Senha do Super Admin" #. openerp-web -#: addons/web/static/src/xml/base.xml:197 +#: addons/web/static/src/xml/base.xml:143 msgid "BACKUP DATABASE" msgstr "BACKUP" #. openerp-web -#: addons/web/static/src/xml/base.xml:222 +#: addons/web/static/src/xml/base.xml:175 msgid "RESTORE DATABASE" msgstr "RESTAURAR BANCO DE DADOS" #. openerp-web -#: addons/web/static/src/xml/base.xml:225 +#: addons/web/static/src/xml/base.xml:182 msgid "File:" msgstr "Arquivo:" #. openerp-web -#: addons/web/static/src/xml/base.xml:244 +#: addons/web/static/src/xml/base.xml:204 msgid "CHANGE MASTER PASSWORD" msgstr "ALTERAR SENHA DO SUPER ADMIN" #. openerp-web -#: addons/web/static/src/xml/base.xml:251 +#: addons/web/static/src/xml/base.xml:216 msgid "New master password:" msgstr "Nova Senha do Super Admin:" #. openerp-web -#: addons/web/static/src/xml/base.xml:255 +#: addons/web/static/src/xml/base.xml:221 msgid "Confirm new master password:" msgstr "Confirme a Senha do Super Admin:" #. openerp-web #: addons/web/static/src/xml/base.xml:325 msgid "About OpenERP" -msgstr "" +msgstr "Sobre OpenERP" #. openerp-web #: addons/web/static/src/xml/base.xml:327 msgid "Log out" -msgstr "" +msgstr "Sair" #. openerp-web #: addons/web/static/src/xml/base.xml:333 msgid "Activate the developer mode" -msgstr "" +msgstr "Ativar o modo de desenvolvedor" #. openerp-web -#: addons/web/static/src/xml/base.xml:335 +#: addons/web/static/src/xml/base.xml:1820 msgid "Version" msgstr "Versão" #. openerp-web -#: addons/web/static/src/xml/base.xml:336 +#: addons/web/static/src/xml/base.xml:1821 msgid "Copyright © 2004-TODAY OpenERP SA. All Rights Reserved." msgstr "Copyright © 2004-HOJE OpenERP SA. Alguns Direitos Reservados." #. openerp-web -#: addons/web/static/src/xml/base.xml:337 +#: addons/web/static/src/xml/base.xml:1822 msgid "OpenERP is a trademark of the" msgstr "OpenERP é uma marca de" #. openerp-web -#: addons/web/static/src/xml/base.xml:338 +#: addons/web/static/src/xml/base.xml:1823 msgid "OpenERP SA Company" msgstr "Empresa OpenERP SA" #. openerp-web -#: addons/web/static/src/xml/base.xml:340 +#: addons/web/static/src/xml/base.xml:1825 msgid "Licenced under the terms of" msgstr "Licenciado sobre os termos de" #. openerp-web -#: addons/web/static/src/xml/base.xml:341 +#: addons/web/static/src/xml/base.xml:1826 msgid "GNU Affero General Public License" msgstr "Licença Pública Geral GNU Affero" #. openerp-web -#: addons/web/static/src/xml/base.xml:343 +#: addons/web/static/src/xml/base.xml:1828 msgid "For more information visit" msgstr "Para mais informações visite" #. openerp-web -#: addons/web/static/src/xml/base.xml:344 +#: addons/web/static/src/xml/base.xml:1829 msgid "OpenERP.com" msgstr "OpenERP.com" #. openerp-web -#: addons/web/static/src/xml/base.xml:352 +#: addons/web/static/src/xml/base.xml:1720 msgid "Old Password:" msgstr "Senha Anterior" #. openerp-web -#: addons/web/static/src/xml/base.xml:357 +#: addons/web/static/src/xml/base.xml:1725 msgid "New Password:" msgstr "Nova Senha" #. openerp-web -#: addons/web/static/src/xml/base.xml:362 +#: addons/web/static/src/xml/base.xml:1730 msgid "Confirm Password:" msgstr "Confirmar Senha:" #. openerp-web #: addons/web/static/src/xml/base.xml:390 msgid "Open" -msgstr "" +msgstr "Abrir" #. openerp-web #: addons/web/static/src/xml/base.xml:390 msgid "ERP" -msgstr "" +msgstr "ERP" #. openerp-web -#: addons/web/static/src/xml/base.xml:448 +#: addons/web/static/src/xml/base.xml:477 msgid "Debug View#" msgstr "Visão de Depuração#" #. openerp-web -#: addons/web/static/src/xml/base.xml:449 +#: addons/web/static/src/xml/base.xml:478 msgid "View Log (perm_read)" msgstr "Visualiza Log (perm_read)" @@ -1040,70 +1053,69 @@ msgid "Toggle Form Layout Outline" msgstr "" #. openerp-web -#: addons/web/static/src/xml/base.xml:451 +#: addons/web/static/src/xml/base.xml:479 msgid "View Fields" msgstr "Visualiza Campos" #. openerp-web -#: addons/web/static/src/xml/base.xml:453 -#: addons/web/static/src/xml/base.xml:1242 +#: addons/web/static/src/xml/base.xml:1300 msgid "Manage Filters" msgstr "Gerenciar Filtros" #. openerp-web -#: addons/web/static/src/xml/base.xml:456 +#: addons/web/static/src/xml/base.xml:483 msgid "View" msgstr "Visão" #. openerp-web -#: addons/web/static/src/xml/base.xml:457 +#: addons/web/static/src/xml/base.xml:484 msgid "Edit SearchView" msgstr "Editar Busca" #. openerp-web -#: addons/web/static/src/xml/base.xml:458 +#: addons/web/static/src/xml/base.xml:485 msgid "Edit Action" msgstr "Editar Ação" #. openerp-web -#: addons/web/static/src/xml/base.xml:459 +#: addons/web/static/src/xml/base.xml:486 msgid "Edit Workflow" msgstr "Editar Workflow" #. openerp-web -#: addons/web/static/src/xml/base.xml:464 +#: addons/web/static/src/xml/base.xml:491 msgid "ID:" msgstr "ID:" #. openerp-web -#: addons/web/static/src/xml/base.xml:467 +#: addons/web/static/src/xml/base.xml:494 msgid "XML ID:" msgstr "ID XML:" #. openerp-web -#: addons/web/static/src/xml/base.xml:470 +#: addons/web/static/src/xml/base.xml:497 msgid "Creation User:" msgstr "Usuário de criação:" #. openerp-web -#: addons/web/static/src/xml/base.xml:473 +#: addons/web/static/src/xml/base.xml:500 msgid "Creation Date:" msgstr "Data de Criação:" #. openerp-web -#: addons/web/static/src/xml/base.xml:476 +#: addons/web/static/src/xml/base.xml:503 msgid "Latest Modification by:" msgstr "Última Modificação por:" #. openerp-web -#: addons/web/static/src/xml/base.xml:479 +#: addons/web/static/src/xml/base.xml:506 msgid "Latest Modification Date:" msgstr "Data da Última Modificação:" #. openerp-web #: addons/web/static/src/xml/base.xml:518 msgid "Delete this attachment" -msgstr "" +msgstr "Excluir este anexo" #. openerp-web #: addons/web/static/src/xml/base.xml:523 @@ -1113,297 +1125,301 @@ msgstr "" #. openerp-web #: addons/web/static/src/xml/base.xml:527 msgid "Add..." -msgstr "" +msgstr "Adicionar..." #. openerp-web #: addons/web/static/src/xml/base.xml:622 #: addons/web/static/src/xml/base.xml:687 msgid "or" -msgstr "" +msgstr "ou" #. openerp-web #: addons/web/static/src/xml/base.xml:687 msgid "Discard" -msgstr "" +msgstr "Descartar" #. openerp-web -#: addons/web/static/src/xml/base.xml:704 +#: addons/web/static/src/xml/base.xml:806 msgid "Default:" msgstr "Padrão:" #. openerp-web -#: addons/web/static/src/xml/base.xml:721 +#: addons/web/static/src/xml/base.xml:823 msgid "Condition:" msgstr "Condição:" #. openerp-web -#: addons/web/static/src/xml/base.xml:740 +#: addons/web/static/src/xml/base.xml:842 msgid "Only you" msgstr "Somente voce" #. openerp-web -#: addons/web/static/src/xml/base.xml:747 +#: addons/web/static/src/xml/base.xml:849 msgid "All users" msgstr "Todos os usuários" #. openerp-web -#: addons/web/static/src/xml/base.xml:797 +#: addons/web/static/src/xml/base.xml:856 msgid "Unhandled widget" msgstr "Widget não utilizado" #. openerp-web -#: addons/web/static/src/xml/base.xml:803 +#: addons/web/static/src/xml/base.xml:936 msgid "(nolabel)" msgstr "(nolabel)" #. openerp-web -#: addons/web/static/src/xml/base.xml:808 +#: addons/web/static/src/xml/base.xml:941 msgid "Field:" msgstr "Campo:" #. openerp-web -#: addons/web/static/src/xml/base.xml:812 +#: addons/web/static/src/xml/base.xml:945 msgid "Object:" msgstr "Objeto:" #. openerp-web -#: addons/web/static/src/xml/base.xml:816 +#: addons/web/static/src/xml/base.xml:949 msgid "Type:" msgstr "Tipo:" #. openerp-web -#: addons/web/static/src/xml/base.xml:820 +#: addons/web/static/src/xml/base.xml:953 msgid "Widget:" msgstr "Componente:" #. openerp-web -#: addons/web/static/src/xml/base.xml:824 +#: addons/web/static/src/xml/base.xml:957 msgid "Size:" msgstr "Tamanho:" #. openerp-web -#: addons/web/static/src/xml/base.xml:828 +#: addons/web/static/src/xml/base.xml:961 msgid "Context:" msgstr "Contexto:" #. openerp-web -#: addons/web/static/src/xml/base.xml:832 +#: addons/web/static/src/xml/base.xml:965 msgid "Domain:" msgstr "Domínio:" #. openerp-web -#: addons/web/static/src/xml/base.xml:836 +#: addons/web/static/src/xml/base.xml:910 +#: addons/web/static/src/xml/base.xml:969 msgid "Modifiers:" msgstr "Modificadores:" #. openerp-web -#: addons/web/static/src/xml/base.xml:840 +#: addons/web/static/src/xml/base.xml:973 msgid "Change default:" msgstr "Trocar padrão" #. openerp-web -#: addons/web/static/src/xml/base.xml:844 +#: addons/web/static/src/xml/base.xml:977 msgid "On change:" msgstr "Ao alterar:" #. openerp-web -#: addons/web/static/src/xml/base.xml:848 +#: addons/web/static/src/xml/base.xml:981 msgid "Relation:" msgstr "Relação:" #. openerp-web -#: addons/web/static/src/xml/base.xml:852 +#: addons/web/static/src/xml/base.xml:985 msgid "Selection:" msgstr "Seleção:" #. openerp-web -#: addons/web/static/src/xml/base.xml:895 +#: addons/web/static/src/xml/base.xml:1040 msgid "Open this resource" msgstr "Abrir este recurso" #. openerp-web -#: addons/web/static/src/xml/base.xml:922 +#: addons/web/static/src/xml/base.xml:1063 msgid "Select date" msgstr "Data selecionada" #. openerp-web #: addons/web/static/src/xml/base.xml:948 msgid "Open Resource" -msgstr "" +msgstr "Abrir Recurso" #. openerp-web -#: addons/web/static/src/xml/base.xml:1026 -#: addons/web/static/src/xml/base.xml:1067 +#: addons/web/static/src/xml/base.xml:1162 +#: addons/web/static/src/xml/base.xml:1205 msgid "Set Image" msgstr "Definir Imagem" #. openerp-web -#: addons/web/static/src/xml/base.xml:1030 -#: addons/web/static/src/xml/base.xml:1082 -#: addons/web/static/src/xml/base.xml:1084 +#: addons/web/static/src/js/view_form.js:1620 +#: addons/web/static/src/xml/base.xml:1170 +#: addons/web/static/src/xml/base.xml:1220 +#: addons/web/static/src/xml/base.xml:1222 +#: addons/web/static/src/xml/base.xml:1279 msgid "Clear" msgstr "Limpar" #. openerp-web -#: addons/web/static/src/xml/base.xml:1035 -#: addons/web/static/src/xml/base.xml:1092 +#: addons/web/static/src/xml/base.xml:1179 +#: addons/web/static/src/xml/base.xml:1230 msgid "Uploading ..." msgstr "Tranferindo..." #. openerp-web #: addons/web/static/src/xml/base.xml:1066 msgid "width: 83px;" -msgstr "" +msgstr "largura: 83px;" #. openerp-web -#: addons/web/static/src/xml/base.xml:1069 -#: addons/web/static/src/xml/base.xml:1467 +#: addons/web/static/src/xml/base.xml:1207 +#: addons/web/static/src/xml/base.xml:1501 msgid "Select" msgstr "Selecionar" #. openerp-web -#: addons/web/static/src/xml/base.xml:1075 -#: addons/web/static/src/xml/base.xml:1077 +#: addons/web/static/src/xml/base.xml:1214 +#: addons/web/static/src/xml/base.xml:1216 msgid "Save As" msgstr "Salvar Como" #. openerp-web -#: addons/web/static/src/xml/base.xml:1126 +#: addons/web/static/src/xml/base.xml:1245 msgid "Button" msgstr "Botão" #. openerp-web -#: addons/web/static/src/xml/base.xml:1129 +#: addons/web/static/src/xml/base.xml:1248 msgid "(no string)" msgstr "(sem string)" #. openerp-web -#: addons/web/static/src/xml/base.xml:1136 +#: addons/web/static/src/xml/base.xml:1255 msgid "Special:" msgstr "Especial:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1141 +#: addons/web/static/src/xml/base.xml:1260 msgid "Button Type:" msgstr "Tipo do Botão:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1145 +#: addons/web/static/src/xml/base.xml:1264 msgid "Method:" msgstr "Método:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1149 +#: addons/web/static/src/xml/base.xml:1268 msgid "Action ID:" msgstr "ID da Ação:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1159 +#: addons/web/static/src/xml/base.xml:542 msgid "Field" msgstr "Campo" #. openerp-web #: addons/web/static/src/xml/base.xml:1205 msgid "Advanced Search..." -msgstr "" +msgstr "Busca Avançada..." #. openerp-web -#: addons/web/static/src/xml/base.xml:1230 +#: addons/web/static/src/xml/base.xml:1287 msgid "-- Filters --" msgstr "-- Filtros --" #. openerp-web -#: addons/web/static/src/xml/base.xml:1239 +#: addons/web/static/src/xml/base.xml:1296 msgid "-- Actions --" msgstr "-- Ações --" #. openerp-web -#: addons/web/static/src/xml/base.xml:1240 +#: addons/web/static/src/xml/base.xml:1297 msgid "Add Advanced Filter" msgstr "Adiciona Filtro Avançado" #. openerp-web -#: addons/web/static/src/xml/base.xml:1241 +#: addons/web/static/src/xml/base.xml:1298 msgid "Save Filter" msgstr "Salvar Filtro" #. openerp-web -#: addons/web/static/src/xml/base.xml:1247 +#: addons/web/static/src/xml/base.xml:1305 msgid "Filter Name:" msgstr "Nome do Filtro" #. openerp-web -#: addons/web/static/src/xml/base.xml:1249 +#: addons/web/static/src/xml/base.xml:1307 msgid "(Any existing filter with the same name will be replaced)" msgstr "(Qualquer filtro existente com o mesmo nome será substituído)" #. openerp-web #: addons/web/static/src/xml/base.xml:1376 msgid "Custom Filters" -msgstr "" +msgstr "Filtros personalizados" #. openerp-web #: addons/web/static/src/xml/base.xml:1379 msgid "Save current filter" -msgstr "" +msgstr "Salvar o filtro atual" #. openerp-web #: addons/web/static/src/xml/base.xml:1381 msgid "Filter name" -msgstr "" +msgstr "Nome do filtro" #. openerp-web #: addons/web/static/src/xml/base.xml:1383 msgid "Share with all users" -msgstr "" +msgstr "Compartilhar com todos os usuários" #. openerp-web -#: addons/web/static/src/xml/base.xml:1392 +#: addons/web/static/src/js/search.js:298 +#: addons/web/static/src/xml/base.xml:1299 msgid "Add to Dashboard" msgstr "Adicionar ao Painel" #. openerp-web #: addons/web/static/src/xml/base.xml:1394 msgid "Title of new Dashboard item" -msgstr "" +msgstr "Título do novo item do painel" #. openerp-web #: addons/web/static/src/xml/base.xml:1395 msgid "save" -msgstr "" +msgstr "salvar" #. openerp-web #: addons/web/static/src/xml/base.xml:1399 msgid "Select Dashboard to add this filter to" -msgstr "" +msgstr "Escolha o Painel para adicionar este filtro" #. openerp-web #: addons/web/static/src/xml/base.xml:1406 msgid "Advanced Search" -msgstr "" +msgstr "Busca Avançada" #. openerp-web #: addons/web/static/src/xml/base.xml:1411 msgid "Add a condition" -msgstr "" +msgstr "Adicionar uma condição" #. openerp-web #: addons/web/static/src/xml/base.xml:1412 msgid "Apply" -msgstr "" +msgstr "Aplicar" #. openerp-web -#: addons/web/static/src/xml/base.xml:1475 +#: addons/web/static/src/xml/base.xml:1509 msgid "Save & New" msgstr "Salvar & Novo" #. openerp-web -#: addons/web/static/src/xml/base.xml:1476 +#: addons/web/static/src/xml/base.xml:1510 msgid "Save & Close" msgstr "Salvar & Fechar" #. openerp-web -#: addons/web/static/src/xml/base.xml:1559 +#: addons/web/static/src/xml/base.xml:1617 msgid "" "This wizard will export all data that matches the current search criteria to " "a CSV file.\n" @@ -1416,67 +1432,67 @@ msgstr "" "ser reimportados após a modificação." #. openerp-web -#: addons/web/static/src/xml/base.xml:1566 +#: addons/web/static/src/xml/base.xml:1624 msgid "Export Type:" msgstr "Tipo de Exportação:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1568 +#: addons/web/static/src/xml/base.xml:1626 msgid "Import Compatible Export" msgstr "Importar Exportação Compatível" #. openerp-web -#: addons/web/static/src/xml/base.xml:1569 +#: addons/web/static/src/xml/base.xml:1627 msgid "Export all Data" msgstr "Exportar todos os Dados" #. openerp-web -#: addons/web/static/src/xml/base.xml:1572 +#: addons/web/static/src/xml/base.xml:1630 msgid "Export Formats" msgstr "Formatos de Exportação" #. openerp-web -#: addons/web/static/src/xml/base.xml:1578 +#: addons/web/static/src/xml/base.xml:1636 msgid "Available fields" msgstr "Campos Disponíveis" #. openerp-web -#: addons/web/static/src/xml/base.xml:1580 +#: addons/web/static/src/xml/base.xml:1638 msgid "Fields to export" msgstr "Campos para exportar" #. openerp-web -#: addons/web/static/src/xml/base.xml:1582 +#: addons/web/static/src/xml/base.xml:1640 msgid "Save fields list" msgstr "Salvar lista de campos" #. openerp-web -#: addons/web/static/src/xml/base.xml:1596 +#: addons/web/static/src/xml/base.xml:1654 msgid "Remove All" msgstr "Remover Tudo" #. openerp-web -#: addons/web/static/src/xml/base.xml:1607 +#: addons/web/static/src/xml/base.xml:1666 msgid "Name" msgstr "Nome" #. openerp-web -#: addons/web/static/src/xml/base.xml:1639 +#: addons/web/static/src/xml/base.xml:1699 msgid "Save as:" msgstr "Salvar como:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1645 +#: addons/web/static/src/xml/base.xml:1706 msgid "Saved exports:" msgstr "Exportações salvas" #. openerp-web -#: addons/web/static/src/xml/base.xml:1663 +#: addons/web/static/src/xml/base.xml:1748 msgid "1. Import a .CSV file" msgstr "Importar um arquivo CSV." #. openerp-web -#: addons/web/static/src/xml/base.xml:1664 +#: addons/web/static/src/xml/base.xml:1749 msgid "" "Select a .CSV file to import. If you need a sample of file to import,\n" " you should use the export tool with the \"Import Compatible\" option." @@ -1487,57 +1503,57 @@ msgstr "" "Compatível\"." #. openerp-web -#: addons/web/static/src/xml/base.xml:1668 +#: addons/web/static/src/xml/base.xml:1753 msgid "CSV File:" msgstr "Arquivo CSV:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1671 +#: addons/web/static/src/xml/base.xml:1756 msgid "2. Check your file format" msgstr "Verifique seu formato de arquivo" #. openerp-web -#: addons/web/static/src/xml/base.xml:1674 +#: addons/web/static/src/xml/base.xml:1759 msgid "Import Options" msgstr "Opções de importação" #. openerp-web -#: addons/web/static/src/xml/base.xml:1678 +#: addons/web/static/src/xml/base.xml:1763 msgid "Does your file have titles?" msgstr "O seu arquivo tem títulos?" #. openerp-web -#: addons/web/static/src/xml/base.xml:1684 +#: addons/web/static/src/xml/base.xml:1769 msgid "Separator:" msgstr "Separador:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1686 +#: addons/web/static/src/xml/base.xml:1771 msgid "Delimiter:" msgstr "Delimitador:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1690 +#: addons/web/static/src/xml/base.xml:1775 msgid "Encoding:" msgstr "Codificação:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1693 +#: addons/web/static/src/xml/base.xml:1778 msgid "UTF-8" msgstr "UTF-8" #. openerp-web -#: addons/web/static/src/xml/base.xml:1694 +#: addons/web/static/src/xml/base.xml:1779 msgid "Latin 1" msgstr "Latin 1" #. openerp-web -#: addons/web/static/src/xml/base.xml:1697 +#: addons/web/static/src/xml/base.xml:1782 msgid "Lines to skip" msgstr "Linhas para ignorar" #. openerp-web -#: addons/web/static/src/xml/base.xml:1697 +#: addons/web/static/src/xml/base.xml:1782 msgid "" "For use if CSV files have titles on multiple lines, skips more than a single " "line during import" @@ -1548,15 +1564,15 @@ msgstr "" #. openerp-web #: addons/web/static/src/xml/base.xml:1713 msgid "--- Don't Import ---" -msgstr "" +msgstr "--- Não Importar ---" #. openerp-web -#: addons/web/static/src/xml/base.xml:1724 +#: addons/web/static/src/xml/base.xml:1809 msgid "The import failed due to:" msgstr "A importação falhou devido a:" #. openerp-web -#: addons/web/static/src/xml/base.xml:1726 +#: addons/web/static/src/xml/base.xml:1811 msgid "Here is a preview of the file we could not import:" msgstr "Aqui está uma visualização do arquivo que não pode ser importado:" diff --git a/addons/web/static/lib/spinjs/spin.js b/addons/web/static/lib/spinjs/spin.js new file mode 100644 index 00000000000..d8e21786a1f --- /dev/null +++ b/addons/web/static/lib/spinjs/spin.js @@ -0,0 +1,306 @@ +//fgnass.github.com/spin.js#v1.2.5 +(function(window, document, undefined) { + +/** + * Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de] + * Licensed under the MIT license + */ + + var prefixes = ['webkit', 'Moz', 'ms', 'O']; /* Vendor prefixes */ + var animations = {}; /* Animation rules keyed by their name */ + var useCssAnimations; + + /** + * Utility function to create elements. If no tag name is given, + * a DIV is created. Optionally properties can be passed. + */ + function createEl(tag, prop) { + var el = document.createElement(tag || 'div'); + var n; + + for(n in prop) { + el[n] = prop[n]; + } + return el; + } + + /** + * Appends children and returns the parent. + */ + function ins(parent /* child1, child2, ...*/) { + for (var i=1, n=arguments.length; i> 1) : o.left+mid) + 'px', + top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : o.top+mid) + 'px' + }); + } + + el.setAttribute('aria-role', 'progressbar'); + self.lines(el, self.opts); + + if (!useCssAnimations) { + // No CSS animation support, use setTimeout() instead + var i = 0; + var fps = o.fps; + var f = fps/o.speed; + var ostep = (1-o.opacity)/(f*o.trail / 100); + var astep = f/o.lines; + + !function anim() { + i++; + for (var s=o.lines; s; s--) { + var alpha = Math.max(1-(i+s*astep)%f * ostep, o.opacity); + self.opacity(el, o.lines-s, alpha, o); + } + self.timeout = self.el && setTimeout(anim, ~~(1000/fps)); + }(); + } + return self; + }, + stop: function() { + var el = this.el; + if (el) { + clearTimeout(this.timeout); + if (el.parentNode) el.parentNode.removeChild(el); + this.el = undefined; + } + return this; + }, + lines: function(el, o) { + var i = 0; + var seg; + + function fill(color, shadow) { + return css(createEl(), { + position: 'absolute', + width: (o.length+o.width) + 'px', + height: o.width + 'px', + background: color, + boxShadow: shadow, + transformOrigin: 'left', + transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)', + borderRadius: (o.width>>1) + 'px' + }); + } + for (; i < o.lines; i++) { + seg = css(createEl(), { + position: 'absolute', + top: 1+~(o.width/2) + 'px', + transform: o.hwaccel ? 'translate3d(0,0,0)' : '', + opacity: o.opacity, + animation: useCssAnimations && addAnimation(o.opacity, o.trail, i, o.lines) + ' ' + 1/o.speed + 's linear infinite' + }); + if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'})); + ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)'))); + } + return el; + }, + opacity: function(el, i, val) { + if (i < el.childNodes.length) el.childNodes[i].style.opacity = val; + } + }); + + ///////////////////////////////////////////////////////////////////////// + // VML rendering for IE + ///////////////////////////////////////////////////////////////////////// + + /** + * Check and init VML support + */ + !function() { + + function vml(tag, attr) { + return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr); + } + + var s = css(createEl('group'), {behavior: 'url(#default#VML)'}); + + if (!vendor(s, 'transform') && s.adj) { + + // VML support detected. Insert CSS rule ... + sheet.addRule('.spin-vml', 'behavior:url(#default#VML)'); + + Spinner.prototype.lines = function(el, o) { + var r = o.length+o.width; + var s = 2*r; + + function grp() { + return css(vml('group', {coordsize: s +' '+s, coordorigin: -r +' '+-r}), {width: s, height: s}); + } + + var margin = -(o.width+o.length)*2+'px'; + var g = css(grp(), {position: 'absolute', top: margin, left: margin}); + + var i; + + function seg(i, dx, filter) { + ins(g, + ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}), + ins(css(vml('roundrect', {arcsize: 1}), { + width: r, + height: o.width, + left: o.radius, + top: -o.width>>1, + filter: filter + }), + vml('fill', {color: o.color, opacity: o.opacity}), + vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change + ) + ) + ); + } + + if (o.shadow) { + for (i = 1; i <= o.lines; i++) { + seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)'); + } + } + for (i = 1; i <= o.lines; i++) seg(i); + return ins(el, g); + }; + Spinner.prototype.opacity = function(el, i, val, o) { + var c = el.firstChild; + o = o.shadow && o.lines || 0; + if (c && i+o < c.childNodes.length) { + c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild; + if (c) c.opacity = val; + } + }; + } + else { + useCssAnimations = vendor(s, 'animation'); + } + }(); + + window.Spinner = Spinner; + +})(window, document); \ No newline at end of file diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 30c0b5ea0b3..1e59897cd86 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -20,6 +20,50 @@ font-style: normal; } +@-moz-keyframes bounce { + 0% { + -moz-transform: scale(0); + opacity: 0; + } + + 50% { + -moz-transform: scale(1.3); + opacity: 0.4; + } + + 75% { + -moz-transform: scale(0.9); + opacity: 0.7; + } + + 100% { + -moz-transform: scale(1); + opacity: 1; + } +} + +@-webkit-keyframes bounce { + 0% { + -webkit-transform: scale(0); + opacity: 0; + } + + 50% { + -webkit-transform: scale(1.3); + opacity: 0.4; + } + + 75% { + -webkit-transform: scale(0.9); + opacity: 0.7; + } + + 100% { + -webkit-transform: scale(1); + opacity: 1; + } +} + .openerp.openerp_webclient_container { height: 100%; position: relative; @@ -186,6 +230,11 @@ .openerp .ui-menu .ui-menu-item a.ui-state-active { background: #f0f0fa; } +.openerp div.ui-widget-overlay { + background: black; + filter: alpha(opacity=30); + opacity: 0.3; +} .openerp.ui-dialog { display: none; padding: 6px; @@ -497,6 +546,10 @@ .openerp .oe_webclient .oe_star_on { color: gold; } +.openerp .oe_bounce { + -moz-animation: bounce 0.4s linear; + -webkit-animation: bounce 0.4s linear; +} .openerp .oe_tag { border-radius: 2px; -webkit-box-sizing: border-box; @@ -1269,6 +1322,9 @@ .openerp .oe_view_manager .oe_view_manager_pager { line-height: 26px; } +.openerp .oe_view_manager .oe_view_manager_pager .oe_list_pager_single_page .oe_pager_group { + display: none; +} .openerp .oe_view_manager .oe_pager_value { float: left; margin-right: 8px; @@ -2363,6 +2419,58 @@ .openerp .oe_list_content .numeric input { text-align: right; } +.openerp .tree_header { + background-color: #f0f0f0; + border-bottom: 1px solid #cacaca; + color: #4c4c4c; + padding: 5px; + height: 25px; +} +.openerp .tree_header button { + float: right; + height: 27px; + margin-right: 5px; +} +.openerp .oe-treeview-table { + width: 100%; + background-color: white; + border-spacing: 0; +} +.openerp .oe-treeview-table th { + padding: 10px; + color: #4c4c4c; + font-weight: bold; + background-color: #f0f0f0; + border-bottom: 2px solid #cacaca; +} +.openerp .oe-treeview-table .treeview-tr, .openerp .oe-treeview-table .treeview-td { + cursor: pointer; + border-right: 1px dotted #afafb6; + vertical-align: top; + text-align: left; + border-bottom: 1px solid #cfcccc; +} +.openerp .oe-treeview-table tr:hover { + background-color: #e0e0f8; +} +.openerp .oe-treeview-table .oe-number { + text-align: right !important; +} +.openerp .oe-treeview-table span { + font-size: 90%; + font-weight: normal; + white-space: nowrap; + display: block; +} +.openerp .oe-treeview-table .treeview-tr.oe-treeview-first { + background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat; +} +.openerp .oe-treeview-table .oe_open .treeview-tr.oe-treeview-first { + background-image: url(/web/static/src/img/collapse.gif); +} +.openerp .oe-treeview-table .treeview-tr.oe-treeview-first span, .openerp .oe-treeview-table .treeview-td.oe-treeview-first span { + margin-left: 16px; +} .openerp .oe_trad_field.touched { border: 1px solid green !important; } @@ -2428,59 +2536,6 @@ color: #333333; } -.openerp .tree_header { - background-color: #f0f0f0; - border-bottom: 1px solid #cacaca; - color: #4c4c4c; - padding: 5px; - height: 25px; -} -.openerp .tree_header button { - float: right; - height: 27px; - margin-right: 5px; -} -.openerp .oe-treeview-table { - width: 100%; - background-color: white; - border-spacing: 0; -} -.openerp .oe-treeview-table th { - padding: 10px; - color: #4c4c4c; - font-weight: bold; - background-color: #f0f0f0; - border-bottom: 2px solid #cacaca; -} -.openerp .oe-treeview-table .treeview-tr, .openerp .oe-treeview-table .treeview-td { - cursor: pointer; - border-right: 1px dotted #afafb6; - vertical-align: top; - text-align: left; - border-bottom: 1px solid #cfcccc; -} -.openerp .oe-treeview-table tr:hover { - background-color: #e0e0f8; -} -.openerp .oe-treeview-table .oe-number { - text-align: right !important; -} -.openerp .oe-treeview-table span { - font-size: 90%; - font-weight: normal; - white-space: nowrap; - display: block; -} -.openerp .oe-treeview-table .treeview-tr.oe-treeview-first { - background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat; -} -.openerp .oe-treeview-table .oe_open .treeview-tr.oe-treeview-first { - background-image: url(/web/static/src/img/collapse.gif); -} -.openerp .oe-treeview-table .treeview-tr.oe-treeview-first span, .openerp .oe-treeview-table .treeview-td.oe-treeview-first span { - margin-left: 16px; -} - .kitten-mode-activated { background-image: url(http://placekitten.com/g/1365/769); background-size: cover; @@ -2489,9 +2544,3 @@ .kitten-mode-activated > * { opacity: 0.7; } - -div.ui-widget-overlay { - background: black; - filter: alpha(opacity=30); - opacity: 0.3; -} diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 7fbe5c1c336..3bb52497454 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -97,6 +97,35 @@ $sheet-max-width: 860px color: $color // }}} +// CSS animation bounces {{{ +@-moz-keyframes bounce + 0% + -moz-transform: scale(0) + opacity: 0 + 50% + -moz-transform: scale(1.3) + opacity: 0.4 + 75% + -moz-transform: scale(0.9) + opacity: 0.7 + 100% + -moz-transform: scale(1) + opacity: 1 + +@-webkit-keyframes bounce + 0% + -webkit-transform: scale(0) + opacity: 0 + 50% + -webkit-transform: scale(1.3) + opacity: 0.4 + 75% + -webkit-transform: scale(0.9) + opacity: 0.7 + 100% + -webkit-transform: scale(1) + opacity: 1 +// }}} .openerp.openerp_webclient_container height: 100% @@ -200,7 +229,9 @@ $sheet-max-width: 860px width: auto a.ui-state-active background: #f0f0fa - + div.ui-widget-overlay + background: black + @include opacity(0.3) // Modal box &.ui-dialog display: none @@ -390,6 +421,9 @@ $sheet-max-width: 860px text-decoration: none .oe_star_on color: gold + .oe_bounce + -moz-animation: bounce .40s linear + -webkit-animation: bounce .40s linear // }}} // Tags (for many2many tags, among others) {{{ .oe_tag @@ -982,6 +1016,8 @@ $sheet-max-width: 860px // ViewManager.pager {{{ .oe_view_manager_pager line-height: 26px + .oe_list_pager_single_page .oe_pager_group + display: none .oe_pager_value float: left margin-right: 8px @@ -1846,6 +1882,49 @@ $sheet-max-width: 860px input text-align: right // }}} + // Tree view {{{ + .tree_header + background-color: #f0f0f0 + border-bottom: 1px solid #cacaca + color: #4c4c4c + padding: 5px + height: 25px + button + float: right + height: 27px + margin-right: 5px + .oe-treeview-table + width: 100% + background-color: white + border-spacing: 0 + th + padding: 10px + color: #4c4c4c + font-weight: bold + background-color: #f0f0f0 + border-bottom: 2px solid #cacaca + .treeview-tr, .treeview-td + cursor: pointer + border-right: 1px dotted #afafb6 + vertical-align: top + text-align: left + border-bottom: 1px solid #cfcccc + tr:hover + background-color: #e0e0f8 + .oe-number + text-align: right !important + span + font-size: 90% + font-weight: normal + white-space: nowrap + display: block + .treeview-tr.oe-treeview-first + background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat + .oe_open .treeview-tr.oe-treeview-first + background-image: url(/web/static/src/img/collapse.gif) + .treeview-tr.oe-treeview-first span, .treeview-td.oe-treeview-first span + margin-left: 16px + // }}} // Translation {{{ .oe_trad_field.touched border: 1px solid green !important @@ -1903,49 +1982,6 @@ $sheet-max-width: 860px float: right color: #333 // }}} -//Tree view -.openerp - .tree_header - background-color: #f0f0f0 - border-bottom: 1px solid #cacaca - color: #4c4c4c - padding: 5px - height: 25px - button - float: right - height: 27px - margin-right: 5px - .oe-treeview-table - width: 100% - background-color: white - border-spacing: 0 - th - padding: 10px - color: #4c4c4c - font-weight: bold - background-color: #f0f0f0 - border-bottom: 2px solid #cacaca - .treeview-tr, .treeview-td - cursor: pointer - border-right: 1px dotted #afafb6 - vertical-align: top - text-align: left - border-bottom: 1px solid #cfcccc - tr:hover - background-color: #e0e0f8 - .oe-number - text-align: right !important - span - font-size: 90% - font-weight: normal - white-space: nowrap - display: block - .treeview-tr.oe-treeview-first - background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat - .oe_open .treeview-tr.oe-treeview-first - background-image: url(/web/static/src/img/collapse.gif) - .treeview-tr.oe-treeview-first span, .treeview-td.oe-treeview-first span - margin-left: 16px // Kitten Mode {{{ .kitten-mode-activated background-image: url(http://placekitten.com/g/1365/769) @@ -1956,8 +1992,6 @@ $sheet-max-width: 860px // }}} -div.ui-widget-overlay - background: black - @include opacity(0.3) + // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: diff --git a/addons/web/static/src/img/throbber.gif b/addons/web/static/src/img/throbber.gif index 7ab8346ce09..ded8d36d486 100644 Binary files a/addons/web/static/src/img/throbber.gif and b/addons/web/static/src/img/throbber.gif differ diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index c2ab78d0caf..8e5176ddb1d 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -385,8 +385,16 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ var fields = $(form).serializeArray(); self.rpc("/web/database/create", {'fields': fields}, function(result) { var form_obj = self.to_object(fields); - self.getParent().do_login( form_obj['db_name'], 'admin', form_obj['create_admin_pwd']); - self.destroy(); + var client_action = { + type: 'ir.actions.client', + tag: 'login', + params: { + 'db': form_obj['db_name'], + 'login': 'admin', + 'password': form_obj['create_admin_pwd'], + }, + }; + self.do_action(client_action); }); }, @@ -471,19 +479,22 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }); }, do_exit: function () { + this.do_action("login"); } }); +instance.web.client_actions.add("database_manager", "instance.web.DatabaseManager"); instance.web.Login = instance.web.Widget.extend({ template: "Login", remember_credentials: true, _db_list: null, - init: function(parent) { + init: function(parent, params) { this._super(parent); this.has_local_storage = typeof(localStorage) != 'undefined'; this.selected_db = null; this.selected_login = null; + this.params = params; if (this.has_local_storage && this.remember_credentials) { this.selected_db = localStorage.getItem('last_db_login_success'); @@ -493,26 +504,17 @@ instance.web.Login = instance.web.Widget.extend({ } } }, - open_db_manager: function(){ - var self = this; - self.$element.find('.oe_login_bottom').hide(); - self.$element.find('.oe_login_pane').hide(); - self.databasemanager = new instance.web.DatabaseManager(self); - self.databasemanager.appendTo(self.$element); - self.databasemanager.do_exit.add_last(function() { - self.databasemanager.destroy(); - self.$element.find('.oe_login_bottom').show(); - self.$element.find('.oe_login_pane').show(); - self.load_db_list(true).then(self.on_db_list_loaded); - }); - }, start: function() { var self = this; self.$element.find("form").submit(self.on_submit); self.$element.find('.oe_login_manage_db').click(function() { - self.open_db_manager(); + self.do_action("database_manager"); + }); + return self.load_db_list().then(self.on_db_list_loaded).then(function() { + if(self.params) { + self.do_login(self.params.db, self.params.login, self.params.password); + } }); - return self.load_db_list().then(self.on_db_list_loaded); }, load_db_list: function (force) { var d = $.when(), self = this; @@ -533,7 +535,7 @@ instance.web.Login = instance.web.Widget.extend({ var dbdiv = this.$element.find('div.oe_login_dbpane'); this.$element.find("[name=db]").replaceWith(instance.web.qweb.render('Login.dblist', { db_list: list, selected_db: this.selected_db})); if(list.length === 0) { - self.open_db_manager(); + this.do_action("database_manager"); } else if(list && list.length === 1) { dbdiv.hide(); } else { @@ -580,7 +582,7 @@ instance.web.Login = instance.web.Widget.extend({ localStorage.setItem('last_password_login_success', ''); } } - self.trigger("login"); + self.trigger('login_successful'); },function () { self.$(".oe_login_pane").fadeIn("fast"); self.$element.addClass("oe_login_invalid"); @@ -593,6 +595,7 @@ instance.web.Login = instance.web.Widget.extend({ this.$element.hide(); } }); +instance.web.client_actions.add("login", "instance.web.Login"); instance.web.Menu = instance.web.Widget.extend({ template: 'Menu', @@ -896,7 +899,8 @@ instance.web.Client = instance.web.Widget.extend({ this.$element.on('click', '.oe_dropdown_toggle', function(ev) { ev.preventDefault(); var $toggle = $(this); - var $menu = $toggle.find('.oe_dropdown_menu'); + var $menu = $toggle.siblings('.oe_dropdown_menu'); + $menu = $menu.size() >= 1 ? $menu : $toggle.find('.oe_dropdown_menu'); var state = $menu.is('.oe_opened'); setTimeout(function() { // Do not alter propagation @@ -967,22 +971,15 @@ instance.web.WebClient = instance.web.Client.extend({ data: {debug: file + ':' + line} }); }; - // TODO: deprecate and use login client action - self.login = new instance.web.Login(self); - self.login.on("login",self,self.show_application); - return self.login.appendTo(self.$element).then(function () { - self.login.hide(); - }); }, show_login: function() { - var self = this; - self.$('.oe_topbar').hide(); - self.login.show(); + this.$('.oe_topbar').hide(); + this.action_manager.do_action("login"); + this.action_manager.inner_widget.on('login_successful', this, this.show_application); }, show_application: function() { var self = this; self.$('.oe_topbar').show(); - self.login.hide(); self.menu = new instance.web.Menu(self); self.menu.replace(this.$element.find('.oe_menu_placeholder')); self.menu.on('menu_click', this, this.on_menu_action); @@ -1063,6 +1060,7 @@ instance.web.WebClient = instance.web.Client.extend({ }, do_push_state: function(state) { this.set_title(state.title); + delete state.title; var url = '#' + $.param(state); this._current_state = _.clone(state); $.bbq.pushState(url); @@ -1089,10 +1087,13 @@ instance.web.WebClient = instance.web.Client.extend({ } }, set_content_full_screen: function(fullscreen) { - if (fullscreen) + if (fullscreen) { $(".oe_webclient", this.$element).addClass("oe_content_full_screen"); - else + $("body").css({'overflow-y':'hidden'}); + } else { $(".oe_webclient", this.$element).removeClass("oe_content_full_screen"); + $("body").css({'overflow-y':'scroll'}); + } } }); diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 370fe74e63e..846ae3e4758 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -378,7 +378,8 @@ instance.web.PropertiesMixin = _.extend({}, instance.web.EventDispatcherMixin, { instance.web.EventDispatcherMixin.init.call(this); this.__getterSetterInternalMap = {}; }, - set: function(map) { + set: function(map, options) { + options = options || {}; var self = this; var changed = false; _.each(map, function(val, key) { @@ -387,10 +388,11 @@ instance.web.PropertiesMixin = _.extend({}, instance.web.EventDispatcherMixin, { return; changed = true; self.__getterSetterInternalMap[key] = val; - self.trigger("change:" + key, self, { - oldValue: tmp, - newValue: val - }); + if (! options.silent) + self.trigger("change:" + key, self, { + oldValue: tmp, + newValue: val + }); }); if (changed) self.trigger("change", self); diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 181364ba533..12eeb1d79b4 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -549,14 +549,38 @@ $.async_when = function() { /** Setup blockui */ if ($.blockUI) { $.blockUI.defaults.baseZ = 1100; - $.blockUI.defaults.message = ''; + $.blockUI.defaults.message = '
'; $.blockUI.defaults.css.border = '0'; $.blockUI.defaults.css["background-color"] = ''; + $.blockUI.spinners = []; } instance.web.blockUI = function() { - $.blockUI.apply($, arguments); + var tmp = $.blockUI.apply($, arguments); + var target = $(".oe_blockui_spin")[0]; + var opts = { + lines: 13, // The number of lines to draw + length: 7, // The length of each line + width: 4, // The line thickness + radius: 10, // The radius of the inner circle + rotate: 0, // The rotation offset + color: '#FFF', // #rgb or #rrggbb + speed: 1, // Rounds per second + trail: 60, // Afterglow percentage + shadow: false, // Whether to render a shadow + hwaccel: false, // Whether to use hardware acceleration + className: 'spinner', // The CSS class to assign to the spinner + zIndex: 2e9, // The z-index (defaults to 2000000000) + top: 'auto', // Top position relative to parent in px + left: 'auto' // Left position relative to parent in px + }; + var spinner = new Spinner(opts).spin(target); + $.blockUI.spinners.push(spinner); + return tmp; } instance.web.unblockUI = function() { + _.each($.blockUI.spinners, function(el) { + el.stop(); + }); return $.unblockUI.apply($, arguments); } diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 7e070e406f8..f9cf10e76f4 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -516,7 +516,16 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea this.$element.addClass('oe_focused'); }, childBlurred: function () { - this.$element.removeClass('oe_focused'); + var val = this.$element.val(); + this.$element.val(''); + var complete = this.$element.data('autocomplete'); + if ((val && complete.term === undefined) || complete.previous !== undefined) { + throw new Error("new jquery.ui version altering implementation" + + " details relied on"); + } + delete complete.term; + this.$element.removeClass('oe_focused') + .trigger('blur'); }, /** * diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5378e74a1a4..36d9b01283d 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -33,6 +33,11 @@ instance.web.form.FieldManagerMixin = { }; instance.web.views.add('form', 'instance.web.FormView'); +/** + * Properties: + * - actual_mode: always "view", "edit" or "create". Read-only property. Determines + * the mode used by the view. + */ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerMixin, { /** * Indicates that this view is not searchable, and thus that no search @@ -55,6 +60,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM * @property {instance.web.Registry} registry=instance.web.form.widgets widgets registry for this form view instance */ init: function(parent, dataset, view_id, options) { + var self = this; this._super(parent); this.set_default_options(options); this.dataset = dataset; @@ -82,6 +88,13 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.__blur_timeout = null; this.rendering_engine = new instance.web.form.FormRenderingEngine(this); this.qweb = null; // A QWeb instance will be created if the view is a QWeb template + self.set({actual_mode: self.options.initial_mode}); + this.has_been_loaded.then(function() { + self.on("change:actual_mode", self, self.check_actual_mode); + self.check_actual_mode(); + self.on("change:actual_mode", self, self.init_pager); + self.init_pager(); + }); }, destroy: function() { _.each(this.get_widgets(), function(w) { @@ -127,17 +140,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.$buttons.on('click','.oe_form_button_save',this.on_button_save); this.$buttons.on('click','.oe_form_button_cancel',this.on_button_cancel); - this.$pager = $(QWeb.render("FormView.pager", {'widget':self})); - if (this.options.$pager) { - this.$pager.appendTo(this.options.$pager); - } else { - this.$element.find('.oe_form_pager').replaceWith(this.$pager); - } - this.$pager.on('click','a[data-pager-action]',function() { - var action = $(this).data('pager-action'); - self.on_pager_action(action); - }); - this.$sidebar = this.options.$sidebar || this.$element.find('.oe_form_sidebar'); if (!this.sidebar && this.options.$sidebar) { this.sidebar = new instance.web.Sidebar(this); @@ -151,8 +153,15 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM { label: _t('Set Default'), callback: function (item) { self.open_defaults_dialog(); } }, ]); } - this.on("change:mode", this, this.switch_mode); - this.set({mode: this.options.initial_mode}); + + // Add bounce effect on button 'Edit' when click on readonly page view. + this.$element.find(".oe_form_field, .oe_form_group_cell").on('click', function (e) { + if(self.get("actual_mode") == "view") { + var $button = self.options.$buttons.find(".oe_form_button_edit"); + $button.wrap('
').css('margin-right','4px').addClass('oe_left oe_bounce'); + } + }); + this.has_been_loaded.resolve(); return $.when(); }, @@ -260,7 +269,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM if (this.$pager) { this.$pager.show(); } - this.$element.show().css('visibility', 'hidden'); this.$element.add(this.$buttons).removeClass('oe_form_dirty'); var shown = this.has_been_loaded; @@ -270,16 +278,17 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM // null index means we should start a new record return self.on_button_new(); } - return self.dataset.read_index(_.keys(self.fields_view.fields), { - context: { 'bin_size': true } + var fields = _.keys(self.fields_view.fields); + fields.push('display_name'); + return self.dataset.read_index(fields, { + context: { 'bin_size': true, 'future_display_name' : true } }).pipe(self.on_record_loaded); }); } return shown.pipe(function() { if (options.editable) { - self.set({mode: "edit"}); + self.to_edit_mode(); } - self.$element.css('visibility', 'visible'); }); }, do_hide: function () { @@ -302,7 +311,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return $.Deferred().reject(); } this.datarecord = record; - this.set({ 'title' : record.id ? record.name : "New record" }); + this._actualize_mode(); + this.set({ 'title' : record.id ? record.display_name : "New record" }); if (this.qweb) { this.kill_current_form(); @@ -379,6 +389,24 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.reload(); } }, + init_pager: function() { + var self = this; + if (this.$pager) + this.$pager.remove(); + if (this.get("actual_mode") === "create") + return; + this.$pager = $(QWeb.render("FormView.pager", {'widget':self})); + if (this.options.$pager) { + this.$pager.appendTo(this.options.$pager); + } else { + this.$element.find('.oe_form_pager').replaceWith(this.$pager); + } + this.$pager.on('click','a[data-pager-action]',function() { + var action = $(this).data('pager-action'); + self.on_pager_action(action); + }); + this.do_update_pager(); + }, do_update_pager: function(hide_index) { var index = hide_index ? '-' : this.dataset.index + 1; this.$pager.find('button').prop('disabled', this.dataset.ids.length < 2).end() @@ -578,9 +606,32 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return $.Deferred().reject(); } }, - switch_mode: function() { + /** + * Ask the view to switch to view mode if possible. The view may not do it + * if the current record is not yet saved. It will then stay in create mode. + */ + to_view_mode: function() { + this._actualize_mode("view"); + }, + /** + * Ask the view to switch to edit mode if possible. The view may not do it + * if the current record is not yet saved. It will then stay in create mode. + */ + to_edit_mode: function() { + this._actualize_mode("edit"); + }, + /** + * Reactualize actual_mode. + */ + _actualize_mode: function(switch_to) { + var mode = switch_to || this.get("actual_mode"); + if (! this.datarecord.id) + mode = "create"; + this.set({actual_mode: mode}); + }, + check_actual_mode: function(source, options) { var self = this; - if(this.get("mode") == "view") { + if(this.get("actual_mode") === "view") { self.$element.removeClass('oe_form_editable').addClass('oe_form_readonly'); self.$buttons.find('.oe_form_buttons_edit').hide(); self.$buttons.find('.oe_form_buttons_view').show(); @@ -598,11 +649,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); var fields_order = self.fields_order.slice(0); if (self.default_focus_field) { - fields_order.unshift(self.default_focus_field); + fields_order.unshift(self.default_focus_field.name); } for (var i = 0; i < fields_order.length; i += 1) { var field = self.fields[fields_order[i]]; - if (!field.get('effective_invisible') && !field.get('effective_readonly') && field.focus() !== false) { + if (!field.get('effective_invisible') && !field.get('effective_readonly')) { + field.focus(); break; } } @@ -611,19 +663,19 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM on_button_save: function() { var self = this; return this.do_save().then(function(result) { - self.set({mode: "view"}); + self.to_view_mode(); }); }, on_button_cancel: function(event) { if (this.can_be_discarded()) { - this.set({mode: "view"}); + this.to_view_mode(); this.on_record_loaded(this.datarecord); } return false; }, on_button_new: function() { var self = this; - this.set({mode: "edit"}); + this.to_edit_mode(); return $.when(this.has_been_loaded).pipe(function() { if (self.can_be_discarded()) { return self.load_defaults(); @@ -631,7 +683,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); }, on_button_edit: function() { - return this.set({mode: "edit"}); + return this.to_edit_mode(); }, on_button_create: function() { this.dataset.index = null; @@ -644,7 +696,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM self.dataset.call('copy', [self.datarecord.id, {}, self.dataset.context]).then(function(new_id) { return self.on_created({ result : new_id }); }).then(function() { - return self.set({mode: "edit"}); + return self.to_edit_mode(); }).then(function() { def.resolve(); }); @@ -806,8 +858,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM if (self.dataset.index == null || self.dataset.index < 0) { return $.when(self.on_button_new()); } else { - return self.dataset.read_index(_.keys(self.fields_view.fields), { - context : { 'bin_size' : true } + var fields = _.keys(self.fields_view.fields); + fields.push('display_name'); + return self.dataset.read_index(fields, { + context : { 'bin_size' : true, 'future_display_name' : true } }).pipe(self.on_record_loaded); } }); @@ -937,7 +991,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM register_field: function(field, name) { this.fields[name] = field; this.fields_order.push(name); - if (field.node.attrs.default_focus == '1') { + if (JSON.parse(field.node.attrs.default_focus || "0")) { this.default_focus_field = field; } @@ -959,7 +1013,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM return this.fields_view.fields[field_name]; }, is_create_mode: function() { - return !this.datarecord.id; + return this.get("actual_mode") === "create"; }, open_translate_dialog: function(field) { return this._super(field); @@ -1643,10 +1697,13 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({ this._super(view, node); this.force_disabled = false; this.string = (this.node.attrs.string || '').replace(/_/g, ''); - if (this.node.attrs.default_focus == '1') { + if (JSON.parse(this.node.attrs.default_focus || "0")) { // TODO fme: provide enter key binding to widgets this.view.default_focus_button = this; } + if (this.node.attrs.icon && (! /\//.test(this.node.attrs.icon))) { + this.node.attrs.icon = '/web/static/src/img/icons/' + this.node.attrs.icon + '.png'; + } this.view.on('view_content_has_changed', this, this.check_disable); }, start: function() { @@ -2009,7 +2066,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we return this.get('value') === '' || this._super(); }, focus: function() { - this.delay_focus(this.$element.find('input:first')); + this.$element.find('input:first')[0].focus(); } }); @@ -2820,10 +2877,11 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc if (follow) link += "
"; } - this.$element.find('a') + var $link = this.$element.find('.oe_form_uri') .unbind('click') - .html(link) - .click(function () { + .html(link); + if (! this.get_definition_options().no_open) + $link.click(function () { self.do_action({ type: 'ir.actions.act_window', res_model: self.field.relation, @@ -2981,6 +3039,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ } if(view.view_type === "list") { _.extend(view.options, { + addable: null, selectable: self.multi_selection, sortable: false, import_enabled: false, @@ -2988,7 +3047,6 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ }); if (self.get("effective_readonly")) { _.extend(view.options, { - addable: null, deletable: null, reorderable: false, }); @@ -3412,6 +3470,34 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ this._super.apply(this, arguments); } }); +instance.web.form.One2ManyList = instance.web.ListView.List.extend({ + pad_table_to: function (count) { + this._super(count > 0 ? count - 1 : 0); + + // magical invocation of wtf does that do + if (this.view.o2m.get('effective_readonly')) { + return; + } + + var self = this; + var columns = _(this.columns).filter(function (column) { + return column.invisible !== '1'; + }).length; + if (this.options.selectable) { columns++; } + if (this.options.deletable) { columns++; } + var $cell = $('', { + colspan: columns, + 'class': 'oe_form_field_one2many_list_row_add' + }).text(_t("Add a row")) + .click(function (e) { + e.preventDefault(); + e.stopPropagation(); + self.view.do_add_record(); + }); + this.$current.append( + $('').append($cell)) + } +}); instance.web.form.One2ManyFormView = instance.web.FormView.extend({ form_template: 'One2Many.formview', @@ -3539,12 +3625,13 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in render_value: function() { var self = this; var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context()); + var values = self.get("value") var handle_names = function(data) { var indexed = {}; _.each(data, function(el) { indexed[el[0]] = el; }); - data = _.map(self.get("value"), function(el) { return indexed[el]; }); + data = _.map(values, function(el) { return indexed[el]; }); if (! self.get("effective_readonly")) { self.tags.containerElement().children().remove(); $("textarea", self.$element).css("padding-left", "3px"); @@ -3553,8 +3640,8 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in self.$element.html(QWeb.render("FieldMany2ManyTag", {elements: data})); } }; - if (! self.get('values') || self.get('values').length > 0) { - this._display_orderer.add(dataset.name_get(self.get("value"))).then(handle_names); + if (! values || values.length > 0) { + this._display_orderer.add(dataset.name_get(values)).then(handle_names); } else { handle_names([]); } diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 53a8c0126b2..9c7bf88db1a 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -357,6 +357,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi { label: _t('Delete'), callback: this.do_delete_selected }, ]); this.sidebar.add_toolbar(this.fields_view.toolbar); + this.sidebar.$element.hide(); } }, /** @@ -375,6 +376,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi var total = dataset.size(); var limit = this.limit() || total; + this.$pager.toggle(total !== 0); this.$pager.toggleClass('oe_list_pager_single_page', (total <= limit)); var spager = '-'; if (total) { @@ -493,9 +495,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi }, do_show: function () { this._super(); - if (this.sidebar) { - this.sidebar.$element.show(); - } if (this.$buttons) { this.$buttons.show(); } @@ -934,7 +933,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. '[data-id=' + record.get('id') + ']'); var index = $row.data('index'); $row.remove(); - self.refresh_zebra(index); }, 'reset': function () { return self.on_records_reset(); }, 'change': function (event, record, attribute, value, old_value) { @@ -969,8 +967,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. '[data-id=' + previous_record.get('id') + ']'); $new_row.insertAfter($previous_sibling); } - - self.refresh_zebra(index, 1); } }; _(this.record_callbacks).each(function (callback, event) { @@ -1110,7 +1106,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. this.$current .children('tr:not([data-id])').remove().end() .append(new Array(count - this.records.length + 1).join(row)); - this.refresh_zebra(this.records.length); }, /** * Gets the ids of all currently selected records, if any @@ -1184,25 +1179,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. render_cell: function () { return self.render_cell.apply(self, arguments); } }); - }, - /** - * Fixes fixes the even/odd classes - * - * @param {Number} [from_index] index from which to resequence - * @param {Number} [offset = 0] selection offset for DOM, in case there are rows to ignore in the table - */ - refresh_zebra: function (from_index, offset) { - offset = offset || 0; - from_index = from_index || 0; - var dom_offset = offset + from_index; - var sel = dom_offset ? ':gt(' + (dom_offset - 1) + ')' : null; - this.$current.children(sel).each(function (i, e) { - var index = from_index + i; - // reset record-index accelerators on rows and even/odd - var even = index%2 === 0; - $(e).toggleClass('even', even) - .toggleClass('odd', !even); - }); } }); instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.web.ListView.Groups# */{ @@ -1535,8 +1511,6 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we }(dataset, record.get('id'), seq)); record.set('sequence', seq); } - - list.refresh_zebra(); } }); }, diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 85e9e5a402e..6c38495d0dc 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -423,26 +423,64 @@ openerp.web.list_editable = function (instance) { keyup_ESCAPE: function () { return this.cancel_edition(); }, + /** + * Gets the selection range (start, end) for the provided element, + * returns ``null`` if it can't get a range. + * + * @private + */ _text_selection_range: function (el) { - if (el.selectionStart !== undefined) { + var selectionStart; + try { + selectionStart = el.selectionStart; + } catch (e) { + // radio or checkbox throw on selectionStart access + return null; + } + if (selectionStart !== undefined) { return { - start: el.selectionStart, + start: selectionStart, end: el.selectionEnd }; - } else if(document.body.createTextRange) { + } else if (document.body.createTextRange) { throw new Error("Implement text range handling for MSIE"); var sel = document.body.createTextRange(); if (sel.parentElement() === el) { } } + // Element without selection ranges (select, div/@contenteditable) + return null; }, _text_cursor: function (el) { var selection = this._text_selection_range(el); - if (selection.start !== selection.end) { + if (!selection) { return null; } - return selection.start; + if (selection.start !== selection.end) { + return {position: null, collapsed: false}; + } + return {position: selection.start, collapsed: true}; + }, + /** + * Checks if the cursor is at the start of the provided el + * + * @param {HTMLInputElement | HTMLTextAreaElement} + * @returns {Boolean} + * @private + */ + _at_start: function (cursor, el) { + return cursor.collapsed && (cursor.position === 0); + }, + /** + * Checks if the cursor is at the end of the provided el + * + * @param {HTMLInputElement | HTMLTextAreaElement} + * @returns {Boolean} + * @private + */ + _at_end: function (cursor, el) { + return cursor.collapsed && (cursor.position === el.value.length); }, /** * @param DOMEvent event @@ -452,10 +490,11 @@ openerp.web.list_editable = function (instance) { */ _key_move_record: function (event, record_direction, is_valid_move) { if (!this.editor.is_editing('edit')) { return $.when(); } - // FIXME: assumes editable widgets are input-type elements - var index = this._text_cursor(event.target); - // If selecting or not at the start of the input - if (!is_valid_move(event.target, index)) { return $.when(); } + var cursor = this._text_cursor(event.target); + // if text-based input (has a cursor) + // and selecting (not collapsed) or not at a field boundary + // don't move to the next record + if (cursor && !is_valid_move(event.target, cursor)) { return $.when(); } event.preventDefault(); var source_field = $(event.target).closest('[data-fieldname]') @@ -464,13 +503,15 @@ openerp.web.list_editable = function (instance) { }, keydown_UP: function (e) { - return this._key_move_record(e, 'pred', function (el, index) { - return index === 0; + var self = this; + return this._key_move_record(e, 'pred', function (el, cursor) { + return self._at_start(cursor, el); }); }, keydown_DOWN: function (e) { - return this._key_move_record(e, 'succ', function (el, index) { - return index === el.value.length; + var self = this; + return this._key_move_record(e, 'succ', function (el, cursor) { + return self._at_end(cursor, el); }); }, @@ -478,8 +519,8 @@ openerp.web.list_editable = function (instance) { // If the cursor is at the beginning of the field var source_field = $(e.target).closest('[data-fieldname]') .attr('data-fieldname'); - var index = this._text_cursor(e.target); - if (index !== 0) { return $.when(); } + var cursor = this._text_cursor(e.target); + if (cursor && !this._at_start(cursor, e.target)) { return $.when(); } var fields_order = this.editor.form.fields_order; var field_index = _(fields_order).indexOf(source_field); @@ -502,8 +543,8 @@ openerp.web.list_editable = function (instance) { // looking for new fields at the right var source_field = $(e.target).closest('[data-fieldname]') .attr('data-fieldname'); - var index = this._text_cursor(e.target); - if (index !== e.target.value.length) { return $.when(); } + var cursor = this._text_cursor(e.target); + if (cursor && !this._at_end(cursor, e.target)) { return $.when(); } var fields_order = this.editor.form.fields_order; var field_index = _(fields_order).indexOf(source_field); diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 5af7e5bf616..2b79701ba4d 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -120,7 +120,9 @@ instance.web.ActionManager = instance.web.Widget.extend({ if (this.getParent() && this.getParent().do_push_state) { if (this.inner_action) { state['title'] = this.inner_action.name; - state['model'] = this.inner_action.res_model; + if(this.inner_action.type == 'ir.actions.act_window') { + state['model'] = this.inner_action.res_model; + } if (this.inner_action.id) { state['action_id'] = this.inner_action.id; } @@ -178,7 +180,10 @@ instance.web.ActionManager = instance.web.Widget.extend({ }); }, do_action: function(action, on_close) { - if (_.isNumber(action) || _.isString(action)) { + if (_.isString(action) && instance.web.client_actions.contains(action)) { + var action_client = { type: "ir.actions.client", tag: action }; + return this.do_action(action_client); + } else if (_.isNumber(action) || _.isString(action)) { var self = this; return self.rpc("/web/action/load", { action_id: action }, function(result) { self.do_action(result.result, on_close); @@ -209,21 +214,30 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.dialog_stop(); this.clear_breadcrumbs(); }, - ir_actions_act_window: function (action, on_close) { - var self = this; - if (_(['base.module.upgrade', 'base.setup.installer']) - .contains(action.res_model)) { - var old_close = on_close; - on_close = function () { - instance.webclient.do_reload().then(old_close); - }; + + do_ir_actions_common: function(action, on_close) { + var self = this, klass, widget, add_breadcrumb; + if (action.type === 'ir.actions.client') { + var ClientWidget = instance.web.client_actions.get_object(action.tag); + widget = new ClientWidget(this, action.params); + klass = 'oe_act_client'; + add_breadcrumb = function() { + self.push_breadcrumb({ + widget: widget, + title: action.name + }); + } + } else { + widget = new instance.web.ViewManagerAction(this, action); + klass = 'oe_act_window'; + add_breadcrumb = widget.proxy('add_breadcrumb'); } if (action.target === 'new') { if (this.dialog === null) { // These buttons will be overwrited by
if any this.dialog = new instance.web.Dialog(this, { buttons: { "Close": function() { $(this).dialog("close"); }}, - dialogClass: 'oe_act_window' + dialogClass: klass }); if(on_close) this.dialog.on_close.add(on_close); @@ -231,7 +245,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.dialog_widget.destroy(); } this.dialog.dialog_title = action.name; - this.dialog_widget = new instance.web.ViewManagerAction(this, action); + this.dialog_widget = widget; this.dialog_widget.appendTo(this.dialog.$element); this.dialog.open(); } else { @@ -242,11 +256,34 @@ instance.web.ActionManager = instance.web.Widget.extend({ }); } this.inner_action = action; - var inner_widget = this.inner_widget = new instance.web.ViewManagerAction(this, action); - inner_widget.add_breadcrumb(); + this.inner_widget = widget; + add_breadcrumb(); this.inner_widget.appendTo(this.$element); } }, + + ir_actions_act_window: function (action, on_close) { + var self = this; + if (_(['base.module.upgrade', 'base.setup.installer']) + .contains(action.res_model)) { + var old_close = on_close; + on_close = function () { + instance.webclient.do_reload().then(old_close); + }; + } + if (action.target !== 'new') { + if(action.menu_id) { + this.dialog_stop(); + return this.getParent().do_action(action, function () { + instance.webclient.menu.open_menu(action.menu_id); + }); + } + } + return this.do_ir_actions_common(action, on_close); + }, + ir_actions_client: function (action, on_close) { + return this.do_ir_actions_common(action, on_close); + }, ir_actions_act_window_close: function (action, on_closed) { if (!this.dialog && on_closed) { on_closed(); @@ -262,16 +299,6 @@ instance.web.ActionManager = instance.web.Widget.extend({ self.do_action(action, on_closed) }); }, - ir_actions_client: function (action) { - this.dialog_stop(); - var ClientWidget = instance.web.client_actions.get_object(action.tag); - this.inner_widget = new ClientWidget(this, action.params); - this.push_breadcrumb({ - widget: this.inner_widget, - title: action.name - }); - this.inner_widget.appendTo(this.$element); - }, ir_actions_report_xml: function(action, on_closed) { var self = this; instance.web.blockUI(); @@ -477,6 +504,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ }); this.getParent().push_breadcrumb({ widget: this, + action: this.action, show: function(index, $e) { var view_to_select = views[index]; self.$element.show(); @@ -485,9 +513,27 @@ instance.web.ViewManager = instance.web.Widget.extend({ } }, get_title: function() { - return _.map(views, function(v) { - return self.views[v].controller.get('title'); + var id; + var currentIndex; + _.each(self.getParent().breadcrumbs, function(bc, i) { + if (bc.widget === self) { + currentIndex = i; + } }); + var next = self.getParent().breadcrumbs.slice(currentIndex + 1)[0]; + var titles = _.map(views, function(v) { + var controller = self.views[v].controller; + if (v === 'form') { + id = controller.datarecord.id; + } + return controller.get('title'); + }); + if (next && next.action.res_id && self.active_view === 'form' && self.model === next.action.res_model && id === next.action.res_id) { + // If the current active view is a formview and the next item in the breadcrumbs + // is an action on same object (model / res_id), then we omit the current formview's title + titles.pop(); + } + return titles; } }); }, diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 5d55a0ece15..29670c8e7de 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -518,25 +518,25 @@
+
    +
  • + + + + x +
  • +
  • + + + /web/binary/upload_attachment + + + + Add... + +
  • +
@@ -645,17 +645,14 @@ - - - - - + @@ -674,7 +671,6 @@ - @@ -1189,6 +1194,41 @@ + +
+ + + + + + + +
+ +
+
+
+
+
+
+ + + + or + + Cancel + + + + + + + + + + or Discard + + this.attr('t-if', 'views.length != 1'); @@ -1241,7 +1281,6 @@ - @@ -1266,7 +1305,6 @@

(Any existing filter with the same name will be replaced)

- @@ -1463,49 +1501,6 @@ - -
-
- - - - - - -
- -
-
-
-
- -
- - - - or - - Cancel - - - - - - - - - - or Cancel - - - - - - - @@ -1570,6 +1565,7 @@ + Export diff --git a/addons/web_calendar/__openerp__.py b/addons/web_calendar/__openerp__.py index 755d6fdb1f7..807d7927dc0 100644 --- a/addons/web_calendar/__openerp__.py +++ b/addons/web_calendar/__openerp__.py @@ -1,10 +1,7 @@ { "name": "Web Calendar", "category": "Hidden", - "description": - """ - OpenERP Web Calendar view. - """, + "description":"""OpenERP Web Calendar view.""", "version": "2.0", "depends": ['web'], "js": [ diff --git a/addons/web_dashboard/__openerp__.py b/addons/web_dashboard/__openerp__.py index a48b3f9c0f5..54f9ae294ac 100644 --- a/addons/web_dashboard/__openerp__.py +++ b/addons/web_dashboard/__openerp__.py @@ -1,10 +1,7 @@ { "name": "Web Dashboard", "category": "Hidden", - "description": - """ - OpenERP Web Dashboard view. - """, + "description":"""OpenERP Web Dashboard view.""", "version": "2.0", "depends": ['web'], "js": [ diff --git a/addons/web_diagram/__openerp__.py b/addons/web_diagram/__openerp__.py index 247506cf581..eda044f686f 100644 --- a/addons/web_diagram/__openerp__.py +++ b/addons/web_diagram/__openerp__.py @@ -1,7 +1,7 @@ { "name" : "OpenERP Web Diagram", "category" : "Hidden", - "description":'Openerp Web Diagram view', + "description":"""Openerp Web Diagram view.""", "version" : "2.0", "depends" : ["web"], "js": [ diff --git a/addons/web_gantt/__openerp__.py b/addons/web_gantt/__openerp__.py index 3357dbae53f..09528016c4c 100644 --- a/addons/web_gantt/__openerp__.py +++ b/addons/web_gantt/__openerp__.py @@ -1,10 +1,7 @@ { "name": "Web Gantt", "category": "Hidden", - "description": - """ - OpenERP Web Gantt chart view. - """, + "description":"""OpenERP Web Gantt chart view.""", "version": "2.0", "depends": ['web'], "js": [ diff --git a/addons/web_graph/__openerp__.py b/addons/web_graph/__openerp__.py index 84412a9c240..31c66863ebf 100644 --- a/addons/web_graph/__openerp__.py +++ b/addons/web_graph/__openerp__.py @@ -1,14 +1,16 @@ { "name": "Graph Views", "category" : "Hidden", - "description":"""Graph Views for Web Client + "description":""" +Graph Views for Web Client. +=========================== -* Parse a view but allows changing dynamically the presentation -* Graph Types: pie, lines, areas, bars, radar -* Stacked/Not Stacked for areas and bars -* Legends: top, inside (top/left), hidden -* Features: download as PNG or CSV, browse data grid, switch orientation -* Unlimited "Group By" levels (not stacked), two cross level analysis (stacked) + * Parse a view but allows changing dynamically the presentation + * Graph Types: pie, lines, areas, bars, radar + * Stacked/Not Stacked for areas and bars + * Legends: top, inside (top/left), hidden + * Features: download as PNG or CSV, browse data grid, switch orientation + * Unlimited "Group By" levels (not stacked), two cross level analysis (stacked) """, "version": "3.0", "depends": ['web'], diff --git a/addons/web_hello/__openerp__.py b/addons/web_hello/__openerp__.py index b7e17a520a8..0c733fb6b64 100644 --- a/addons/web_hello/__openerp__.py +++ b/addons/web_hello/__openerp__.py @@ -1,10 +1,7 @@ { "name": "Hello", "category": "Hidden", - "description": - """ - OpenERP Web example module. - """, + "description":"""OpenERP Web example module.""", "version": "2.0", "depends": [], "js": ["static/*/*.js", "static/*/js/*.js"], diff --git a/addons/web_kanban/__openerp__.py b/addons/web_kanban/__openerp__.py index 8a769342461..d283acfe91f 100644 --- a/addons/web_kanban/__openerp__.py +++ b/addons/web_kanban/__openerp__.py @@ -1,10 +1,7 @@ { "name" : "Base Kanban", "category": "Hidden", - "description": - """ - OpenERP Web kanban view. - """, + "description":"""OpenERP Web kanban view.""", "version" : "2.0", "depends" : ["web"], "js": [ diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 51cdc568a1e..5830cb33e0f 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -1,3 +1,4 @@ +@charset "utf-8"; .openerp .oe_kanban_view { background: url(/web/static/src/img/form_sheetbg.png); height: inherit; @@ -49,7 +50,7 @@ .openerp .oe_kanban_view .oe_kanban_group_title { font-size: 16px; font-weight: bold; - min-height: 30px; + min-height: 32px; color: #333333; text-shadow: 0 1px 0 white; } @@ -525,3 +526,44 @@ padding: 0px; background: white; } + +.openerp .oe_popup_form .oe_kanban_buttons .oe_highlight { + color: #404040; + background: none; +} +.openerp .oe_popup_form .oe_kanban_buttons button.oe_highlight { + background-color: #efefef; + background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8)); + background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8); + background-image: -moz-linear-gradient(top, #efefef, #d8d8d8); + background-image: -ms-linear-gradient(top, #efefef, #d8d8d8); + background-image: -o-linear-gradient(top, #efefef, #d8d8d8); + background-image: linear-gradient(to bottom, #efefef, #d8d8d8); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} +.openerp .oe_popup_form .oe_kanban_buttons button.oe_highlight:active { + background-color: #e3e3e3; + background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)); + background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -moz-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -ms-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: -o-linear-gradient(top, #e3e3e3, #f6f6f6); + background-image: linear-gradient(to bottom, #e3e3e3, #f6f6f6); + -moz-box-shadow: none; + -webkit-box-shadow: none; + -box-shadow: none; +} +.openerp .oe_popup_form .oe_kanban_buttons button.oe_highlight:hover { + background-color: #f6f6f6; + background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3)); + background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -moz-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -ms-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3); + background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; + -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; +} diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index 6478ea5b213..44b3251c8fb 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -1,6 +1,15 @@ @charset "utf-8" // Mixins {{{ +@mixin vertical-gradient($startColor: #555, $endColor: #333) + background-color: $startColor + background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */ + background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */ + background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */ + background-image: linear-gradient(to bottom, $startColor, $endColor) + @mixin radial-gradient($gradient) background-position: center center background-image: -webkit-radial-gradient(circle, $gradient) @@ -64,7 +73,7 @@ .oe_kanban_group_title font-size: 16px font-weight: bold - min-height: 30px + min-height: 32px color: #333333 text-shadow: 0 1px 0 white > span @@ -439,5 +448,22 @@ padding: 0px background: #ffffff +.openerp + .oe_popup_form + .oe_kanban_buttons + .oe_highlight + color: #404040 + background: none + button.oe_highlight + @include vertical-gradient(#efefef, #d8d8d8) + @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) + button.oe_highlight:active + @include vertical-gradient(#e3e3e3, #f6f6f6) + @include box-shadow(none) + button.oe_highlight:hover + @include vertical-gradient(#f6f6f6, #e3e3e3) + @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset)) + + // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 50360683c14..69e97384b03 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -295,10 +295,10 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ if (!group.state.folded) { if (182*unfolded>=self.$element.width()) { group.$element.css('width', "170px"); - } else if (262*unfolded>self.$element.width()) { - group.$element.css('width', Math.round(100/unfolded) + '%'); - } else { + } else if (262*unfolded').addClass('oe_bounce'); + } + } + }); this.$records.find('.oe_kanban_show_more').click(this.do_show_more); if (this.state.folded) { this.do_toggle_fold(); diff --git a/addons/web_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index 7eb453371b2..820189c7b27 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -13,7 +13,7 @@
- diff --git a/addons/web_mobile/__openerp__.py b/addons/web_mobile/__openerp__.py index cd5a4836a5a..614315a8a83 100644 --- a/addons/web_mobile/__openerp__.py +++ b/addons/web_mobile/__openerp__.py @@ -1,10 +1,7 @@ { "name" : "OpenERP Web Mobile", "category": "Hidden", - "description": - """ - OpenERP Web Mobile. - """, + "description":"""OpenERP Web Mobile.""", "version" : "2.0", "depends" : [], 'auto_install': True, diff --git a/addons/web_process/__openerp__.py b/addons/web_process/__openerp__.py index b488ddb95d2..9aea38a0676 100644 --- a/addons/web_process/__openerp__.py +++ b/addons/web_process/__openerp__.py @@ -1,10 +1,7 @@ { "name" : "Process", "version": "2.0", - "description": - """ - OpenERP Web process view. - """, + "description":"""OpenERP Web process view.""", "depends" : ["web_diagram"], "js": [ 'static/lib/dracula/*.js', diff --git a/addons/web_rpc/__openerp__.py b/addons/web_rpc/__openerp__.py index 27ec39f5748..44946d27cb5 100644 --- a/addons/web_rpc/__openerp__.py +++ b/addons/web_rpc/__openerp__.py @@ -1,7 +1,7 @@ { "name" : "OpenERP Web Web", "category" : "Hidden", - "description":'Openerp Web Web', + "description":"""Openerp Web Web.""", "version" : "2.0", "depends" : [], "installable" : False, diff --git a/addons/web_tests/__openerp__.py b/addons/web_tests/__openerp__.py index dc26ecc42ad..b76028b9418 100644 --- a/addons/web_tests/__openerp__.py +++ b/addons/web_tests/__openerp__.py @@ -1,10 +1,7 @@ { "name": "Tests", "category": "Hidden", - "description": - """ - OpenERP Web test suite. - """, + "description":"""OpenERP Web test suite.""", "version": "2.0", "depends": [], "js": ["static/src/js/*.js"],