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
14234c81
Commit
14234c81
authored
Feb 11, 2013
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1481 from MITx/bug/dhm/misc
Bug 180
parents
46a7f742
ae4a854e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
cms/static/js/views/overview.js
+7
-3
No files found.
cms/static/js/views/overview.js
View file @
14234c81
...
...
@@ -202,13 +202,17 @@ function _handleReorder(event, ui, parentIdField, childrenSelector) {
children
=
_
.
without
(
children
,
ui
.
draggable
.
data
(
'id'
));
}
// add to this parent (figure out where)
for
(
var
i
=
0
;
i
<
_els
.
length
;
i
++
)
{
if
(
!
ui
.
draggable
.
is
(
_els
[
i
])
&&
ui
.
offset
.
top
<
$
(
_els
[
i
]).
offset
().
top
)
{
for
(
var
i
=
0
,
bump
=
0
;
i
<
_els
.
length
;
i
++
)
{
if
(
ui
.
draggable
.
is
(
_els
[
i
]))
{
bump
=
-
1
;
// bump indicates that the draggable was passed in the dom but not children's list b/c
// it's not in that list
}
else
if
(
ui
.
offset
.
top
<
$
(
_els
[
i
]).
offset
().
top
)
{
// insert at i in children and _els
ui
.
draggable
.
insertBefore
(
$
(
_els
[
i
]));
// TODO figure out correct way to have it remove the style: top:n; setting (and similar line below)
ui
.
draggable
.
attr
(
"style"
,
"position:relative;"
);
children
.
splice
(
i
,
0
,
ui
.
draggable
.
data
(
'id'
));
children
.
splice
(
i
+
bump
,
0
,
ui
.
draggable
.
data
(
'id'
));
break
;
}
}
...
...
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