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)
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
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/bd328d5closes#10634
opw-660453
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).
This commit was necessary to fix weird problems in 9.0-nightly.
Phantomjs and the old nvd3 implementations did not play well together.
* transitionDuration() replaced by duration()
* tooltips() & tooltipContent replaced by tooltip.enable and tooltip.contentGenerator
* remove useless less for tooltip
Thanks to mge for his help
* select2 was linked in both backend and frontend (by web and website)
* select2-bootstrap was in website and linked only in frontend but it
is in fact needed in backend too
+ Remove useless link of the lib by other modules
The datejs globalisation files are loaded based on the user's language.
If the file is not present, the loading crashed and the user could not access to
the web client.
Adding empty files for lo_LA and renaming bs-BS.js to bs-BA.js for bs_BA (see
65d92da) that were missing.
By the way, this is a 0 bit commit, beat that!
The testing framework was done with an old version of qunit. We had to
program our layer on top of it to provide support for promises in tests.
The last version of qunit now supports promises, and the testing
framework needs to be reworked anyway with the new modules.
When providing an args of ``null`` (or ``undefined``) and a non-empty
kwargs, the kwargs would be removed/ignored.
While explicitly providing a null args is not necessary, it's perfectly
valid.