summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-24 20:57:41 -0500
committerJules Laplace <jules@okfoc.us>2015-11-24 20:57:41 -0500
commit612561818f907f0f9988247c82ec158ba4494986 (patch)
tree8bbc773dad7a6364cbdb8aed2ef4cab04854f49a /StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js
parentd548a7d02ce6349ca9a820b6824e4374b759812b (diff)
build
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js36
1 files changed, 23 insertions, 13 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js b/StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js
index 76126102..74b249e6 100644
--- a/StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/nav/FooterView.js
@@ -3,28 +3,38 @@ var FooterView = View.extend({
el: "#footer",
events: {
- "click .filter": "filter",
- "click .buynow": "buynow",
- "click .addtocart": "addtocart",
+ "click .ok": "ok",
"click .cancel": "cancel",
- "click .checkout": "checkout",
- "click .checkout_proceed": "checkout_proceed",
},
initialize: function(){
+ this.$ok = this.$(".ok")
+ this.$cancel = this.$(".cancel")
},
- filter: function(){
+ show: function(ok, cancel){
+ if (cancel) {
+ this.$ok.removeClass("wide")
+ this.$cancel.show().html(cancel)
+ }
+ else {
+ this.$ok.addClass("wide")
+ this.$cancel.hide()
+ }
+ this.$ok.html(ok)
+ this.$el.show()
},
- buynow: function(){
+
+ hide: function(){
+ this.$el.hide()
},
- addtocart: function(){
+
+ ok: function(){
+ (app.view.save || app.view.ok).bind(app.view)()
},
+
cancel: function(){
+ app.view.cancel ? app.view.cancel() : app.intro.show()
},
- checkout: function(){
- },
- checkout_proceed: function(){
- },
-
+
}) \ No newline at end of file