Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lti-xblock-consumer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenJupyter
lti-xblock-consumer
Commits
f0785c51
Unverified
Commit
f0785c51
authored
4 years ago
by
Dave St.Germain
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #97 from edx/dcs/modal-popup
Send modal to parent window.
parents
846ccba6
b6676085
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lti_consumer/static/js/xblock_lti_consumer.js
+18
-0
18 additions, 0 deletions
lti_consumer/static/js/xblock_lti_consumer.js
lti_consumer/templates/html/student.html
+1
-0
1 addition, 0 deletions
lti_consumer/templates/html/student.html
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
20 additions
and
1 deletion
lti_consumer/static/js/xblock_lti_consumer.js
+
18
−
0
View file @
f0785c51
...
@@ -17,6 +17,24 @@ function LtiConsumerXBlock(runtime, element) {
...
@@ -17,6 +17,24 @@ function LtiConsumerXBlock(runtime, element) {
var
o
=
options
;
var
o
=
options
;
$
(
this
).
click
(
function
(
e
)
{
$
(
this
).
click
(
function
(
e
)
{
var
$modal
=
$
(
modal_id
);
var
$modal
=
$
(
modal_id
);
// If we are already in an iframe, skip creation of the modal, since
// it won't look good, anyway. Instead, we post a message to the parent
// window, requesting creation of a modal there.
// This is used by the courseware microfrontend.
if
(
window
!==
window
.
parent
)
{
window
.
parent
.
postMessage
(
{
'
type
'
:
'
plugin.modal
'
,
'
payload
'
:
{
'
url
'
:
window
.
location
.
origin
+
$modal
.
data
(
'
launch-url
'
),
'
title
'
:
$modal
.
find
(
'
iframe
'
).
attr
(
'
title
'
),
'
width
'
:
$modal
.
data
(
'
width
'
)
}
},
document
.
referrer
);
return
;
}
// Set iframe src attribute to launch LTI provider
// Set iframe src attribute to launch LTI provider
$modal
.
find
(
'
iframe
'
).
attr
(
'
src
'
,
$modal
.
data
(
'
launch-url
'
));
$modal
.
find
(
'
iframe
'
).
attr
(
'
src
'
,
$modal
.
data
(
'
launch-url
'
));
$
(
"
#
"
+
overlay_id
).
click
(
function
()
{
$
(
"
#
"
+
overlay_id
).
click
(
function
()
{
...
...
This diff is collapsed.
Click to expand it.
lti_consumer/templates/html/student.html
+
1
−
0
View file @
f0785c51
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
aria-hidden=
"true"
aria-hidden=
"true"
style=
"width:${modal_width}%; left:${modal_horizontal_offset}%; top:${modal_vertical_offset}%; bottom:${modal_vertical_offset}%;"
style=
"width:${modal_width}%; left:${modal_horizontal_offset}%; top:${modal_vertical_offset}%; bottom:${modal_vertical_offset}%;"
data-launch-url=
"${form_url}"
data-launch-url=
"${form_url}"
data-width=
"${modal_width}%"
>
>
<div
class=
"inner-wrapper"
role=
"dialog"
>
<div
class=
"inner-wrapper"
role=
"dialog"
>
<button
class=
"close-modal"
>
<button
class=
"close-modal"
>
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
f0785c51
...
@@ -49,7 +49,7 @@ with open('README.rst') as _f:
...
@@ -49,7 +49,7 @@ with open('README.rst') as _f:
setup
(
setup
(
name
=
'
lti-consumer-xblock
'
,
name
=
'
lti-consumer-xblock
'
,
version
=
'
2.
1.
2
'
,
version
=
'
2.2
'
,
description
=
'
This XBlock implements the consumer side of the LTI specification.
'
,
description
=
'
This XBlock implements the consumer side of the LTI specification.
'
,
long_description
=
long_description
,
long_description
=
long_description
,
long_description_content_type
=
'
text/markdown
'
,
long_description_content_type
=
'
text/markdown
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment