Commit Graph
467 Commits
Author SHA1 Message Date
Christophe Simonis 65a5ced979 [MERGE] forward port branch saas-14 up to 777a87cde8 2017-03-13 17:37:20 +01:00
Christophe Simonis 777a87cde8 [MERGE] forward port branch 10.0 up to 2ef43281c2 2017-03-13 16:22:57 +01:00
Denis Ledoux cde8668034 [FIX] web: IE <= 11.0 doesn't support ChildNode.remove
IE 11.0 doesn't support `Childnode.remove`:
http://caniuse.com/#feat=childnode-remove

As a workaround, we use `Node.removeChild`,
which is more widely supported.

opw-710617
2017-03-06 18:21:06 +01:00
Christophe Simonis 68176d80ad [MERGE] forward port branch saas-14 up to eddefc9948 2017-03-01 16:49:15 +01:00
Christophe Simonis eddefc9948 [MERGE] forward port branch 10.0 up to 8c55e57c7f 2017-03-01 16:14:41 +01:00
Géry Debongnie 678ea26f99 [FIX] web: fix fuzzy search algorithm in app switcher
The fuzzy search score algorithm is quite simple, but had an interesting
problem: for the search string 'AB DEF', the result 'XXAXXBXXXXXXX DEF' had
a higher score than the result 'ABX X DEF", because it has 4 consecutive
matching characters.

This commit slightly tweak the algorithm to take space into account, but
to make sure they are not used to compound the score for a string.  This
means that space characters are not ignored, but are not really
as important as a normal character.
2017-02-28 15:01:24 +01:00
Fabien Meghazi 3c8a2bcaf0 [FIX] qweb2.js: fix erratic object type detection in foreach (Fixes #15655)
Could not add a test as the qweb js testsuite is broken and it's xml
test files have been modified in order to test qweb.py specific cases.
2017-02-28 13:11:24 +01:00
Fabien Meghazi 38ec6d7522 [FIX] qweb2.js: fix erratic object type detection in foreach (Fixes #15655)
Could not add a test as the qweb js testsuite is broken and it's xml
test files have been modified in order to test qweb.py specific cases.
2017-02-28 13:00:54 +01:00
qsm-odoo 198673bf35 [ADD] web_editor, website, web: new LESS editor
The old "HTML" editor now handles LESS edition. The editor has now a
button to switch between XML and LESS edition. By default, it only
displays the odoo files which only appear in the assets_frontend bundle
and in debug mode, it allows to see all the files that influenced the
page design.

The new editor has a new set of options which allows to use it as a
xml editor only or a less editor only if needed.

Also: make the "include bundles" option appear only in debug mode.

Technical details:

- When saving a modified LESS file, an attachment is created with the
full modified content and an extension view xpaths the bundle where
the original file was added to link this attachment instead. This
relies on the fact that qweb, when generating assets bundle,
replaces missing files by the "datas" contents of the ir.attachment's
which have an "url" field equal to the urls it is searching.

- If a LESS error is introduced, the recent changes in assets bundle
generation (see c248674a5c) will not break
the design but only open a dialog on page loading, with the LESS error.
The user can then go to the LESS editor and reset its changes.

This feature code has been started with original work of @pga-odoo
2017-02-14 16:37:23 +01:00
fwi-odoo 7015ec5062 [IMP] web: update fontawesome 4.5.0 to 4.7.0 2017-02-14 14:14:42 +01:00
fwi-odoo ad6fd5f838 [REF] web: update bootstrap-datetimepicker lib and adapt datepicker widget
from 3.0.3 to 4.17.42
2017-01-30 10:29:27 +01:00
fwi-odoo c5af1d215f [REF] web: update momentjs lib
From 2.8.1 to 2.9.0
2017-01-30 10:29:21 +01:00
fwi-odoo 9a3ad41cfa [FIX] web: change selection color in the correct file
Fix commit 537b919ec2
Don't change the lib file directly.
2016-11-21 10:53:02 +01:00
fwi-odoo 537b919ec2 [IMP] web: darker highlight selection 2016-11-21 09:45:14 +01:00
qsm-odoo dd560377e2 [IMP] web: improve traceback reporting
* Do not assault the user with a full traceback on bug, but indicates
an error occured and allow him to toggle the traceback
* Automatically scroll the traceback to the end (better for python
errors)
* Propose the user to report the traceback by using a new "Copy"
button which correctly copies the full error + traceback
2016-11-02 13:26:00 +01:00
Martin Geubelle aa19d9edd0 [REF] web: update nestedSortable lib 1.3.5 -> 2.1a 2016-09-28 16:55:51 +02:00
Christophe Matthieu 0777af3e60 [IMP] qweb: Add extra condition branching (t-elif) (closes #3b3dbcd)
To have the same feature client and server side (t-elif was added in the qWeb client side)
2016-09-19 11:24:56 +02:00
qsm-odoo d83f7587aa [MOV] web, website(_slides): move PDFjs lib to web
website_sign is now a backend-only module in enterprise, so it should
not use a website library (even in a static way).
2016-09-13 14:18:31 +02:00
Fabien Meghazi 75f60f6941 [ADD] web: Add extra condition branching (t-elif, t-else)
A new preprocess method is added to the template engine in order to do
preprocessing/sanitization of the templates before compilation.
This method can be overloaded in order to add new features such as
translation, ...
2016-09-09 18:03:08 +02:00
qsm-odoo b6b3e156a0 [IMP] web, website(_quote): move jSignature lib location (website -> web)
The jSignature lib is now used by non-frontend module (at least it
will be in upcoming commits).
2016-09-05 15:01:21 +01:00
Adrien Dieudonne 3029857bad [REF] web, website: move jQuery UI Nested Sortable lib
As this lib will be used in the backend, it is moved to assets common.
2016-09-01 14:06:21 +02:00
Christophe Matthieu 0f80e18f4a [FIX] web: ace: implement scrollIntoViewIfNeeded for firefox
When we use firefox top or bottom arrow the ace container does not scroll automatically if the cursor is not visible.
2016-08-24 16:39:33 +02:00
Christophe Matthieu 7032346cec [IMP] web: use not minified version of ace lib 2016-08-23 17:03:56 +02:00
Christophe Matthieu 6d04c70abe [IMP] web: add ace editor for xml and python edition
* display all lines and don't display the scroll bar into ace editor
* lazy read ace lib and add missing lib file
* use not minified version of ace lib
* Move ace lib from website to web
* Added ace widget for webclient
* XML mode for view text box
* Python mode for server action text box
* Removed web_ace_editor.xml, instead added template in base.xml itself
* Added widget=ace_editor in compute field of ir.model.fields
2016-08-23 17:03:56 +02:00
Christophe Matthieu 5aac400e33 [IMP] qweb: use CDATA in test and remove stringify_children method 2016-06-27 14:29:04 +02:00
Christophe Matthieu 15e1f88a73 [FIX] qweb: fix t-if and t-else and add test
Can not use remove with the loop for in (in _compile_directive_content)
2016-06-27 08:08:00 +02:00
Christophe Matthieu 956bb2b6e9 [IMP] base ir.qweb: add and update tests for the new ir.qweb 2016-06-14 09:46:25 +02:00
Christophe Simonis 4b542b0484 [~MERGE] forward port of odoo/enterprise branch saas-10 up to odoo/enterprise@5ca7d8bc31
NOTE: all .po files haven't been forward-ported due to conflicts. Once
.pot updated, the auto-match of transifex should get them back.
2016-05-04 17:10:00 +02:00
Géry Debongnie 782a4466fe [IMP] web: better fuzzy search
The goal of this commit is to have better search results when fuzzy
searching.  Before this commit, the position of a match was irrelevant
to the search results.  After, a match in a first position has more
weight than a match in last position.  This is better, because we often
want to find results using the first letters.

This is controversial, but I could not find a better way to do this
without rewriting the whole library myself (which might not be a bad
idea, it is only 50 lines long)
2016-05-04 14:46:46 +02:00
Yannick Tivisse f321466a69 [ADD] web: Library to make fuzzy searches
https://github.com/mattyork/fuzzy
2016-04-27 14:14:54 +02:00
Aaron Bohy 977db823c7 [REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

Mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files
2016-04-21 15:21:39 +02:00
Rohan Patel cdc26d14bd [UPDATE] web: Upgrade fontawesome to 4.5.0 2016-03-18 12:18:34 +01:00
Christophe Matthieu 7fdd33c47b [IMP] web: move ZeroClipboard lib into website_links addon 2016-02-17 09:47:46 +01:00
Christophe Matthieu 831246fc9d [IMP] web: remove spin lib and replace by an image with css to spin 2016-02-17 09:47:46 +01:00
Christophe Matthieu 0208b91def [IMP] web: remove useless jquery.validate lib 2016-02-17 09:47:46 +01:00
Christophe Matthieu 1c02be8974 [IMP] web: remove useless jquery.notify lib 2016-02-17 09:47:46 +01:00
Christophe Matthieu a56f27a3c9 [IMP] web: reduce jquery-ui lib (remove useless modules)
Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, sortable.js, autocomplete.js, datepicker.js, menu.js, tooltip.js
2016-02-17 09:47:46 +01:00
Christophe Matthieu 1a2b1e69dd [IMP] web: remove useless jQuery.timeago lib
Replace call by moment(date).fromNow()
2016-02-17 09:47:45 +01:00
Christophe Matthieu 8d90abc66a [IMP] web: remove useless jquery.textext lib 2016-02-17 09:47:45 +01:00
Christophe Matthieu 63bbb87032 [IMP] web: reduce nv.d3 files size (remove useless models)
https://github.com/novus/nvd3

grunt concat:
css.src: ['src/css/axis.css', 'src/css/scatter.css', 'src/css/tooltip.css', 'src/css/bars.css', 'src/css/lines.css', 'src/css/main.css', 'src/css/pie.css']
js.src: ['src/core.js', 'src/dom.js', 'src/interactiveLayer.js', 'src/tooltip.js', 'src/utils.js', 'src/models/axis.js', 'src/models/scatter.js', 'src/models/multiBar.js', 'src/models/legend.js', 'src/models/lineChart.js', 'src/models/line.js', 'src/models/discreteBarChart.js', 'src/models/pieChart.js', 'src/models/discreteBar.js', 'src/models/multiBarChart.js', 'src/models/pie.js']
2016-02-17 09:47:45 +01:00
Christophe Simonis 1231585df1 [MERGE] forward port of branch saas-9 up to 78d20b5 2016-01-27 12:27:01 +01:00
Christophe Simonis 4bbddc7476 [MERGE] forward port of branch saas-6 up to 48639d4 2016-01-27 12:10:29 +01:00
Nicolas Lempereur b783d2d1c4 [FIX] web: allow view with arabic date saving
When editing a form with the arabic language, the date is formatted in
arabic. But the version of the Moment.js library we use for this had
inconsistencies and parsing the arabic date could not work.

Hence, saving would not work since date field values would be invalid.

This commit cherry-pick http://momentjs.com/ commits which solves that:

  from version 1.8.4: https://github.com/moment/moment/commit/c9023b5
  from version 1.9.0: https://github.com/moment/moment/commit/bd328d5

closes #10634
opw-660453
2016-01-27 08:42:41 +01:00
Géry Debongnie 06e583e1fd [FIX] web: change qweb to work around phantomjs bug
This commit does not actually fix qweb2.js, but it works around a
phantomjs bug.  The problem with phantomjs is that in some situations,
the xmlhttprequests are dropped with a status 0.  It is most likely
related to the issue:

    https://github.com/ariya/phantomjs/issues/11195

In our testing framework, it seems to appear when requests sent before
the 'load' event of phantomjs are received after, and also when those
requests are listened with the onreadystatechange handler.

The bug does not appear if we use addEventListener with the 'load' event (at
least, not for a few builds)

This commit does not worsen qweb, and it is also a small improvement in
style (in my opinion).
2016-01-26 14:22:56 +01:00
Géry Debongnie e0985d2a2d [REM] web: remove autosize library
we have our own custom version now => autoresize, currently located in
utils.js
2016-01-20 14:42:21 +01:00
Richard Mathot c9c08adbd0 [FIX] qweb2.js: improve debugging 2016-01-05 09:27:51 +01:00
Antonio Espinosa 6cdcdb8724 [FIX] web: datejs Spanish long format
From:  miércoles, 04' 4e 'noviembre' 4e '2015 10:48:19
To:    miércoles, 04 de noviembre de 2015 10:48:19

Closes #9910
2015-12-09 08:56:00 +01:00
Christophe Simonis 56a442e205 [MERGE] forward port of branch saas-6 up to dade7e3 2015-11-25 13:26:02 +01:00
Denis Ledoux 32fd520d97 [MERGE] forward port of branch 8.0 up to 6f29cbe 2015-11-23 17:40:15 +01:00
Xavier Morel c6d6ae8aec [FIX] qweb: handle unicode tags and attributes
closes #8895
2015-11-19 14:59:44 +01:00