From 180715872b1330dcebaf9353268c468044125e3f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 21 Jul 2022 20:19:50 +0200 Subject: [PATCH] wip #4628 @0.25 --- .../fields/fluidbook_composition.blade.php | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/resources/views/fields/fluidbook_composition.blade.php b/resources/views/fields/fluidbook_composition.blade.php index 6e2a51246..fbbbe3050 100644 --- a/resources/views/fields/fluidbook_composition.blade.php +++ b/resources/views/fields/fluidbook_composition.blade.php @@ -158,14 +158,26 @@ function showProgressBar(message, progress) { console.log(message, progress); - if(progress===3){ + if ($("#compositionProgress").length === 0) { + $('body').append('
'); + } + var p = Math.round((progress % 1) * 100); + + var step = Math.floor(progress); + + $("#compositionProgress progress").attr('data-step', step).attr('value', p).text(p + '%'); + $("#compositionProgress span").text(message); + + + if (progress === 3) { hideProgressBar(); } } - function hideProgressBar(){ + function hideProgressBar() { clearInterval(progressInterval); console.log('End conversion'); + $("#compositionProgress").remove(); } function updateComposition() { @@ -561,6 +573,24 @@ top: -10px; left: 12px; } + + #compositionProgress { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.25); + } + + #compositionProgress div { + position: absolute; + top: 50%; + left: 50%; + width: 20%; + padding: 20px; + background-color: #fff; + } @endpush -- 2.39.5