Skip to content

Commit

Permalink
Merge branch 'valencia' into valencia-mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Feb 5, 2016
2 parents 2c27874 + e63fd6b commit 4d35c5b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [OSX 10.8 and above](https://raw.githubusercontent.com/getlantern/lantern-binaries/master/lantern-installer-beta.dmg)
- [Ubuntu 14.04 32 bit](https://raw.githubusercontent.com/getlantern/lantern-binaries/master/lantern-installer-beta-32-bit.deb)
- [Ubuntu 14.04 64 bit](https://raw.githubusercontent.com/getlantern/lantern-binaries/master/lantern-installer-beta-64-bit.deb)
- [Arch Linux](https://aur.archlinux.org/packages/lantern)

**If you're looking for help, please visit below user forums:**

Expand Down
2 changes: 1 addition & 1 deletion src/github.com/getlantern/lantern-ui/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<script src="bower_components/angular-local-storage/dist/angular-local-storage.min.js"></script>
<script src="lib/angular-ui-bootstrap-tpls.js"></script>

<script src="lib/mandrill.min.js"></script>
<script src="lib/mailer.js"></script>

<script src="bower_components/clipboard/dist/clipboard.min.js"></script>
<script src="bower_components/ngclipboard/src/ngclipboard.js"></script>
Expand Down
15 changes: 3 additions & 12 deletions src/github.com/getlantern/lantern-ui/app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,9 @@ app.controller('RootCtrl', ['$rootScope', '$scope', '$compile', '$window', '$htt
return;
}

var mc = new mandrill.Mandrill('fmYlUdjEpGGonI4NDx9xeA');

var message = {
"to": [
{ "email": email }
]
};

mc.messages.sendTemplate({
'template_name': 'lantern-mobile-message',
'template_content': {},
'message': message
mailer.send({
'to': email,
'template': 'lantern-mobile-message'
});

$rootScope.showMobileAd = false;
Expand Down
21 changes: 21 additions & 0 deletions src/github.com/getlantern/lantern-ui/app/lib/mailer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var mailer = function() {}

mailer.url = "https://mailer.getlantern.org";

mailer.send = function(data) {
if (typeof data.to == 'undefined') {
return false;
}
if (typeof data.template == 'undefined') {
return false;
};
$.ajax({
type: "POST",
url: mailer.url + '/send',
data: JSON.stringify(data),
error: function(xhr, s, t) {
console.log("error", t);
}
});
return true;
};
Loading

0 comments on commit 4d35c5b

Please sign in to comment.