summaryrefslogtreecommitdiff
path: root/addons/web/static/lib
AgeCommit message (Collapse)Author
2019-04-01[IMP] web: remove nvd3 libraryMathieu Duckerts-Antoine
It has been decided to use Chart.js instead of nvd3 to render charts. Now that nvd3 is no more in use, we remove it. Task ID: 1946138
2019-04-01[IMP] web: add library Chart.jsMathieu Duckerts-Antoine
This commit makes possible to use the Chart.js library to create various charts. Task ID: 1946138
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-21[MERGE] forward port branch saas-12.1 up to 6878c9f3424Christophe Simonis
2019-03-19[MERGE] forward port branch 12.0 up to 82c4393fd02Christophe Simonis
2019-03-18[MERGE] forward port branch saas-11.3 up to 4e39328a76aChristophe Simonis
2019-03-18[MERGE] forward port branch 11.0 up to 7e33b547714Christophe Simonis
2019-03-18[MERGE] forward port branch saas-15 up to c6353942ffdChristophe Simonis
2019-03-18[MERGE] forward port branch saas-14 up to 5162ca7be7dChristophe Simonis
2019-03-18[MERGE] forward port branch 10.0 up to 36ba37a7a1cChristophe Simonis
2019-03-12[FIX] web: qweb2: allow null values in a foreach iterationDenis Vermylen
Before this commit iteration in a t-foreach containing null or undefined values crashed because they have no attributes. closes odoo/odoo#31828 Signed-off-by: Fabien Meghazi <amigrave@users.noreply.github.com>
2019-03-12[FIX] web: correctly display crashes in firefoxAaron Bohy
After the update of jQuery, crashes were no longer displayed (in dialogs) on browsers using the unhandled-rejection-polyfill lib (e.g. firefox). This was due to a bad conversion from ES6 to ES5. Issue reported on the jquery update pad. closes odoo/odoo#31767 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-07[FIX] web: bad conversion from ES6 to ES5Aaron Bohy
We had to manually convert the unhandled-rejection-polyfill lib, and we forgot to replace this by self in two arrow functions. This was causing crashes e.g. on Firefox. We also forgot some uses of const, which is not really an issue as const is supported on all browsers, but it is not ES5. Issue reported on the jquery update pad. closes odoo/odoo#31658 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-06[ADD] web: unhandled-rejection-polyfill libAaron Bohy
2019-03-06[IMP] web: qunit: add hook at end of each testAaron Bohy
This hook will be used to check that there are no leftovers in the DOM.
2019-03-06[REF] web: update qunit to v2.9.1David Monjoie
The new version of qunit better reports failures of promises then the previous version.
2019-03-06[REF] web: update select2 to v3.5.4David Monjoie
2019-03-06[REF] web: update jquery.ui to v1.12.1David Monjoie
2019-03-06[REF] web: update jquery to v3.3.1David Monjoie
Part of task 1896658
2019-03-06[ADD] web: es6-promise polyfill libAaron Bohy
2019-02-22[MERGE] forward port branch saas-12.1 up to 0f4abc5c228Christophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-12[FIX] web: quotes and backslashes in search viewMathieu Duckerts-Antoine
The commit 6d3ada178f7caf6ea159b871648ca4c440c7845b aimed to solve problems occuring whith (single or double) quotes when creating new custom filters. Unfortunately, the point was missed and bugs were still present. The present commit solves the orginial problem satisfactorily. There was also a problem in the management of backslashes. Type '\\' in the search bar would lead to a domain like [('...', 'ilike', '\\\\\\\\\\\\\\\\')]. This has also been fixed. Note that it is necessary to input "\\" if one is looking for a backslash in db (as before). A remark on the _formatAST function (py_utils.js): We deescape only the chars `'`, `"`, and `\` because it does not seem possible to produce a string in the search view that would intend a search for a line return or a tab for example. A general remark: Domains should always be in normalized form. In that way they could be manipulated and combined together without a tokenization/parsing! closes odoo/odoo#29756
2019-02-11[MERGE] forward port branch saas-12.1 up to 93d736e905eChristophe Simonis
2019-02-27[FIX] web: remove bootstrap sourceMappingURLqsm-odoo
Same as https://github.com/odoo/odoo/commit/8e17223c260add842d83b2549d7bdaa4c3cc4d6c Part of https://github.com/odoo/odoo/pull/31401 task-1944790
2019-02-27[IMP] web: update bootstrap 4.2.1 -> 4.3.1qsm-odoo
See https://blog.getbootstrap.com/2019/02/11/bootstrap-4-3-0/ and https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/ Again, some fixes were added in this version and not in a 4.2.x version so there is no clean way to backport them in 12.0 / saas-12.2. If needed, the file bootstrap_review.scss is there for that. Among the new features, two notable ones: - The '.modal-dialog-scrollable' class which does what odoo already implemented for all its modals. So we could remove our custom code in a next update. - Responsive font sizes ! Plan was to develop something similar for the website, so this comes at the right time. The behavior is opt-in, we will enable it in a next update. Part of https://github.com/odoo/odoo/pull/31401 task-1944790
2019-02-15[FIX] web: quotes and backslashes in search viewMathieu Duckerts-Antoine
The commit 6d3ada1 aimed to solve problems occuring whith (single or double) quotes when creating new custom filters. Unfortunately, the point was missed and bugs were still present. The present commit solves the orginial problem satisfactorily. There was also a problem in the management of backslashes. Type '\\' in the search bar would lead to a domain like [('...', 'ilike', '\\\\\\\\\\\\\\\\')]. This has also been fixed. Note that it is necessary to input "\\" if one is looking for a backslash in db (as before). A remark on the _formatAST function (py_utils.js): We deescape only the chars `'`, `"`, and `\` because it does not seem possible to produce a string in the search view that would intend a search for a line return or a tab for example. A general remark: Domains should always be in normalized form. In that way they could be manipulated and combined together without a tokenization/parsing! closes odoo/odoo#31025
2019-02-13[FIX] web: moment lib: update es localeLucas Perais (lpe)
The parsing/formatting of abbreviated month name was broken. The locale es in its version for moment 2.22.0 fixes it OPW 1931272 closes odoo/odoo#31104
2019-01-31[FIX] web: correct tempusdominus lib patchingChristophe Simonis
Oversight of previous forward-port.
2019-01-31[MERGE] forward port branch saas-11.3 up to aeed32d4ffdChristophe Simonis
2019-01-30[MERGE] forward port branch 11.0 up to 1dbe4ea0d7fChristophe Simonis
2019-01-30[FIX] web: support full attribute syntaxMartin Trigaux
Only the syntax <t t-operation="attributes"> <attribute name="foo">bar</attribute> </t> was currently supported for attributes while the syntax <t t-operation="attributes"> <attribute name="foo" value="bar" /> </t> Is also correct and supported server side. Using value instead of the node content is needed to avoid translating the node while it is parsed by babel to extract translatable content
2019-01-31[MERGE] forward port branch 12.0 up to cb8fefa8999Christophe Simonis
2019-02-05[IMP] web: add JS-related lib files for ace editorAndrea Ulliana
In task handled in https://github.com/odoo/odoo/pull/29999, we will need support for javascript files in ace editor. This commit adds the related lib files. See https://ace.c9.io/#extending-highlighters: https://github.com/ajaxorg/ace/tree/master/lib/ace/mode 1. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/doc_comment_highlight_rules.js 2. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript_highlight_rules.js 3. https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript.js task-1919350
2019-02-04[MERGE] forward port branch saas-12.1 up to 4524ad06a8aChristophe Simonis
2019-01-29[FIX] web: current dateNicolas Martinelli
- Set the OS in a timezone such as the current day is different from the day in UTC (e.g. America/Nome before 10:00 AM or Australia/Melbourne after 3:00 PM) - Open any datepicker - The 'little triangle' indicating the current day is wrongly set (one day before or after) Knowing that Odoo always creates momentjs date and datetime with the `UTC` flag set to `true`, the `bootstrap-datetimepicker` does something which seems inconsistent. First, it retrieves the `viewDate`, and sets it to the beginning of the month and week in: https://github.com/odoo/odoo/blob/1c6c504215f3ef09e6336c92c9d350e87599eaa1/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js#L725 In this part, it is important to note that each `startOf` functions called sets the hours/minutes/seconds to zero. It means that the reference time is changed. Then, it iterates on this newly created date, and determines `today` by comparing it to `getMoment()` in: https://github.com/odoo/odoo/blob/1c6c504215f3ef09e6336c92c9d350e87599eaa1/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js#L748 However, `getMoment()` returns the current date and time, but with the `UTC` flag set to `false`. Therefore, we compare a UTC datetime on which the reference time has been changed to a non-UTC datetime, which fails to give the appropriate current day. There are two approaches to solve this. The first possibility is to change the way Odoo defines momentjs dates and datetimes, maybe by removing the `UTC` flag at creation. This sounds like a bad idea, since other widgets or views (such as the calendar or the pivot view) make use of them. This is likely to introduce a bunch of new issues with TZ in these views. The second approach is patching the library to fit our use. Although we usually don't do such a thing, this allows to specifically solve this use case, and in particular placing the 'small triangle' at the appropriate date without impacting any other part of the system or the library. It can be easily performed by comparing the dates and the months to make it work. opw-1915251 closes odoo/odoo#30538
2018-12-12[MERGE] forward port branch 12.0 up to 047e2b28de4Christophe Simonis
2018-12-07[REF] point_of_sale,web: move backbone to posGéry Debongnie
This rev. moves the backbone library from web to pos, as one of its two usecases (the search view) has just been removed. From now on, it is only used in the pos. Part of task 1893568
2018-12-06[FIX] web: prevent crash when searching for escaped stringsGéry Debongnie
Recent works in the search view (in 12.0) on dynamic filters had an unfortunate effect: when the user tries to input escaped strings (for example "test" in custom filters, there was a crash. The reason is that the JS python parser (or more specifically, the tokenizer) was unable to parse that as a string. It worked before because the web client sent the raw string to the server. However, with dynamic filters, this is no longer the case, and we need to parse domains to be able to combine them. In this commit, we modify the tokenizer to be able to work with escaped strings. closes odoo/odoo#29324
2018-11-29[MERGE] forward port branch 12.0 up to 82a1e1dcc33Christophe Simonis
2019-01-09[FIX] web: remove bootstrap sourceMappingURLqsm-odoo
Same as https://github.com/odoo/odoo/commit/8e17223c260add842d83b2549d7bdaa4c3cc4d6c
2019-01-09[IMP] web: update bootstrap from 4.1.3 to 4.2.1qsm-odoo
This commit only updates the existing bootstrap files and add the new ones the update brings.
2018-10-19[IMP] web: remove es5 shimVincent Schippefilt
The library es5 shim was usefull for older browsers that do not implement completely the es5 specifications, like IE9. As we do not support browsers older than IE11, that fully supports all the features of es5, the library has become useless. Removing this library will remove a little bit of noise in the callstack when debugging. closes odoo/odoo#27877
2018-11-26[FIX] web: fielddate[time] should select their value when entering themLucas Perais (lpe)
Before this commit, when focusing on a date[time] field, the value was not selected In v11.0, it was This is due mostly because of the migration to BootStrap 4 After this commit, the value inside the input is selected OPW 1911333 closes odoo/odoo#28989
2018-09-17[FIX] web: remove bootstrap sourceMappingURLXavier Morel
We're not shipping the sourcemap files, and while the assets minifier strips out the mappings they're getting hit in debug=assets which is bot useless and problematic when running odoo-bin without a proxy for static folders: if sourcemaps are enabled (which is apparently the default in all browsers if devtools are opened at this point) the browser tries to fetch the sourcemap, which does through the SharedDataMiddleware which doesn't find them and passes the query on to the regular Application which goes through the entire dispatch & NotFound process. If website is installed, that process ends up rendering website.404, which can be pretty costly until everything is properly cached: # initial request "GET /web/static/lib/bootstrap/js/index.js.map HTTP/1.1" 404 - 319 0.198 0.954 # a few requests later "GET /web/static/lib/bootstrap/js/index.js.map HTTP/1.1" 404 - 27 0.022 0.060 And the way sourcemaps are fetched (might be headers, might be the stampede as browsers will try to fetch a dozen sourcemaps as fast as possible) seems to make this problem much, much worse: instead of 300+ the requests take 800+ queries each, multiple seconds, and requests get worse as time goes on (didn't investigate the exact reason for that) *and* they apparently don't ever get cached (at least they don't after half a dozen reloads of the client).
2018-09-07[MERGE] forward port branch saas-11.4 up to d78f23df848Christophe Simonis
2018-08-13[FIX] web: fix JavaScript qweb and activate testsChristophe Matthieu
Fix the issue of the t-esc display the content before the tag. Activate qweb qunit test (same test for the JavaScript and python) Use the same behavior as python: keep attributes order, and display content as default value when the variable is falsy.
2018-08-09[IMP] pyjs: add date/datetime utilitiesAdrian Torres
Introduce utilities to calculate the start / end of a period given a date or datetime object in the JS python interpreter. This commit is the JS implementation of commit 960360afe478a8f7b9c456721b5591154952a37d
2018-08-06[FIX] ClipboardJS update for Bootstrap Modals focus issue in ChromeDavid Beguin
Since Bootstrap 4, ClipboardJS does not copy the value in the clipboard anymore as Bootstraps modals give the focus to another element. As the focus need to be given back to the correct element, ClipboardJS has to be updated as the container parameter is only added in v1.7. We were in 1.5. That container parameter allow to give the focus back to the correct element. See doc on https://clipboardjs.com/ + Issue : https://github.com/zenorocha/clipboard.js/issues/155
2018-07-27[FIX] web: restore datepicker lib patchesqsm-odoo
Patches were introduced by Odoo in the lib and have been removed while updating it to "tempus dominus". This commit restores them. See: - https://github.com/odoo/odoo/commit/3741603495532e218b66f3cfa0272e4536f1cf2c - https://github.com/odoo/odoo/commit/ab42507d460125c5ee81bb6b4b859146494339ac