1 $(document).ready(function () {
2 $('#sessionDetailsTable').dataTable({
3 "sPaginationType": "full_numbers",
4 "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
8 "sSwfPath": "/static/swf/copy.csv.xls.swf",
9 "aButtons": ["copy", "csv"]
11 "initComplete": function() {
12 $('.overrideCert-icon').click(function() {
13 var mpsk = $(this).data('mpsk');
14 var msk = $(this).data('msk');
15 var creds = $(this).data('creds');
16 if (confirm('Are you sure you want to update the Poll Response to 100%? This action cannot be reversed. If the user logged in to the Webcast using a magic ticket, they are not eligible for a certificate.')) {
17 $.post("access/OverridePoll", { mpsk: mpsk, msk: msk, creds: creds }, function (data) {
19 alert("Certificate marked as Earned. You should now see the option to Send Certificate unless the user logged in to the Webcast using hte Magic Ticket.");
20 window.location.reload(true);
22 alert("Problem Overriding Poll Status. Please contact Customer Support. If the user logged in to the Webcast using a magic ticket, they are not eligible for a certificate.");
31 $('#sessionReportTable').dataTable({
32 "sPaginationType": "full_numbers",
33 "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
37 "sSwfPath": "/static/swf/copy.csv.xls.swf",
38 "aButtons": ["copy", "csv"]
43 $('#btnCloseUserSessions').click(function () {
44 var key = $(this).attr('meetingSessionKey');
46 url: "/static/services/engagement/service.asmx/CloseOpenUserSessions",
47 data: { meetingSessionKey: key },
50 success: function (data, textStatus, jqXhr) {
51 if ($(data).find('boolean').text() === "true") {
55 alert("Problem closing active user sessions.");
58 error: function (jqXhr, textStatus, errorThrown) {
59 alert("Request failed: " + textStatus);
65 $('#certificateReportTable').dataTable({
66 "sPaginationType": "full_numbers",
67 "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
71 "sSwfPath": "/static/swf/copy.csv.xls.swf",
72 "aButtons": ["copy", "csv"]
74 "initComplete": function() {
75 $('.sendCert-icon').click(function() {
76 var email = $(this).data('email');
77 var a = $(this).data('msco');
78 var b = $(this).data('pdate');
79 var c = $(this).data('ticket');
81 var emailBody = 'Thank you for attending our Live Webcast!'
82 + '\r\n' + '\r\n' + 'Please follow the link in this email to download your Certificate of Attendance. We recommend that you print a copy of the Certificate for your records.'
83 + '\r\n' + '\r\n' + 'To register for another CPE Inc. program from our wide selection of Live Webcasts, Self-Study Webcasts, Seminars and Conferences, please visit us online or call 1-800-544-1114.'
84 + '\r\n' + '\r\n' + 'http://api.cpeonlinewebcasts.com/Certificate?a=' + a + '&b=' + b + '&c=' + c;
85 emailBody = encodeURIComponent(emailBody);
86 var link = 'mailto:' + email
87 + '?subject=' + escape('Your Certificate of Attendance from CPE, Inc.')
88 + '&body=' + emailBody;
89 win = window.open(link);
90 setTimeout(function() { win.close() }, 500);