only allow room owner to perform recording actions

This commit is contained in:
Zachary Chai
2016-11-01 12:03:00 -04:00
parent e400bf41e8
commit 15411d76fa
5 changed files with 23 additions and 16 deletions

View File

@ -7,11 +7,10 @@
},
{
received: function(data) {
var btn = $("#recordings").find(".recording-update:disabled");
btn.data('published', data.published);
btn.find('i').removeClass(getPublishClass(!data.published));
btn.find('i').addClass(getPublishClass(data.published));
btn.prop("disabled", false);
var table = $("#recordings").DataTable();
var rowData = table.row("#"+data.record_id).data();
rowData.published = data.published
table.row("#"+data.record_id).data(rowData).draw();
}
});
};