diff options
author | Bardi Harborow <bardi@bardiharborow.com> | 2016-11-12 18:12:58 +0300 |
---|---|---|
committer | Bardi Harborow <bardi@bardiharborow.com> | 2016-11-12 18:34:18 +0300 |
commit | b9e7cef9653ea803262915a1ed64722d355f99cc (patch) | |
tree | 973694ba40492e3f341d6a10b7000f907b998803 /js/tests/visual/modal.html | |
parent | 93ba9ac629a29bb8709989ba4be8a26b0b6d87d5 (diff) |
Update visual tests.
Diffstat (limited to 'js/tests/visual/modal.html')
-rw-r--r-- | js/tests/visual/modal.html | 381 |
1 files changed, 193 insertions, 188 deletions
diff --git a/js/tests/visual/modal.html b/js/tests/visual/modal.html index 5d7ee0fc04..fa5bd368aa 100644 --- a/js/tests/visual/modal.html +++ b/js/tests/visual/modal.html @@ -1,201 +1,206 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Modal</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> - <style> - #tall { - height: 1500px; - width: 100px; - background-color: black; - color: white; - } - </style> -</head> -<body> - -<nav class="navbar navbar-dark bg-inverse navbar-static-top"> - <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2"> - ☰ - </button> - <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2"> - <a class="navbar-brand" href="#">This shouldn't jump!</a> - <ul class="nav navbar-nav"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">About</a> - </li> - </ul> - </div> -</nav> - -<div class="container mt-3"> - - <h1>Modal <small>Bootstrap Visual Test</small></h1> - - <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> - <h4 class="modal-title" id="myModalLabel">Modal Heading</h4> - </div> - <div class="modal-body"> - <h4>Text in a modal</h4> - <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p> - - <h4>Popover in a modal</h4> - <p>This <a href="#" role="button" class="btn btn-primary js-popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?" data-placement="left">button</a> should trigger a popover on click.</p> - - <h4>Tooltips in a modal</h4> - <p><a href="#" class="js-tooltip" title="Tooltip">This link</a> and <a href="#" class="js-tooltip" title="Tooltip">that link</a> should have tooltips on hover.</p> - - <div id="accordion" role="tablist" aria-multiselectable="true"> - <div class="card"> - <div class="card-header" role="tab" id="headingOne"> - <h5 class="mb-0"> - <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> - Collapsible Group Item #1 - </a> - </h5> - </div> - <div id="collapseOne" class="collapse active" role="tabpanel" aria-labelledby="headingOne"> - <div class="card-block"> - Lorem ipsum - </div> - </div> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Modal</title> + <style> + #tall { + height: 1500px; + width: 100px; + } + </style> + </head> + <body> + <nav class="navbar navbar-full navbar-dark bg-inverse"> + <button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"></button> + <div class="collapse navbar-toggleable-md" id="navbarResponsive"> + <a class="navbar-brand" href="#">This shouldn't jump!</a> + <ul class="nav navbar-nav"> + <li class="nav-item active"> + <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + </ul> + </div> + </nav> + + <div class="container mt-3"> + <h1>Modal <small>Bootstrap Visual Test</small></h1> + + <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> - <div class="card"> - <div class="card-header" role="tab" id="headingTwo"> - <h5 class="mb-0"> - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> - Collapsible Group Item #2 - </a> - </h5> - </div> - <div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo"> - <div class="card-block"> - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + <div class="modal-body"> + <h4>Text in a modal</h4> + <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p> + + <h4>Popover in a modal</h4> + <p>This <button type="button" class="btn btn-primary" data-toggle="popover" data-placement="left" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">button</button> should trigger a popover on click.</p> + + + <h4>Tooltips in a modal</h4> + <p><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">This link</a> and <a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">that link</a> should have tooltips on hover.</p> + + <div id="accordion" role="tablist" aria-multiselectable="true"> + <div class="card"> + <div class="card-header" role="tab" id="headingOne"> + <h5 class="mb-0"> + <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> + Collapsible Group Item #1 + </a> + </h5> + </div> + + <div id="collapseOne" class="collapse active" role="tabpanel" aria-labelledby="headingOne"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> + </div> + <div class="card"> + <div class="card-header" role="tab" id="headingTwo"> + <h5 class="mb-0"> + <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> + Collapsible Group Item #2 + </a> + </h5> + </div> + <div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> + </div> + <div class="card"> + <div class="card-header" role="tab" id="headingThree"> + <h5 class="mb-0"> + <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> + Collapsible Group Item #3 + </a> + </h5> + </div> + <div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> </div> </div> + + <hr> + + <h4>Overflowing text to show scroll behavior</h4> + <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> + <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> + <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> + <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> + <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> + <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> + <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> + <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> + <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Save changes</button> </div> </div> - - <hr> - - <h4>Overflowing text to show scroll behavior</h4> - <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> - <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> - <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> - <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> - <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> - <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> - <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> - <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> - <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary">Save changes</button> - </div> - </div> - </div> - </div> - - <div id="myModal2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> - <h4 class="modal-title" id="myModalLabel2">Modal Heading</h4> - </div> - <div class="modal-body"> - <ol> - <li>Ensure you're using Firefox.</li> - <li>Open a new tab and then switch back to this tab.</li> - <li>Click into this input: <input type="text" id="ff-bug-input"></li> - <li>Switch to the other tab and then back to this tab.</li> - </ol> - <p>Test result: <strong id="ff-bug-test-result"></strong></p> + + <div class="modal fade" id="firefoxModal" tabindex="-1" role="dialog" aria-labelledby="firefoxModalLabel" aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="firefoxModalLabel">Firefox Bug Test</h4> + </div> + <div class="modal-body"> + <ol> + <li>Ensure you're using Firefox.</li> + <li>Open a new tab and then switch back to this tab.</li> + <li>Click into this input: <input type="text" id="ff-bug-input"></li> + <li>Switch to the other tab and then back to this tab.</li> + </ol> + <p>Test result: <strong id="ff-bug-test-result"></strong></p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Save changes</button> + </div> + </div> </div> </div> + + <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> + Launch demo modal + </button> + + <button type="button" class="btn btn-primary btn-lg" id="tall-toggle"> + Toggle tall <body> content + </button> + + <br><br> + + <button type="button" class="btn btn-secondary btn-lg" data-toggle="modal" data-target="#firefoxModal"> + Launch Firefox bug test modal + </button> + (<a href="https://github.com/twbs/bootstrap/issues/18365">See Issue #18365</a>) + + <br><br> + + <div class="bg-inverse text-white p-2" id="tall" style="display: none;"> + Tall body content to force the page to have a scrollbar. + </div> </div> - </div> - - <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> - Launch demo modal - </button> - - <button id="tall-toggle" class="btn btn-default">Toggle tall <body> content</button> - <br><br> - <button class="btn btn-secondary btn-lg" data-toggle="modal" data-target="#myModal2"> - Launch Firefox bug test modal - </button> - (<a href="https://github.com/twbs/bootstrap/issues/18365">See Issue #18365</a>) - <br><br> - <div id="tall" style="display: none;"> - Tall body content to force the page to have a scrollbar. - </div> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../vendor/tether.min.js"></script> - -<script src="../../dist/util.js"></script> -<script src="../../dist/modal.js"></script> -<script src="../../dist/collapse.js"></script> -<script src="../../dist/tooltip.js"></script> -<script src="../../dist/popover.js"></script> - -<!-- <script src="../../transition.js"></script> -<script src="../../tooltip.js"></script> -<script src="../../popover.js"></script> --> - -<!-- JavaScript Test --> -<script> -var firefoxTestDone = false -function reportFirefoxTestResult(result) { - if (!firefoxTestDone) { - $('#ff-bug-test-result') - .addClass(result ? 'text-success' : 'text-danger') - .text(result ? 'PASS' : 'FAIL') - } - firefoxTestDone = true -} - -$(function () { - $('.js-popover').popover() - $('.js-tooltip').tooltip() - $('#tall-toggle').click(function () { - $('#tall').toggle() - }) - $('#ff-bug-input').one('focus', function () { - $('#myModal2').on('focus', function () { - reportFirefoxTestResult(false) - }) - $('#ff-bug-input').on('focus', function () { - reportFirefoxTestResult(true) - }) - }) -}) -</script> - -</body> + + <script src="../vendor/jquery.min.js"></script> + <script src="../vendor/tether.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/modal.js"></script> + <script src="../../dist/collapse.js"></script> + <script src="../../dist/tooltip.js"></script> + <script src="../../dist/popover.js"></script> + + <script> + var firefoxTestDone = false + function reportFirefoxTestResult(result) { + if (!firefoxTestDone) { + $('#ff-bug-test-result') + .addClass(result ? 'text-success' : 'text-danger') + .text(result ? 'PASS' : 'FAIL') + } + } + + $(function () { + $('[data-toggle="popover"]').popover() + $('[data-toggle="tooltip"]').tooltip() + + $('#tall-toggle').click(function () { + $('#tall').toggle() + }) + + $('#ff-bug-input').one('focus', function () { + $('#firefoxModal').on('focus', reportFirefoxTestResult.bind(false)) + $('#ff-bug-input').on('focus', reportFirefoxTestResult.bind(true)) + }) + }) + </script> + </body> </html> |