summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml/website.contentMenu.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-07-20 14:01:16 +0200
committerqsm-odoo <qsm@odoo.com>2016-07-20 15:59:53 +0200
commitf0620a9648d7f6ab65489432f49aa4854ee1cfd9 (patch)
treecc1cb924e59de6921ab1888c75c50bec4ccdea57 /addons/website/static/src/xml/website.contentMenu.xml
parent7c33417e894d04bc377428b949b0d73e6bda7dd6 (diff)
[FIX] web_editor,website: allow creating pages from edit menu
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.
Diffstat (limited to 'addons/website/static/src/xml/website.contentMenu.xml')
-rw-r--r--addons/website/static/src/xml/website.contentMenu.xml12
1 files changed, 0 insertions, 12 deletions
diff --git a/addons/website/static/src/xml/website.contentMenu.xml b/addons/website/static/src/xml/website.contentMenu.xml
index d6b1fe40b72..2baf4252bf3 100644
--- a/addons/website/static/src/xml/website.contentMenu.xml
+++ b/addons/website/static/src/xml/website.contentMenu.xml
@@ -58,16 +58,4 @@
</div>
</t>
</t>
-<t t-name="website.contentMenu.dialog.add" t-extend="web_editor.dialog.link">
- <t t-jquery="t[t-set='title']" t-operation="inner">
- <t t-if="!widget.update_mode">Add Menu Entry</t>
- <t t-if="widget.update_mode">Edit Menu Entry</t>
- </t>
- <t t-jquery="form > div.form-horizontal" t-operation="replace"/>
- <t t-jquery="form > div.list-group:first label" t-operation="replace">
- <label for="link-new" class="control-label">
- Menu Label
- </label>
- </t>
-</t>
</templates>