diff --git a/amd/build/invite_manager.min.js b/amd/build/invite_manager.min.js index a1b95e9..3126c3f 100644 --- a/amd/build/invite_manager.min.js +++ b/amd/build/invite_manager.min.js @@ -1 +1 @@ -define(["core/str","core/notification","core/url","jquery"],function(a,b,c,d){var e=function(a){var b=d(".block_evasys_participants");b.each(function(){this.innerHTML=a})},f=function(f){var g=new XMLHttpRequest;g.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var c=this.responseText.split("#");"success inviting"===c[0]?(e(c[1]),a.get_strings([{key:"title_success",component:"block_evasys_sync"},{key:"content_success_invite",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])})):"success"===c[0]?a.get_strings([{key:"title_success",component:"block_evasys_sync"},{key:"content_success_direct",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):"Start after end"===c[0]?a.get_strings([{key:"title_date_invalid",component:"block_evasys_sync"},{key:"content_start_after_end",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):"End in the past"===c[0]?a.get_strings([{key:"title_date_invalid",component:"block_evasys_sync"},{key:"content_invalidend",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):"wrong mode"===c[0]?a.get_strings([{key:"title_wrong_mode",component:"block_evasys_sync"},{key:"content_wrong_mode",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):a.get_string("send_error","block_evasys_sync").done(function(a){b.alert("Error",a,"OK")})}else 4===this.readyState&&a.get_string("send_error","block_evasys_sync").done(function(a){b.alert("Error",a,"OK")});4===this.readyState&&d("#evasys_block_form").find(":input[type=submit]").prop("disabled",!1)};var h=c.relativeUrl("/blocks/evasys_sync/invite.php",f,!0);b.alert(h.valueOf()),g.open("GET",h),g.send()},g=function(){d("#evasys_block_form").submit(function(a){a.preventDefault(),d("#evasyssubmitbutton").prop("disabled",!0);var b={};d("#evasys_block_form").serializeArray().forEach(function(a){b[a.name]=a.value}),f(b)}),d("#direct_invite").length>0&&a.get_strings([{key:"planorstartevaluation",component:"block_evasys_sync"},{key:"startevaluationnow",component:"block_evasys_sync"}]).done(function(a){d("#direct_invite").change(function(){this.checked?d("#evasyssubmitbutton").val(a[1]):d("#evasyssubmitbutton").val(a[0])})})};return{init:g}}); \ No newline at end of file +define(["core/str","core/notification","core/url","jquery"],function(a,b,c,d){var e=function(a){var b=d(".block_evasys_participants");b.each(function(){this.innerHTML=a})},f=function(f){var g=new XMLHttpRequest;g.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var c=this.responseText.split("#");"success inviting"===c[0]?(e(c[1]),a.get_strings([{key:"title_success",component:"block_evasys_sync"},{key:"content_success_invite",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])})):"success"===c[0]?a.get_strings([{key:"title_success",component:"block_evasys_sync"},{key:"content_success_direct",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):"Start after end"===c[0]?a.get_strings([{key:"title_date_invalid",component:"block_evasys_sync"},{key:"content_start_after_end",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):"End in the past"===c[0]?a.get_strings([{key:"title_date_invalid",component:"block_evasys_sync"},{key:"content_invalidend",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):"wrong mode"===c[0]?a.get_strings([{key:"title_wrong_mode",component:"block_evasys_sync"},{key:"content_wrong_mode",component:"block_evasys_sync"},{key:"ok"}]).done(function(a){b.alert(a[0],a[1],a[2])}):a.get_string("send_error","block_evasys_sync").done(function(a){b.alert("Error",a,"OK")})}else 4===this.readyState&&a.get_string("send_error","block_evasys_sync").done(function(a){b.alert("Error",a,"OK")});4===this.readyState&&d("#evasys_block_form").find(":input[type=submit]").prop("disabled",!1)};var h=c.relativeUrl("/blocks/evasys_sync/invite.php",f,!0);g.open("GET",h),g.send()},g=function(){d("#evasys_block_form").submit(function(a){a.preventDefault(),d("#evasyssubmitbutton").prop("disabled",!0);var b={};d("#evasys_block_form").serializeArray().forEach(function(a){b[a.name]=a.value}),f(b)}),d("#direct_invite").length>0&&a.get_strings([{key:"planorstartevaluation",component:"block_evasys_sync"},{key:"startevaluationnow",component:"block_evasys_sync"}]).done(function(a){d("#direct_invite").change(function(){this.checked?d("#evasyssubmitbutton").val(a[1]):d("#evasyssubmitbutton").val(a[0])})})};return{init:g}}); \ No newline at end of file