Skip to content

Commit 5a29bf7

Browse files
Fix UI changes and typo error Codeinwp/visualizer-pro#343
1 parent 88015a9 commit 5a29bf7

File tree

3 files changed

+38
-24
lines changed

3 files changed

+38
-24
lines changed

css/style-wizard.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ fieldset[disabled] .form-control {
481481
.vz-btn-group{
482482
display: flex;
483483
flex-wrap: wrap;
484+
align-items: center;
484485
}
485486
.vz-btn-group .btn{
486487
margin-bottom: 8px;
@@ -489,7 +490,6 @@ fieldset[disabled] .form-control {
489490
.vz-btn-group .btn:last-child{
490491
margin-right: 0px;
491492
}
492-
/* visualizer button style end */
493493

494494
.vz-wizard-wrap .container{
495495
max-width: 930px;
@@ -1111,10 +1111,24 @@ display: none;
11111111
flex-wrap: wrap;
11121112
align-items: center;
11131113
}
1114-
.vz-chart-option .h3 span.pro-label{
1114+
.vz-pro-label-wrap {
1115+
order: 3;
1116+
width: calc(100% - 20px);
1117+
padding-left: 12px;
1118+
position: relative;
1119+
z-index: 1;
1120+
display: flex;
1121+
flex-wrap: wrap;
1122+
align-items: center;
1123+
}
1124+
.vz-pro-label-wrap h3 {
1125+
opacity: .7;
1126+
color: #000000;
1127+
}
1128+
.vz-pro-label-wrap span.pro-label{
11151129
margin-left: 30px;
1130+
font-weight: 600;
11161131
}
1117-
11181132
.vz-chart-option input[type=radio].vz-radio-btn:checked ~ .bg{
11191133
background: #BDE6EB;
11201134
}
@@ -1201,6 +1215,9 @@ display: none;
12011215
.vz-chart-list .slick-arrow[disabled="disabled"], .vz-chart-list .slick-arrow[aria-disabled="true"] {
12021216
color: #eeeeee
12031217
}
1218+
.vz-btn-group span.spinner {
1219+
margin-bottom: 8px;
1220+
}
12041221

12051222
@media (max-width: 767px){
12061223
.wp-toolbar .vz-wizard-fullscreen{margin-top: 0;}

js/setup-wizard.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@ jQuery(function ($) {
1212
if ( 1 == id ) {
1313
var chartType = $(".vz-radio-btn:checked").val();
1414
var percentBarWidth = 100;
15-
var delayCount = 1;
1615
var loaderDelay;
1716
$.ajax( {
18-
xhr: function () {
19-
var xhr = new window.XMLHttpRequest();
20-
xhr.addEventListener("progress", function (evt) {
21-
if (evt.lengthComputable) {
22-
var percentComplete = evt.loaded / evt.total;
23-
percentBarWidth = percentBarWidth - percentComplete;
24-
$('.vz-progress-bar').css({
25-
width: percentBarWidth + '%'
26-
});
27-
}
28-
}, false);
29-
return xhr;
17+
beforeSend: function() {
18+
loaderDelay = setInterval(function () {
19+
$('.vz-progress-bar').css({
20+
width: percentBarWidth-- + '%'
21+
});
22+
}, 1000);
3023
},
3124
type: 'POST',
3225
url: visualizerSetupWizardData.ajax.url,
@@ -38,11 +31,12 @@ jQuery(function ($) {
3831
step: 'step_2',
3932
},
4033
success: function (data) {
34+
clearInterval( loaderDelay );
4135
loaderDelay = setInterval(function () {
4236
$('.vz-progress-bar').css({
4337
width: percentBarWidth-- + '%'
4438
});
45-
if ( delayCount > 4 ) {
39+
if ( percentBarWidth <= 0 ) {
4640
if ( 1 === data.success ) {
4741
var importMessage = jQuery('[data-import_message]');
4842
importMessage
@@ -58,11 +52,12 @@ jQuery(function ($) {
5852
} else {
5953
$('#smartwizard').smartWizard('reset');
6054
}
61-
$('#step-2').find('.vz-progress-bar').animate({ width: '0' });
55+
$('.vz-progress-bar').css({
56+
width: 0
57+
});
6258
clearInterval( loaderDelay );
6359
}
64-
delayCount++;
65-
}, 1000 );
60+
}, 100 );
6661
},
6762
error: function() {
6863
$('#step-2').find('.vz-progress-bar').animate({ width: '0' });

templates/setup-wizard.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,11 @@ class="dashicons dashicons-arrow-left-alt"></span>
125125
<li>
126126
<div class="vz-pro-option">
127127
<label class="vz-chart-option">
128-
<input type="radio" class="vz-radio-btn" id="vz-chart-5">
129-
<h3 class="h3"><?php esc_html_e( 'Geo chart', 'visualizer' ); ?> <span
130-
class="pro-label"><?php esc_html_e( 'PRO', 'visualizer' ); ?> </span></h3>
128+
<input type="radio" class="vz-radio-btn" id="vz-chart-5" readonly>
129+
<div class="vz-pro-label-wrap">
130+
<h3><?php esc_html_e( 'Geo chart', 'visualizer' ); ?></h3>
131+
<span class="pro-label"><?php esc_html_e( 'PRO', 'visualizer' ); ?></span>
132+
</div>
131133
<div class="img type-box-geo"></div>
132134
<div class="bg"></div>
133135
</label>
@@ -169,7 +171,7 @@ class="btn btn-secondary"><?php esc_html_e( 'Upgrade to Pro', 'visualizer' ); ?>
169171
<div class="vz-accordion-item__title">
170172
<div class="vz-accordion-item__button">
171173
<h2 class="h2 pb-8"><?php esc_html_e( 'You\'re almost done!', 'visualizer' ); ?></h2>
172-
<p class="p"><?php esc_html_e( 'We use demo data during the import process, don&#x92;t worry you can customize it latter', 'visualizer' ); ?></p>
174+
<p class="p"><?php esc_html_e( 'We use demo data during the import process, don&#x92;t worry you can customize it later', 'visualizer' ); ?></p>
173175
</div>
174176
<div class="vz-progress">
175177
<div class="vz-progress-bar" style="width: 100%;"></div>

0 commit comments

Comments
 (0)