|
|
9 |
define("mod_customcert/dialogue",["core/yui"],(function(Y){var dialogue=function(title,content,afterShow,afterHide,wide){this.yuiDialogue=null;var parent=this;void 0===wide&&(wide=!1),Y.use("moodle-core-notification","timers",(function(){var width="480px";wide&&(width="800px"),parent.yuiDialogue=new M.core.dialogue({headerContent:title,bodyContent:content,draggable:!0,visible:!1,center:!0,modal:!0,width:width}),parent.yuiDialogue.after("visibleChange",(function(e){e.newVal?void 0!==afterShow&&Y.soon((function(){afterShow(parent),parent.yuiDialogue.centerDialogue()})):void 0!==afterHide&&Y.soon((function(){afterHide(parent)}))})),parent.yuiDialogue.show()}))};return dialogue.prototype.close=function(){this.yuiDialogue.hide(),this.yuiDialogue.destroy()},dialogue.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()},dialogue}));
|