summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/base.js
AgeCommit message (Collapse)Author
2018-01-25[FIX] web_editor: ready when translations readyNicolas Lempereur
$('web_editor.base').ready() returns a deferred that: - wait at least for $(document).ready() - wait at least for require('web.ajax').loadXML() - at most once starts translations configuration But there is an issue since there is unexpectedly no reference to the translations, whilst it should have also been ready when ready was resolved. This commit keep the reference so translations can be used after $('web_editor.base').ready() is resolved as it was before 7dfdfa0103. note: in 11.0 it should be solved with 29729769 (so fix is for [10,11[) opw-804148 closes #22522
2017-12-19[FIX] web: avoid race condition in the websiteChristophe Matthieu
Depending on the speed of the runbot, errors may appear if one tries to use a template that is not yet loaded. Templates are being loaded and we add new template to read, the ready function does not take into account new additions.
2017-12-19[FIX] web_editor: Avoid twice translated for static xmlChristophe Matthieu
Avoid texts to be translated twice if some modules have the translated value corresponding to the English source term. To reproduce: create a translation for static xml (comment 'openerp-web') with 'Modifier' translated by 'Tadaaa'. In french context, the 'Edit' button in forms is translated by 'Tadaaa'. Don't translate template in web_editor if we are in the backend because the translations of all the modules have already been loaded and applied.
2016-02-24[REF] web_editor,website,mass_mailing: JS/XML updateqsm-odoo
* Adapt DOM selectors * Refactore dialog XMLs to have odoo styling * New editor options (background-position, ...) * Various improvements
2015-07-22[IMP] web: module can be asynchronous loaded if it return a deferredChristophe Matthieu
Each module can return a deferred. In that case, the module is marked as loaded only when the deferred is resolved, and its value is equal to the resolved value. The module can be rejected (unloaded). This will be logged in the console as info. Remove if_dom_contains from the website, the modules return a rejected deferred if the DOM doesn't contains the seleted values.
2015-07-10[IMP] web_editor: adapt css, js and xml to use web_editorChristophe Matthieu
2015-07-10[IMP] web_editor: split website into web_editor (to use editor in backend ↵Christophe Matthieu
for html field) and website