From 0ecd85c38040a78e8f7e12b68459873b800c2216 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 24 Jan 2024 10:10:31 +0100 Subject: [PATCH] wait #6670 @0.25 --- .docker/config/cron/host | 2 -- resources/linkeditor/js/linkeditor.js | 8 ++++++++ resources/linkeditor/js/linkeditor.toolbar.js | 4 +++- resources/linkeditor/style/style.sass | 10 ++++++++++ .../views/fluidbook_publication/link_editor.blade.php | 1 + 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.docker/config/cron/host b/.docker/config/cron/host index 457af078a..973efaa07 100644 --- a/.docker/config/cron/host +++ b/.docker/config/cron/host @@ -1,4 +1,2 @@ 3 4 * * * root /docker/fluidbook-toolbox/build >/dev/null 2>/dev/null 3 5 * * * root /docker/fluidbook-toolbox-dev/build >/dev/null 2>/dev/null -45 */6 * * * root docker restart fluidbook-toolbox-redis >/dev/null 2>/dev/null -15 */6 * * * root docker restart fluidbook-toolbox-dev-redis >/dev/null 2>/dev/null diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index 7ebf4d89c..a2a6bc3b2 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -561,6 +561,14 @@ LinkEditor.prototype = { return this.currentPage; }, + displayLoader: function () { + $("#loader").show(); + }, + + hideLoader() { + $("#loader").hide(); + } + } diff --git a/resources/linkeditor/js/linkeditor.toolbar.js b/resources/linkeditor/js/linkeditor.toolbar.js index b363b05f3..bf6d6205b 100644 --- a/resources/linkeditor/js/linkeditor.toolbar.js +++ b/resources/linkeditor/js/linkeditor.toolbar.js @@ -59,6 +59,7 @@ LinkeditorToolbar.prototype = { }, submitFormAndReload: function (form) { + this.linkeditor.displayLoader(); var $this = this; var callback = function () { $(form).ajaxSubmit( @@ -69,6 +70,7 @@ LinkeditorToolbar.prototype = { window.location.reload(); }, 1000); }, error: function (data) { + $this.linkeditor.hideLoader(); $this.linkeditor.notification(TRANSLATIONS.error + ' : ' + data.responseJSON.message, 'error'); }, } @@ -82,4 +84,4 @@ LinkeditorToolbar.prototype = { } }, }; -export default LinkeditorToolbar; +export default LinkeditorToolbar; diff --git a/resources/linkeditor/style/style.sass b/resources/linkeditor/style/style.sass index 564daa202..d43720f4e 100644 --- a/resources/linkeditor/style/style.sass +++ b/resources/linkeditor/style/style.sass @@ -176,6 +176,16 @@ body, #linkeditor, html #linkeditor-preload, #linkeditor-clipboard display: none +#loader + position: absolute + top: 0 + left: 0 + cursor: wait + width: 100% + height: 100% + z-index: 20000000 + display: none + @import "inc/_panels" @import "inc/_toolbar" @import "inc/_rulers" diff --git a/resources/views/fluidbook_publication/link_editor.blade.php b/resources/views/fluidbook_publication/link_editor.blade.php index 913d9dfc1..0f9f8db80 100644 --- a/resources/views/fluidbook_publication/link_editor.blade.php +++ b/resources/views/fluidbook_publication/link_editor.blade.php @@ -142,6 +142,7 @@ +