[MERGE][IMP] Kanban view: Better display of help message when there are no records, especially when displaying empty columns

bzr revid: rim@openerp.com-20140411135759-r4fv9g4vucjee6t6
This commit is contained in:
Richard Mathot (OpenERP)
2014-04-11 15:57:59 +02:00
3 changed files with 7 additions and 7 deletions
@@ -9,6 +9,8 @@
.openerp .oe_kanban_view .oe_view_nocontent {
position: relative;
max-width: none;
z-index: 1;
width: 100%;
height: 100%;
}
.openerp .oe_kanban_view .oe_view_nocontent .oe_view_nocontent_content {
+4 -6
View File
@@ -43,7 +43,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
this.currently_dragging = {};
this.limit = options.limit || 40;
this.add_group_mutex = new $.Mutex();
this.last_position = 'static';
},
view_loading: function(r) {
return this.load_kanban(r);
@@ -496,16 +495,15 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|| (!this.options.action.help && !this.options.action.get_empty_list_help)) {
return;
}
this.last_position = this.$el.find('table:first').css("position");
this.$el.find('table:first').css("position", "absolute");
$(QWeb.render('KanbanView.nocontent', { content : this.options.action.get_empty_list_help || this.options.action.help})).insertAfter(this.$('table:first'));
this.$el.css("position", "relative");
$(QWeb.render('KanbanView.nocontent', { content : this.options.action.get_empty_list_help || this.options.action.help})).insertBefore(this.$('table:first'));
this.$el.find('.oe_view_nocontent').click(function() {
self.$buttons.openerpBounce();
});
},
remove_no_result: function() {
this.$el.find('table:first').css("position", this.last_position);
this.$el.find('.oe_view_nocontent').remove();
this.$el.css("position", "");
this.$el.find('.oe_view_nocontent').remove();
},
/*
@@ -102,7 +102,7 @@
</t>
</div>
<t t-name="KanbanView.nocontent">
<div class="oe_view_nocontent">
<div class="oe_view_nocontent" style="position:absolute;">
<div class="oe_view_nocontent_bg"></div>
<div class="oe_view_nocontent_content">
<t t-raw="content"/>