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
ebf06cae
Commit
ebf06cae
authored
May 20, 2014
by
csillag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When hiding the view/sort controls, collapse the dropdown menu, too. Fixes #1215.
parent
b80eef94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
controllers.coffee
h/js/controllers.coffee
+10
-1
No files found.
h/js/controllers.coffee
View file @
ebf06cae
...
...
@@ -157,6 +157,11 @@ class App
sort
:
''
view
:
'Screen'
$rootScope
.
collapseViewSortMenus
=
()
->
$
(
".viewsort .dropdown-toggle"
).
toArray
().
forEach
(
toggle
)
->
if
$
(
toggle
).
parent
().
hasClass
"open"
$
(
toggle
).
click
()
# Show the sort/view control for a while.
#
# hide: should we hide it after a second?
...
...
@@ -164,8 +169,12 @@ class App
$rootScope
.
showViewSort
=
(
show
=
true
,
hide
=
false
)
->
if
_vstp
then
$timeout
.
cancel
_vstp
$rootScope
.
viewState
.
showControls
=
show
$rootScope
.
collapseViewSortMenus
()
unless
show
if
$rootScope
.
viewState
.
showControls
and
hide
_vstp
=
$timeout
(
->
$rootScope
.
viewState
.
showControls
=
false
),
1000
_vstp
=
$timeout
(
->
$rootScope
.
viewState
.
showControls
=
false
$rootScope
.
collapseViewSortMenus
()
),
1000
# "View" -- which annotations are shown
$rootScope
.
applyView
=
(
view
)
->
...
...
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