diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index f45649dfeb1..854946cdf97 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -21,16 +21,13 @@ color: #4c4c4c; font-size: 13px; background: white; -} -.openerp a { - text-decoration: none; -} - -.openerp { /* http://www.quirksmode.org/dom/inputfile.html * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image */ } +.openerp a { + text-decoration: none; +} .openerp table { padding: 0; font-size: 13px; @@ -1620,6 +1617,15 @@ height: auto; line-height: 16px; } +.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%; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index f95d843b689..98caeafbb29 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -78,12 +78,10 @@ $colour4: #8a89ba color: #4c4c4c font-size: 13px background: white + // }}} + // Tag reset {{{ a text-decoration: none - // }}} - -.openerp - // Tag reset {{{ table padding: 0 font-size: 13px @@ -1366,6 +1364,15 @@ $colour4: #8a89ba // }}} // 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% thead, tfoot @@ -1480,7 +1487,6 @@ $colour4: #8a89ba .oe_tooltip_technical_title font-weight: bold // }}} - // Debugging stuff {{{ .oe_layout_debugging .oe_form_group @@ -1519,4 +1525,3 @@ $colour4: #8a89ba // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: - diff --git a/addons/web/static/src/img/list_empty_arrow.png b/addons/web/static/src/img/list_empty_arrow.png new file mode 100644 index 00000000000..b0b1372adfd Binary files /dev/null and b/addons/web/static/src/img/list_empty_arrow.png differ diff --git a/addons/web/static/src/img/topbar-avatar.png b/addons/web/static/src/img/topbar-avatar.png deleted file mode 100644 index a2c70ea7d49..00000000000 Binary files a/addons/web/static/src/img/topbar-avatar.png and /dev/null differ diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 1aa5847ec7d..c29957cac2d 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -770,6 +770,17 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi .attr('colspan', this.previous_colspan); this.previous_colspan = null; } + }, + no_result: function () { + if (this.groups.group_by + || !this.options.action + || !this.options.action.help) { + return; + } + this.$element.children('table').replaceWith( + $('
') + .append($('', { src: '/web/static/src/img/list_empty_arrow.png' })) + .append($('
').html(this.options.action.help))); } }); instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.ListView.List# */{ @@ -1367,6 +1378,9 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we self.records.add(records, {silent: true}); list.render(); d.resolve(list); + if (_.isEmpty(records)) { + view.no_result(); + } });}); return d.promise(); },