Reformatted client.js
This commit is contained in:
parent
011068af59
commit
c846da2ab8
@ -2,7 +2,7 @@ var allowedu = {};
|
||||
var clicked = false;
|
||||
allowedu["ybq987@gmail.com"] = true;
|
||||
allowedu["dweinger@bloomfield.org"] = true;
|
||||
allowedu["ksjdragon@gmail.com"]= true;
|
||||
allowedu["ksjdragon@gmail.com"] = true;
|
||||
currentcard = 0;
|
||||
|
||||
Meteor.subscribe('schedule');
|
||||
@ -10,12 +10,22 @@ Meteor.subscribe('schedule');
|
||||
Template.client.helpers({
|
||||
|
||||
sched: function() {
|
||||
beforeslice = schedule.find({}, {sort: {timestamp: 1}, limit: 9}).fetch();
|
||||
beforeslice = schedule.find({}, {
|
||||
sort: {
|
||||
timestamp: 1
|
||||
},
|
||||
limit: 9
|
||||
}).fetch();
|
||||
return beforeslice.slice(1, beforeslice.length);
|
||||
},
|
||||
|
||||
mostrecent: function() {
|
||||
return schedule.find({}, {sort: {timestamp: 1}, limit: 1}).fetch();
|
||||
return schedule.find({}, {
|
||||
sort: {
|
||||
timestamp: 1
|
||||
},
|
||||
limit: 1
|
||||
}).fetch();
|
||||
}
|
||||
|
||||
});
|
||||
@ -45,7 +55,7 @@ Template.client.events({
|
||||
"click .pulltab": function() {
|
||||
clicked = !clicked;
|
||||
Session.set("sidebar", clicked);
|
||||
if(clicked) {
|
||||
if (clicked) {
|
||||
$(".pulltab").css("border-left", "40px solid #DD655D").css("margin-left", "17%");
|
||||
$(".scale")
|
||||
.css("-webkit-transform", "translateX(117%)")
|
||||
@ -75,7 +85,7 @@ Template.day.helpers({
|
||||
lastWeek: '[Last] dddd',
|
||||
sameElse: 'MM/DD/YYYY'
|
||||
});
|
||||
if (this.day != undefined) {
|
||||
if (this.day !== undefined) {
|
||||
date = date + " (" + this.day + ")"
|
||||
}
|
||||
return date
|
||||
@ -99,18 +109,18 @@ Template.day.helpers({
|
||||
});
|
||||
|
||||
Template.day.events({
|
||||
'click .fa' : function() {
|
||||
'click .fa': function() {
|
||||
Meteor.call('remove', this);
|
||||
},
|
||||
|
||||
'click .eachDay' : function() {
|
||||
'click .eachDay': function() {
|
||||
var user_id = Session.get('user_id')
|
||||
console.log(user_id);
|
||||
}
|
||||
})
|
||||
|
||||
Template.recent.events({
|
||||
'click .fa' : function() {
|
||||
'click .fa': function() {
|
||||
Meteor.call('remove', this);
|
||||
}
|
||||
})
|
||||
@ -190,6 +200,11 @@ function getScale(index, start) {
|
||||
|
||||
Template.phone.helpers({
|
||||
phone: function() {
|
||||
return schedule.find({}, {sort: {timestamp: 1}, limit: 10}).fetch();
|
||||
return schedule.find({}, {
|
||||
sort: {
|
||||
timestamp: 1
|
||||
},
|
||||
limit: 10
|
||||
}).fetch();
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user