-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathigx.html
104 lines (95 loc) · 2.39 KB
/
igx.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
<html>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="igx_api.js"></script>
</head>
<script type="text/javascript">
function Login() {
var username = jQuery('#login_username').val();
var password = jQuery('#login_password').val();
if (username && password) {
IGX.RESTful.MembershipProviders.Login(username, password, OnLogin);
} else {
alert('You need to enter both a username and password!');
}
}
function Logout() {
IGX.RESTful.MembershipProviders.Logout(OnLogout);
}
function OnLogin(result) {
var treeNode = {
"widgetId": "x77",
"objectId": "x77",
"index": 1
}
var des = [];
switch (result.code) {
case 0:
retVal = IGX.Pages.getDecendants('x109223', des, 'dev-wes', show_result);
console.log(des);
jQuery('#login_panel').hide();
jQuery('#controls').show();
jQuery('#login_panel input').val('');
break;
default:
alert(result.error);
break;
}
}
function OnLogout(result) {
jQuery('#login_panel').show();
jQuery('#controls, #user_creation_panel').hide();
}
</script>
<body>
<div id="login_panel">
<div>
<label for="login_username">Username</label>
<input id="login_username" type="text">
</div>
<div>
<label for="login_password">Password</label>
<input id="login_password" type="password">
</div>
<div>
<button onclick="Login();">Login</button>
</div>
</div>
<div id="controls" hidden>
</div>
<div id="user_creation_panel" hidden>
<h3>User Creation</h3>
<div>
<div>
<label for="uc_id">ID</label>
<input id="uc_id">
</div>
<div>
<label for="uc_name">Display Name</label>
<input id="uc_name">
</div>
<div>
<label for="uc_password">Password</label>
<input id="uc_password" type="password">
</div>
<div>
<label for="uc_email">Email Address</label>
<input id="uc_email" type="email">
</div>
<div>
<button onclick="CreateNewUser()">Create User</button>
</div>
</div>
</div>
<span id="last_sync_time" hidden></span>
<div id="display_users_panel" hidden>
<div>
<button onclick="DeleteUsers()">Delete Selected Users</button>
</div>
<div class="content"></div>
</div>
<div id="display_groups_panel" hidden>
<div class="content"></div>
</div>
</body>
</html>