diff options
-rw-r--r-- | src/client/views/MainView.tsx | 76 | ||||
-rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 2 | ||||
-rw-r--r-- | src/client/views/collections/CollectionSchemaView.scss | 1 | ||||
-rw-r--r-- | src/client/views/search/SearchBox.tsx | 2 |
4 files changed, 39 insertions, 42 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index d479f0f78..4eccbaeb1 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -297,41 +297,40 @@ export class MainView extends React.Component { } @computed get flyout() { - return !this._sidebarContent || !this._flyoutWidth ? (null) : - <div className={`mainView-libraryFlyout${this._flyoutWidth ? "" : "-out"}`} style={{ minWidth: this._flyoutWidth, width: this._flyoutWidth }} > - <div className="mainView-contentArea" > - <DocumentView - Document={this._sidebarContent} - DataDoc={undefined} - LibraryPath={emptyPath} - addDocument={undefined} - addDocTab={this.addDocTabFunc} - pinToPres={emptyFunction} - NativeHeight={returnZero} - NativeWidth={returnZero} - rootSelected={returnTrue} - removeDocument={returnFalse} - onClick={undefined} - ScreenToLocalTransform={this.mainContainerXf} - ContentScaling={returnOne} - PanelWidth={this.flyoutWidthFunc} - PanelHeight={this.getContentsHeight} - renderDepth={0} - focus={emptyFunction} - backgroundColor={this.defaultBackgroundColors} - parentActive={returnTrue} - whenActiveChanged={emptyFunction} - bringToFront={emptyFunction} - docFilters={returnEmptyFilter} - searchFilterDocs={returnEmptyDoclist} - ContainingCollectionView={undefined} - ContainingCollectionDoc={undefined} - relative={true} - forcedBackgroundColor={() => "lightgrey"} - /> - </div> - {this.docButtons} - </div>; + return <div className={`mainView-libraryFlyout${this._flyoutWidth ? "" : "-out"}`} style={{ minWidth: this._flyoutWidth, width: this._flyoutWidth }} > + <div className="mainView-contentArea" > + <DocumentView + Document={this._sidebarContent} + DataDoc={undefined} + LibraryPath={emptyPath} + addDocument={undefined} + addDocTab={this.addDocTabFunc} + pinToPres={emptyFunction} + NativeHeight={returnZero} + NativeWidth={returnZero} + rootSelected={returnTrue} + removeDocument={returnFalse} + onClick={undefined} + ScreenToLocalTransform={this.mainContainerXf} + ContentScaling={returnOne} + PanelWidth={this.flyoutWidthFunc} + PanelHeight={this.getContentsHeight} + renderDepth={0} + focus={emptyFunction} + backgroundColor={this.defaultBackgroundColors} + parentActive={returnTrue} + whenActiveChanged={emptyFunction} + bringToFront={emptyFunction} + docFilters={returnEmptyFilter} + searchFilterDocs={returnEmptyDoclist} + ContainingCollectionView={undefined} + ContainingCollectionDoc={undefined} + relative={true} + forcedBackgroundColor={() => "lightgrey"} + /> + </div> + {this.docButtons} + </div>; } @computed get menuPanel() { @@ -371,19 +370,16 @@ export class MainView extends React.Component { @action selectMenu = (button: Doc) => { const title = StrCast(Doc.GetProto(button).title); - if (this._panelContent === title && this._flyoutWidth) { - this.closeFlyout(); - } else { + this.closeFlyout(); + if (this._panelContent !== title || !this._flyoutWidth) { switch (this._panelContent = title) { case "Settings": SettingsManager.Instance.open(); - this.closeFlyout(); break; case "Catalog": SearchBox.Instance._searchFullDB = "My Stuff"; SearchBox.Instance.newsearchstring = ""; SearchBox.Instance.enter(undefined); - this.closeFlyout(); break; default: this._sidebarContent.proto = button.target as any; diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 0d3a951cf..18ae260e8 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -514,7 +514,7 @@ export class CollectionSchemaCheckboxCell extends CollectionSchemaCell { @observer export class CollectionSchemaButtons extends CollectionSchemaCell { render() { - return !this._rowDoc._searchDoc || ![DocumentType.PDF, DocumentType.RTF].includes(StrCast(this._rowDoc.type) as DocumentType) ? <></> : + return !this.props.Document._searchDoc || ![DocumentType.PDF, DocumentType.RTF].includes(StrCast(this._rowDoc.type) as DocumentType) ? <></> : <div style={{ paddingTop: 8, paddingLeft: 3 }} > <button style={{ padding: 2, left: 77 }} onClick={() => Doc.SearchMatchNext(this._rowDoc, true)}> <FontAwesomeIcon icon="arrow-up" size="sm" /> diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index a8ec1db39..8d2f645d9 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -409,6 +409,7 @@ button.add-column { display: flex; flex-direction: column; justify-content: center; + z-index: 2; &:hover { color: gray; diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index ee38046be..7ce772748 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -381,7 +381,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc Doc.UnBrushDoc(result[0]); Doc.ClearSearchMatches(); }); - close && (this._searchbarOpen = false); + close && (this.open = this._searchbarOpen = false); } @action.bound |