/* * pageStructure.js - Created by Feizel Daud Kidia as part of Scarab change request EGGP122. * This file contains the code that structures the interface objects on the page of eGGP2008. * It has been separated from the application code in eggp.aspx hence allowing client cofiguration of the interface to * a greater extent in addition to CSS and INI file configurations. This will allow resizing and repositioning of the page * framework structure. * * Separating the code will allow updates to be applied to extra-customised interfaces without affecting the customisation itself. * * 30/04/2008. */ var leftBlockW=282; var headBlockH=85; var copyBarBlockH=20; var lyrSrcHUDH=20; var currentScaleH = 20; var panBarW=0; var leftToolStripW=65; var leftBlockTabHeadsH=16; function buildPageStructure() { //headBlock objeGGP.blockFramework().registerAutoConstraint("headBlock","t","0px", true); objeGGP.blockFramework().registerAutoConstraint("headBlock","l","0px", true); objeGGP.blockFramework().registerAutoConstraint("headBlock","w","bw", true); objeGGP.blockFramework().registerAutoConstraint("headBlock","h",headBlockH+"px", true); //leftBlockTabHeads objeGGP.blockFramework().registerAutoConstraint("leftBlockTabHeads","t",headBlockH+"px", true); objeGGP.blockFramework().registerAutoConstraint("leftBlockTabHeads","w",""+leftBlockW+"px", true); objeGGP.blockFramework().registerAutoConstraint("leftBlockTabHeads","h",leftBlockTabHeadsH+"px", true); //leftBlock objeGGP.blockFramework().registerAutoConstraint("leftBlock","t",(headBlockH+leftBlockTabHeadsH)+"px", true); objeGGP.blockFramework().registerAutoConstraint("leftBlock","w",""+leftBlockW+"px", true); objeGGP.blockFramework().registerAutoConstraint("leftBlock","h","(bh-(h@id:headBlock+"+leftBlockTabHeadsH+"px+h@id:leftFooterBlock))", true); //leftFooterBlock objeGGP.blockFramework().registerAutoConstraint("leftFooterBlock","w",""+leftBlockW+"px", true); //leftToolStripBlock objeGGP.blockFramework().registerAutoConstraint("leftToolStripBlock","t",headBlockH+"px", true); objeGGP.blockFramework().registerAutoConstraint("leftToolStripBlock","w",leftToolStripW+"px", true); objeGGP.blockFramework().registerAutoConstraint("leftToolStripBlock","h","(bh-(h@id:headBlock))", true); //ImgContainer applyImgContainer(0); //pleaseWaitBlock objeGGP.blockFramework().registerAutoConstraint("pleaseWaitBlock","t","t@id:ImgContainer", true); objeGGP.blockFramework().registerAutoConstraint("pleaseWaitBlock","l","l@id:ImgContainer", true); //allHUDs objeGGP.blockFramework().registerAutoConstraint("allHUDs","t","t@id:ImgContainer+5px+30px", true); objeGGP.blockFramework().registerAutoConstraint("allHUDs","l","(w@id:leftBlock+w@id:leftToolStripBlock)+5px", true); objeGGP.blockFramework().registerAutoConstraint("allHUDs","w","w@id:ImgContainer-10px", true); //allHudsHeader objeGGP.blockFramework().registerAutoConstraint("allHudsHeader","t","(t@id:ImgContainer+5px)", true); objeGGP.blockFramework().registerAutoConstraint("allHudsHeader","l","(w@id:leftBlock+w@id:leftToolStripBlock)+5px", true); objeGGP.blockFramework().registerAutoConstraint("allHudsHeader","w","w@id:ImgContainer-10px-12px", true); //copyBarBlock objeGGP.blockFramework().registerAutoConstraint("copyBarBlock","t","(t@id:ImgContainer+h@id:ImgContainer)-"+currentScaleH+"px", true); } function applyImgContainer(widthAppendment){ //ImgContainer objeGGP.blockFramework().registerAutoConstraint("ImgContainer","t","("+headBlockH+"px)+"+panBarW+"px", true); objeGGP.blockFramework().registerAutoConstraint("ImgContainer","w","(bw-w@id:leftBlock-w@id:leftToolStripBlock)+2px+"+widthAppendment.toString()+"px-(2*"+panBarW+")", true); objeGGP.blockFramework().registerAutoConstraint("ImgContainer","h","(bh-(h@id:headBlock))", true); //allHUDs objeGGP.blockFramework().registerAutoConstraint("allHUDs","l","(l@id:leftToolStripBlock+w@id:leftToolStripBlock)+5px", true); objeGGP.blockFramework().registerAutoConstraint("allHUDs","w","w@id:ImgContainer-10px", true); //allHudsHeader objeGGP.blockFramework().registerAutoConstraint("allHudsHeader","l","(l@id:leftToolStripBlock+w@id:leftToolStripBlock)+5px", true); objeGGP.blockFramework().registerAutoConstraint("allHudsHeader","w","w@id:ImgContainer-10px-12px", true); }