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
5658a03c
Commit
5658a03c
authored
Jul 07, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from FiloSottile/fix
Fix get_data in Apros
parents
6c3c75a3
b713e0c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
drag_and_drop_v2/public/js/drag_and_drop.js
+4
-2
drag_and_drop_v2/public/js/drag_and_drop_edit.js
+1
-1
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
5658a03c
...
@@ -105,7 +105,7 @@ function DragAndDropBlock(runtime, element) {
...
@@ -105,7 +105,7 @@ function DragAndDropBlock(runtime, element) {
zone
:
zone
,
zone
:
zone
,
top
:
$el
.
css
(
'top'
),
top
:
$el
.
css
(
'top'
),
left
:
$el
.
css
(
'left'
)
left
:
$el
.
css
(
'left'
)
})).
done
(
function
(
data
){
})
,
'json'
).
done
(
function
(
data
){
if
(
data
.
correct
)
{
if
(
data
.
correct
)
{
$el
.
draggable
(
'disable'
);
$el
.
draggable
(
'disable'
);
...
@@ -235,7 +235,9 @@ function DragAndDropBlock(runtime, element) {
...
@@ -235,7 +235,9 @@ function DragAndDropBlock(runtime, element) {
};
};
})(
jQuery
);
})(
jQuery
);
$
.
ajax
(
runtime
.
handlerUrl
(
element
,
'get_data'
)).
done
(
function
(
data
){
$
.
ajax
(
runtime
.
handlerUrl
(
element
,
'get_data'
),
{
dataType
:
'json'
}).
done
(
function
(
data
){
dragAndDrop
.
init
(
data
);
dragAndDrop
.
init
(
data
);
});
});
}
}
drag_and_drop_v2/public/js/drag_and_drop_edit.js
View file @
5658a03c
...
@@ -385,7 +385,7 @@ function DragAndDropEditBlock(runtime, element) {
...
@@ -385,7 +385,7 @@ function DragAndDropEditBlock(runtime, element) {
$
(
'.xblock-editor-error-message'
,
element
).
html
();
$
(
'.xblock-editor-error-message'
,
element
).
html
();
$
(
'.xblock-editor-error-message'
,
element
).
css
(
'display'
,
'none'
);
$
(
'.xblock-editor-error-message'
,
element
).
css
(
'display'
,
'none'
);
var
handlerUrl
=
runtime
.
handlerUrl
(
element
,
'studio_submit'
);
var
handlerUrl
=
runtime
.
handlerUrl
(
element
,
'studio_submit'
);
$
.
post
(
handlerUrl
,
JSON
.
stringify
(
data
)).
done
(
function
(
response
)
{
$
.
post
(
handlerUrl
,
JSON
.
stringify
(
data
)
,
'json'
).
done
(
function
(
response
)
{
if
(
response
.
result
===
'success'
)
{
if
(
response
.
result
===
'success'
)
{
window
.
location
.
reload
(
false
);
window
.
location
.
reload
(
false
);
}
else
{
}
else
{
...
...
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