summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-06-17 12:22:15 +0200
committerXavier Morel <xmo@openerp.com>2014-06-17 12:22:15 +0200
commitdda18249c0fa1b2ac9d6eb39bc7397b71fb26c81 (patch)
tree26fa90eaead946c6ede7179794ce2669430263e7 /addons/website/static/src/js
parent79e10200d5cc78d39a139f63eb2a69309878ab04 (diff)
[FIX] @groups attribute should not disappear when editing
The @groups attribute in qweb views was not rendered (even when matched by the user), so editing a template with an @groups would either remove the whole section (if the user didn't have the groups, fixed in previous commit) or only removed the attribute itself making it visible to everybody (which ought be fixed-ish by this commit).
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/website.editor.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index f8d1a66bc80..601d3016068 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -497,11 +497,11 @@
this.$('#website-top-edit').hide();
this.$('#website-top-view').show();
+ var $edit_button = this.$('button[data-action=edit]')
+ .prop('disabled', website.no_editor);
if (website.no_editor) {
var help_text = $(document.documentElement).data('editable-no-editor');
- this.$('button[data-action=edit]')
- .prop('disabled', website.no_editor)
- .parent()
+ $edit_button.parent()
// help must be set on form above button because it does
// not appear on disabled button
.attr('title', help_text);