Commit fe154f49 by Waheed Ahmed Committed by Zia Fazal

Fixed CodeMirror editor view height in studio.

TNL-920
parent 5c0df38d
...@@ -222,6 +222,10 @@ ...@@ -222,6 +222,10 @@
height: 365px; height: 365px;
} }
.CodeMirror-advanced {
height: 435px;
}
.wrapper-comp-settings { .wrapper-comp-settings {
.list-input { .list-input {
......
...@@ -62,6 +62,7 @@ Write a persuasive essay to a newspaper reflecting your views on censorship in l ...@@ -62,6 +62,7 @@ Write a persuasive essay to a newspaper reflecting your views on censorship in l
$(@element.find('.xml-box')).hide() $(@element.find('.xml-box')).hide()
else else
@createXMLEditor() @createXMLEditor()
@xml_editor.display.wrapper.className += " CodeMirror-advanced";
@alertTaskRubricModification() @alertTaskRubricModification()
...@@ -92,6 +93,7 @@ Write a persuasive essay to a newspaper reflecting your views on censorship in l ...@@ -92,6 +93,7 @@ Write a persuasive essay to a newspaper reflecting your views on censorship in l
@toggleCheatsheetVisibility() @toggleCheatsheetVisibility()
if @confirmConversionToXml() if @confirmConversionToXml()
@createXMLEditor(OpenEndedMarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue())) @createXMLEditor(OpenEndedMarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue()))
@xml_editor.display.wrapper.className += " CodeMirror-advanced";
# Need to refresh to get line numbers to display properly (and put cursor position to 0) # Need to refresh to get line numbers to display properly (and put cursor position to 0)
@xml_editor.setCursor(0) @xml_editor.setCursor(0)
@xml_editor.refresh() @xml_editor.refresh()
......
...@@ -25,6 +25,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -25,6 +25,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
$(@element.find('.xml-box')).hide() $(@element.find('.xml-box')).hide()
else else
@createXMLEditor() @createXMLEditor()
@xml_editor.display.wrapper.className += " CodeMirror-advanced";
### ###
Creates the XML Editor and sets it as the current editor. If text is passed in, Creates the XML Editor and sets it as the current editor. If text is passed in,
...@@ -53,6 +54,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -53,6 +54,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
@toggleCheatsheetVisibility() @toggleCheatsheetVisibility()
if @confirmConversionToXml() if @confirmConversionToXml()
@createXMLEditor(MarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue())) @createXMLEditor(MarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue()))
@xml_editor.display.wrapper.className += " CodeMirror-advanced";
# Need to refresh to get line numbers to display properly (and put cursor position to 0) # Need to refresh to get line numbers to display properly (and put cursor position to 0)
@xml_editor.setCursor(0) @xml_editor.setCursor(0)
@xml_editor.refresh() @xml_editor.refresh()
......
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