diff --git a/hourglass/client/main/main.css b/hourglass/client/main/main.css index 4db2401..9f846d2 100644 --- a/hourglass/client/main/main.css +++ b/hourglass/client/main/main.css @@ -102,6 +102,11 @@ header { transition: background-color 0.5s ease; } +header h1, header h2 { + -webkit-filter: none; + filter: none; +} + h1,h2,h3,h4,h5 { margin: 0; @@ -131,8 +136,8 @@ h4 { input, textarea { font-family: 'Raleway'; - background-color: #FEFEFE; - border: 3px solid #FEFEFE; + background-color: #EBEBEB; + border: 3px solid #EBEBEB; border-radius: 3px; resize: none; } @@ -838,6 +843,7 @@ header h2 { } .fc-day:not(.fc-past) { + cursor: pointer; box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.1); -webkit-transition: box-shadow 0.4s ease; @@ -1126,4 +1132,91 @@ header h2 { margin: 0; padding: 7% 0 7% 10%; display: inline-block; +} + +#requests { + width: 25vw; + margin-bottom: -15.8%; + padding: 1.5%; + + border-top: 5px solid #852E6D; + box-shadow: -2px 0px 5px 1px #444; + + position: absolute; + right: 5vw; + bottom: 0; + + z-index: 30; + + -webkit-transition: margin 0.4s ease; + -moz-transition: margin 0.4s ease; + -ms-transition: margin 0.4s ease; + transition: margin 0.4s ease; +} + +#requestTab { + width: 5vw; + height: 4vw; + + border-top: 5px solid #852E6D; + box-shadow: -2px -4px 5px 0px #444; + + position: absolute; + right: 0; + top: -4.3vw; + + cursor: pointer; + z-index: 15; +} + +.fa-question { + font-size: 5vh; + width: 4vw; + padding: 10%; + text-align: center; + + -webkit-transition: background-color 0.4s ease; + -moz-transition: background-color 0.4s ease; + -ms-transition: background-color 0.4s ease; + transition: background-color 0.4s ease; +} + +.fa-question:hover { + background-color: rgba(0,0,0,0.1); +} + +#requests p { + margin: 0; + margin-bottom: 3%; +} + +#requests textarea { + width: 96%; + margin-bottom: 4%; +} + +#requestCont{ + width: 100%; +} + +#requestSubmit { + font-weight: 200; + font-size: 2.5vh; + margin-right: 2%; + padding: 2%; + + background-color: rgba(0,0,0,0.25); + float: right; + + text-align: center; + cursor: pointer; + + -webkit-transition: background-color 0.4s ease; + -moz-transition: background-color 0.4s ease; + -ms-transition: background-color 0.4s ease; + transition: background-color 0.4s ease; +} + +#requestSubmit:hover { + background-color: rgba(0,0,0,0.15); } \ No newline at end of file diff --git a/hourglass/client/main/main.html b/hourglass/client/main/main.html index 0578810..abd8327 100644 --- a/hourglass/client/main/main.html +++ b/hourglass/client/main/main.html @@ -226,6 +226,18 @@ + +
+
+ +
+

Send an help request, feature, or bug report.

+
+
+ {{commentLength}} +
Send
+
+
{{> loginButtons}} diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index c273efe..6d731c2 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -291,7 +291,7 @@ Template.main.helpers({ openDivFade(document.getElementsByClassName("overlay")[0]); }, dayClick: function(date, jsEvent, view) { // On-click for each day. - if (jsEvent.target.className.includes("fc-past")) return; + if (jsEvent.target.className.includes("fc-past") || Session.get("noclass")) return; Session.set("calCreWork", true); calWorkDate = date.format(); calWorkOpen = true; @@ -452,6 +452,7 @@ Template.main.events({ } if(!document.getElementById("userDropdown").contains(event.target)) closeDivFade(document.getElementById("userDropdown")); + if(!document.getElementById("requests").contains(event.target)) document.getElementById("requests").style.marginBottom = "-15.8%"; }, // MAIN MENU BUTTONS 'click .fa-bars' () { // Click menu button. @@ -551,6 +552,27 @@ Template.main.events({ } openDivFade(document.getElementsByClassName("overlay")[0]); }, + 'click #requests .fa-question' () { + document.getElementById("requests").style.marginBottom = "0"; + }, + 'click #requestSubmit' () { + var area = document.getElementById("requestArea"); + if(area.value === "") return; + var array = {}; + array.content = area.value; + array.info = { + "users": Meteor.users, + "userInfo": Meteor.user(), + "userClasses": Session.get("calendarClasses") + }; + Meteor.call("createRequest", array, function(err,result) { + area.value = "Request sent!"; + setTimeout(function(){ + document.getElementById("requests").style.marginBottom = "-15.8%"; + area.value = ""; + },1000); + }) + }, // HANDLING INPUT CHANGING 'click .change' (event) { // Click changable inputs. Creates an input where the span is. if (!Session.get("newWork") && !document.getElementById("optionsContainer").contains(event.target)) { @@ -685,8 +707,10 @@ Template.main.events({ var text; if(event.target.id === "workComment") { text = document.getElementById("commentrestrict"); + } else if(event.target.id === "requestArea") { + text = document.getElementById("requestrestrict"); } else { - text = document.getElementById(Session.get("modifying")+"restrict"); + text = document.getElementById(Session.get("modifying")+"restrict"); } text.style.color = "#7E7E7E"; if (chars === restrict) { // Don't display if nothing in comment.