Skip to content

Commit

Permalink
Merge pull request #158 from bioinformatics-ua/bug/search-keyword-query
Browse files Browse the repository at this point in the history
Improve check for keyword-based queries in Search
  • Loading branch information
bastiao committed Nov 4, 2015
2 parents 9d896d1 + e5bed07 commit dc96ea6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,8 @@ var Search = React.createClass({
requestedQuery: params
})
},
isKeyword: function(freetext){
for(var i=0; i<DimFields.length;i++) {
if((freetext.indexOf(DimFields[i])) != -1) {
return true;
}
}
isKeyword: function(freetext) {
return !!freetext.match(/[^\s\\]:\S/);
},
isAutocompletOpened:function(){
if($('.ui-autocomplete').css('display')==='none'){return false;}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var DimFields = [
,"StudyDate"
,"PatientTelephoneNumbers"
,"SOPInstanceUID"
,"PatientName"];
,"PatientName"
,"SliceLocation"];

export {DimFields};
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"react-bootstrap": "^0.25.2",
"react-bootstrap-table": "^0.9.17",
"react-imageloader": "~2.0.0",
"react-router": "^1.0.0-rc1",
"react-router": "^1.0.0-rc4",
"react-router-bootstrap": "^0.19.3",
"reflux": "^0.2.12",
"rimraf": "latest",
Expand All @@ -77,10 +77,10 @@
"css": "sass sass/dicoogle.scss:css/dicoogle.css",
"html": "htmlprocessor index-template.html -o index.html -e dist -s",
"debug": "parallelshell \"npm run js-debug\" \"npm run html-debug\"",
"js-debug": "NODE_ENV=development DICOOGLE_BASE_URL=\"http://localhost:8080\" browserify -d -r react -r dicoogle-webcore . > js/bundle.js",
"js-debug": "NODE_ENV=development browserify -d -r react -r dicoogle-webcore . > js/bundle.js",
"html-debug": "htmlprocessor index-template.html -o index.html -e dev -s",
"css:watch": "sass --watch sass/dicoogle.scss:css/dicoogle.css",
"js:watch": "NODE_ENV=development DICOOGLE_BASE_URL=\"http://localhost:8080\" watchify -o js/bundle.js -v -d -r react -r dicoogle-webcore .",
"js:watch": "NODE_ENV=development watchify -o js/bundle.js -v -d -r react -r dicoogle-webcore .",
"test": "jest",
"clean": "rimraf js/bundle.js js/bundle.min.js css/dicoogle.css css/dicoogle.css.map index.html"
},
Expand Down

0 comments on commit dc96ea6

Please sign in to comment.