Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions components/dialog/demo/dialog-iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
<script type="module">
import '../../demo/demo-page.js';
</script>
</head>
<body unresolved>
<d2l-demo-page page-title="d2l-dialog">

<h2>Fullscreen Demo (iframe)</h2>
<p> After opening the dialog, click here and then start tabbing.</p>

<d2l-demo-snippet full-width>
<template>
<iframe src="./iframes/outer-frame.html" style="border: none; display: block; height: 400px; width: 100%;"></iframe>
</template>
</d2l-demo-snippet>


</d2l-demo-page>
</body>
</html>
25 changes: 25 additions & 0 deletions components/dialog/demo/iframes/opener-frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<link rel="stylesheet" href="../../../demo/styles.css" type="text/css">
<script type="module">
import '../../../demo/demo-page.js';
import '../../../button/button.js';
</script>
</head>
<body unresolved>
<d2l-button id="open">Open Dialog from Inner Frame</d2l-button>
<d2l-button>Other</d2l-button>
<d2l-button>Other</d2l-button>
<d2l-button>Other</d2l-button>
<script>
requestAnimationFrame((() => {
document.querySelector('#open').addEventListener('click', () => {
parent.OpenFullscreenDialog();
});
}));
</script>
</body>
</html>
33 changes: 33 additions & 0 deletions components/dialog/demo/iframes/outer-frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<link rel="stylesheet" href="../../../demo/styles.css" type="text/css">
<script type="module">
import '../../../demo/demo-page.js';
import '../../../button/button.js';
import '../../dialog-fullscreen.js';

window.OpenFullscreenDialog = function() {
const dialog = window.document.querySelector('#dialogFullscreen');
dialog.opened = true;
};
</script>
</head>
<body unresolved>
<!-- <button></button> Uncomment and it will be fixed -->
<iframe src="opener-frame.html" style="border: none; display: block; height: 400px; width: 100%;"></iframe>
<d2l-dialog-fullscreen id="dialogFullscreen" title-text="Fullscreen Title">
<p>Deadlights jack lad schooner scallywag dance the hempen jig carouser broadside cable strike colors. Bring a spring upon her cable holystone blow the man down spanker</p>
<p>Shiver me timbers to go on account lookout wherry doubloon chase. Belay yo-ho-ho keelhaul squiffy black spot yardarm spyglass sheet transom heave to.</p>
<p>Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack Tar transom spirits.</p>
<p>Deadlights jack lad schooner scallywag dance the hempen jig carouser broadside cable strike colors. Bring a spring upon her cable holystone blow the man down spanker</p>
<p>Shiver me timbers to go on account lookout wherry doubloon chase. Belay yo-ho-ho keelhaul squiffy black spot yardarm spyglass sheet transom heave to.</p>
<p>Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack Tar transom spirits.</p>
<d2l-button>Button</d2l-button>
<d2l-button slot="footer" primary data-dialog-action="save">Save</d2l-button>
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
</d2l-dialog-fullscreen>
</body>
</html>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ <h2 class="d2l-heading-3">Components</h2>
<li>
Dialogs
<ul>
<li><a href="components/dialog/demo/dialog-iframe.html">d2l-dialog (with iframes)</a></li>
<li><a href="components/dialog/demo/dialog.html">d2l-dialog</a></li>
<li><a href="components/dialog/demo/dialog-nested.html">d2l-dialog (Nested)</a></li>
<li><a href="components/dialog/demo/dialog-confirm.html">d2l-dialog-confirm</a></li>
Expand Down
Loading