forked from vitalets/x-editable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo-exo.html
More file actions
232 lines (179 loc) · 11.2 KB
/
demo-exo.html
File metadata and controls
232 lines (179 loc) · 11.2 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="author" content="Vitaliy Potapov">
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<title>X-editable Demo</title>
<!--Exobar-->
<link href="assets/all.css" rel="stylesheet">
<link href="assets/exologadmin2.css" rel="stylesheet">
<!--font-awesome-->
<link rel="stylesheet" class="all_editor" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css?rand=1530080322163" data-key="fontawesome">
<script src="assets/jquery/jquery-1.9.1.min.js"></script>
<script src="assets/mockjax/jquery.mockjax.js"></script>
<!-- momentjs -->
<script src="assets/momentjs/moment.min.js"></script>
<!-- select2 -->
<link href="assets/select2/select2.css" rel="stylesheet">
<script src="assets/select2/select2.js"></script>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- bootstrap 3 -->
<link href="assets/bootstrap300/css/bootstrap.css" rel="stylesheet">
<script src="assets/bootstrap300/js/bootstrap.js"></script>
<!-- bootstrap-datetimepicker -->
<link href="assets/bootstrap-datetimepicker/css/datetimepicker.css" rel="stylesheet">
<script src="assets/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<!-- x-editable (bootstrap 3) -->
<link href="dist/exo-editable/css/exo-editable.css" rel="stylesheet">
<script src="dist/exo-editable/js/exo-editable.js"></script>
<!-- select2 bootstrap -->
<link href="assets/select2/select2-bootstrap.css" rel="stylesheet">
<!-- typeaheadjs -->
<link href="assets/x-editable/inputs-ext/typeaheadjs/lib/typeahead.js-bootstrap.css" rel="stylesheet">
<script src="assets/x-editable/inputs-ext/typeaheadjs/lib/typeahead.js"></script>
<script src="assets/x-editable/inputs-ext/typeaheadjs/typeaheadjs.js"></script>
<link href="assets/demo-bs3.css" rel="stylesheet">
<style type="text/css">
#comments:hover {
background-color: #FFFFC0;
cursor: text;
}
</style>
<script>
var f = 'bootstrap3';
</script>
<!-- address input -->
<link href="assets/x-editable/inputs-ext/address/address.css" rel="stylesheet">
<script src="assets/x-editable/inputs-ext/address/address.js"></script>
<script>
$.fn.editable.defaults.mode = 'exobar';
</script>
<style type="text/css">
body {
padding-top: 50px;
padding-bottom: 30px;
}
table.table > tbody > tr > td {
height: 30px;
vertical-align: middle;
}
</style>
</head>
<body>
<div style="width: 80%; margin: auto;">
<h1>X-editable Demo</h1>
<hr>
<h2>Settings</h2>
<form method="get" id="frm" class="form-inline" action="demo.html">
<label>
<span>Form style: exo-control + Bootstrap 3 </span>
</label>
<label style="margin-left: 30px">Mode: - Exobar</label>
</form>
<hr>
<h2>Example</h2>
<div style="float: right; margin-bottom: 10px">
<label style="display: inline-block; margin-right: 50px"><input type="checkbox" id="autoopen" style="vertical-align: baseline"> auto-open next field</label>
<button id="enable" class="btn btn-default">enable / disable</button>
</div>
<p>Click to edit</p>
<table id="user" class="table table-bordered table-striped" style="clear: both">
<tbody>
<tr>
<td width="35%">Simple text field</td>
<td width="65%"><a href="#" id="username" data-type="text" data-pk="1" data-title="Enter username">superuser</a></td>
</tr>
<tr>
<td>Empty text field, required</td>
<td><a href="#" id="firstname" data-type="text" data-pk="1" data-placement="right" data-placeholder="Required" data-title="Enter your firstname"></a></td>
</tr>
<tr>
<td>Select, local array, custom display</td>
<td><a href="#" id="sex" data-type="select" data-pk="1" data-value="" data-title="Select sex"></a></td>
</tr>
<tr>
<td>Select, remote array, no buttons</td>
<td><a href="#" id="group" data-type="select" data-pk="1" data-value="5" data-source="/groups" data-title="Select group">Admin</a></td>
</tr>
<tr>
<td>Select, error while loading</td>
<td><a href="#" id="status" data-type="select" data-pk="1" data-value="0" data-source="/status" data-title="Select status">Active</a></td>
</tr>
<tr>
<td>Datepicker</td>
<td>
<a href="#" id="vacation" data-type="date" data-viewformat="dd.mm.yyyy" data-pk="1" data-placement="right" data-title="When you want vacation to start?" class="editable editable-click editable-open" data-original-title="" title="">25.02.2013</a>
</td>
</tr>
<tr>
<td>Combodate (date)</td>
<td><a href="#" id="dob" data-type="combodate" data-value="1984-05-15" data-format="YYYY-MM-DD" data-viewformat="DD/MM/YYYY" data-template="D / MMM / YYYY" data-pk="1" data-title="Select Date of birth"></a></td>
</tr>
<tr>
<td>Combodate (datetime)</td>
<td><a href="#" id="event" data-type="combodate" data-template="D MMM YYYY HH:mm" data-format="YYYY-MM-DD HH:mm" data-viewformat="MMM D, YYYY, HH:mm" data-pk="1" data-title="Setup event date and time"></a></td>
</tr>
<tr>
<td>Textarea, buttons below. Submit by <i>ctrl+enter</i></td>
<td><a href="#" id="comments" data-type="textarea" data-pk="1" data-placeholder="Your comments here..." data-title="Enter comments">awesome
user!</a></td>
</tr>
<tr>
<td>Twitter typeahead.js</td>
<td><a href="#" id="state2" data-type="typeaheadjs" data-pk="1" data-placement="right" data-title="Start typing State.."></a></td>
</tr>
<tr>
<td>Checklist</td>
<td><a href="#" id="fruits" data-type="checklist" data-value="2,3" data-title="Select fruits"></a></td>
</tr>
<tr>
<td>Select2 (tags mode)</td>
<td><a href="#" id="tags" data-type="select2" data-pk="1" data-title="Enter tags">html, javascript</a></td>
</tr>
<tr>
<td>Select2 (dropdown mode)</td>
<td><a href="#" id="country" data-type="select2" data-pk="1" data-value="BS" data-title="Select country"></a></td>
</tr>
<tr>
<td>Custom input, several fields</td>
<td><a href="#" id="address" data-type="address" data-pk="1" data-title="Please, fill address"></a></td>
</tr>
</tbody>
</table>
<div style="float: left; width: 50%">
<h3>Console <small>(all ajax requests here are emulated)</small></h3>
<div><textarea id="console" class="form-control" rows="8" style="width: 70%" autocomplete="off"></textarea></div>
</div>
<div style="float: left">
<h3>More examples and tricks <small>(jsFiddle)</small></h3>
<ul>
<li><a href="http://jsfiddle.net/xBB5x/38" target="_blank">Submit data via PUT method</a></li>
<li><a href="http://jsfiddle.net/xBB5x/39" target="_blank">Autotext option for select</a></li>
<li><a href="http://jsfiddle.net/xBB5x/40" target="_blank">Display checklist as <UL></a></li>
<li><a href="http://jsfiddle.net/xBB5x/62" target="_blank">Process JSON response</a></li>
<li><a href="http://jsfiddle.net/xBB5x/63" target="_blank">Editable column in table</a></li>
<li><a href="http://jsfiddle.net/xBB5x/64" target="_blank">MVC pattern in editable interface</a></li>
<li><a href="http://jsfiddle.net/xBB5x/194" target="_blank">Change buttons style</a></li>
<li><a href="http://jsfiddle.net/xBB5x/278" target="_blank">Display server response as element's text</a></li>
<li><a href="http://jsfiddle.net/xBB5x/297" target="_blank">Dependent SELECTs</a></li>
<li><a href="http://jsfiddle.net/xBB5x/331" target="_blank">Single regular checkbox</a></li>
<li><a href="http://jsfiddle.net/xBB5x/329" target="_blank">Live events: work with delegated targets</a></li>
<li><a href="http://jsfiddle.net/wQysh/8" target="_blank">SELECT2 remote source</a></li>
</ul>
</div>
<footer class="footer" style="clear: both; padding-top: 10px">
<hr>
<p><a href="http://vitalets.github.com/x-editable">X-editable</a> © Vitaliy Potapov 2012. Released under the MIT license.</p>
</footer>
</div>
<script src="assets/demo-mock.js"></script>
<script src="assets/demo.js"></script>
</body>
</html>