This repository was archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathevents.html
133 lines (128 loc) · 6.4 KB
/
events.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
<!doctype html>
<html>
<head>
<title>Essential JS 1: Tab - Events</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
<link href="../content/bootstrap.min.css" rel="stylesheet" />
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
<link href="../content/default.css" rel="stylesheet" />
<link href="../content/default-responsive.css" rel="stylesheet" />
<link href="../content/ejthemes/responsive-css/ej.responsive.css" rel="stylesheet" />
<!--[if lt IE 9]>
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript" ></script>
<![endif]-->
<!--[if IE 9]><!-->
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"> </script>
<!--<![endif]-->
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
<script src="../scripts/properties.js" type="text/javascript"></script>
<script>
window.sample = { name: "" };
</script>
</head>
<body>
<div class="content-container-fluid">
<div class="row">
<div class="cols-sample-area">
<div id="eventTab" style="width: 500px">
<ul>
<li><a href="#asp">ASP.NET</a></li>
<li><a href="#mvc">ASP.NET MVC</a></li>
<li><a id="ajaxcontent">Javascript</a></li>
</ul>
<div id="asp">
Microsoft ASP.NET is a set of technologies in the Microsoft .NET Framework for building Web applications and XML Web services. ASP.NET pages execute on the server and generate markup such as HTML, WML, or XML that is sent to a desktop or mobile browser. ASP.NET pages use a compiled, event-driven programming model that improves performance and enables the separation of application logic and user interface.
</div>
<div id="mvc">
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication.
</div>
</div>
</div>
<div class="cols-prop-area event-tracer">
<div>
<div class="heading">
<span>Event Trace</span>
<div class="pull-right">
<select name="selectevtprops" id="selectControls">
<option value="ajaxBeforeLoad">Ajax BeforeLoad</option>
<option value="ajaxLoad">Ajax Load</option>
<option value="beforeActive">Before Active</option>
<option value="itemActive">Item Active</option>
</select>
</div>
</div>
<div class="prop-grid content">
<div class="eventarea">
<div class="EventLog" id="EventLog">
</div>
</div>
<div class="evtbtn">
<input type="button" class="eventclear e-btn" value="Clear" onclick="onClear()" />
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var tabObj;
$(function () {
// declaration
contentUrl = window.location.hash.indexOf(window.sample.name) ? "content/samplecontent/jscontent.html" : "../content/samplecontent/jscontent.html";
$('#ajaxcontent').attr('href', contentUrl);
$("#eventTab").ejTab(
{
selectedItemIndex: 0,
ajaxBeforeLoad: "onClientBeforeLoad",
create: "onClientCreate",
beforeActive: "onClientBeforeActive",
itemActive: "onClientActive",
ajaxSuccess: "onClientSuccess",
ajaxError:"onClientFailure"
});
tabObj = $("#eventTab").data("ejTab");
$("#selectControls").ejDropDownList(
{
popupShown: "adjustpopupposition",
showCheckbox: true,
checkAll: true,
change: "evtpropscheckedevent"
});
});
// Event wire and unwire
function evtpropscheckedevent(args) {
if (args.isChecked) {
switch (args.selectedValue) {
case "ajaxBeforeLoad": tabObj.option(args.selectedValue, "onClientBeforeLoad"); break;
case "beforeActive": tabObj.option(args.selectedValue, "onClientBeforeActive"); break;
case "itemActive": tabObj.option(args.selectedValue, "onClientActive"); break;
case "onClientSuccess": tabObj.option(args.selectedValue, "onClientSuccess"); break;
case "onClientFailure": tabObj.option(args.selectedValue, "onClientFailure"); break;
}
}
else tabObj.option(args.selectedValue, null);
}
function onClientBeforeLoad(e) {
jQuery.addEventLog("<span class='eventTitle'>BeforeLoad</span> event is fired.</br>");
}
function onClientSuccess(e){
jQuery.addEventLog("Ajax content has been loaded <span class='eventTitle'>successfully</span>.</br>");
}
function onClientFailure(e){
jQuery.addEventLog("Ajax content has been loaded <span class='eventTitle'>failure</span>.</br>");
}
function onClientCreate(e) {
jQuery.addEventLog("Tab is <span class='eventTitle'>created</span>. </br>");
}
function onClientActive(e) {
jQuery.addEventLog("Index " + e.activeIndex + " is <span class='eventTitle'>activated</span>. </br>");
}
function onClientBeforeActive(e) {
jQuery.addEventLog("<span class='eventTitle'>BeforeActive </span>event is fired. </br>");
}
function onClear() {
jQuery.clearEventLog();
}
</script>
</body>
</html>