overleaf/services/web/frontend/js/ide/file-tree/controllers/FileTreeController.js
Jakob Ackermann e959529828 Merge pull request #15129 from overleaf/mj-jpa-angular-parameters
[web] Explicitly name angular parameters

GitOrigin-RevId: 91beae68989d6c8122132b531a4338b116d87424
2023-10-16 08:04:25 +00:00

18 lines
446 B
JavaScript

import App from '../../../base'
App.controller('FileTreeController', [
'$scope',
function ($scope) {
$scope.openNewDocModal = () => {
window.dispatchEvent(
new CustomEvent('file-tree.start-creating', { detail: { mode: 'doc' } })
)
}
$scope.orderByFoldersFirst = function (entity) {
if ((entity != null ? entity.type : undefined) === 'folder') {
return '0'
}
return '1'
}
},
])