aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/search/CheckBox.scss13
-rw-r--r--src/client/views/search/SearchBox.tsx31
2 files changed, 19 insertions, 25 deletions
diff --git a/src/client/views/search/CheckBox.scss b/src/client/views/search/CheckBox.scss
index 3f1126948..582d24e72 100644
--- a/src/client/views/search/CheckBox.scss
+++ b/src/client/views/search/CheckBox.scss
@@ -20,6 +20,15 @@
border-style: solid;
border-color: $alt-accent;
border-width: 2px;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+ }
+
+ .check-container:hover ~ .check-box {
+ background-color: $intermediate-color;
+
}
.check-container {
@@ -29,10 +38,6 @@
z-index: 1000;
}
- .box:hover {
- background-color: $intermediate-color;
- }
-
.checkmark {
z-index: 1000;
position: absolute;
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 546d58356..4ebd9c5e4 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -2,7 +2,7 @@ import * as React from 'react';
import { observer } from 'mobx-react';
import { observable, action, runInAction } from 'mobx';
import "./SearchBox.scss";
-import { faSearch, faFilePdf, faFilm, faImage, faObjectGroup, faStickyNote, faMusic, faLink, faChartBar, faGlobeAsia, faBan, faThList } from '@fortawesome/free-solid-svg-icons';
+import { faSearch, faFilePdf, faFilm, faImage, faObjectGroup, faStickyNote, faMusic, faLink, faChartBar, faGlobeAsia, faBan, faThList, faWineGlassAlt } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { library } from '@fortawesome/fontawesome-svg-core';
import * as rp from 'request-promise';
@@ -216,30 +216,19 @@ export class SearchBox extends React.Component {
addCollectionFilter(query: string): string {
let collections: Doc[] = this.getCurCollections();
- console.log("collections", collections)
- let finalQuery: string = "";
let oldWords = query.split(" ");
- let newWords: string[] = [];
- oldWords.forEach(word => {
- collections.forEach(doc => {
- let proto = doc.proto;
- let protoId = (proto || doc)[Id];
- // console.log(StrCast(doc.title), protoId);
- let colString: string = "+{!join from=data_l to=id}id:" + protoId + " ";
- //{!join from=data_l to=id}id:{collectionProtoId}
- let newWrd: string = colString + word;
- // console.log(newWrd);
- newWords.push(newWrd);
- });
+ let collectionString: string[] = [];
+ collections.forEach(doc => {
+ let proto = doc.proto;
+ let protoId = (proto || doc)[Id];
+ let colString: string = "{!join from=data_l to=id}id:" + protoId + " ";
+ collectionString.push(colString);
});
- console.log(newWords)
-
- query = newWords.join(" ");
-
- return query;
- // const protoId = (proto || doc)[Id];
+ let finalColString = collectionString.join(" ");
+ finalColString = finalColString.trim();
+ return "+(" + finalColString + ")" + query;
}
@action