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
285c07fc
Commit
285c07fc
authored
May 22, 2014
by
Dave St.Germain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed review feedback.
parent
232df30b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
common/static/js/capa/drag_and_drop/base_image.js
+3
-1
common/static/js/capa/drag_and_drop/draggable_events.js
+5
-5
common/static/js/capa/drag_and_drop/draggable_logic.js
+4
-6
No files found.
common/static/js/capa/drag_and_drop/base_image.js
View file @
285c07fc
...
...
@@ -17,7 +17,9 @@ define([], function () {
'></div>'
);
state
.
baseImageEl
=
$
(
'<img alt="drop target image" />'
);
state
.
baseImageEl
=
$
(
'<img />'
,
{
alt
:
gettext
(
"Drop target image"
)
});
state
.
baseImageEl
.
attr
(
'src'
,
state
.
config
.
baseImage
);
state
.
baseImageEl
.
load
(
function
()
{
...
...
common/static/js/capa/drag_and_drop/draggable_events.js
View file @
285c07fc
...
...
@@ -63,7 +63,6 @@ return {
});
this
.
iconEl
.
appendTo
(
this
.
state
.
baseImageEl
.
parent
());
if
(
this
.
labelEl
!==
null
)
{
if
(
this
.
isOriginal
===
true
)
{
this
.
labelEl
.
detach
();
...
...
@@ -83,9 +82,10 @@ return {
if
(
this
.
isOriginal
===
true
)
{
this
.
state
.
numDraggablesInSlider
-=
1
;
}
SR
.
readText
(
gettext
(
'dragging out of slider'
));
// SR: global "screen reader" object in accessibility_tools.js
window
.
SR
.
readText
(
gettext
(
'dragging out of slider'
));
}
else
{
SR
.
readText
(
gettext
(
'dragging'
));
window
.
SR
.
readText
(
gettext
(
'dragging'
));
}
this
.
zIndex
=
1000
;
...
...
@@ -107,9 +107,9 @@ return {
this
.
checkLandingElement
();
if
(
this
.
inContainer
===
true
)
{
SR
.
readText
(
gettext
(
'dropped in slider'
));
window
.
SR
.
readText
(
gettext
(
'dropped in slider'
));
}
else
{
SR
.
readText
(
gettext
(
'dropped on target'
));
window
.
SR
.
readText
(
gettext
(
'dropped on target'
));
}
this
.
toggleTargets
(
false
);
}
...
...
common/static/js/capa/drag_and_drop/draggable_logic.js
View file @
285c07fc
...
...
@@ -236,15 +236,13 @@ return {
return
false
;
},
'toggleTargets'
:
function
(
onoff
)
{
var
c1
,
target
,
effect
;
effect
=
(
onoff
?
'move'
:
undefined
);
'toggleTargets'
:
function
(
isEnabled
)
{
var
effect
=
(
isEnabled
?
'move'
:
undefined
);
this
.
state
.
baseImageEl
.
attr
(
'aria-dropeffect'
,
effect
);
for
(
c1
=
0
;
c1
<
this
.
state
.
targets
.
length
;
c1
+=
1
)
{
target
=
this
.
state
.
targets
[
c1
];
$
.
each
(
this
.
state
.
targets
,
function
(
target
)
{
target
.
targetEl
.
attr
(
'aria-dropeffect'
,
effect
);
}
}
);
},
'snapToTarget'
:
function
(
target
)
{
...
...
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