Index: lams_central/build.xml =================================================================== diff -u -ra517c5a69f76d717a21b6332bb9796c4324b88e9 -r38959afbfc9d59d3f43782fa7c3f17806f54a147 --- lams_central/build.xml (.../build.xml) (revision a517c5a69f76d717a21b6332bb9796c4324b88e9) +++ lams_central/build.xml (.../build.xml) (revision 38959afbfc9d59d3f43782fa7c3f17806f54a147) @@ -105,6 +105,7 @@ + Index: lams_central/web/css/aqua.css =================================================================== diff -u -r60d87f95124e749c8fb364630f29925ef79ee598 -r38959afbfc9d59d3f43782fa7c3f17806f54a147 --- lams_central/web/css/aqua.css (.../aqua.css) (revision 60d87f95124e749c8fb364630f29925ef79ee598) +++ lams_central/web/css/aqua.css (.../aqua.css) (revision 38959afbfc9d59d3f43782fa7c3f17806f54a147) @@ -1,12 +1,11 @@ -/* -This is a theme CSS file. Which one will be loaded into the JSP depends on a variable passed in from FLASH. -*/ +/*This is a theme CSS file. Which one will be loaded into the JSP depends on a variable passed in from FLASH.*/ body { font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #A2BCF9; font-size: small; } + h1 { font-size: large; background-color: #B4C8FE; @@ -34,15 +33,15 @@ text-align: left; } -#formtablecontainer{ - width: auto; +.formtablecontainer{ text-align:center; } -#datatablecontainer{ +.datatablecontainer{ + width:100%; } -#buttoncontainer { +.buttoncontainer { } @@ -72,35 +71,101 @@ text-align: left; } +/*tab styles*/ +.tab{ + text-align:center; +} + +.tab a{ + font-size: 11px; + color: #000000; + text-decoration:none; +} +.tab a:hover{ + font-size: 11px; + color: #000000; + text-decoration:underline +} +.tabcentre{ + background-image:url(../images/aqua_tab_centre.gif); + background-repeat:repeat-x; +} + + +.tabcentre_selected{ + background-image:url(../images/aqua_tab_s_centre.gif); + background-repeat:repeat-x; +} + + + +/*Tab content containers*/ +.tabbody{ + + + background-color : #D9E8FF; + float:left; + + margin : 0; + border-right-width: 1px; + border-left-width: 1px; + border-right-style: solid; + border-left-style: solid; + border-right-color: #0D3F59; + border-left-color: #0D3F59; + + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #0D3F59; + padding:5px; + +} + + +/*specific styles for the content divs of the tabs*/ +.content_b{ + z-index: 0; + position:relative; + visibility:visible; +} +.content_a{ + z-index: 0; + position:absolute; + visibility: hidden; +} +.content_i{ + z-index: 0; + position:absolute; + visibility: hidden; +} +/*end tabs*/ + a.button{ float:right; font-size: 12px; - color: #000000; - text-decoration:none; - text-align: center; + color: #000000; + text-decoration:none; + text-align: center; background-color:#B4C8FE; margin: 2px 5px 2px 5px; padding:3px; width: 80px; - - - - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: #FFFFFF; - border-right-color: #0D3F59; - border-bottom-color: #0D3F59; - border-left-color: #FFFFFF; - - + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-color: #FFFFFF; + border-right-color: #0D3F59; + border-bottom-color: #0D3F59; + border-left-color: #FFFFFF; } + + a.button:link{ color: #000000; text-decoration:none; @@ -136,5 +201,3 @@ border-top-color: #0D3F59; border-right-color: #FFFFFF; } - - Index: lams_central/web/css/default.css =================================================================== diff -u -ra517c5a69f76d717a21b6332bb9796c4324b88e9 -r38959afbfc9d59d3f43782fa7c3f17806f54a147 --- lams_central/web/css/default.css (.../default.css) (revision a517c5a69f76d717a21b6332bb9796c4324b88e9) +++ lams_central/web/css/default.css (.../default.css) (revision 38959afbfc9d59d3f43782fa7c3f17806f54a147) @@ -1,12 +1,11 @@ -/* -This is a theme CSS file. Which one will be loaded into the JSP depends on a variable passed in from FLASH. -*/ +/*This is a theme CSS file. Which one will be loaded into the JSP depends on a variable passed in from FLASH.*/ body { font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #A2BCF9; font-size: small; } + h1 { font-size: large; background-color: #B4C8FE; @@ -34,15 +33,15 @@ text-align: left; } -#formtablecontainer{ - width: auto; +.formtablecontainer{ text-align:center; } -#datatablecontainer{ +.datatablecontainer{ + width:100%; } -#buttoncontainer { +.buttoncontainer { } @@ -72,35 +71,101 @@ text-align: left; } +/*tab styles*/ +.tab{ + text-align:center; +} + +.tab a{ + font-size: 11px; + color: #000000; + text-decoration:none; +} +.tab a:hover{ + font-size: 11px; + color: #000000; + text-decoration:underline +} +.tabcentre{ + background-image:url(../images/aqua_tab_centre.gif); + background-repeat:repeat-x; +} + + +.tabcentre_selected{ + background-image:url(../images/aqua_tab_s_centre.gif); + background-repeat:repeat-x; +} + + + +/*Tab content containers*/ +.tabbody{ + + + background-color : #D9E8FF; + float:left; + + margin : 0; + border-right-width: 1px; + border-left-width: 1px; + border-right-style: solid; + border-left-style: solid; + border-right-color: #0D3F59; + border-left-color: #0D3F59; + + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #0D3F59; + padding:5px; + +} + + +/*specific styles for the content divs of the tabs*/ +.content_b{ + z-index: 0; + position:relative; + visibility:visible; +} +.content_a{ + z-index: 0; + position:absolute; + visibility: hidden; +} +.content_i{ + z-index: 0; + position:absolute; + visibility: hidden; +} +/*end tabs*/ + a.button{ float:right; font-size: 12px; - color: #000000; - text-decoration:none; - text-align: center; + color: #000000; + text-decoration:none; + text-align: center; background-color:#B4C8FE; margin: 2px 5px 2px 5px; padding:3px; width: 80px; - - - - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: #FFFFFF; - border-right-color: #0D3F59; - border-bottom-color: #0D3F59; - border-left-color: #FFFFFF; - - + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-color: #FFFFFF; + border-right-color: #0D3F59; + border-bottom-color: #0D3F59; + border-left-color: #FFFFFF; } + + a.button:link{ color: #000000; text-decoration:none; @@ -136,5 +201,3 @@ border-top-color: #0D3F59; border-right-color: #FFFFFF; } - - Index: lams_central/web/images/aqua_tab.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_centre.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_left.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_right.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_s_centre.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_s_left.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_s_right.gif =================================================================== diff -u Binary files differ Index: lams_central/web/images/aqua_tab_selected.gif =================================================================== diff -u Binary files differ Index: lams_central/web/includes/javascript/tabcontroller.js =================================================================== diff -u --- lams_central/web/includes/javascript/tabcontroller.js (revision 0) +++ lams_central/web/includes/javascript/tabcontroller.js (revision 38959afbfc9d59d3f43782fa7c3f17806f54a147) @@ -0,0 +1,118 @@ +var tabsContents = new Array(); +var tab_lefts = new Array(); +//TODO:we need to set this variable, maybe from the praent or direct from JSP/Java +var themeName = "aqua"; + +function getKey(keyStroke) { + isNetscape=(document.layers); + eventChooser = (isNetscape) ? keyStroke.which : event.keyCode; + which = String.fromCharCode(eventChooser).toLowerCase(); + if(which=="a" || which=="b" || which=="i"){ + showTab(which); + } + + +} +document.onkeypress = getKey; + +function initTabs(){ + //put all the tab contents in an array + tabsContents.push(document.getElementById('content_b')); + tabsContents.push(document.getElementById('content_a')); + tabsContents.push(document.getElementById('content_i')); + + //position the advanced (a) and instructions (i) layers over the basic (b) layer + var bTabC_x = findPosX(tabsContents[0]); + var bTabC_y = findPosY(tabsContents[0]); + + tabsContents[1].style.left = bTabC_x+'px'; + tabsContents[1].style.top = bTabC_y+'px'; + tabsContents[2].style.left = bTabC_x+'px'; + tabsContents[2].style.top = bTabC_y+'px'; + tabsContents[1].style.visibility="hidden"; + tabsContents[2].style.visibility="hidden"; +} + +function deSelectTab(tabId){ + //swap images of side parts + var tl = document.getElementById("tab_left_"+tabId); + tl.src= imgRoot+themeName+"_tab_left.gif"; + tl.height = 22; + var tr = document.getElementById("tab_right_"+tabId); + tr.src= imgRoot+themeName+"_tab_right.gif"; + tr.height = 22; + //swap css of centre class + var tc = document.getElementById("tab_tbl_centre_"+tabId); + tc.className="tab tabcentre"; +} + +function selectTab(tabId){ + //swap images of side parts + var tl = document.getElementById("tab_left_"+tabId); + tl.src=imgRoot+themeName+"_tab_s_left.gif"; + tl.height = 25; + var tr = document.getElementById("tab_right_"+tabId); + tr.src=imgRoot+themeName+"_tab_s_right.gif"; + tr.height = 25; + //swap css of centre class + var tc = document.getElementById("tab_tbl_centre_"+tabId); + tc.className="tab tabcentre_selected"; + +} + +function showTab(tabId){ + + selectTab(tabId); + + if(tabId == "i"){ + deSelectTab("a"); + deSelectTab("b"); + }else if(tabId=="a"){ + deSelectTab("i"); + deSelectTab("b"); + }else{ + deSelectTab("i"); + deSelectTab("a"); + } + + //sort out the content + var contentId = "content_"+tabId; + for(var i=0; i < tabsContents.length; i++){ + if(tabsContents[i].id==contentId){ + tabsContents[i].style.visibility="visible"; + }else{ + tabsContents[i].style.visibility="hidden"; + } + } + +} + +function findPosX(obj) { + var curleft = 0; + if(obj.offsetParent) + while(1) + { + curleft += obj.offsetLeft; + if(!obj.offsetParent) + break; + obj = obj.offsetParent; + } + else if(obj.x) + curleft += obj.x; + return curleft; + } + +function findPosY(obj) { + var curtop = 0; + if(obj.offsetParent) + while(1) + { + curtop += obj.offsetTop; + if(!obj.offsetParent) + break; + obj = obj.offsetParent; + } + else if(obj.y) + curtop += obj.y; + return curtop; + }