-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlaunch.js
48 lines (44 loc) · 1.49 KB
/
launch.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
WatcfyLaunch = {
'options': {
"logo": "",
"title": "Watcfy is a social intelligent platform",
"text": "We're working hard to improve our website and we'll ready soon, <br />sign up and be the first to get notified",
"theme": "white"
}
};
Meteor.startup(function () {
Template.watcfyLaunch.helpers({
'logo': function () {
var _logo = WatcfyLaunch.options.logo;
if(_logo == ""){
return _logo;
} else {
var l = '<img src="'+ _logo +'" alt="" />';
return l;
}
},
'title': function () {
var _title = WatcfyLaunch.options.title;
return _title;
},
'text': function () {
var _text = WatcfyLaunch.options.text;
return _text;
},
'theme': WatcfyLaunch.options.theme
});
Template.watcfyLaunch.events({
"submit form": function (e, tmpl) {
e.preventDefault();
var _email = tmpl.find('#exampleInputEmail1').value;
var w = tmpl.find('#wrapper');
Meteor.call('watcfyLaunch_signup', _email, function (err, res) {
if(err){
w.innerHTML = w.innerHTML + "<p>"+err.reason+"</p>";
} else{
w.innerHTML = w.innerHTML + "<p class='thanks'>Thank you for signup, you will be one of the first to use this service.</p>";
}
});
}
})
});