aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog
diff options
context:
space:
mode:
Diffstat (limited to '97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog')
-rw-r--r--97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/animated.html53
-rw-r--r--97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/complex-dialogs.html125
-rw-r--r--97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/form.html70
-rw-r--r--97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/performance.html73
4 files changed, 321 insertions, 0 deletions
diff --git a/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/animated.html b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/animated.html
new file mode 100644
index 0000000..9b5ae7f
--- /dev/null
+++ b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/animated.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Dialog Visual Test</title>
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.9.1.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../../ui/jquery.ui.position.js"></script>
+ <script src="../../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../../ui/jquery.ui.button.js"></script>
+ <script src="../../../ui/jquery.ui.dialog.js"></script>
+ <script src="../../../ui/jquery.ui.effect.js"></script>
+ <script src="../../../ui/jquery.ui.effect-blind.js"></script>
+ <script src="../../../ui/jquery.ui.effect-explode.js"></script>
+ <script>
+ $(function() {
+ $( "#dialog" ).dialog({
+ autoOpen: false,
+ show: {
+ effect: "blind",
+ duration: 1000
+ },
+ hide: {
+ effect: "explode",
+ duration: 1000
+ },
+ modal: true
+ });
+
+ $( "#opener" ).click(function() {
+ $( "#dialog" ).dialog( "open" );
+ });
+ });
+ </script>
+</head>
+<body>
+
+<p>WHAT: A animated modal dialog, using blind effect to show, explode to hide.</p>
+<p>EXPECTED: Dialog shows up on top of the overlay and stays there during and after the animation. Focus is set to the input inside the dialog and stays there after the animation finishes.</p>
+
+<div id="dialog" title="Are you sure?">
+ <p>Please enter password to continue.</p>
+ <label for="password">Password</label><input id="password">
+</div>
+
+<button id="opener">Open Dialog</button>
+
+</body>
+</html>
diff --git a/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/complex-dialogs.html b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/complex-dialogs.html
new file mode 100644
index 0000000..78e93be
--- /dev/null
+++ b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/complex-dialogs.html
@@ -0,0 +1,125 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Dialog Visual Test</title>
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.9.1.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../../ui/jquery.ui.position.js"></script>
+ <script src="../../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../../ui/jquery.ui.button.js"></script>
+ <script src="../../../ui/jquery.ui.dialog.js"></script>
+
+ <!-- stuff needed to make things complex -->
+ <script src="../../../ui/jquery.ui.datepicker.js"></script>
+ <script src="../../../ui/jquery.ui.menu.js"></script>
+ <script src="../../../ui/jquery.ui.autocomplete.js"></script>
+ <script src="../../../ui/jquery.ui.tooltip.js"></script>
+
+ <style>
+ body {
+ font-size: 62.5%;
+ }
+ </style>
+ <script>
+ $(function() {
+ var dialog = $( "#dialog" ).dialog({
+ modal: true,
+ width: 500,
+ buttons: [
+ {
+ click: $.noop,
+ icons: {
+ primary: "ui-icon-check"
+ },
+ text: "Ok"
+ },
+ {
+ click: function() {
+ $( this ).dialog( "close" );
+ },
+ icons: {
+ primary: "ui-icon-cancel"
+ },
+ text: "Cancel",
+ showText: false
+ }
+ ]
+ }).dialog("option", "height", 600),
+
+ datepickerDialog = $( "#dialog-datepicker" ).dialog({
+ autoOpen: false,
+ modal: true
+ }),
+
+ autocompleteDialog = $( "#dialog-autocomplete" ).dialog({
+ autoOpen: false,
+ modal: false,
+ width: 600
+ });
+
+ $( "#open-dialog" ).click(function() {
+ dialog.dialog( "open" );
+ });
+
+ $( "#open-datepicker" ).click(function() {
+ datepickerDialog.dialog( "open" );
+ });
+
+ $( "#open-autocomplete" ).click(function() {
+ autocompleteDialog.dialog( "open" );
+ });
+
+ $( "#datepicker" ).datepicker();
+
+ $( "#autocomplete" ).autocomplete({
+ source: [
+ "ActionScript",
+ "AppleScript",
+ "Asp",
+ "BASIC",
+ "Scheme"
+ ]
+ });
+
+ $( "#destroy-dialog" ).click(function() {
+ dialog.dialog( "destroy" ).show();
+ $( this ).remove();
+ });
+
+ $( document ).tooltip();
+ });
+ </script>
+</head>
+<body>
+
+<p>WHAT: A modal dialog opening another modal dialog (including a datepicker), opening a non-modal dialog (including an autocomplete with tooltip applied). A regular link on the page, outside of the dialogs.</p>
+<p>EXPECTED: As long as a modal dialog is open, focus stays within the dialogs. Both mouse and keyboard interactions are captured and restricted to the dialog. When the nested modal dialog is open, the first modal dialog can't be interacted with, until the nested dialog is closed. When the third dialog is open (not modal), switching between the two dialogs is possible, both can be interacted with.</p>
+
+
+<button id="open-dialog">Reopen dialog</button>
+
+<div id="dialog" title="Basic dialog, but with a really long title that doesn't quite fit.">
+ <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
+ <p><button id="open-datepicker">Open another window with a datepicker.</button></p>
+ <p><button id="destroy-dialog">Self destruct</button></p>
+</div>
+
+<div id="dialog-datepicker" title="A dialog with a datepicker">
+ <p>Date: <input id="datepicker"></p>
+ <p><button id="open-autocomplete" autofocus>Open another window with an autocomplete and a tooltip.</button></p>
+</div>
+
+<div id="dialog-autocomplete">
+ <label for="autocomplete">Tags: </label>
+ <input id="autocomplete" title="Try typing something!">
+</div>
+
+<a href="#">Outside link</a>
+
+</body>
+</html>
diff --git a/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/form.html b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/form.html
new file mode 100644
index 0000000..984008d
--- /dev/null
+++ b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/form.html
@@ -0,0 +1,70 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Dialog Visual Test</title>
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.9.1.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../../ui/jquery.ui.position.js"></script>
+ <script src="../../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../../ui/jquery.ui.button.js"></script>
+ <script src="../../../ui/jquery.ui.dialog.js"></script>
+ <script src="../../../ui/jquery.ui.effect.js"></script>
+ <script src="../../../ui/jquery.ui.effect-blind.js"></script>
+ <script src="../../../ui/jquery.ui.effect-explode.js"></script>
+ <script>
+ $(function() {
+ $( "#form-dialog, #prompt-dialog" ).dialog({
+ autoOpen: false,
+ modal: true
+ });
+
+ $( "#open-form" ).click(function() {
+ $( "#form-dialog" ).dialog( "open" );
+ });
+
+ $( "#open-prompt" ).click(function() {
+ $( "#prompt-dialog" ).dialog( "open" );
+ });
+ });
+ </script>
+ <style>
+ label {
+ display: block;
+ }
+ </style>
+</head>
+<body>
+
+<p>WHAT: A modal dialog containing form fields, with groups to describe each section. A second modal dialog with just an input and some text markup.</p>
+<p>EXPECTED: Dialog shows up, screenreader reads the dialog's title, the word "dialog" (or equivalent), the text before the first input (description of the first section) and the label of the first, focused input. When tabbing to the next group, the screenreader should announce the description of that group, along with the label of the focused field.</p>
+<p>For the second dialog, the behaviour should be similar, except that the whole content is read as the description of the dialog, likely causing the input's label to be read twice.</p>
+<p>NOTE: Using <code>fieldset</code> with <code>legend</code> seems to have the same result as using <code>role="group"</code> and <code>aria-describedby</code>. The latter needs an id-attribute, offers more flexibilty in markup order and has no built-in styling.</p>
+
+<div id="form-dialog" title="Profile Information">
+ <fieldset>
+ <legend>Please share some personal information</legend>
+ <label for="favorite-animal">Your favorite animal</label><input id="favorite-animal">
+ <label for="favorite-color">Your favorite color</label><input id="favorite-color">
+ </fieldset>
+ <div role="group" aria-describedby="section2">
+ <p id="section2">Some more (optional) information</p>
+ <label for="favorite-food">Favorite food</label><input id="favorite-food">
+ </div>
+</div>
+
+<button id="open-form">Open Form Dialog</button>
+
+<div id="prompt-dialog" title="Are you sure?">
+ <p>Please enter password to continue.</p>
+ <label for="password">Password</label><input id="password">
+</div>
+
+<button id="open-prompt">Open Prompt Dialog</button>
+
+</body>
+</html>
diff --git a/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/performance.html b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/performance.html
new file mode 100644
index 0000000..8a1507a
--- /dev/null
+++ b/97suifangqa/staticfiles/plugins/jquery-ui/tests/visual/dialog/performance.html
@@ -0,0 +1,73 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Dialog Visual Test - Modal Dialog in Large DOM</title>
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.9.1.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.position.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.mouse.js"></script>
+ <script src="../../../ui/jquery.ui.draggable.js"></script>
+ <script src="../../../ui/jquery.ui.resizable.js"></script>
+ <script src="../../../ui/jquery.ui.button.js"></script>
+ <script src="../../../ui/jquery.ui.dialog.js"></script>
+ <script>
+ $(function() {
+ var start,
+ html = new Array( 500 ).join( $.trim( $( "#template" ).html() ) );
+ $( html ).appendTo( "body" );
+
+ start = $.now();
+ $( "#dialog" ).dialog({
+ modal: true,
+ autoOpen: false
+ });
+ $( "<li>Create: " + ($.now() - start) + "ms</li>" ).appendTo( "#log" );
+
+ $( "#opener" ).click(function() {
+ start = $.now();
+ $( "#dialog" ).dialog( "open" );
+ $( "<li>Open: " + ($.now() - start) + "ms</li>" ).appendTo( "#log" );
+ });
+ });
+ </script>
+</head>
+<body>
+
+<p>WHAT: A single dialog is created on a page with a large DOM.</p>
+<p>EXPECTED: Creating and opening the dialog should be fast, regardless of page size.</p>
+
+<button id="opener">open dialog</button>
+<div id="dialog" title="Dialog Title">
+ <p> Dialog Content </p>
+ <input type="text">
+</div>
+
+<ul id="log"></ul>
+
+<script type="text/html" id="template">
+<div><div><div><div><div><div><div><div><div><div>
+<div><div><div><div><div><div><div><div><div><div>
+<div><div><div><div><div><div><div><div><div><div>
+<div><div><div><div><div><div><div><div><div><div>
+<div><div><div><div><div><div><div><div><div><div>
+<div><p>This <span>is</span> <span>a</span> <strong>large</strong> <abbr>DOM</abbr>.</p></div>
+<input>
+<select>
+ <option>option 1</option>
+ <option>option 2</option>
+ <option>option 3</option>
+ <option>option 4</option>
+ <option>option 5</option>
+</select>
+</div></div></div></div></div></div></div></div></div></div>
+</div></div></div></div></div></div></div></div></div></div>
+</div></div></div></div></div></div></div></div></div></div>
+</div></div></div></div></div></div></div></div></div></div>
+</div></div></div></div></div></div></div></div></div></div>
+</script>
+
+</body>
+</html>