[FIX] prevent dragging click target images of m2o and datetime fields

can get slightly disturbing when missing a click and slightly dragging the image instead, possibly to the input (pasting its URL)

lp bug: https://launchpad.net/bugs/1098230 fixed

bzr revid: xmo@openerp.com-20130218104529-i0i8700v2mwxje4b
This commit is contained in:
Xavier Morel 2013-02-18 11:45:29 +01:00
parent 7bfb7eaa13
commit 6fe0dd8032
1 changed files with 4 additions and 1 deletions

View File

@ -2374,6 +2374,7 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({
type_of_date: "datetime",
events: {
'change .oe_datepicker_master': 'change_datetime',
'dragstart img.oe_datepicker_trigger': function () { return false; },
},
init: function(parent) {
this._super(parent);
@ -2955,7 +2956,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
case $.ui.keyCode.DOWN:
e.stopPropagation();
}
}
},
'dragstart .oe_m2o_drop_down_button img': function () { return false; },
'dragstart .oe_m2o_cm_button': function () { return false; }
},
init: function(field_manager, node) {
this._super(field_manager, node);