Skip to content
Snippets Groups Projects
Commit 01829e2a authored by Laur0r's avatar Laur0r
Browse files

Update minified js-Scripts for 3.11.5+

parent 834951dc
No related branches found
No related tags found
No related merge requests found
define ("tool_lifecycle/tablebulkactions",["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=function(){var a=document.querySelectorAll("input[name=\"procerror-select\"]"),b=document.querySelectorAll("*[data-lifecycle-action]");b.forEach(function(b){b.onclick=function(c){c.preventDefault();var d=[{k:"action",v:b.getAttribute("data-lifecycle-action")},{k:"sesskey",v:M.cfg.sesskey}];if("1"===b.getAttribute("data-lifecycle-forall")){d.push({k:"all",v:"1"});e(window.location,d)}else{a.forEach(function(a){if(a.checked){d.push({k:"id[]",v:a.value})}});e(window.location,d)}}})};function b(a){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=c(a))){var b=0,d=function(){};return{s:d,n:function n(){if(b>=a.length)return{done:!0};return{done:!1,value:a[b++]}},e:function e(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f=!0,g=!1,h;return{s:function s(){e=a[Symbol.iterator]()},n:function n(){var a=e.next();f=a.done;return a},e:function e(a){g=!0;h=a},f:function f(){try{if(!f&&null!=e.return)e.return()}finally{if(g)throw h}}}}function c(a,b){if(!a)return;if("string"==typeof a)return d(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor)c=a.constructor.name;if("Map"===c||"Set"===c)return Array.from(c);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return d(a,b)}function d(a,b){if(null==b||b>a.length)b=a.length;for(var c=0,d=Array(b);c<b;c++){d[c]=a[c]}return d}function e(a,c){var d=document.createElement("form");document.body.appendChild(d);d.method="post";d.action=a;var e=b(c),f;try{for(e.s();!(f=e.n()).done;){var g=f.value,h=document.createElement("input");h.type="hidden";h.name=g.k;h.value=g.v;d.appendChild(h)}}catch(a){e.e(a)}finally{e.f()}d.submit()}});
define("tool_lifecycle/tablebulkactions",["exports"],(function(_exports){function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function(){it=it.call(o)},n:function(){var step=it.next();return normalCompletion=step.done,step},e:function(_e2){didErr=!0,err=_e2},f:function(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}
/**
* Javascript controller for checkboxed table.
* @module tool_lifecycle/tablebulkactions
* @copyright 2021 Justus Dieckmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/function redirectPost(url,data){var form=document.createElement("form");document.body.appendChild(form),form.method="post",form.action=url;var _step,_iterator=_createForOfIteratorHelper(data);try{for(_iterator.s();!(_step=_iterator.n()).done;){var pair=_step.value,input=document.createElement("input");input.type="hidden",input.name=pair.k,input.value=pair.v,form.appendChild(input)}}catch(err){_iterator.e(err)}finally{_iterator.f()}form.submit()}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=function(){var checkboxes=document.querySelectorAll('input[name="procerror-select"]');document.querySelectorAll("*[data-lifecycle-action]").forEach((function(a){a.onclick=function(e){e.preventDefault();var data=[{k:"action",v:a.getAttribute("data-lifecycle-action")},{k:"sesskey",v:M.cfg.sesskey}];"1"===a.getAttribute("data-lifecycle-forall")?(data.push({k:"all",v:"1"}),redirectPost(window.location,data)):(checkboxes.forEach((function(c){c.checked&&data.push({k:"id[]",v:c.value})})),redirectPost(window.location,data))}}))}}));
//# sourceMappingURL=tablebulkactions.min.js.map
\ No newline at end of file
{"version":3,"sources":["../src/tablebulkactions.js"],"names":["checkboxes","document","querySelectorAll","action","forEach","a","onclick","e","preventDefault","data","k","v","getAttribute","M","cfg","sesskey","push","redirectPost","window","location","c","checked","value","url","form","createElement","body","appendChild","method","pair","input","type","name","submit"],"mappings":"uIA6CO,UAAgB,IACbA,CAAAA,CAAU,CAAGC,QAAQ,CAACC,gBAAT,CAA0B,kCAA1B,CADA,CAGbC,CAAM,CAAGF,QAAQ,CAACC,gBAAT,CAA0B,0BAA1B,CAHI,CAInBC,CAAM,CAACC,OAAP,CAAe,SAACC,CAAD,CAAO,CAClBA,CAAC,CAACC,OAAF,CAAY,SAACC,CAAD,CAAO,CACfA,CAAC,CAACC,cAAF,GACA,GAAIC,CAAAA,CAAI,CAAG,CACP,CAACC,CAAC,CAAE,QAAJ,CAAcC,CAAC,CAAEN,CAAC,CAACO,YAAF,CAAe,uBAAf,CAAjB,CADO,CAEP,CAACF,CAAC,CAAE,SAAJ,CAAeC,CAAC,CAAEE,CAAC,CAACC,GAAF,CAAMC,OAAxB,CAFO,CAAX,CAIA,GAAgD,GAA5C,GAAAV,CAAC,CAACO,YAAF,CAAe,uBAAf,CAAJ,CAAqD,CACjDH,CAAI,CAACO,IAAL,CAAU,CAACN,CAAC,CAAE,KAAJ,CAAWC,CAAC,CAAE,GAAd,CAAV,EACAM,CAAY,CAACC,MAAM,CAACC,QAAR,CAAkBV,CAAlB,CACf,CAHD,IAGQ,CACJT,CAAU,CAACI,OAAX,CAAmB,SAACgB,CAAD,CAAO,CACtB,GAAIA,CAAC,CAACC,OAAN,CAAe,CACXZ,CAAI,CAACO,IAAL,CAAU,CAACN,CAAC,CAAE,MAAJ,CAAYC,CAAC,CAAES,CAAC,CAACE,KAAjB,CAAV,CACH,CACJ,CAJD,EAKAL,CAAY,CAACC,MAAM,CAACC,QAAR,CAAkBV,CAAlB,CACf,CACJ,CACJ,CAnBD,CAoBH,C,u/BA1CD,QAASQ,CAAAA,CAAT,CAAsBM,CAAtB,CAA2Bd,CAA3B,CAAiC,CAC7B,GAAMe,CAAAA,CAAI,CAAGvB,QAAQ,CAACwB,aAAT,CAAuB,MAAvB,CAAb,CACAxB,QAAQ,CAACyB,IAAT,CAAcC,WAAd,CAA0BH,CAA1B,EACAA,CAAI,CAACI,MAAL,CAAc,MAAd,CACAJ,CAAI,CAACrB,MAAL,CAAcoB,CAAd,CAJ6B,QAKVd,CALU,QAK7B,2BAAyB,IAAdoB,CAAAA,CAAc,SACfC,CAAK,CAAG7B,QAAQ,CAACwB,aAAT,CAAuB,OAAvB,CADO,CAErBK,CAAK,CAACC,IAAN,CAAa,QAAb,CACAD,CAAK,CAACE,IAAN,CAAaH,CAAI,CAACnB,CAAlB,CACAoB,CAAK,CAACR,KAAN,CAAcO,CAAI,CAAClB,CAAnB,CACAa,CAAI,CAACG,WAAL,CAAiBG,CAAjB,CACH,CAX4B,+BAY7BN,CAAI,CAACS,MAAL,EACH,C","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 * Javascript controller for checkboxed table.\n * @module tool_lifecycle/tablebulkactions\n * @copyright 2021 Justus Dieckmann WWU\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Helper function to redirect via POST\n * @param {String} url redirect to\n * @param {Array} data redirect with data\n */\nfunction redirectPost(url, data) {\n const form = document.createElement('form');\n document.body.appendChild(form);\n form.method = 'post';\n form.action = url;\n for (const pair of data) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = pair.k;\n input.value = pair.v;\n form.appendChild(input);\n }\n form.submit();\n}\n\n/**\n * Init function\n */\nexport function init() {\n const checkboxes = document.querySelectorAll('input[name=\"procerror-select\"]');\n\n const action = document.querySelectorAll('*[data-lifecycle-action]');\n action.forEach((a) => {\n a.onclick = (e) => {\n e.preventDefault();\n let data = [\n {k: 'action', v: a.getAttribute('data-lifecycle-action')},\n {k: 'sesskey', v: M.cfg.sesskey}\n ];\n if (a.getAttribute('data-lifecycle-forall') === '1') {\n data.push({k: 'all', v: '1'});\n redirectPost(window.location, data);\n } else {\n checkboxes.forEach((c) => {\n if (c.checked) {\n data.push({k: 'id[]', v: c.value});\n }\n });\n redirectPost(window.location, data);\n }\n };\n });\n}"],"file":"tablebulkactions.min.js"}
\ No newline at end of file
{"version":3,"file":"tablebulkactions.min.js","sources":["../src/tablebulkactions.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 * Javascript controller for checkboxed table.\n * @module tool_lifecycle/tablebulkactions\n * @copyright 2021 Justus Dieckmann WWU\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Helper function to redirect via POST\n * @param {String} url redirect to\n * @param {Array} data redirect with data\n */\nfunction redirectPost(url, data) {\n const form = document.createElement('form');\n document.body.appendChild(form);\n form.method = 'post';\n form.action = url;\n for (const pair of data) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = pair.k;\n input.value = pair.v;\n form.appendChild(input);\n }\n form.submit();\n}\n\n/**\n * Init function\n */\nexport function init() {\n const checkboxes = document.querySelectorAll('input[name=\"procerror-select\"]');\n\n const action = document.querySelectorAll('*[data-lifecycle-action]');\n action.forEach((a) => {\n a.onclick = (e) => {\n e.preventDefault();\n let data = [\n {k: 'action', v: a.getAttribute('data-lifecycle-action')},\n {k: 'sesskey', v: M.cfg.sesskey}\n ];\n if (a.getAttribute('data-lifecycle-forall') === '1') {\n data.push({k: 'all', v: '1'});\n redirectPost(window.location, data);\n } else {\n checkboxes.forEach((c) => {\n if (c.checked) {\n data.push({k: 'id[]', v: c.value});\n }\n });\n redirectPost(window.location, data);\n }\n };\n });\n}"],"names":["redirectPost","url","data","form","document","createElement","body","appendChild","method","action","pair","input","type","name","k","value","v","submit","checkboxes","querySelectorAll","forEach","a","onclick","e","preventDefault","getAttribute","M","cfg","sesskey","push","window","location","c","checked"],"mappings":";;;;;;cA2BSA,aAAaC,IAAKC,UACjBC,KAAOC,SAASC,cAAc,QACpCD,SAASE,KAAKC,YAAYJ,MAC1BA,KAAKK,OAAS,OACdL,KAAKM,OAASR,mDACKC,yDAAM,KAAdQ,iBACDC,MAAQP,SAASC,cAAc,SACrCM,MAAMC,KAAO,SACbD,MAAME,KAAOH,KAAKI,EAClBH,MAAMI,MAAQL,KAAKM,EACnBb,KAAKI,YAAYI,0DAErBR,KAAKc,8FAOCC,WAAad,SAASe,iBAAiB,kCAE9Bf,SAASe,iBAAiB,4BAClCC,SAAQ,SAACC,GACZA,EAAEC,QAAU,SAACC,GACTA,EAAEC,qBACEtB,KAAO,CACP,CAACY,EAAG,SAAUE,EAAGK,EAAEI,aAAa,0BAChC,CAACX,EAAG,UAAWE,EAAGU,EAAEC,IAAIC,UAEoB,MAA5CP,EAAEI,aAAa,0BACfvB,KAAK2B,KAAK,CAACf,EAAG,MAAOE,EAAG,MACxBhB,aAAa8B,OAAOC,SAAU7B,QAE9BgB,WAAWE,SAAQ,SAACY,GACZA,EAAEC,SACF/B,KAAK2B,KAAK,CAACf,EAAG,OAAQE,EAAGgB,EAAEjB,WAGnCf,aAAa8B,OAAOC,SAAU7B"}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment