Merge pull request #6820 from edx/clrux/forums-assign-regions
Assign regions/landmarks for easier navigation
This commit is contained in:
@@ -29,7 +29,7 @@ if Backbone?
|
||||
if @showed
|
||||
@newPostForm.slideDown(300)
|
||||
else
|
||||
@newPostForm.show()
|
||||
@newPostForm.show().focus()
|
||||
@toggleDiscussionBtn.addClass('shown')
|
||||
@toggleDiscussionBtn.find('.button-text').html(gettext("Hide Discussion"))
|
||||
@$("section.discussion").slideDown()
|
||||
@@ -128,7 +128,7 @@ if Backbone?
|
||||
@renderPagination(response.num_pages)
|
||||
|
||||
if @isWaitingOnNewPost
|
||||
@newPostForm.show()
|
||||
@newPostForm.show().focus()
|
||||
|
||||
addThread: (thread, collection, options) =>
|
||||
# TODO: When doing pagination, this will need to repaginate. Perhaps just reload page 1?
|
||||
|
||||
@@ -79,13 +79,12 @@ if Backbone?
|
||||
$('.forum-content').fadeOut(
|
||||
duration: 200
|
||||
complete: =>
|
||||
@newPost.fadeIn(200)
|
||||
$('.new-post-title').focus()
|
||||
@newPost.fadeIn(200).focus()
|
||||
)
|
||||
|
||||
hideNewPost: =>
|
||||
@newPost.fadeOut(
|
||||
duration: 200
|
||||
complete: =>
|
||||
$('.forum-content').fadeIn(200)
|
||||
$('.forum-content').fadeIn(200).find('.thread-wrapper').focus()
|
||||
)
|
||||
|
||||
@@ -144,6 +144,7 @@ if Backbone?
|
||||
)
|
||||
@trigger "thread:responses:rendered"
|
||||
@loadedResponses = true
|
||||
$(".thread-wrapper").focus() # Sends focus to the conversation once the thread finishes loading
|
||||
error: (xhr, textStatus) =>
|
||||
return if textStatus == 'abort'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user