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
f8b7f9f8
Commit
f8b7f9f8
authored
Dec 17, 2020
by
Kim Eunchul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#40821 【TECSS Web 1.9.2.6】「or」「(」「半角スペース」で検索した時の結果が統一されていない
parent
caa4122c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
1 deletions
+51
-1
abvw/js/contentsearch.js
+16
-1
abvw/js/contentview.js
+19
-0
abvw/js/header.js
+16
-0
No files found.
abvw/js/contentsearch.js
View file @
f8b7f9f8
...
...
@@ -1048,10 +1048,11 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
//seperate string
var
myRegexp
=
/
[^\s
"
]
+|"
([^
"
]
*
)
"/gi
;
var
myArray
=
[];
var
dummyArray
=
[];
var
myQuery
;
//var myRegExpArr = [];
var
textReg
=
$
(
'#txtSearchWs'
).
val
().
replace
(
/
\(
/g
,
" ( "
).
replace
(
/
\)
/g
,
" ) "
);
var
dummytextReg
=
$
(
'#txtSearchWs'
).
val
().
replace
(
/
\"
/g
,
"'
\"
'"
);
do
{
var
match
=
myRegexp
.
exec
(
textReg
);
if
(
match
!=
null
)
...
...
@@ -1060,12 +1061,26 @@ CONTENTSEARCH.searchEventButtonFunction = function() {
}
}
while
(
match
!=
null
);
do
{
var
match
=
myRegexp
.
exec
(
dummytextReg
);
if
(
match
!=
null
)
{
dummyArray
.
push
(
match
[
1
]
?
match
[
1
]
:
match
[
0
]);
}
}
while
(
match
!=
null
);
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
++
;
}
}
for
(
var
i
=
0
;
i
<
dummyArray
.
length
;
i
++
){
if
(
dummyArray
[
i
].
includes
(
")("
)
&&
dummyArray
[
i
].
charAt
(
0
)
!=
"'"
&&
dummyArray
[
i
].
charAt
(
dummyArray
.
length
-
1
)
!=
"'"
){
searchText
=
")"
;
}
}
if
(
count
>
5
){
alert
(
'語句数は最大5つです'
);
return
;
...
...
abvw/js/contentview.js
View file @
f8b7f9f8
...
...
@@ -749,6 +749,10 @@ CONTENTVIEW.searchHandle = function() {
var
count
=
0
;
var
textReg
=
$
(
'#txtSearch'
).
val
().
replace
(
/
\(
/g
,
"
\
( "
).
replace
(
/
\)
/g
,
"
\
) "
);
//)(check
var
dummyArray
=
[];
var
dummytextReg
=
$
(
'#txtSearch'
).
val
().
replace
(
/
\"
/g
,
"'
\"
'"
);
if
(
$
(
'#txtSearch'
).
val
()
==
'"("'
){
myRegExpArr
[
0
]
=
new
RegExp
(
"[
\
(]"
);
for
(
var
nIndex
=
0
;
nIndex
<
contentPage
.
length
;
nIndex
++
)
{
...
...
@@ -794,6 +798,21 @@ CONTENTVIEW.searchHandle = function() {
}
else
{
try
{
do
{
var
match
=
myRegexp
.
exec
(
dummytextReg
);
if
(
match
!=
null
)
{
dummyArray
.
push
(
match
[
1
]
?
match
[
1
]
:
match
[
0
]);
}
}
while
(
match
!=
null
);
for
(
var
i
=
0
;
i
<
dummyArray
.
length
;
i
++
){
if
(
dummyArray
[
i
].
includes
(
")("
)
&&
dummyArray
[
i
].
charAt
(
0
)
!=
"'"
&&
dummyArray
[
i
].
charAt
(
dummyArray
.
length
-
1
)
!=
"'"
){
throw
new
Error
(
'quotes error!'
)
}
}
do
{
var
match
=
myRegexp
.
exec
(
textReg
);
if
(
match
!=
null
)
...
...
abvw/js/header.js
View file @
f8b7f9f8
...
...
@@ -279,6 +279,16 @@ HEADER.searchHeaderButtonFunction = function(){
var
myQuery
;
//var myRegExpArr = [];
var
textReg
=
$
(
'#searchbox-key'
).
val
().
replace
(
/
\(
/g
,
" ( "
).
replace
(
/
\)
/g
,
" ) "
);
var
dummyArray
=
[];
var
dummytextReg
=
$
(
'#searchbox-key'
).
val
().
replace
(
/
\"
/g
,
"'
\"
'"
);
do
{
var
match
=
myRegexp
.
exec
(
dummytextReg
);
if
(
match
!=
null
)
{
dummyArray
.
push
(
match
[
1
]
?
match
[
1
]
:
match
[
0
]);
}
}
while
(
match
!=
null
);
do
{
var
match
=
myRegexp
.
exec
(
textReg
);
...
...
@@ -367,6 +377,12 @@ HEADER.searchHeaderButtonFunction = function(){
myQuery
+=
' &&'
;
}
for
(
var
i
=
0
;
i
<
dummyArray
.
length
;
i
++
){
if
(
dummyArray
[
i
].
includes
(
")("
)
&&
dummyArray
[
i
].
charAt
(
0
)
!=
"'"
&&
dummyArray
[
i
].
charAt
(
dummyArray
.
length
-
1
)
!=
"'"
){
myQuery
+=
' &&'
;
}
}
if
(
eval
(
myQuery
))
{
//is not correct query
}
...
...
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