summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/nav/FooterView.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/nav/FooterView.js')
-rw-r--r--StoneIsland/www/js/lib/nav/FooterView.js38
1 files changed, 23 insertions, 15 deletions
diff --git a/StoneIsland/www/js/lib/nav/FooterView.js b/StoneIsland/www/js/lib/nav/FooterView.js
index 414dc4c1..7f404581 100644
--- a/StoneIsland/www/js/lib/nav/FooterView.js
+++ b/StoneIsland/www/js/lib/nav/FooterView.js
@@ -3,30 +3,38 @@ var FooterView = View.extend({
el: "#footer",
events: {
- "click .filter": "filter",
- "click .back": "back",
+ "click .ok": "ok",
"click .cancel": "cancel",
-
- "click .save": "ok",
- "click .buynow": "ok",
- "click .addtocart": "ok",
- "click .checkout": "ok",
- "click .checkout_proceed": "ok",
},
initialize: function(){
+ this.$ok = this.$(".ok")
+ this.$cancel = this.$(".cancel")
},
- filter: function(){
- },
- back: function(){
- app.router.go('store')
+ 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()
},
- cancel: function(){
+
+ hide: function(){
+ this.$el.hide()
},
-
+
ok: function(){
- (app.view.save || app.view.submit || noop)()
+ (app.view.save || app.view.ok)()
},
+ cancel: function(){
+ (app.view.cancel || app.intro.show)()
+ },
+
}) \ No newline at end of file