You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/js/role.js

40 lines
1.8 KiB
JavaScript

3 years ago
var commonGridObj_role;
function createGrid(){
//header
var headerArgs_role = new Array("<input type=\"checkbox\" id=\"ck_all\" onclick=\"checkAll(commonGridObj_order)\" />","系统名称","显示名称","创建人","创建时间","状态","排序值");
//width
var widthArgs_role = new Array("40","150","150","120","150","70","70");
//column align
var colAlignArgs_role = new Array("center","center","center","center","center","center","center");
//column sort
var colSortArgs_role = new Array("na","str","str","str","str","str","str");
//column type
var colTypeArgs_role = new Array("ch","ro","ro","ro","ro","ro","ro");
commonGridObj_role = new TGridCommon("mygrid_container_role","form1",headerArgs_role,widthArgs_role,colAlignArgs_role,colSortArgs_role,colTypeArgs_role);
commonGridObj_role.setResponseUrl("RoleGridSource.aspx");
commonGridObj_role.setRequest("RoleGridSource.aspx?handle=list");
commonGridObj_role.setSourceType("json");
commonGridObj_role.setSkin("xp");
commonGridObj_role.setImageUrl("../images/");
commonGridObj_role.initGrid();
commonGridObj_role.bind();
commonGridObj_role.getGridObj().attachEvent("onEditCell",function(stage,rId,cInd,nValue,oValue){
if(stage == 0){
return false;
}
});
commonGridObj_role.getGridObj().attachEvent("onRowSelect", function(id,ind){
var rId = commonGridObj_role.getGridObj().getSelectedRowId();
var openSet = "height=270, width=500, 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="+rId+"&handle=edit";
window.open (openUrl,openType,openSet);
});
}