aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/CurrentUserUtils.ts14
-rw-r--r--src/client/util/DragManager.ts2
2 files changed, 10 insertions, 6 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index e46bb3b3e..60bfc165b 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -381,6 +381,7 @@ export class CurrentUserUtils {
dontUndo: true,
title,
target,
+ dontRegisterView: true,
hidden: hidden ? ComputedField.MakeFunction("IsNoviceMode()") as any : undefined,
_dropAction: "alias",
_removeDropProperties: new List<string>(["dropAction", "_stayInCollection"]),
@@ -399,6 +400,7 @@ export class CurrentUserUtils {
_chromeHidden: true,
backgroundColor: Colors.DARK_GRAY,
boxShadow: "rgba(0,0,0,0)",
+ dontRegisterView: true,
dropConverter: ScriptField.MakeScript("convertToButtons(dragData)", { dragData: DragManager.DocumentDragData.name }),
ignoreClick: true,
_gridGap: 0,
@@ -719,7 +721,7 @@ export class CurrentUserUtils {
];
doc.dockedBtns = CurrentUserUtils.linearButtonList({
title: "docked buttons", _height: 40, flexGap: 0, linearViewFloating: true,
- linearViewIsExpanded: true, linearViewExpandable: true, ignoreClick: true
+ childDontRegisterViews: true, linearViewIsExpanded: true, linearViewExpandable: true, ignoreClick: true
}, btnDescs.map(desc => doc[`dockedBtn-${desc.title}`] as Doc ?? (doc[`dockedBtn-${desc.title}`] = dockBtn({ title: desc.title, ...desc.opts() }))));
}
}
@@ -833,12 +835,13 @@ export class CurrentUserUtils {
});
if (doc.contextMenuBtns === undefined) {
doc.contextMenuBtns = CurrentUserUtils.linearButtonList(
- { title: "menu buttons", flexGap: 0, linearViewIsExpanded: true, ignoreClick: true, linearViewExpandable: false, _height: 35 },
+ { title: "menu buttons", flexGap: 0, childDontRegisterViews: true, linearViewIsExpanded: true, ignoreClick: true, linearViewExpandable: false, _height: 35 },
CurrentUserUtils.contextMenuTools(doc).map(params =>
!params.subMenu ?
btnFunc(params) :
CurrentUserUtils.linearButtonList({
title: params.title,
+ childDontRegisterViews: true,
linearViewSubMenu: true, flexGap: 0, ignoreClick: true,
linearViewExpandable: true, icon: params.title, _height: 30,
linearViewIsExpanded: params.expanded ? !(ComputedField.MakeFunction(params.expanded) as any) : undefined,
@@ -854,6 +857,7 @@ export class CurrentUserUtils {
btnFunc(params) :
CurrentUserUtils.linearButtonList({
title: params.title,
+ childDontRegisterViews: true,
linearViewSubMenu: true, flexGap: 0, ignoreClick: true,
linearViewExpandable: true, icon: params.title, _height: 30,
linearViewIsExpanded: params.expanded ? !(ComputedField.MakeFunction(params.expanded) as any) : undefined,
@@ -919,7 +923,7 @@ export class CurrentUserUtils {
title: "My SharedDocs", childDropAction: "alias", system: true, contentPointerEvents: "all", childLimitHeight: 0, _yMargin: 50, _gridGap: 15,
_showTitle: "title", treeViewHideTitle: true, ignoreClick: true, _lockedPosition: true, "acl-Public": SharingPermissions.Augment, "_acl-Public": SharingPermissions.Augment,
_chromeHidden: true, boxShadow: "0 0",
- explainer: "This is where documents or dashboards that other users have shared with you will appear. To share a document or dashboard right click and select 'Share'"
+ dontRegisterView: true, explainer: "This is where documents or dashboards that other users have shared with you will appear. To share a document or dashboard right click and select 'Share'"
}, sharingDocumentId + "outer", sharingDocumentId);
(sharedDocs as Doc)["acl-Public"] = (sharedDocs as Doc)[DataSym]["acl-Public"] = SharingPermissions.Augment;
}
@@ -943,7 +947,7 @@ export class CurrentUserUtils {
doc.myImportDocs = new PrefetchProxy(Docs.Create.StackingDocument([], {
title: "My Imports", _forceActive: true, buttonMenu: true, buttonMenuDoc: newImportButton, ignoreClick: true, _showTitle: "title", _stayInCollection: true, _hideContextMenu: true, childLimitHeight: 0,
childDropAction: "copy", _autoHeight: true, _yMargin: 50, _gridGap: 15, boxShadow: "0 0", _lockedPosition: true, system: true, _chromeHidden: true,
- explainer: "This is where documents that are Imported into Dash will go."
+ dontRegisterView: true, explainer: "This is where documents that are Imported into Dash will go."
}));
}
}
@@ -952,7 +956,7 @@ export class CurrentUserUtils {
static setupSearchSidebar(doc: Doc) {
if (doc.mySearchPanel === undefined) {
doc.mySearchPanel = new PrefetchProxy(Docs.Create.SearchDocument({
- backgroundColor: "dimgray", ignoreClick: true, _searchDoc: true,
+ dontRegisterView: true, backgroundColor: "dimgray", ignoreClick: true, _searchDoc: true,
childDropAction: "alias", _lockedPosition: true, _viewType: CollectionViewType.Schema, title: "Search Panel", system: true
})) as any as Doc;
}
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 9f8c49081..c3c6c22df 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -455,7 +455,7 @@ export namespace DragManager {
if (dragData instanceof DocumentDragData) {
dragData.userDropAction = e.ctrlKey && e.altKey ? "copy" : e.ctrlKey ? "alias" : dragData.defaultDropAction;
}
- if (((e.target as any)?.className === "lm_tabs" || e?.shiftKey) && dragData.draggedDocuments.length === 1) {
+ if (((e.target as any)?.className === "lm_tabs" || ((e.target as any)?.className === "lm_header" || e?.shiftKey) && dragData.draggedDocuments.length === 1) {
if (!startWindowDragTimer) {
startWindowDragTimer = setTimeout(async () => {
startWindowDragTimer = undefined;