[fix] some fixes related to drop down button
bzr revid: nicolas.vanhoren@openerp.com-20110608154744-ipbu5cf30p1dxoc1
This commit is contained in:
parent
70ece35196
commit
f3b817665f
|
@ -973,10 +973,11 @@ openerp.base.form.FieldMany2One = openerp.base.form.Field.extend({
|
||||||
this.$drop_down.button({
|
this.$drop_down.button({
|
||||||
icons: {primary: "ui-icon-triangle-1-s"}, text: false
|
icons: {primary: "ui-icon-triangle-1-s"}, text: false
|
||||||
}).click(function() {
|
}).click(function() {
|
||||||
if (self.$input.autocomplete( "widget" ).is( ":visible" )) {
|
if (self.$input.autocomplete("widget").is(":visible")) {
|
||||||
self.$input.autocomplete("close");
|
self.$input.autocomplete("close");
|
||||||
} else {
|
} else {
|
||||||
self.$input.autocomplete("search");
|
self.$input.autocomplete("search");
|
||||||
|
self.$input.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1007,9 +1008,9 @@ openerp.base.form.FieldMany2One = openerp.base.form.Field.extend({
|
||||||
|
|
||||||
if (values.length > this.limit) {
|
if (values.length > this.limit) {
|
||||||
values = values.slice(0, this.limit);
|
values = values.slice(0, this.limit);
|
||||||
values.push({label: " More...", action: function() {debugger;}});
|
values.push({label: " More...", action: function() {debugger;}});
|
||||||
}
|
}
|
||||||
values.push({label: " Create...", action: function() {debugger;}});
|
values.push({label: " Create...", action: function() {debugger;}});
|
||||||
response(values);
|
response(values);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue