File: index.html

package info (click to toggle)
libjs-lrdragndrop 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,152 kB
  • sloc: javascript: 404; makefile: 10
file content (93 lines) | stat: -rw-r--r-- 3,087 bytes parent folder | download | duplicates (4)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

<!DOCTYPE html>
<html ng-app="app">
<head>
    <title>lrDragNDrop demo</title>
    <link rel="stylesheet" type="text/css" href="mainStyle.css">
    <script src="../bower_components/angular/angular.js"></script>
    <script src="../lrDragNDrop.js"></script>
    <script src="main.js"></script>
</head>
<body>
<section ng-controller="nonSafeCtrl">
    <h2>Non safe source ("lr-drag-src")</h2>

    <p>Drag from the left collection and drop into the right collection. This is somehow equivalent to a cut operation</p>

    <div class="source">
        <h3>source collection</h3>
        <ul>
            <li lr-drag-src="unsafe" ng-repeat="item in collection">
                <h4>{{ item.title }}</h4>
                <img ng-src="{{ item.src }}" title="{{ item.title }}">
            </li>
        </ul>
        <div class="model-container"><span>model:</span>

            <div class="model">{{ collection | json }}</div>
        </div>
    </div>
    <div class="target">
        <h3>target collection</h3>
        <ul>
            <li lr-drop-target="unsafe" ng-repeat="item in collectionBis" lr-drop-success="dropSuccess(e, item, collection)">
                <h4>{{ item.title }}</h4>
                <img ng-src="{{ item.src }}" title="{{ item.title }}">
            </li>
        </ul>
        <div class="model-container"><span>model:</span>

            <div class="model">{{ collectionBis | json }}</div>
        </div>
    </div>
</section>
<section ng-controller="safeCtrl">
    <h2>Safe source ("lr-drag-src-safe")</h2>

    <p>Drag from the left collection and drop into the right collection. This is somehow equivalent to a copy operation</p>

    <div class="source">
        <h3>source collection</h3>
        <ul>
            <li lr-drag-src-safe="safe" ng-repeat="item in collection">
                <h4>{{ item.title }}</h4>
                <img ng-src="{{ item.src }}" title="{{ item.title }}">
            </li>
        </ul>
        <div class="model-container"><span>model:</span>

            <div class="model">{{ collection | json }}</div>
        </div>
    </div>
    <div class="target">
        <h3>target collection</h3>
        <ul>
            <li lr-drop-target="safe" ng-repeat="item in collectionBis">
                <h4>{{ item.title }}</h4>
                <img ng-src="{{ item.src }}" title="{{ item.title }}">
            </li>
        </ul>
        <div class="model-container"><span>model:</span>

            <div class="model">{{ collectionBis | json }}</div>
        </div>
    </div>
</section>
<section ng-controller="reorderCtrl">
    <h2>When the target is also the source</h2>

    <p>Drag and drop the items to reorder them</p>

    <div>
        <ul>
            <li lr-drag-src="reorder" lr-drop-target="reorder" ng-repeat="item in collection"><h4>{{ item.title }}</h4>
                <img ng-src="{{ item.src }}" title="{{ item.title }}"></li>
        </ul>
        <div class="model-container"><span>model:</span>

            <div class="model">{{ collection | json }}</div>
        </div>
    </div>
</section>
</body>
</html>