diff options
| author | Christophe Matthieu <chm@openerp.com> | 2014-01-16 19:05:35 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2014-01-16 19:05:35 +0100 |
| commit | 4ff74cbf9929ad41a01fd22c9e3c6050277a6214 (patch) | |
| tree | 8f910e936c487694bd3e2b6e3fe3c841b90c660f /addons/website/static/src/js/website.editor.js | |
| parent | d54544e31707131d58b2ae29dac1a533bd0aa931 (diff) | |
[IMP] website: editor menus is displayed in function of users groups (event, blog...)
bzr revid: chm@openerp.com-20140116180535-c736cuxn12qghiea
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 69b58a0c496..67e7277d0c5 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -397,12 +397,14 @@ 'click button[data-action=edit]': 'edit', 'click button[data-action=save]': 'save', 'click a[data-action=cancel]': 'cancel', - 'click a[data-action=new_page]': 'new_page', }, container: 'body', customize_setup: function() { var self = this; var view_name = $(document.documentElement).data('view-xmlid'); + if (!view_name) { + this.$('#customize-menu-button').addClass("hidden"); + } var menu = $('#customize-menu'); this.$('#customize-menu-button').click(function(event) { menu.empty(); @@ -579,17 +581,6 @@ website.reload(); }) }, - new_page: function (ev) { - ev.preventDefault(); - website.prompt({ - window_title: "New Page", - input: "Page Title", - }).then(function (val) { - if (val) { - document.location = '/pagenew/' + encodeURI(val); - } - }); - }, /** * Creates a "hover" button for image and link edition |
