[FIX] website: Don't allow to edit the menu inline. Users try to change the link...
authorChristophe Matthieu <chm@openerp.com>
Tue, 18 Feb 2014 14:56:19 +0000 (15:56 +0100)
committerChristophe Matthieu <chm@openerp.com>
Tue, 18 Feb 2014 14:56:19 +0000 (15:56 +0100)
bzr revid: chm@openerp.com-20140218145619-fboofhu111s3g45p

addons/website/static/src/js/website.editor.newpage.js
addons/website/views/website_templates.xml

index 3feba25..b475223 100644 (file)
             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();
index dc7f7cd..e2878c2 100644 (file)
 
         <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>