Commit 05dc286c by Kim Eunchul

#39714 andやor検索(or条件修正)

parent cfede9da
......@@ -1074,17 +1074,17 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
}
for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR" || myArray[i] == "or"){
if(myArray[i] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myQuery += ' || (';
}else{
myQuery += ' && (';
}
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true';
count++;
......@@ -1098,7 +1098,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
if(myArray[i] == ")"){
myQuery += ' )';
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || true )';
count++;
......@@ -1109,7 +1109,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
}
}
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true';
count++;
......
......@@ -773,17 +773,17 @@ CONTENTVIEW.searchHandle = function() {
}
for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR" || myArray[i] == "or"){
if(myArray[i] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myQuery += ' || (';
}else{
myQuery += ' && (';
}
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)';
count++;
......@@ -797,7 +797,7 @@ CONTENTVIEW.searchHandle = function() {
if(myArray[i] == ")"){
myQuery += ' )';
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText) )';
count++;
......@@ -808,7 +808,7 @@ CONTENTVIEW.searchHandle = function() {
}
}
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)';
count++;
......
......@@ -302,17 +302,17 @@ HEADER.searchHeaderButtonFunction = function(){
}
for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR" || myArray[i] == "or"){
if(myArray[i] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myQuery += ' || (';
}else{
myQuery += ' && (';
}
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true';
count++;
......@@ -326,7 +326,7 @@ HEADER.searchHeaderButtonFunction = function(){
if(myArray[i] == ")"){
myQuery += ' )';
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || true )';
count++;
......@@ -337,7 +337,7 @@ HEADER.searchHeaderButtonFunction = function(){
}
}
}else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or"){
if(myArray[i - 1] == "OR"){
myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true';
count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment