From ae8172e7bcf2c80dd1b3da6b9094d57bd5f77535 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Thu, 9 Feb 2017 10:26:22 -0500 Subject: [PATCH] minor polishing, small bug fixes --- hourglass/client/main/main.css | 3 ++- hourglass/client/main/main.js | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/hourglass/client/main/main.css b/hourglass/client/main/main.css index 0d8389e..cdd4101 100644 --- a/hourglass/client/main/main.css +++ b/hourglass/client/main/main.css @@ -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; diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index 6ecf42f..e838c65 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -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() { + +}