Fixed cheatsheet for open ended editor.

STUD-1583
This commit is contained in:
Waheed Ahmed
2014-04-29 16:24:57 +05:00
parent ca0315ed9b
commit 998af82baa
4 changed files with 48 additions and 6 deletions

View File

@@ -135,13 +135,14 @@ define(["jquery", "underscore", "gettext", "js/views/modals/base_modal",
var parent = $(event.target.parentElement),
mode = parent.data('mode');
event.preventDefault();
var $cheatsheet = $('.simple-editor-cheatsheet');
if ($cheatsheet.hasClass("shown")) {
$(".CodeMirror").removeAttr("style");
$(".modal-content").removeAttr("style");
$cheatsheet.removeClass('shown');
}
this.selectMode(mode);
var $cheatsheet = $('.simple-editor-cheatsheet');
if ($cheatsheet.length == 0){
$cheatsheet = $('.simple-editor-open-ended-cheatsheet');
}
$(".CodeMirror").css({"overflow": "none"});
$(".modal-content").removeAttr("style");
$cheatsheet.removeClass('shown');
},
selectMode: function(mode) {