diff options
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/framework/data.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/views/form_widgets.js | 14 | ||||
| -rw-r--r-- | addons/web/static/src/less/list_view.less | 6 |
3 files changed, 17 insertions, 5 deletions
diff --git a/addons/web/static/src/js/framework/data.js b/addons/web/static/src/js/framework/data.js index 92c85de3c16..78bc5f39bfd 100644 --- a/addons/web/static/src/js/framework/data.js +++ b/addons/web/static/src/js/framework/data.js @@ -688,7 +688,7 @@ var DataSetSearch = DataSet.extend({ .limit(options.limit || false); q = q.order_by.apply(q, this._sort); - return q.all().done(function (records) { + return this.orderer.add(q.all()).done(function (records) { // FIXME: not sure about that one, *could* have discarded count q.count().done(function (count) { self._length = count; }); self.ids = _(records).pluck('id'); diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js index 194f9bc5443..a72702a2d08 100644 --- a/addons/web/static/src/js/views/form_widgets.js +++ b/addons/web/static/src/js/views/form_widgets.js @@ -441,6 +441,7 @@ var FieldCharDomain = common.AbstractField.extend(common.ReinitializeFieldMixin, this.$('.o_debug_input').val(this.get('value')); } } else { + this.$('.o_form_input').val(''); this.$('.o_count').text(_t('No selected record')); var $arrow = this.$('button span').detach(); this.$('button').text(_t('Select records ')).append($("<span/>").addClass('fa fa-arrow-right')); @@ -965,7 +966,7 @@ var FieldRadio = common.AbstractField.extend(common.ReinitializeFieldMixin, { if(this.get('effective_readonly')) { this.$el.html(this.get('value')? this.get('value')[1] : ""); } else { - this.$("input").filter(function() {return this.value == self.get_value();}).prop("checked", true); + this.$("input").prop("checked", false).filter(function () {return this.value == self.get_value();}).prop("checked", true); } } }); @@ -1400,13 +1401,17 @@ var FieldStatus = common.AbstractField.extend({ return fields; }); }, - on_click_stage: function (ev) { + on_click_stage: _.debounce(function (ev) { var self = this; var $li = $(ev.currentTarget); + var ul = $li.closest('.oe_form_field_status'); if (this.view.is_disabled) { return; } var val; + if (ul.attr('disabled')) { + return; + } if (this.field.type === "many2one") { val = parseInt($li.data("id"), 10); } else { @@ -1422,13 +1427,16 @@ var FieldStatus = common.AbstractField.extend({ this.view.recursive_save().done(function() { var change = {}; change[self.name] = val; + ul.attr('disabled', true); self.view.dataset.write(self.view.datarecord.id, change).done(function() { self.view.reload(); + }).always(function() { + ul.removeAttr('disabled'); }); }); } } - }, + }, 300), }); var FieldMonetary = FieldFloat.extend({ diff --git a/addons/web/static/src/less/list_view.less b/addons/web/static/src/less/list_view.less index e335fc2ca82..7097f51eba8 100644 --- a/addons/web/static/src/less/list_view.less +++ b/addons/web/static/src/less/list_view.less @@ -79,7 +79,7 @@ // Grouped list views tbody > tr.o_group_header { .o-vertical-gradient(#fcfcfc, #dedede); - + .o_group_name { white-space: nowrap; } @@ -114,6 +114,10 @@ .o_temp_visible { opacity: 0; display: block!important; + + &.o_form_invisible { + display: block!important; + } } .o_list_view { |
