Merge branch 'release'

Conflicts:
	cms/templates/widgets/source-edit.html
This commit is contained in:
Chris Dodge
2014-04-14 14:17:03 -04:00
291 changed files with 40243 additions and 468850 deletions

View File

@@ -126,7 +126,16 @@ require(["jquery", "jquery.leanModal", "codemirror/stex"], function($) {
if (xml.length == 0) {
alert('Conversion failed! error:' + data.message);
} else {
el.closest('.xblock-studio_view').find('.CodeMirror-wrap')[0].CodeMirror.setValue(xml);
// If a parent CodeMirror editor is open (LaTeX problem being edited), set the text
// there. Otherwise, set the text in the active TinyMCE Editor for the case
// of an HTML component being edited.
var parentCodemirrorEditor = el.closest('.xblock-studio_view').find('.CodeMirror-wrap');
if (parentCodemirrorEditor.length > 0) {
parentCodemirrorEditor[0].CodeMirror.setValue(xml);
}
else if (window.tinyMCE !== undefined && window.tinyMCE.activeEditor !== undefined) {
window.tinyMCE.activeEditor.setContent(xml);
}
save_hls(el);
}
},