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
c850be4a
Commit
c850be4a
authored
Sep 27, 2013
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1167 from edx/fix/kevin/forums_accessibility
parents
db325e78
9a5e6f1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
common/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
+8
-1
common/static/coffee/src/discussion/views/thread_response_show_view.coffee
+5
-2
No files found.
common/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
View file @
c850be4a
...
...
@@ -42,8 +42,10 @@ if Backbone?
renderVoted
:
=>
if
window
.
user
.
voted
(
@
model
)
@
$
(
"[data-role=discussion-vote]"
).
addClass
(
"is-cast"
)
@
$
(
"[data-role=discussion-vote] span.sr"
).
html
(
"votes (click to remove your vote)"
)
else
@
$
(
"[data-role=discussion-vote]"
).
removeClass
(
"is-cast"
)
@
$
(
"[data-role=discussion-vote] span.sr"
).
html
(
"votes (click to vote)"
)
renderFlagged
:
=>
if
window
.
user
.
id
in
@
model
.
get
(
"abuse_flaggers"
)
or
(
DiscussionUtil
.
isFlagModerator
and
@
model
.
get
(
"abuse_flaggers"
).
length
>
0
)
...
...
@@ -70,7 +72,12 @@ if Backbone?
@
renderVoted
()
@
renderFlagged
()
@
renderPinned
()
@
$
(
"[data-role=discussion-vote] .votes-count-number"
).
html
(
@
model
.
get
(
"votes"
)[
"up_count"
])
@
$
(
"[data-role=discussion-vote] .votes-count-number"
).
html
(
@
model
.
get
(
"votes"
)[
"up_count"
]
+
'<span class ="sr"></span>'
)
if
window
.
user
.
voted
(
@
model
)
@
$
(
"[data-role=discussion-vote] .votes-count-number span.sr"
).
html
(
"votes (click to remove your vote)"
)
else
@
$
(
"[data-role=discussion-vote] .votes-count-number span.sr"
).
html
(
"votes (click to vote)"
)
convertMath
:
->
element
=
@
$
(
".post-body"
)
...
...
common/static/coffee/src/discussion/views/thread_response_show_view.coffee
View file @
c850be4a
...
...
@@ -23,6 +23,7 @@ if Backbone?
@
delegateEvents
()
if
window
.
user
.
voted
(
@
model
)
@
$
(
".vote-btn"
).
addClass
(
"is-cast"
)
@
$
(
".vote-btn span.sr"
).
html
(
"votes (click to remove your vote)"
)
@
renderAttrs
()
@
renderFlagged
()
@
$el
.
find
(
".posted-details"
).
timeago
()
...
...
@@ -48,12 +49,14 @@ if Backbone?
@
$
(
".vote-btn"
).
toggleClass
(
"is-cast"
)
if
@
$
(
".vote-btn"
).
hasClass
(
"is-cast"
)
@
vote
()
@
$
(
".vote-btn span.sr"
).
html
(
"votes (click to remove your vote)"
)
else
@
unvote
()
@
$
(
".vote-btn span.sr"
).
html
(
"votes (click to vote)"
)
vote
:
->
url
=
@
model
.
urlFor
(
"upvote"
)
@
$
(
".votes-count-number"
).
html
(
parseInt
(
@
$
(
".votes-count-number"
).
html
())
+
1
)
@
$
(
".votes-count-number"
).
html
(
(
parseInt
(
@
$
(
".votes-count-number"
).
html
())
+
1
)
+
'<span class="sr"></span>'
)
DiscussionUtil
.
safeAjax
$elem
:
@
$
(
".discussion-vote"
)
url
:
url
...
...
@@ -64,7 +67,7 @@ if Backbone?
unvote
:
->
url
=
@
model
.
urlFor
(
"unvote"
)
@
$
(
".votes-count-number"
).
html
(
parseInt
(
@
$
(
".votes-count-number"
).
html
())
-
1
)
@
$
(
".votes-count-number"
).
html
(
(
parseInt
(
@
$
(
".votes-count-number"
).
html
())
-
1
)
+
'<span class="sr"></span>'
)
DiscussionUtil
.
safeAjax
$elem
:
@
$
(
".discussion-vote"
)
url
:
url
...
...
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