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
7013c997
Commit
7013c997
authored
Nov 01, 2013
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1553 from edx/gprice/forum-follow-a11y
Improve accessibility of forum follow buttons
parents
78fd1fc1
b6f53481
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
41 deletions
+29
-41
CHANGELOG.rst
+2
-0
common/static/coffee/src/discussion/views/discussion_content_view.coffee
+22
-2
common/static/coffee/src/discussion/views/discussion_thread_profile_view.coffee
+1
-19
common/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
+1
-19
lms/templates/discussion/_underscore_templates.html
+3
-1
No files found.
CHANGELOG.rst
View file @
7013c997
...
...
@@ -11,6 +11,8 @@ it pauses on the end time.
Blades: Disallow users to enter video url's in http.
LMS: Improve the acessibility of the forum follow post buttons.
Blades: Fix bug when the speed can only be changed when the video is playing.
LMS: Change bulk email implementation to use less memory, and to better handle
...
...
common/static/coffee/src/discussion/views/discussion_content_view.coffee
View file @
7013c997
...
...
@@ -37,9 +37,9 @@ if Backbone?
subscribed
:
(
subscribed
)
->
if
subscribed
@
$
(
".dogear"
).
addClass
(
"is-followed"
)
@
$
(
".dogear"
).
addClass
(
"is-followed"
)
.
attr
(
"aria-checked"
,
"true"
)
else
@
$
(
".dogear"
).
removeClass
(
"is-followed"
)
@
$
(
".dogear"
).
removeClass
(
"is-followed"
)
.
attr
(
"aria-checked"
,
"false"
)
ability
:
(
ability
)
->
for
action
,
selector
of
@
abilityRenderer
...
...
@@ -106,6 +106,26 @@ if Backbone?
@
model
.
bind
(
'change'
,
@
renderPartialAttrs
,
@
)
toggleFollowingKeypress
:
(
event
)
->
# Activate on spacebar or enter
if
event
.
which
==
32
or
event
.
which
==
13
@
toggleFollowing
(
event
)
toggleFollowing
:
(
event
)
->
event
.
preventDefault
()
$elem
=
$
(
event
.
target
)
url
=
null
if
not
@
model
.
get
(
'subscribed'
)
@
model
.
follow
()
url
=
@
model
.
urlFor
(
"follow"
)
else
@
model
.
unfollow
()
url
=
@
model
.
urlFor
(
"unfollow"
)
DiscussionUtil
.
safeAjax
$elem
:
$elem
url
:
url
type
:
"POST"
toggleFlagAbuseKeypress
:
(
event
)
->
# Activate on spacebar or enter
if
event
.
which
==
32
or
event
.
which
==
13
...
...
common/static/coffee/src/discussion/views/discussion_thread_profile_view.coffee
View file @
7013c997
...
...
@@ -4,6 +4,7 @@ if Backbone?
events
:
"click .discussion-vote"
:
"toggleVote"
"click .action-follow"
:
"toggleFollowing"
"keypress .action-follow"
:
"toggleFollowingKeypress"
"click .expand-post"
:
"expandPost"
"click .collapse-post"
:
"collapsePost"
...
...
@@ -25,7 +26,6 @@ if Backbone?
@
$el
.
html
(
Mustache
.
render
(
@
template
,
params
))
@
initLocal
()
@
delegateEvents
()
@
renderDogear
()
@
renderVoted
()
@
renderAttrs
()
@
$
(
"span.timeago"
).
timeago
()
...
...
@@ -34,10 +34,6 @@ if Backbone?
@
renderResponses
()
@
renderDogear
:
->
if
window
.
user
.
following
(
@
model
)
@
$
(
".dogear"
).
addClass
(
"is-followed"
)
renderVoted
:
=>
if
window
.
user
.
voted
(
@
model
)
@
$
(
"[data-role=discussion-vote]"
).
addClass
(
"is-cast"
)
...
...
@@ -81,20 +77,6 @@ if Backbone?
else
@
vote
()
toggleFollowing
:
(
event
)
->
$elem
=
$
(
event
.
target
)
url
=
null
if
not
@
model
.
get
(
'subscribed'
)
@
model
.
follow
()
url
=
@
model
.
urlFor
(
"follow"
)
else
@
model
.
unfollow
()
url
=
@
model
.
urlFor
(
"unfollow"
)
DiscussionUtil
.
safeAjax
$elem
:
$elem
url
:
url
type
:
"POST"
vote
:
->
window
.
user
.
vote
(
@
model
)
url
=
@
model
.
urlFor
(
"upvote"
)
...
...
common/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
View file @
7013c997
...
...
@@ -7,6 +7,7 @@ if Backbone?
"keypress .discussion-flag-abuse"
:
"toggleFlagAbuseKeypress"
"click .admin-pin"
:
"togglePin"
"click .action-follow"
:
"toggleFollowing"
"keypress .action-follow"
:
"toggleFollowingKeypress"
"click .action-edit"
:
"edit"
"click .action-delete"
:
"_delete"
"click .action-openclose"
:
"toggleClosed"
...
...
@@ -25,7 +26,6 @@ if Backbone?
render
:
->
@
$el
.
html
(
@
renderTemplate
())
@
delegateEvents
()
@
renderDogear
()
@
renderVoted
()
@
renderFlagged
()
@
renderPinned
()
...
...
@@ -36,10 +36,6 @@ if Backbone?
@
highlight
@
$
(
"h1,h3"
)
@
renderDogear
:
->
if
window
.
user
.
following
(
@
model
)
@
$
(
".dogear"
).
addClass
(
"is-followed"
)
renderVoted
:
=>
if
window
.
user
.
voted
(
@
model
)
@
$
(
"[data-role=discussion-vote]"
).
addClass
(
"is-cast"
)
...
...
@@ -94,20 +90,6 @@ if Backbone?
else
@
vote
()
toggleFollowing
:
(
event
)
->
$elem
=
$
(
event
.
target
)
url
=
null
if
not
@
model
.
get
(
'subscribed'
)
@
model
.
follow
()
url
=
@
model
.
urlFor
(
"follow"
)
else
@
model
.
unfollow
()
url
=
@
model
.
urlFor
(
"unfollow"
)
DiscussionUtil
.
safeAjax
$elem
:
$elem
url
:
url
type
:
"POST"
vote
:
->
window
.
user
.
vote
(
@
model
)
url
=
@
model
.
urlFor
(
"upvote"
)
...
...
lms/templates/discussion/_underscore_templates.html
View file @
7013c997
...
...
@@ -26,7 +26,6 @@
<script
type=
"text/template"
id=
"thread-show-template"
>
<
div
class
=
"discussion-post"
>
<
div
><
a
href
=
"javascript:void(0)"
class
=
"dogear action-follow"
data
-
tooltip
=
"follow"
><
/a></
div
>
<
header
>
$
{
"<% if (obj.group_id) { %>"
}
<
div
class
=
"group-visibility-label"
>
$
{
"<%- obj.group_string%>"
}
<
/div
>
...
...
@@ -45,6 +44,9 @@
$
{
_
(
"• This thread is closed."
)}
<
/span
>
<
/p
>
<
a
href
=
"javascript:void(0)"
class
=
"dogear action-follow"
data
-
tooltip
=
"follow"
role
=
"checkbox"
aria
-
checked
=
"false"
>
<
span
class
=
"sr"
>
$
{
_
(
"Follow this post"
)}
<
/span
>
<
/a
>
<
/header
>
<
div
class
=
"post-body"
>
$
{
'<%- body %>'
}
<
/div
>
...
...
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