summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/nav
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-12 00:14:04 -0500
committerJules Laplace <jules@okfoc.us>2015-11-12 00:24:41 -0500
commite474ead4fde530b1cb52f96e827269371120cb89 (patch)
treeaced17c219763f6839f6bb5bd916ce1a1477ffa6 /StoneIsland/www/js/lib/nav
parente8a2441a1d53648906904d0e7e048502c2eca6e0 (diff)
form serialization class
Diffstat (limited to 'StoneIsland/www/js/lib/nav')
-rw-r--r--StoneIsland/www/js/lib/nav/AddressView.js8
-rw-r--r--StoneIsland/www/js/lib/nav/FooterView.js4
2 files changed, 7 insertions, 5 deletions
diff --git a/StoneIsland/www/js/lib/nav/AddressView.js b/StoneIsland/www/js/lib/nav/AddressView.js
index 4ccc263c..fd482378 100644
--- a/StoneIsland/www/js/lib/nav/AddressView.js
+++ b/StoneIsland/www/js/lib/nav/AddressView.js
@@ -1,5 +1,5 @@
-var AddressView = View.extend({
+var AddressView = SerializableView.extend({
template: $("#address_template").html(),
@@ -8,7 +8,9 @@ var AddressView = View.extend({
initialize: function(opt){
this.parent = opt.parent
- this.parent.$(".address").html(this.template)
+ this.$el = this.parent.$(".address")
+ this.el = this.$el[0]
+ this.$el.html(this.template)
},
populate: function(data){
@@ -21,7 +23,7 @@ var AddressView = View.extend({
deserialize: function(){
},
- serialize: function(){
+ validate: function(){
},
})
diff --git a/StoneIsland/www/js/lib/nav/FooterView.js b/StoneIsland/www/js/lib/nav/FooterView.js
index 7f404581..74b249e6 100644
--- a/StoneIsland/www/js/lib/nav/FooterView.js
+++ b/StoneIsland/www/js/lib/nav/FooterView.js
@@ -30,11 +30,11 @@ var FooterView = View.extend({
},
ok: function(){
- (app.view.save || app.view.ok)()
+ (app.view.save || app.view.ok).bind(app.view)()
},
cancel: function(){
- (app.view.cancel || app.intro.show)()
+ app.view.cancel ? app.view.cancel() : app.intro.show()
},
}) \ No newline at end of file