%PDF- %PDF-
Direktori : /home/vacivi36/ava/lib/amd/build/ |
Current File : /home/vacivi36/ava/lib/amd/build/pending.min.js.map |
{"version":3,"file":"pending.min.js","sources":["../src/pending.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 * A helper to manage pendingJS checks.\n *\n * @module core/pending\n * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 3.6\n */\ndefine(['jquery'], function($) {\n\n /**\n * Request a new pendingPromise to be resolved.\n *\n * When the action you are performing is complete, simply call resolve on the returned Promise.\n *\n * @param {Object} pendingKey An optional key value to use\n * @return {Promise}\n */\n var request = function(pendingKey) {\n var pendingPromise = $.Deferred();\n\n pendingKey = pendingKey || {};\n M.util.js_pending(pendingKey);\n\n pendingPromise.then(function() {\n return M.util.js_complete(pendingKey);\n })\n .catch();\n\n return pendingPromise;\n };\n\n request.prototype.constructor = request;\n\n return request;\n});\n"],"names":["define","$","request","pendingKey","pendingPromise","Deferred","M","util","js_pending","then","js_complete","catch","prototype","constructor"],"mappings":";;;;;;;;AAuBAA,sBAAO,CAAC,WAAW,SAASC,OAUpBC,QAAU,SAASC,gBACfC,eAAiBH,EAAEI,kBAEvBF,WAAaA,YAAc,GAC3BG,EAAEC,KAAKC,WAAWL,YAElBC,eAAeK,MAAK,kBACTH,EAAEC,KAAKG,YAAYP,eAE7BQ,QAEMP,uBAGXF,QAAQU,UAAUC,YAAcX,QAEzBA"}