Current Path : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/ |
Current File : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/parentcompetency_form.min.js |
define ("tool_lp/parentcompetency_form",["jquery","core/ajax","core/str","tool_lp/competencypicker","core/templates","core/notification"],function(a,b,c,d,e,f){var g=function(a,b,c,d,e){this.buttonSelector=a;this.inputHiddenSelector=b;this.staticElementSelector=c;this.frameworkId=d;this.pageContextId=e;this.registerEvents()};g.prototype.buttonSelector=null;g.prototype.inputHiddenSelector=null;g.prototype.staticElementSelector=null;g.prototype.frameworkId=null;g.prototype.pageContextId=null;g.prototype.setParent=function(d){var e=this;if(0!==d.competencyId){b.call([{methodname:"core_competency_read_competency",args:{id:d.competencyId}}])[0].done(function(b){a(e.staticElementSelector).html(b.shortname);a(e.inputHiddenSelector).val(b.id)}).fail(f.exception)}else{c.get_string("competencyframeworkroot","tool_lp").then(function(b){a(e.staticElementSelector).html(b);a(e.inputHiddenSelector).val(d.competencyId)}).fail(f.exception)}};g.prototype.registerEvents=function(){var b=this;a(b.buttonSelector).on("click",function(a){a.preventDefault();var c=new d(b.pageContextId,b.frameworkId,"self",!1);c._render=function(){var a=this;return a._preRender().then(function(){var b={competencies:a._competencies,framework:a._getFramework(a._frameworkId),frameworks:a._frameworks,search:a._searchText,singleFramework:a._singleFramework};return e.render("tool_lp/competency_picker_competencyform",b)})};c.on("save",function(a,c){b.setParent(c)});c.display()})};return{init:function init(a,b,c,d,e){new g(a,b,c,d,e)}}}); //# sourceMappingURL=parentcompetency_form.min.js.map