overleaf/services/web/public/coffee/ide/binary-files/BinaryFilesManager.coffee
2014-07-08 12:02:26 +01:00

12 lines
No EOL
354 B
CoffeeScript

define [
"ide/binary-files/controllers/BinaryFileController"
], () ->
class BinaryFilesManager
constructor: (@ide, @$scope) ->
@$scope.$on "entity:selected", (event, entity) =>
if (@$scope.ui.view != "track-changes" and entity.type == "file")
@openFile(entity)
openFile: (file) ->
@$scope.ui.view = "file"
@$scope.openFile = file