root/public/javascripts/scriptaculous/test/functional/sortable4_test.html

Revision 1, 2.7 kB (checked in by falcon, 17 years ago)

Version one -> initial work from the laptop.

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5  <title>script.aculo.us sortable functional test file</title>
6  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7  <script src="../../lib/prototype.js" type="text/javascript"></script>
8  <script src="../../src/scriptaculous.js" type="text/javascript"></script>
9  <script src="../../src/unittest.js" type="text/javascript"></script>
10  <link rel="stylesheet" href="../test.css" type="text/css" />
11  <style type="text/css" media="screen">
12  ul.sortablelist {
13    list-style-image:none;
14    list-style-type:none;
15    margin-top:5px;
16    margin:0px;
17    padding:0px;
18  }
19
20  ul.sortabledemo li {
21    padding:0px;
22    margin:0px;
23  }
24
25  span.handle {
26    background-color: #E8A400;
27    color:white;
28    cursor: move;
29  }
30
31  li.green {
32    background-color: #ECF3E1;
33    border:1px solid #C5DEA1;
34    cursor: move;
35  }
36
37  li.orange {
38    border:1px solid #E8A400;
39    background-color: #FFF4D8;
40  }
41  </style>
42</head>
43<body>
44<h1>script.aculo.us: Two floating sortables with containment and dropOnEmpty</h1>
45
46<div style="height:200px;">
47<div style="float:left;">
48<h3>This is the first list</h3>
49 <ul class="sortabledemo" id="firstlist" style="height:150px;width:200px;">
50   <li class="green" id="firstlist_firstlist1">Item 1 from first list.</li>
51   <li class="green" id="firstlist_firstlist2">Item 2 from first list.</li>
52   <li class="green" id="firstlist_firstlist3">Item 3 from first list.</li>
53 </ul>
54</div>
55 <div style="float:left;">
56 <h3>And now the second list</h3>
57 <ul class="sortabledemo" id="secondlist" style="height:150px;width:200px;">
58   <li class="orange" id="secondlist_secondlist1">
59     <span class="handle">DRAG HERE</span> Item 1 from second list.
60   </li>
61   <li class="orange" id="secondlist_secondlist2">
62     <span class="handle">DRAG HERE</span> Item 2 from second list.
63   </li>
64   <li class="orange" id="secondlist_secondlist3">
65     <span class="handle">DRAG HERE</span> Item 3 from second list.
66   </li>
67 </ul>
68</div>
69</div>
70
71<hr style="clear:both" />
72
73<pre id="firstlist_debug"></pre>
74<pre id="secondlist_debug"></pre>
75
76 <script type="text/javascript">
77 // <![CDATA[
78   Sortable.create("firstlist",
79     {dropOnEmpty:true,containment:["firstlist","secondlist"],constraint:false,
80      onChange:function(){$('firstlist_debug').innerHTML = Sortable.serialize('firstlist') }});
81   Sortable.create("secondlist",
82     {dropOnEmpty:true,handle:'handle',containment:["firstlist","secondlist"],constraint:false,
83     onChange:function(){$('secondlist_debug').innerHTML = Sortable.serialize('secondlist') }});
84 // ]]>
85 </script>
86 
87 </body>
88 </html>
Note: See TracBrowser for help on using the browser.