From 58c514a1f79433b89081aa96222f1b1fdf7c8744 Mon Sep 17 00:00:00 2001 From: phamt Date: Tue, 26 Apr 2011 16:39:08 +0000 Subject: [PATCH] Added close button to iframe info box. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9402 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/ui.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js index 3d20383a2..7ae310994 100644 --- a/xCAT-UI/js/ui.js +++ b/xCAT-UI/js/ui.js @@ -583,18 +583,31 @@ function openDialog(type, msg) { function createIFrame(src) { // Put an iframe inside an info box var infoBar = $('
'); + + // Create info and close icons var icon = $('').css({ 'display': 'inline-block', 'margin': '10px 5px' }); + var close = $('').css({ + 'display': 'inline-block', + 'float': 'right', + 'margin': '10px 5px' + }).click(function() { + // Remove info box on-click + $(this).parent().remove(); + }); + var iframe = $('').attr('src', src).css({ 'display': 'inline-block', 'border': '0px', 'margin': '10px 0px', - 'width': '95%' + 'width': '90%' }); infoBar.append(icon); infoBar.append(iframe); + infoBar.append(close); + return infoBar; }