forked from selectize/selectize.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugins.html
317 lines (309 loc) · 10.4 KB
/
plugins.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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Selectize.js Demo</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<link rel="stylesheet" href="_normalize.css">
<link rel="stylesheet" href="_stylesheet.css">
<link rel="stylesheet" href="../selectize.css">
<!--[if IE 8]><script src="_es5.js"></script><![endif]-->
<script src="_jquery.js"></script>
<script src="_jqueryui.js"></script>
<script src="../selectize.js"></script>
<script src="_demos.js"></script>
<style type="text/css">
/* common */
.selectize-control.demo-code-language,
.selectize-control.demo-code-language .selectize-input,
.selectize-control.demo-code-language .selectize-dropdown,
.selectize-control.demo-code-language input {
font-family: arial, sans-serif !important;
font-weight: bold !important;
font-size: 13px !important;
}
.selectize-control.demo-code-language .selectize-input {
color: #333 !important;
-webkit-border-radius: 3px !important;
-moz-border-radius: 3px !important;
border-radius: 3px !important;
}
.selectize-control.demo-code-language .selectize-input [data-value]::before {
content: 'Language: ';
font-weight: normal;
color: #808080;
}
.selectize-control.demo-code-language input::-webkit-input-placeholder { font-weight: normal; }
.selectize-control.demo-code-language input:-moz-placeholder { font-weight: normal; }
.selectize-control.demo-code-language input::-moz-placeholder { font-weight: normal; }
.selectize-control.demo-code-language input:-ms-input-placeholder { font-weight: normal; }
.selectize-control.demo-code-language .selectize-dropdown {
margin-top: 10px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: 1px solid #c1c1c1;
-webkit-box-shadow: 0 0 13px rgba(0,0,0,0.31);
-moz-box-shadow: 0 0 13px rgba(0,0,0,0.31);
box-shadow: 0 0 13px rgba(0,0,0,0.31);
}
.selectize-control.demo-code-language .selectize-dropdown [data-value] {
border-bottom: 1px solid #eee;
color: #666666;
font-weight: normal;
padding-left: 30px;
position: relative;
}
.selectize-control.demo-code-language .selectize-dropdown [data-value].selected {
color: #333;
}
.selectize-control.demo-code-language .selectize-dropdown [data-value].active {
background: #3d84c4;
color: #fff;
}
.selectize-control.demo-code-language .selectize-dropdown [data-value].selected::before,
.selectize-control.demo-code-language .selectize-dropdown [data-value].active::before {
content: ' ';
display: block;
position: absolute;
top: 50%;
left: 10px;
width: 12px;
height: 10px;
margin: -5px 0 0 0;
background: url(images/[email protected]) 0 0;
background-size: 12px 20px;
}
.selectize-control.demo-code-language .selectize-dropdown [data-value].active::before,
.selectize-control.demo-code-language .selectize-dropdown [data-value].selected.active::before {
background-position: 0 -10px;
}
.selectize-control.demo-code-language .selectize-dropdown [data-value]:last-child {
border-bottom: 0 none;
}
/* multiple language select */
.selectize-control.demo-code-language.multi .selectize-input [data-value] {
color: #333;
padding: 2px 7px;
text-shadow: 0 1px 0 rgba(255,255,255,0.9);
background-color: #FCFAF8;
background-image: -moz-linear-gradient(#FCFAF8, #F3F0ED);
background-image: -webkit-linear-gradient(#FCFAF8, #F3F0ED);
background-image: linear-gradient(#FCFAF8, #F3F0ED);
background-repeat: repeat-x;
-webkit-border-radius: 3px !important;
-moz-border-radius: 3px !important;
border-radius: 3px !important;
border: 1px solid #B8B7B5;
border-bottom-color: #C4BFB2;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.selectize-control.demo-code-language.multi .selectize-input [data-value].active {
border-color: #3775ae;
border-bottom-color: #316ca2;
background-color: #3d84c4;
background-image: -moz-linear-gradient(#4d98db, #3d84c4);
background-image: -webkit-linear-gradient(#4d98db, #3d84c4);
background-image: linear-gradient(#4d98db, #3d84c4);
color: #fff;
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.selectize-control.demo-code-language.multi .selectize-input [data-value].active::before {
color: #a1caf0;
}
.selectize-control.demo-code-language.multi .selectize-input {
padding: 9px 8px 8px;
}
.selectize-control.demo-code-language.multi .selectize-input.has-items {
padding-top: 6px !important;
padding-bottom: 0px !important;
padding-left: 5px !important;
}
/* single language select */
.selectize-control.demo-code-language.single {
width: 180px;
}
.selectize-control.demo-code-language.single .selectize-dropdown {
width: 400px !important;
}
.selectize-control.demo-code-language.single .selectize-input {
padding: 4px 10px;
text-shadow: 0 1px 0 rgba(255,255,255,0.9);
white-space: nowrap;
background-color: #FCFAF8;
background-image: -moz-linear-gradient(#FCFAF8, #F3F0ED);
background-image: -webkit-linear-gradient(#FCFAF8, #F3F0ED);
background-image: linear-gradient(#FCFAF8, #F3F0ED);
background-repeat: repeat-x;
border: 1px solid #B8B7B5;
border-bottom-color: #C4BFB2;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.selectize-control.demo-code-language.single .selectize-input:hover {
text-decoration: none;
background-color: #F0ECE8;
background-image: -moz-linear-gradient(#F0ECE8, #E7E4E0);
background-image: -webkit-linear-gradient(#F0ECE8, #E7E4E0);
background-image: linear-gradient(#F0ECE8, #E7E4E0);
background-repeat: repeat-x;
border-color: #C2BFBA #C2BFBA #AFADA7;
}
.selectize-control.demo-code-language.single .selectize-input::after {
right: 8px;
}
.selectize-control.demo-code-language.single .selectize-input::before,
.selectize-control.demo-code-language.single .selectize-input.dropdown-active::before {
content: ' ';
position: absolute;
top: 0;
bottom: 0;
left: auto;
width: 0;
right: 25px;
height: auto;
border-right: 1px solid #c2c0bd;
border-left: 1px solid rgba(255,255,255,0.7);
}
.selectize-control.demo-code-language.single .selectize-input.dropdown-active::before {
border-right: 1px solid #b5b5b5 !important;
border-left: 1px solid rgba(255,255,255,0.02) !important;
}
.selectize-control.demo-code-language.single .selectize-input.dropdown-active,
.selectize-control.demo-code-language.single .selectize-input.dropdown-active:hover {
background-color: #E2DFDB;
background-image: none;
border-color: #b5b5b5;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
}
.selectize-control.plugin-dropdown_header .selectize-dropdown-header {
color: #666;
padding: 8px 10px;
background-color: #fefefe;
background-image: -moz-linear-gradient(#fefefe, #eee);
background-image: -webkit-linear-gradient(#fefefe, #eee);
background-image: linear-gradient(#fefefe, #eee);
background-repeat: repeat-x;
border-bottom: 1px solid #ddd;
}
.selectize-control.plugin-dropdown_header .selectize-dropdown-header-label {
font-weight: bold;
font-size: 13px !important;
color: #111;
text-shadow: 1px 1px 0 #fff;
}
.selectize-control.plugin-dropdown_header .selectize-dropdown-header-close {
float: right;
font-size: 20px !important;
color: #ccc;
margin-top: 1px;
}
.selectize-control.plugin-dropdown_header .selectize-dropdown-header-close:hover {
color: #aaa;
}
</style>
</head>
<body>
<div id="wrapper">
<h1>Selectize.js</h1>
<div class="demo">
<h2>Plugin: "remove_button"</h2>
<div class="control-group">
<label for="input-tags">Tags:</label>
<input type="text" id="input-tags" class="demo-default" value="awesome,neat">
</div>
<script>
$('#input-tags').selectize({
plugins: ['remove_button'],
delimiter: ',',
persist: false,
create: function(input) {
return {
value: input,
text: input
}
},
onDelete: function(values) {
return confirm(values.length > 1 ? 'Are you sure you want to remove these ' + values.length + ' items?' : 'Are you sure you want to remove "' + values[0] + '"?');
}
});
</script>
</div>
<div class="demo">
<h2>Plugin: "restore_on_backspace"</h2>
<div class="control-group">
<label for="input-tags2">Tags:</label>
<input type="text" id="input-tags2" class="demo-default" value="awesome,neat">
</div>
<script>
$('#input-tags2').selectize({
plugins: ['restore_on_backspace'],
delimiter: ',',
persist: false,
create: function(input) {
return {
value: input,
text: input
}
}
});
</script>
</div>
<div class="demo">
<h2>Plugin: "drag_drop"</h2>
<div class="control-group">
<label for="input-sortable">Tags:</label>
<input type="text" id="input-sortable" class="demo-default" value="drag,these,items,around">
</div>
<script>
$('#input-sortable').selectize({
plugins: ['drag_drop'],
delimiter: ',',
persist: false,
create: function(input) {
return {
value: input,
text: input
}
}
});
</script>
</div>
<div class="demo">
<h2>Plugin: "dropdown_header"</h2>
<div class="control-group">
<label for="select-code-language">Single:</label>
<select id="select-code-language" class="demo-code-language" placeholder="Select a language...">
<option value="txt">Text</option>
<option value="md">Markdown</option>
<option value="html">HTML</option>
<option value="php">PHP</option>
<option value="python">Python</option>
<option value="java">Java</option>
<option value="js" selected>JavaScript</option>
<option value="c#">Ruby</option>
<option value="c#">VHDL</option>
<option value="c#">Verilog</option>
<option value="c#">C#</option>
<option value="c++">C/C++</option>
</select>
</div>
<script>
$('.demo-code-language').selectize({
sortField: 'text',
hideSelected: false,
plugins: {
'dropdown_header': {
title: 'Language'
}
}
})
</script>
</div>
</div>
</body>
</html>