summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/rte.js
AgeCommit message (Collapse)Author
2017-08-16[MOV] web_editor, website: reorganize filesqsm-odoo
2017-06-14[FIX] web_editor: make sure gallery images are editableDeep Patel
When added for the first time, they were not editable until the page was saved.
2017-06-14[FIX] web_editor: fixed issue of chrome triple clickdbh
When an user triple-clicked on a paragraph and then typed text, the paragraph was removed instead of its content (so the new text was added at the beginning of the next paragraph). See: http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
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-09-22[MERGE] forward port branch saas-12 up to b1b700aChristophe Simonis
2016-09-22[MERGE] forward port branch 9.0 up to 78f6117Christophe Simonis
2016-09-22[FIX] web_editor: allow editing t-field linksqsm-odoo
There is a hackish feature in the web_editor which forces the contenteditable to true on links which are clicked and removes it anywhere else in the page so that only the link is editable after click. This allows to add text at the end of a link without adding it outside of the link by mistake. The feature was badly implemented because, if the link was editable without having any parent which is editable, the contenteditable was forced to true, then immediatly forced to false when forcing to false every page element. This was the case for lots of t-field. By example the product categories in eCommerce are t-field links which are in non editable <li/> elements...
2016-09-02[FIX] web_editor: remove some defaults in text editionqsm-odoo
* On firefox, you had to click twice on a link to be able to start typing text * When selecting text which contained a <br/>, you were not able to replacing it correctly (you had to click again before starting typing) * When replacing a whole paragraph content which was below a title, the text was not replaced and you had to click again and the title transformed into a paragraph. * ...
2016-09-02[FIX] web_editor: correct return value of saveElementqsm-odoo
2016-09-02[REF] web_editor: lint and simplify JS codeqsm-odoo
2016-04-25[MERGE] forward port of branch saas-9 up to 4d337f7Christophe Simonis
2016-04-25[FIX] web_editor: fix svg issueAdrien Dieudonne
className should return a string but svg node returns an object
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-13[FIX] web_editor: get unlink button workingNicolas Lempereur
f3f7bd9 improved some link editing behaviour by adding contenteditable attribute on it. But if contenteditable is set on a link, using command "unlink" on the element for `document.execCommand` does not work. Hence this commit adds a code so the first click outside the link remove contenteditable. closes #10436 second-part-of: opw-659772
2016-01-12[FIX] web_editor: links edition (only website links)qsm-odoo
Commit f3f7bd9f240bc21dffadd784cdf77203b1a5148c adds an improvement which allows the user to edit links in an easier way. The problem is that it also allowed to edit... the edit buttons (example: the discard button). This commit moves the mentionned commit code below the code that checks if the target can be edited or not.
2015-12-15[FIX] web_editor: help the user to edit the linkChristophe Matthieu
User can't edit the first and last chars of a link (same issue for a lot of editors), and users don't want to click on edit link button in the editor bar. When the user click (not if the user use arrow) on a link the link is activate with a content editable true and can edit the first and last chars. opw: 654280
2015-11-04[FIX] web_editor: use _.bind for rte handler to use 'this' and avoid errorsChristophe Matthieu
2015-11-04[FIX] web_editor: edition of monetary valueChristophe Matthieu
Issue: if the currency is before the value and we try to add a number at the begin of the value, the number is not saved (because the browser insert the number before the span). Add a onEnableEditableArea in the rte to change the contenteditable value and the default behavior.
2015-11-04[FIX] web_editor: use history to enable or disable save buttonChristophe Matthieu
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-09-29[IMP] web_editor: update summernote up to 2015-08-31Nicolas Lempereur
update summernote library up to revision: https://github.com/summernote/summernote/commit/a0f26e300 see https://github.com/summernote/summernote/ for history closes #8704
2015-09-28[FIX] web_editor: remove 'lang' from the context to save master website xmlChristophe Matthieu
2015-09-25[FIX] web_editor: apply o_dirty class on changeChristophe Matthieu
Before: if a user blur a editable area without editing, the editor is removed and all bind are remove. The 'content_changed' bind are removed and the 'o_dirty' class is never apply.
2015-09-25Revert "[IMP] web_editor: update summernote up to 2015-08-31"Nicolas Lempereur
Revert till several issues are solved.
2015-09-25[IMP] web_editor: update summernote up to 2015-08-31Nicolas Lempereur
update summernote library up to revision: https://github.com/summernote/summernote/commit/a0f26e300 see https://github.com/summernote/summernote/ for history closes #8704
2015-09-23[MERGE] forward port of branch saas-6 up to a669433Christophe Simonis
2015-08-31[FIX] web_editor: don't loose selection when deleting an imageChristophe Simonis
2015-08-28[MERGE] forward port of branch saas-6 up to 7a768a4Christophe Simonis
Due to `sale` rewrite (94716a3f14d929574c46ef165e4364d12a5903ed), the commit 503820acb6d82a85c0c49ac26f7e7f8cd73851dd has been partially ignored (in sale.order.line) and will be rewritten later using new-api.
2015-07-10[IMP] web_editor: split website into web_editor (to use editor in backend ↵Christophe Matthieu
for html field) and website