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