操作的xml文件:
<btnsControlSet>
<xn_0>1</xn_0><xn_1>0</xn_1><xn_2>0</xn_2><xn_4>1</xn_4><xn_3>0</xn_3><xn_5>0</xn_5>
<xn_7>0</xn_7><xn_8>1</xn_8><xn_9>0</xn_9><xn_10>1</xn_10><xn_11>1</xn_11>
</btnsControlSet>
function procFuncBtnsControlSet()
{
//alert( "cmx" );
miniViewFields = "";
var xmlDoc = document.getElementById("uiXmlSet").XMLDocument;
var tNode;
var btnIdx;
with( xmlDoc.selectNodes("//btnsControlSet")[0].childNodes )
{
//alert( );
if( length == 0 || statusAry[ curWindowNum ] )//静态按钮集合
{
setFuncBtnStyle( "funcBtnInit" );
}
else
{
if( length <= 4 )
{
setFuncBtnStyle( "funcBtnInit" );
}
for ( var i = 0; i < length; i++ )
{
//alert( item(i).tagName );
btnIdx = parseInt( item(i).tagName.split("_")[1] );//形如<xn_0>1</xn_0>
tNode = xmlDoc.selectSingleNode("//btnsControlSet/xn_" + btnIdx).text;
alert( tNode );
if ( tNode != "0" )
{
with( document.getElementsByName("funcBtn")[btnIdx] )
{
if ( tNode == "2" )
{
className = "funcBtnUnvalid";
}
else
{
className = "funcBtnValid";
}
}
if ( btnIdx == 1 && tNode != "1" && miniViewFields != tNode )//整理
{
miniViewFields = tNode;
//createMenu( "tidyMenu_0_" + curWindowNum, "转到所在案卷,_S_,案卷排序,卷内(子表)录入,卷内文件整理,_S_,选择待归档文件", 1, false );
createMenu( "tidyMenu_0_" + curWindowNum, document.getElementsByName("menu_2_0")[0].value, 1, false );
createMenu( "tidyMenu_1_" + curWindowNum, document.getElementsByName("menu_2_1")[0].value, 1, false );
//createMenu( "tidyMenu_1_" + curWindowNum, "盒内文件录入,_S_,档案盒排序,盒内文件整理", 1, false );
}
if ( btnIdx == 2 )//移交/接收
{
createMenu( "submitMenu_" + curWindowNum, document.getElementsByName("menu_3")[0].value, 2, false );
//createMenu( "submitMenu_" + curWindowNum, "置为待接收状态,接收选中项目,_S_,取消移交选中项目,移交选中项目", 2, false );
}
}
else
{
document.getElementsByName("funcBtn")[btnIdx].className = "funcBtnInit";
}
}
}
}
}
var urlRoot = window.location.protocol + "//" + window.location.host + window.location.pathname.replace( "/actions/multifunctionForm.aspx", "" );