[IMP]:improved js code.

bzr revid: apa@tinyerp.com-20120508104607-w3q12gphejt3zauw
This commit is contained in:
Amit Patel (OpenERP) 2012-05-08 16:16:07 +05:30
parent 435a0a00aa
commit 5e1413aca6
1 changed files with 5 additions and 3 deletions

View File

@ -26,10 +26,12 @@ openerp.project = function(openerp) {
$('#list').replaceWith(my_list);
//it opens action in sequence which ever is first.
if (my_list.length!=0){
$(this.$element).find('.click_button').attr('data-name',my_list[0].getAttribute('data-name'));
if(isNaN(parseInt($(this.$element).find('.click_button').attr('data-name')))){
$(this.$element).find('.click_button').attr('data-type',"object")
click_button = $(this.$element).find('.click_button')
click_button.attr('data-name',my_list[0].getAttribute('data-name'));
if(isNaN(parseInt(click_button.attr('data-name')))){
click_button.attr('data-type',"object")
}
}
/* set background color.