aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/router.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-05-29 12:04:29 +0100
committerStruan Donald <struan@exo.org.uk>2013-05-29 12:04:29 +0100
commit2769f70663e191eda8762f728020d52e5f9fedfa (patch)
treec51fb498060525dab0b0136094da3421b34a957f /www/js/router.js
parent4922505e4b654cf371142b6058e14a4fd6083008 (diff)
add and use mechanism to allow reverse transitions
Diffstat (limited to 'www/js/router.js')
-rw-r--r--www/js/router.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/www/js/router.js b/www/js/router.js
index 0832599..f14c279 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -2,6 +2,7 @@
_.extend(FMS, {
appRouter: Backbone.Router.extend({
currentView: null,
+ reverse: false,
routes: {
'': 'home',
@@ -38,6 +39,10 @@
}
},
+ reverseTransition: function() {
+ this.reverse = true;
+ },
+
around: function(){
var aroundView = new FMS.AroundView({ model: FMS.currentDraft });
this.changeView(aroundView);
@@ -138,6 +143,10 @@
if ( !this.currentView || this.currentView.id == 'front-page' ) {
options.transition = 'none';
}
+ if ( this.reverse ) {
+ options.reverse = true;
+ }
+ this.reverse = false;
$.mobile.changePage($(view.el), options);