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
3756d317
Commit
3756d317
authored
Sep 14, 2012
by
Arjun Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Placeholder for wmd editors; specifically comment form
parent
11289e6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
lms/static/coffee/src/discussion/utils.coffee
+3
-0
lms/templates/discussion/_underscore_templates.html
+2
-1
No files found.
lms/static/coffee/src/discussion/utils.coffee
View file @
3756d317
...
...
@@ -155,6 +155,7 @@ class @DiscussionUtil
@
makeWmdEditor
:
(
$content
,
$local
,
cls_identifier
)
->
elem
=
$local
(
".
#{
cls_identifier
}
"
)
placeholder
=
elem
.
data
(
'placeholder'
)
id
=
elem
.
data
(
"id"
)
appended_id
=
"-
#{
cls_identifier
}
-
#{
id
}
"
imageUploadUrl
=
@
urlFor
(
'upload'
)
...
...
@@ -162,6 +163,8 @@ class @DiscussionUtil
(
text
)
->
_this
.
postMathJaxProcessor
(
text
)
editor
=
Markdown
.
makeWmdEditor
elem
,
appended_id
,
imageUploadUrl
,
_processor
(
@
)
@
wmdEditors
[
"
#{
cls_identifier
}
-
#{
id
}
"
]
=
editor
if
placeholder
?
elem
.
find
(
"#wmd-input
#{
appended_id
}
"
).
attr
(
'placeholder'
,
placeholder
)
editor
@
getWmdEditor
:
(
$content
,
$local
,
cls_identifier
)
->
...
...
lms/templates/discussion/_underscore_templates.html
View file @
3756d317
...
...
@@ -79,7 +79,8 @@
<
li
class
=
"new-comment response-local"
>
<
form
class
=
"comment-form"
data
-
id
=
"${'<%- wmdId %>'}"
>
<
ul
class
=
"discussion-errors"
><
/ul
>
<
div
class
=
"comment-body"
data
-
id
=
"${'<%- wmdId %>'}"
><
/div
>
<
div
class
=
"comment-body"
data
-
id
=
"${'<%- wmdId %>'}"
data
-
placeholder
=
"Add a comment..."
><
/div
>
<
div
class
=
"comment-post-control"
>
<
a
class
=
"discussion-submit-comment control-button"
href
=
"#"
>
Submit
<
/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