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 + '%');
if(Number(result.current) !== 0) {
jQuery('#skip-import').hide();
jQuery('#progressbar').show();
jQuery('#logger-container').show();
}
if(MailPoet.MP2Migrator.is_logging) {
MailPoet.MP2Migrator.updateProgressbar_timeout = setTimeout(MailPoet.MP2Migrator.updateProgressbar, 1000);