summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/ajax.js
AgeCommit message (Collapse)Author
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-11-24[FIX] web: lazy loading the same file multiple times with loadJSqsm-odoo
Before this commit, if the loadJS method was called two times with the same url, the associated script was effectively put in the DOM only one time. However, the second call returned deferred was immediatly resolved while the script (added by the first call) might not be fully loaded yet. Now, calling loadJS for a same url multiple times will always return the same deferred, resolved when the associated script is fully loaded.
2016-07-04[REF] web_editor: code refactoring and simplificationqsm-odoo
* Remove dead code + optimization * Use Dialog API from web module * Reorganize files * Correct buggy $() function for snippet option class * Add comments * Fix the snippet parent navigation : If a page contained a three level snippet structure (i.e A contains B contains C), when editing the following bug occured : If B or C was selected first, parenting buttons were correctly set. But if selecting A then C, clicking on the parent lead to going back on A instead of going on B. * Fix snippet thumbnail layout * Better isolate ui css from themes * MediaDialog image list : prevent displaying empty attachments * ...
2016-06-17[REF] web: add ajax.rpc and change some dependenciesGéry Debongnie
2016-04-25[MERGE] forward port of branch saas-10 up to bb8f0f1Christophe Simonis
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-04-19[FIX] web: fix iOS file downloadingJoren Van Onder
e8a00bc50da435d3859118ca127d20a2eb9a0cab moved the get_file function from web.session to web.ajax. The issue is that get_file uses session.url() for iOS devices. Also, in order to prevent an infinite spinner options.complete() is called before actually opening up the new window. Although this resolves the issue it still requires the user to configure Safari to allow pop-ups, otherwise they are silently ignored. opw-672882
2015-10-01[FIX] bus: disable longpolling in test modeGéry Debongnie
In test mode, only one cursor is available, and longpolling will take it, and not give it back before 60s, causing a phantomjs timeout. This commit simply return an error when the server is in test mode. Sadly, I had to patch the web client to prevent logging the error in this case, because that's the way phantomjs detect if there is a problem.
2015-10-01[ADD] client-side CSRF supportXavier Morel
* add CSRF token as core.csrf_token * add CSRF tokens to client-generated and/or JS-submitted forms * remove broken "compatibility" mode of web.ajax.post /cc @dmo-odoo I've no idea how that was supposed to work, from looking things up all modern browsers seem to support FormData, and old IEs which don't don't support fallbacks either and would require submitting an actual form as fallback so...
2015-08-26[ADD] website_form: generic form controllerDavid Monjoie
Contains a new ajax post function that comes from mdo's original code and that I was not able to get rid of.
2015-08-16[FIX] ajax.js: stringify error for debugging helpChristophe Simonis
2015-07-10[IMP] web_editor: split website into web_editor (to use editor in backend ↵Christophe Matthieu
for html field) and website
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