diff options
author | Struan Donald <struan@exo.org.uk> | 2013-05-23 11:59:33 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-05-23 11:59:33 +0100 |
commit | b8f2604405099d7a6c9dc25bb64b64f0de925bf9 (patch) | |
tree | 0e838a91834d4bdc6cb9ca2c9c1dfdbd5a058dd4 /www/js | |
parent | 4c631bda31d226cba1058879b9bf173b6beaf3d1 (diff) |
make sign in/out button work
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/views/around.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js index 6fcb426..ce4feab 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -9,7 +9,7 @@ 'pagebeforeshow': 'beforeDisplay', 'pageshow': 'afterDisplay', 'click #locate_search': 'goSearch', - 'click #login': 'goLogin', + 'click #login-options': 'goLogin', 'click #reports': 'goReports', 'click #search': 'goSearch', 'click #relocate': 'centerMapOnPosition', @@ -18,6 +18,21 @@ 'click #mark-here': 'onClickMark' }, + render: function(){ + if ( !this.template ) { + console.log('no template to render'); + return; + } + template = _.template( tpl.get( this.template ) ); + if ( this.model ) { + this.$el.html(template({ model: this.model.toJSON(), user: FMS.currentUser.toJSON() })); + } else { + this.$el.html(template()); + } + this.afterRender(); + return this; + }, + beforeDisplay: function() { $('#cancel').hide(); }, |