New: Hide the progress bar and the logs if the import has not started yet

This commit is contained in:
fred
2017-07-05 11:32:57 +02:00
parent 68988edd7e
commit 7d8d535cb3
2 changed files with 7 additions and 3 deletions

View File

@@ -63,6 +63,8 @@ define('mp2migrator', ['mailpoet', 'jquery'], function(MailPoet, jQuery) {
jQuery('#progresslabel').html(progress + '%'); jQuery('#progresslabel').html(progress + '%');
if(Number(result.current) !== 0) { if(Number(result.current) !== 0) {
jQuery('#skip-import').hide(); jQuery('#skip-import').hide();
jQuery('#progressbar').show();
jQuery('#logger-container').show();
} }
if(MailPoet.MP2Migrator.is_logging) { if(MailPoet.MP2Migrator.is_logging) {
MailPoet.MP2Migrator.updateProgressbar_timeout = setTimeout(MailPoet.MP2Migrator.updateProgressbar, 1000); MailPoet.MP2Migrator.updateProgressbar_timeout = setTimeout(MailPoet.MP2Migrator.updateProgressbar, 1000);

View File

@@ -28,7 +28,7 @@
<br /> <br />
</div> </div>
<div id="progressbar" class="mailpoet_progress mailpoet_progress_complete"> <div id="progressbar" class="mailpoet_progress mailpoet_progress_complete" style="display: none">
<span id="progresslabel" class="mailpoet_progress_label">0%</span> <span id="progresslabel" class="mailpoet_progress_label">0%</span>
</div> </div>
@@ -38,8 +38,10 @@
</div> </div>
<br /> <br />
<div id="logger-container" style="display: none">
<small><strong><%= __('Log...') %></strong></small> <small><strong><%= __('Log...') %></strong></small>
<div id="logger"></div> <div id="logger"></div>
</div>
</div> </div>