[IMP]Improve code

bzr revid: vja@tinyerp.com-20130501055618-06xc6fgj50npvk3u
This commit is contained in:
Vishmita Jadeja (openerp) 2013-05-01 11:26:18 +05:30
parent 847c51b1d7
commit 23687ef653
1 changed files with 3 additions and 7 deletions

View File

@ -2757,14 +2757,10 @@ instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
return input ? input.focus() : false;
},
click_disabled_boolean: function(){
var $disabled = $(document).find('input[type=checkbox]:disabled');
var $disabled = this.$el.find('input[type=checkbox]:disabled');
$disabled.each(function (){
var $parent = $(this).closest("span");
if($(this).next('div')){
$(this).next('div').remove();
}
var $overlay = $("<div class=boolean />");
$parent.append($overlay);
$(this).next('div').remove();
$(this).closest("span").append($('<div class="boolean"/>'));
});
}
});