|
Revision 1, 1.4 kB
(checked in by falcon, 17 years ago)
|
|
Version one -> initial work from the laptop.
|
| Line | |
|---|
| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <title>script.aculo.us Drag and drop functional test file</title> |
|---|
| 4 | <script src="../../lib/prototype.js" type="text/javascript"></script> |
|---|
| 5 | <script src="../../src/scriptaculous.js" type="text/javascript"></script> |
|---|
| 6 | <script src="../../src/unittest.js" type="text/javascript"></script> |
|---|
| 7 | </head> |
|---|
| 8 | <style> |
|---|
| 9 | div.hoverclass123 { |
|---|
| 10 | border:1px solid red; |
|---|
| 11 | } |
|---|
| 12 | </style> |
|---|
| 13 | <body> |
|---|
| 14 | |
|---|
| 15 | <h1>script.aculo.us Drag and drop functional test file</h1> |
|---|
| 16 | |
|---|
| 17 | <h2>w/o hoverclass</h2> |
|---|
| 18 | |
|---|
| 19 | <div id="cart" class="cart" style="text-align:center;height:50px;padding:10px;background-color:#fba"> |
|---|
| 20 | ### DROP HERE ### |
|---|
| 21 | </div> |
|---|
| 22 | |
|---|
| 23 | <script type="text/javascript">Droppables.add('cart', {onDrop:function(element,dropon){alert('w/o hoverclass, should be \'product_id\':' + encodeURIComponent(element.id) + ', dropon should be \'cart\':' + dropon.id)}})</script> |
|---|
| 24 | |
|---|
| 25 | <br/> |
|---|
| 26 | |
|---|
| 27 | <img alt="Product2" id="product_id" src="icon.png" /> <-- drag this! |
|---|
| 28 | |
|---|
| 29 | <script type="text/javascript">new Draggable('product_id', {revert:true})</script> |
|---|
| 30 | |
|---|
| 31 | <h2>w/ hoverclass</h2> |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | <div id="carth" class="cart" style="text-align:center;height:50px;padding:10px;background-color:#fba"> |
|---|
| 35 | ### DROP HERE ### |
|---|
| 36 | </div> |
|---|
| 37 | |
|---|
| 38 | <script type="text/javascript">Droppables.add('carth', {hoverclass:'hoverclass123',onDrop:function(element, dropon, event){alert('w/ hoverclass: should be \'product_id\':' + encodeURIComponent(element.id) + ', dropon should be \'carth\':' + dropon.id)}})</script> |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | </body> |
|---|
| 42 | </html> |
|---|