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
d108af88
Commit
d108af88
authored
Oct 02, 2012
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #799 from MITx/feature/cale/cms-codemirror-background
Feature/cale/cms codemirror background
parents
0cb9673b
55542c1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
cms/static/coffee/src/views/module_edit.coffee
+7
-3
cms/static/sass/_unit.scss
+4
-0
cms/templates/component.html
+5
-3
No files found.
cms/static/coffee/src/views/module_edit.coffee
View file @
d108af88
...
@@ -14,10 +14,13 @@ class CMS.Views.ModuleEdit extends Backbone.View
...
@@ -14,10 +14,13 @@ class CMS.Views.ModuleEdit extends Backbone.View
$component_editor
:
=>
@
$el
.
find
(
'.component-editor'
)
$component_editor
:
=>
@
$el
.
find
(
'.component-editor'
)
loadModules
:
->
loadDisplay
:
->
@
module
=
XModule
.
loadModule
(
@
$el
.
find
(
'.xmodule_edit'
))
XModule
.
loadModule
(
@
$el
.
find
(
'.xmodule_display'
))
XModule
.
loadModule
(
@
$el
.
find
(
'.xmodule_display'
))
loadEdit
:
->
if
!
@
module
@
module
=
XModule
.
loadModule
(
@
$el
.
find
(
'.xmodule_edit'
))
metadata
:
->
metadata
:
->
# cdodge: package up metadata which is separated into a number of input fields
# cdodge: package up metadata which is separated into a number of input fields
# there's probably a better way to do this, but at least this lets me continue to move onwards
# there's probably a better way to do this, but at least this lets me continue to move onwards
...
@@ -44,7 +47,7 @@ class CMS.Views.ModuleEdit extends Backbone.View
...
@@ -44,7 +47,7 @@ class CMS.Views.ModuleEdit extends Backbone.View
render
:
->
render
:
->
if
@
model
.
id
if
@
model
.
id
@
$el
.
load
(
"/preview_component/
#{
@
model
.
id
}
"
,
=>
@
$el
.
load
(
"/preview_component/
#{
@
model
.
id
}
"
,
=>
@
load
Modules
()
@
load
Display
()
@
delegateEvents
()
@
delegateEvents
()
)
)
...
@@ -70,3 +73,4 @@ class CMS.Views.ModuleEdit extends Backbone.View
...
@@ -70,3 +73,4 @@ class CMS.Views.ModuleEdit extends Backbone.View
event
.
preventDefault
()
event
.
preventDefault
()
@
$el
.
addClass
(
'editing'
)
@
$el
.
addClass
(
'editing'
)
@
$component_editor
().
slideDown
(
150
)
@
$component_editor
().
slideDown
(
150
)
@
loadEdit
()
cms/static/sass/_unit.scss
View file @
d108af88
...
@@ -228,6 +228,10 @@
...
@@ -228,6 +228,10 @@
border-radius
:
0
0
3px
3px
;
border-radius
:
0
0
3px
3px
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
0
,
0
,
0
,
0
)
,
rgba
(
0
,
0
,
0
,
.1
))
$blue
;
background
:
-webkit-linear-gradient
(
top
,
rgba
(
0
,
0
,
0
,
0
)
,
rgba
(
0
,
0
,
0
,
.1
))
$blue
;
.module-editor
{
background
:
white
;
}
h5
{
h5
{
margin-bottom
:
8px
;
margin-bottom
:
8px
;
color
:
#fff
;
color
:
#fff
;
...
...
cms/templates/component.html
View file @
d108af88
${preview}
${preview}
<div
class=
"component-actions"
>
<div
class=
"component-actions"
>
<a
href=
"#"
class=
"edit-button"
><span
class=
"edit-icon white"
></span>
Edit
</a>
<a
href=
"#"
class=
"edit-button"
><span
class=
"edit-icon white"
></span>
Edit
</a>
<a
href=
"#"
class=
"delete-button"
><span
class=
"delete-icon white"
></span>
Delete
</a>
<a
href=
"#"
class=
"delete-button
wip
"
><span
class=
"delete-icon white"
></span>
Delete
</a>
</div>
</div>
<a
href=
"#"
class=
"drag-handle"
></a>
<a
href=
"#"
class=
"drag-handle
wip
"
></a>
<div
class=
"component-editor"
>
<div
class=
"component-editor"
>
${editor}
<div
class=
"module-editor"
>
${editor}
</div>
<a
href=
"#"
class=
"save-button"
>
Save
</a>
<a
href=
"#"
class=
"save-button"
>
Save
</a>
<a
href=
"#"
class=
"cancel-button"
>
Cancel
</a>
<a
href=
"#"
class=
"cancel-button"
>
Cancel
</a>
</div>
</div>
...
...
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