META-INF.resources.openmonitor.jui.dest.win.dialog.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easyopen Show documentation
Show all versions of easyopen Show documentation
一个简单易用的接口开放平台,平台封装了常用的参数校验、结果返回等功能,开发者只需实现业务代码即可。https://gitee.com/durcframework/easyopen
(function(){JUI.Class("Dialog",{OPTS:{noCancelBtn:false,okText:"确定",cancelText:"取消",onOk:function(){},onCancel:function(){this.hide()},buttons:null},init:function(a){this._super(a)},getViewClass:function(){return JUI.DialogView},beforeRender:function(){this.buildDefButtons()},buildDefButtons:function(){var b=this;var a=this.opt("buttons");if(!a){a=[{text:this.opt("okText"),cls:"btn btn-primary",handler:function(){var d=b.opt("onOk");d&&d.call(b)}}];if(!this.opt("noCancelBtn")){var c={text:this.opt("cancelText"),handler:function(){var d=b.opt("onCancel");if(d){d.call(b)}else{b.hide()}}};a.push(c)}this.opt("buttons",a)}}},JUI.Win)})();