SAAS-1030 - fix bug where editing multiple tracks saves wrong metadata
This commit is contained in:
parent
8c90fbe4eb
commit
4cf40d312a
|
@ -1328,28 +1328,6 @@ var validationTypes = {
|
|||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.active-tab .md-save').live("click", function() {
|
||||
var file_id = $('#file_id').val(),
|
||||
data = $(".active-tab #edit-md-dialog form").serializeArray();
|
||||
$.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function() {
|
||||
//$("#edit-md-dialog").dialog().remove();
|
||||
|
||||
// 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();
|
||||
});
|
||||
|
||||
$('#edit-md-dialog').live("keyup", function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
$('#editmdsave').click();
|
||||
}
|
||||
});
|
||||
|
||||
$("#advanced-options").on("click", function() {
|
||||
resizeAdvancedSearch();
|
||||
});
|
||||
|
|
|
@ -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…
Reference in New Issue