diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-05-15 11:14:46 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2015-06-15 16:30:35 +0200 |
| commit | 4072e336a296a8da873b2b69cfb00d379a41c67c (patch) | |
| tree | 4a333f15865159d11f96173379fc46a6e783ecd2 /addons/website/static/src/js/website.backend.js | |
| parent | c530c0d1ee179a9660e539a6e5249db0e4a49714 (diff) | |
[FIX] Cross-addons: Kanban templates: records editable/deletable
for the sake of compatibility with the communication logic in the
new Kanban implementation.
Diffstat (limited to 'addons/website/static/src/js/website.backend.js')
| -rw-r--r-- | addons/website/static/src/js/website.backend.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/website/static/src/js/website.backend.js b/addons/website/static/src/js/website.backend.js index b1920dc4cab..d1bb6c2f5b0 100644 --- a/addons/website/static/src/js/website.backend.js +++ b/addons/website/static/src/js/website.backend.js @@ -9,10 +9,13 @@ var form_widgets = require('web.form_widgets'); // required to guarantee that var WidgetWebsiteButton = form_common.AbstractField.extend({ template: 'WidgetWebsiteButton', render_value: function() { + // Hack to replace false value by unpublished because falsy form fields + // have classname o_form_field_empty and are hidden + if (!this.get_value()) { + this.set_value('unpublished'); + } this._super(); - this.$() - .toggleClass("success", this.get_value()) - .toggleClass("danger", !this.get_value()); + this.$el.toggleClass("published", this.get_value() === true); if (this.node.attrs.class) { this.$el.addClass(this.node.attrs.class); } |
