diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-09-16 11:51:38 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-09-16 13:08:08 +0000 |
| commit | e126cd3bb2b20bc993d2472eee5fe16cc7a74ea9 (patch) | |
| tree | df6adbe114693f8d9f84a7769f8abadb15cf9b70 /addons/website/static | |
| parent | a4a745cf4f9ccade9876d885ab0774d3ec0bbf69 (diff) | |
[IMP] web_editor, website: improve editor loading effects
- Share the code for tab switching loading and slow option loading.
- Now add a loading effect over the content when the content is changed
and a loading effect over the editor panel when the editor panel is
being changed
Part of https://github.com/odoo/odoo/pull/55614
task-2213114
closes odoo/odoo#55614
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static')
| -rw-r--r-- | addons/website/static/src/js/editor/snippets.editor.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/website/static/src/js/editor/snippets.editor.js b/addons/website/static/src/js/editor/snippets.editor.js index 98c2b13ed34..e226fd70543 100644 --- a/addons/website/static/src/js/editor/snippets.editor.js +++ b/addons/website/static/src/js/editor/snippets.editor.js @@ -151,9 +151,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 + async _onThemeTabClick(ev) { + // Note: nothing async here but start the loading effect asap + this._execWithLoadingEffect(async () => new Promise(resolve => setTimeout(() => resolve(), 0)), false, 0); if (!this.topFakeOptionEl) { let el; |
