Commit 38db6e69 by Omar Al-Ithawi

Giant fixups for the editors around the studio

parent 1714d23a
......@@ -15,7 +15,8 @@
border-radius: ($baseline/5);
background-color: $gray-l4;
padding: 7px;
text-align: left;
@include text-align(left);
@include direction();
.modal-content {
position: relative;
......@@ -214,7 +215,7 @@
.editor-modes {
width: 48%;
display: inline-block;
text-align: right;
@include text-align(right);
.action-item {
display: inline-block;
......
......@@ -2,6 +2,8 @@
// ====================
.view-settings {
@include text-align(left);
@include direction();
.content-primary, .content-supplementary {
@include box-sizing(border-box);
......@@ -908,6 +910,19 @@
top: 4px; /* Vertical alignment for monospace font */
}
.CodeMirror-scroll {
@include margin-left(-30px);
@include margin-right(0);
@include padding-left(30px);
@include padding-right(0);
}
.CodeMirror-vscrollbar {
@include left(0);
@include right(auto);
}
// editor color changes just for JSON
.CodeMirror-lines {
......
......@@ -15,7 +15,7 @@
a {
display: block;
float: left;
@include float(left);
padding: 3px ($baseline/2) 7px;
margin-left: 7px;
border-radius: 2px;
......@@ -29,14 +29,16 @@
.editor-tabs {
position: absolute;
top: 10px;
right: 10px;
@include right(10px);
@include text-align(left);
@include direction();
li {
float: left;
margin-right: ($baseline/4);
@include float(left);
@include margin-right($baseline/4);
&:last-child {
margin-right: 0;
@include margin-right(0);
}
}
......
class @MarkdownEditingDescriptor extends XModule.Descriptor
# TODO really, these templates should come from or also feed the cheatsheet
@multipleChoiceTemplate : "( ) incorrect\n( ) incorrect\n(x) correct\n"
@checkboxChoiceTemplate: "[x] correct\n[ ] incorrect\n[x] correct\n"
@stringInputTemplate: "= answer\n"
@numberInputTemplate: "= answer +- 0.001%\n"
@selectTemplate: "[[incorrect, (correct), incorrect]]\n"
@headerTemplate: "Header\n=====\n"
@explanationTemplate: "[explanation]\nShort explanation\n[explanation]\n"
@multipleChoiceTemplate : "( ) #{gettext 'incorrect'}\n( ) #{gettext 'incorrect'}\n(x) #{gettext 'correct'}\n"
@checkboxChoiceTemplate: "[x] #{gettext 'correct'}\n[ ] incorrect\n[x] correct\n"
@stringInputTemplate: "= #{gettext 'answer'}\n"
@numberInputTemplate: "= #{gettext 'answer'} +- 0.001%\n"
@selectTemplate: "[[#{gettext 'incorrect'}, (#{gettext 'correct'}), #{gettext 'incorrect'}]]\n"
@headerTemplate: "#{gettext 'Header'}\n=====\n"
@explanationTemplate: "[explanation]\n#{gettext 'Short explanation'}\n[explanation]\n"
constructor: (element) ->
@element = element
......@@ -67,7 +67,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
###
confirmConversionToXml: ->
# TODO: use something besides a JavaScript confirm dialog?
return confirm("If you use the Advanced Editor, this problem will be converted to XML and you will not be able to return to the Simple Editor Interface.\n\nProceed to the Advanced Editor and convert this problem to XML?")
return confirm(gettext "If you use the Advanced Editor, this problem will be converted to XML and you will not be able to return to the Simple Editor Interface.\n\nProceed to the Advanced Editor and convert this problem to XML?")
###
Event listener for toolbar buttons (only possible when markdown editor is visible).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment