mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Show file names in overview panel
This commit is contained in:
parent
4a93e02407
commit
7a8af8a21a
2 changed files with 10 additions and 1 deletions
|
@ -43,7 +43,7 @@
|
|||
ng-repeat="(doc_id, entries) in reviewPanel.entries"
|
||||
)
|
||||
.rp-overview-file-header
|
||||
| {{ doc_id }}
|
||||
| {{ getFileName(doc_id) }}
|
||||
.rp-entry-wrapper(
|
||||
ng-repeat="(entry_id, entry) in entries"
|
||||
)
|
||||
|
|
|
@ -151,6 +151,15 @@ define [
|
|||
console.log "Going to entry", entry.docPos
|
||||
ide.editorManager.openDocId(doc_id, { gotoLine: entry.docPos.row + 1, gotoColumn: entry.docPos.column })
|
||||
|
||||
DOC_ID_NAMES = {}
|
||||
$scope.getFileName = (doc_id) ->
|
||||
# This is called a lot and is relatively expensive, so cache the result
|
||||
if !DOC_ID_NAMES[doc_id]?
|
||||
entity = ide.fileTreeManager.findEntityById(doc_id)
|
||||
return if !entity?
|
||||
DOC_ID_NAMES[doc_id] = ide.fileTreeManager.getEntityPath(entity)
|
||||
return DOC_ID_NAMES[doc_id]
|
||||
|
||||
# TODO: Eventually we need to get this from the server, and update it
|
||||
# when we get an id we don't know. This'll do for client side testing
|
||||
refreshUsers = () ->
|
||||
|
|
Loading…
Reference in a new issue