From d8d7eb2172de6805e3094ceb8fc2e7868c98a398 Mon Sep 17 00:00:00 2001 From: opi Date: Sun, 11 Oct 2015 07:40:19 +0200 Subject: [PATCH] [fix] Allow view without slide. Use it instead of redirect on API fail. --- src/js/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/app.js b/src/js/app.js index a5bdfbc1..932a1e0e 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -198,7 +198,7 @@ var app = Sammy('#main', function (sam) { } if (uri !== '/postinstall') { store.clear('slide'); - c.redirect(store.get('path-1')); + c.view(store.get('path-1'), null, null, false); } }); }; @@ -230,11 +230,11 @@ var app = Sammy('#main', function (sam) { }, // Render view (cross-browser) - view: function (view, data, callback) { + view: function (view, data, callback, enableSlide) { callback = typeof callback !== 'undefined' ? callback : function() {}; rendered = this.render('views/'+ view +'.ms', data); - enableSlide = true; // Change to false to disable animation + enableSlide = (typeof callback !== 'undefined') ? enableSlide : true; // Change to false to disable animation loaded = true; $('div.loader').remove();