summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend.js
AgeCommit message (Collapse)Author
2016-03-24[MERGE] forward port of branch saas-9 up to 59d3f63Christophe Simonis
2016-03-14[FIX] web: various small issues in form view onchange/one2manyChristophe Matthieu
- Issue: Edit sale.order form view, add new line, change product who have taxes and click quickly on save (with slow network) => error message. Because some deferreds are lost. - reduce number of reads and onchange for x2m widgets - remove before_save method and use commit_value (the issue was that if the before_save and the change trigger an onchange, the onchange deferred is not checked before saving the content.
2016-03-10[FIX] web_editor: don't display the html content fieldChristophe Matthieu
issue: message, click on a record, return to the list view, click on an other record => nothing desplayed. opw-671047
2016-03-03[FIX] web_editor: can't use mako/jija if remove space to prettify htmlChristophe Matthieu
Addapt html method to prettify the html code and keep mako structures. opw-668409
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-02-08[FIX] web_editor: don't convert style into class by default. Only if use ↵Christophe Matthieu
style-inline (because very poor performance for sale.order form view because contains very crappy dom in website_description field)
2016-01-28[FIX] computed html field should not have "note-editable" classChristophe Matthieu
opw-660810
2016-01-20[FIX] web_editor: reduce the min-size of the html previewChristophe Matthieu
opw-660810
2016-01-20[FIX] web_editor: use iframe only for html widget with style-inline modeChristophe Matthieu
2016-01-18[FIX] web_editor: don't add double p tag at the begin of the documentChristophe Matthieu
2016-01-18[FIX] web_editor: use iframe instead of direct content for previewChristophe Matthieu
The preview is not equal to the real email rendering because the backend css is present.
2016-01-14[FIX] web_editor: change height for html field in readonly modeChristophe Matthieu
issue: breaks the preview form views opw-660810
2016-01-07[FIX] web_editor: allow custom template for html_frame fieldChristophe Matthieu
2015-12-28[FIX] web_editor: inline editor should not devore focusNicolas Lempereur
The FieldTextHtmlSimple widget would focus on itself when changing its value not by direct user interaction. But if this change was coming from next/previous record, or an onchange that was breaking the "autofocus" heuristic for field in Odoo. With this commit: - the autofocus heuristic is kept, - if focused, selection is set at the end if it is possible on the browser, else (old internet explorer and not visible field) the selection is at the beginning. opw-660486
2015-12-10[FIX] web_editor: keep inline editor line spacingNicolas Lempereur
opw-657955
2015-12-08[FIX] web_editor: add code view in debug mode to allow jinja insertionChristophe Matthieu
2015-11-27[FIX] web_editor: update value at inline html saveNicolas Lempereur
In the base summernote library, each event modifying the editable area DOM trigger an 'onChange' event which update the textarea associated with the editor. Some widget (ImageDialog) have been entirely rewritten for Odoo without copying this behaviour. Hence for those components, if they were the last to be used and only in the instance of inline backend editor (FieldTextHtmlSimple widget), before saving updating the widget value by the current editor value is required. closes #9784 opw-654240
2015-10-26[FIX] web_editor: ie issue with range within undisplayedNicolas Lempereur
In IE11, when adding a range to a selection that can fail if this range is not displayed (display non on itself or an ancestor) or is not already inserted in the dom. e.g: IE fails in the following situation: http://jsfiddle.net/7cmf2tt9/7/ The feature causing this situation is minimal : it only set the cursor at the end of a FieldTextHtmlSimple widget (the default widget for fields.Html). This commit thus only ignore that error. note: this is not an issue on IE Edge. closes #9216 opw-652347
2015-10-13[FIX] web_editor: trigger mouseup at startNicolas Martinelli
When we initialize the web editor, the font size in the toolbar is initialized to NaN. What is done: - Initialize the Summernote editor in initialize_content - Render the content of the node in render_value - Append the node to the DOM Since the Summernote editor is initialized in initialize_content, the node is still hidden. Since the node is hidden, Summernote won't be able to determine the style info of the text (see method fromNode from Style.js). Indeed, when jQueryCss is called, $node.is(':hidden') is true which will lead to styleInfo['font-size'] = NaN. To avoid patching Summernote, we take advantage of an existing trigger which reloads the button content upon mouseup. This is also safer than initializing Summernote after appending the node to the DOM. opw-652041
2015-10-02[IMP] web(_editor): translate icon compatibilityqsm-odoo
Add the $translate variable for enterprise compatibility and hide it in web editor widgets (these had already no translate icon in community).
2015-09-21[FIX] web_editor: iframe of html widget must be checked before render valueChristophe Matthieu
If the iframe is destroyed, detached, hide (eg: click on a record, return into the list view and click on an other record), the render_value method try to resize the iframe but jQery raise an exception because contentWindow doesn't exist.
2015-09-04[FIX] web_editor: update .o_form_field_empty when loadedNicolas Lempereur
2015-09-03[FIX] web_editor, translate: xml translate encodingNicolas Lempereur
lxml.HTMLParser detect the content encoding by itself if not specified. in the issue leading to this fix, content in a mail with u'\xa4' ( ) was transformed intto u'\xc2\xa4' ( ) since HTMLParser selected the wrong encoding (latin-1 instead of utf-8 for example). this commit specify the known encoding and revert 3d00c210f which was another attempt at this issue.
2015-09-01[FIX] web_editor: html widget: escape value before save.Christophe Matthieu
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: 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