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
4dfb5d4c
Commit
4dfb5d4c
authored
Sep 22, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide-zone-labels: Add option to hide the zone labels text (default off)
parent
ccf95cf5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
0 deletions
+17
-0
drag_and_drop_v2/public/css/drag_and_drop.css
+1
-0
drag_and_drop_v2/public/js/drag_and_drop.js
+5
-0
drag_and_drop_v2/public/js/drag_and_drop_edit.js
+7
-0
drag_and_drop_v2/templates/html/drag_and_drop_edit.html
+4
-0
No files found.
drag_and_drop_v2/public/css/drag_and_drop.css
View file @
4dfb5d4c
...
...
@@ -120,6 +120,7 @@
}
.xblock--drag-and-drop
.zone
p
{
visibility
:
hidden
;
width
:
100%
;
font-family
:
Arial
;
font-size
:
16px
;
...
...
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
4dfb5d4c
...
...
@@ -73,6 +73,11 @@ function DragAndDropBlock(runtime, element) {
// Set the target image
if
(
_fn
.
data
.
targetImg
)
_fn
.
$target
.
css
(
'background'
,
'url('
+
_fn
.
data
.
targetImg
+
') no-repeat'
);
// Display the zone names if required
if
(
_fn
.
data
.
displayLabels
)
{
$
(
'p'
,
_fn
.
$zones
).
css
(
'visibility'
,
'visible'
);
}
},
finish
:
function
(
final_feedback
)
{
...
...
drag_and_drop_v2/public/js/drag_and_drop_edit.js
View file @
4dfb5d4c
...
...
@@ -61,6 +61,10 @@ function DragAndDropEditBlock(runtime, element) {
_fn
.
$target
.
css
(
'background'
,
'url('
+
_fn
.
data
.
targetImg
+
') no-repeat'
);
}
if
(
_fn
.
data
.
displayLabels
)
{
_fn
.
data
.
displayLabels
=
$
(
'.display-labels-form input'
,
element
).
prop
(
'checked'
,
true
);
}
$fbkTab
.
addClass
(
'hidden'
);
$zoneTab
.
removeClass
(
'hidden'
);
...
...
@@ -110,6 +114,9 @@ function DragAndDropEditBlock(runtime, element) {
// Placeholder shim for IE9
$
.
placeholder
.
shim
();
})
.
on
(
'click'
,
'.display-labels-form input'
,
function
(
e
)
{
_fn
.
data
.
displayLabels
=
$
(
'.display-labels-form input'
,
element
).
is
(
':checked'
);
});
$itemTab
...
...
drag_and_drop_v2/templates/html/drag_and_drop_edit.html
View file @
4dfb5d4c
...
...
@@ -43,6 +43,10 @@
<input
type=
"text"
>
<button
class=
"btn"
>
Change background
</button>
</section>
<section
class=
"tab-content display-labels-form"
>
<label
for=
"display-labels"
>
Display label names on the image:
</label>
<input
name=
"display-labels"
id=
"display-labels"
type=
"checkbox"
/>
</section>
<div
class=
"items"
>
<form
class=
"zones-form"
></form>
<a
href=
"#"
class=
"add-zone add-element"
><div
class=
"icon add"
></div>
Add a zone
</a>
...
...
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