Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
db325e78
Commit
db325e78
authored
Sep 27, 2013
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1169 from edx/gprice/forum-load-more-focus
Improvements in forums nav sidebar
parents
031f331a
cbbb5c7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+13
-0
No files found.
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
db325e78
...
...
@@ -95,6 +95,7 @@ if Backbone?
@
timer
=
0
@
$el
.
html
(
@
template
())
$
(
window
).
bind
"load"
,
@
updateSidebar
$
(
window
).
bind
"scroll"
,
@
updateSidebar
$
(
window
).
bind
"resize"
,
@
updateSidebar
...
...
@@ -143,6 +144,18 @@ if Backbone?
options
.
group_id
=
@
group_id
lastThread
=
@
collection
.
last
()
?
.
get
(
'id'
)
if
lastThread
# Pagination; focus the first thread after what was previously the last thread
@
once
(
"threads:rendered"
,
->
$
(
".post-list li:has(a[data-id='
#{
lastThread
}
']) + li a"
).
focus
()
)
else
# Totally refreshing the list (e.g. from clicking a sort button); focus the first thread
@
once
(
"threads:rendered"
,
->
$
(
".post-list a"
).
first
()
?
.
focus
()
)
@
collection
.
retrieveAnotherPage
(
@
mode
,
options
,
{
sort_key
:
@
sortBy
})
renderThread
:
(
thread
)
=>
...
...
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