Commit 17d2fbd6 by Kim Eunchul

#40708 【TECSS(Biz) webviewer/Win 1.9】【仕様確認】同じ検索キーワードで動作が異なるものがある

parent 780f6fd5
...@@ -1060,7 +1060,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1060,7 +1060,7 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
} }
} while (match != null); } while (match != null);
for(var i = 1; i < myArray.length; i++){ for(var i = 0; i < myArray.length; i++){
if(myArray[i] != "OR" && myArray[i] != "or" && myArray[i] != "Or" && myArray[i] != "oR" && myArray[i] != "(" && myArray[i] != ")"){ if(myArray[i] != "OR" && myArray[i] != "or" && myArray[i] != "Or" && myArray[i] != "oR" && myArray[i] != "(" && myArray[i] != ")"){
count++; count++;
} }
...@@ -1078,12 +1078,10 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1078,12 +1078,10 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
}else{ }else{
myRegExpArr[0] = new RegExp(myArray[0].slice(1)); myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '( true'; myQuery = '( true';
count++;
} }
}else{ }else{
myRegExpArr[0] = new RegExp(myArray[0]); myRegExpArr[0] = new RegExp(myArray[0]);
myQuery = 'true'; myQuery = 'true';
count++;
} }
for (var i = 1; i < myArray.length; i++){ for (var i = 1; i < myArray.length; i++){
...@@ -1100,11 +1098,9 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1100,11 +1098,9 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || 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++;
}else{ }else{
myRegExpArr[i] = new RegExp(myArray[i].slice(1)); myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' && ( true'; myQuery += ' && ( true';
count++;
} }
} }
}else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){ }else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){
...@@ -1114,32 +1110,26 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1114,32 +1110,26 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || 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++;
}else{ }else{
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1)); myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' && true )'; myQuery += ' && true )';
count++;
} }
} }
}else{ }else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || 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++;
}else{ }else{
if(myArray[i - 1] == "("){ if(myArray[i - 1] == "("){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' true'; myQuery += ' true';
count++;
}else{ }else{
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' && true'; myQuery += ' && true';
count++;
} }
} }
} }
} }
console.log("1" + myQuery);
if (eval(myQuery)) { if (eval(myQuery)) {
//is not correct query //is not correct query
} }
...@@ -1148,6 +1138,10 @@ CONTENTSEARCH.searchEventButtonFunction = function() { ...@@ -1148,6 +1138,10 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
searchText = "invaildsearchtextzeroresultfound"; searchText = "invaildsearchtextzeroresultfound";
} }
} }
if(count > 5){
alert('語句数は最大5つです');
return;
}
if(CONTENTSEARCH.overClick()){ if(CONTENTSEARCH.overClick()){
return; return;
......
...@@ -288,13 +288,13 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -288,13 +288,13 @@ HEADER.searchHeaderButtonFunction = function(){
} }
} while (match != null); } while (match != null);
for(var i = 1; i < myArray.length; i++){ for(var i = 0; i < myArray.length; i++){
if(myArray[i] != "OR" && myArray[i] != "or" && myArray[i] != "Or" && myArray[i] != "oR" && myArray[i] != "(" && myArray[i] != ")"){ if(myArray[i] != "OR" && myArray[i] != "or" && myArray[i] != "Or" && myArray[i] != "oR" && myArray[i] != "(" && myArray[i] != ")"){
count++; count++;
} }
} }
if(count > 5){ if(count > 5){
alert('語句数は最大5つです'); alert('語句数は最大5つです');
return; return;
} }
...@@ -306,12 +306,10 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -306,12 +306,10 @@ HEADER.searchHeaderButtonFunction = function(){
}else{ }else{
myRegExpArr[0] = new RegExp(myArray[0].slice(1)); myRegExpArr[0] = new RegExp(myArray[0].slice(1));
myQuery = '( true'; myQuery = '( true';
count++;
} }
}else{ }else{
myRegExpArr[0] = new RegExp(myArray[0]); myRegExpArr[0] = new RegExp(myArray[0]);
myQuery = 'true'; myQuery = 'true';
count++;
} }
for (var i = 1; i < myArray.length; i++){ for (var i = 1; i < myArray.length; i++){
...@@ -328,11 +326,9 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -328,11 +326,9 @@ HEADER.searchHeaderButtonFunction = function(){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || 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++;
}else{ }else{
myRegExpArr[i] = new RegExp(myArray[i].slice(1)); myRegExpArr[i] = new RegExp(myArray[i].slice(1));
myQuery += ' && ( true'; myQuery += ' && ( true';
count++;
} }
} }
}else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){ }else if(myArray[i].charAt(myArray[i].length - 1) == ")" || myArray[i] == ")"){
...@@ -342,31 +338,27 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -342,31 +338,27 @@ HEADER.searchHeaderButtonFunction = function(){
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || 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++;
}else{ }else{
myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1)); myRegExpArr[i] = new RegExp(myArray[i].slice(0, -1));
myQuery += ' && true )'; myQuery += ' && true )';
count++;
} }
} }
}else{ }else{
if(myArray[i - 1] == "OR" || myArray[i - 1] == "or" || myArray[i - 1] == "Or" || 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++;
}else{ }else{
if(myArray[i - 1] == "("){ if(myArray[i - 1] == "("){
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' true'; myQuery += ' true';
count++;
}else{ }else{
myRegExpArr[i] = new RegExp(myArray[i]); myRegExpArr[i] = new RegExp(myArray[i]);
myQuery += ' && true'; myQuery += ' && true';
count++;
} }
} }
} }
} }
if (eval(myQuery)) { if (eval(myQuery)) {
//is not correct query //is not correct query
} }
...@@ -384,7 +376,10 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -384,7 +376,10 @@ HEADER.searchHeaderButtonFunction = function(){
{ {
searchDivision = $('#searchbox-body').val(); searchDivision = $('#searchbox-body').val();
} }
if(count > 5){
alert('語句数は最大5つです');
return;
}
ClientData.searchCond_searchText("invaildsearchtextzeroresultfound"); ClientData.searchCond_searchText("invaildsearchtextzeroresultfound");
ClientData.searchCond_searchDivision(searchDivision); ClientData.searchCond_searchDivision(searchDivision);
//window.location = COMMON.ScreenIds.ContentSearch; //window.location = COMMON.ScreenIds.ContentSearch;
...@@ -392,7 +387,12 @@ HEADER.searchHeaderButtonFunction = function(){ ...@@ -392,7 +387,12 @@ HEADER.searchHeaderButtonFunction = function(){
return; return;
} }
} }
if(count > 5){
alert('語句数は最大5つです');
return;
}
if(HEADER.overClick()){ if(HEADER.overClick()){
return; return;
} }
......
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