initial commit
[CPE_learningsite] / CPE / CPE.App / CPE.App.Web / static / js / rebroadcast / rebroadcastSessions.js
1 $(document).ready(function () {
2     $('#rebroadcastSessionsTable').dataTable({
3         "sPaginationType": "full_numbers",
4         "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
5         "iDisplayLength": -1,
6         "sDom": 'Tfrtlip',
7         "oTableTools": {
8             "sSwfPath": "/static/swf/copy.csv.xls.swf",
9             "aButtons": ["copy", "csv"]
10         }
11     });
12
13     $('a.delete_link').click(function () {
14         var recordingSessionKey = $(this).attr('recordingkey');
15         $.ajax({
16             url: "/rebroadcast/DeleteRecording/" + recordingSessionKey,
17             contentType: "application/x-www-form-urlencoded; charset=UTF-8",
18             dataType: "json",
19             type: "GET",
20             cache: false,
21             success: function (data, textStatus, jqXhr) {
22                 if (data == true) {
23                     location.reload();
24                 }
25
26             },
27             error: function (jqXhr, textStatus, errorThrown) {
28                 alert("Problem deleting recording: " + textStatus);
29             }
30         });
31     });
32 });