forked from ratiw/vuetable-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
146 lines (132 loc) · 5.15 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>vue2</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<style type="text/css">
.ui.vertical.stripe h3 {
font-size: 2em;
}
.secondary.pointing.menu .toc.item {
display: none;
}
.vuetable {
margin-top: 1em !important;
}
.vuetable-wrapper.ui.basic.segment {
padding: 0em;
}
.vuetable button.ui.button {
padding: .5em .5em;
font-weight: 400;
}
.vuetable button.ui.button i.icon {
margin: 0;
}
.vuetable td i.handle-icon:hover {
cursor: pointer;
}
.vuetable-actions {
width: 15%;
padding: 12px 0px;
text-align: center;
}
.vuetable-pagination {
background: #f9fafb !important;
}
.vuetable-pagination-info {
margin-top: auto;
margin-bottom: auto;
}
.highlight {
background-color: yellow;
}
.vuetable-detail-row {
height: 200px;
}
.detail-row {
margin-left: 40px;
}
.expand-transition {
transition: all .5s ease;
}
.expand-enter, .expand-leave {
height: 0;
opacity: 0;
}
tr.odd {
background-color: #e6f5ff;
}
body {
overflow-y: scroll;
}
</style>
</head>
<body>
<div class="ui vertical segment">
<div class="ui container">
<div id="app" class="ui vertical stripe segment">
<div id="content" class="ui basic segment">
<h3 class="ui header">List of Users</h3>
<div class="ui grid">
<div class="ui left aligned nine wide column">
<div class="ui labeled icon input">
<div class="ui label">Search:</div>
<input v-model="searchFor" class="ui input" @keyup.enter="setFilter">
<i class="search icon"></i>
</div>
<button class="ui button primary" @click="setFilter">Go</button>
<button class="ui button" @click="resetFilter">Reset</button>
</div>
<div class="ui right aligned seven wide column">
<button class="ui basic button" id="settingsBtn" @click="showSettingsModal">
<i class="setting icon"></i>
Settings
</button>
</div>
</div><!-- ui grid -->
<div :class="[{'vuetable-wrapper ui basic segment': true}, loading]">
<vuetable ref="vuetable"
api-url="http://vuetable.ratiw.net/api/users"
:fields="fields"
:table-height="tableHeight"
pagination-path="pagination"
:sort-order="sortOrder"
:multi-sort="multiSort"
:per-page="perPage"
:append-params="moreParams"
detail-row-component="my-detail-row"
detail-row-transition="expand"
:row-class="rowClassCB"
@vuetable:pagination-data="onPaginationData"
@vuetable:load-success="onLoadSuccess"
@vuetable:loading="showLoader"
@vuetable:loaded="hideLoader"
@vuetable:cell-clicked="onCellClicked"
@vuetable:initialized="onInitialized"
@vuetable:data-reset="onDataReset"
></vuetable>
<div class="vuetable-pagination ui bottom attached segment grid">
<vuetable-pagination-info ref="paginationInfo"
:info-template="paginationInfoTemplate"
></vuetable-pagination-info>
<component :is="paginationComponent" ref="pagination"
@vuetable-pagination:change-page="onChangePage"
></component>
</div>
</div><!-- vuetable-wrapper -->
<settings-modal ref="settingsModal"
:vuetable-fields="vuetableFields"
></settings-modal>
</div><!-- content -->
</div><!-- app -->
</div><!-- ui container -->
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js"></script>
</body>
</html>