mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00

This includes: * Move all JS modules from lib/amd to admin/tool/lp/amd * Add all jsdocs * fix all jshint warnings * Rewrite the actionmenu wrapper to a real amd module
1 line
No EOL
916 B
JavaScript
1 line
No EOL
916 B
JavaScript
define(["jquery","core/templates","core/ajax","core/notification","core/str"],function(a,b,c,d,e){var f=0,g=function(c,d){a('[data-region="managetemplates"]').replaceWith(c),b.runTemplateJS(d)},h=function(a){b.render("tool_lp/manage_templates_page",a).done(g).fail(d.exception)},i=function(){var a=c.call([{methodname:"tool_lp_delete_template",args:{id:f}},{methodname:"tool_lp_data_for_templates_manage_page",args:[]}]);a[1].done(h).fail(d.exception)},j=function(b){b.preventDefault();var g=a(this).attr("data-templateid");f=g;var h=c.call([{methodname:"tool_lp_read_template",args:{id:f}}]);h[0].done(function(a){e.get_strings([{key:"confirm",component:"tool_lp"},{key:"deletetemplate",component:"tool_lp",param:a.shortname},{key:"delete",component:"tool_lp"},{key:"cancel",component:"tool_lp"}]).done(function(a){d.confirm(a[0],a[1],a[2],a[3],i)}).fail(d.exception)}).fail(d.exception)};return{deleteHandler:j}}); |