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
f08abab8
Commit
f08abab8
authored
Jul 17, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use clearSearch callback for actual collapse
Introduce show_search boolean in class Hypothesis
parent
fa290837
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
controllers.coffee
h/js/controllers.coffee
+6
-0
services.coffee
h/js/services.coffee
+8
-0
No files found.
h/js/controllers.coffee
View file @
f08abab8
...
...
@@ -232,6 +232,12 @@ class App
$scope
.
createUnattachedAnnotation
=
->
console
.
log
"Should create unattached annotation"
$scope
.
showSearchBar
=
=>
annotator
.
show_search
=
true
$scope
.
isSearchShown
=
=>
annotator
.
show_search
class
Annotation
this
.
$inject
=
[
'$element'
,
'$location'
,
'$scope'
,
'annotator'
,
'drafts'
,
'$timeout'
]
constructor
:
(
$element
,
$location
,
$scope
,
annotator
,
drafts
,
$timeout
)
->
...
...
h/js/services.coffee
View file @
f08abab8
...
...
@@ -44,6 +44,7 @@ class Hypothesis extends Annotator
# Internal state
dragging
:
false
# * To enable dragging only when we really want to
ongoing_edit
:
false
# * Is there an interrupted edit by login
show_search
:
false
# * Toggle showing the visualsearchbar
# Here as a noop just to make the Permissions plugin happy
# XXX: Change me when Annotator stops assuming things about viewers
...
...
@@ -126,6 +127,9 @@ class Hypothesis extends Annotator
query
:
''
callbacks
:
search
:
(
query
,
searchCollection
)
=>
unless
query
return
matched
=
[]
whole_document
=
true
for
searchItem
in
searchCollection
.
models
...
...
@@ -203,6 +207,10 @@ class Hypothesis extends Annotator
when
'area'
then
callback
[
'sidebar'
,
'document'
]
when
'time'
callback
[
'5 minutes'
,
'1 hour'
,
'1 day'
,
'1 week'
,
'1 month'
,
'1 year'
]
clearSearch
:
(
original
)
=>
original
()
@
show_search
=
false
$rootScope
.
$digest
()
_setupXDM
:
->
$location
=
@
element
.
injector
().
get
'$location'
...
...
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