-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (60 loc) · 2.66 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Vue-js</title>
<link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="container">
<div id="vue-demo">
<h2 class="text-center">Vue-js Demo</h2>
<hr>
<label>New Item:</label>
<input type="text" v-model="newItem" placeholder="Type here ..." autofocus v-el:item_input>
<button class="btn btn-primary" v-on:click="addItem('left')" v-if="newItem.length">Add to left</button>
<button class="btn btn-primary" v-on:click="addItem('right')" v-if="newItem.length">Add to right</button>
<hr>
<div v-if="percentage != 100 && percentage != 0" class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{{percentage}}" aria-valuemin="0" aria-valuemax="100" style="width: {{percentage}}%;">
{{percentage}}%
</div>
</div>
<div class="row">
<div class="col-sm-5">
<ul class="list-group">
<li class="list-group-item" v-if="!left.length">No Items Available</li>
<li class="list-group-item" v-for="item in left">
<span class="glyphicon glyphicon-arrow-right arrow right" aria-hidden="true" v-on:click="move(item, 'left', 'right')"></span>
<span class="glyphicon glyphicon-remove remove right" aria-hidden="true" v-on:click="removeItem(item, 'left')"></span>
{{ item.text }}
</li>
</ul>
</div>
<div class="col-sm-2 text-center">
<div class="row">
<button class="btn btn-primary btn-switch" v-on:click="moveAll('left', 'right')" v-if="left.length">>></button>
</div>
<div class="row">
<button class="btn btn-primary btn-switch" v-on:click="moveAll('right', 'left')" v-if="right.length"><<</button>
</div>
</div>
<div class="col-sm-5">
<ul class="list-group text-right">
<li class="list-group-item" v-if="!right.length">No Items Available</li>
<li class="list-group-item" v-for="item in right">
<span class="glyphicon glyphicon-arrow-left arrow left" aria-hidden="true" v-on:click="move(item, 'right', 'left')"></span>
<span class="glyphicon glyphicon-remove remove left" aria-hidden="true" v-on:click="removeItem(item, 'right')"></span>
{{ item.text }}
</li>
</ul>
</div>
</div>
<legend>Live Data</legend>
<pre>{{ $data | json }}</pre>
</div>
</div>
<script type="text/javascript" src="./vue.js"></script>
<script type="text/javascript" src="./index.js"></script>
</body>
</html>