Commit 2e19e14d by Kim Eunchul

#40414 【TECSS(Biz) webviewer 1.9】検索キーワードを6個指定できる

parent 53d658b9
...@@ -1077,17 +1077,17 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1077,17 +1077,17 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
} }
for (var i = 1; i < myArray.length; i++){ for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR"){ if(myArray[i] == "OR" || myArray[i] == "or" || myArray[i] == "Or" || myArray[i] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){ }else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){ if(myArray[i] == "("){
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || ('; myQuery += ' || (';
}else{ }else{
myQuery += ' && ('; myQuery += ' && (';
} }
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1)); myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true'; myQuery += ' || ( true';
count++; count++;
...@@ -1101,7 +1101,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1101,7 +1101,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
if(myArray[i] == ")"){ if(myArray[i] == ")"){
myQuery += ' )'; myQuery += ' )';
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1)); myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || true )'; myQuery += ' || true )';
count++; count++;
...@@ -1112,7 +1112,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1112,7 +1112,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
} }
} }
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true'; myQuery += ' || true';
count++; count++;
......
...@@ -773,17 +773,17 @@ CONTENTVIEW.searchHandle = function() { ...@@ -773,17 +773,17 @@ CONTENTVIEW.searchHandle = function() {
} }
for (var i = 1; i < myArray.length; i++){ for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR"){ if(myArray[i] == "OR" || myArray[i] == "or" || myArray[i] == "Or" || myArray[i] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){ }else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){ if(myArray[i] == "("){
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || ('; myQuery += ' || (';
}else{ }else{
myQuery += ' && ('; myQuery += ' && (';
} }
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1)); myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)'; myQuery += ' || ( myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)';
count++; count++;
...@@ -797,7 +797,7 @@ CONTENTVIEW.searchHandle = function() { ...@@ -797,7 +797,7 @@ CONTENTVIEW.searchHandle = function() {
if(myArray[i] == ")"){ if(myArray[i] == ")"){
myQuery += ' )'; myQuery += ' )';
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1)); myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText) )'; myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText) )';
count++; count++;
...@@ -808,7 +808,7 @@ CONTENTVIEW.searchHandle = function() { ...@@ -808,7 +808,7 @@ CONTENTVIEW.searchHandle = function() {
} }
} }
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)'; myQuery += ' || myRegExpArr[' + i + '].test(contentPage[nIndex].pageText)';
count++; count++;
......
...@@ -302,17 +302,17 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -302,17 +302,17 @@ HEADER.searchHeaderButtonFunction = function(){
} }
for (var i = 1; i < myArray.length; i++){ for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR"){ if(myArray[i] == "OR" || myArray[i] == "or" || myArray[i] == "Or" || myArray[i] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
}else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){ }else if(myArray[i].charAt(0) == "(" || myArray[i] == "("){
if(myArray[i] == "("){ if(myArray[i] == "("){
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myQuery += ' || ('; myQuery += ' || (';
}else{ }else{
myQuery += ' && ('; myQuery += ' && (';
} }
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(1)); myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' || ( true'; myQuery += ' || ( true';
count++; count++;
...@@ -326,7 +326,7 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -326,7 +326,7 @@ HEADER.searchHeaderButtonFunction = function(){
if(myArray[i] == ")"){ if(myArray[i] == ")"){
myQuery += ' )'; myQuery += ' )';
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1)); myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' || true )'; myQuery += ' || true )';
count++; count++;
...@@ -337,7 +337,7 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -337,7 +337,7 @@ HEADER.searchHeaderButtonFunction = function(){
} }
} }
}else{ }else{
if(myArray[i - 1] == "OR"){ if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || myArray[i - 1] == "oR"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' || true'; myQuery += ' || true';
count++; 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