Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
01ff8396
Commit
01ff8396
authored
May 16, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CodeMirror initialization problem.
parent
235ecff2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
cms/static/coffee/src/views/module_edit.coffee
+6
-4
cms/static/sass/views/_unit.scss
+6
-4
No files found.
cms/static/coffee/src/views/module_edit.coffee
View file @
01ff8396
...
...
@@ -113,14 +113,16 @@ class CMS.Views.ModuleEdit extends Backbone.View
settingsModeButton
=
@
$el
.
find
(
'#settings-mode'
).
find
(
"a"
)
if
mode
==
@
editorMode
dataEditor
.
addClass
(
'is-active'
)
settingsEditor
.
removeClass
(
'is-active'
)
# Because of CodeMirror editor, cannot hide the data editor when it is first loaded. Therefore
# we have to use a class of is-inactive instead of is-active.
dataEditor
.
removeClass
(
'is-inactive'
)
editorModeButton
.
addClass
(
'is-set'
)
settingsEditor
.
removeClass
(
'is-active'
)
settingsModeButton
.
removeClass
(
'is-set'
)
else
dataEditor
.
removeClass
(
'is-active'
)
settingsEditor
.
addClass
(
'is-active'
)
dataEditor
.
addClass
(
'is-inactive'
)
editorModeButton
.
removeClass
(
'is-set'
)
settingsEditor
.
addClass
(
'is-active'
)
settingsModeButton
.
addClass
(
'is-set'
)
hideDataEditor
:
=>
...
...
cms/static/sass/views/_unit.scss
View file @
01ff8396
...
...
@@ -535,12 +535,14 @@ body.course.unit {
// Editor Wrapper
.wrapper-comp-editor
{
display
:
none
;
display
:
block
;
&
.is-active
{
display
:
block
;
// Because the editor may be a CodeMirror editor (which must be visible at the time it is created
// in order for it to properly initialize), we must toggle "is-inactive" instead of the more common "is-active".
&
.is-inactive
{
display
:
none
;
}
}
}
// Settings Wrapper
.wrapper-comp-settings
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment