Merge pull request #6820 from edx/clrux/forums-assign-regions

Assign regions/landmarks for easier navigation
This commit is contained in:
Chris
2015-02-03 16:03:18 -05:00
5 changed files with 19 additions and 19 deletions

View File

@@ -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?

View File

@@ -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()
)

View File

@@ -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'