From 00c810ab14e101cb93caa395216650784d2737a4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 18 Feb 2014 15:56:19 +0100 Subject: [PATCH] [FIX] website: Don't allow to edit the menu inline. Users try to change the link, but it does not work. We can put a tooltip explaning they should use the content top menu to edit the menu; bootstrap tooltip don't available in edit mode. bzr revid: chm@openerp.com-20140218145619-fboofhu111s3g45p --- .../website/static/src/js/website.editor.newpage.js | 13 +++++++++++++ addons/website/views/website_templates.xml | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/website/static/src/js/website.editor.newpage.js b/addons/website/static/src/js/website.editor.newpage.js index 3feba25628f..b475223ecd9 100644 --- a/addons/website/static/src/js/website.editor.newpage.js +++ b/addons/website/static/src/js/website.editor.newpage.js @@ -13,6 +13,19 @@ this.$(".oe_content_menu li.divider").removeClass("hidden"); return res; }, + edit: function () { + this.on('rte:ready', this, function () { + $('a:has(span[data-oe-model="website.menu"])').tooltip({ + title: _t('Save this page and use the top "Content" menu to edit the menu.'), + placement: "bottom", + trigger: "hover", + show: 50, + hide: 100, + container: 'body' + }); + }); + return this._super(); + }, events: _.extend({}, website.EditorBar.prototype.events, { 'click a[data-action=new_page]': function (ev) { ev.preventDefault(); diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index dc7f7cda12c..e2878c27dce 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -261,10 +261,11 @@ - + +