Your IP : 192.168.165.1


Current Path : C:/Users/Mahmood/Desktop/moodle/badges/amd/build/
Upload File :
Current File : C:/Users/Mahmood/Desktop/moodle/badges/amd/build/backpackactions.min.js

define ("core_badges/backpackactions",["exports","jquery","core_badges/selectors","core/str","core/pending","core/modal_factory","core/modal_events","core/config"],function(a,b,c,d,e,f,g,h){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=i(b);c=i(c);e=i(e);f=i(f);g=i(g);h=i(h);function i(a){return a&&a.__esModule?a:{default:a}}function j(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function k(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var h=a.apply(b,c);function f(a){j(h,d,e,f,g,"next",a)}function g(a){j(h,d,e,f,g,"throw",a)}f(void 0)})}}var l=function(){var a=new e.default,d=(0,b.default)(c.default.elements.main);m(d);a.resolve()};a.init=l;var m=function(a){a.on("click",c.default.actions.deletebackpack,function(){var a=k(regeneratorRuntime.mark(function a(c){var d,e;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:c.preventDefault();d=(0,b.default)(c.currentTarget);a.next=4;return n(d);case 4:e=a.sent;o(e,d);case 6:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}())},n=function(){var a=k(regeneratorRuntime.mark(function a(b){var e;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:e=b.closest(c.default.elements.backpackurl).attr("data-backpackurl");a.t0=f.default;a.next=4;return(0,d.get_string)("delexternalbackpack","core_badges");case 4:a.t1=a.sent;a.next=7;return(0,d.get_string)("delexternalbackpackconfirm","core_badges",e);case 7:a.t2=a.sent;a.t3=f.default.types.SAVE_CANCEL;a.t4={title:a.t1,body:a.t2,type:a.t3};return a.abrupt("return",a.t0.create.call(a.t0,a.t4));case 11:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}(),o=function(){var a=k(regeneratorRuntime.mark(function a(b,c){return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:a.t0=b;a.next=3;return(0,d.get_string)("delete","core");case 3:a.t1=a.sent;a.t0.setSaveButtonText.call(a.t0,a.t1);b.getRoot().on(g.default.save,function(){window.location.href=c.attr("href")+"&sesskey="+h.default.sesskey+"&confirm=1"});b.getRoot().on(g.default.hidden,function(){b.destroy()});b.show();case 8:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}()});
//# sourceMappingURL=backpackactions.min.js.map