[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
This commit is contained in:
Christophe Matthieu
2014-02-18 15:56:19 +01:00
parent e473e795f6
commit 00c810ab14
2 changed files with 15 additions and 1 deletions
@@ -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();
+2 -1
View File
@@ -261,10 +261,11 @@
<script type="text/javascript" src="/web/static/lib/select2/select2.js"></script>
<script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap-tour/bootstrap-tour.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/lib/ace/ace.js"></script>
<script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap-tour/bootstrap-tour.js"></script>
<!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) -->
<script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script>
<script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script>