Your IP : 192.168.165.1


Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/
Upload File :
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/modal_registry.min.js.map

{"version":3,"sources":["../src/modal_registry.js"],"names":["define","Notification","Prefetch","registry","get","type","register","module","template","exception","message","prefetchTemplate"],"mappings":"AAwBAA,OAAM,uBAAC,CAAC,mBAAD,CAAsB,eAAtB,CAAD,CAAyC,SAASC,CAAT,CAAuBC,CAAvB,CAAiC,IAIxEC,CAAAA,CAAQ,CAAG,EAJ6D,CAaxEC,CAAG,CAAG,SAASC,CAAT,CAAe,CACrB,MAAOF,CAAAA,CAAQ,CAACE,CAAD,CAClB,CAf2E,CA+C5E,MAAO,CACHC,QAAQ,CAvBG,QAAXA,CAAAA,QAAW,CAASD,CAAT,CAAeE,CAAf,CAAuBC,CAAvB,CAAiC,CAC5C,GAAIJ,CAAG,CAACC,CAAD,CAAP,CAAe,CACXJ,CAAY,CAACQ,SAAb,CAAuB,CAACC,OAAO,CAAE,mBAAqBL,CAArB,CAA4B,yBAAtC,CAAvB,CACH,CAED,GAAI,CAACE,CAAD,EAA6B,UAAlB,QAAOA,CAAAA,CAAtB,CAA6C,CACzCN,CAAY,CAACQ,SAAb,CAAuB,CAACC,OAAO,CAAE,iCAAV,CAAvB,CACH,CAED,GAAI,CAACF,CAAL,CAAe,CACXP,CAAY,CAACQ,SAAb,CAAuB,CAACC,OAAO,CAAE,mCAAV,CAAvB,CACH,CAEDP,CAAQ,CAACE,CAAD,CAAR,CAAiB,CACbE,MAAM,CAAEA,CADK,CAEbC,QAAQ,CAAEA,CAFG,CAAjB,CAMAN,CAAQ,CAACS,gBAAT,CAA0BH,CAA1B,CACH,CAEM,CAEHJ,GAAG,CAAEA,CAFF,CAIV,CAnDK,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 * A registry for the different types of modal.\n *\n * @module     core/modal_registry\n * @class      modal_registry\n * @package    core\n * @copyright  2016 Ryan Wyllie <ryan@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['core/notification', 'core/prefetch'], function(Notification, Prefetch) {\n\n    // A singleton registry for all modules to access. Allows types to be\n    // added at runtime.\n    var registry = {};\n\n    /**\n     * Get a registered type of modal.\n     *\n     * @method get\n     * @param {string} type The type of modal to get\n     * @return {object} The registered config for the modal\n     */\n    var get = function(type) {\n        return registry[type];\n    };\n\n    /**\n     * Register a modal with the registry.\n     *\n     * @method register\n     * @param {string} type The type of modal (must be unique)\n     * @param {function} module The modal module (must be a constructor function of type core/modal)\n     * @param {string} template The template name of the modal\n     */\n    var register = function(type, module, template) {\n        if (get(type)) {\n            Notification.exception({message: \"Modal of  type '\" + type + \"' is already registered\"});\n        }\n\n        if (!module || typeof module !== 'function') {\n            Notification.exception({message: \"You must provide a modal module\"});\n        }\n\n        if (!template) {\n            Notification.exception({message: \"You must provide a modal template\"});\n        }\n\n        registry[type] = {\n            module: module,\n            template: template,\n        };\n\n        // Prefetch the template.\n        Prefetch.prefetchTemplate(template);\n    };\n\n    return {\n        register: register,\n        get: get,\n    };\n});\n"],"file":"modal_registry.min.js"}