|
8 | 8 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> |
9 | 9 | <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script> |
10 | 10 |
|
11 | | - <script type="text/javascript" src="multiple-selection.js"></script> |
| 11 | + <script type="text/javascript" src="multiple-selection.min.js"></script> |
12 | 12 | <script type="text/javascript"> |
13 | 13 | angular.module('app', ['multipleSelection']); |
14 | 14 | </script> |
15 | 15 |
|
16 | 16 | <style type="text/css"> |
17 | 17 | .row { |
18 | | - height: 3000px; |
19 | 18 | width: 100%; |
20 | 19 | overflow: hidden; |
21 | | - position: absolute; |
22 | 20 | /* disable selection */ |
23 | 21 |
|
24 | 22 | -webkit-touch-callout: none; |
|
28 | 26 | -ms-user-select: none; |
29 | 27 | user-select: none; |
30 | 28 | } |
31 | | - .well{ |
32 | 29 |
|
| 30 | + .item_container { |
| 31 | + border: 1px solid #ccc; |
| 32 | + padding: 10px; |
33 | 33 | } |
34 | | - .example { |
35 | | - width: 300px; |
36 | | - height: 50px; |
37 | | - background-color: grey; |
| 34 | + .item_container div { |
| 35 | + width: 33% |
38 | 36 | } |
39 | 37 | .select-helper { |
40 | 38 | position: absolute; |
|
43 | 41 | opacity: 0.2; |
44 | 42 | } |
45 | 43 | .selected { |
46 | | - background-color: green; |
| 44 | + background-color: green !important; |
47 | 45 | } |
48 | 46 | .selecting { |
49 | | - background-color: yellow; |
50 | | - } |
51 | | - .dragging { |
52 | | - background-color: blue; |
| 47 | + background-color: yellow !important; |
53 | 48 | } |
54 | 49 | </style> |
55 | 50 | </head> |
56 | 51 |
|
57 | 52 | <body> |
58 | | - <div class="container-fluid" multiple-selection-zone> |
59 | | - <h1>Directives test</h1> |
60 | | - <div class="row"> |
61 | | - <div multiple-selection-item class="col-md-3 well" ng-class="{'selecting': isSelecting ,'selected': isSelected, 'dragging': isDragging}" class="example">Just a div</div> |
62 | | - <div multiple-selection-item class="col-md-3 well" ng-class="{'selecting': isSelecting ,'selected': isSelected, 'dragging': isDragging}" class="example">Just a second div</div> |
63 | | - <div multiple-selection-item class="col-md-3 well" ng-class="{'selecting': isSelecting ,'selected': isSelected, 'dragging': isDragging}" class="example">Another one</div> |
64 | | - <div multiple-selection-item class="col-md-3 well" ng-class="{'selecting': isSelecting ,'selected': isSelected}" class="example">Just a last div</div> |
| 53 | + <div class="container-fluid"> |
| 54 | + <h1>Angular Mmultiple Selection Module</h1> |
| 55 | + <i>Simple way to make your element selectable</i> |
| 56 | + For single selection you can use mouse click. For multiple selection you can use Ctrl + Mouse click or Mouse dragging. Try it`s easy. |
| 57 | + |
| 58 | + <h2>Simple demo</h2> |
| 59 | + <div class="row item_container" multiple-selection-zone> |
| 60 | + <div multiple-selection-item class="well" ng-class="{'selecting': isSelecting ,'selected': isSelected}">Lorem ipsum dolor sit amet alias, sint magni?</div> |
| 61 | + <div multiple-selection-item class="well" ng-class="{'selecting': isSelecting ,'selected': isSelected}">Lorem ipsum dolor sit amet ad mollitia fugiat minima.</div> |
| 62 | + <div multiple-selection-item class="well" ng-class="{'selecting': isSelecting ,'selected': isSelected}">Lorem ipsum dolor sit amet autem!</div> |
| 63 | + <div multiple-selection-item class="well" ng-class="{'selecting': isSelecting ,'selected': isSelected}">Lorem ipsum dolor sit amet beatae.</div> |
| 64 | + <div multiple-selection-item class="well" ng-class="{'selecting': isSelecting ,'selected': isSelected}">Lorem ipsum dolor sit amet. Iure vitae temporibus maiores perspiciatis!</div> |
65 | 65 | </div> |
66 | 66 |
|
67 | 67 | </div> |
68 | 68 |
|
| 69 | + |
69 | 70 | </body> |
70 | 71 |
|
71 | 72 | </html> |
0 commit comments