b58b38b2e5d4d849192739cdff7ce9b7922f7112.svn-base 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>Dojo DnD with handles test</title>
  5. <style type="text/css">
  6. @import "../../resources/dojo.css";
  7. @import "../../resources/dnd.css";
  8. @import "dndDefault.css";
  9. body { padding: 1em; background: #ededed; }
  10. .container { width: 100px; display: block; }
  11. .container.handles .dojoDndHandle { background: #fee; }
  12. .clear { clear: both; }
  13. </style>
  14. <script type="text/javascript" src="../../dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
  15. <script type="text/javascript" src="../../dnd/Container.js"></script>
  16. <script type="text/javascript" src="../../dnd/Selector.js"></script>
  17. <script type="text/javascript" src="../../dnd/Source.js"></script>
  18. <script type="text/javascript" src="../../dnd/Avatar.js"></script>
  19. <script type="text/javascript" src="../../dnd/Manager.js"></script>
  20. <script type="text/javascript">
  21. dojo.require("dojo.parser");
  22. dojo.require("dojo.dnd.Source");
  23. </script>
  24. </head>
  25. <body>
  26. <h1 class="testTitle">Dojo DnD with handles test</h1>
  27. <p>Following selection modes are supported by default:</p>
  28. <ul>
  29. <li>Simple click &mdash; selects a single element, all other elements will be unselected.</li>
  30. <li>Ctrl+click &mdash; toggles a selection state of an element (use Meta key on Mac).</li>
  31. <li>Shift+click &mdash; selects a range of element from the previous anchor to the current element.</li>
  32. <li>Ctrl+Shift+click &mdash; adds a range of element from the previous anchor to the current element (use Meta key on Mac).</li>
  33. </ul>
  34. <p>Following drop modes are supported by default:</p>
  35. <ul>
  36. <li>Simple drop &mdash; moves elements to the valid target removing them from the source. It can be used to reorganize elements within a single source/target.</li>
  37. <li>Ctrl+drop &mdash; copies elements to the valid target (use Meta key on Mac).</li>
  38. </ul>
  39. <p>Source with handles. Items should be draggable by "Item".</p>
  40. <div dojoType="dojo.dnd.Source" jsId="c1" withHandles="true" class="container handles">
  41. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Alpha</strong></div>
  42. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Beta</strong></div>
  43. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Gamma</strong></div>
  44. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Delta</strong></div>
  45. </div>
  46. <p>Source without handles.</p>
  47. <div dojoType="dojo.dnd.Source" jsId="c2" class="container">
  48. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Epsilon</strong></div>
  49. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Zeta</strong></div>
  50. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Eta</strong></div>
  51. <div class="dojoDndItem"><span class="dojoDndHandle">Item</span> <strong>Theta</strong></div>
  52. </div>
  53. <p>HTML after</p>
  54. </body>
  55. </html>