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
d7ca3ffa
Commit
d7ca3ffa
authored
Jul 21, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1330 from hypothesis/search-visibility-quirks
Fix quirks with show/hide on the search bar
parents
f26656d0
6c2640d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
22 deletions
+15
-22
controllers.coffee
h/static/scripts/controllers.coffee
+14
-17
streamsearch.coffee
h/static/scripts/streamsearch.coffee
+0
-2
common.scss
h/static/styles/common.scss
+1
-3
No files found.
h/static/scripts/controllers.coffee
View file @
d7ca3ffa
...
...
@@ -49,6 +49,11 @@ class App
socialView
:
annotator
.
socialView
ongoingHighlightSwitch
:
false
model
:
{}
search
:
facets
:
SEARCH_FACETS
values
:
SEARCH_VALUES
query
:
$location
.
search
()
show
:
not
angular
.
equals
(
$location
.
search
(),
{})
_reset
()
...
...
@@ -114,6 +119,12 @@ class App
$scope
.
reloadAnnotations
()
$scope
.
initUpdater
()
$scope
.
$watch
'search.show'
,
(
visible
)
->
if
visible
$timeout
->
$element
.
find
(
'.visual-search'
).
find
(
'input'
).
last
().
focus
()
,
10
$scope
.
$watch
'socialView.name'
,
(
newValue
,
oldValue
)
->
return
if
newValue
is
oldValue
console
.
log
"Social View changed to '"
+
newValue
+
"'. Reloading annotations."
...
...
@@ -145,12 +156,6 @@ class App
.
focus
()
,
10
$scope
.
$watch
'show_search'
,
(
value
,
old
)
->
if
value
and
not
old
$timeout
->
$element
.
find
(
'.visual-search'
).
find
(
'input'
).
last
().
focus
()
,
10
$scope
.
$watch
'store.entities'
,
(
entities
,
oldEntities
)
->
return
if
entities
is
oldEntities
...
...
@@ -248,19 +253,12 @@ class App
$rootScope
.
applySort
"Location"
$scope
.
query
=
$location
.
search
()
$scope
.
searchFacets
=
SEARCH_FACETS
$scope
.
searchValues
=
SEARCH_VALUES
$scope
.
search
=
{}
$scope
.
search
.
update
=
angular
.
noop
$scope
.
search
.
clear
=
angular
.
noop
$scope
.
show_search
=
Object
.
keys
(
$scope
.
query
).
length
>
0
$rootScope
.
$on
'$routeChangeSuccess'
,
(
event
,
next
,
current
)
->
unless
next
.
$
$route
?
then
return
$scope
.
search
.
query
=
$location
.
search
()
$scope
.
search
.
show
=
not
angular
.
equals
(
$location
.
search
(),
{})
unless
next
.
$
$route
.
originalPath
is
'/stream'
$scope
.
search
.
update
=
(
searchCollection
)
->
return
unless
annotator
.
discardDrafts
()
...
...
@@ -290,7 +288,6 @@ class App
$scope
.
search
.
clear
=
->
$location
.
url
(
'/viewer'
)
$scope
.
show_search
=
false
$scope
.
reloadAnnotations
=
->
Store
=
plugins
.
Store
...
...
h/static/scripts/streamsearch.coffee
View file @
d7ca3ffa
...
...
@@ -61,8 +61,6 @@ class StreamSearch
$scope
.
updater
.
then
(
sock
)
->
sock
.
send
(
JSON
.
stringify
(
sockmsg
))
$scope
.
search
.
query
=
$location
.
search
()
angular
.
module
(
'h.streamsearch'
,
imports
,
configure
)
.
constant
(
'searchFacets'
,
SEARCH_FACETS
)
...
...
h/static/styles/common.scss
View file @
d7ca3ffa
...
...
@@ -782,11 +782,9 @@ pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
//Visual Search////////////////////////////////
//Override their css here
.
search-container
{
.
VS-search
{
overflow
:
hidden
;
}
.VS-search
{
*
{
@include
box-sizing
(
content-box
);
}
...
...
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