summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/rte.summernote.js
AgeCommit message (Collapse)Author
2017-08-16[MOV] web_editor, website: reorganize filesqsm-odoo
2017-06-14[IMP] website_sale, web_editor: make sure page elements are properly editabledbh
2017-06-14[IMP] web_editor: improve icon color editiondbh
- Make sure icon colors can be edited the same way as text - Improve recent color behavior
2017-06-14[FIX] web_editor: doubleclick on image in a linkdbh
Before this commit, when clicking on an image which is in a link, both the link edition dialog and the image edition dialog were opened. Now only one opens.
2017-05-22[FIX] web_editor: inline space in source codeNicolas Lempereur
The prettifying of html when editing sources (user need to be in debug mode to see the button) was removing too much spaces in some instances. For example if someone got in a case such as: <span>hello<b> cruel </b>world!</span> The spaces between text and tag would be removed (this would work fine with the space outside of the tag). This code add a special case so this doesn't happen anymore. opw-743565 closes #17142
2017-04-12[MERGE] forward port branch saas-11 up to f830c7c3e31Christophe Simonis
2017-04-07[MERGE] forward port branch 9.0 up to 51fe54dd8daChristophe Simonis
2017-03-29[FIX] web_editor: fix select and modify videoNicolas Lempereur
There was an issue when selecting a video tag: - a tag inside the video tag would be selected instead of the video tag so video could not be removed or modified (modifying it would add a video or image inside the video itself and so on). - the selection was not conveyed to the editor so it would be lost consequently due to some code who restored it to what was saved on the editor. This fix solves this by changing how the video tag was selected and saving the selected range on the editor. opw-724701
2017-01-10[MERGE] forward port branch saas-11 up to f1583504cebChristophe Simonis
2017-01-10[MERGE] forward port branch 9.0 up to 3f7b1f60834Christophe Simonis
2017-01-10[FIX] web_editor: ignore read only + debug + writeNicolas Lempereur
In some case (for example the one solved with b51d21c5) we can have write done on a field text in read only mode. With 98ed53ce if : - such a case happened (in b51d21c5 the fix only worked after the given field was written one time) or a similar instance, - and the user was in debug mode, - and the widget used was TextFieldHtmlSimple this could lead to an issue with the code trying to toggle the code view mode whilst the editor is closed.
2017-01-09[FIX] web_editor: don't lose modified code view contentNicolas Lempereur
The intended scenario when using the code view is the following: 1) click on code view button to use code view 2) make changes 3) click on code view button to get back to wysiwyg view 4) save from the wysiwyg view If the 3rd step was not done: - for the inline editor, we lose the changes that have been done in code view, - for the iframe editor, we lose the entirety of the content. At one time the user was forced to go back to wysiwyg before being able to save, but this have been removed hence the present usability issue. With this fix, when the editor content is saved, if the user is in code view he is automatically set back to wysiwyg view. fixes #14648 closes #14475 opw-678677 opw-693052
2016-11-22[MERGE] forward port branch saas-12 up to d1fddd2Christophe Simonis
2016-11-22[MERGE] forward port branch saas-11 up to 659fb5dChristophe Simonis
2016-11-22[MERGE] forward port branch 9.0 up to 290601eChristophe Simonis
2016-11-21Revert "[IMP] web_editor: don't lose modified code view content"Nicolas Lempereur
This reverts commit 897290dd3ff218ddc12dcdc6c936a8725813cefe. It seems it breaks other use case, since this was fixing more a usability thing (need to click back on code view to save code view changes) it is better to revert than to add drawback. A better fix should be introduced, or the solution would be to not fix it and have a warning indicating what needs to be done. opw-693052
2016-11-17[MERGE] forward port branch saas-12 up to 1ef4061Christophe Simonis
2016-11-17[MERGE] forward port branch saas-11 up to 3b2f4e2Christophe Simonis
2016-11-17[MERGE] forward port branch 9.0 up to 7ee09edChristophe Simonis
2016-11-16[IMP] web_editor: don't lose modified code view contentNicolas Lempereur
The scenario when using the code view is the following : - click on code view button to use code view - make changes - click on code view button to get back to wysiwyg view - save from the wysiwyg view If the 3rd step is not done: - for the inline editor, we lose the changes that have been done in code view, - for the iframe editor, we lose the entirety of the content. At one time the user was forced to go back to wysiwyg before being able to save, but this have been removed hence the present usability issue. With this fix, when the editor content is saved, if the user is in code view he is automatically set back to wysiwyg view. closes #14339 opw-693052
2016-10-10[FIX] web_editor: change attachment/image icon in editor barqsm-odoo
The image icon was not clear enough. The editor bar appears in the website builder, the mail composer, the forum composer, ... In each of them, we can both link a picture or a file but a picture makes more sense in some context and in some other ones not. This commit solves the problem by changing the icon to fa-file-image-o which is a mixed of file and image. This also solves the problem of having two buttons with the image icon in the website builder (indeed an image icon is also used for the image look button).
2016-10-04[FIX] web_editor: allow website_animate to preview image animationqsm-odoo
Animation preview on images did not work as the web_editor stopped every potential animation when an image entered edition. As the behavior does not seem useful as there is no infinite animation which is possible with standard odoo (and even if it was the case, it would not be too strange that the animation continues), the feature is removed with this commit.
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[REF] web_editor: lint and simplify JS codeqsm-odoo
2016-08-31[IMP] web_editor: open link dialog on double click on a linkqsm-odoo
(Also refactore the code so that the implementation is the same for the media dialog opening on double click on an image).
2016-08-31[IMP] web_editor: lint file rte.summernote.jsqsm-odoo
2016-08-25[FIX] web_editor: properly bind event to the editor style dropdownqsm-odoo
Before this commit, the callback which selects the currently used style in the dropdown menu was binded to the mousedown event on the div which contains the dropdown-toggle and the dropdown-menu. This was wrong as the callback is thus called even when clicking in the dropdown menu.
2016-08-19[IMP] web_editor: come back to a more regular summernote colorpickerqsm-odoo
Splitting the summernote colorpicker into bg colorpicker and foreground colorpicker seems to have been a bad idea as people tend to click on the recent color button thinking it will open a dropdown. This commit keeps the design that had been decided for colorpicker template and do not change the "background-color" snippet option. However, the colors for background and foreground text changes are now displayed in an unique dropdown again, with reviewed style. + adapt the rte tour
2016-07-05[IMP] web_editor: change image edition toolbarqsm-odoo
* Move description button at the end of the toolbar * Add an "auto" state button for the image width (alongside 100%, 50% and 25%) (when these last three are unchecked, the auto button becomes checked).
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-06-23Revert "[FIX] web_editor: test jinja content to load editor in codeview"Christophe Matthieu
This reverts commit f38f8930f0436a40f675fa1d054a9d46f550d440. Revert for internal choice. Odoo want to use qweb in template and remove jinja support on next version. If users want to use jinja they can change the view to use text widget instead of html widget.
2016-06-22[FIX] web_editor: test jinja content to load editor in codeviewChristophe Matthieu
The preview change the content because the browser try to fix the dom. If a user use jinja and activate the preview, the jinja code is (re)moved by the browser and broke the template.
2016-04-01[MERGE] forward port of branch saas-9 up to f4d1adcChristophe Simonis
2016-03-30[FIX] web_editor: Cannot read property 'left' of undefinedNicolas Lempereur
This issue happen for example on a full runbot when clicking with shift + key pressed on a sale order not in an editable. We can see that initial_data.rect is only defined in mousedown when the click target is inside an editable block, hence it could lead to an issue otherwise. closes #11527
2016-03-25[FIX] web_editor: two editor and image bar buttonsNicolas Lempereur
Some image functionalities of the inline summernote would only take the first of multiple editor into account when selecting the targeted image of an image button action (image size, image padding, ...). This commit select the appropriate editor given the current editable. closes #11474 opw-668861
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-24[REF] website,web_editor: complete restylingstefanorigano
2016-01-13[FIX] website: editor: enable/disable save/undo/redo button when resize snippetChristophe Matthieu
2015-12-15[FIX] web_editor: unbind summernote mousedown on detach/stop editorChristophe Matthieu
2015-12-08[FIX] web_editor: add code view in debug mode to allow jinja insertionChristophe Matthieu
2015-11-04[FIX] web_editor: remove editor bar flickering when edit a qweb fieldChristophe Matthieu
Issue: When the user click on a field (like monetary, text...) the editor bar appear and disappear. The undo buton is hidden for this fields.
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-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-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-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-08-21[IMP] web_editor: add document into the media editorChristophe Matthieu
User can upload documents and add the link in the page to download it.
2015-08-15[MERGE] forward port of branch saas-6 up to 8d95f6dChristophe Simonis