From 1b4ae9bb83e285bb3004b9b25c8d44c23fb96d18 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 12 Nov 2015 10:26:57 -0500 Subject: [PATCH] Quick fix for bug on calendar --- airtime_mvc/public/js/airtime/library/library.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index 6efdab6d9..9297c8d3c 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -573,6 +573,8 @@ var AIRTIME = (function(AIRTIME) { ); } + var colExclude = onDashboard ? [0, 1, 2, 32] : [0, 1, 2]; + /* ############################################ DATATABLES ############################################ */ @@ -749,7 +751,7 @@ var AIRTIME = (function(AIRTIME) { "oColVis": { "sAlign": "right", - "aiExclude": [0, 1, 2, 32], + "aiExclude": colExclude, "sSize": "css", "fnStateChange": setFilterElement, "buttonText": $.i18n._("Columns"), @@ -1484,6 +1486,12 @@ var AIRTIME = (function(AIRTIME) { click: function () { var data = [], episodes = mod.podcastEpisodeTableWidget.getSelectedRows(); $.each(episodes, function () { + // If the file exists but the ftype is empty, the file hasn't finished being + // analyzed. This forces the deletion, but causes the analyzer to throw an error... + // I'm opting for more consistent behaviour (if it looks like a file is imported, + // the user should be able to delete it, rather than it seeming like the delete + // button did nothing), but maybe the answer is to add an additional state that + // checks if the file is finished being analyzed? -- Duncan FIXME if (this.file.ftype === "") { this.file.ftype = "audioclip"; } data.push({id: this.file.id, type: this.file.ftype}); });