Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/dialogue.min.js.map

{"version":3,"sources":["../src/dialogue.js"],"names":["define","Y","dialogue","title","content","afterShow","afterHide","wide","M","util","js_pending","yuiDialogue","parent","use","width","core","headerContent","bodyContent","draggable","visible","center","modal","before","after","e","newVal","soon","centerDialogue","js_complete","show","prototype","close","hide","destroy","getContent","bodyNode","getDOMNode"],"mappings":"AAwBAA,OAAM,oBAAC,CAAC,UAAD,CAAD,CAAe,SAASC,CAAT,CAAY,CAY7B,GAAIC,CAAAA,CAAQ,CAAG,SAASC,CAAT,CAAgBC,CAAhB,CAAyBC,CAAzB,CAAoCC,CAApC,CAA+CC,CAA/C,CAAqD,CAChEC,CAAC,CAACC,IAAF,CAAOC,UAAP,CAAkB,2BAAlB,EAEA,KAAKC,WAAL,CAAmB,IAAnB,CACA,GAAIC,CAAAA,CAAM,CAAG,IAAb,CAGA,GAAmB,WAAf,QAAOL,CAAAA,CAAX,CAAgC,CAC5BA,CAAI,GACP,CAEDN,CAAC,CAACY,GAAF,CAAM,0BAAN,CAAkC,QAAlC,CAA4C,UAAW,CACnD,GAAIC,CAAAA,CAAK,CAAG,OAAZ,CACA,GAAIP,CAAJ,CAAU,CACNO,CAAK,CAAG,OACX,CAEDF,CAAM,CAACD,WAAP,CAAqB,GAAIH,CAAAA,CAAC,CAACO,IAAF,CAAOb,QAAX,CAAoB,CACrCc,aAAa,CAAEb,CADsB,CAErCc,WAAW,CAAEb,CAFwB,CAGrCc,SAAS,GAH4B,CAIrCC,OAAO,GAJ8B,CAKrCC,MAAM,GAL+B,CAMrCC,KAAK,GANgC,CAOrCP,KAAK,CAAEA,CAP8B,CAApB,CAArB,CAUAF,CAAM,CAACD,WAAP,CAAmBW,MAAnB,CAA0B,eAA1B,CAA2C,UAAW,CAClDd,CAAC,CAACC,IAAF,CAAOC,UAAP,CAAkB,uCAAlB,CACH,CAFD,EAIAE,CAAM,CAACD,WAAP,CAAmBY,KAAnB,CAAyB,eAAzB,CAA0C,SAASC,CAAT,CAAY,CAClD,GAAIA,CAAC,CAACC,MAAN,CAAc,CAGV,GAA0B,WAArB,QAAOpB,CAAAA,CAAZ,CAAwC,CACpCJ,CAAC,CAACyB,IAAF,CAAO,UAAW,CACdrB,CAAS,CAACO,CAAD,CAAT,CACAA,CAAM,CAACD,WAAP,CAAmBgB,cAAnB,GACAnB,CAAC,CAACC,IAAF,CAAOmB,WAAP,CAAmB,uCAAnB,CACH,CAJD,CAKH,CAND,IAMO,CACHpB,CAAC,CAACC,IAAF,CAAOmB,WAAP,CAAmB,uCAAnB,CACH,CACJ,CAZD,IAYO,CACH,GAA0B,WAArB,QAAOtB,CAAAA,CAAZ,CAAwC,CACpCL,CAAC,CAACyB,IAAF,CAAO,UAAW,CACdpB,CAAS,CAACM,CAAD,CAAT,CACAJ,CAAC,CAACC,IAAF,CAAOmB,WAAP,CAAmB,uCAAnB,CACH,CAHD,CAIH,CALD,IAKO,CACHpB,CAAC,CAACC,IAAF,CAAOmB,WAAP,CAAmB,uCAAnB,CACH,CACJ,CACJ,CAvBD,EAyBAhB,CAAM,CAACD,WAAP,CAAmBkB,IAAnB,GACArB,CAAC,CAACC,IAAF,CAAOmB,WAAP,CAAmB,2BAAnB,CACH,CA/CD,CAgDH,CA3DD,CAgEA1B,CAAQ,CAAC4B,SAAT,CAAmBC,KAAnB,CAA2B,UAAW,CAClC,KAAKpB,WAAL,CAAiBqB,IAAjB,GACA,KAAKrB,WAAL,CAAiBsB,OAAjB,EACH,CAHD,CASA/B,CAAQ,CAAC4B,SAAT,CAAmBI,UAAnB,CAAgC,UAAW,CACvC,MAAO,MAAKvB,WAAL,CAAiBwB,QAAjB,CAA0BC,UAA1B,EACV,CAFD,CAIA,MAA6ClC,CAAAA,CAChD,CA1FK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Wrapper for the YUI M.core.notification class. Allows us to\n * use the YUI version in AMD code until it is replaced.\n *\n * @module     tool_lp/dialogue\n * @package    tool_lp\n * @copyright  2015 Damyon Wiese <damyon@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['core/yui'], function(Y) {\n\n    // Private variables and functions.\n    /**\n     * Constructor\n     *\n     * @param {String} title Title for the window.\n     * @param {String} content The content for the window.\n     * @param {function} afterShow Callback executed after the window is opened.\n     * @param {function} afterHide Callback executed after the window is closed.\n     * @param {Boolean} wide Specify we want an extra wide dialogue (the size is standard, but wider than the default).\n     */\n    var dialogue = function(title, content, afterShow, afterHide, wide) {\n        M.util.js_pending('tool_lp/dialogue:dialogue');\n\n        this.yuiDialogue = null;\n        var parent = this;\n\n        // Default for wide is false.\n        if (typeof wide == 'undefined') {\n            wide = false;\n        }\n\n        Y.use('moodle-core-notification', 'timers', function() {\n            var width = '480px';\n            if (wide) {\n                width = '800px';\n            }\n\n            parent.yuiDialogue = new M.core.dialogue({\n                headerContent: title,\n                bodyContent: content,\n                draggable: true,\n                visible: false,\n                center: true,\n                modal: true,\n                width: width\n            });\n\n            parent.yuiDialogue.before('visibleChange', function() {\n                M.util.js_pending('tool_lp/dialogue:before:visibleChange');\n            });\n\n            parent.yuiDialogue.after('visibleChange', function(e) {\n                if (e.newVal) {\n                    // Delay the callback call to the next tick, otherwise it can happen that it is\n                    // executed before the dialogue constructor returns.\n                    if ((typeof afterShow !== 'undefined')) {\n                        Y.soon(function() {\n                            afterShow(parent);\n                            parent.yuiDialogue.centerDialogue();\n                            M.util.js_complete('tool_lp/dialogue:before:visibleChange');\n                        });\n                    } else {\n                        M.util.js_complete('tool_lp/dialogue:before:visibleChange');\n                    }\n                } else {\n                    if ((typeof afterHide !== 'undefined')) {\n                        Y.soon(function() {\n                            afterHide(parent);\n                            M.util.js_complete('tool_lp/dialogue:before:visibleChange');\n                        });\n                    } else {\n                        M.util.js_complete('tool_lp/dialogue:before:visibleChange');\n                    }\n                }\n            });\n\n            parent.yuiDialogue.show();\n            M.util.js_complete('tool_lp/dialogue:dialogue');\n        });\n    };\n\n    /**\n     * Close this window.\n     */\n    dialogue.prototype.close = function() {\n        this.yuiDialogue.hide();\n        this.yuiDialogue.destroy();\n    };\n\n    /**\n     * Get content.\n     * @return {node}\n     */\n    dialogue.prototype.getContent = function() {\n        return this.yuiDialogue.bodyNode.getDOMNode();\n    };\n\n    return /** @alias module:tool_lp/dialogue */ dialogue;\n});\n"],"file":"dialogue.min.js"}