Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
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
OpenEdx
xblock-drag-and-drop-v2
Commits
06871d9e
Commit
06871d9e
authored
Aug 22, 2016
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes
parent
de47111b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
drag_and_drop_v2/public/js/drag_and_drop.js
+1
-3
tests/integration/test_interaction.py
+2
-2
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
06871d9e
...
@@ -198,7 +198,7 @@ function DragAndDropTemplates(configuration) {
...
@@ -198,7 +198,7 @@ function DragAndDropTemplates(configuration) {
var
item_wrapper
=
'div.item-wrapper'
;
var
item_wrapper
=
'div.item-wrapper'
;
var
is_item_in_zone
=
function
(
i
)
{
return
i
.
is_placed
&&
(
i
.
zone
===
zone
.
uid
);
};
var
is_item_in_zone
=
function
(
i
)
{
return
i
.
is_placed
&&
(
i
.
zone
===
zone
.
uid
);
};
var
items_in_zone
=
$
.
grep
(
ctx
.
items
,
is_item_in_zone
);
var
items_in_zone
=
$
.
grep
(
ctx
.
items
,
is_item_in_zone
);
var
zone_description_id
=
'zone-'
+
zone
.
id
+
'-description'
;
var
zone_description_id
=
'zone-'
+
zone
.
u
id
+
'-description'
;
if
(
items_in_zone
.
length
==
0
)
{
if
(
items_in_zone
.
length
==
0
)
{
var
zone_description
=
h
(
var
zone_description
=
h
(
'div'
,
'div'
,
...
@@ -229,7 +229,6 @@ function DragAndDropTemplates(configuration) {
...
@@ -229,7 +229,6 @@ function DragAndDropTemplates(configuration) {
'dropzone'
:
'move'
,
'dropzone'
:
'move'
,
'aria-dropeffect'
:
'move'
,
'aria-dropeffect'
:
'move'
,
'data-uid'
:
zone
.
uid
,
'data-uid'
:
zone
.
uid
,
'data-zone_id'
:
zone
.
id
,
'data-zone_align'
:
zone
.
align
,
'data-zone_align'
:
zone
.
align
,
'role'
:
'button'
,
'role'
:
'button'
,
'aria-describedby'
:
zone_description_id
,
'aria-describedby'
:
zone_description_id
,
...
@@ -769,7 +768,6 @@ function DragAndDropBlock(runtime, element, configuration) {
...
@@ -769,7 +768,6 @@ function DragAndDropBlock(runtime, element, configuration) {
$anchor
=
$zone
;
$anchor
=
$zone
;
}
}
var
zone
=
String
(
$zone
.
data
(
'uid'
));
var
zone
=
String
(
$zone
.
data
(
'uid'
));
var
zone_id
=
$zone
.
data
(
'zone_id'
);
var
zone_align
=
$zone
.
data
(
'zone_align'
);
var
zone_align
=
$zone
.
data
(
'zone_align'
);
var
$target_img
=
$root
.
find
(
'.target-img'
);
var
$target_img
=
$root
.
find
(
'.target-img'
);
...
...
tests/integration/test_interaction.py
View file @
06871d9e
...
@@ -22,9 +22,10 @@ from drag_and_drop_v2.default_data import (
...
@@ -22,9 +22,10 @@ from drag_and_drop_v2.default_data import (
)
)
from
drag_and_drop_v2.utils
import
FeedbackMessages
from
drag_and_drop_v2.utils
import
FeedbackMessages
from
.test_base
import
BaseIntegrationTest
from
.test_base
import
BaseIntegrationTest
import
time
# Globals ###########################################################
# Globals ###########################################################
loader
=
ResourceLoader
(
__name__
)
loader
=
ResourceLoader
(
__name__
)
# Classes ###########################################################
# Classes ###########################################################
...
@@ -68,7 +69,6 @@ class InteractionTestBase(object):
...
@@ -68,7 +69,6 @@ class InteractionTestBase(object):
scenario_xml
=
self
.
_get_scenario_xml
()
scenario_xml
=
self
.
_get_scenario_xml
()
self
.
_add_scenario
(
self
.
PAGE_ID
,
self
.
PAGE_TITLE
,
scenario_xml
)
self
.
_add_scenario
(
self
.
PAGE_ID
,
self
.
PAGE_TITLE
,
scenario_xml
)
time
.
sleep
(
2
)
self
.
_page
=
self
.
go_to_page
(
self
.
PAGE_TITLE
)
self
.
_page
=
self
.
go_to_page
(
self
.
PAGE_TITLE
)
# Resize window so that the entire drag container is visible.
# Resize window so that the entire drag container is visible.
# Selenium has issues when dragging to an area that is off screen.
# Selenium has issues when dragging to an area that is off screen.
...
...
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