forked from External/greenlight
		
	open recordings in new tab and hide from viewers when unpublished
This commit is contained in:
		@@ -7,17 +7,20 @@
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      received: function(data) {
 | 
			
		||||
        var table = $("#recordings").DataTable();
 | 
			
		||||
        var recordings = Recordings.getInstance();
 | 
			
		||||
        var table = recordings.table.api()
 | 
			
		||||
        var row = table.row("#"+data.record_id);
 | 
			
		||||
        if (data.action === 'update') {
 | 
			
		||||
          var rowData = row.data();
 | 
			
		||||
          rowData.published = data.published
 | 
			
		||||
          table.row("#"+data.record_id).data(rowData).draw();
 | 
			
		||||
          table.row("#"+data.record_id).data(rowData);
 | 
			
		||||
          recordings.draw();
 | 
			
		||||
 | 
			
		||||
          var published = (data.published) ? 'published' : 'unpublished';
 | 
			
		||||
          showAlert(I18n['recording_'+published], 4000);
 | 
			
		||||
        } else if (data.action === 'delete') {
 | 
			
		||||
          row.remove().draw();
 | 
			
		||||
          row.remove();
 | 
			
		||||
          recordings.draw();
 | 
			
		||||
 | 
			
		||||
          showAlert(I18n.recording_deleted, 4000);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user