Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{"version":3,"file":"site_admin_loader.min.js","sources":["../src/site_admin_loader.js"],"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 site admin nav tree via ajax and render the response.\n *\n * @module     block_navigation/site_admin_loader\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\n    var SITE_ADMIN_NODE_TYPE = 71;\n    var URL = config.wwwroot + '/lib/ajax/getsiteadminbranch.php';\n\n    return {\n        load: function(element) {\n            element = $(element);\n            var promise = $.Deferred();\n            var data = {\n                type: SITE_ADMIN_NODE_TYPE,\n                sesskey: config.sesskey\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"],"names":["define","$","ajax","config","renderer","URL","wwwroot","load","element","promise","Deferred","settings","type","dataType","data","sesskey","done","nodes","render","resolve"],"mappings":";;;;;;;AAsBAA,4CAAO,CAAC,SAAU,YAAa,cAAe,4CACtC,SAASC,EAAGC,KAAMC,OAAQC,cAG1BC,IAAMF,OAAOG,QAAU,yCAEpB,CACHC,KAAM,SAASC,SACXA,QAAUP,EAAEO,aACRC,QAAUR,EAAES,WAKZC,SAAW,CACXC,KAAM,OACNC,SAAU,OACVC,KAPO,CACPF,KARe,GASfG,QAASZ,OAAOY,iBAQpBd,EAAEC,KAAKG,IAAKM,UAAUK,MAAK,SAASC,OAChCb,SAASc,OAAOV,QAASS,OACzBR,QAAQU,aAGLV"}