Commit bbe66d21 by Kim Eunchul

#39714 andやor検索(ウェブ版error処理)

parent d040f423
...@@ -747,7 +747,7 @@ CONTENTVIEW.searchHandle = function() { ...@@ -747,7 +747,7 @@ CONTENTVIEW.searchHandle = function() {
//seperate string //seperate string
var myRegexp = /[^\s"]+|"([^"]*)"/gi; var myRegexp = /[^\s"]+|"([^"]*)"/gi;
var myArray = []; var myArray = [];
var myQuery = 'myRegExpArr[0].test(contentPage[nIndex].pageText)'; var myQuery;
var myRegExpArr = []; var myRegExpArr = [];
do { do {
...@@ -758,7 +758,19 @@ CONTENTVIEW.searchHandle = function() { ...@@ -758,7 +758,19 @@ CONTENTVIEW.searchHandle = function() {
} }
} while (match != null); } while (match != null);
if(myArray[0].charAt(0) == "("){
if(myArray[0] == "("){
myRegExpArr[1] = new RegExp(myArray[1]);
myQuery = '( myRegExpArr[1].test(contentPage[nIndex].pageText)';
}else{
myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '( myRegExpArr[0].test(contentPage[nIndex].pageText)'
}
}else{
myRegExpArr[0] = new RegExp(myArray[0]); myRegExpArr[0] = new RegExp(myArray[0]);
myQuery = 'myRegExpArr[0].test(contentPage[nIndex].pageText)';
}
for (var i = 1; i < myArray.length; i++){ for (var i = 1; i < myArray.length; i++){
if(myArray[i] == "OR" || myArray[i] == "or"){ if(myArray[i] == "OR" || myArray[i] == "or"){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
......
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