summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/widgets
AgeCommit message (Collapse)Author
2018-05-30[MERGE] forward port branch saas-11.3 up to 53300648edeChristophe Simonis
2018-05-29[MERGE] forward port branch saas-11.2 up to a2f275dfc48Christophe Simonis
2018-05-29[MERGE] forward port branch saas-11.3 up to 37eed7c509fChristophe 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-05-18[IMP] web_editor: allow cropping content imagesKishan Gajjar
2018-04-19[MERGE] forward port branch saas-11.3 up to 204935119d1Christophe Simonis
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-18[REF] web, web_editor, website: convert LESS editor to SCSS editorqsm-odoo
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).
2017-09-18[FIX] *: fix a bunch of incorrectly documented docstringXavier Morel
Fix a bunch of ill-documented/incomplete/incorrect method docs Without this, the automatic doc generation does not work.
2017-09-15[ADD] website: add new page managementrde
website.page = old ir.ui.view with page=True website.redirect is a new mechanism to replace in the futur the ir.attachment mechanism of redirect. From now, we don't have a specific /page controller to serve 'page'. We use a new model website.page which is rendered if none route matches the url and that the field 'url' on website.page matches the request.httprequest.path. The order to serve a path is: - Routes defines in controllers (/shop, /blog, ...) - ir.attachment with name matching the path - website.page with url matching the path - website.redirect with url_from matching the path - 404 To improve: - allow regexp in website.redirect model - allow to edit the view_arch from the page.management via redirect backend (needed when traceback in the page, or when modifying a js/css/less/...)
2017-09-12[MERGE] forward port branch saas-17 up to d08b4407be3Christophe Simonis
2017-08-31[IMP] web: lazy load nvd3, ace and fullCalendar lib to reduce asset sizeChristophe Matthieu
2017-08-24[MERGE] forward port branch saas-17 up to 877e7098719Christophe Simonis
2017-08-21[IMP] web_editor: make HTML editor select2 dropdown betterqsm-odoo
In saas-15, the LESS editor was introduced alongside the use of the select2 library to style the <select/> element which allows to choose the view / less file to edit. The problem is that the default behavior of the select2 library is to open a dropdown with a max-height of 200px and a width equals to the <select/> element (with no regards to the dropdown content). In most cases, the dropdown was then displaying only a few results, broken over multiple lines. Now, the dropdown is restyled so that it has no maximum height, no set width and more readable content.
2017-08-18[IMP] web_editor: add image filename at the end of URLsVandan Shah
When an image is added thanks to the media dialog, the URL that is used was '/web/image/<id-of-the-attachment>'. Now the name of the image will be added for SEO purposes ('/web/image/<id-of-the-attachment>/<name>'). Also protect URLs with quotes to allow spaces.