From 68523d9e0292671a24445c94fa9543a226fc2d2c Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Fri, 14 Aug 2015 20:20:30 -0400 Subject: [PATCH] Specialize the datatables string for playout history, users, and recent uploads tables --- .../public/js/airtime/library/plupload.js | 9 ++++++++- .../js/airtime/playouthistory/historytable.js | 16 ++++++++++++++-- airtime_mvc/public/js/airtime/user/user.js | 10 ++++++++-- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/public/js/airtime/library/plupload.js b/airtime_mvc/public/js/airtime/library/plupload.js index a9b20e3c5..2287860fb 100644 --- a/airtime_mvc/public/js/airtime/library/plupload.js +++ b/airtime_mvc/public/js/airtime/library/plupload.js @@ -175,7 +175,14 @@ $(document).ready(function() { "sDom": '<"H">frtip<"F"l>', "bPaginate" : true, "sPaginationType": "full_numbers", - "aoColumns": [ + "oLanguage": getDatatablesStrings({ + "sEmptyTable": $.i18n._("No files have been uploaded yet."), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 uploads"), + "sInfo": $.i18n._("Showing _START_ to _END_ of _TOTAL_ uploads"), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 uploads"), + "sInfoFiltered": $.i18n._("(filtered from _MAX_ total uploads)"), + }), + "aoColumns": [ { "mData" : "artist_name", "sTitle" : $.i18n._("Creator") }, { "mData" : "track_title", "sTitle" : $.i18n._("Title") }, { "mData" : "import_status", "sTitle" : $.i18n._("Import Status"), diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index e1f1f9cf9..ebe1e9f44 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -344,7 +344,13 @@ var AIRTIME = (function(AIRTIME) { "sAjaxDataProp": "history", "fnServerData": fnServerData, "fnRowCallback": fnRowCallback, - "oLanguage": datatables_dict, + "oLanguage": getDatatablesStrings({ + "sEmptyTable": $.i18n._("No tracks were played during the selected time period."), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 tracks"), + "sInfo": $.i18n._("Showing _START_ to _END_ of _TOTAL_ tracks"), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 tracks"), + "sInfoFiltered": $.i18n._("(filtered from _MAX_ total tracks)"), + }), "aLengthMenu": lengthMenu, "iDisplayLength": 25, "sPaginationType": "full_numbers", @@ -411,7 +417,13 @@ var AIRTIME = (function(AIRTIME) { "sAjaxDataProp": "history", "fnServerData": fnServerData, "fnRowCallback": fnRowCallback, - "oLanguage": datatables_dict, + "oLanguage": getDatatablesStrings({ + "sEmptyTable": $.i18n._("No tracks were played during the selected time period."), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 tracks"), + "sInfo": $.i18n._("Showing _START_ to _END_ of _TOTAL_ tracks"), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 tracks"), + "sInfoFiltered": $.i18n._("(filtered from _MAX_ total tracks)"), + }), "aLengthMenu": lengthMenu, "iDisplayLength": 25, "sPaginationType": "full_numbers", diff --git a/airtime_mvc/public/js/airtime/user/user.js b/airtime_mvc/public/js/airtime/user/user.js index ca8d2c953..a959e7840 100644 --- a/airtime_mvc/public/js/airtime/user/user.js +++ b/airtime_mvc/public/js/airtime/user/user.js @@ -104,8 +104,14 @@ function populateUserTable() { "bJQueryUI": true, "bAutoWidth": false, "bLengthChange": false, - "oLanguage": datatables_dict, - + "oLanguage": getDatatablesStrings({ + "sEmptyTable": $.i18n._("No users were found."), + "sEmptyTable": $.i18n._("No users found"), + "sZeroRecords": $.i18n._("No matching users found"), + "sInfo": $.i18n._("Showing _START_ to _END_ of _TOTAL_ users"), + "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 users"), + "sInfoFiltered": $.i18n._("(filtered from _MAX_ total users)"), + }), "sDom": '<"H"lf<"dt-process-rel"r>>t<"F"ip>', }); }