diff --git a/hourglass/client/main/main.css b/hourglass/client/main/main.css index b63329e..e64dfba 100644 --- a/hourglass/client/main/main.css +++ b/hourglass/client/main/main.css @@ -1135,8 +1135,8 @@ input, textarea { #requests { width: 25vw; - height: 9vw; - margin-bottom: -13.3vw; + height: 11vw; + margin-bottom: -15.3vw; padding: 2vw; border-top: 5px solid #852E6D; @@ -1187,12 +1187,12 @@ input, textarea { #requests p { margin: 0; - margin-bottom: 3%; + margin-bottom: 1vh; } #requests textarea { width: 96%; - margin-bottom: 4%; + margin-bottom: 1.5vh; } #requestCont{ diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index 1cc30cd..a073655 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -464,7 +464,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 = "-13.3vw"; + if(!document.getElementById("requests").contains(event.target)) document.getElementById("requests").style.marginBottom = "-15.3vw"; }, // MAIN MENU BUTTONS 'click .fa-bars' () { // Click menu button. @@ -575,16 +575,17 @@ Template.main.events({ var array = {}; array.content = area.value; array.info = { - "users": Meteor.users, + "users": Meteor.users.find().fetch(), "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 = "-13.3vw"; + document.getElementById("requests").style.marginBottom = "-15.3vw"; area.value = ""; - },1000); + Session.set("commentRestrict",null); + },750); }) }, // HANDLING INPUT CHANGING diff --git a/hourglass/server/main.js b/hourglass/server/main.js index 1135bab..1705025 100644 --- a/hourglass/server/main.js +++ b/hourglass/server/main.js @@ -620,12 +620,10 @@ Meteor.methods({ } }, 'createRequest': function(request) { - if (request.length <= 500 && Meteor.userId() !== null && - _.contains(['bug', 'feature'], request.type)) { + if (request.content.length <= 500 && Meteor.userId() !== null) { requests.insert({ requestor: Meteor.userId(), request: request.content, - type: request.type, info: request.info, timeRequested: new Date() });