* zin: skip to show loading on click link on old page.
This commit is contained in:
+3
-2
@@ -475,11 +475,12 @@
|
||||
function loadOldPage(url)
|
||||
{
|
||||
let $page = $('#oldPage');
|
||||
if($page.length === 0)
|
||||
if(!$page.length)
|
||||
{
|
||||
$page = $('<div/>').append($('<iframe />').attr({name: `app-${currentCode}-old`, frameborder: 'no', allowtransparency: true, scrolling: 'auto', style: 'width:100%;height:100%;'})).attr({id: 'oldPage', class: 'load-indicator', style: 'position:fixed;width:100%;height:100%;left:0;top:0;z-index:100'}).insertAfter('body');
|
||||
}
|
||||
const $iframe = $page.addClass('loading').removeClass('hidden').find('iframe').removeClass('in');
|
||||
if($page.hasClass('hidden')) $page.addClass('loading').removeClass('hidden');
|
||||
const $iframe = $page.find('iframe').removeClass('in');
|
||||
if($iframe.attr('src') === url) $iframe[0].contentWindow.location.reload();
|
||||
else $iframe.attr('src', url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user