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
523cb334
Commit
523cb334
authored
Aug 08, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hook up reordering children in the browser.
* NOTE: the new order is NOT saved to the server!
parent
77175872
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
+13
-1
cms/static/coffee/src/views/module_edit.coffee
+12
-0
cms/templates/widgets/sequence-edit.html
+1
-1
No files found.
cms/static/coffee/src/views/module_edit.coffee
View file @
523cb334
...
...
@@ -13,6 +13,16 @@ class CMS.Views.ModuleEdit extends Backbone.View
# Load preview modules
XModule
.
loadModules
(
'display'
)
@
enableDrag
()
enableDrag
:
->
# Enable dragging things in the #sortable div (if there is one)
if
$
(
"#sortable"
).
length
>
0
$
(
"#sortable"
).
sortable
({
placeholder
:
"ui-state-highlight"
})
$
(
"#sortable"
).
disableSelection
();
save
:
(
event
)
->
event
.
preventDefault
()
...
...
@@ -32,6 +42,7 @@ class CMS.Views.ModuleEdit extends Backbone.View
cancel
:
(
event
)
->
event
.
preventDefault
()
CMS
.
popView
()
@
enableDrag
()
editSubmodule
:
(
event
)
->
event
.
preventDefault
()
...
...
@@ -42,3 +53,4 @@ class CMS.Views.ModuleEdit extends Backbone.View
id
:
$
(
event
.
target
).
data
(
'id'
)
type
:
if
moduleType
==
'None'
then
null
else
moduleType
previewType
:
if
previewType
==
'None'
then
null
else
previewType
@
enableDrag
()
cms/templates/widgets/sequence-edit.html
View file @
523cb334
...
...
@@ -33,7 +33,7 @@
<section
class=
"modules"
>
<ol>
<li>
<ol>
<ol
id=
"sortable"
>
% for child in module.get_children():
<li
class=
"${module.category}"
>
<a
href=
"#"
class=
"module-edit"
...
...
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