📄 members.js
字号:
// when an event fires, there is no way for the system to know which user-defined
// object (CTabber) is being invoked. The <TD> has a reference to the owning tab object
// so that the event can be invoked on the correct object.
//
function onMouseOverRedirect(){
this.tab.OnMouseHover();
}
function onMouseOutRedirect(){
this.tab.OnMouseFlee();
}
function onMouseClickRedirect(){
this.tab.OnMouseClick();
}
//---------------------------------------------------------------------------------------
function expand_onclick_handler(){
toggleExpandDataView();
}
function scroll_onscroll_handler(){
gaTabs[0].GetActiveTab().SetScrollPosition(oMTData.scrollTop);
}
//
// Expands or collapses the list based on the interaction with the expand/collapse glyph.
//
function toggleExpandDataView(){
if(oCollapso.state == "collapsed"){
// the state is collapase so force environment to be expanded.
oCollapso.title = "折叠";
oMTData.style.overflow = "visible";
oCollapso.src = gsGraphicsPath + "UI_OM_collapse.gif";
oCollapso.state = "expanded";
// now that the view is being expanded, must save this state.
goPersist.SetAttribute("expanded", "true");
} else {
// the state is expanded so force environment to be expanded.
oCollapso.title = "展开";
oMTData.style.overflow = "auto";
oCollapso.src = gsGraphicsPath + "UI_OM_expand.gif";
oCollapso.state = "collapsed";
// now that the view is being collapsed, must remove expanded state.
goPersist.SetAttribute("expanded", "false");
}
}
//laukin extend
function initIFrameMembers() {
if(document.getElementById("oMT")){
var mshaid = document.all("MS-HAID"); // need to get the topic id for this page.
if(mshaid) gsPageId = mshaid.getAttribute("content");
locateAvailableTabs(); // assembly an array of all the divs that are tabs.
divscol=document.all.tags("div");
divsize=divscol.length;
if (divsize>0)
{
oMTExplanation.style.display = "block";
gsTabControl=''
// this defines the tabbed title bar.
gsTabControl=gsTabControl+'<TABLE class="oMembersTable" border="0" cellpadding="0" cellspacing="0" style="border-colapse:collapse" bordercolor="#111111" width="95%">';
gsTabControl=gsTabControl+' <STYLE>';
gsTabControl=gsTabControl+' .oMembersTable {}';
gsTabControl=gsTabControl+' TD {}';
gsTabControl=gsTabControl+' .oMTab {background:#eeeeee; width:100%; height:20px; border-top=1px solid #6699cc; padding:7px; padding-left:7px; cursor:hand;}';
gsTabControl=gsTabControl+' .oMTabOn {background:#999999; width:100%; height:20px; color:#ffffff; border-top:1px groove white; padding:7px; padding-left:7px; cursor:hand;}';
gsTabControl=gsTabControl+' .oMTabHover {background:#dddddd; width:100%; height:20px; border-top=1px solid #6699cc; padding:7px; padding-left:7px; cursor:hand;}';
gsTabControl=gsTabControl+' </STYLE>';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" bgcolor="#6699cc">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%" id="AutoNumber4">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="4" height="25px" style="background-image:url(\'' + gsGraphicsPath + 'UI_OM_top_left_corner.gif\'); background-repeat:no-repeat"> </TD>';
gsTabControl=gsTabControl+' <TD width="*" height="25px">';
gsTabControl=gsTabControl+' <DIV id="oMTitle" style="color:white; font-weight:bold; font-size:11pt; font-family:arial"> </DIV>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' <TD width="4" height="25px" style="background-image:url(\'' + gsGraphicsPath + 'UI_OM_top_right_corner.gif\'); background-repeat:no-repeat; background-position:top right;"> </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="95px" style="padding:5px; padding-top:0px; background:#eeeeee; border-top:1px solid white; border-left:1px solid #6699cc; border-bottom:1px solid #6699cc; border-right:4px solid #6699cc" valign="top">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%">';
gsTabControl=gsTabControl+' <TBODY id="oMTabberList">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" height="20px" bgcolor="#eeeeee" style="padding-left:2px;"><B>分类:</B></TD>';
gsTabControl=gsTabControl+' </TR>';
//
// the tabs will be dynamically built later based on the <div> content.
//
gsTabControl=gsTabControl+' </TBODY>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' <TD width="*" valign="top" style="border-right:1px solid #6699cc; border-bottom:1px solid #6699cc" id="oMTabberContent">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="100%" width="100%>';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" bgcolor="#dddddd" style="border-collapse:collapse" bordercolor="#111111" height="100%">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" height="*">';
gsTabControl=gsTabControl+' <DIV id="oMTData" onscroll="scroll_onscroll_handler();" style="height:700px; overflow:auto;">';
gsTabControl=gsTabControl+' <IFRAME id="contents" name="contents" scrolling="auto" style="VISIBILITY: inherit; WIDTH: 100%; Height:100%;" src="" frameBorder=1></IFRAME>';
gsTabControl=gsTabControl+' </DIV>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
//
// the actual member links appear here based on the selected tabs.
//
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+'</TABLE>';
oMT.insertAdjacentHTML("beforeBegin", gsTabControl); // renders the initial, constant, content.
goPersist = new CPersist(oMTData, gsStoreName); // now I create the instance.
// cycles through all the tabs and renders the tab buttons.
for(var i=0; i<gaTabs.length; i++){
var tab = gaTabs[i];
var tr = document.createElement("TR");
tr.appendChild(tab.GetTab());
oMTabberList.appendChild(tr);
}
// determine the initial tab to display. If there is persistent
// information, they use that, otherwise, just use the first
// tab in the list.
restoreInitState()
}
}
}
function initTabbedMembers()
{
if(document.getElementById("oMT")){
var mshaid = document.all("MS-HAID"); // need to get the topic id for this page.
if(mshaid) gsPageId = mshaid.getAttribute("content");
locateAvailableTabs(); // assembly an array of all the divs that are tabs.
divscol=document.all.tags("div");
divsize=divscol.length;
if (divsize>0)
{
oMTExplanation.style.display = "block";
gsTabControl=''
// this defines the tabbed title bar.
gsTabControl=gsTabControl+'<TABLE class="oMembersTable" border="0" cellpadding="0" cellspacing="0" style="border-colapse:collapse" bordercolor="#111111" width="90%">';
gsTabControl=gsTabControl+' <STYLE>';
gsTabControl=gsTabControl+' .oMembersTable {}';
gsTabControl=gsTabControl+' TD {}';
gsTabControl=gsTabControl+' .oMTab {background:#eeeeee; width:100%; height:20px; border-top=1px solid #6699cc; padding:7px; padding-left:7px; cursor:hand;}';
gsTabControl=gsTabControl+' .oMTabOn {background:#999999; width:100%; height:20px; color:#ffffff; border-top:1px groove white; padding:7px; padding-left:7px; cursor:hand;}';
gsTabControl=gsTabControl+' .oMTabHover {background:#dddddd; width:100%; height:20px; border-top=1px solid #6699cc; padding:7px; padding-left:7px; cursor:hand;}';
gsTabControl=gsTabControl+' </STYLE>';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" bgcolor="#6699cc">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%" id="AutoNumber4">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="4" height="25px" style="background-image:url(\'' + gsGraphicsPath + 'UI_OM_top_left_corner.gif\'); background-repeat:no-repeat"> </TD>';
gsTabControl=gsTabControl+' <TD width="*" height="25px">';
gsTabControl=gsTabControl+' <DIV id="oMTitle" style="color:white; font-weight:bold; font-size:11pt; font-family:arial"> </DIV>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' <TD width="25" height="25px" style="padding-top:2px">';
gsTabControl=gsTabControl+' <IMG id="oCollapso" src="' + gsGraphicsPath + 'UI_OM_expand.gif" onclick="expand_onclick_handler();" title="展开" state="collapsed" style="cursor:hand" width="21 height="18">';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' <TD width="4" height="25px" style="background-image:url(\'' + gsGraphicsPath + 'UI_OM_top_right_corner.gif\'); background-repeat:no-repeat; background-position:top right;"> </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="95px" style="padding:5px; padding-top:0px; background:#eeeeee; border-top:1px solid white; border-left:1px solid #6699cc; border-bottom:1px solid #6699cc; border-right:4px solid #6699cc" valign="top">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%">';
gsTabControl=gsTabControl+' <TBODY id="oMTabberList">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" height="20px" bgcolor="#eeeeee" style="padding-left:2px;"><B>显示:</B></TD>';
gsTabControl=gsTabControl+' </TR>';
//
// the tabs will be dynamically built later based on the <div> content.
//
gsTabControl=gsTabControl+' </TBODY>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' <TD width="*" valign="top" style="border-right:1px solid #6699cc; border-bottom:1px solid #6699cc" id="oMTabberContent">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="100%" width="100%>';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD height="20" width="100%" bgcolor="#dddddd" style="border-collapse:collapse" bordercolor="#111111" height="100%">';
gsTabControl=gsTabControl+' <TABLE border="0" cellpadding="0" cellspaceing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">';
gsTabControl=gsTabControl+' <TR>';
gsTabControl=gsTabControl+' <TD width="100%" height="*">';
gsTabControl=gsTabControl+' <DIV id="oMTData" onscroll="scroll_onscroll_handler();" style="height:255px; overflow:auto; overflow-x:hidden;"></DIV>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
//
// the actual member links appear here based on the selected tabs.
//
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+' </TABLE>';
gsTabControl=gsTabControl+' </TD>';
gsTabControl=gsTabControl+' </TR>';
gsTabControl=gsTabControl+'</TABLE>';
oMT.insertAdjacentHTML("beforeBegin", gsTabControl); // renders the initial, constant, content.
goPersist = new CPersist(oMTData, gsStoreName); // now I create the instance.
// cycles through all the tabs and renders the tab buttons.
for(var i=0; i<gaTabs.length; i++){
var tab = gaTabs[i];
var tr = document.createElement("TR");
tr.appendChild(tab.GetTab());
oMTabberList.appendChild(tr);
}
// determine the initial tab to display. If there is persistent
// information, they use that, otherwise, just use the first
// tab in the list.
restoreInitState()
}
}
}
//
// cyncles through all the <div> tags and locate any that might be tabs.
//
function locateAvailableTabs(){
var divs = document.all.tags("div");
var key;
for(key in divs){
var div = divs[key];
if(div.tabName){ // this is a tag. Try to add it to the tab collection for later use.
gaTabs[div.tabName] = gaTabs[gaTabs.length] = new CTabber(div);
div.style.display = "none";
}
}
}
function restoreInitState(){
persistTab = goPersist.GetAttribute("selectedTab");
persistExpand = goPersist.GetAttribute("expanded");
persistScroll = goPersist.GetAttribute("scroll");
if(gaTabs[persistTab]) gaTabs[persistTab].MakeActive(); else gaTabs[0].MakeActive();
if(persistExpand) toggleExpandDataView();
if(persistScroll) gaTabs[0].GetActiveTab().SetScrollPosition(persistScroll);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -