Your IP : 216.73.216.95


Current Path : /var/www/ljmtc/cbt/blocks/timeline/amd/build/
Upload File :
Current File : /var/www/ljmtc/cbt/blocks/timeline/amd/build/view.min.js.map

{"version":3,"sources":["../src/view.js"],"names":["define","$","ViewDates","ViewCourses","SELECTORS","TIMELINE_DATES_VIEW","TIMELINE_COURSES_VIEW","init","root","datesViewRoot","find","coursesViewRoot","reset","shown","hasClass"],"mappings":"AAuBAA,OAAM,uBACN,CACI,QADJ,CAEI,2BAFJ,CAGI,6BAHJ,CADM,CAMN,SACIC,CADJ,CAEIC,CAFJ,CAGIC,CAHJ,CAIE,IAEMC,CAAAA,CAAS,CAAG,CACZC,mBAAmB,CAAE,8BADT,CAEZC,qBAAqB,CAAE,gCAFX,CAFlB,CA0DE,MAAO,CACHC,IAAI,CA7CG,QAAPA,CAAAA,IAAO,CAASC,CAAT,CAAe,CACtBA,CAAI,CAAGP,CAAC,CAACO,CAAD,CAAR,CADsB,GAElBC,CAAAA,CAAa,CAAGD,CAAI,CAACE,IAAL,CAAUN,CAAS,CAACC,mBAApB,CAFE,CAGlBM,CAAe,CAAGH,CAAI,CAACE,IAAL,CAAUN,CAAS,CAACE,qBAApB,CAHA,CAKtBJ,CAAS,CAACK,IAAV,CAAeE,CAAf,EACAN,CAAW,CAACI,IAAZ,CAAiBI,CAAjB,CACH,CAqCM,CAEHC,KAAK,CA5BG,QAARA,CAAAA,KAAQ,CAASJ,CAAT,CAAe,IACnBC,CAAAA,CAAa,CAAGD,CAAI,CAACE,IAAL,CAAUN,CAAS,CAACC,mBAApB,CADG,CAEnBM,CAAe,CAAGH,CAAI,CAACE,IAAL,CAAUN,CAAS,CAACE,qBAApB,CAFC,CAGvBJ,CAAS,CAACU,KAAV,CAAgBH,CAAhB,EACAN,CAAW,CAACS,KAAZ,CAAkBD,CAAlB,CACH,CAqBM,CAGHE,KAAK,CAdG,QAARA,CAAAA,KAAQ,CAASL,CAAT,CAAe,IACnBC,CAAAA,CAAa,CAAGD,CAAI,CAACE,IAAL,CAAUN,CAAS,CAACC,mBAApB,CADG,CAEnBM,CAAe,CAAGH,CAAI,CAACE,IAAL,CAAUN,CAAS,CAACE,qBAApB,CAFC,CAIvB,GAAIG,CAAa,CAACK,QAAd,CAAuB,QAAvB,CAAJ,CAAsC,CAClCZ,CAAS,CAACW,KAAV,CAAgBJ,CAAhB,CACH,CAFD,IAEO,CACHN,CAAW,CAACU,KAAZ,CAAkBF,CAAlB,CACH,CACJ,CAEM,CAKV,CAzEK,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 * Manage the timeline view for the timeline block.\n *\n * @package    block_timeline\n * @copyright  2018 Ryan Wyllie <ryan@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(\n[\n    'jquery',\n    'block_timeline/view_dates',\n    'block_timeline/view_courses',\n],\nfunction(\n    $,\n    ViewDates,\n    ViewCourses\n) {\n\n    var SELECTORS = {\n        TIMELINE_DATES_VIEW: '[data-region=\"view-dates\"]',\n        TIMELINE_COURSES_VIEW: '[data-region=\"view-courses\"]',\n    };\n\n    /**\n     * Intialise the timeline dates and courses views on page load.\n     * This function should only be called once per page load because\n     * it can cause event listeners to be added to the page.\n     *\n     * @param {object} root The root element for the timeline view.\n     */\n    var init = function(root) {\n        root = $(root);\n        var datesViewRoot = root.find(SELECTORS.TIMELINE_DATES_VIEW);\n        var coursesViewRoot = root.find(SELECTORS.TIMELINE_COURSES_VIEW);\n\n        ViewDates.init(datesViewRoot);\n        ViewCourses.init(coursesViewRoot);\n    };\n\n    /**\n     * Reset the timeline dates and courses views to their original\n     * state on first page load.\n     *\n     * This is called when configuration has changed for the event lists\n     * to cause them to reload their data.\n     *\n     * @param {object} root The root element for the timeline view.\n     */\n    var reset = function(root) {\n        var datesViewRoot = root.find(SELECTORS.TIMELINE_DATES_VIEW);\n        var coursesViewRoot = root.find(SELECTORS.TIMELINE_COURSES_VIEW);\n        ViewDates.reset(datesViewRoot);\n        ViewCourses.reset(coursesViewRoot);\n    };\n\n    /**\n     * Tell the timeline dates or courses view that it has been displayed.\n     *\n     * This is called each time one of the views is displayed and is used to\n     * lazy load the data within it on first load.\n     *\n     * @param {object} root The root element for the timeline view.\n     */\n    var shown = function(root) {\n        var datesViewRoot = root.find(SELECTORS.TIMELINE_DATES_VIEW);\n        var coursesViewRoot = root.find(SELECTORS.TIMELINE_COURSES_VIEW);\n\n        if (datesViewRoot.hasClass('active')) {\n            ViewDates.shown(datesViewRoot);\n        } else {\n            ViewCourses.shown(coursesViewRoot);\n        }\n    };\n\n    return {\n        init: init,\n        reset: reset,\n        shown: shown,\n    };\n});\n"],"file":"view.min.js"}