[FIX] Fix empty list menu tips on editable lists
bzr revid: fme@openerp.com-20120510092621-kbjjmo6yct1ndg3c
This commit is contained in:
parent
7e39103793
commit
9eb8e07d4f
|
@ -820,15 +820,18 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
}
|
||||
},
|
||||
no_result: function () {
|
||||
this.$element.find('.oe_view_nocontent').remove();
|
||||
if (this.groups.group_by
|
||||
|| !this.options.action
|
||||
|| !this.options.action.help) {
|
||||
return;
|
||||
}
|
||||
this.$element.children('table').replaceWith(
|
||||
this.$element.find('table:first').hide();
|
||||
this.$element.prepend(
|
||||
$('<div class="oe_view_nocontent">')
|
||||
.append($('<img>', { src: '/web/static/src/img/view_empty_arrow.png' }))
|
||||
.append($('<div>').html(this.options.action.help)));
|
||||
.append($('<div>').html(this.options.action.help))
|
||||
);
|
||||
}
|
||||
});
|
||||
instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.ListView.List# */{
|
||||
|
|
|
@ -70,6 +70,8 @@ openerp.web.list_editable = function (instance) {
|
|||
*/
|
||||
do_add_record: function () {
|
||||
if (this.options.editable) {
|
||||
this.$element.find('table:first').show();
|
||||
this.$element.find('.oe_view_nocontent').remove();
|
||||
this.groups.new_record();
|
||||
} else {
|
||||
this._super();
|
||||
|
|
Loading…
Reference in New Issue