mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Save folder expansion state to local storage
This commit is contained in:
parent
cc0d45c678
commit
6f17e0bb82
1 changed files with 2 additions and 1 deletions
|
@ -2,10 +2,11 @@ define [
|
||||||
"base"
|
"base"
|
||||||
], (App) ->
|
], (App) ->
|
||||||
App.controller "FileTreeFolderController", ["$scope", "ide", "$modal", ($scope, ide, $modal) ->
|
App.controller "FileTreeFolderController", ["$scope", "ide", "$modal", ($scope, ide, $modal) ->
|
||||||
$scope.expanded = false
|
$scope.expanded = $.localStorage("folder.#{$scope.entity.id}.expanded") or false
|
||||||
|
|
||||||
$scope.toggleExpanded = () ->
|
$scope.toggleExpanded = () ->
|
||||||
$scope.expanded = !$scope.expanded
|
$scope.expanded = !$scope.expanded
|
||||||
|
$.localStorage("folder.#{$scope.entity.id}.expanded", $scope.expanded)
|
||||||
|
|
||||||
$scope.onDrop = (events, ui) ->
|
$scope.onDrop = (events, ui) ->
|
||||||
source = $(ui.draggable).scope().entity
|
source = $(ui.draggable).scope().entity
|
||||||
|
|
Loading…
Reference in a new issue