diff --git a/src/main/java/com/moparisthebest/rcrdit/RcrdIt.java b/src/main/java/com/moparisthebest/rcrdit/RcrdIt.java index 0b56275..dd9f08c 100644 --- a/src/main/java/com/moparisthebest/rcrdit/RcrdIt.java +++ b/src/main/java/com/moparisthebest/rcrdit/RcrdIt.java @@ -448,7 +448,14 @@ public class RcrdIt extends ResourceConfig implements AutoCloseable { }catch(Exception e){ log.error("Error in getSchedule",e); } - return new HashMap(); + return new HashMap<>(); + } + + @POST + @Path("getAutoRecs") + @Produces(MediaType.APPLICATION_JSON) + public List getAutoRecs() { + return autoRecs; } @POST diff --git a/src/main/java/com/moparisthebest/rcrdit/autorec/AutoRec.java b/src/main/java/com/moparisthebest/rcrdit/autorec/AutoRec.java index a6622e7..e52f36d 100644 --- a/src/main/java/com/moparisthebest/rcrdit/autorec/AutoRec.java +++ b/src/main/java/com/moparisthebest/rcrdit/autorec/AutoRec.java @@ -126,6 +126,7 @@ public class AutoRec implements Comparable, Finishable { } public Set getDaysOfWeek() { + if(daysOfWeek == null)return null; return Collections.unmodifiableSet(daysOfWeek); // should never be called, might want to cache if called often } diff --git a/src/main/webapp/css/rcrdit.css b/src/main/webapp/css/rcrdit.css index 7877cdb..79f3d09 100644 --- a/src/main/webapp/css/rcrdit.css +++ b/src/main/webapp/css/rcrdit.css @@ -325,4 +325,37 @@ ul#channelGroups li ul li ul li.channel { .entryError{ 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; } \ No newline at end of file diff --git a/src/main/webapp/images/autorecsicon.png b/src/main/webapp/images/autorecsicon.png new file mode 100644 index 0000000..d1c0a8c Binary files /dev/null and b/src/main/webapp/images/autorecsicon.png differ diff --git a/src/main/webapp/images/guideicon.png b/src/main/webapp/images/guideicon.png new file mode 100644 index 0000000..86f8391 Binary files /dev/null and b/src/main/webapp/images/guideicon.png differ diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index fb32f5d..9765d44 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -36,12 +36,19 @@
- logo +
logo
+
Schedule
+
Schedule
+
+
+
+
+ \ No newline at end of file diff --git a/src/main/webapp/js/rcrdit.js b/src/main/webapp/js/rcrdit.js index a9f5aad..1947535 100644 --- a/src/main/webapp/js/rcrdit.js +++ b/src/main/webapp/js/rcrdit.js @@ -11,8 +11,40 @@ $( document ).ready(function() { initializeProgramInfoPopup(); getRecordingProfiles(); 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($("").append($("").append(autoRec.title))); + } + }, + error: function ( jqXHR, textStatus, errorThrown ){ + alert(errorThrown); + } + }); +} + function initializeToastr(){ toastr.options = {