diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-05-28 10:04:26 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-05-31 13:36:25 +0000 |
| commit | 43557ecbc7db6477defa14cd248a297eaa975c86 (patch) | |
| tree | e09b2c928de3e69fbb58c6b794b4219e6d6ad2e6 /addons/website/static/src/js/editor/snippets.editor.js | |
| parent | fef6e133a09e9cb1a81a85b3df8c3e745a77b6cb (diff) | |
[IMP] web_editor, website: add loading effect in left panel editor
The goal is to reduce loadings as much as possible but there will
always be some. So that loadings do not appear as bugs and give users
some feedback that they are ongoing, this commit adds a loading effect
during the loading of some actions.
Part of https://github.com/odoo/odoo/pull/52211
Related to task-2197038
Diffstat (limited to 'addons/website/static/src/js/editor/snippets.editor.js')
| -rw-r--r-- | addons/website/static/src/js/editor/snippets.editor.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website/static/src/js/editor/snippets.editor.js b/addons/website/static/src/js/editor/snippets.editor.js index dd4f974918b..04de692f2fd 100644 --- a/addons/website/static/src/js/editor/snippets.editor.js +++ b/addons/website/static/src/js/editor/snippets.editor.js @@ -46,6 +46,9 @@ weSnippetEditor.Class.include({ * @private */ _onThemeTabClick: async function (ev) { + this._addTabLoading(this.tabs.THEME); + await new Promise(resolve => setTimeout(() => resolve())); // Needed to force the loading to appear... to review with new design + if (!this.fakeThemeEl) { this.fakeThemeEl = document.createElement('theme'); this.fakeThemeEl.dataset.name = ""; |
