summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2014-09-25 15:32:25 +0200
committerOlivier Dony <odo@openerp.com>2014-09-26 16:50:34 +0200
commit77c41cc5cb64a951789d251b445f05e42cf1b997 (patch)
tree864db83294a3a707ab6a9f485f04f41fe40dee7c /addons/website/static/src/js/website.editor.js
parentdd2f2291532e1839ccee8298c4bb3eb784f34a3d (diff)
[FIX] website: 'Display Editor Bar on Website' group stopped working at commit a2ef044c477
The Edit button never appeared anymore for these users. The idea was that they should see an edit button with limited editing capabilities depending on their other access rights. For example, someone with only Sales Manager access and 'Display Editor Bar on Website' would be able to edit online quotes from the website_quote module, but not change the actual website pages or menus, for instance.
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index ee6368ea5aa..82888c5d8a3 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -308,7 +308,6 @@
this.$('#website-top-edit').hide();
this.$('#website-top-view').show();
- this.$buttons.edit.show();
var $edit_button = this.$buttons.edit
.prop('disabled', website.no_editor);
@@ -822,14 +821,7 @@
return $(root).find('[data-oe-model]')
.not('[data-oe-type = "selection"]')
.not('link, script')
- .not('.oe_snippet_editor')
- .filter(function () {
- var $this = $(this);
- // keep view sections and fields which are *not* in
- // view sections for top-level editables
- return $this.data('oe-model') === 'ir.ui.view'
- || !$this.closest('[data-oe-model = "ir.ui.view"]').length;
- });
+ .not('.oe_snippet_editor');
},
_current_editor: function () {