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
d0c2d315
Commit
d0c2d315
authored
Sep 10, 2012
by
Tom Giannattasio
Committed by
Ibrahim Awwal
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new show/hide button for inline discussions
parent
e55e1a99
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
8 deletions
+35
-8
lms/static/coffee/src/discussion/discussion_module_view.coffee
+10
-4
lms/static/images/show-hide-discussion-icon.png
+0
-0
lms/static/sass/_discussion.scss
+24
-3
lms/templates/discussion/_discussion_module.html
+1
-1
No files found.
lms/static/coffee/src/discussion/discussion_module_view.coffee
View file @
d0c2d315
...
...
@@ -28,14 +28,20 @@ if Backbone?
@
newPostForm
.
slideUp
(
300
)
toggleDiscussion
:
(
event
)
->
thisButton
=
$
(
event
.
target
).
closest
(
'a'
)
if
@
showed
@
$
(
"section.discussion"
).
hide
()
$
(
event
.
target
).
html
(
"Show Discussion"
)
@
$
(
"section.discussion"
).
slideUp
()
thisButton
.
removeClass
(
'shown'
)
thisButton
.
find
(
'.button-text'
).
html
(
"Show Discussion"
)
@
showed
=
false
else
$
(
event
.
target
).
html
(
"Hide Discussion"
)
thisButton
.
addClass
(
'shown'
)
thisButton
.
find
(
'.button-text'
).
html
(
"Hide Discussion"
)
console
.
log
(
$
(
event
.
target
))
if
@
retrieved
@
$
(
"section.discussion"
).
s
how
()
@
$
(
"section.discussion"
).
s
lideDown
()
@
showed
=
true
else
$elem
=
$
(
event
.
target
)
...
...
lms/static/images/show-hide-discussion-icon.png
0 → 100644
View file @
d0c2d315
1.57 KB
lms/static/sass/_discussion.scss
View file @
d0c2d315
...
...
@@ -1571,16 +1571,33 @@ body.discussion {
.discussion-module
{
@extend
.discussion-body
;
margin
:
20px
0
;
padding
:
20px
;
padding
:
20px
20px
28px
20px
;
background
:
#f6f6f6
!
important
;
border-radius
:
3px
;
.discussion-show
{
@include
white-button
;
display
:
block
;
width
:
200px
;
margin
:
auto
;
margin
:
auto
;
font-size
:
14px
;
text-align
:
center
;
&
.shown
{
.show-hide-discussion-icon
{
background-position
:
0
0
;
}
}
.show-hide-discussion-icon
{
display
:
inline-block
;
position
:
relative
;
top
:
5px
;
margin-right
:
6px
;
width
:
21px
;
height
:
19px
;
background
:
url(../images/show-hide-discussion-icon.png)
no-repeat
;
background-position
:
-21px
0
;
}
}
.new-post-btn
{
...
...
@@ -1590,6 +1607,10 @@ body.discussion {
section
.discussion
{
margin-top
:
20px
;
.threads
{
margin-top
:
20px
;
}
/* Course content p has a default margin-bottom of 1.416em, this is just to reset that */
.discussion-thread
{
padding
:
0
;
...
...
lms/templates/discussion/_discussion_module.html
View file @
d0c2d315
<
%
include
file=
"_underscore_templates.html"
/>
<div
class=
"discussion-module"
data-discussion-id=
"${discussion_id | h}"
>
<a
class=
"discussion-show control-button"
href=
"javascript:void(0)"
data-discussion-id=
"${discussion_id | h}"
>
Show Discussion
</a>
<a
class=
"discussion-show control-button"
href=
"javascript:void(0)"
data-discussion-id=
"${discussion_id | h}"
>
<span
class=
"show-hide-discussion-icon"
></span><span
class=
"button-text"
>
Show Discussion
</span>
</a>
</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