var tempIndexNum=0; var codePath="$!codePath"; ##临时存放编码相关的页面控件对象 var tempCodeIdObj; var tempCodeNameObj; var tempIsSingleStr; ##获取codeIdObj对象 function getCodeIdObj(){ return tempCodeIdObj; } ##获取codeNameObj对象 function getCodeNameObj(){ return tempCodeNameObj; } ##判断single属性 function isSingle(){ return tempIsSingleStr!='no'; } var temp_unique_index=0; function getCodeUniqueID(){ var dt = new Date(); var dstr=dt.getTime(); return "_code_uid_"+dstr+"_"+(temp_unique_index++); } ##查找包含了ext.js的窗口,并显示url function showInExtWindow(url,width,height){ //查找frame路径 var fids=window.frameElement.id; var pframe=parent; while(pframe!=null&&!pframe.codeExtWindow){ fids=pframe.window.frameElement.id+"@"+fids; pframe=pframe.parent; } if(pframe==null){ alert("请在外层容器页面中引入"+codePath+"static/code/ext.js"); return; } //拼装url url=url+"&iframeId="+fids; pframe.codeExtWindow(url,width,height,"请选择"); } ////////////////////////////// flow useful function //////////////////////////////// #* //选择代码表的“树状”小窗口 // nameObj (必须)名称对象 // idObj (必须)id对象 // configKey (必须)对应spring中的配置key // isSingle (可选)是否为单选[yes,no]默认yes // paramStr (可选)其他需要传递的参数,格式为abc=3&def=4 // width (可选)小窗口宽度 // height (可选)小窗口高度 *# function codeTree(configKey,idObj,nameObj,isSingle,paramStr,width,height){ tempCodeIdObj=idObj; tempCodeNameObj=nameObj; tempIsSingleStr=isSingle==null?"yes":isSingle; // if(!width) width=500; if(!height) height=400; url=codePath+"vm/ExtTree.htm?key="+configKey+"&t_i_x="+(tempIndexNum++); if(paramStr) url=url+"&"+paramStr; //show window showInExtWindow(url,width,height); } #* //选择代码表的“表格式”小窗口 // nameObj (必须)名称对象 // idObj (必须)id对象 // configKey (必须)对应spring中的配置key // isSingle (可选)[yes,no] 是否为单选,默认yes // paramStr (可选)其他需要传递的参数,格式为abc=3&def=4 // width (可选)小窗口宽度 // height (可选)小窗口高度 *# function codeTable(configKey,idObj,nameObj,isSingle,paramStr,width,height){ tempCodeIdObj=idObj; tempCodeNameObj=nameObj; tempIsSingleStr=isSingle==null?"yes":isSingle; // if(!width) width=500; if(!height) height=400; url=codePath+"vm/ExtTable.htm?key="+configKey+"&t_i_x="+(tempIndexNum++); if(paramStr) url=url+"&"+paramStr; //show window showInExtWindow(url,width,height); }