Implement default mode, css fixes
This commit is contained in:
parent
f09532438e
commit
53b69348d1
@ -622,9 +622,6 @@ input, textarea {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
|
||||
display: none;
|
||||
opacity: 0;
|
||||
|
||||
-webkit-transition: opacity 0.4s ease;
|
||||
-moz-transition: opacity 0.4s ease;
|
||||
-ms-transition: opacity 0.4s ease;
|
||||
@ -676,6 +673,10 @@ input, textarea {
|
||||
padding: 0.5% 0 0.5% 0 !important;
|
||||
}
|
||||
|
||||
.fc td {
|
||||
border: solid 1px #C5C5C5;
|
||||
}
|
||||
|
||||
.fc-button {
|
||||
background-color: rgba(255,255,255,0.5) !important;
|
||||
background-image: none;
|
||||
@ -752,5 +753,5 @@ input, textarea {
|
||||
}
|
||||
|
||||
.inputRadioPref {
|
||||
margin-bottom: 6%;
|
||||
margin-top: 6%;
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
<template name="main">
|
||||
{{> loginButtons}}
|
||||
<header style="background-color:{{divColor 'header'}}{{textColor}}">
|
||||
<header style="background-color:{{divColor 'header'}}{{textColor}}{{defaultMode}}">
|
||||
<div id="aboveBar">
|
||||
<i class="fa fa-bars" aria-hidden="true" style="color:{{iconColor 'menu'}}"></i>
|
||||
<h1>Hourglass</h1><h2>{{schoolName}}</h2>
|
||||
@ -89,7 +89,7 @@
|
||||
|
||||
{{#if currMode 'calendar'}}
|
||||
<div id="calbg" style="{{calbg}}"></div>
|
||||
<div id="calendar" style="{{calCenter}}">
|
||||
<div id="calendar" style="{{calCenter}}{{calColor}}">
|
||||
{{> fullcalendar calendarOptions}}
|
||||
</div>
|
||||
{{/if}}
|
||||
@ -164,7 +164,7 @@
|
||||
</template>
|
||||
|
||||
<template name="classesMode">
|
||||
<div class="mainClass" style="background-color:{{divColor 'header'}}">
|
||||
<div class="mainClass" style="background-color:{{divColor 'classes'}}">
|
||||
<div class="classInfo"> <!-- class color -->
|
||||
<h3 class="mainClassName">{{name}}</h3>
|
||||
<p class="mainClassHour">{{hour}}</p>
|
||||
|
||||
@ -18,6 +18,8 @@ var themeColors = {
|
||||
"statusIcons": "#33ADFF",
|
||||
"highlightText": "#FF1A1A",
|
||||
"cards": "#FEFEFE",
|
||||
"classes":"#EBEBEB",
|
||||
"calendar": "#000",
|
||||
"text": "#000"
|
||||
},
|
||||
"dark": {
|
||||
@ -28,6 +30,9 @@ var themeColors = {
|
||||
"statusIcons": "#33ADFF",
|
||||
"highlightText": "#FF1A1A",
|
||||
"cards": "#050505",
|
||||
"classes":"#46396E",
|
||||
"calendar": "#000",
|
||||
//30313B
|
||||
"text": "#F6F6F6"
|
||||
}
|
||||
};
|
||||
@ -128,6 +133,10 @@ Template.main.helpers({
|
||||
return;
|
||||
}
|
||||
},
|
||||
defaultMode() {
|
||||
Session.set("mode",Meteor.user().profile.preferences.mode);
|
||||
return;
|
||||
},
|
||||
bgSrc() {
|
||||
var dim = [window.innerWidth, window.innerHeight];
|
||||
var pic = "Backgrounds/"+themeColors[Meteor.user().profile.preferences.theme].background;
|
||||
@ -159,7 +168,8 @@ Template.main.helpers({
|
||||
}
|
||||
},
|
||||
currMode(name) {
|
||||
if (name === Session.get("mode")) {
|
||||
var mode = Session.get("mode");
|
||||
if (name === mode) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -225,7 +235,10 @@ Template.main.helpers({
|
||||
},
|
||||
calCenter() {
|
||||
var width = window.innerWidth * 0.85;
|
||||
return "width:" + width.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px";
|
||||
return "width:" + width.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px;";
|
||||
},
|
||||
calColor() {
|
||||
return "color:"+themeColors[Meteor.user().profile.preferences.theme].calendar;
|
||||
},
|
||||
calbg() {
|
||||
var width = window.innerWidth * 0.865;
|
||||
@ -378,7 +391,7 @@ Template.main.events({
|
||||
!event.target.parentNode.className.includes("workOptions") &&
|
||||
!event.target.parentNode.className.includes("prefOptions") &&
|
||||
event.target.readOnly !== true) {
|
||||
if(Session.equals("sidebar","optionsContainer")) {
|
||||
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||
var radio = "prefOptions";
|
||||
} else {
|
||||
var radio = "workOptions";
|
||||
@ -478,7 +491,7 @@ Template.main.events({
|
||||
var op = event.target;
|
||||
Session.set("radioDiv", op.getAttribute("op"));
|
||||
Session.set("radioOffset", op.getAttribute("opc"));
|
||||
if(Session.equals("sidebar","optionsContainer")) {
|
||||
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||
var radio = "prefOptions";
|
||||
} else {
|
||||
var radio = "workOptions";
|
||||
@ -645,7 +658,7 @@ function sendData(funcName) {
|
||||
function closeInput(sessval) {
|
||||
var input = document.getElementById(sessval + "a");
|
||||
var span = document.getElementById(sessval);
|
||||
if(Session.equals("sidebar","optionsContainer")) {
|
||||
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||
var color = "#000";
|
||||
} else {
|
||||
var color = "#8C8C8C";
|
||||
@ -663,14 +676,15 @@ function closeInput(sessval) {
|
||||
}
|
||||
span.style.display = "initial";
|
||||
Session.set("modifying", null);
|
||||
if(!Session.get("newWork") && !Session.equals("sidebar","optionsContainer")) {
|
||||
|
||||
if(Session.equals("sidebar","optionsContainer") || Session.equals("sidebar","both")) {
|
||||
Session.set("serverData",getPreferencesData());
|
||||
sendData("editProfile");
|
||||
} else if(!Session.get("newWork")) {
|
||||
if(getHomeworkFormData() === null) return;
|
||||
Session.set("serverData",Session.get("currentWork"));
|
||||
sendData("editWork");
|
||||
} else if(Session.equals("sidebar","optionsContainer")) {
|
||||
Session.set("serverData",getPreferencesData());
|
||||
sendData("editProfile");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getHomeworkFormData() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user