summaryrefslogtreecommitdiff
path: root/public/js/lib/views/login.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-05 12:53:38 -0400
committerJules Laplace <jules@okfoc.us>2015-08-05 12:53:38 -0400
commitb9aaeaf616ed0a46a81e313bede00f1598d245ca (patch)
tree0d2256c9332b6d0ef97bb56e1c771a976f3497db /public/js/lib/views/login.js
parent21e31e46ff167ede7cb5ad4452cbd406236bc83d (diff)
parent3b7da491072e5c366738ff549e8958d97948076a (diff)
mergez
Diffstat (limited to 'public/js/lib/views/login.js')
-rw-r--r--public/js/lib/views/login.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/public/js/lib/views/login.js b/public/js/lib/views/login.js
new file mode 100644
index 0000000..325d22d
--- /dev/null
+++ b/public/js/lib/views/login.js
@@ -0,0 +1,29 @@
+var LoginView = View.extend({
+ el: "#login",
+
+ events: {
+ "form submit": "save",
+ },
+
+ initialize: function(){
+ this.$el.show()
+ },
+
+ save: function(e){
+ e.preventDefault()
+ user.save()
+ var that = this
+ if (user.username.length) {
+ app.router.route()
+ oktween.add({
+ obj: this.el.style,
+ from: { opacity: 1 },
+ to: { opacity: 0 },
+ duration: 500,
+ finished: function(){
+ that.el.style.display = "none"
+ }
+ })
+ }
+ },
+}) \ No newline at end of file