Merge branch 'master' of https://github.com/ksjdragon/hourglass
This commit is contained in:
commit
3f984fca63
@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<div id="classListHolder">
|
||||
<h3>Enrolled</h3>
|
||||
{{#each myclasses}}
|
||||
{{#each myClasses}}
|
||||
{{> sidebarClasses}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
@ -55,6 +55,19 @@ Template.registerHelper('overlayDim', (part) => {
|
||||
return width + height + margin + bg;
|
||||
});
|
||||
|
||||
Template.registerHelper('myClasses', () => {
|
||||
if (Meteor.user().profile.classes === undefined || Meteor.user().profile.classes.length === 0) {
|
||||
return [];
|
||||
} else {
|
||||
var array = [];
|
||||
var courses = Meteor.user().profile.classes;
|
||||
for(var i = 0; i < courses.length; i++) {
|
||||
array.push(classes.findOne({_id:courses[i]}));
|
||||
}
|
||||
return array;
|
||||
}
|
||||
})
|
||||
|
||||
Template.main.helpers({
|
||||
schoolName() {
|
||||
Session.set("calendarclasses", Meteor.user().profile.classes);
|
||||
@ -71,7 +84,7 @@ Template.main.helpers({
|
||||
},
|
||||
bgSrc() {
|
||||
var dim = [window.innerWidth, window.innerHeight];
|
||||
var pic = themeColors[Cookie.get("theme")].background;
|
||||
var pic = "Backgrounds/"+themeColors[Cookie.get("theme")].background;
|
||||
return pic;
|
||||
},
|
||||
menuStatus() {
|
||||
@ -139,18 +152,6 @@ Template.main.helpers({
|
||||
var width = window.innerWidth * 0.865;
|
||||
var height = window.innerHeight * 0.76;
|
||||
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";
|
||||
},
|
||||
myclasses() {
|
||||
if (Meteor.user().profile.classes === undefined || Meteor.user().profile.classes.length === 0) {
|
||||
return [];
|
||||
} else {
|
||||
var array = [];
|
||||
var courses = Meteor.user().profile.classes;
|
||||
for(var i = 0; i < courses.length; i++) {
|
||||
array.push(classes.findOne({_id:courses[i]}));
|
||||
}
|
||||
return array;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
<span class="subscriptions classText">Members</span>
|
||||
</div>
|
||||
<div class="classHolder" style="max-height:{{classHolderHeight}}">
|
||||
{{#each myclasses}}
|
||||
{{#each myClasses}}
|
||||
{{> classDisplay}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
BIN
hourglass/public/Backgrounds/White.jpg
Normal file
BIN
hourglass/public/Backgrounds/White.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 312 KiB |
Loading…
x
Reference in New Issue
Block a user