From 9e9e676b5432186b9b05031cccf00e924189243f Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Tue, 25 Mar 2014 15:35:50 -0400 Subject: [PATCH] CC-5709: Airtime Analyzer * Make the Recent Uplods file actions a bit clearer --- airtime_mvc/public/js/airtime/library/plupload.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/js/airtime/library/plupload.js b/airtime_mvc/public/js/airtime/library/plupload.js index 9e67f7ad2..71aff7336 100644 --- a/airtime_mvc/public/js/airtime/library/plupload.js +++ b/airtime_mvc/public/js/airtime/library/plupload.js @@ -67,8 +67,15 @@ $(document).ready(function() { }; self.renderFileActions = function ( data, type, full ) { - return 'Delete'; - }; + if (full.import_status == 0) { + return '' + $.i18n._('Delete from Library') + ''; + } else if (full.import_status == 1) { + //No actions for pending files + return $.i18n._('N/A'); + } else { //Failed downloads + return '' + $.i18n._('Clear') + ''; + } + }; $("#recent_uploads_table").on("click", "a.deleteFileAction", function () { //Grab the file object for the row that was clicked.