summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
AgeCommit message (Collapse)Author
2019-02-08[MERGE] forward port branch 11.0 up to 9553240adc4Christophe Simonis
2019-02-08[MERGE] forward port branch saas-15 up to 9773be345e1Christophe Simonis
2019-02-08[MERGE] forward port branch saas-14 up to 18228f9c4e1Christophe Simonis
2019-02-08[MERGE] forward port branch 10.0 up to be689c53c13Christophe Simonis
2019-02-07[FIX] web_editor: review drag and drop in the editorqsm-odoo
When dropping a snippet into a page, it is dropped in the drop-zone which is the nearest of the user cursor. When moving a snippet, that condition did not apply and the user was required to put the cursor at the exact location of the drop-zone. Also, for both drag and drop features, the drop zones which appeared were not displayed correctly for full width columns, which made dropping sometimes impossible when multiple col-*-12 were below each other. task-1937758 closes odoo/odoo#30899
2019-01-09[FIX] web_editor: icon widget complies to apiLucas Perais (lpe)
the search method should return a Deferred as explicit in MediaDialog OPW 1919549 closes odoo/odoo#30077
2019-01-08[MERGE] forward port branch 11.0 up to c07b7200b26Christophe Simonis
2019-01-07[FIX] web_editor: banner not horizontaly centeredJulien (juc) Castiaux
When creating a banner using the web editor, the targeted image appears centered in the editor but is aligned on the left in the email. The issue also happened with other alignment (left in a centered widget, right, ...) for example on outlook 2007 and should be solved with this changeset. opw-1904827 Co-authored-by: Nicolas Lempereur <nle@odoo.com> closes #29985 closes odoo/odoo#29214
2018-12-04[MERGE] forward port branch 11.0 up to 2156af480fdChristophe Simonis
2018-11-29[FIX] website, *: properly clean website widgetsqsm-odoo
* web_editor When an user saves its website, all the animations are destroyed so that a clean DOM is saved. This is particularly important for snippets like the latest post one that would crash the page if not cleaned before saving. Two cases were found where animations were not cleaned before saving and this is what this commit fixes: - When an user used the undo/redo system, all animations were lost as the DOM is recreated. - When an user duplicated a snippet, animations were not restarted on the cloned element. closes odoo/odoo#29159
2018-11-15[MERGE] forward port branch 11.0 up to 468dab6748aChristophe Simonis
2018-11-15[FIX] web_editor: properly post process document uploadqsm-odoo
When using the media dialog, when uploading an image, the image list refreshes itself properly. This was not the case for documents as it was... refreshing the image list too instead of the document list. Also, when uploading a document, it is supposed to be added in the page directly and the media dialog is supposed to close. This feature was broken for the same reason: the iframe system of both tabs which were using the same name. Bug introduced with https://github.com/odoo/odoo/commit/abde8bddf8ec45cf12aab59e95c330321158cfba (even though is was technically wrong for the same reason before). Closes https://github.com/odoo/odoo/pull/28722
2018-11-12[FIX] web_editor: can't unquote on firefoxNicolas Lempereur
Firefox when asked to block format (formatting over a block with blockquote, h1, ...) has a special case for blockquote (it is documented in https://developer.mozilla.org/docs/Web/API/Document/execCommand at formatBlock command) and will wrap any element instead of replacing existing block formatting. Thus the code not expecting it was not able to remove a blockquote in firefox once introduced. opw-1903735 closes #28587
2018-11-12[FIX] web_editor: firefox ctrl+a and un/formatNicolas Lempereur
When we for example do ctrl+a in firefox, the selection is over the container and not the content. This is an issue when we apply a format, since the container could be removed. eg: we have selection over `<pre>hello</pre>`, on firefox the selected node is `pre`, on chromium it is `TextNode "hello"`. if we remove the style, `pre` is deleted so firefox selection is broken, whilst chrome has no issue since "hello" still exist. There was also an issue when the selection was over the blockquote, there was no error but the style could not be removed. opw-1903738 opw-1903735 closes #28369
2018-11-09[FIX] web_editor: don't prepend http to ${..} linkNicolas Lempereur
In mail template a link with reference such as: ${object.user_id.signup_url} are often used. These are template directives that are replaced when the mail is saved, so when editing in the editor and they are prefixed by "http://" this breaks the link which is not wanted. Now link beginning with `${` are not prefixed anymore to prevent shooting oneself in the foot. opw-1906695 closes #28522
2018-11-23[FIX] web_editor: remove video option when composing emaillen-odoo
Embedding a video can't work because it embeds an iframe, which is not supported by most email clients for security reasons. (What happens when Gmail shows embedded videos in displayed emails, is that you send a link in the email body, and it is at rendering that Gmail adds the iframe into the page.) So the bugfix solution is to hide the button. Since there is an option "res_model" that allows us to know when we are in that case, we remove the video option. opw 1905497 closes odoo/odoo#28911
2018-10-26[MERGE] forward port branch 11.0 up to e18ed24c07aChristophe Simonis
2018-10-26[FIX] web_editor: fix forward-portqsm-odoo
Forward-port of https://github.com/odoo/odoo/commit/227fc6408ddc998529bb1c38222ddba50f40868b made with https://github.com/odoo/odoo/commit/717f4583949219c346c87c390fbc336b4f31571c introduced a JS error. closes odoo/odoo#28187
2018-10-25[MERGE] forward port branch 11.0 up to 84500c27b1cChristophe Simonis
2018-10-23[MERGE] forward port branch saas-14 up to ce2eb8464b4Christophe Simonis
2018-10-23[MERGE] forward port branch 10.0 up to d5cc05c9948Christophe Simonis
2018-10-19[FIX] web_editor: disable strange resize handles on Firefoxqsm-odoo
See comments in the code for details... Closes https://github.com/odoo/odoo/pull/27964
2018-10-24[MERGE] forward port branch saas-15 up to bff43f0aa14Christophe Simonis
2018-10-19[FIX] web_editor: fix background reset system for carousel itemsqsm-odoo
When the user previews a background color, the background image of the snippet is removed and re-added if the user chooses not to pick the color. The background-image was not correctly added for carousel items.
2018-10-19[FIX] web_editor: review _setActive system for select-classqsm-odoo
- Handle the case where one select-class is a subset of another select-class of the same group e.g. <... data-select-class="hello"/> <... data-select-class="hello world"/> - Handle empty values <... data-select-class=""/> Note: both cases worked but were not displaying the active checkbox correctly in the editor UI.
2018-10-16[FIX] web_editor: properly remove all bg when choosing a bg colorqsm-odoo
The code which removed the background image of a snippet when choosing a background color worked kinda by chance. Indeed, on the final click on the color option, the snippet background-image was reset... to the current background-image, which is none thanks to the color preview. Unfortunately, in some themes, the gradient color option interferes: the current background-image at a color choice is equal to the current gradient, and thus, that gradient is being moved as an inline style. The bug was introduced with https://github.com/odoo/odoo/commit/285d95e946e5a15139c961e30dbe3598e0d99f6a (as, before, the background reset was done by simulating a click on the 'background: none' option item, which was removed). Closes https://github.com/odoo/odoo/pull/27808
2018-10-11[MERGE] forward port branch 11.0 up to 717f4583949Christophe Simonis
2018-10-11[MERGE] forward port branch saas-15 up to 93c22558f36Christophe Simonis
2018-10-11[MERGE] forward port branch saas-14 up to 77286e4296bChristophe Simonis
2018-10-11[MERGE] forward port branch 10.0 up to c2688e45f31Christophe Simonis
2018-10-10[FIX] web_editor: properly allow to reset bg colorKishan Gajjar
If resetting a background color was the only edition that was done on a page and that this page was saved, the change was not properly saved as the page was not marked as dirty. Closes https://github.com/odoo/odoo/pull/27625 task-1879524
2018-10-10[FIX] web_editor: Not possible to edit a link on safariGoffin Simon
On Safari, when editing the template of a mail.mass_mailing, clicking the "Read more" button (or any button that can have a link to the website) didn't open pop up to set the URL of the website. PS: inspired from https://github.com/textAngular/textAngular/issues/762 opw:1889643
2018-09-05[MERGE] forward port branch 11.0 up to 213759b03e5Christophe Simonis
2018-09-05[MERGE] forward port branch saas-14 up to 6773d3644e5Christophe Simonis
2018-09-05[MERGE] forward port branch 10.0 up to 1d0940d96f3Christophe Simonis
2018-09-05[FIX] web_editor: image nameNicolas Martinelli
Add the image name in the website for SEO purpose. This is a backport of: 88a5d9a0000a5ea43afdc00ed 886c07dabb636767b80abb849 152e3f8686ec4f48ba22e5c13 opw-1880472
2018-09-05[FIX] web_editor: image nameNicolas Martinelli
Add the image name when the image is uploaded. Complement of commits 886c07dabb6367 and 152e3f8686ec4f48ba2 opw-1880472
2018-09-04[MERGE] forward port branch saas-15 up to 653bbbc7330Christophe Simonis
2018-09-04[MERGE] forward port branch saas-14 up to 14f8ef59b88Christophe Simonis
2018-09-04[MERGE] forward port branch 10.0 up to 0f0e43ae557Christophe Simonis
2018-09-04[MERGE] forward port branch 9.0 up to 61b771256caChristophe Simonis
2018-09-03[FIX] web_editor: focus lost with inline editorNicolas Lempereur
When an inline editor is eg. in a form view, the focus is always stolen by it. This is because we trigger a mouseup on the editor to update its toolbars values and informations. In 10.0 this was not necessary since the default values were sanely set when the editor was inside the DOM. In 11.0 the editor is not in the DOM when this is being done and the info was wrong (eg. NaN for text size). With this commit, we don't steal the focus and get the default like it was done in 10.0 instead. fixes #26366 opw-1874880 closes #26582
2018-09-03[FIX] web_editor: back to first -> history stay okNicolas Lempereur
If we do: - one change that will be saved in history - go back to the document before any change - do other change we can easily get in a state were the history is no longer recorded. The history is kept like this: - pos: our position in the history - aUndo: the snapshots of history - toSnap: the last history snapshop that is to be saved so for example if we start without change (at originalState): {pos: 0, aUndo=[], toSnap=null} Then we do two changes (change1, change2): {pos: 2, aUndo=[originalState, change1], toSnap=change2} If we make an undo, we will get to: {pos: 1, aUndo=[originalState,change1,change2], toSnap=null) If we make another change (change3): {pos: 2, aUndo=[originalState, change1], toSnap=change3} So the history after the position is removed. But when we get back to the original, the state would forever be: {pos: 0, aUndo=[originalState], toSnap=change85} because when doing a change, the code only removed history from the max(pos, 1) index. opw-1870119 closes #26701
2018-09-03[FIX] web_editor: normal up/down in content in cellNicolas Lempereur
In the editor in a table cell, when we press UP/DOWN keys: - we have default editor/browser behavior if there is content before (UP) or after (DOWN) the element we are currently on - else we go to the previous (UP) or next (DOWN) row if available - else we go to the next content if available - else we have the default editor/browser behavior But when checking if there is an element before/after the content, we did not take into account if there was an ancestor node inside the cell that had content after, so for example with this structure: ``` <table> <tr><td> <p>hello <b>world</b></p> <p>cruel</p> </td></tr> <tr><td> <p>bingo</p> </td></tr> </table> ``` if the current range was on 'world' text node, we would just check if there is content after this text node, not if there is content after its `<p/>` ancestor. Before the fix we would get on the next row, after we would have default editor/browser behavior: ie. if cruel is on another line, going to this line. opw-1870119 closes #26701
2018-08-14[MERGE] forward port branch 11.0 up to 51225c9b9f2Christophe Simonis
2018-08-10[FIX] web_editor: remove related videos at the end of youtube embedslen-odoo
If a user embeds a youtube video on his website, he has no option to remove the suggestion of related videos at the end of playback. Since there is no good reason to have it, we disable the related videos in all cases. opw 1868380
2018-08-07[MERGE] forward port branch saas-11.2 up to d7e2c767ce5Christophe Simonis
2018-08-07[MERGE] forward port branch 11.0 up to 3513e599a7aChristophe Simonis
2018-08-06[FIX] base: inline buttons was breaking into multiple lines (outlook hack)Deep Patel
Because we converted buttons into tables so inline buttons was breaking into multiple lines so we need to add display inline and vertical align properties in tables. We allowed display property from mail sensitizer whitelist. Because in this commit https://github.com/odoo/odoo/commit/cf15030ed09f7479f5b2701ba101a5bed71f7409 we use display property for align items
2018-08-06[FIX] mass_mailing: fixed multiple buttons transcoding issues (outlook hack fix)Deep Patel
Because of outlook hack node was not find next sibling of current element. Due to this only first button is transcoded into inline css.