Commit d30088dd by Chris Rodriguez

Using .sr instead of aria-label

parent 42486a5e
...@@ -243,13 +243,14 @@ if Backbone? ...@@ -243,13 +243,14 @@ if Backbone?
@trigger("thread:removed", thread_id) @trigger("thread:removed", thread_id)
setActiveThread: (thread_id) -> setActiveThread: (thread_id) ->
@$(".forum-nav-thread[data-id!='#{thread_id}'] .forum-nav-thread-link").removeClass("is-active").removeAttr('aria-label') @$(".forum-nav-thread-link").find(".sr").remove()
@$(".forum-nav-thread[data-id='#{thread_id}'] .forum-nav-thread-link").addClass("is-active").attr('aria-label', 'Current conversation') @$(".forum-nav-thread[data-id!='#{thread_id}'] .forum-nav-thread-link").removeClass("is-active")
@$(".forum-nav-thread[data-id='#{thread_id}'] .forum-nav-thread-link").addClass("is-active").find(".forum-nav-thread-wrapper-1").prepend('<span class="sr">' + gettext("Current conversation") + '</span>')
goHome: -> goHome: ->
@template = _.template($("#discussion-home").html()) @template = _.template($("#discussion-home").html())
$(".forum-content").html(@template) $(".forum-content").html(@template)
$(".forum-nav-thread-list a").removeClass("is-active").removeAttr('aria-label') $(".forum-nav-thread-list a").removeClass("is-active").find(".sr").remove()
$("input.email-setting").bind "click", @updateEmailNotifications $("input.email-setting").bind "click", @updateEmailNotifications
url = DiscussionUtil.urlFor("notifications_status",window.user.get("id")) url = DiscussionUtil.urlFor("notifications_status",window.user.get("id"))
DiscussionUtil.safeAjax DiscussionUtil.safeAjax
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment