jeecg中自定義dialog,實現窗體的彈出


自定一個dialog,在子窗體中寫一個方法,然后通過iframe進行調取
function createwindowoktext(title, addurl,width,height,oktext,canceltext) {
width = width?width:700;
height = height?height:400;
if(width=="100%" || height=="100%")

{ width = window.top.document.body.offsetWidth; height =window.top.document.body.offsetHeight-100; }

if(typeof(windowapi) == 'undefined'){
$.dialog({
content: 'url:'+addurl,
lock : true,
//zIndex:1990,
width:width,
height:height,
title:title,
opacity : 0.3,
cache:false,
ok: function()

{ iframe = this.iframe.contentWindow;

var orgIds=iframe.getDomianIds();

var orgNames = iframe.getDomian(); //alert(orgId);

$("input[name='domainIdStr']").attr("value",orgIds);

$("input[name='domainStrs']").attr("value",orgNames);

//saveObj();

return true; }

,
okVal:oktext,
cancelVal: canceltext,
cancel: true /為true等價於function(){}/
}).zindex();
}else{
W.$.dialog({
content: 'url:'+addurl,
lock : true,
width:width,
//zIndex:1990,
height:height,
parent:windowapi,
title:title,
opacity : 0.3,
cache:false,
ok: function()

{ iframe = this.iframe.contentWindow; var orgIds=iframe.getDomianIds(); var orgNames = iframe.getDomian(); //alert(orgId); $("input[name='domainIdStr']").attr("value",orgIds); $("input[name='domainStrs']").attr("value",orgNames); //saveObj(); return true; }

,
okVal:oktext,
cancelVal: canceltext,
cancel: true /為true等價於function(){}/
}).zindex();
}

}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM