From 93b3bded0286b2ec2e8b2f8210590ae7d052f09f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 11 Nov 2015 02:28:43 -0500 Subject: make footer better --- StoneIsland/www/js/lib/nav/FooterView.js | 38 +++++++++++++++++++------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'StoneIsland/www/js/lib/nav/FooterView.js') 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 -- cgit v1.2.3-70-g09d2