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
4482aa60
Commit
4482aa60
authored
Nov 13, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25 from open-craft/eugeny/fix-edit-issues
Saving issues fixes
parents
e6743a57
148dea11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
drag_and_drop_v2/public/js/drag_and_drop_edit.js
+9
-10
No files found.
drag_and_drop_v2/public/js/drag_and_drop_edit.js
View file @
4482aa60
...
@@ -38,6 +38,9 @@ function DragAndDropEditBlock(runtime, element) {
...
@@ -38,6 +38,9 @@ function DragAndDropEditBlock(runtime, element) {
// Compile templates
// Compile templates
_fn
.
tpl
.
init
();
_fn
.
tpl
.
init
();
// Display target image
_fn
.
$target
.
show
();
_fn
.
build
.
clickHandlers
();
_fn
.
build
.
clickHandlers
();
},
},
clickHandlers
:
function
()
{
clickHandlers
:
function
()
{
...
@@ -62,7 +65,7 @@ function DragAndDropEditBlock(runtime, element) {
...
@@ -62,7 +65,7 @@ function DragAndDropEditBlock(runtime, element) {
}
}
if
(
_fn
.
data
.
displayLabels
)
{
if
(
_fn
.
data
.
displayLabels
)
{
_fn
.
data
.
displayLabels
=
$
(
'.display-labels-form input'
,
element
).
prop
(
'checked'
,
true
);
$
(
'.display-labels-form input'
,
element
).
prop
(
'checked'
,
true
);
}
}
$fbkTab
.
addClass
(
'hidden'
);
$fbkTab
.
addClass
(
'hidden'
);
...
@@ -73,7 +76,6 @@ function DragAndDropEditBlock(runtime, element) {
...
@@ -73,7 +76,6 @@ function DragAndDropEditBlock(runtime, element) {
$
(
this
).
one
(
'click'
,
function
(
e
)
{
$
(
this
).
one
(
'click'
,
function
(
e
)
{
// $zoneTab -> $itemTab
// $zoneTab -> $itemTab
e
.
preventDefault
();
e
.
preventDefault
();
_fn
.
build
.
form
.
zone
.
setAll
();
_fn
.
build
.
form
.
zone
.
setAll
();
for
(
var
i
=
0
;
i
<
_fn
.
data
.
items
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
_fn
.
data
.
items
.
length
;
i
++
)
{
...
@@ -272,17 +274,14 @@ function DragAndDropEditBlock(runtime, element) {
...
@@ -272,17 +274,14 @@ function DragAndDropEditBlock(runtime, element) {
is_sel
,
is_sel
,
arr
=
_fn
.
build
.
form
.
zone
.
list
,
arr
=
_fn
.
build
.
form
.
zone
.
list
,
dropdown
=
[],
dropdown
=
[],
html
;
html
,
dropdown_items
=
arr
.
concat
(
'none'
);
for
(
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
dropdown_items
.
length
;
i
++
)
{
if
(
arr
[
i
]
==
selected
)
is_sel
=
'selected'
;
is_sel
=
(
dropdown_items
[
i
]
==
selected
)
?
'selected'
:
''
;
else
is_sel
=
''
;
dropdown
.
push
(
tpl
({
value
:
dropdown_items
[
i
],
selected
:
is_sel
}));
dropdown
.
push
(
tpl
({
value
:
arr
[
i
],
selected
:
is_sel
}));
}
}
// Add option to include dummy answers
dropdown
.
push
(
tpl
({
value
:
'none'
}));
html
=
dropdown
.
join
(
''
);
html
=
dropdown
.
join
(
''
);
return
new
Handlebars
.
SafeString
(
html
);
return
new
Handlebars
.
SafeString
(
html
);
},
},
...
...
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