summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
AgeCommit message (Collapse)Author
2017-08-16[MOV] web_editor, website: reorganize filesqsm-odoo
2017-02-20[FIX] web_editor, website: restore content menu featureqsm-odoo
Commit 3c9e6c89e7207636c1bdab4ed8118c0c1089d43e made big changes to the link editor dialog... but also broke many features with it. Commit 9a1ea6dc08af8b6dc5c5a47277f03f662094d4b2 already fixed some of them but this commit fixes a bigger one. Indeed, the menu edition feature was totally broken since the changes. Also, the DOM was messy which broke form navigation, etc. This commit also simplifies the LESS which was uselessly big.
2017-02-14[REF] web_editor, website: split customize_template_getqsm-odoo
Commit a2ae219d4ee283b7e7af84a3e7fa3bb8e0a95f23 fixed the customize_template_get function(s) which had been modified for the 10.0 web_studio release. While the fix also reorganized the structure to make it more efficient and understandable, it promised that the function would be refactored in master. This is what this commit does. The customize_template_get route of the website module was also removed with commit 5a030db3eb77b6d80187f8ae1a64303b2f50391d as it was an useless duplicate of the web_editor customize_template_get route. The old route handled two totally different features of odoo: getting all the page-related views to allow their edition with the HTML editor and getting the "toggable views" which appear in the "Customize" website menu. The parameter "full" allowed to determine which one the route was supposed to do and was useless until website was installed to add its feature (by extending the route behavior). In both cases, views informations are returned, only the number of views differs. The above-mentionned fix already did part of the refactoring by returning the same info structure for each view in both cases. Now, the function has been split. The web_editor customize_template_get route is renamed as get_assets_editor_resources and returns the info the HTML editor needs to work (the "assets" term is in prevision of the new LESS editor). A new website route "get_switchable_related_views" has been created to return the info the "Customize" website menu needs. Both use the renamed ir.ui.view function "get_related_views" (old ir.ui.view customize_template_get function) which now returns a recordset and not a list of dictionnaries.
2017-02-10[IMP] web_editor: improve `LinkDialog` widget design and usabilityParth Gajjar
Specification ============= - no boxes around fields - use regular form style for input fields - don't split page/URL into two fields, just do one URL field, with autocomplete - Add alpha, beta, gamma, delta and epsilon color in color selection because they are used in mass mailing and themes also. - Add a selection option with label "L" inside circle for link. - Add Color selector for choosing button color - Remov select2 page selector and used jquery autocomplete on same input - Fix issue of page search in ir.http
2016-11-08[REF] website, web_editor: refactor ace editorqsm-odoo
Stop using ugly code for ace editor. * Really close the ace editor by changing its display property thanks to the dedicated do_show and do_hide method. * Make the common part of ace editors (website, web_studio) consistent so that the extensions are really small. * Do not do RPC to retrieve data already retrieved (now, there is only one unique RPC when the editor starts an one RPC per view changed on save). * Fix born-dead code so that the website editor starts automatically if the URL contains its associated hash and loads the correct view * Better handle errors (previous behavior only worked partially and only on chrome): - Jump to the error line and make it red. - Do not open a Dialog with mostly incomprehensible message but allow to open it on click of the error marker. - Do not save any changed file if one contains an error. - Do not allow formatting a file if it contains an error (show the error instead). * Do not use different routes to get the same content (remove the /website/customize_template_get route as it returns the same content as /web_editor/customize_template_get route). Note: in a further commit this route will be refactored. * In a general way, use consistent method names and behaviors / comment the code / lint files / ... * Open the code to extensions (so that it may later load other data than XML). Note: this refactoring allowed to fix bugs in previous odoo versions but this commit message will not detail them.
2016-10-14[FIX] web_editor, website: fix customize_template_getqsm-odoo
Commit e11f23b701cd061ee2090e506e7ff71cc2ed8c33 split the website customize_template_get into web_editor and website ones. This split was not perfect and commit 20861b482a0f84c2946cc14a05648b87b95bdac4 tried to make it work... but did not made it totally and added an indirect dependency to website module in web_editor... As the final result is wrong and inconsistent and that the previous 9.0 implementation was already ugly, this was not possible to make a consistent full-stable fix. This commit tries to make a fix as stable as possible (the main method name did not change, the arguments did not change, their purpose is the same, ...) which makes the code work and be less ugly. However, the function returns are now slightly different (and JS depends on it). It returns only valid view information (not header stuff which is not related to anything and the inherit_id value is now a combination of the inherit view id and name). Also, a new private method has been created. Also, the method contained code which was deprecated since saas-6 but was never removed (and never broke anything "by chance"). In master these methods will be refactored to make more sense.
2016-10-04[FIX] website: set the correct height for welcome messageqsm-odoo
Commit 48a1eaf79273fbf40b4b0a55ed28d27382477450 adapt the welcome message on website so that it fits the page height. But this does only worked for large screens as the height was forced to main height... which is smaller than the default welcome message height on small screen. The fix only had to use min-height instead of height.
2016-09-30[FIX] website: reset full to False by defaultJeremy Kersten
Studio altered (probably by error) the default value. We reset the old default value, and by security, add the params in the call
2016-09-30[FIX] website: load customize menu at once if already openedqsm-odoo
Following commit 3cbc7ebc4c3e0edb25d1a91dcbf4df163ef6d29e, the bug for customize menu could have been ignored but as it is an easy fix : The customize menu is filled after a rpc which is performed on mousedown on the menu toggle. But in the case the user clicked on the customize menu before the mousedown handler was attached... nothing occured. It is possible since the customize menu is rendered but its JS widget is only attached to it once everything is ready. Now, the menu is filled on first mousedown or if the menu is already opened when the JS widget is attached.
2016-09-21[FIX] website: increase limit in searchpage for menuJeremy Kersten
In edit menu, search with de demo data /shop, was the 12th results, but limit 9. We only move the problem to later, but when the user start with the website apps, it avoid to be lost on first menu creation.
2016-09-02[IMP] website: make the welcome message fit the whole page heightqsm-odoo
2016-08-31[FIX] website: pass `ids` as a positional argumentRaphael Collet
For the sake of simplicity, the method adapter `call_kw_multi` does not look up for `ids` in keyword arguments, instead it expects it in positional arguments.
2016-07-25[MERGE] forward port branch saas-11 up to 7ae5121Christophe Simonis
2016-07-25[MERGE] forward port branch 9.0 up to 1089dcfChristophe Simonis
2016-07-20[FIX] web_editor,website: allow creating pages from edit menuqsm-odoo
The code for page creation from menu edition dialog was there but invisible to the user because of a wrong qweb template inheritance. Indeed, the edit menu dialog relies on an extension of the link dialog template. But this one is extended in-place in another location and that extension is not considered when the second extension is made because a t-extend always use the base template. The only solution to achieve the same result is to copy the edit menu dialog qweb extension in Javascript. Note: the feature was still available from the link dialog in page edition though because this was not concerned by the wrong qweb extension. However, adding a page by this way would create multiple pages because one was created each time a page name was entered (and not only on save !). So typing "test", then changing its mind and typing "hello", then rechanging to "test", then hitting the save button created the "test, "test-1", "test-2" and "hello" pages. This fix takes advantage of an already present parameter which can determine if a new page should be created or not. However, a code refactoring should be done in master for these classes.
2016-07-04[IMP] website,web_editor: review style / contentqsm-odoo
* Mobile preview dialog * Add page dialog (allow to click anywhere to close the modal) * Change label for "auto resize" and "resize" options to "auto size" and "fixed size" and add a checkmark to the currently active one * Overlay border / Options dialog content * Hide the odoo navbar after a delay when the editor starts
2016-07-04[IMP] website: homepage welcome message when emptyqsm-odoo
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
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-07-10[IMP] web_editor: adapt css, js and xml to use web_editorChristophe Matthieu
2015-07-10[IMP] web_editor: split website into web_editor (to use editor in backend ↵Christophe Matthieu
for html field) and website
2015-06-25[MERGE] forward port of branch saas-6 up to 81b5c60Christophe Simonis
2015-06-17[FIX] website: use relative url in background imageChristophe Matthieu
Use .css convert into absolute url
2015-06-17[FIX] website: Edition with Firefox with CSS of external domains.Denis Ledoux
Firefox doesn't allow to access sheets cssRules In such a case, we just pass, these css rules will simply not be available for the edition of some inputs. Probably, when a real use case needing these external css rules will come, we will probably need to fetch these style sheets another way. opw-642752
2015-06-17[FIX] website editor clear()Xavier Morel
Apparently in some unclear situations, using delete on the dataset blows up (issue appears in both Safari and phantomjs) failing the test. Only try the deletion if the item is actually present in the dataset, and wrap it in a try/except to handle it blowing up
2015-05-29Revert "[FIX] website: moved website.xml loading to editor"Denis Ledoux
This reverts commit e18a3a43e44da86a92acbe77501838ec6deb87db. website.error is used in the Javascript file it was removed from, in website.js, line 350. Another solution to not load this template when not needed has to be found opw-640822
2015-05-28[MERGE] forward port of branch saas-6 up to bf1e999Christophe Simonis
2015-05-21[FIX] website: moved website.xml loading to editorDavid Monjoie
To avoid loading unneccesary templates on every page.
2015-05-05[MERGE] forward port of branch 8.0 up to a939a27Christophe Simonis
2015-04-29[FIX] website: edit menuGoffin Simon
when closing a modal, the class 'modal-open' was removed from the 'body' tag and all the existing modals became not scrollable. The class 'modal-open' must be kept in the 'body' tag if there is still a visible modal in the dom. Inspired from commit: dee000be14fd55f7d287eee8569f769505f339ac opw:633801
2015-04-17[MERGE] forward port of branch saas-6 up to e941c0fChristophe Simonis
2015-04-09[FIX] website: snippet editor: if a snippet is dropped near a text node with ↵Christophe Matthieu
a previous click, need to get the parent node to trigger the history
2015-04-07[FIX] website.editor: remove javascript exception when the user close the ↵Christophe Matthieu
modal after add a question in website_forum
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] website: update to the new module systemGéry Debongnie
2015-02-12[FIX] website editor: open the media dialog when double click on summernote ↵Christophe Matthieu
button for forum; raise if click on a button before click inside the editor
2015-02-12[IMP] website: create a new web editor in the backend to edit html field ↵Christophe Matthieu
with the website builder
2015-02-12[FIX] website editor: add a p tag when user insert a char in empty editable areaChristophe Matthieu
2015-02-12[IMP] website editor: add color picker into the top editor bar for font awsomeChristophe Matthieu
2015-02-12[IMP] summernote: dom.isImg is unnecessary, because isVoid function contains ↵Christophe Matthieu
that.
2015-02-09[FIX] website editor: don't not apply o_is_inline_editable class for image ↵Christophe Matthieu
field to keep image in center
2015-01-30[FIX] Website: Image editing not possible with safari.Goffin Simon
opw-626209
2015-01-23[IMP] website editor: add media-saved trigger into media editor when the ↵Christophe Matthieu
media is changed
2015-01-23[IMP] website editor: by default apply img-responsive and pull-left on ↵Christophe Matthieu
insert images and option resize apply width in percent
2015-01-23[IMP] website editor: remove font size from media editor (font size is ↵Christophe Matthieu
available in image edition bar)
2015-01-23[IMP] website editor: 'active' link when click to allow the edition of the ↵Christophe Matthieu
last and first char
2015-01-16[ADD] Versioning Module.Goffin Simon
This module allow to make versioning and A/B testing of the website.
2015-01-16[FIX] website editor: Issues with link dialog. After changing style one ↵Christophe Matthieu
button from the modal, all its right sibling buttons are dis-appeared.; delete content of the range is wrong
2015-01-16[IMP] website editor: designer can add new font like font-awsome (add folder ↵Christophe Matthieu
and need to push the new parser in website.editor.fontIcons javascript object)