disable all filters, and renaming

This commit is contained in:
Kenneth Jao 2016-09-02 00:53:12 -04:00
parent 7eebae2b9f
commit bded6702cf
5 changed files with 37 additions and 27 deletions

View File

@ -727,13 +727,6 @@ input, textarea {
#calCreWork {
margin-left: 0 !important;
color: #fff;
display: none;
opacity: 0;
-webkit-transition: opacity 0.4s ease;
-moz-transition: opacity 0.4s ease;
-ms-transition: opacity 0.4s ease;
transition: opacity 0.4s ease;
-webkit-animation: neonglow 1.5s ease-in-out infinite alternate;
-moz-animation: neonglow 1.5s ease-in-out infinite alternate;
@ -765,6 +758,22 @@ input, textarea {
}
}
#disableFilter {
font-size: 90%;
margin: 0 0 0 23% !important;
padding: 4%;
background-color: rgba(255,255,255,0.2);
-webkit-transition: background-color 0.4s ease;
-moz-transition: background-color 0.4s ease;
-ms-transition: background-color 0.4s ease;
transition: background-color 0.4s ease;
}
#disableFilter:hover {
background-color: rgba(255,255,255,0.1);
}
.fc-day:not(.fc-past) {
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.1);

View File

@ -35,7 +35,14 @@
</div>
<div id="classListHolder">
{{#if myClasses}}
<h3>Enrolled</h3><h3 id="calCreWork">-- Pick a class{{calCreWork}}</h3>
<h3>Enrolled</h3>
{{#if calCreWork}}
<h3 id="calCreWork">-- Pick a class</h3>
{{else}}
{{#if filterOn}}
<h3 id="disableFilter">Disable All</h3>
{{/if}}
{{/if}}
{{#each myClasses}}
{{> sidebarClasses}}
{{/each}}

View File

@ -303,20 +303,12 @@ Template.main.helpers({
return "width:" + width.toString() + "px;height:" + height.toString() + "px;margin-left:" + (0.5 * window.innerWidth - 0.5 * width).toString() + "px;margin-top:" + (0.47 * window.innerHeight - 0.5 * height).toString() + "px";
},
calCreWork() { // Display instructions for creating a work.
if(Session.get("calCreWork")) {
var div = document.getElementById("calCreWork");
div.style.setProperty("display","inline-block","important");
div.style.setProperty("opacity","0","important");
setTimeout(function() {
div.style.setProperty("opacity","1","important");
}, 100);
return;
} else {
try {
closeDivFade(document.getElementById("calCreWork"));
} catch(err) {}
return;
}
if(Session.get("calCreWork")) return true;
return false;
},
filterOn() {
if(Session.get("classDisp").length !== 0) return true;
return false;
},
highlight() { // Calendar highlight/scale option.
var hoverHighlight = Session.get("classDispHover");
@ -758,9 +750,11 @@ Template.main.events({
array.push(classid);
}
Session.set("classDisp",array);
$("#fullcalendar").fullCalendar( 'refetchEvents' ); // Update calendar events.
}
},
'click #disableFilter' () {
Session.set("classDisp",[]);
},
'mouseover .sideClass' (event) { // Highlight/scale filter on-hover.
if(event.target.className !== "sideClass") {
var div = event.target.parentNode;

View File

@ -267,10 +267,10 @@
</div>
</template>
<template name="schoollist">
<template name="schoolList">
{{name}}
</template>
<template name="teacherlist">
<template name="teacherList">
{{teacher}}
</template>

View File

@ -42,7 +42,7 @@ Template.profile.helpers({
collection: schools,
field: 'name',
matchAll: true,
template: Template.schoollist
template: Template.schoolList
}]
};
},
@ -54,7 +54,7 @@ Template.profile.helpers({
token: '',
collection: classes,
field: 'teacher',
template: Template.teacherlist
template: Template.teacherList
}]
};
},