update signutare
[CPE_learningsite] / CPE / CPE.App / CPE.App.Web / static / js / rebroadcast / recordinglogin.js
1 var recordingCheckTimer;
2
3 $('document').ready(function () {
4     if ($('#rebroadcast-loginbox').hasClass('hidden')) {
5         recordingCheckTimer = setInterval("checkForActiveRebroadcast()", 30000);
6     }
7
8     $('#btnSubmit').click(function () {
9         $(this).hide();
10         $('form').submit();
11     });
12 });
13
14 function checkForActiveRebroadcast() {
15     $.ajax({
16         url: "/rebroadcast/RebroadcastActive/" + $('#meetingUrl').val(),
17         contentType: "application/x-www-form-urlencoded; charset=UTF-8",
18         dataType: "json",
19         type: "GET",
20         cache: false,
21         success: function(result, textStatus, jqXhr) {
22             if (result == true ) {
23                 $('#rebroadcast-loginbox').removeClass('hidden');
24             }
25         },
26         error: function(jqXhr, textStatus, errorThrown) {
27             alert("Request failed: " + textStatus);
28
29         }
30     });
31 }