summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-02-15 17:36:52 +0100
committerAlexandre Kühn <aku@odoo.com>2018-02-16 10:23:01 +0100
commitaa8745f1a811fffd339277ad5a43d3accf86fe34 (patch)
treeea670c2e8f7af17d5ab2607b048a05428246cfcb /addons/web/static/src
parent4c186f30c3a77e661f0dfdd39fe2c1216ef1ac7b (diff)
[FIX] web,*: various nocontent helper fixes
* account, board, hr_holidays, mail, sale, website_sale Small fixes on nocontent onboarding screens. Initial commit: https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417 Details: - list: centered; - pivot/graph: centered + empty folder face; - Dashboard app with nocontent helper; - Discuss inbox/starred: centered without neutral/smiling faces; => no faces because it's too much with animated rainbow man when emptying the any of the boxes. - hr_holidays: fixed onboarding screens; - (technical) dropped obsolete 'o_view_nocontent_container' style; - manual reconciliation 'nothing to reconcile': centered + inside form sheet; => renamed account's o_view_nocontent to o_view_noreconciliation, so that it doesn't use the style of views.less. - kanban: nocontent helper above the columns (if any); - texts "no order to upsell"/"abandonned cart" paragraph split in two.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/graph/graph_renderer.js1
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_renderer.js10
-rw-r--r--addons/web/static/src/js/views/list/list_renderer.js1
-rw-r--r--addons/web/static/src/less/views.less15
-rw-r--r--addons/web/static/src/xml/base.xml22
5 files changed, 17 insertions, 32 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_renderer.js b/addons/web/static/src/js/views/graph/graph_renderer.js
index 07155e327e3..8ce6ec14aba 100644
--- a/addons/web/static/src/js/views/graph/graph_renderer.js
+++ b/addons/web/static/src/js/views/graph/graph_renderer.js
@@ -60,7 +60,6 @@ return AbstractRenderer.extend({
* @returns {Deferred} The _super deferred is actually resolved immediately
*/
_render: function () {
- this.$el.toggleClass('o_view_nocontent_container', !this.state.data.length);
if (this.to_remove) {
nv.utils.offWindowResize(this.to_remove);
}
diff --git a/addons/web/static/src/js/views/kanban/kanban_renderer.js b/addons/web/static/src/js/views/kanban/kanban_renderer.js
index 6721f6d446c..4236ce74da4 100644
--- a/addons/web/static/src/js/views/kanban/kanban_renderer.js
+++ b/addons/web/static/src/js/views/kanban/kanban_renderer.js
@@ -302,16 +302,6 @@ var KanbanRenderer = BasicRenderer.extend({
}
},
/**
- * @private
- * @override
- * adds a specific class to the kanban helper so that it can be targetted by specific css
- */
- _renderNoContentHelper: function() {
- var $el = this._super.apply(this, arguments);
- $el.toggleClass('o_kanban_view_nocontent',true)
- return $el;
- },
- /**
* Renders an ungrouped kanban view in a fragment.
*
* @private
diff --git a/addons/web/static/src/js/views/list/list_renderer.js b/addons/web/static/src/js/views/list/list_renderer.js
index 601752ce532..e9c9a4d1f76 100644
--- a/addons/web/static/src/js/views/list/list_renderer.js
+++ b/addons/web/static/src/js/views/list/list_renderer.js
@@ -633,7 +633,6 @@ var ListRenderer = BasicRenderer.extend({
this.pagers = [];
var displayNoContentHelper = !this._hasContent() && !!this.noContentHelp;
- this.$el.toggleClass('o_view_nocontent_container', displayNoContentHelper);
// display the no content helper if there is no data to display
if (displayNoContentHelper) {
this.$el.html(this._renderNoContentHelper());
diff --git a/addons/web/static/src/less/views.less b/addons/web/static/src/less/views.less
index fa50c2e2bd8..aaa75b9156a 100644
--- a/addons/web/static/src/less/views.less
+++ b/addons/web/static/src/less/views.less
@@ -39,18 +39,11 @@
}
// No content helper
-.o_view_nocontent_container {
- .o-flex-display();
- height: 100%;
- padding: 0;
-}
-
.o_view_nocontent {
- &.o_kanban_view_nocontent {
- .o-position-absolute(20%, 0, 0, 0);
- pointer-events: none;
- }
-
+ .o-position-absolute(20%, 0, 0, 0);
+ pointer-events: none;
+ z-index: 1;
+
.o_nocontent_help {
pointer-events: auto;
max-width: 650px;
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 196346d4d9c..ed9709d2c4c 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -488,8 +488,10 @@
</div>
</t>
<div t-name="GraphView.error" class="o_view_nocontent" >
- <p class="o_view_nocontent_empty_folder"><t t-esc="title"/></p>
- <p><t t-esc="description"/></p>
+ <div class="o_nocontent_help">
+ <p class="o_view_nocontent_empty_folder"><t t-esc="title"/></p>
+ <p><t t-esc="description"/></p>
+ </div>
</div>
<div t-name="PivotView" class="o_pivot">
@@ -539,14 +541,16 @@
</t>
</ul>
</t>
-<div t-name="PivotView.nodata" class="o_view_nocontent_container" >
+<div t-name="PivotView.nodata">
<div class="o_view_nocontent">
- <p class="o_view_nocontent_empty_folder">
- No data to display
- </p><p>
- Try to add some records, or make sure
- that there is at least one measure and no active filter in the search bar.
- </p>
+ <div class="o_nocontent_help">
+ <p class="o_view_nocontent_empty_folder">
+ No data to display
+ </p><p>
+ Try to add some records, or make sure
+ that there is at least one measure and no active filter in the search bar.
+ </p>
+ </div>
</div>
</div>