mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge branch 'sk-fix-folder-creation'
This commit is contained in:
commit
0555154a24
2 changed files with 4 additions and 2 deletions
|
@ -96,8 +96,10 @@ module.exports = EditorHttpController =
|
|||
EditorController.addFolder project_id, parent_folder_id, name, "editor", (error, doc) ->
|
||||
if error == "project_has_to_many_files"
|
||||
res.status(400).json(req.i18n.translate("project_has_to_many_files"))
|
||||
else if error?.message == 'invalid element name'
|
||||
res.status(400).json(req.i18n.translate('invalid_file_name'))
|
||||
else if error?
|
||||
next(error)
|
||||
res.status(500).json(req.i18n.translate('generic_something_went_wrong'))
|
||||
else
|
||||
res.json doc
|
||||
|
||||
|
|
|
@ -93,11 +93,11 @@ define [
|
|||
if !name? or name.length == 0
|
||||
return
|
||||
$scope.state.inflight = true
|
||||
$scope.state.inflight = true
|
||||
ide.fileTreeManager
|
||||
.createFolder(name, parent_folder)
|
||||
.error (e)->
|
||||
$scope.error = e
|
||||
$scope.state.inflight = false
|
||||
.success () ->
|
||||
$scope.state.inflight = false
|
||||
$modalInstance.close()
|
||||
|
|
Loading…
Reference in a new issue