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
40dcb510
Commit
40dcb510
authored
Mar 24, 2016
by
attiyaIshaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11850 from edx/ai/tnl3964-forum-vote-button
Fix styling of vote button in forums responses.
parents
69339390
1e74f942
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
common/static/coffee/spec/discussion/view/discussion_view_spec_helper.coffee
+8
-0
common/static/coffee/spec/discussion/view/thread_response_show_view_spec.coffee
+3
-0
common/static/coffee/src/discussion/views/discussion_content_view.coffee
+0
-1
common/static/common/templates/discussion/forum-action-vote.underscore
+1
-1
No files found.
common/static/coffee/spec/discussion/view/discussion_view_spec_helper.coffee
View file @
40dcb510
...
...
@@ -23,6 +23,14 @@ class @DiscussionViewSpecHelper
}
$
.
extend
(
thread
,
props
)
@
checkVoteClasses
=
(
view
)
->
view
.
render
()
display_button
=
view
.
$el
.
find
(
".display-vote"
)
expect
(
display_button
.
hasClass
(
"is-hidden"
)).
toBe
(
true
)
action_button
=
view
.
$el
.
find
(
".action-vote"
)
# Check that inline css is not applied to the ".action-vote"
expect
(
action_button
).
not
.
toHaveAttr
(
'style'
,
'display: inline; '
);
@
expectVoteRendered
=
(
view
,
model
,
user
)
->
button
=
view
.
$el
.
find
(
".action-vote"
)
expect
(
button
.
hasClass
(
"is-checked"
)).
toBe
(
user
.
voted
(
model
))
...
...
common/static/coffee/spec/discussion/view/thread_response_show_view_spec.coffee
View file @
40dcb510
...
...
@@ -30,6 +30,9 @@ describe "ThreadResponseShowView", ->
it
"renders the vote state correctly"
,
->
DiscussionViewSpecHelper
.
checkRenderVote
(
@
view
,
@
comment
)
it
"check the vote classes after renders"
,
->
DiscussionViewSpecHelper
.
checkVoteClasses
(
@
view
)
it
"votes correctly via click"
,
->
DiscussionViewSpecHelper
.
checkUpvote
(
@
view
,
@
comment
,
@
user
,
$
.
Event
(
"click"
))
...
...
common/static/coffee/src/discussion/views/discussion_content_view.coffee
View file @
40dcb510
...
...
@@ -138,7 +138,6 @@ if Backbone?
closed
:
(
closed
)
->
@
updateButtonState
(
".action-close"
,
closed
)
@
$
(
".post-label-closed"
).
toggleClass
(
"is-hidden"
,
not
closed
)
@
$
(
".action-vote"
).
toggle
(
not
closed
)
@
$
(
".display-vote"
).
toggle
(
closed
)
})
...
...
common/static/common/templates/discussion/forum-action-vote.underscore
View file @
40dcb510
<li class="actions-item">
<span aria-hidden="true" class="display-vote" >
<span aria-hidden="true" class="display-vote
is-hidden
" >
<span class="vote-count"></span>
</span>
<a href="#" class="action-button action-vote" role="checkbox" aria-checked="false">
...
...
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