on-demand release 4.0dev+
[moodle.git] / contentbank / amd / build / upload.min.js
1 define ("core_contentbank/upload",["exports","core_form/modalform","core/str"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.initModal=void 0;b=function(a){return a&&a.__esModule?a:{default:a}}(b);a.initModal=function initModal(a,d,f,g){var h=document.querySelector(a);h.addEventListener("click",function(a){a.preventDefault();var e=new b.default({formClass:d,args:{contextid:f,id:g},modalConfig:{title:(0,c.get_string)("upload","contentbank")},returnFocus:a.target});e.addEventListener(e.events.FORM_SUBMITTED,function(a){document.location=a.detail.returnurl});e.show()})}});
2 //# sourceMappingURL=upload.min.js.map