diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-08 13:49:55 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-08 18:52:47 +0100 |
commit | bd3a482f3c268c6f4e31c4be0e9b2b8d6045b680 (patch) | |
tree | 3fbfc78688a6b792fc4f015cc17dc772ff9bcb8d /www/js/views/fms.js | |
parent | 9f979f491570c6bbff8735bcfa391430543d0041 (diff) |
if geolocation fails display search page with message
Diffstat (limited to 'www/js/views/fms.js')
-rw-r--r-- | www/js/views/fms.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/www/js/views/fms.js b/www/js/views/fms.js index a1c6dd7..d701b00 100644 --- a/www/js/views/fms.js +++ b/www/js/views/fms.js @@ -16,11 +16,18 @@ return; } template = _.template( tpl.get( this.template ) ); + var args = null; + if ( this.options.msg ) { + args = { msg: this.options.msg }; + } if ( this.model ) { - this.$el.html(template(this.model.toJSON())); - } else { - this.$el.html(template()); + if ( args ) { + args.model = this.model.toJSON(); + } else { + args = this.model.toJSON(); + } } + this.$el.html(template(args)); this.afterRender(); return this; }, |