|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en-US" style="position:relative"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <title>PowerTip Test Suite</title> |
| 6 | + |
| 7 | + <!-- Library Resources --> |
| 8 | + <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script> |
| 9 | + |
| 10 | + <!-- PowerTip Core Resources --> |
| 11 | + <script type="text/javascript" src="../src/core.js"></script> |
| 12 | + <script type="text/javascript" src="../src/csscoordinates.js"></script> |
| 13 | + <script type="text/javascript" src="../src/displaycontroller.js"></script> |
| 14 | + <script type="text/javascript" src="../src/placementcalculator.js"></script> |
| 15 | + <script type="text/javascript" src="../src/tooltipcontroller.js"></script> |
| 16 | + <script type="text/javascript" src="../src/utility.js"></script> |
| 17 | + <link rel="stylesheet" type="text/css" href="../css/jquery.powertip.css" /> |
| 18 | + |
| 19 | + <!-- Unit Test Scripts --> |
| 20 | + <script type="text/javascript" src="tests-bodyoffset.js"></script> |
| 21 | + |
| 22 | + <!-- Custom Styles For Test Cases --> |
| 23 | + <style type="text/css"> |
| 24 | + header, section { margin-bottom: 20px; } |
| 25 | + section { border: 1px solid #CCC; margin: 20px; padding: 20px; } |
| 26 | + #powerTip { white-space: normal; } |
| 27 | + #huge-text div, #huge-text-smart div { text-align: center; } |
| 28 | + #huge-text input, #huge-text-smart input { margin: 10px; padding: 10px; } |
| 29 | + #huge-text .east, #huge-text-smart .east { margin-left: 450px; } |
| 30 | + #session { position: fixed; right: 10px; top: 10px; font-size: 10px; width: 160px; background-color: #fff; border: 1px solid #ccc; padding: 10px; overflow: hidden; } |
| 31 | + #session pre { margin: 0; } |
| 32 | + </style> |
| 33 | +</head> |
| 34 | +<body> |
| 35 | + <section id="huge-text"> |
| 36 | + <h2>Huge Text</h2> |
| 37 | + <p>The tooltips for the buttons below have a lot of text. The tooltip div is completely elastic for this demo. The tooltips should be properly placed when they render.</p> |
| 38 | + <div> |
| 39 | + <input type="button" class="north-west-alt" value="North West Alt" /> |
| 40 | + <input type="button" class="north-west" value="North West" /> |
| 41 | + <input type="button" class="north" value="North" /> |
| 42 | + <input type="button" class="north-east" value="North East" /> |
| 43 | + <input type="button" class="north-east-alt" value="North East Alt" /><br /> |
| 44 | + <input type="button" class="west" value="West" /> |
| 45 | + <input type="button" class="east" value="East" /><br /> |
| 46 | + <input type="button" class="south-west-alt" value="South West Alt" /> |
| 47 | + <input type="button" class="south-west" value="South West" /> |
| 48 | + <input type="button" class="south" value="South" /> |
| 49 | + <input type="button" class="south-east" value="South East" /> |
| 50 | + <input type="button" class="south-east-alt" value="South East Alt" /> |
| 51 | + </div> |
| 52 | + </section> |
| 53 | + <section id="huge-text-smart"> |
| 54 | + <h2>Huge Text with Smart Placement</h2> |
| 55 | + <p>The tooltips for the buttons below have a lot of text. The tooltip div is completely elastic for this demo. The tooltips should be properly placed when they render.</p> |
| 56 | + <div> |
| 57 | + <input type="button" class="north-west-alt" value="North West Alt" /> |
| 58 | + <input type="button" class="north-west" value="North West" /> |
| 59 | + <input type="button" class="north" value="North" /> |
| 60 | + <input type="button" class="north-east" value="North East" /> |
| 61 | + <input type="button" class="north-east-alt" value="North East Alt" /><br /> |
| 62 | + <input type="button" class="west" value="West" /> |
| 63 | + <input type="button" class="east" value="East" /><br /> |
| 64 | + <input type="button" class="south-west-alt" value="South West Alt" /> |
| 65 | + <input type="button" class="south-west" value="South West" /> |
| 66 | + <input type="button" class="south" value="South" /> |
| 67 | + <input type="button" class="south-east" value="South East" /> |
| 68 | + <input type="button" class="south-east-alt" value="South East Alt" /> |
| 69 | + </div> |
| 70 | + </section> |
| 71 | + <section id="trapped-mousefollow" data-powertip="This is the tooltip text.<br />It is tall so you can test the padding."> |
| 72 | + <h2>Trapped mouse following tooltip</h2> |
| 73 | + <p>This box has a mouse following tooltip.</p> |
| 74 | + <p>Trap it in the bottom right corner of the viewport. It should flip out of the way. It should not flip if it only hits one edge.</p> |
| 75 | + </section> |
| 76 | + <div id="session"><pre /></div> |
| 77 | +</body> |
| 78 | +</html> |
0 commit comments