-
Notifications
You must be signed in to change notification settings - Fork 0
/
FT-Dish.js
63 lines (61 loc) · 1.95 KB
/
FT-Dish.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
if (Meteor.isClient) {
Template.sections.events({
'click section': function(e) {
console.log('Left pane');
$("body").addClass('active-left').removeClass('active-right');
},
'click section#starters': function(e) {
Session.set('currentPane', 'starters');
},
'click section#substance': function(e) {
Session.set('currentPane', 'substance');
},
'click section#a-drink-with': function(e) {
Session.set('currentPane', 'drink');
},
'click section#the-scoop': function(e) {
Session.set('currentPane', 'scoop');
},
});
Template.left_pane.events({
'click section': function(e) {
console.log('Right pane');
$("body").removeClass('active-left').addClass('active-right');
},
'click #lang': function(e) {
$("body").toggleClass("chinese");
}
});
Template.right_pane.events({
'click header': function(e) {
$("body").removeClass('active-right').addClass('active-left');
}
});
Template.right_pane.helpers({
starters: function(e) {
return Session.equals('currentPane', 'starters')
},
substance: function(e) {
return Session.equals('currentPane', 'substance')
},
drink: function(e) {
return Session.equals('currentPane', 'drink')
},
scoop: function(e) {
return Session.equals('currentPane', 'scoop')
},
})
Meteor.startup(function() {
FastClick.attach(document.body);
$("#splash").addClass('animate');
setTimeout(function() {
$("#splash div.ft-icon-logo").fadeIn();
}, 800);
setTimeout(function() {
$("#splash div.dish").fadeIn();
}, 1600);
setTimeout(function() {
$("#splash").fadeOut();
}, 200); // 2800
});
}