Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

/**
 * Wrapper for the YUI M.core.notification class. Allows us to
 * use the YUI version in AMD code until it is replaced.
 *
 * @module     mod_customcert/dialogue
 * @copyright  2016 Mark Nelson <markn@moodle.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
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}));

//# sourceMappingURL=dialogue.min.js.map