summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-11 05:37:34 -0600
committerJules Laplace <jules@okfoc.us>2015-12-11 05:37:34 -0600
commitaa5a9b7c7cd52a69f8dd1d0cdc15475e113e6da0 (patch)
treececfdb0893eb9e936fe605478b3f8195dc7ef987 /StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js
parent4178c44c48aa401f7780bec3f89430c83d50fe30 (diff)
remembered a couple things, push 0.3.4
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js')
-rwxr-xr-xStoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js b/StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js
index 0de80048..0d6fa807 100755
--- a/StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js
+++ b/StoneIsland/platforms/android/assets/www/js/lib/account/SettingsView.js
@@ -3,22 +3,38 @@ var SettingsView = FormView.extend({
el: "#settings",
events: {
+ "change [name=store]": "changeStore",
+ "change [name=hub]": "changeHub",
},
initialize: function(){
this.$form = this.$("form")
this.$msg = this.$(".msg")
+ this.$store = this.$("[name=store]")
+ this.$hub = this.$("[name=hub]")
this.scroller = new IScroll('#settings', app.iscroll_options)
},
show: function(){
if (! auth.logged_in()) { return app.router.go("intro") }
- app.footer.show("SAVE")
document.body.className = "settings"
this.deferScrollToTop()
+
+ this.$store.prop("checked", !! push.settings.store)
+ this.$hub.prop("checked", !! push.settings.hub)
+ // push.subscribe("store")
+ // push.subscribe("hub")
},
-
- save: function(){
+
+ changeStore: function(){
+ var state = app.settings.$store.prop("checked")
+ if (state) { push.subscribe("store") }
+ else { push.unsubscribe('store') }
+ },
+ changeHub: function(){
+ var state = app.settings.$hub.prop("checked")
+ if (state) { push.subscribe("hub") }
+ else { push.unsubscribe('hub') }
},
}) \ No newline at end of file