diff options
| author | bobzel <zzzman@gmail.com> | 2022-07-08 12:37:06 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-07-08 12:37:06 -0400 |
| commit | 5628b585fa6356d66cf2e7454be20e3b847ad22e (patch) | |
| tree | 7836fd781c3cd82c00965d22c6bdf325414ef490 /src/client/views/collections/TreeView.tsx | |
| parent | 146f8622d5bac2edc6b09f57c173bd057dfbcfad (diff) | |
fixes for drawing ink on pdf/image/etc. fixes for showing contextMenu. moved gestureOverlay into main dashboard area to avoid drawing on UI widgets. more code cleanup to put things in reasonable places and avoid importing too much stuff.
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
| -rw-r--r-- | src/client/views/collections/TreeView.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx index eb5faf4e1..5a2103e98 100644 --- a/src/client/views/collections/TreeView.tsx +++ b/src/client/views/collections/TreeView.tsx @@ -31,6 +31,7 @@ import { CollectionTreeView, TreeViewType } from './CollectionTreeView'; import { CollectionView } from './CollectionView'; import './TreeView.scss'; import React = require('react'); +import { ScriptingGlobals } from '../../util/ScriptingGlobals'; export interface TreeViewProps { treeView: CollectionTreeView; @@ -1223,3 +1224,9 @@ export class TreeView extends React.Component<TreeViewProps> { }); } } + +ScriptingGlobals.add(function TreeView_addNewFolder() { + TreeView._editTitleOnLoad = { id: Utils.GenerateGuid(), parent: undefined }; + const opts = { title: 'Untitled folder', _stayInCollection: true, isFolder: true }; + return Doc.AddDocToList(Doc.MyFilesystem, 'data', Docs.Create.TreeDocument([], opts, TreeView._editTitleOnLoad.id)); +}); |
