src/myams/resources/js/ext/tinymce/dev/classes/ui/MessageBox.min.js
changeset 0 f05d7aea098a
child 5 c9c69b13d884
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/myams/resources/js/ext/tinymce/dev/classes/ui/MessageBox.min.js	Fri Jul 10 16:59:11 2020 +0200
@@ -0,0 +1,1 @@
+define("tinymce/ui/MessageBox",["tinymce/ui/Window"],function(b){var a=b.extend({init:function(c){c={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:true,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:true,maxWidth:500,maxHeight:200}};this._super(c)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(d){var e,f=d.callback||function(){};function c(i,g,h){return{type:"button",text:i,subtype:h?"primary":"",onClick:function(j){j.control.parents()[1].close();f(g)}}}switch(d.buttons){case a.OK_CANCEL:e=[c("Ok",true,true),c("Cancel",false)];break;case a.YES_NO:case a.YES_NO_CANCEL:e=[c("Yes",1,true),c("No",0)];if(d.buttons==a.YES_NO_CANCEL){e.push(c("Cancel",-1))}break;default:e=[c("Ok",true,true)];break}return new b({padding:20,x:d.x,y:d.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:e,title:d.title,role:"alertdialog",items:{type:"label",multiline:true,maxWidth:500,maxHeight:200,text:d.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:d.onClose,onCancel:function(){f(false)}}).renderTo(document.body).reflow()},alert:function(c,d){if(typeof c=="string"){c={text:c}}c.callback=d;return a.msgBox(c)},confirm:function(c,d){if(typeof c=="string"){c={text:c}}c.callback=d;c.buttons=a.OK_CANCEL;return a.msgBox(c)}}});return a});
\ No newline at end of file