2020-05-19 09:02:56 +00:00
|
|
|
import App from '../../../base'
|
2021-06-15 08:32:03 +00:00
|
|
|
App.controller('FileTreeController', function ($scope) {
|
|
|
|
$scope.openNewDocModal = () => {
|
|
|
|
window.dispatchEvent(
|
|
|
|
new CustomEvent('file-tree.start-creating', { detail: { mode: 'doc' } })
|
2021-04-14 13:17:21 +00:00
|
|
|
)
|
2020-05-19 09:02:56 +00:00
|
|
|
}
|
2021-04-14 13:17:21 +00:00
|
|
|
|
2021-06-15 08:32:03 +00:00
|
|
|
$scope.orderByFoldersFirst = function (entity) {
|
|
|
|
if ((entity != null ? entity.type : undefined) === 'folder') {
|
|
|
|
return '0'
|
2020-05-19 09:02:56 +00:00
|
|
|
}
|
2021-06-15 08:32:03 +00:00
|
|
|
return '1'
|
2020-11-26 14:22:30 +00:00
|
|
|
}
|
2020-05-19 09:02:56 +00:00
|
|
|
})
|