[IMP]If the user clicks on an empty row of a list, bounce the Create button

bzr revid: ggh@tinyerp.com-20120629074124-vxh7ngcyvqvb9zok
This commit is contained in:
ggh-openerp 2012-06-29 13:11:24 +05:30
parent e748c3d4cf
commit 58d7c74c1d
1 changed files with 7 additions and 0 deletions

View File

@ -285,6 +285,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
this.$element.find('.oe_list_buttons').replaceWith(this.$buttons);
}
this.$buttons.find('.oe_list_add')
.wrap("<div></div>")
.css({"float":"left","margin-right":"4px"})
.click(this.proxy('do_add_record'))
.prop('disabled', grouped && this.options.editable);
this.$buttons.on('click', '.oe_list_button_import', function() {
@ -978,6 +980,11 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
}
self.row_clicked(e);
}
else{
if (opts.options.$buttons){
$(opts.options.$buttons.find('.oe_list_add')).effect("bounce", { times:5 }, 300);
}
}
});
},
row_clicked: function (e, view) {