Repository navigation
Expand file tree
/
Copy pathDefaultFunctionalities.cshtml
More file actions
347 lines (326 loc) · 13.6 KB
/
Copy pathDefaultFunctionalities.cshtml
File metadata and controls
347 lines (326 loc) · 13.6 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
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
@using Syncfusion.EJ2.Inputs
@using Syncfusion.EJ2
@section ControlsSection{
<div class="col-lg-12 control-section">
<div class="content-wrapper">
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6"><b>Floating Label</b></div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
@Html.EJS().TextBox("firstname").Placeholder("First Name").FloatLabelType(FloatLabelType.Auto).Render()
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
@Html.EJS().TextBox("lastname").Placeholder("Last Name").FloatLabelType(FloatLabelType.Auto).EnableRtl(true).Render()
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-lg-12 col-md-12">
<div class="e-float-input e-input-group">
<input type="text" required="">
<span class="e-float-line"></span>
<label class="e-float-text">Country</label>
<span class="e-input-group-icon e-spin-down"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6"><b>Inputs</b></div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group">
<input class="e-input" type="text" placeholder="Enter Name">
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group e-rtl">
<input class="e-input" type="text" placeholder="Last Name">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group">
<input class="e-input" type="password" placeholder="Password" value="password">
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group">
<input class="e-input" type="email" placeholder="Enter Email">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group e-disabled">
<input class="e-input" type="text" placeholder="Disabled" disabled="">
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group">
<input class="e-input" type="text" placeholder="Enter Name" value="Readonly" readonly="">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6"><b>Validation States</b></div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-4 col-lg-4 col-md-4">
<div class="e-input-group e-success">
<input class="e-input" type="text" placeholder="Success">
</div>
</div>
<div class="col-xs-4 col-sm-4 col-lg-4 col-md-4">
<div class="e-input-group e-warning">
<input class="e-input" type="text" placeholder="Warning">
</div>
</div>
<div class="col-xs-4 col-sm-4 col-lg-4 col-md-4">
<div class="e-input-group e-error">
<input class="e-input" type="text" placeholder="Error">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6"><b>Sizing</b></div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6 custom-padding-05">
<div class="e-input-group e-small">
<input class="e-input" type="text" placeholder="Small">
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group">
<input class="e-input" type="text" placeholder="Normal">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6"><b>Input & Elements</b></div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group">
<input class="e-input" type="text" placeholder="Date of Birth">
<span class="e-input-group-icon e-input-calendar"></span>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="e-input-group e-float-icon-left">
<span class="e-input-group-icon e-input-picture"></span>
<div class="e-input-in-wrap">
<input class="e-input" type="text" placeholder="Upload Picture">
</div>
</div>
</div>
</div>
</div>
</div>
}
@section Scripts{
<script>
var inputObject = {};
var input = document.querySelectorAll('.e-input-group .e-input,.e-float-input.e-input-group input');
var inputIcon = document.querySelectorAll('.e-input-group-icon');
var focusFn = function (index) {
return function () {
getParentNode(input[index]).classList.add('e-input-focus');
};
};
var blurFn = function (index) {
return function () {
getParentNode(input[index]).classList.remove('e-input-focus');
};
};
var mouseupFn = function () {
var ele = this;
setTimeout(function () { ele.classList.remove('e-input-btn-ripple'); }, 500);
};
for (var i = 0; i < input.length; i++) {
//Focus Event binding for input component
input[i].addEventListener('focus', focusFn(i));
//Blur Event binding for input component
input[i].addEventListener('blur', blurFn(i));
}
for (var j = 0; j < inputIcon.length; j++) {
inputIcon[j].addEventListener('mousedown', function () {
this.classList.add('e-input-btn-ripple');
});
inputIcon[j].addEventListener('mouseup', mouseupFn);
}
function getParentNode(element) {
var parentNode = element.parentNode;
if (parentNode.classList.contains('e-input-in-wrap')) {
return parentNode.parentNode;
}
return parentNode;
}
</script>
}
@*custom code start*@
<style>
.e-input-picture:before {
content: '\e335';
font-family: e-icons;
}
.bootstrap4 .e-input-picture:before {
content: '\e776';
}
.e-input-calendar:before {
content: '\e901';
font-family: e-icons;
font-size: 13px;
}
.fabric .e-input-calendar:before {
content: '\e93a';
}
.bootstrap .e-input-calendar:before {
content: '\e960';
}
.bootstrap4 .e-input-calendar:before {
content: '\e7be';
}
.highcontrast .e-input-calendar:before {
content: '\e93a';
}
.content-wrapper {
width: 90%;
margin: 0 auto;
min-width: 185px;
}
.content-wrapper div.row {
padding: 15px 0px;
}
.custom-padding-05 {
padding-top: 5px;
}
.control-label {
padding: 24px 0px 0px 0px;
font-size: 12px;
opacity: 0.54;
}
#description td {
vertical-align: top;
}
</style>
@*custom code end*@
@section ActionDescription{
<div id="action-description">
<p>
This example demonstrates the default functionalities of the <code>TextBox</code> control. Type a character in the TextBox element or focus-in to the TextBox for floating the label text. The label will be positioned back to TextBox on focus-out without value.
</p>
</div>
}
@section Description{
<div id="description">
<p>
A TextBoxes are an input element that allows to get input from the user. It allows the user either to edit or display the input values.
</p>
<br>
<table style="width:100%">
<tr>
<th>Types</th>
<th>Description</th>
</tr>
<tr>
<td>Floating Label</td>
<td>
You can render floating textbox with <b>e-float-input</b> class added and need to maintain the following structure
of elements.
<ul>
<li>Create group element with <b>e-float-input</b> class added.</li>
<li>Input element with <b>required</b> attribute.</li>
<li>Span element with <b>e-float-line</b> class.</li>
<li>Label element with <b>e-float-text</b> class.</li>
</ul>
</td>
</tr>
<tr>
<td>Floating Label & Elements</td>
<td>
You can render floating textbox with icons added with in group element <b>e-input-group</b> and need to maintain
the following structure of elements.
<ul>
<li>Create group element with <b>e-float-input</b> class added.</li>
<li>Input element with <b>required</b> attribute.</li>
<li>Span element with <b>e-float-line</b> class.</li>
<li>Label element with <b>e-float-text</b> class.</li>
<li>Append or prepend the span element with class <b>e-input-group-icon</b> added.</li>
</ul>
</td>
</tr>
<tr>
<td>Default TextBox</td>
<td>
<div style="padding-bottom: 10px">
You can render textbox by adding class as <b>e-input</b>.You can also render textbox as group by adding
parent element with <b>e-input-group</b> class added.
</div>
</td>
</tr>
<tr>
<td>RTL TextBox</td>
<td>
<div style="padding-bottom: 10px">
Set <b>e-input</b> and <b>e-rtl</b> classes to render textbox in right to left direction. For rendering
group in RTL mode , class list will be like <b>e-input-group e-rtl</b>.
</div>
</td>
</tr>
<tr>
<td>Disabled TextBox</td>
<td>
<div style="padding-bottom: 10px">You set html disabled attribute to textbox. For parent group element , you can disable it by adding <b>e-disabled</b> class.</div>
</td>
</tr>
<tr>
<td>Readonly TextBox</td>
<td>
<div style="padding-bottom: 10px">You set html readonly attribute to textbox.</div>
</td>
</tr>
<tr>
<td>Validation states</td>
<td>
<div style="padding-bottom: 10px">
You can apply validation states success, warning, error to the textbox with the corresponding classes added
to the input element such as <b>e-success</b>, <b>e-warning</b>, <b>e-error</b>.
</div>
</td>
</tr>
<tr>
<td>Sizing</td>
<td>
<div style="padding-bottom: 10px">
You can render small sizing textbox by adding <b>e-small</b> class to the input element. By default normal
size considered.
</div>
</td>
</tr>
<tr>
<td>Input & elements</td>
<td>
You can render textbox with icons in the below format,
<ul>
<li>Create group element with <b>e-input-group</b> class added.</li>
<li>
Add input element with <b>e-input</b> and span element with <b>e-input-group-icon</b> inside the input
group element.
</li>
<li>
You can add the icon either before or after the textbox by placing <b>e-input-group-icon</b> class named
element in specific place.
</li>
</ul>
</td>
</tr>
</table>
<br>
</div>
}
@section Meta{
<meta name="description" content="The example describes key features of ASP.NET MVC text box such as a floating label, input group, placeholder, validation states, sizing, types, and more." />
}