Skip to content

Commit

Permalink
Merge pull request #723 from nextcloud/feature-631/remember-side-menu…
Browse files Browse the repository at this point in the history
…-state

Deck now remembers the side menu state
  • Loading branch information
juliusknorr authored Nov 23, 2018
2 parents 7963f7f + c65a915 commit 2ecba36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions js/.jshintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"esversion": 6,

"globals": {
"jasmine" : false,
"spyOn" : false,
Expand All @@ -21,7 +23,6 @@
"devel" : true,
"eqeqeq" : true,
"eqnull" : false,
"es5" : true,
"evil" : false,
"forin" : true,
"immed" : true,
Expand All @@ -39,7 +40,6 @@
"plusplus" : false,
"quotmark" : "single",
"regexp" : false,
"strict" : true,
"sub" : true,
"trailing" : true,
"undef" : true,
Expand Down
8 changes: 4 additions & 4 deletions js/controller/AppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import app from '../app/App.js';

/** global: OC */
/* globals oc_current_user: false */
app.controller('AppController', function ($scope, $location, $http, $log, $rootScope, $attrs) {
$rootScope.sidebar = {
show: false
Expand All @@ -32,13 +32,13 @@ app.controller('AppController', function ($scope, $location, $http, $log, $rootS
$rootScope.config = JSON.parse($attrs.config);

$rootScope.compactMode = localStorage.getItem('deck.compactMode') === 'true';

$scope.appNavigationHide = false;
$scope.appNavigationHide = localStorage.getItem('deck.appNavigationHide') === 'true';

$scope.toggleSidebar = function() {
if ($(window).width() > 768) {
$log.debug($scope.appNavigationHide);
$scope.appNavigationHide = !$scope.appNavigationHide;
console.log($scope.appNavigationHide);
localStorage.setItem('deck.appNavigationHide', JSON.stringify($scope.appNavigationHide));
}
};
});

0 comments on commit 2ecba36

Please sign in to comment.