Commit 04b9f337 by Waheed Ahmed

Merge pull request #3368 from edx/waheed/stud1514-toggle-cheatsheet-not-working

Fixed toggle cheatsheet not working on component editors.
parents 97d587c4 df96c17e
...@@ -113,6 +113,11 @@ Feature: CMS.Problem Editor ...@@ -113,6 +113,11 @@ Feature: CMS.Problem Editor
And I unpublish the unit And I unpublish the unit
Then I can edit the problem Then I can edit the problem
Scenario: Cheat sheet visible on toggle
Given I have created a Blank Common Problem
And I can edit the problem
Then I can see cheatsheet
# Disabled 11/13/2013 after failing in master # Disabled 11/13/2013 after failing in master
# The screenshot showed that the LaTeX editor had the text "hi", # The screenshot showed that the LaTeX editor had the text "hi",
# but Selenium timed out waiting for the text to appear. # but Selenium timed out waiting for the text to appear.
......
...@@ -250,6 +250,13 @@ def i_can_edit_problem(_step): ...@@ -250,6 +250,13 @@ def i_can_edit_problem(_step):
world.edit_component() world.edit_component()
@step(u'I can see cheatsheet$')
def verify_cheat_sheet_displaying(_step):
world.css_click("a.cheatsheet-toggle")
css_selector = 'article.simple-editor-cheatsheet'
world.wait_for_visible(css_selector)
def verify_high_level_source_links(step, visible): def verify_high_level_source_links(step, visible):
if visible: if visible:
assert_true(world.is_css_present('.launch-latex-compiler'), assert_true(world.is_css_present('.launch-latex-compiler'),
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
// large modals - component editors and interactives // large modals - component editors and interactives
.modal-lg { .modal-lg {
width: 75%; width: 70%;
min-width: ($baseline*27.5); min-width: ($baseline*27.5);
height: auto; height: auto;
......
...@@ -51,14 +51,13 @@ ...@@ -51,14 +51,13 @@
@include transition(width .3s linear 0s); @include transition(width .3s linear 0s);
&.shown { &.shown {
width: 300px; width: 20%;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
} }
.cheatsheet-wrapper { .cheatsheet-wrapper {
width: 240px; padding: 10%;
padding: 20px 30px;
} }
h6 { h6 {
......
...@@ -51,14 +51,13 @@ ...@@ -51,14 +51,13 @@
@include transition(width .3s linear 0s); @include transition(width .3s linear 0s);
&.shown { &.shown {
width: 300px; width: 20%;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
} }
.cheatsheet-wrapper { .cheatsheet-wrapper {
width: 240px; padding: 10%;
padding: 20px 30px;
} }
h6 { h6 {
......
...@@ -94,6 +94,9 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ...@@ -94,6 +94,9 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor
@cheatsheet = $($('#simple-editor-cheatsheet').html()) @cheatsheet = $($('#simple-editor-cheatsheet').html())
$(@markdown_editor.getWrapperElement()).append(@cheatsheet) $(@markdown_editor.getWrapperElement()).append(@cheatsheet)
$(".CodeMirror").css({"overflow": "visible"})
$(".modal-content").css({"overflow-y": "visible", "overflow-x": "visible"})
setTimeout (=> @cheatsheet.toggleClass('shown')), 10 setTimeout (=> @cheatsheet.toggleClass('shown')), 10
### ###
......
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