diff options
| author | Rene Ae <aehtyb@gmail.com> | 2015-12-04 20:32:44 -0600 |
|---|---|---|
| committer | Rene Ae <aehtyb@gmail.com> | 2015-12-04 20:32:44 -0600 |
| commit | 10efb0f7b426426057fed757fe3c851a249358dd (patch) | |
| tree | b80e285251d30fbca36220c932ef180c29c55dcf /StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js | |
| parent | 015b58ff6845b5cb79b13fec109a37b4c10c7813 (diff) | |
android build
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js')
| -rwxr-xr-x | StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js b/StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js new file mode 100755 index 00000000..74b249e6 --- /dev/null +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js @@ -0,0 +1,40 @@ +var FooterView = View.extend({ + + el: "#footer", + + events: { + "click .ok": "ok", + "click .cancel": "cancel", + }, + + initialize: function(){ + this.$ok = this.$(".ok") + this.$cancel = this.$(".cancel") + }, + + 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() + }, + + hide: function(){ + this.$el.hide() + }, + + ok: function(){ + (app.view.save || app.view.ok).bind(app.view)() + }, + + cancel: function(){ + app.view.cancel ? app.view.cancel() : app.intro.show() + }, + +})
\ No newline at end of file |
