diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-10 17:15:14 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-10 17:15:14 +0200 |
| commit | 2fb2e09bb24340a7cc33ae30037f45125791131c (patch) | |
| tree | 45afccf7b9455ab48f7725a24bae5c28ad02ca9e /StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js | |
| parent | 6196541cf993d5a1a4b8b7f511bf7daf8f849608 (diff) | |
androidz
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 | 41 |
1 files changed, 41 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..8641668f --- /dev/null +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/FooterView.js @@ -0,0 +1,41 @@ +var FooterView = View.extend({ + + el: "#footer", + + events: { + "click .ok": "ok", + "click .cancel": "cancel", + }, + + initialize: function(){ + this.$ok = this.$(".ok") + this.$cancel = this.$(".cancel") + this.hide() + }, + + 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 |
