[FIX] account,web(_diagram): FieldMany2One: rename $drop_down
$drop_down has been renamed into $dropdown in enterprise edition, which was probably not a good idea, as it is accessed from outside web.
This commit is contained in:
@@ -1834,9 +1834,7 @@ var bankStatementReconciliationLine = abstractReconciliationLine.extend({
|
||||
$.when(self.changePartner(false)).then(function(){
|
||||
self.$(".change_partner_container").show();
|
||||
self.$(".partner_name").hide();
|
||||
// Old design uses drop_down and new design uses dropdown
|
||||
var m2o_widget_dropdown = self.change_partner_field.$drop_down || self.change_partner_field.$dropdown;
|
||||
m2o_widget_dropdown.trigger("click");
|
||||
self.change_partner_field.$dropdown.trigger("click");
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -97,9 +97,9 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com
|
||||
this.render_editable();
|
||||
},
|
||||
destroy_content: function () {
|
||||
if (this.$drop_down) {
|
||||
this.$drop_down.off('click');
|
||||
delete this.$drop_down;
|
||||
if (this.$dropdown) {
|
||||
this.$dropdown.off('click');
|
||||
delete this.$dropdown;
|
||||
}
|
||||
if (this.$input) {
|
||||
this.$input.closest(".modal .modal-content").off('scroll');
|
||||
@@ -135,7 +135,7 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com
|
||||
self.hide_error_displayer();
|
||||
});
|
||||
|
||||
this.$drop_down = this.$el.find(".oe_m2o_drop_down_button");
|
||||
this.$dropdown = this.$el.find(".oe_m2o_drop_down_button");
|
||||
this.$follow_button = $(".oe_m2o_cm_button", this.$el);
|
||||
|
||||
this.$follow_button.click(function(ev) {
|
||||
@@ -179,7 +179,7 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com
|
||||
};
|
||||
this.$input.keydown(input_changed);
|
||||
this.$input.change(input_changed);
|
||||
this.$drop_down.click(function() {
|
||||
this.$dropdown.click(function() {
|
||||
self.$input.focus();
|
||||
if (self.$input.autocomplete("widget").is(":visible")) {
|
||||
self.$input.autocomplete("close");
|
||||
|
||||
@@ -261,7 +261,7 @@ var DiagramView = View.extend({
|
||||
if (!(fld in form_controller.fields)) { return; }
|
||||
var field = form_controller.fields[fld];
|
||||
field.$input.prop('disabled', true);
|
||||
field.$drop_down.unbind();
|
||||
field.$dropdown.unbind();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user