mirror of
https://github.com/moparisthebest/rcrdit
synced 2024-12-22 07:18:56 -05:00
Change the formatting of upcoming recordings a bit
This commit is contained in:
parent
c9de3a4e2c
commit
24bde789b8
@ -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 {
|
||||
|
@ -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");
|
||||
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(" ")).append($("<td></td>").append(formattedTime)).append($("<td></td>").append(scheduledRec.channelName)).append($("<td></td>").append(scheduledRec.title+" - "+subtitle)));
|
||||
|
||||
|
||||
|
||||
}
|
||||
upcomingRecordingsDiv.append(upcomingRecordingTable);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user