aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-03 21:53:05 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-03 21:53:05 -0400
commit0a6def774881f8b0c4164b8638e3f266f232ff07 (patch)
treeb30792244447b8712330e9d837f56adb7dfc48cd /src
parentf82c74fe04e52bd02f24ab445a5c24ce2ed1392d (diff)
fixed queryView template a bit.
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/Documents.ts1
-rw-r--r--src/client/views/collections/CollectionView.tsx2
-rw-r--r--src/client/views/nodes/QueryBox.tsx2
-rw-r--r--src/client/views/search/SearchBox.scss2
-rw-r--r--src/server/authentication/models/current_user_utils.ts8
5 files changed, 8 insertions, 7 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 0a2269bac..c5b080ffb 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -103,6 +103,7 @@ export interface DocumentOptions {
isDisplayPanel?: boolean; // whether the panel functions as GoldenLayout "stack" used to display documents
forceActive?: boolean;
layout?: string | Doc;
+ hideFilterView?: boolean; // whether to hide the filter popout on collections
hideHeadings?: boolean; // whether stacking view column headings should be hidden
isTemplateForField?: string; // the field key for which the containing document is a rendering template
isTemplateDoc?: boolean;
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 3913ccd88..23d701ffd 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -463,7 +463,7 @@ export class CollectionView extends Touchable<FieldViewProps> {
Utils.CorsProxy(Cast(d.data, ImageField)!.url.href) : Cast(d.data, ImageField)!.url.href
:
""))}
- {!this.props.isSelected() || this.props.PanelHeight() < 100 ? (null) :
+ {!this.props.isSelected() || this.props.PanelHeight() < 100 || this.props.Document.hideFilterView ? (null) :
<div className="collectionTimeView-dragger" key="dragger" onPointerDown={this.onPointerDown} style={{ transform: `translate(${this.facetWidth()}px, 0px)` }} >
<span title="library View Dragger" style={{ width: "5px", position: "absolute", top: "0" }} />
</div>
diff --git a/src/client/views/nodes/QueryBox.tsx b/src/client/views/nodes/QueryBox.tsx
index 566c07dfe..7016b4f04 100644
--- a/src/client/views/nodes/QueryBox.tsx
+++ b/src/client/views/nodes/QueryBox.tsx
@@ -27,7 +27,7 @@ export class QueryBox extends DocAnnotatableComponent<FieldViewProps, QueryDocum
render() {
const dragging = !SelectionManager.GetIsDragging() ? "" : "-dragging";
- return <div className={`queryBox${dragging}`} >
+ return <div className={`queryBox${dragging}`} onWheel={(e) => e.stopPropagation()} >
<SearchBox id={this.props.Document[Id]} searchQuery={StrCast(this.dataDoc.searchQuery)} filterQquery={StrCast(this.dataDoc.filterQuery)} />
</div >;
}
diff --git a/src/client/views/search/SearchBox.scss b/src/client/views/search/SearchBox.scss
index ec4eda643..f0223ca76 100644
--- a/src/client/views/search/SearchBox.scss
+++ b/src/client/views/search/SearchBox.scss
@@ -9,7 +9,7 @@
position: absolute;
font-size: 10px;
line-height: 1;
- overflow: hidden;
+ overflow: auto;
background: lightgrey,
}
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts
index 5b49e3c2d..e34a9b958 100644
--- a/src/server/authentication/models/current_user_utils.ts
+++ b/src/server/authentication/models/current_user_utils.ts
@@ -251,7 +251,7 @@ export class CurrentUserUtils {
return Docs.Create.ButtonDocument({
_width: 50, _height: 25, title: "Search", fontSize: 10, dontDecorateSelection: true,
letterSpacing: "0px", textTransform: "unset", borderRounding: "5px 5px 0px 0px", boxShadow: "3px 3px 0px rgb(34, 34, 34)",
- sourcePanel: Docs.Create.QueryDocument({ title: "search stack", }),
+ sourcePanel: Docs.Create.QueryDocument({ title: "search stack", }),
targetContainer: sidebarContainer,
lockedPosition: true,
onClick: ScriptField.MakeScript("this.targetContainer.proto = this.sourcePanel")
@@ -278,12 +278,12 @@ export class CurrentUserUtils {
/// sets up the default list of buttons to be shown in the expanding button menu at the bottom of the Dash window
static setupExpandingButtons(doc: Doc) {
- const queryTemplate = Docs.Create.MultirowDocument(
+ const queryTemplate = Docs.Create.MulticolumnDocument(
[
Docs.Create.QueryDocument({ title: "query", _height: 200 }),
- Docs.Create.FreeformDocument([], { title: "data", _height: 100, _LODdisable: true, forceActive: true})
+ Docs.Create.FreeformDocument([], { title: "data", _height: 100, _LODdisable: true, forceActive: true })
],
- { _width: 400, _height: 300, title: "queryView", _chromeStatus: "disabled", _xMargin: 3, _yMargin: 3, _autoHeight: false, forceActive: true });
+ { _width: 400, _height: 300, title: "queryView", _chromeStatus: "disabled", _xMargin: 3, _yMargin: 3, _autoHeight: false, forceActive: true, hideFilterView: true });
queryTemplate.isTemplateDoc = makeTemplate(queryTemplate);
const slideTemplate = Docs.Create.MultirowDocument(
[