Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
b6493031
Commit
b6493031
authored
Dec 04, 2020
by
Kim Eunchul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#40365 【TECSS(Biz) webviewer 1.9】一覧画面で検索時にエラーを起こすキーワードがある
parent
dd53ad0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
89 deletions
+90
-89
abvw/js/header.js
+90
-89
No files found.
abvw/js/header.js
View file @
b6493031
...
@@ -264,100 +264,101 @@ HEADER.searchHeaderButtonFunction = function(){
...
@@ -264,100 +264,101 @@ HEADER.searchHeaderButtonFunction = function(){
var
searchDivision
;
var
searchDivision
;
var
searchText
=
$
(
'#searchbox-key'
).
val
();
var
searchText
=
$
(
'#searchbox-key'
).
val
();
var
count
=
0
;
if
(
searchText
.
length
>
200
){
if
(
searchText
.
length
>
200
){
alert
(
'200字以下のテキストを入力してください'
);
alert
(
'200字以下のテキストを入力してください'
);
return
;
return
;
}
}
if
(
$
(
'#txtSearchWs'
).
val
()
!=
' '
)
{
if
(
$
(
'#txtSearchWs'
).
val
()
!=
' '
)
{
try
{
try
{
//seperate string
var
myRegexp
=
/
[^\s
"
]
+|"
([^
"
]
*
)
"/gi
;
//seperate string
var
myArray
=
[]
;
var
myRegexp
=
/
[^\s
"
]
+|"
([^
"
]
*
)
"/gi
;
var
myQuery
;
var
myArray
=
[]
;
var
myRegExpArr
=
[]
;
var
myQuery
;
var
count
=
0
;
var
myRegExpArr
=
[];
var
textReg
=
$
(
'#searchbox-key'
).
val
(
);
var
textReg
=
$
(
'#txtSearchWs'
);
do
{
do
{
var
match
=
myRegexp
.
exec
(
textReg
);
var
match
=
myRegexp
.
exec
(
textReg
);
if
(
match
!=
null
)
if
(
match
!=
null
)
{
{
myArray
.
push
(
match
[
1
]
?
match
[
1
]
:
match
[
0
]);
myArray
.
push
(
match
[
1
]
?
match
[
1
]
:
match
[
0
]);
}
}
}
while
(
match
!=
null
);
}
while
(
match
!=
null
);
if
(
myArray
[
0
].
charAt
(
0
)
==
"("
){
if
(
myArray
[
0
]
==
"("
){
if
(
myArray
[
0
].
charAt
(
0
)
==
"("
){
myRegExpArr
[
1
]
=
new
RegExp
(
myArray
[
1
]);
if
(
myArray
[
0
]
==
"("
){
myQuery
=
'( true'
;
myRegExpArr
[
1
]
=
new
RegExp
(
myArray
[
1
])
;
}
else
{
myQuery
=
'( true'
;
myRegExpArr
[
0
]
=
new
RegExp
(
myArray
[
0
].
slice
(
1
));
}
else
{
myQuery
=
'( true'
;
myRegExpArr
[
0
]
=
new
RegExp
(
myArray
[
0
].
slice
(
1
))
;
count
++
;
myQuery
=
'( true'
;
}
count
++
;
}
else
{
}
myRegExpArr
[
0
]
=
new
RegExp
(
myArray
[
0
]);
}
else
{
myQuery
=
'true'
;
myRegExpArr
[
0
]
=
new
RegExp
(
myArray
[
0
])
;
count
++
;
myQuery
=
'true'
;
}
count
++
;
}
for
(
var
i
=
1
;
i
<
myArray
.
length
;
i
++
){
if
(
myArray
[
i
]
==
"OR"
||
myArray
[
i
]
==
"or"
||
myArray
[
i
]
==
"Or"
||
myArray
[
i
]
==
"oR"
){
for
(
var
i
=
1
;
i
<
myArray
.
length
;
i
++
){
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
if
(
myArray
[
i
]
==
"OR"
||
myArray
[
i
]
==
"or"
||
myArray
[
i
]
==
"Or"
||
myArray
[
i
]
==
"oR"
){
}
else
if
(
myArray
[
i
].
charAt
(
0
)
==
"("
||
myArray
[
i
]
==
"("
){
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
if
(
myArray
[
i
]
==
"("
){
}
else
if
(
myArray
[
i
].
charAt
(
0
)
==
"("
||
myArray
[
i
]
==
"("
){
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR
"
){
if
(
myArray
[
i
]
==
"(
"
){
myQuery
+=
' || ('
;
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
){
}
else
{
myQuery
+=
' || ('
;
myQuery
+=
' && ('
;
}
else
{
}
myQuery
+=
' && ('
;
}
else
{
}
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
)
{
}
else
{
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
1
));
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
){
myQuery
+=
' || ( true'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
1
))
;
count
++
;
myQuery
+=
' || ( true'
;
}
else
{
count
++
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
1
));
}
else
{
myQuery
+=
' && ( true'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
1
))
;
count
++
;
myQuery
+=
' && ( true'
;
}
count
++
;
}
}
}
else
if
(
myArray
[
i
].
charAt
(
myArray
[
i
].
length
-
1
)
==
")"
||
myArray
[
i
]
==
")"
){
}
if
(
myArray
[
i
]
==
")"
){
}
else
if
(
myArray
[
i
].
charAt
(
myArray
[
i
].
length
-
1
)
==
")"
||
myArray
[
i
]
==
")"
){
myQuery
+=
' )'
;
if
(
myArray
[
i
]
==
")"
){
}
else
{
myQuery
+=
' )'
;
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
)
{
}
else
{
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
0
,
-
1
));
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
){
myQuery
+=
' || true )'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
0
,
-
1
))
;
count
++
;
myQuery
+=
' || true )'
;
}
else
{
count
++
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
0
,
-
1
));
}
else
{
myQuery
+=
' && true )'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
].
slice
(
0
,
-
1
))
;
count
++
;
myQuery
+=
' && true )'
;
}
count
++
;
}
}
}
else
{
}
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
)
{
}
else
{
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
if
(
myArray
[
i
-
1
]
==
"OR"
||
myArray
[
i
-
1
]
==
"or"
||
myArray
[
i
-
1
]
==
"Or"
||
myArray
[
i
-
1
]
==
"oR"
){
myQuery
+=
' || true'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
count
++
;
myQuery
+=
' || true'
;
}
else
{
count
++
;
if
(
myArray
[
i
-
1
]
==
"("
)
{
}
else
{
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
if
(
myArray
[
i
-
1
]
==
"("
){
myQuery
+=
' true'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
count
++
;
myQuery
+=
' true'
;
}
else
{
count
++
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
}
else
{
myQuery
+=
' && true'
;
myRegExpArr
[
i
]
=
new
RegExp
(
myArray
[
i
]);
count
++
;
myQuery
+=
' && true'
;
}
count
++
;
}
}
}
}
}
}
}
if
(
eval
(
myQuery
))
{
if
(
eval
(
myQuery
))
{
//is not correct query
//is not correct query
}
}
}
catch
(
error
){
}
catch
(
error
){
if
(
content
==
'checked'
)
if
(
content
==
'checked'
)
...
@@ -377,7 +378,7 @@ HEADER.searchHeaderButtonFunction = function(){
...
@@ -377,7 +378,7 @@ HEADER.searchHeaderButtonFunction = function(){
ClientData
.
searchCond_searchDivision
(
searchDivision
);
ClientData
.
searchCond_searchDivision
(
searchDivision
);
//window.location = COMMON.ScreenIds.ContentSearch;
//window.location = COMMON.ScreenIds.ContentSearch;
AVWEB
.
avwScreenMove
(
COMMON
.
ScreenIds
.
ContentSearch
);
AVWEB
.
avwScreenMove
(
COMMON
.
ScreenIds
.
ContentSearch
);
return
;
}
}
}
}
if
(
count
>
5
){
if
(
count
>
5
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment