minor polishing, small bug fixes

This commit is contained in:
Kenneth Jao 2017-02-09 10:26:22 -05:00
parent 07e62b42ff
commit ae8172e7bc
2 changed files with 25 additions and 3 deletions

View File

@ -799,6 +799,7 @@ textarea.clickModify {
}
#workComments h3 {
font-weight: 400;
margin-bottom: 2%;
-webkit-filter: none;
filter: none;
@ -963,7 +964,7 @@ textarea.clickModify {
}
.fc-left h2 {
font-weight: 400;
font-weight: 100;
-webkit-filter: none;
filter: none;

View File

@ -40,6 +40,11 @@ Template.login.rendered = function() {
Template.main.created = function() {
Session.set("mode", Session.get("user").preferences.mode);
Session.set("classInfo", null);
/*if (Notification.permission !== "granted") {
Notification.requestPermission().then(function(result) {
});
}*/
}
Template.main.rendered = function() {
@ -325,6 +330,9 @@ Template.main.events({
$(".overlay").fadeOut(150);
if (!Session.get("newWork")) {
document.getElementById("workComment").value = "";
var res = Session.get("restrictText");
res[Object.keys(res)[0]] = "";
Session.set("restrictText", res);
}
}
@ -468,8 +476,7 @@ Template.main.events({
},
// HANDLING INPUT CHANGING
'focus .clickModify' (event) {
$(".optionHolder")
.fadeOut(100);
toggleOptionMenu(false, modifyingInput);
if(modifyingInput !== null) {
if(!$("#"+modifyingInput)[0].className.includes("dropdown")) closeInput(modifyingInput);
@ -481,6 +488,16 @@ Template.main.events({
event.target.style.backgroundColor = "rgba(0,0,0,0.1)";
}
},
'keydown #wName' (event) {
if(event.keyCode === 13) {
closeInput(modifyingInput);
event.target.blur();
}
},
'focus #workComment' () {
toggleOptionMenu(false, modifyingInput);
modifyingInput = null;
},
'keydown .dropdown' (event) {
var first = $("#"+modifyingInput).next().children("p:first-child");
var last = $("#"+modifyingInput).next().children("p:last-child");
@ -1029,3 +1046,7 @@ function calendarEvents(array) {
}
Session.set("calendarEvents", events);
}
function notifyMe() {
}