jeecg最近用到弹出窗体按钮文本修改的问题

来源:互联网 发布:简单画图软件 知乎 编辑:程序博客网 时间:2024/05/16 12:21

需要在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','保存','关闭');

0 0
原创粉丝点击