1
0
mirror of https://github.com/moparisthebest/rcrdit synced 2024-12-21 23:08:57 -05:00

Change the formatting of upcoming recordings a bit

This commit is contained in:
Jeff Lamb 2017-03-13 22:56:50 -04:00
parent c9de3a4e2c
commit 24bde789b8
2 changed files with 19 additions and 2 deletions

View File

@ -374,6 +374,11 @@ ul#channelGroups li ul li ul li.channel {
background-color: white;
padding:20px;
border-radius: 30px;
}
.dateDisplayRow{
font-weight: bold;
}
.circle:before {

View File

@ -11,6 +11,7 @@ $( document ).ready(function() {
initializeProgramInfoPopup();
getRecordingProfiles();
getSchedule2(null);
moment.locale('en');
$("#gotoTvGuide").click(function(){
getSchedule2(null);
$("#autoRecsGoHere").hide();
@ -67,13 +68,24 @@ function getUpcomingRecordings(){
success: function (data) {
var upcomingRecordingsDiv = $("#upcomingRecordingsGoHere");
var upcomingRecordingTable = $("<table></table");
for(var idx in data){
var lastDate = "";
for(var idx in data){
var scheduledRec = data[idx];
var startRecordingDate = new Date(0);
startRecordingDate.setUTCSeconds((idx/1000));
var formattedDate = moment(startRecordingDate).format("YYYY-MM-DD");
var formattedTime = moment(startRecordingDate).format("h:mm A");
if(formattedDate !== lastDate){
upcomingRecordingTable.append($("<tr></tr>").append($("<td></td>").addClass("dateDisplayRow").append(formattedDate)));
lastDate = formattedDate;
}
var subtitle = scheduledRec.subTitle;
if(subtitle === null)subtitle = "";
upcomingRecordingTable.append($("<tr></tr>").append($("<td></td>").append(startRecordingDate.toString()+" - "+scheduledRec.title+" - "+subtitle)));
upcomingRecordingTable.append($("<tr></tr>").append($("<td></td>").append("&nbsp;")).append($("<td></td>").append(formattedTime)).append($("<td></td>").append(scheduledRec.channelName)).append($("<td></td>").append(scheduledRec.title+" - "+subtitle)));
}
upcomingRecordingsDiv.append(upcomingRecordingTable);
},