import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';

export default Ember.Route.extend(ApplicationRouteMixin, {

    actions: {
        sessionInvalidationSucceeded: function () {
            // Force reload to empty all cached data
            window.location = 'http://' + document.location.host;
        },

        toggleSidebar: function () {
            var slideOut = ($('#sidebar-container').css('left') !== '-250px') ? true : false;

            if (slideOut === true) {
                $('#sidebar-container').animate({
                   left: '-250px'
                }, { duration: 200, queue: false });
                $('#main-content').animate({
                   marginLeft: '0px',
                   marginRight: '0px'
                }, { duration: 200, queue: false });
                $('#navbar').animate({
                   marginLeft: '0px',
                   marginRight: '0px'
                }, { duration: 200, queue: false });
            } else {
                $('#sidebar-container').animate({
                   left: '0px'
                }, { duration: 200, queue: false });
                $('#main-content').animate({
                   marginLeft: '250px',
                   marginRight: '-250px'
                }, { duration: 200, queue: false });
                $('#navbar').animate({
                   marginLeft: '250px',
                   marginRight: '-250px'
                }, { duration: 200, queue: false });
            }
        }
    }
});

@@ -99,16 +99,54 @@
 -mixin';
+%0Aimport mobile from '../utils/mobile';
 %0A%0Aexport
@@ -274,20 +274,16 @@
         
-    
 // Force
@@ -315,20 +315,16 @@
 ed data%0A
-    
         
@@ -518,16 +518,83 @@
  : false
+,%0A                rightIndent = (mobile.matches) ? '-250px' : '0px'
 ;%0A%0A     
@@ -690,24 +690,25 @@
             
+ 
 left: '-250p
@@ -819,32 +819,33 @@
                 
+ 
 marginLeft: '0px
@@ -839,32 +839,33 @@
 ginLeft: '0px',%0A
+ 
                 
@@ -989,32 +989,33 @@
                 
+ 
 marginLeft: '0px
@@ -1009,32 +1009,33 @@
 ginLeft: '0px',%0A
+ 
                 
@@ -1195,24 +1195,25 @@
             
+ 
 left: '0px'%0A
@@ -1321,32 +1321,33 @@
                 
+ 
 marginLeft: '250
@@ -1362,32 +1362,33 @@
                 
+ 
 marginRight: '-2
@@ -1380,32 +1380,35 @@
 arginRight: 
-'-250px'
+rightIndent
 %0A           
@@ -1499,32 +1499,33 @@
                 
+ 
 marginLeft: '250
@@ -1540,32 +1540,33 @@
                 
+ 
 marginRight: '-2
@@ -1562,24 +1562,27 @@
 nRight: 
-'-250px'
+rightIndent
 %0A       
@@ -1651,18 +1651,14 @@
       %7D%0A
-    
 %7D%0A%7D);%0A

Fix Incorrect Sliding Behavior