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
e09a8e4a
Commit
e09a8e4a
authored
Jan 03, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show markdown if it doesn't exist.
parent
1c886b33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
cms/templates/widgets/problem-edit.html
+24
-17
common/lib/xmodule/xmodule/js/src/problem/markdown.coffee
+1
-1
No files found.
cms/templates/widgets/problem-edit.html
View file @
e09a8e4a
<
%
include
file=
"metadata-edit.html"
/>
<section
class=
"problem-editor editor"
>
<div
class=
"row"
>
<div
class=
"editor-bar"
>
<ul
class=
"format-buttons"
>
<li><a
href=
"#"
class=
"multiple-choice-button"
data-tooltip=
"Multiple Choice"
><span
class=
"problem-editor-icon multiple-choice"
></span></a></li>
<li><a
href=
"#"
class=
"checks-button"
data-tooltip=
"Check Multiple"
><span
class=
"problem-editor-icon checks"
></span></a></li>
<li><a
href=
"#"
class=
"string-button"
data-tooltip=
"String Response"
><span
class=
"problem-editor-icon string"
></span></a></li>
<li><a
href=
"#"
class=
"number-button"
data-tooltip=
"Numerical Response"
><span
class=
"problem-editor-icon number"
></span></a></li>
<li><a
href=
"#"
class=
"dropdown-button"
data-tooltip=
"Dropdown"
><span
class=
"problem-editor-icon dropdown"
></span></a></li>
</ul>
<ul
class=
"editor-tabs"
>
<li><a
href=
"#"
class=
"simple-tab tab current"
data-tab=
"simple"
>
Simple
</a></li>
<li><a
href=
"#"
class=
"xml-tab tab"
data-tab=
"xml"
>
XML
</a></li>
<li><a
href=
"#"
class=
"cheatsheet-toggle"
data-tooltip=
"Toggle Cheatsheet"
>
?
</a></li>
</ul>
<div
class=
"row"
>
%if markdown != '' or data == '':
<div
class=
"editor-bar"
>
<ul
class=
"format-buttons"
>
<li><a
href=
"#"
class=
"multiple-choice-button"
data-tooltip=
"Multiple Choice"
><span
class=
"problem-editor-icon multiple-choice"
></span></a></li>
<li><a
href=
"#"
class=
"checks-button"
data-tooltip=
"Check Multiple"
><span
class=
"problem-editor-icon checks"
></span></a></li>
<li><a
href=
"#"
class=
"string-button"
data-tooltip=
"String Response"
><span
class=
"problem-editor-icon string"
></span></a></li>
<li><a
href=
"#"
class=
"number-button"
data-tooltip=
"Numerical Response"
><span
class=
"problem-editor-icon number"
></span></a></li>
<li><a
href=
"#"
class=
"dropdown-button"
data-tooltip=
"Dropdown"
><span
class=
"problem-editor-icon dropdown"
></span></a></li>
</ul>
<ul
class=
"editor-tabs"
>
<li><a
href=
"#"
class=
"simple-tab tab current"
data-tab=
"simple"
>
Simple
</a></li>
<li><a
href=
"#"
class=
"xml-tab tab"
data-tab=
"xml"
>
XML
</a></li>
<li><a
href=
"#"
class=
"cheatsheet-toggle"
data-tooltip=
"Toggle Cheatsheet"
>
?
</a></li>
</ul>
</div>
<textarea
class=
"edit-box"
>
${markdown}
</textarea>
%endif
<textarea
class=
"xml-box"
rows=
"8"
cols=
"40"
>
${data | h}
</textarea>
</div>
<textarea
class=
"edit-box"
>
${markdown}
</textarea>
<textarea
class=
"xml-box"
>
${data | h}
</textarea>
</div>
</section>
common/lib/xmodule/xmodule/js/src/problem/markdown.coffee
View file @
e09a8e4a
class
@
MarkdownEditingDescriptor
extends
XModule
.
Descriptor
constructor
:
(
@
element
)
->
@
edit_box
=
CodeMirror
.
fromTextArea
(
$
(
".
edit
-box"
,
@
element
)[
0
],
{
@
edit_box
=
CodeMirror
.
fromTextArea
(
$
(
".
xml
-box"
,
@
element
)[
0
],
{
mode
:
"xml"
lineNumbers
:
true
lineWrapping
:
true
...
...
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