var commonGridObj_module; function $(id){ return document.getElementById(id); } function createGrid(){ initLoading(); //header var headerArgs_module = new Array("","模块英文名称","模块中文名称","模块连接地址","模块图标","模块状态","排序值","父模块","创建人","创建时间","类型"); //width var widthArgs_module = new Array("40","180","120","200","100","60","60","60","100","120","70"); //column align var colAlignArgs_module = new Array("center","left","left","left","left","center","center","center","center","center","center"); //column sort var colSortArgs_module = new Array("na","str","str","str","str","str","str","str","str","str","str"); //column type var colTypeArgs_module = new Array("ch","ro","ro","ro","ro","ch","ro","ro","ro","ro","ro"); commonGridObj_module = new TGridCommon("mygrid_container_module","form1",headerArgs_module,widthArgs_module,colAlignArgs_module,colSortArgs_module,colTypeArgs_module); commonGridObj_module.setResponseUrl("ModuleGridSource.aspx"); commonGridObj_module.setRequest("ModuleGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_module.newGuid()); commonGridObj_module.setSourceType("json"); commonGridObj_module.setSkin("xp"); commonGridObj_module.setImageUrl("../images/"); commonGridObj_module.initGrid(); commonGridObj_module.loadafter = true; commonGridObj_module.after = function(){ finishLoading(); } commonGridObj_module.bind(); commonGridObj_module.initPageByHandle("list"); commonGridObj_module.getGridObj().attachEvent("onRowSelect", function(id,ind){ if(ind == 7){ var openSet = "height=400, width=500, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-400)/2 + ",Left= "+(screen.width-500)/2 var openType = "_blank"; var openUrl = "ModuleManagement.aspx?id="+id+"&handle=edit"; window.open (openUrl,openType,openSet); }else{ //var rId = commonGridObj_module.getGridObj().getSelectedRowId(); var openSet = "height=300, width=900, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-710)/2 + ",Left= "+(screen.width-800)/2 var openType = "_blank"; var openUrl = "Edit.aspx?id="+id+"&handle=edit"; window.open (openUrl,openType,openSet); } }); commonGridObj_module.clickEvent = function(){ commonGridObj_module.getGridObj().attachEvent("onRowSelect", function(id,ind){ if(ind == 7){ var openSet = "height=400, width=500, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-400)/2 + ",Left= "+(screen.width-500)/2 var openType = "_blank"; var openUrl = "ModuleManagement.aspx?id="+id+"&handle=edit"; window.open (openUrl,openType,openSet); }else if(ind > 0){ //var rId = commonGridObj_module.getGridObj().getSelectedRowId(); var openSet = "height=300, width=900, toolbar=no, menubar=no,scrollbars=no, resizable=1,location=no, status=no,Top= " +(screen.height-710)/2 + ",Left= "+(screen.width-800)/2 var openType = "_blank"; var openUrl = "Edit.aspx?id="+id+"&handle=edit"; window.open (openUrl,openType,openSet); } }); } } function addModule(){ var openSet = "height=300, width=900, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top= " +(screen.height-300)/2 + ",Left= "+(screen.width-900)/2 var openType = "_blank"; var openUrl = "Edit.aspx?handle=add"; window.open (openUrl,openType,openSet); } function refreshModule(){ createGrid(); } function checkAll(gridObj){ if(gridObj != null){//如果Grid对象存在,则进行全选操作 if(!gridObj.$("ck_all").checked){//如果全选按钮为选中,则自动将所有列表选择框置1 for(var i = 0;i 0){ iSuccCount++; }else{ iFalseCount++; } } }else{ for(var k=0;k