|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | + |
| 3 | +<html> |
| 4 | +<head> |
| 5 | + <title>Issue (#248) - Dismissible option not working with multiple popovers</title> |
| 6 | + |
| 7 | + <link rel="stylesheet" href="../src/jquery.webui-popover.css" /> |
| 8 | + <script src="jquery.js" ></script> |
| 9 | + <script src="bootstrap.js" ></script> |
| 10 | + <script src="../src/jquery.webui-popover.js" ></script> |
| 11 | + |
| 12 | + <style type="text/css"> |
| 13 | + #popover1, #popover3 { |
| 14 | + margin-left: 50px; |
| 15 | + margin-right: 100px; |
| 16 | + } |
| 17 | + .pop { |
| 18 | + display: inline-block; |
| 19 | + border: 1px solid silver; |
| 20 | + padding: 2px; |
| 21 | + } |
| 22 | + .popContainer { |
| 23 | + margin-bottom: 60px; |
| 24 | + } |
| 25 | + .desc { |
| 26 | + margin-bottom: 20px; |
| 27 | + } |
| 28 | + </style> |
| 29 | + <script type="text/javascript"> |
| 30 | + $(document).ready(function() { |
| 31 | + $("#popover1").webuiPopover({ |
| 32 | + dismissible: false, |
| 33 | + placement: "bottom", |
| 34 | + content: "I'm not dismissible" |
| 35 | + }); |
| 36 | + $("#popover2").webuiPopover({ |
| 37 | + dismissible: true, |
| 38 | + placement: "bottom", |
| 39 | + content: "I'm dismissible" |
| 40 | + }); |
| 41 | + |
| 42 | + $("#popover3").webuiPopover({ |
| 43 | + multi: true, |
| 44 | + dismissible: true, |
| 45 | + placement: "bottom", |
| 46 | + content: "I'm popover 3" |
| 47 | + }); |
| 48 | + $("#popover4").webuiPopover({ |
| 49 | + multi: true, |
| 50 | + dismissible: true, |
| 51 | + placement: "bottom", |
| 52 | + content: "I'm popover 4" |
| 53 | + }); |
| 54 | + }); |
| 55 | + </script> |
| 56 | +</head> |
| 57 | +<body> |
| 58 | + <div class="desc"> |
| 59 | + <b>Problem of issue#248</b>: Opening a dismissible popover causes non-dismissible popovers to become dismissible.<br /><br /> |
| 60 | + |
| 61 | + <b>Initial conditions</b>: Popover 1 is not dismissible. Popover 2 is dismissible.<br /><br /> |
| 62 | + |
| 63 | + Step 1) Click popover 1. Observe that it is not dismissible. Close it.<br /> |
| 64 | + Step 2) Click popover 2. Observe that it is dismissible. Close it.<br /> |
| 65 | + Step 3) Click popover 1. Observe that it is now dismissible!<br /> |
| 66 | + </div> |
| 67 | + <div class="popContainer"> |
| 68 | + <div id="popover1" class="pop">Popover 1</div> |
| 69 | + <div id="popover2" class="pop">Popover 2</div> |
| 70 | + </div> |
| 71 | + |
| 72 | + <div class="desc"> |
| 73 | + <b>With issue#248 solution in place, ensure that</b>: When an outside click is done for two open popovers, |
| 74 | + both should dismiss themselves through their own bodyClickHandler individually.<br /><br /> |
| 75 | + |
| 76 | + <b>Initial conditions</b>: Both popovers are dismissible and have multi:true.<br /><br /> |
| 77 | + |
| 78 | + Step 1) Open Popover 3 and Popover 4 so that they're both open at the same time.<br /> |
| 79 | + Step 2) Click outside of both of them. Make sure both close.<br /> |
| 80 | + </div> |
| 81 | + <div> |
| 82 | + <div id="popover3" class="pop">Popover 3</div> |
| 83 | + <div id="popover4" class="pop">Popover 4</div> |
| 84 | + </div> |
| 85 | +</body> |
| 86 | +</html> |
0 commit comments