From c8f31b0bdb024c0852228176d463fb69cf61ee38 Mon Sep 17 00:00:00 2001 From: phamt Date: Tue, 18 Oct 2011 02:10:23 +0000 Subject: [PATCH] Add loader to iframe and remove it when iframe is done loading. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10810 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/ui.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js index 15ddf68e1..8c8a0466c 100644 --- a/xCAT-UI/js/ui.js +++ b/xCAT-UI/js/ui.js @@ -770,14 +770,25 @@ function createIFrame(src) { var iframe = $('').attr('src', src).css({ 'display': 'inline-block', 'border': '0px', - 'margin': '10px 0px', - 'width': '90%' + 'margin': '10px 20px', + 'width': '95%' }); + var loader = createLoader('iLoader').css({ + 'display': 'inline-block', + 'margin': '10px 0px' + }); + infoBar.append(icon); + infoBar.append(loader); infoBar.append(iframe); infoBar.append(close); + // Remove loader when done + iframe.load(function() { + loader.remove(); + }); + return infoBar; }