1. 程式人生 > >jeecg最近用到彈出窗體按鈕文字修改的問題

jeecg最近用到彈出窗體按鈕文字修改的問題

需要在curdtool.js中新增一個函式

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;
}
    //--author:JueYue---------date:20140427---------for:彈出bug修改,設定了zindex()函式

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;
saveObj();
return false;
   },
   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;
saveObj();
return false;
   },
   okVal:oktext,
   cancelVal: canceltext,
   cancel: true /*為true等價於function(){}*/
}).zindex();
}
    //--author:wjl---------date:20170206---------for:彈出bug修改,設定了文字函式

}

在jsp頁面呼叫傳遞即可createwindowoktext(title,url,'700px','500px','儲存','關閉');