aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/around.js17
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();
},