Fixed request css and js
This commit is contained in:
parent
1fb3d8f4d1
commit
7d90cd6871
@ -1135,8 +1135,8 @@ input, textarea {
|
|||||||
|
|
||||||
#requests {
|
#requests {
|
||||||
width: 25vw;
|
width: 25vw;
|
||||||
height: 9vw;
|
height: 11vw;
|
||||||
margin-bottom: -13.3vw;
|
margin-bottom: -15.3vw;
|
||||||
padding: 2vw;
|
padding: 2vw;
|
||||||
|
|
||||||
border-top: 5px solid #852E6D;
|
border-top: 5px solid #852E6D;
|
||||||
@ -1187,12 +1187,12 @@ input, textarea {
|
|||||||
|
|
||||||
#requests p {
|
#requests p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-bottom: 3%;
|
margin-bottom: 1vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
#requests textarea {
|
#requests textarea {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
margin-bottom: 4%;
|
margin-bottom: 1.5vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
#requestCont{
|
#requestCont{
|
||||||
|
|||||||
@ -464,7 +464,7 @@ Template.main.events({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!document.getElementById("userDropdown").contains(event.target)) closeDivFade(document.getElementById("userDropdown"));
|
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
|
// MAIN MENU BUTTONS
|
||||||
'click .fa-bars' () { // Click menu button.
|
'click .fa-bars' () { // Click menu button.
|
||||||
@ -575,16 +575,17 @@ Template.main.events({
|
|||||||
var array = {};
|
var array = {};
|
||||||
array.content = area.value;
|
array.content = area.value;
|
||||||
array.info = {
|
array.info = {
|
||||||
"users": Meteor.users,
|
"users": Meteor.users.find().fetch(),
|
||||||
"userInfo": Meteor.user(),
|
"userInfo": Meteor.user(),
|
||||||
"userClasses": Session.get("calendarClasses")
|
"userClasses": Session.get("calendarClasses")
|
||||||
};
|
};
|
||||||
Meteor.call("createRequest", array, function(err,result) {
|
Meteor.call("createRequest", array, function(err,result) {
|
||||||
area.value = "Request sent!";
|
area.value = "Request sent!";
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
document.getElementById("requests").style.marginBottom = "-13.3vw";
|
document.getElementById("requests").style.marginBottom = "-15.3vw";
|
||||||
area.value = "";
|
area.value = "";
|
||||||
},1000);
|
Session.set("commentRestrict",null);
|
||||||
|
},750);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// HANDLING INPUT CHANGING
|
// HANDLING INPUT CHANGING
|
||||||
|
|||||||
@ -620,12 +620,10 @@ Meteor.methods({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'createRequest': function(request) {
|
'createRequest': function(request) {
|
||||||
if (request.length <= 500 && Meteor.userId() !== null &&
|
if (request.content.length <= 500 && Meteor.userId() !== null) {
|
||||||
_.contains(['bug', 'feature'], request.type)) {
|
|
||||||
requests.insert({
|
requests.insert({
|
||||||
requestor: Meteor.userId(),
|
requestor: Meteor.userId(),
|
||||||
request: request.content,
|
request: request.content,
|
||||||
type: request.type,
|
|
||||||
info: request.info,
|
info: request.info,
|
||||||
timeRequested: new Date()
|
timeRequested: new Date()
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user