打開(kāi)的時(shí)候
var distributeRole1; function openRoleType(id){ //top.distributeRoleType.close('distributeRoleType')parent.lhgdialog.list['distributeRoleType'] distributeRole1=$.dialog({id:'distributeRoleType1', title:'角色分配', background: '#FFF', /* 背景色 默認(rèn)的遮罩背景色為:#DCE2F1淺藍(lán)護(hù)眼色 */ opacity: 0.5, /* 透明度 */ content: 'url:${root}/base/BaseOperateRole/show.jspx?id='+id+'&date='+new Date().getTime(), max: false, min: false, drag: false, resize: false, width: 450, height:180 }); }
關(guān)閉的時(shí)候
function saveRoleType(){ var api = frameElement.api, W = api.opener; var flag=false;//選中時(shí)候?yàn)閏hecked //這里寫(xiě)一個(gè)for循環(huán)算了 var check=document.getElementsByName("roletype"); for(var i=0;i<check.length;i++){ if(check[i].checked==true){ flag=true; break; } } if(flag ==false){ W.$.dialog.tips('請(qǐng)選擇要分配的角色!',1,'alert.gif',function(){}); return false; }else{ $.ajax({ type:'post', url:'${root}/base/BaseOperateUserRole/save.jspx?id=${id}&date='+new Date().getTime(), data:$("#frm").serialize(), success:function(){ var api = frameElement.api, W = api.opener; parent.mainFrame.i51.document.location.href="${root}/base/BaseUser/operateList.jspx"; W.lhgdialog.list['distributeRoleType1'].close(); } }); } //document.location.href="${root}/"; }
確認(rèn)對(duì)話框 $.dialog.confirm('確定要對(duì)資源更新索引么?', function(){ //frm.submit(); $("#gxsy").replaceWith(textstr); var params=$('#frm').serialize(); $.ajax({ type:'post', data:params, //要傳遞的數(shù)據(jù);就是上面序列化的值 url:'${root}/resource/SdResResource/updateIndexByGroup.jspx?&date=' +new Date().getTime(), success:function(){
top.mainFrame.i91.document.location.reload(); } }); }, function(){ });
|