Commit 17d2fbd6 by Kim Eunchul

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

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