-@charset "UTF-8";
+@charset "utf-8";
@font-face {
font-family: "mnmliconsRegular";
src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced.oe_opened div {
display: block;
}
+.openerp .oe_view_nocontent > img {
+ float: left;
+ margin-right: 1.5em;
+}
+.openerp .oe_view_nocontent > div {
+ overflow: hidden;
+ padding: 6px;
+ font-size: 125%;
+}
.openerp .oe_view_topbar {
border-bottom: 1px solid #cacaca;
background-color: #fcfcfc;
.openerp .oe_form .oe_form_group_label_border > tbody > tr.oe_form_group_row > td.oe_form_group_cell {
padding: 2px 2px 2px 8px !important;
}
-.openerp .oe_listview_nocontent > img {
- float: left;
- margin-right: 1.5em;
-}
-.openerp .oe_listview_nocontent > div {
- overflow: hidden;
- padding: 6px;
- font-size: 125%;
-}
.openerp .oe-listview-content {
width: 100%;
}
div
display: block
// }}}
- // View.topbar {{{
+ // Views Common {{{
+ .oe_view_nocontent
+ > img
+ float: left
+ margin-right: 1.5em
+ > div
+ // don't encroach on my arrow
+ overflow: hidden
+ padding: 6px
+ font-size: 125%
.oe_view_topbar
border-bottom: 1px solid #cacaca
@include vertical-gradient(#fcfcfc, #dedede)
padding: 2px 2px 2px 8px !important
// }}}
// ListView {{{
- .oe_listview_nocontent
- > img
- float: left
- margin-right: 1.5em
- > div
- // don't encroach on my arrow
- overflow: hidden
- padding: 6px
- font-size: 125%
.oe-listview-content
width: 100%
td, th
return;
}
this.$element.children('table').replaceWith(
- $('<div class="oe_listview_nocontent">')
- .append($('<img>', { src: '/web/static/src/img/list_empty_arrow.png' }))
+ $('<div class="oe_view_nocontent">')
+ .append($('<img>', { src: '/web/static/src/img/view_empty_arrow.png' }))
.append($('<div>').html(this.options.action.help)));
}
});
},
do_search: function(domain, context, group_by) {
var self = this;
+ this.$element.find('.oe_view_nocontent').remove();
this.search_domain = domain;
this.search_context = context;
this.search_group_by = group_by;
var def = $.Deferred();
self.do_clear_groups();
self.dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }).then(function(records) {
- var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset);
- self.do_add_groups([kgroup]).then(function() {
- def.resolve();
- });
+ if (_.isEmpty(records)) {
+ self.no_result();
+ def.reject();
+ } else {
+ var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset);
+ self.do_add_groups([kgroup]).then(function() {
+ def.resolve();
+ });
+ }
}).then(null, function() {
def.reject();
});
this.do_warn("Kanban: could not find id#" + id);
}
},
+ no_result: function() {
+ if (this.groups.group_by
+ || !this.options.action
+ || !this.options.action.help) {
+ return;
+ }
+ 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))
+ );
+ }
});
instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({
<template>
<t t-name="KanbanView">
- <div class="oe_kanban_buttons"/>
<div class="oe_kanban_view">
+ <div class="oe_kanban_buttons"/>
<table class="oe_kanban_groups">
<tr class="oe_kanban_groups_headers">
</tr>