summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/widgets
AgeCommit message (Collapse)Author
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
2018-09-05[MERGE] forward port branch 11.0 up to 213759b03e5Christophe Simonis
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-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-07-30[MERGE] forward port branch saas-11.2 up to 3376bad191dChristophe Simonis
2018-07-30[FIX] web_editor: link creation: @ not necessarily a mailtoLucas Perais (lpe)
In the field HTML, click on create hyperlink as its url, put in http://hell-broke-luce.waits/?param=tom@waits.com Before this commit, since the url merely contains a @, it was considered as a mailto: link After this commit, if the url starts with a flavor of http, it is considered as a standard http link OPW 1869087 closes #26012
2018-06-28[MERGE] forward port branch saas-11.2 up to d112a163cddChristophe Simonis
2018-06-27[FIX] web_editor: properly save media dialog without any imageqsm-odoo
Commit https://github.com/odoo/odoo/commit/50418c481182cb414792da32f2a0529503e59f9c was correctly forward-ported up to 11.0. This commit fixes the forward-port from saas-11.2.
2018-06-15[MERGE] forward port branch saas-11.2 up to b170a753e18Christophe Simonis
2018-06-15[MERGE] forward port branch 11.0 up to b05e4d5f958Christophe Simonis
2018-06-14[MERGE] forward port branch saas-15 up to a53bea49fe4Christophe Simonis
2018-05-29[MERGE] forward port branch saas-11.2 up to a2f275dfc48Christophe Simonis
2018-05-25[FIX] portal, web_editor: keep BS 'img-responsive' *opt-in*qsm-odoo
Bootstrap 'img-responsive' behavior was opt-in for a reason but commit https://github.com/odoo/odoo/commit/f79b00c3b71e02f73537cb17285a6902fc0906b5 tried to defy that anyway. This would break existing client databases ... or at least our odoo.com. This commit adds the img-responsive class for *new* *editor* images (still with inline-block display), preventing breaking libraries or custom (prod) images.
2018-05-25[MERGE] forward port branch saas-11.2 up to 58e35522468Christophe Simonis
2018-05-22[FIX] web_editor: avoid traceback when open img editorJeremy Kersten
In some case, (e.g.: demo data), datas_fname is undefined and match of undefined will crash and block the modal to be opened. Uncaught TypeError: r.datas_fname.match is not a function
2018-04-18[MERGE] forward port branch saas-11.2 up to fed775bc0c2Christophe Simonis
2018-04-18[MERGE] forward port branch 11.0 up to 8c64159b884Christophe Simonis
2018-04-17[FIX] web_editor,mail: send email's attachments without write accessChristophe Matthieu
Before this fix, when a user don't have write access on a document, he can't send an email with attachment because, the attachments is added on the document. The change improving security was introduced by the commit: https://github.com/odoo/odoo/commit/6494f511718893eec3573c60c0a62e04d386359d With this fix, for mail, the attachments is added on the 'mail.compose.message' and re-render the fields attachments displayed in the current view. This change respect the access rules like all others attachment of 'mail.compose.message' (can send an email when the user have read access on the document). The media dialog of the html widget display all documents attachments and the added attachments Allowing users to use these in the body of their message.
2018-04-16[MERGE] forward port branch saas-11.2 up to 90f8f17fb4fChristophe Simonis
2018-04-11[FIX] web_editor: changes lost on forward port of 744af2dbRomain Derie
Fix of 744af2db that got lost during forward port, this is just rewriting the diff for the new widget syntax.
2018-03-22[FIX] web_editor: correctly set image on double clickRomain Derie
Commit 321486851a fixed double click on media dialog when multiple selection is allowed. Still, it needs a deeper fix to ensure that the image is/remains selected when double clicking no matter it's state (selected or not) before the clicks. Double click should always force the image to be selected before saving. Step to reproduce: - Drop the Image Gallery snippet - Open new images manager (Customize > Add images or Add Images directly if no images set yet - Select an image (simple click) - Now double click on it It won't set the image since when double clicking, it: 1. Unselected the image on the first click (click event) 2. Selected the image on the second click (click event) 3. Unselected the image and saved (dblclick event)
2018-03-21[FIX] web_editor: correctly set image on double clickRomain Derie
Commit e011d58bee add the possibility to unselect images on the media dialog. But it introduced a collateral bug preventing double click to set the image. Indeed, double click event triggers not only the double click event but also twice the single click event. Before commit e011d58bee, it would work fine and as intented on double click: 1. It would trigger twice the single click, selecting twice the image. 2. Then, it would trigger the double click that would save the selected image. But after the commit: 1. It triggers twice the single click, selecting and then deselecting the image. 2. Then, it triggers the double click that saves nothing since the image got unselected on second single click event. Now, before saving on double click event, we select the image. task-1815165
2018-03-14[IMP] update ace editor to v1.3.1Géry Debongnie
Note that we do not do a custom build anymore, since we lazyload the files anyway. A custom build will save a few kb, but will not do any meaningful change to the user experience. However, it dies impact negatively our ease of maintenance, so standard build it is.
2018-03-07[MERGE] forward port branch saas-15 up to cb87388d727Christophe Simonis
2018-02-22[FIX] web_editor: do not try to expose non existant widgetsChristophe Simonis
2018-02-22[MERGE] forward port branch saas-11.1 up to e750bb6e114Christophe Simonis
2018-02-21[MERGE] forward port branch saas-16 up to 49f85485571Christophe Simonis
2018-02-21[FIX] web_editor: Export classes and methods Jairo Llopis
Add various classes and methods to allow customization Closes #23180
2018-02-20[FIX] web_editor: correct frenglishMartin Trigaux
Courtesy of e2f translators
2018-02-20[FIX] web_editor: don't format xml with script tagNicolas Lempereur
It happens from time to time that someone use "Format" on the web.layout template. Thus: ``` <script type="text/javascript"> var odoo = { csrf_token: "<t t-esc="request.csrf_token(None)"/>", }; </script> ``` becomes: ``` <script type="text/javascript"> var odoo = { csrf_token: " <t t-esc="request.csrf_token(None)"/>", }; </script> ``` breaking a number of things on the frontend and everything on the backend. On a pure javascript content, we could wrap it with: ``` //<![CDATA[ /* javascript content */ //]]> ``` but in this instance we still want the xml to be processed. This commit avoids formatting XML containing a script tag. opw-815865 closes #23164
2018-02-14[MERGE] forward port branch saas-16 up to 77927559465Christophe Simonis
2018-02-12[MERGE] forward port branch saas-11.1 up to c69d00157edChristophe Simonis
2018-02-12[FIX] web_editor: regression less editor 5af122387Nicolas Lempereur
In 5af12238 a change was made to have the correct hierarchy levels, but this can cause an issue when editing less files. This is because we now had "undefined + 1" which gives NaN which breaks Array constructor. opw-814579 opw-815397 opw-814322 opw-815265 opw-814021 closes #23006
2018-02-08[FIX] base/mail: Added an access_token on the attachments urlChristophe Matthieu
The access_token is automatically added by the media editor. It's added on the website and by the html editor to send by email. The widget display the attachments from 'ir.ui.view' (public attachment) and the attachment from the current record. Issue: can't load image in gmail or mobile because the client mail use a proxy who avoid ours odoo access.
2018-02-08[FIX] web_editor: encoding of the attachment name is missing in image srcChristophe Matthieu
2018-02-01[MERGE] forward port branch saas-11.1 up to 7e469eb77aaChristophe Simonis
2018-02-01[FIX] web_editor: xml editor first level not shownNicolas Lempereur
There is a slight visual inconsistency since: 9af8d5e6 the xml/less editor for first level of descendants were just prefixed by an invisible space. opw-807624 closes #22704
2018-01-25[MERGE] forward port branch saas-11.1 up to 8613724bfccChristophe Simonis
2018-01-25[FIX] portal, web_editor: responsive images but with inline displayqsm-odoo
Commit https://github.com/odoo/odoo/commit/abde8bddf8ec45cf12aab59e95c330321158cfba made a small change to make all images responsive when they are added with the editor. This had however the side effect of making them go to a new line which may not be what we want.
2018-01-25Revert "[FIX] base: bad back-port"Christophe Simonis
This reverts commit 0ac6043ec746ef4c4d4ddb66edc93c0ae098ca0b.
2018-01-16[IMP] website: more intuitive image and link editionqsm-odoo
- Remove useless snippet background suggestions (only one button to open the media dialog directly) - Show meaningful-only tabs in the media dialog (no document as background, ...) - When editing a background shows the background suggestions first and show the background suggestions last for standard images. Technically, this is done by filtering on the name/fname of the attachments and adding magic name parts to the fname on image upload (e.g. when uploading an image from the media dialog when customizing a bg, the uploaded image will automatically be marked as a background). Note: there were discussions to implement this feature with a tag system for ir.attachment/s but the implementation's cost was too great in regards to the feature. - When editing an existing link or creating one from selected text, do not show the "Link Label" field in the dialog; it was confusing. Only show that field when adding a link at the cursor location with no selected text.
2018-01-16[REF] web_editor, website(_*): refactore media & link dialogsqsm-odoo
* blog, gengo, sale
2017-12-12[MERGE] forward port branch saas-16 up to a2ea4ba095cChristophe Simonis
2017-11-30[MERGE] forward port branch saas-16 up to 5d7ad2b16ccChristophe Simonis
2017-11-16[MERGE] forward port branch saas-16 up to 745d00362abChristophe Simonis
2017-11-15[FIX] web_editor: restore selected images displayqsm-odoo
In the media dialog, when an image is selected, it has a colored border to indicate it. Commit https://github.com/odoo/odoo/commit/e011d58bee140411ccfb1ef9115dddc090d573c3 made changes, part of them designed to "Improve the image dialog to be able to select/unselect". While this commit was indeed doing that, it was also breaking stuff: when selecting image(s) then performing a search, the colored border disappeared while the images were in fact still selected. Fortunately, this stuff breaking is only due to code modification that was made for no reason (so reverting part of the commit is enough to restore the features while keeping the commit's improvements).
2017-11-02[FIX] web_editor: allow selecting an uploaded img without crashqsm-odoo
Somehow, fixing multi selection with https://github.com/odoo/odoo/commit/e011d58bee140411ccfb1ef9115dddc090d573c3 broke the use of the image upload button combined with no selected image at the beginning.
2017-10-27[MERGE] forward port branch saas-16 up to 8fdac4b6b2fChristophe Simonis
2017-09-29[FIX] web_editor: HTML/CSS Editor save feedbackNicolas Lempereur
The save on the frontend worked, but there was no feedback that it worked if the identifier of the file currently edited broke a jQuery attribute selector value (eg. /test.less breaks it).