1
0
mirror of https://github.com/moparisthebest/rcrdit synced 2024-12-22 15:28:55 -05:00

Beginning of menu at top of screen. you can at least see a list of autorecs now

This commit is contained in:
Jeff Lamb 2017-03-11 21:20:08 -05:00
parent e7716322bc
commit db70070769
7 changed files with 82 additions and 2 deletions

View File

@ -448,7 +448,14 @@ public class RcrdIt extends ResourceConfig implements AutoCloseable {
}catch(Exception e){ }catch(Exception e){
log.error("Error in getSchedule",e); log.error("Error in getSchedule",e);
} }
return new HashMap<Integer, Profile>(); return new HashMap<>();
}
@POST
@Path("getAutoRecs")
@Produces(MediaType.APPLICATION_JSON)
public List<AutoRec> getAutoRecs() {
return autoRecs;
} }
@POST @POST

View File

@ -126,6 +126,7 @@ public class AutoRec implements Comparable<AutoRec>, Finishable {
} }
public Set<DayOfWeek> getDaysOfWeek() { public Set<DayOfWeek> getDaysOfWeek() {
if(daysOfWeek == null)return null;
return Collections.unmodifiableSet(daysOfWeek); // should never be called, might want to cache if called often return Collections.unmodifiableSet(daysOfWeek); // should never be called, might want to cache if called often
} }

View File

@ -326,3 +326,36 @@ ul#channelGroups li ul li ul li.channel {
.entryError{ .entryError{
border: 3px solid red; border: 3px solid red;
} }
.sectionSelection{
//background-color: green;
display: inline-block;
//float:left;
height: 128px;
width:128px;
padding: 21px;
margin-left: 10px;
margin-right: 10px;
}
.sectionSelection:hover{
cursor: pointer;
}
.logoImageDiv{
display: inline-block;
float:left;
margin-right: 10;
}
.nowRecording{
width: 271px;
}
#autoRecsGoHere{
margin-left: auto;
margin-right: auto;
background-color: white;
padding:20px;
border-radius: 30px;
height: 400px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -36,12 +36,19 @@
</head> </head>
<body> <body>
<div id='rcrditHeader'> <div id='rcrditHeader'>
<a href="javascript:forceScheduleUpdate();"><img src="images/rcrditx128.png" alt='logo'/></a> <div class="logoImageDiv"><a href="javascript:forceScheduleUpdate();"><img src="images/rcrditx128.png" alt='logo'/></a></div>
<div class="sectionSelection" id="gotoTvGuide"><img alt="Schedule" src="images/guideicon.png"/></div>
<div class="sectionSelection" id="gotoAutoRecs"><img alt="Schedule" src="images/autorecsicon.png"/></div>
<div class="sectionSelection"></div>
<div class="sectionSelection"></div>
<div class="sectionSelection nowRecording"></div>
</div> </div>
<div id="guideGoesHere" style='width: 90%'> <div id="guideGoesHere" style='width: 90%'>
</div> </div>
<div id="autoRecsGoHere" style='display:none; width: 90%'></div>
</body> </body>
</html> </html>

View File

@ -11,8 +11,40 @@ $( document ).ready(function() {
initializeProgramInfoPopup(); initializeProgramInfoPopup();
getRecordingProfiles(); getRecordingProfiles();
getSchedule2(null); getSchedule2(null);
$("#gotoTvGuide").click(function(){
getSchedule2(null);
$("#autoRecsGoHere").hide();
$("#guideGoesHere").show();
});
$("#gotoAutoRecs").click(function(){
$("#guideGoesHere").hide();
getAutoRecs();
$("#autoRecsGoHere").show();
$("#programInfo").dialog("close");
});
}); });
function getAutoRecs(){
$("#autoRecsGoHere").html("");
$.ajax({
url: 'rest/getAutoRecs',
type: 'post',
dataType: 'json',
success: function (data) {
var autoRecDiv = $("#autoRecsGoHere");
for(var idx in data){
var autoRec = data[idx];
autoRecDiv.append($("<tr></tr>").append($("<td></td>").append(autoRec.title)));
}
},
error: function ( jqXHR, textStatus, errorThrown ){
alert(errorThrown);
}
});
}
function initializeToastr(){ function initializeToastr(){
toastr.options = { toastr.options = {