summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/utils.js
AgeCommit message (Collapse)Author
2018-02-21[MERGE] forward port branch 9.0 up to e544ec8df70Christophe Simonis
2018-02-20[FIX] web, web_editor: Better email validation with regex (JS)Romain Derie
This commit improves link creation in web editor. Before this commit, anything with a @​ would be considered as valid email which is obviously not the case. It would then be prefixed by 'mailto:'. This was causing 2 issues: - URL with @​ symbol in it would have 'mailto:' added as prefix, like google maps coordinates. eg: mailto:http://www.google.com/maps/whatever/@​312211.22,321321 - Incorrect emails would go through (eg: @​@​@​, ko@​k@​k@​, mail@​mail) Now, we will try to detect and identify valid emails from invalid emails from URLs. It will also handle 'mailto:' directly typed in the input. This commit comes with it's counterpart in enterprise https://github.com/odoo/enterprise/pull/1859 This closes #11984, closes #22936 Note that there is a WIP in master to use this new is_email function everywhere we try to validate emails. It will aim to uniformize email validation in odoo's javascript that are often performed with different mean here and there, some more permissive than others, some only checking for @​.
2018-01-12[MERGE] forward port branch 9.0 up to 26d3b77a1deChristophe Simonis
2018-01-12[FIX] web: Kanban image not showing in some languagestbe-odoo
- In some languages the kanban images are not displayed because of a bug in human_size method in JS. This method translates the Unit Size for data and strip with the string with a comma as separator. When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result. This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit. Resulting in a bug in the method 'kanban_image'. opw #804973 #804970 #804648
2017-09-01[FIX] account: reconciliation_widget: rounding of reconciliation_amount ↵Lucas Perais (lpe)
computation Use case: - a tax of 10%, computation method: percentage of tax included - a account_reconciliation_model with an amount of 90% - make a statement of 1.31 (or something weird when it comes to digits) - reconcile it with a counterpart - prefill that counterpart with the account_reconciliation just created - push on reconcile Before this commit, the amount that was computed was not rounded, resulting in making unbalanced account_moves (by 0.001) This was invisble since the display of monetary is rounded After this commit, the rounding is done according to the currency's parameters and produces correct move_lines OPW 751881
2016-06-17[REF] web: move async_when to utilsGéry Debongnie
2016-06-17[REF] web, web_calendar: move toBoolElse to web.utilsGéry Debongnie
2016-05-27[REF] web: move dom_utils to its own fileGéry Debongnie
2016-05-04[ADD] web: some deferred utilsAaron Bohy
2016-04-21[REF] web: stop duplicating webAaron Bohy
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-02-17[MERGE] forward port of branch saas-9 up to 87a01c7Christophe Simonis
2016-02-17[FIX] web: prevent focus issue with autoresizeGéry Debongnie
The copied textarea used in autoresize was a valid target for focus when using the tab key. This is a major issue in editable list views, because when the user leaves a textarea, the list view jumps up, with no visible focused field.
2016-02-17[IMP] web_kanban_gauge: remove justgage lib and use d3Christophe Matthieu
2016-01-18[FIX] web: fix autosize small bugsGéry Debongnie
- better width handling - disable css vertical resize - correctly copy css classes to the 'shadow' textarea
2016-01-14[FIX] web: utils: backport of swap() for enterprise compatibilityAaron Bohy
2016-01-11[FIX] web: reimplement autosize for fun (and some bugfixing)Géry Debongnie
autosize does not work correctly (it moves the screen in all directions sometimes when the user press enter in the bottom of the screen in some browser), So, we decided to have our own version, because of course, we can do it better. A few horrible hacks later, I proudly present you "autoresize" (it was almost named "odooresize" but common sense prevailed). As added benefits, it plays better with our web client, so when you open a dialog in a modal for example, the autosize fields should have the correct height automagically (or should I say 'odoomagically')
2015-11-25[MERGE] forward port of branch saas-6 up to dade7e3Christophe Simonis
2015-06-18[IMP] web: pager: editable feature + documentationAaron Bohy
Pager's state can now be edited (mainly to change the limit, but the range of values as well).
2015-05-13[IMP] web: New generic progressbar widget + FieldProgressBar adaptationqsm-odoo
2015-05-12[ADD] web : progress bar widget + method for human readable big numbersMartin Geubelle
2015-04-30[ADD] web utils: xor functionArthur Maniet
2015-04-17[FIX] *: correct previous forward portChristophe Simonis
Due to files renaming, some patched should be applied manually to the correct files. Forgot to `git add` these files when committing the forward port...
2015-03-24[IMP] web : add set_cookie in utils.js (framework) since the get_cookie ↵Jérome Maes
method already exists. The set_cookie of session.js is now using the one from utils.js
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] web: add module system to the web clientGéry Debongnie
This commit introduces a new module system for the javascript code. Instead of using global (namespaced) variables everywhere (like openerp.web.whatever, ...), each file declare one (or more) module with its dependencies. Each module will be loaded after its dependencies, and will be given a reference to the return values. This change is a massive departure from the way the client worked previously. It will sadly break some/most history, but I am sure that the future git ecosystem will allow you to easily browse the history past this revision (one can dream). This commit feature: * main namespace is now odoo instead of openerp * a way to define modules and dependencies (inspired by requirejs) * many files have been splitted in simpler subfiles * basic support for debugging in odoo.__DEBUG__ * no global variable (i.e. nothing in window.openerp) * many bug fixes, many new bugs Future vision: this modularization should simplify future code development, simplify debugging and will allow a serious testing effort