Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
523cb334
Commit
523cb334
authored
12 years ago
by
Victor Shnayder
Browse files
Options
Downloads
Patches
Plain Diff
Hook up reordering children in the browser.
* NOTE: the new order is NOT saved to the server!
parent
77175872
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/static/coffee/src/views/module_edit.coffee
+12
-0
12 additions, 0 deletions
cms/static/coffee/src/views/module_edit.coffee
cms/templates/widgets/sequence-edit.html
+1
-1
1 addition, 1 deletion
cms/templates/widgets/sequence-edit.html
with
13 additions
and
1 deletion
cms/static/coffee/src/views/module_edit.coffee
+
12
−
0
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
()
This diff is collapsed.
Click to expand it.
cms/templates/widgets/sequence-edit.html
+
1
−
1
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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment