SAAS-1030 - fix bug where editing multiple tracks saves wrong metadata
This commit is contained in:
parent
8c90fbe4eb
commit
4cf40d312a
2 changed files with 27 additions and 23 deletions
|
@ -484,15 +484,41 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (newTab === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
initFileMdEvents(newTab);
|
||||
initialEvents();
|
||||
}
|
||||
|
||||
function initFileMdEvents(newTab) {
|
||||
newTab.tab.on("click", function() {
|
||||
if (!$(this).hasClass('active')) {
|
||||
AIRTIME.showbuilder.switchTab(newTab.pane, newTab.tab);
|
||||
}
|
||||
});
|
||||
|
||||
newTab.wrapper.find(".md-cancel").on("click", function() {
|
||||
closeTab();
|
||||
});
|
||||
initialEvents();
|
||||
|
||||
newTab.wrapper.find(".md-save").on("click", function() {
|
||||
var file_id = newTab.wrapper.find('#file_id').val(),
|
||||
data = newTab.wrapper.find("#edit-md-dialog form").serializeArray();
|
||||
$.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function() {
|
||||
// don't redraw the library table if we are on calendar page
|
||||
// we would be on calendar if viewing recorded file metadata
|
||||
if ($("#schedule_calendar").length === 0) {
|
||||
oTable.fnStandingRedraw();
|
||||
}
|
||||
});
|
||||
|
||||
AIRTIME.playlist.closeTab();
|
||||
});
|
||||
|
||||
newTab.wrapper.find('#edit-md-dialog').on("keyup", function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
newTab.wrapper.find('.md-save').click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function openPlaylist(json) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue