aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-23 17:43:57 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-23 17:43:57 +0100
commit00b45e897166184fe8f6f6e9d09333f6ed3298bb (patch)
tree16cf77c010fe8744978ed9370a79ea5418597df1 /www/js
parent8a0b2e67a070564d2e221b4c39080517772a855d (diff)
do not use transitions when navigating from front page
Diffstat (limited to 'www/js')
-rw-r--r--www/js/router.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/www/js/router.js b/www/js/router.js
index 269f2e7..b7b9539 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -114,7 +114,15 @@
}
view.render();
$('body').append($(view.el));
- $.mobile.changePage($(view.el), { changeHash: false });
+
+ // if we are coming from the front page then we don't want to do
+ // any transitions as they just add visual distraction to no end
+ var options = { changeHash: false };
+ if ( !this.currentView || this.currentView.id == 'front-page' ) {
+ options.transition = 'none';
+ }
+
+ $.mobile.changePage($(view.el), options);
console.log('changed View to ' + view.id);
this.currentView = view;