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
269a8e9d
Commit
269a8e9d
authored
Feb 17, 2016
by
Attiya Ishaque
Committed by
attiyaishaque
Mar 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Styling on forums response vote button.
parent
1cef5827
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 @
269a8e9d
...
@@ -23,6 +23,14 @@ class @DiscussionViewSpecHelper
...
@@ -23,6 +23,14 @@ class @DiscussionViewSpecHelper
}
}
$
.
extend
(
thread
,
props
)
$
.
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
)
->
@
expectVoteRendered
=
(
view
,
model
,
user
)
->
button
=
view
.
$el
.
find
(
".action-vote"
)
button
=
view
.
$el
.
find
(
".action-vote"
)
expect
(
button
.
hasClass
(
"is-checked"
)).
toBe
(
user
.
voted
(
model
))
expect
(
button
.
hasClass
(
"is-checked"
)).
toBe
(
user
.
voted
(
model
))
...
...
common/static/coffee/spec/discussion/view/thread_response_show_view_spec.coffee
View file @
269a8e9d
...
@@ -30,6 +30,9 @@ describe "ThreadResponseShowView", ->
...
@@ -30,6 +30,9 @@ describe "ThreadResponseShowView", ->
it
"renders the vote state correctly"
,
->
it
"renders the vote state correctly"
,
->
DiscussionViewSpecHelper
.
checkRenderVote
(
@
view
,
@
comment
)
DiscussionViewSpecHelper
.
checkRenderVote
(
@
view
,
@
comment
)
it
"check the vote classes after renders"
,
->
DiscussionViewSpecHelper
.
checkVoteClasses
(
@
view
)
it
"votes correctly via click"
,
->
it
"votes correctly via click"
,
->
DiscussionViewSpecHelper
.
checkUpvote
(
@
view
,
@
comment
,
@
user
,
$
.
Event
(
"click"
))
DiscussionViewSpecHelper
.
checkUpvote
(
@
view
,
@
comment
,
@
user
,
$
.
Event
(
"click"
))
...
...
common/static/coffee/src/discussion/views/discussion_content_view.coffee
View file @
269a8e9d
...
@@ -138,7 +138,6 @@ if Backbone?
...
@@ -138,7 +138,6 @@ if Backbone?
closed
:
(
closed
)
->
closed
:
(
closed
)
->
@
updateButtonState
(
".action-close"
,
closed
)
@
updateButtonState
(
".action-close"
,
closed
)
@
$
(
".post-label-closed"
).
toggleClass
(
"is-hidden"
,
not
closed
)
@
$
(
".post-label-closed"
).
toggleClass
(
"is-hidden"
,
not
closed
)
@
$
(
".action-vote"
).
toggle
(
not
closed
)
@
$
(
".display-vote"
).
toggle
(
closed
)
@
$
(
".display-vote"
).
toggle
(
closed
)
})
})
...
...
common/static/common/templates/discussion/forum-action-vote.underscore
View file @
269a8e9d
<li class="actions-item">
<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 class="vote-count"></span>
</span>
</span>
<a href="#" class="action-button action-vote" role="checkbox" aria-checked="false">
<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