summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
AgeCommit message (Collapse)Author
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-26[FIX] web_editor: visible char have the same feature that delete keydownChristophe Matthieu
2015-10-26[FIX] web_editor: remove td content on keydown delete with multi td selectedChristophe Matthieu
2015-10-26[FIX] web_editor: don't merge tr when keydown delete on the last row table cellChristophe Matthieu
2015-10-26[FIX] web_editor: add image display in width:100% by defaultChristophe Matthieu
2015-10-26[FIX] web_editor: backspace and enter in table cell don't break or remove td ↵Christophe Matthieu
(remove tr but not td alone)
2015-10-26[FIX] web_editor: use arrow up/down to switch table cellChristophe Matthieu
2015-10-26[FIX] web_editor: copy-paste content keep architectureChristophe Matthieu
The paste don't keep the architecture, usability team want to past the architecture but remove extra style and wrong node like span.
2015-10-26[IMP] web_editor: move picture options from snippet to summernote barChristophe Matthieu
Difficulty for the user to understand how to change the images. Some options summernote being in the bar and the other in the snippets editor. Need to merge this options.
2015-10-26[FIX] web_editor: don't display the summernote black picture overlayChristophe Matthieu
Issue: the overlay is confusing for user because summernote the size change is not active (to have a responsive design)
2015-10-26[FIX] web_editor: remove useless lineChristophe Matthieu
2015-10-14[FIX] web_editor: forcedReload of the pageNicolas Martinelli
On Firefox, the website page is not completely reloaded after saving or cancelling. Because of this behavior, the Edit button is kept disabled, forcing the user to completely refresh the page in order to activate the Edit button.
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-09[FIX] web_editor: alt+tab in table and tab on collapseNicolas Lempereur
When using the tab key on non text node range, it could fail in some given case. Also when removing the last element of the table row, a correction was done in d33086c03fc but if there was no element before the table (eg. the editor is empty) an error could occur.
2015-10-09[FIX] web_editor: null range and remember_selectionNicolas Lempereur
Tests for null range were not done in #8845, so in given case (where the focus is not in the editor) we could get an issue. The code for remembering the selection when clicking the editor was made useful in d33086c03fc, but there was an edge case when the editor itself was in a modal: then the selection would be lost. This commit change the code as following: 1) restore the selected range if: - the current selected range is not in the editable of the active editor - there is a corresponding saved selected range or we are in an embeded editor (and not in air mode as when editing the website) 2) save the selected range if: - we don't restore the selection, - the current selected range is in the active editor editable area
2015-10-09[FIX] web_editor: range is null if focus outside of editorMarkus Mattes
The range can be null if the focus is not in the editor at serveral places. closes #8845
2015-10-09[IMP] web_editor: rename range variable rng to rMarkus Mattes
Put all rng to r to have the same concept in the whole file as well as in the summernote codebase. closes #8845
2015-10-06[FIX] web_editor: oStyle.range can be undefinedChristophe Matthieu
On initialisation summernote call update method with oStyle.range is undefined. The range can be undefined because the update is call before any selection and attach method from summernote call the update without range. The method summernote_table_update try to use the range and raise an exception. fix: Check if oStyle.range exits.
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-10-02[FIX] web_editor, mass_mailing: summernote oversight and videoNicolas Lempereur
* some oversight when updating summernote with d33086c, * fix style when replacing image with video
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-10-01[ADD] *: CSRF protection in forms and routesChristophe Simonis
* make CSRF protection the default on all non-SAFE methods note: there currently is no way to call a CSRF-protected endpoint without a form-encoded entity-body as that's the only place we get the CSRF token from. * simple CSRF token generation: just use the HMAC'd session id, no generating a new random token per session then HMAC it * use constant-time equal function to avoid timing attacks * assert that a database secret is configured before hashing/validating the CSRF token * opt-out database manager from CSRF: The super-admin password serves the purpose of a CSRF token in the database manager screens. There is no request database to obtain the secret and generate a CSRF token.
2015-09-30[FIX] web_editor: correct typo translation simple html widgetNicolas Lempereur
fixes #8698
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[IMP] web_editor: Convert font-awsome into picture before convert class into ↵Christophe Matthieu
style to remove unnecessary style attributes
2015-09-28[FIX] web_editor: send mail to outlook and keep image sizeChristophe Matthieu
Office Outlook doesn't take into account the [style] attribute, and it doesn't manage width/height in percent value. This commit set width/heigth attribute in pixels and also always set the width/height in style attribute (keeping them in the original unit and setting them to auto if not present).
2015-09-28[FIX] web_editor: remove 'lang' from the context to save master website xmlChristophe Matthieu
2015-09-28[FIX] web_editor: media trigger content_changed when change the mediaChristophe 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-25[FIX] web_editor: display editable area placeholderChristophe Matthieu
2015-09-25Revert "[IMP] web_editor: update summernote up to 2015-08-31"Nicolas Lempereur
Revert till several issues are solved.
2015-09-25[FIX] website: range lost in phantomjsNicolas Lempereur
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-24[IMP] web_editor: usability: allow saving even when nothing was changed when ↵Damien Bouvy
editing in the frontend
2015-09-24[FIX] web_editor & website: don't display edit placeholder if the node have ↵Christophe Matthieu
class oe_no_empty or oe_not_editable
2015-09-24[FIX] web_editor: transparency of modal backdrop instead of black brackgroundChristophe Matthieu
2015-09-23[FIX] account_cancel,web_editor: small issues introduced during previous ↵Christophe Simonis
forward-port
2015-09-23[MERGE] forward port of branch saas-6 up to a669433Christophe Simonis
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-11[IMP] web_editor: change font-family to webclient defaultqsm-odoo
2015-09-08[FIX] website_mail: special case for css splittingNicolas Lempereur
The css of a mail is inlined as best as possible for the mail sending. Previously, if there was a selector like .ch[onclick="ga(this,event)"] the simple splitting would split in the middle and get one erroneous selector (which then would trigger an error). With his commit, rules containing " or ' are ignored. opw-643548 note: forward port of 6316bce
2015-09-04[FIX] web_editor: update .o_form_field_empty when loadedNicolas Lempereur
2015-09-04[FIX] web_editor: do paste after removing selectionNicolas 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: clean_for_save is not called for custom snippets because ↵Christophe Matthieu
all() not contains all html matched tags
2015-09-01[FIX] web_editor: wrong typo in fontIconsDialog widgetChristophe Matthieu
2015-09-01[FIX] web_editor: drop near select children of editable nodesChristophe Matthieu
2015-09-01[FIX] web_editor: html widget: escape value before save.Christophe Matthieu
2015-08-31[MERGE] forward port of branch saas-6 up to 7faf72cChristophe Simonis
2015-08-31[FIX] web_editor: don't loose selection when deleting an imageChristophe Simonis