Merge pull request #617 from sharelatex/hb-check-for-folders-clientside

Add function to check for existence of folders
This commit is contained in:
Hugh O'Brien 2018-06-04 12:07:25 +01:00 committed by GitHub
commit 63482e0ea0

View file

@ -335,6 +335,11 @@ define [
return null
projectContainsFolder: () ->
for entity in @$scope.rootFolder.children
return true if entity.type == 'folder'
return false
existsInThisFolder: (folder, name) ->
for entity in folder?.children or []
return true if entity.name is name