forked from syncfusion/ej2-aspnetmvc-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefaultFunctionalities.cshtml
178 lines (164 loc) · 9.51 KB
/
DefaultFunctionalities.cshtml
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
@using Syncfusion.EJ2
@section ControlsSection{
<div class="control-section">
<div class="button-section">
<div id="button-control">
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("primarybtn").Content("Primary").IsPrimary(true).Render()
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("normalbtn").Content("Normal").Render()
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("outlinebtn").Content("Outline").IsPrimary(true).CssClass("e-outline").Render()
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("flatbtn").Content("Flat").IsPrimary(true).CssClass("e-flat").Render()
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("successbtn").Content("Success").CssClass("e-success").Render()
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("warningbtn").Content("Warning").CssClass("e-warning").Render()
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("dangerbtn").Content("Danger").CssClass("e-danger").Render()
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("infobtn").Content("Info").CssClass("e-info").Render()
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("roundbtn").IconCss("e-btn-sb-icons e-add-icon").CssClass("e-small e-round").IsPrimary(true).Render()
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("togglebtn").Content("Play").IconCss("e-btn-sb-icons e-play-icon").CssClass("e-flat").IsPrimary(true).IsToggle(true).Render()
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("openiconbtn").Content("Open").CssClass("e-flat").IsPrimary(true).IconCss("e-btn-sb-icons e-open-icon").IconPosition(Syncfusion.EJ2.Buttons.IconPosition.Right).Render()
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
@Html.EJS().Button("smallbtn").Content("Small").CssClass("e-small").Render()
</div>
</div>
</div>
</div>
</div>
</div>
}
@section Meta{
<meta name="description" content="This example demonstrates the Default Functionalities in ASP.NET MVC Button control. Explore here for more details."/>
}
@section ActionDescription{
<div id="action-description">
<p>This sample demonstrates the default functionalities of the Button with different types and predefined styles.</p>
</div>
}
@section Description{
<div id="description">
<p>
Button is a graphical user interface element that triggers an event on click action. It contains the text, an image, or both.
</p>
<p>
In this sample, Play button is a toggle button and it can be enabled by using the <code>
<a target="_blank" class="code"
href="https://help.syncfusion.com/cr/cref_files/aspnetmvc-js2/Syncfusion.EJ2~Syncfusion.EJ2.Buttons.Button~IsToggle.html">
isToggle
</a>
</code> property. To change the text and icon you should handle click event.
</p>
<p>
More information about Button can be found in this
<a target="_blank"
href="https://ej2.syncfusion.com/aspnetmvc/documentation/button/getting-started">
documentation section
</a>.
</p>
</div>
}
@section Scripts {
<script>
document.getElementById("togglebtn").addEventListener('click', function () {
var toggleBtn = document.getElementById("togglebtn").ej2_instances[0];
if (toggleBtn.element.classList.contains('e-active')) {
toggleBtn.content = 'Pause';
toggleBtn.iconCss = 'e-btn-sb-icons e-pause-icon';
} else {
toggleBtn.content = 'Play';
toggleBtn.iconCss = 'e-btn-sb-icons e-play-icon';
}
});
</script>
}
@*custom code start*@
<style>
#button-control {
width: 100%;
margin: 8% 0;
text-align: center;
}
@@media only screen and (max-width: 500px) {
#button-control {
margin-left: -3%;
}
}
.button-section {
width: 80%;
margin: auto;
}
#button-control .col-xs-12 {
margin: 15px 0;
}
</style>
@*custom code end*@
<style>
@@font-face {
font-family: 'button-icons';
src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMj1uSf8AAAEoAAAAVmNtYXDOXM6wAAABtAAAAFRnbHlmcV/SKgAAAiQAAAJAaGVhZBNt0QcAAADQAAAANmhoZWEIUQQOAAAArAAAACRobXR4NAAAAAAAAYAAAAA0bG9jYQNWA+AAAAIIAAAAHG1heHABGQAZAAABCAAAACBuYW1lASvfhQAABGQAAAJhcG9zdFAouWkAAAbIAAAA2AABAAAEAAAAAFwEAAAAAAAD9AABAAAAAAAAAAAAAAAAAAAADQABAAAAAQAAYD3WXF8PPPUACwQAAAAAANgtxgsAAAAA2C3GCwAAAAAD9AP0AAAACAACAAAAAAAAAAEAAAANAA0AAgAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQQAAZAABQAAAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5wHnDQQAAAAAXAQAAAAAAA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QALACwAAQAAAAAABgAMADcAAQAAAAAACgAsAEMAAQAAAAAACwASAG8AAwABBAkAAAACAIEAAwABBAkAAQAYAIMAAwABBAkAAgAOAJsAAwABBAkAAwAYAKkAAwABBAkABAAYAMEAAwABBAkABQAWANkAAwABBAkABgAYAO8AAwABBAkACgBYAQcAAwABBAkACwAkAV8gYnV0dG9uLWljb25zUmVndWxhcmJ1dHRvbi1pY29uc2J1dHRvbi1pY29uc1ZlcnNpb24gMS4wYnV0dG9uLWljb25zRm9udCBnZW5lcmF0ZWQgdXNpbmcgU3luY2Z1c2lvbiBNZXRybyBTdHVkaW93d3cuc3luY2Z1c2lvbi5jb20AIABiAHUAdAB0AG8AbgAtAGkAYwBvAG4AcwBSAGUAZwB1AGwAYQByAGIAdQB0AHQAbwBuAC0AaQBjAG8AbgBzAGIAdQB0AHQAbwBuAC0AaQBjAG8AbgBzAFYAZQByAHMAaQBvAG4AIAAxAC4AMABiAHUAdAB0AG8AbgAtAGkAYwBvAG4AcwBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIAB1AHMAaQBuAGcAIABTAHkAbgBjAGYAdQBzAGkAbwBuACAATQBlAHQAcgBvACAAUwB0AHUAZABpAG8AdwB3AHcALgBzAHkAbgBjAGYAdQBzAGkAbwBuAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4ACm1lZGlhLXBsYXkLbWVkaWEtcGF1c2UQLWRvd25sb2FkLTAyLXdmLQltZWRpYS1lbmQHYWRkLW5ldwtuZXctbWFpbC13ZhB1c2VyLWRvd25sb2FkLXdmDGV4cGFuZC0wMy13Zg5kb3dubG9hZC0wMi13ZgphZGQtbmV3XzAxC21lZGlhLWVqZWN0Dm1lZGlhLWVqZWN0LTAxAAA=) format('truetype');
font-weight: normal;
font-style: normal;
}
.e-btn-sb-icons {
font-family: 'button-icons';
line-height: 1;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.e-play-icon::before {
content: '\e701';
}
.e-pause-icon::before {
content: '\e705';
}
.e-open-icon::before {
content: '\e70d';
}
.e-add-icon::before {
content: '\e70a';
}
</style>
@section Title{
<title>ASP.NET MVC Button Default Functionalities Example - Syncfusion Demos </title>
}
@section Header{
<h1 class='sb-sample-text'>Example of Default Functionalities in ASP.NET MVC Button Control</h1>
}