Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/blocks/navigation/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/blocks/navigation/amd/build/nav_loader.min.js.map

{"version":3,"sources":["../src/nav_loader.js"],"names":["define","$","ajax","config","renderer","URL","wwwroot","getBlockInstanceId","element","closest","attr","load","promise","Deferred","data","elementid","id","type","sesskey","instance","dataType","done","nodes","render","resolve"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CAAW,WAAX,CAAwB,aAAxB,CAAuC,yCAAvC,CAAD,CACF,SAASC,CAAT,CAAYC,CAAZ,CAAkBC,CAAlB,CAA0BC,CAA1B,CAAoC,CAChC,GAAIC,CAAAA,CAAG,CAAGF,CAAM,CAACG,OAAP,CAAiB,4BAA3B,CASA,QAASC,CAAAA,CAAT,CAA4BC,CAA5B,CAAqC,CACjC,MAAOA,CAAAA,CAAO,CAACC,OAAR,CAAgB,cAAhB,EAAgCC,IAAhC,CAAqC,iBAArC,CACV,CAEL,MAAO,CACHC,IAAI,CAAE,cAASH,CAAT,CAAkB,CACpBA,CAAO,CAAGP,CAAC,CAACO,CAAD,CAAX,CADoB,GAEhBI,CAAAA,CAAO,CAAGX,CAAC,CAACY,QAAF,EAFM,CAGhBC,CAAI,CAAG,CACPC,SAAS,CAAEP,CAAO,CAACE,IAAR,CAAa,cAAb,CADJ,CAEPM,EAAE,CAAER,CAAO,CAACE,IAAR,CAAa,eAAb,CAFG,CAGPO,IAAI,CAAET,CAAO,CAACE,IAAR,CAAa,gBAAb,CAHC,CAIPQ,OAAO,CAAEf,CAAM,CAACe,OAJT,CAKPC,QAAQ,CAAEZ,CAAkB,CAACC,CAAD,CALrB,CAHS,CAgBpBP,CAAC,CAACC,IAAF,CAAOG,CAAP,CANe,CACXY,IAAI,CAAE,MADK,CAEXG,QAAQ,CAAE,MAFC,CAGXN,IAAI,CAAEA,CAHK,CAMf,EAAsBO,IAAtB,CAA2B,SAASC,CAAT,CAAgB,CACvClB,CAAQ,CAACmB,MAAT,CAAgBf,CAAhB,CAAyBc,CAAzB,EACAV,CAAO,CAACY,OAAR,EACH,CAHD,EAKA,MAAOZ,CAAAA,CACV,CAvBE,CAyBV,CAxCK,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 * Load the nav tree items via ajax and render the response.\n *\n * @module     block_navigation/nav_loader\n * @package    core\n * @copyright  2015 John Okely <john@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/ajax', 'core/config', 'block_navigation/ajax_response_renderer'],\n    function($, ajax, config, renderer) {\n        var URL = config.wwwroot + '/lib/ajax/getnavbranch.php';\n\n        /**\n         * Get the block instance id.\n         *\n         * @function getBlockInstanceId\n         * @param {Element} element\n         * @returns {String} the instance id\n         */\n        function getBlockInstanceId(element) {\n            return element.closest('[data-block]').attr('data-instanceid');\n        }\n\n    return {\n        load: function(element) {\n            element = $(element);\n            var promise = $.Deferred();\n            var data = {\n                elementid: element.attr('data-node-id'),\n                id: element.attr('data-node-key'),\n                type: element.attr('data-node-type'),\n                sesskey: config.sesskey,\n                instance: getBlockInstanceId(element)\n            };\n            var settings = {\n                type: 'POST',\n                dataType: 'json',\n                data: data\n            };\n\n            $.ajax(URL, settings).done(function(nodes) {\n                renderer.render(element, nodes);\n                promise.resolve();\n            });\n\n            return promise;\n        }\n    };\n});\n"],"file":"nav_loader.min.js"}