Skip to content

Commit

Permalink
Merge pull request #2 from dgt41/patch-1
Browse files Browse the repository at this point in the history
vanilla
  • Loading branch information
C-Lodder committed Mar 18, 2017
2 parents 449d29b + e832d76 commit 77e32b0
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions media/com_installer/js/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,26 @@
})();


jQuery(document).ready(function($) {
document.addEventListener('DOMContentLoaded', function() {

var hasTab = function(href){
return $('a[data-toggle="tab"]a[href*="' + href + '"]').length;
return document.querySelector('a[data-toggle="tab"]a[href*="' + href + '"]').length;
};
if (!hasTab(localStorage.getItem('tab-href')))
{
var tabAnchor = $("#myTabTabs li:first a");
var tabAnchor = document.querySelector("#myTabTabs li:first a");
window.localStorage.setItem('tab-href', tabAnchor.attr('href'));
tabAnchor.click();
}

$('#loading')
.css('top', $('#installer-install').position().top - $(window).scrollTop())
.css('left', 0)
.css('width', '100%')
.css('height', '100%')
.css('display', 'none')
.css('margin-top', '-10px');
var loading = document.querySelector('#loading'),
instaler = document.querySelector('#loading').getBoundingClientRect();

// Set the position
loading.style.left = 0;
loading.style.width = '100%;
loading.style.height = '100%;
loading.style.display = 'none';
loading.style.marginTop = '-10px';
loading.style.top = instaler.top - window.scrollTop;
});

0 comments on commit 77e32b0

Please sign in to comment.