diff options
-rw-r--r-- | solr-8.3.1/bin/solr-8983.pid | 2 | ||||
-rw-r--r-- | src/client/views/search/SearchBox.tsx | 64 | ||||
-rw-r--r-- | src/client/views/search/SearchItem.tsx | 3 |
3 files changed, 56 insertions, 13 deletions
diff --git a/solr-8.3.1/bin/solr-8983.pid b/solr-8.3.1/bin/solr-8983.pid index 98861a8e1..6a21a128a 100644 --- a/solr-8.3.1/bin/solr-8983.pid +++ b/solr-8.3.1/bin/solr-8983.pid @@ -1 +1 @@ -49593 +918 diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index afc3e7c8b..dd9789a45 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -785,29 +785,48 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc //if true, any keywords can be used. if false, all keywords are required. @action.bound - handleWordQueryChange = () => { + handleWordQueryChange = async() => { this._basicWordStatus = !this._basicWordStatus; + if (this._basicWordStatus) { + let doc = await Cast(this.props.Document.keywords, Doc) + doc!.backgroundColor= "grey"; + + } + else { + let doc = await Cast(this.props.Document.keywords, Doc) + doc!.backgroundColor= "black"; + } } @action.bound - handleNodeChange = () => { + handleNodeChange = async () => { this._nodeStatus = !this._nodeStatus; + if (this._nodeStatus) { this.expandSection(`node${this.props.Document[Id]}`); + let doc = await Cast(this.props.Document.nodes, Doc) + doc!.backgroundColor= "grey"; + } else { this.collapseSection(`node${this.props.Document[Id]}`); + let doc = await Cast(this.props.Document.nodes, Doc) + doc!.backgroundColor= "black"; } } @action.bound - handleKeyChange = () => { + handleKeyChange = async () => { this._keyStatus = !this._keyStatus; if (this._keyStatus) { this.expandSection(`key${this.props.Document[Id]}`); + let doc = await Cast(this.props.Document.keys, Doc) + doc!.backgroundColor= "grey"; } else { this.collapseSection(`key${this.props.Document[Id]}`); + let doc = await Cast(this.props.Document.keys, Doc) + doc!.backgroundColor= "black"; } } @@ -895,13 +914,40 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc } @action.bound - updateTitleStatus() { this._titleFieldStatus = !this._titleFieldStatus; } + updateTitleStatus= async () =>{ this._titleFieldStatus = !this._titleFieldStatus; + if (this._titleFieldStatus){ + let doc = await Cast(this.props.Document.title, Doc) + doc!.backgroundColor= "grey"; + } + else{ + let doc = await Cast(this.props.Document.title, Doc) + doc!.backgroundColor= "black"; + } + } @action.bound - updateAuthorStatus() { this._authorFieldStatus = !this._authorFieldStatus; } + updateAuthorStatus=async () => { this._authorFieldStatus = !this._authorFieldStatus; + if (this._authorFieldStatus){ + let doc = await Cast(this.props.Document.author, Doc) + doc!.backgroundColor= "grey"; + } + else{ + let doc = await Cast(this.props.Document.author, Doc) + doc!.backgroundColor= "black"; + } + } @action.bound - updateDeletedStatus() { this._deletedDocsStatus = !this._deletedDocsStatus; } + updateDeletedStatus=async() =>{ this._deletedDocsStatus = !this._deletedDocsStatus; + if (this._deletedDocsStatus){ + let doc = await Cast(this.props.Document.deleted, Doc) + doc!.backgroundColor= "grey"; + } + else{ + let doc = await Cast(this.props.Document.deleted, Doc) + doc!.backgroundColor= "black"; + } + } addButtonDoc = (doc: Doc) => Doc.AddDocToList(CurrentUserUtils.UserDocument.expandingButtons as Doc, "data", doc); remButtonDoc = (doc: Doc) => Doc.RemoveDocFromList(CurrentUserUtils.UserDocument.expandingButtons as Doc, "data", doc); @@ -1087,10 +1133,9 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc borderRounding: "16px", border:"1px solid grey", color:"white", hovercolor: "rgb(170, 170, 163)", letterSpacing: "2px", _fontSize: 7, }))as any as Doc; - doc.title=button({ title: "Title", onClick:ScriptField.MakeScript("updateTitleStatus(self)")}); + doc.title=button({ backgroundColor:"grey", title: "Title", onClick:ScriptField.MakeScript("updateTitleStatus(self)")}); doc.deleted=button({ title: "Deleted", onClick:ScriptField.MakeScript("updateDeletedStatus(self)")}); - doc.author = button({ title: "Author", onClick:ScriptField.MakeScript("updateAuthorStatus(self)")}); - + doc.author = button({ backgroundColor:"grey", title: "Author", onClick:ScriptField.MakeScript("updateAuthorStatus(self)")}); let buttons = [doc.title as Doc, doc.deleted as Doc, doc.author as Doc]; const dragCreators = Docs.Create.MasonryDocument(buttons, { @@ -1156,7 +1201,6 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc style={{ width: this._searchbarOpen ? "500px" : "100px" }} /> <button className="searchBox-barChild searchBox-filter" style={{transform:"none"}} title="Advanced Filtering Options" onClick={() => this.handleFilterChange()}><FontAwesomeIcon icon="ellipsis-v" color="white" /></button> </div> - <div id={`filterhead${this.props.Document[Id]}`} className="filter-form" style={this._filterOpen && this._numTotalResults >0 ? {overflow:"visible"} : {overflow:"hidden"}}> <div id={`filterhead2${this.props.Document[Id]}`} className="filter-header" > {this.defaultButtons} diff --git a/src/client/views/search/SearchItem.tsx b/src/client/views/search/SearchItem.tsx index 69a2c16cf..425e53510 100644 --- a/src/client/views/search/SearchItem.tsx +++ b/src/client/views/search/SearchItem.tsx @@ -57,8 +57,6 @@ export class SelectorContextMenu extends React.Component<SearchItemProps> { constructor(props: SearchItemProps) { super(props); this.fetchDocuments(); - - } async fetchDocuments() { @@ -152,6 +150,7 @@ export class SearchItem extends ViewBoxBaseComponent<FieldViewProps, SearchSchem super(props); this.rootDoc._viewType= CollectionViewType.Stacking; this.rootDoc._viewType = CollectionViewType.Stacking; + this.props.Document._height=46; if (!this.searchItemTemplate) { // create exactly one presElmentBox template to use by any and all presentations. Doc.UserDoc().searchItemTemplate = new PrefetchProxy(Docs.Create.SearchItemBoxDocument({ title: "search item template", backgroundColor: "transparent", _xMargin: 5, _height: 46, isTemplateDoc: true, isTemplateForField: "data" })); // this script will be called by each presElement to get rendering-specific info that the PresBox knows about but which isn't written to the PresElement |