moodle_local_treestudyplan/amd/build/cfg-grades.min.js
2023-08-19 17:54:40 +02:00

3 lines
2.7 KiB
JavaScript

define("local_treestudyplan/cfg-grades",["exports","core/str","core/ajax","./debugger","./string-helper"],(function(_exports,_str,_ajax,_debugger,_stringHelper){var obj;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}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=function(){var _step,intRx=/\d/,integerChange=function(event){event.key.length>1||intRx.test(event.key)||event.preventDefault()},_iterator=_createForOfIteratorHelper(document.querySelectorAll('input[type="number"][step="1"][min="0"]'));try{for(_iterator.s();!(_step=_iterator.n()).done;){_step.value.addEventListener("keydown",integerChange)}}catch(err){_iterator.e(err)}finally{_iterator.f()}var _step2,decimal=/^[0-9]*?\.[0-9]*?$/,_intRx=/\d/,floatChange=function(event){event.key.length>1||"."===event.key&&!event.currentTarget.value.match(decimal)||_intRx.test(event.key)||event.preventDefault()},_iterator2=_createForOfIteratorHelper(document.querySelectorAll('input[type="number"][min="0"]:not([step])'));try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){_step2.value.addEventListener("keydown",floatChange)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}var _step3,_iterator3=_createForOfIteratorHelper(document.querySelectorAll('input[type="text"].float'));try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){_step3.value.addEventListener("keydown",floatChange)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}};new(_debugger=(obj=_debugger)&&obj.__esModule?obj:{default:obj}).default("treestudyplan-config-grades")}));
//# sourceMappingURL=cfg-grades.min.js.map