summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/translator.js
AgeCommit message (Collapse)Author
2017-08-16[MOV] web_editor, website: reorganize filesqsm-odoo
2017-08-03[REF] web, *: improve behavior of jQuery extension 'prependEvent'qsm-odoo
* web_editor Odoo extends jQuery to add some utility functions. The 'prependEvent' one add the possibility to add an event handler on an element (like the jQuery built-in 'on' function) but to be executed before the already binded ones. This function was however incomplete and did not allow to use jQuery namespaced events.
2017-06-21[IMP] web, *: reorganize our libraries' extensionsqsm-odoo
* web_editor, web_tour, website_event_track Before this commit, one JS file was responsible for all the library extensions and fixes. There were two main problems with this system: - The file was only available in the backend (as some extensions are made on backend-only libraries). - Some other modules were doing library customizations. This commit creates one file per library to regroup their associated customization and adds them in the right asset. These are placed in the web module and every other module should avoid doing customizations. This allows to have libraries consistency accross all modules and between the backend and the frontend.
2017-04-11[REF] web,*: remove 'web.model' and 'web.dataModelGéry Debongnie
Use this.rpc instead of Model object, with web.ajax if necessary. nb: EventDispatcherMixin include now the custom_events managment instead of widget
2017-02-01[MERGE] forward port branch saas-11 up to 71773e1f1cbChristophe Simonis
2017-02-01[MERGE] forward port branch 9.0 up to a53063606a5Christophe Simonis
2017-02-01[FIX] web_editor: allow to copy paste when editing translationsqsm-odoo
When editing translations, you were not able to copy/paste texts before this commit. Indeed, in some contexts, in some browsers, copy/pasting text was creating a new paragraph inside the translation, preventing it to be saved. This commit simply adds code to remove these paragraphs each time text is changed. A more elegant solution will be found for master with website and editor improvements.
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-04-25[MERGE] forward port of branch saas-9 up to 4d337f7Christophe Simonis
2016-04-21[FIX] web_editor: save translation values as HTML or XML fragmentRaphael Collet
The translation value is given as an HTML fragment. It is converted to a valid XML fragment if the translation's field requires it.
2016-02-25[FIX] web(_editor): qunit testsqsm-odoo
* Correct qunit template assets * Delete useless template which broke qunit qweb inheritance
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
2016-01-14[FIX] web_editor: title tag with translationNicolas Lempereur
b24d759 changed the wrapping translation span tags, this commit take it into account for the "translation" title tag.
2015-12-10[FIX] web_editor: don't display translation modal for attribute on tag who ↵Christophe Matthieu
have content
2015-12-10[FIX] web_editor: translation feature for all string fields on websiteChristophe Matthieu
* add the branding in translation mode * change javascript to add the lang in the context (automatically removed in the rte => allow to create record and edit when use an other default language of en_US) * avoid double saved
2015-11-03[FIX] web_editor: escape for xml in translation as done in ir.ui.viewNicolas Lempereur
Currently server side there is two differents source for html content displayed on a qweb rendered page: 1) ir.ui.view arch value are stored as xml and are unescaped before being displayed, so we have to escape the text nodes before saving. e.g: * &nbsp; should be stored as &amp;nbsp; since it is an HTML entity but not a defined XML entity, * &amp; should be stored as &amp;amp; since when unescaping it, it would become & which is invalid in HTML, * &lt; should be stored as &amp;lt; since when unescaping it, it would become `<` so HTML text node could become HTML element node. The tag themselves can also be escaped but it often has the same result: &lt;em&;gt;blah&lt;/em&gt; is the same as <em>blah</em> when unescaping is applied to both. But it is required is some instance, e.g <!DOCTYPE html> unescaped would be invalid xml. 2) openerp.fields.Html value are stored directly in HTML formatting and should, conversely, not be escaped before being stored. Thus when saving an ir.ui.view part modified thanks to the website editor, an escaping of text node content is carried out to take this into account, but the same was currently not done for the v9.0 new translation system. This commit apply the same logic when saving ir.ui.view as when saving ir.translation values.
2015-07-10[IMP] web_editor: add modal to translate node attributesChristophe Matthieu
2015-07-10[IMP] web_editor: split website into web_editor (to use editor in backend ↵Christophe Matthieu
for html field) and website