Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
11509e51
Commit
11509e51
authored
Aug 14, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Highlight quote hits for page_search
The quote search terms are now highlighted in the annotations quote.
parent
ebebbc95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
controllers.coffee
h/js/controllers.coffee
+3
-0
No files found.
h/js/controllers.coffee
View file @
11509e51
...
...
@@ -819,6 +819,7 @@ class Search
$scope
.
text_tokens
=
$routeParams
.
in_body_text
.
split
' '
$scope
.
text_regexp
=
[]
$scope
.
quote
=
$routeParams
.
quote
$scope
.
quote_regexp
=
new
RegExp
(
$scope
.
quote
,
"ig"
)
for
token
in
$scope
.
text_tokens
regexp
=
new
RegExp
(
token
,
"ig"
)
$scope
.
text_regexp
.
push
regexp
...
...
@@ -872,6 +873,8 @@ class Search
if
$scope
.
quote
?
.
length
>
0
$scope
.
ann_info
.
show_quote
[
thread
.
message
.
id
]
=
true
for
target
in
thread
.
message
.
target
target
.
highlightQuote
=
target
.
quote
.
replace
$scope
.
quote_regexp
,
$scope
.
highlighter
else
$scope
.
ann_info
.
show_quote
[
thread
.
message
.
id
]
=
false
...
...
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