diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-02-01 15:03:35 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-02-01 15:48:09 +0100 |
| commit | f99969cddde4c3d5ce5839a948ba18e3a7320676 (patch) | |
| tree | 48534ca127c9fee37a95c7ea8aa70de003149c3f /addons/board/static | |
| parent | 20bd7303537e7bf3f8fe4941e457818f21535c1e (diff) | |
[IMP] dashboard: remove no content helper
In a recent commit, the kanban view was changed to display a nocontent
help message, even when grouped. To do that, it was necessary to change
the nocontent structure, and in particular, to position it absolutely.
This totally breaks dashboards.
Also, from a functional point of view, dashboards are used to see
existing information, so it can be said that the nocontent helper is of
a more limited use in this case. Therefore, I think that the best
technical decision is to simply remove the nocontent helper in the
dashboard, rather than fiddling with the css to try to make them work.
Diffstat (limited to 'addons/board/static')
| -rw-r--r-- | addons/board/static/src/js/dashboard.js | 7 | ||||
| -rw-r--r-- | addons/board/static/tests/dashboard_tests.js | 8 |
2 files changed, 5 insertions, 10 deletions
diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index 7b16594de28..c47e9b9564f 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -267,12 +267,7 @@ FormRenderer.include({ }); }); this.$el.toggleClass('o_dashboard_nocontent', !hasAction); - if (!hasAction) { - var innerDiv = $('<div class="o_view_nocontent">') - .append(this.noContentHelp || "<div/>"); - return $('<div class="o_view_nocontent_container">') - .append(innerDiv); - } + // We should start with three columns available node = $.extend(true, {}, node); diff --git a/addons/board/static/tests/dashboard_tests.js b/addons/board/static/tests/dashboard_tests.js index 7da626fac43..87d1f1a3608 100644 --- a/addons/board/static/tests/dashboard_tests.js +++ b/addons/board/static/tests/dashboard_tests.js @@ -67,8 +67,8 @@ QUnit.test('dashboard basic rendering', function (assert) { assert.ok(form.renderer.$el.hasClass('o_dashboard'), "with a dashboard, the renderer should have the proper css class"); - assert.strictEqual(form.$('.o_dashboard .o_view_nocontent').length, 1, - "should have a no content helper"); + assert.strictEqual(form.$('.o_dashboard .o_view_nocontent').length, 0, + "should not have a no content helper"); assert.strictEqual(form.get('title'), "My Dashboard", "should have the correct title"); form.destroy(); @@ -93,8 +93,8 @@ QUnit.test('display the no content helper', function (assert) { }, }); - assert.strictEqual(form.$('.o_dashboard .o_view_nocontent p:contains(click to add a partner)').length, 1, - "should have a no content helper with action help"); + assert.strictEqual(form.$('.o_dashboard .o_view_nocontent').length, 0, + "should not have a no content helper with action help"); form.destroy(); }); |
