Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 1d4e4bb

Browse files
committed
adding a loading spinner to the map transition
1 parent ac8790d commit 1d4e4bb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

js/templates/buyWizard.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ <h2 class="ion-android-close custCol-text clickable"></h2>
55
</div>
66
<div class="modal-hero js-buyWizardHero custCol-text shadow-inner1-light noOverflow"
77
style="background-image: url(<%= ob.serverUrl %>get_image?hash=<%= ob.vendor_offer.listing.item.image_hashes[0] %><%= ob.imageExtension %>), url(imgs/defaultBanner.png);">
8-
<div class="js-buyWizardMap positionTop buyWizardMap hide">
9-
<div class="flexContainer">
10-
</div>
8+
<div class="js-buyWizardMap positionRelative hide" style="height: 262px">
9+
<div class="txt-col1 ion-android-sync spinner spinner-slow icon-large icon-circle-background1 zIndex1 fullCentered hide" style="border: 1px solid #aaa;"></div>
10+
<div class="flexContainer"></div>
1111
</div>
1212
<div class="modal-hero modal-heroFullHeightNoButtons js-buyWizardSpinner hide background1 custCol-primary">
1313
<div class="width100 txt-center vCentered">

js/views/buyWizardVw.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,20 @@ module.exports = baseVw.extend({
388388
$iFrame = $('<iframe class="js-buyWizardMap js-iframe-pending positionTop" width="525" height="350" frameborder="0" style="border:0; margin-top: 0; height: 262px" />');
389389

390390
if ($currentIframe.length) {
391+
this.$buyWizardMap.find('.spinner').removeClass('hide');
391392
$iFrame.insertBefore($currentIframe);
392393
} else {
393394
this.$buyWizardMap.find('.flexContainer')
394395
.prepend($iFrame);
395396
}
396397

397398
$iFrame.on('load', () => {
399+
this.$buyWizardMap.find('.spinner').addClass('hide');
400+
398401
$currentIframe.addClass('js-iframe-leaving')
399402
.fadeOut({
400403
duration: 'slow',
401-
complete: function() {
404+
complete: () => {
402405
$currentIframe.remove();
403406
}
404407
});

0 commit comments

Comments
 (0)