';
strFrame+='\n';
strFrame+='
\n';
strFrame+='\n';
strFrame+='\n';
//-------------------------------------------------------------------------------------------------------------------------------
function initMenu(){
window.frames.rightMenuLayer.document.writeln(strFrame);
window.frames.rightMenuLayer.document.close();
omenulayer=window.frames.rightMenuLayer.document;
}
//== WEB 页面显示部分 ==============
function closeLayer() { //这个层的关闭
document.getElementsByName("rightMenuLayer")[0].style.visibility="hidden";
}
function isLayer() {//判断是否显示
if (document.getElementsByName("rightMenuLayer")[0].style.visibility=="hidden") {
return false;
} else {
return true;
}
}
function setMenuTypeWF(aObj,type,win1,x,y){ //主调函数 aObj 为对象; type 为菜单项
closeLayer();
setType(type,aObj);
win2 = win1;
var rightedge = x;
var bottomedge = y;
var strText = "";
var j=0;
if(strMenu.length!=0) {
for (var i = 0;i < strMenu.length;i++) {
if (strMenu[i]!="-") {
var strMenuItem = strMenu[i].split("|");
if ( strMenuItem.length==1)
strText+='\n';
if ( strMenuItem.length==2)
strText+='\n';
if (strMenuItem.length==3)
strText+='\n';
} else {
strText+='
\n';
j++;
}
}
var dads = document.getElementsByName("rightMenuLayer")[0].style;
if (strMenu.length==1) {
dads.height=(strMenu.length*VALUE)-(strMenu.length*4)+(strMenu.length%2)+3-(j*2)+"px";
} else {
dads.height=(strMenu.length*VALUE)-(strMenu.length*2)+(strMenu.length%2)+3-(j*2)+"px";
}
omenulayer.all.item("divId").innerHTML = strText;
bottomedge = bottomedge + document.body.scrollTop; //定位
rightedge = rightedge + document.body.scrollLeft;
//如果从鼠标位置到窗口下边的空间小于菜单的高度,就定位菜单的上坐标(Top)为当前鼠标位置向上一个菜单高度
if ((bottomedge + parseInt(dads.height)) > window.document.body.scrollHeight + window.document.body.scrollTop)
dads.top = bottomedge - parseInt(dads.height); //否则,就定位菜单的左坐标为当前鼠标位置
else
dads.top = bottomedge;
//如果从鼠标位置到窗口右边的空间小于菜单的宽度,就定位菜单的左坐标(Left)为当前鼠标位置向左一个菜单宽度
if ((rightedge + parseInt(dads.width)) > ( window.document.body.scrollWidth + window.document.body.scrollLeft)) {
dads.left = rightedge - parseInt(dads.width);
}
else{
//否则,就定位菜单的上坐标为当前鼠标位置
dads.left = rightedge
}
//设置菜单可见
dads.visibility="visible";
document.getElementsByName("rightMenuLayer")[0].focus();
}
}
//菜单项类型
function setType(i,aObj){
var nodeId = aObj.nodeId;
var moduletype = aObj.nodeId;
if(moduletype.indexOf(".") != -1) moduletype = moduletype.substring(moduletype.indexOf(".") + 1);
switch(i) {
case 1:
strMenu=new Array();
strMenu[0]="新增模块|add('/nwyj/admin/setup/sysmodel/objmanager/module/edit.jsp?action=0')|2";
strMenu[1]="刷新模块|refreshNode('"+aObj.nodeId+"')|2";
break;
case 10:
strMenu=new Array();
strMenu[0]="修改|edit('"+aObj.href+"')|2";
strMenu[1]="删除|deleteObj('/nwyj/admin/setup/sysmodel/objmanager/module/editExc.jsp?action=del&code="+nodeId+"')|2";
break;
case 2:
strMenu=new Array();
strMenu[0]="新增数据库链接|add('/nwyj/admin/setup/sysmodel/objmanager/DBLink/edit.jsp?action=0')|2";
strMenu[1]="刷新数据库链接|refreshNode('"+aObj.nodeId+"')|2";
break;
case 20:
strMenu=new Array();
strMenu[0]="修改|edit('"+aObj.href+"')|2";
strMenu[1]="删除|deleteObj('/nwyj/admin/setup/sysmodel/objmanager/DBLink/editExc.jsp?action=del&dataSourceid="+nodeId+"')|2";
break;
case 3:
strMenu=new Array();
strMenu[0]="新增常量模版|add('/nwyj/admin/setup/sysmodel/objmanager/constant/template/container.jsp')|2";
strMenu[1]="刷新常量模版|refreshNode('"+aObj.nodeId+"')|2";
break;
case 30:
strMenu=new Array();
strMenu[0]="修改|edit('"+aObj.href+"')|2";
strMenu[1]="删除|deleteObj('/nwyj/admin/setup/sysmodel/objmanager/constant/template/editExc.jsp?action=del&name="+nodeId+"')|2";
break;
case 4:
strMenu=new Array();
strMenu[0]="新增常量|add('/nwyj/admin/setup/sysmodel/objmanager/constant/edit.jsp?action=0&type="+moduletype+"')|2";
strMenu[1]="刷新常量|refreshNode('"+aObj.nodeId+"')|2";
break;
case 40:
strMenu=new Array();
strMenu[0]="修改常量|edit('"+aObj.href+"')|2";
strMenu[1]="删除常量|deleteObj('/nwyj/admin/setup/sysmodel/objmanager/constant/editExc.jsp?action=del&name="+nodeId+"')|2";
strMenu[2]="-";
strMenu[3]="生成表|refreshNode()";
strMenu[4]="更新表|openFileProperty('propertyAdjunctFile.jsp',364,238)";
break;
case 5:
strMenu=new Array();
strMenu[0]="新增表|add('/nwyj/admin/setup/sysmodel/objmanager/table/container.jsp?type="+moduletype+"')|2";
strMenu[1]="刷新表|refreshNode('"+aObj.nodeId+"')|2";
break;
case 50:
strMenu=new Array();
strMenu[0]="修改表|edit('"+aObj.href+"')|2";
strMenu[1]="删除表|deleteObj('/nwyj/admin/setup/sysmodel/objmanager/table/editExc.jsp?action=del&classid="+nodeId+"')|2";
strMenu[2]="-";
strMenu[3]="生成表|creatTable('/nwyj/admin/setup/sysmodel/dbmanager/table/create/createExc.jsp?classid="+nodeId+"&type=1')|2";
strMenu[4]="更新表|openFileProperty('propertyAdjunctFile.jsp',364,238)";
break;
case 6:
strMenu=new Array();
strMenu[0]="新增列表配置|add('/nwyj/admin/setup/listmodel/objmanager/container.html?type="+moduletype+"')|2";
strMenu[1]="刷新列表配置|refreshNode('"+aObj.nodeId+"')|2";
break;
case 60:
strMenu=new Array();
strMenu[0]="修改列表配置|edit('"+aObj.href+"')|2";
strMenu[1]="删除列表配置|deleteObj('/nwyj/admin/setup/listmodel/objmanager/editExc.jsp?action=del&listid="+nodeId+"')|2";
strMenu[2]="-";
strMenu[3]="验证列表配置|edit()";
break;
case 7:
strMenu=new Array();
strMenu[0]="新增采集配置|add('/nwyj/admin/setup/collectmodel/objmanager/container.html?type="+moduletype+"')|2";
strMenu[1]="刷新采集配置|refreshNode('"+aObj.nodeId+"')|2";
break;
case 70:
strMenu=new Array();
strMenu[0]="修改采集配置|edit('"+aObj.href+"')|2";
strMenu[1]="删除采集配置|deleteObj('/nwyj/admin/setup/collectmodel/objmanager/editExc.jsp?Action=del&pagid="+nodeId+"')|2";
strMenu[2]="-";
strMenu[3]="验证采集配置|refreshNode()";
break;
default:
strMenu=new Array();
alert("没有该类型!");
}
}
/*
function document.onkeyup(e) { //按Esc键关闭,切换焦点关闭
if (window.event.keyCode==27) {
closeLayer();
} else if (document.activeElement) {
closeLayer();
}
}
*/
// -->