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
ead346ee
Commit
ead346ee
authored
Jan 15, 2013
by
Valera Rozuvan
Committed by
Alexander Kryklia
Jan 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring. New feature: adding multiple draggables from one.
parent
e2bbaf08
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
common/static/js/capa/drag_and_drop/draggables.js
+0
-0
common/static/js/capa/drag_and_drop/main.js
+3
-1
common/static/js/capa/drag_and_drop/targets.js
+0
-9
common/static/js/capa/drag_and_drop/update_input.js
+5
-3
No files found.
common/static/js/capa/drag_and_drop/draggables.js
View file @
ead346ee
This diff is collapsed.
Click to expand it.
common/static/js/capa/drag_and_drop/main.js
View file @
ead346ee
...
...
@@ -63,7 +63,9 @@ define(
Targets
(
state
);
Scroller
(
state
);
Draggables
(
state
);
Draggables
.
init
(
state
);
logme
(
'After Draggables.init(state); state = '
,
state
);
// Update the input element, checking first that it is not filled with
// an answer from the server.
...
...
common/static/js/capa/drag_and_drop/targets.js
View file @
ead346ee
...
...
@@ -120,15 +120,6 @@ define(['logme'], function (logme) {
lowestZIndex
=
10000
;
for
(
c1
=
0
;
c1
<
draggablesInMe
.
length
;
c1
+=
1
)
{
logme
(
'draggablesInMe['
+
c1
+
'].id = '
+
draggablesInMe
[
c1
].
id
,
'draggablesInMe['
+
c1
+
'].zIndex = '
+
draggablesInMe
[
c1
].
zIndex
,
'draggablesInMe['
+
c1
+
'].oldZIndex = '
+
draggablesInMe
[
c1
].
oldZIndex
);
}
logme
(
'------------------'
);
for
(
c1
=
0
;
c1
<
draggablesInMe
.
length
;
c1
+=
1
)
{
if
(
draggablesInMe
[
c1
].
zIndex
<
lowestZIndex
)
{
lowestZIndex
=
draggablesInMe
[
c1
].
zIndex
;
}
...
...
common/static/js/capa/drag_and_drop/update_input.js
View file @
ead346ee
...
...
@@ -10,6 +10,8 @@ define(['logme'], function (logme) {
function
updateInput
(
state
,
checkFirst
)
{
var
inputEl
,
stateStr
,
targets
,
draggables
,
c1
,
c2
,
tempObj
;
logme
(
'updateInput; state = '
,
state
);
if
(
checkFirst
===
true
)
{
if
(
checkIfHasAnswer
()
===
true
)
{
return
;
...
...
@@ -126,7 +128,7 @@ define(['logme'], function (logme) {
return
;
}
draggable
.
setInContainer
(
false
)
;
draggable
.
inContainer
=
false
;
draggable
.
containerEl
.
hide
();
draggable
.
iconEl
.
detach
();
...
...
@@ -196,7 +198,7 @@ define(['logme'], function (logme) {
);
}
draggable
.
setOnTarget
(
target
)
;
draggable
.
onTarget
=
target
;
target
.
draggable
.
push
(
draggableId
);
if
(
target
.
numTextEl
!==
null
)
{
...
...
@@ -244,7 +246,7 @@ define(['logme'], function (logme) {
return
;
}
draggable
.
setInContainer
(
false
)
;
draggable
.
inContainer
=
false
;
draggable
.
containerEl
.
hide
();
draggable
.
iconEl
.
detach
();
...
...
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