aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/sortable/sortable_ticket_4231.html
blob: ca4a93db31f6d4ad26dc2295b3c24c88738ba6cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Visual testcase for #4231</title>
	<link rel="stylesheet" href="../visual.css" type="text/css" />
	<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
	<script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
	<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
	<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
	<script type="text/javascript" src="../../../ui/jquery.ui.droppable.js"></script>
	<script type="text/javascript" src="../../../ui/jquery.ui.sortable.js"></script>
   <style> 
   .scrollArea {
    overflow: auto;
    width: 400px;
    height: 600px;
  }      
  .dropArea {
    height: 100px;
    width: 380px;
    padding: 0 0 0 0;
    background-color: #CCCCCC;
    margin: 10px 0 10px 0;
  }
  .dragArea {
    width: 100px;
    height: 30px;
    background-color: #FF0000;
    margin: 10px 0 10px 0;
  }
  .inv {
    position: absolute;
    left: 450px;
    top: 10px;
    width: 150px;
    height: 600px;
  }
 </style> 
 <script>jQuery(document).ready(function(){
        $(".dropArea").droppable({
          drop: function(ev, ui) { $(ui.draggable).html("dropped"); }
        })
        .sortable();
        $(".dragArea").draggable({
          connectToSortable: '.dropArea',
          revert: 'invalid',
          helper: 'clone'
        });
    });
</script>
</head>
<body>
  <div class="scrollArea"> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
    <ul class="dropArea"></ul> 
  </div> 
 
  <ul class="inv"> 
    <li class="dragArea">Drag me</li> 
    <li class="dragArea">Drag me</li> 
    <li class="dragArea">Drag me</li> 
  </ul> 
 
</body>
</html>