Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/calendar/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/calendar/amd/build/calendar_mini.min.js.map

{"version":3,"sources":["../src/calendar_mini.js"],"names":["define","$","CalendarSelectors","CalendarEvents","CalendarViewManager","registerCalendarEventListeners","root","body","namespace","attr","on","created","reloadMonth","deleted","updated","eventMoved","e","data","is","reloadCurrentMonth","off","registerEventListeners","filterChanged","daysWithEvent","find","eventType","type","toggleClass","hidden","elements","courseSelector","selectElement","courseId","val","init","loadOnInit"],"mappings":"AA2BAA,OAAM,+BAAC,CACH,QADG,CAEH,yBAFG,CAGH,sBAHG,CAIH,4BAJG,CAAD,CAMN,SACIC,CADJ,CAEIC,CAFJ,CAGIC,CAHJ,CAIIC,CAJJ,CAKE,IAQMC,CAAAA,CAA8B,CAAG,SAASC,CAAT,CAAe,IAC5CC,CAAAA,CAAI,CAAGN,CAAC,CAAC,MAAD,CADoC,CAE5CO,CAAS,CAAG,IAAMF,CAAI,CAACG,IAAL,CAAU,IAAV,CAF0B,CAIhDF,CAAI,CAACG,EAAL,CAAQP,CAAc,CAACQ,OAAf,CAAyBH,CAAjC,CAA4CF,CAA5C,CAAkDM,CAAlD,EACAL,CAAI,CAACG,EAAL,CAAQP,CAAc,CAACU,OAAf,CAAyBL,CAAjC,CAA4CF,CAA5C,CAAkDM,CAAlD,EACAL,CAAI,CAACG,EAAL,CAAQP,CAAc,CAACW,OAAf,CAAyBN,CAAjC,CAA4CF,CAA5C,CAAkDM,CAAlD,EACAL,CAAI,CAACG,EAAL,CAAQP,CAAc,CAACY,UAAf,CAA4BP,CAApC,CAA+CF,CAA/C,CAAqDM,CAArD,CACH,CAhBH,CAuBMA,CAAW,CAAG,SAASI,CAAT,CAAY,IACtBV,CAAAA,CAAI,CAAGU,CAAC,CAACC,IADa,CAEtBV,CAAI,CAAGN,CAAC,CAAC,MAAD,CAFc,CAGtBO,CAAS,CAAG,IAAMF,CAAI,CAACG,IAAL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IAEjB,CACH,CAND,IAMO,CACH/B,CAAC,CAAC,MAAD,CAAD,CAAUmB,GAAV,CAAc,SAAWZ,CAAzB,CACH,CACJ,CAVD,CAYH,CA5DH,CA8DE,MAAO,CACH0B,IAAI,CAAE,cAAS5B,CAAT,CAAe6B,CAAf,CAA2B,CAC7B7B,CAAI,CAAGL,CAAC,CAACK,CAAD,CAAR,CAEAF,CAAmB,CAAC8B,IAApB,CAAyB5B,CAAzB,EACAe,CAAsB,CAACf,CAAD,CAAtB,CACAD,CAA8B,CAACC,CAAD,CAA9B,CAEA,GAAI6B,CAAJ,CAAgB,CAGZ/B,CAAmB,CAACe,kBAApB,CAAuCb,CAAvC,CACH,CAEJ,CAdE,CAgBV,CAzFK,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 * This module is the highest level module for the calendar. It is\n * responsible for initialising all of the components required for\n * the calendar to run. It also coordinates the interaction between\n * components by listening for and responding to different events\n * triggered within the calendar UI.\n *\n * @module     core_calendar/calendar_mini\n * @package    core_calendar\n * @copyright  2017 Andrew Nicols <andrew@nicols.co.uk>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([\n    'jquery',\n    'core_calendar/selectors',\n    'core_calendar/events',\n    'core_calendar/view_manager',\n],\nfunction(\n    $,\n    CalendarSelectors,\n    CalendarEvents,\n    CalendarViewManager\n) {\n\n    /**\n     * Listen to and handle any calendar events fired by the calendar UI.\n     *\n     * @method registerCalendarEventListeners\n     * @param {object} root The calendar root element\n     */\n    var registerCalendarEventListeners = function(root) {\n        var body = $('body');\n        var namespace = '.' + root.attr('id');\n\n        body.on(CalendarEvents.created + namespace, root, reloadMonth);\n        body.on(CalendarEvents.deleted + namespace, root, reloadMonth);\n        body.on(CalendarEvents.updated + namespace, root, reloadMonth);\n        body.on(CalendarEvents.eventMoved + namespace, root, reloadMonth);\n    };\n\n    /**\n     * Reload the month view in this month.\n     *\n     * @param {EventFacade} e\n     */\n    var reloadMonth = function(e) {\n        var root = e.data;\n        var body = $('body');\n        var namespace = '.' + root.attr('id');\n\n        if (root.is(':visible')) {\n            CalendarViewManager.reloadCurrentMonth(root);\n        } else {\n            // The root has been removed.\n            // Remove all events in the namespace.\n            body.off(CalendarEvents.created + namespace);\n            body.off(CalendarEvents.deleted + namespace);\n            body.off(CalendarEvents.updated + namespace);\n            body.off(CalendarEvents.eventMoved + namespace);\n        }\n    };\n\n    var registerEventListeners = function(root) {\n        $('body').on(CalendarEvents.filterChanged, function(e, data) {\n            var daysWithEvent = root.find(CalendarSelectors.eventType[data.type]);\n\n            daysWithEvent.toggleClass('calendar_event_' + data.type, !data.hidden);\n        });\n\n        var namespace = '.' + root.attr('id');\n        $('body').on('change' + namespace, CalendarSelectors.elements.courseSelector, function() {\n            if (root.is(':visible')) {\n                var selectElement = $(this);\n                var courseId = selectElement.val();\n                var categoryId = null;\n\n                CalendarViewManager.reloadCurrentMonth(root, courseId, categoryId);\n            } else {\n                $('body').off('change' + namespace);\n            }\n        });\n\n    };\n\n    return {\n        init: function(root, loadOnInit) {\n            root = $(root);\n\n            CalendarViewManager.init(root);\n            registerEventListeners(root);\n            registerCalendarEventListeners(root);\n\n            if (loadOnInit) {\n                // The calendar hasn't yet loaded it's events so we\n                // should load them as soon as we've initialised.\n                CalendarViewManager.reloadCurrentMonth(root);\n            }\n\n        }\n    };\n});\n"],"file":"calendar_mini.min.js"}