-
Notifications
You must be signed in to change notification settings - Fork 4
/
login.html
executable file
·102 lines (98 loc) · 3.15 KB
/
login.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Appcelerator Cloud Services Javascript SDK Demo: User Login</title>
<script type="text/javascript" src="js/jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.showLoading.js"></script>
<script type="text/javascript" src="http://sdk.cocoafish.com/js/cocoafish-1.2.min.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<link type="text/css" href="css/cupertino/jquery-ui-1.8.8.custom.css" rel="Stylesheet" />
<link type="text/css" href="css/showLoading.css" rel="Stylesheet" />
<script type="text/javascript">
$(document).ready(function() {
$('#loginButton').button({
icons: {
primary: "ui-icon-triangle-1-e",
secondary: "ui-icon-triangle-1-e"
}
});
$('#resetButton').button({
icons: {
primary: "ui-icon-triangle-1-e",
secondary: "ui-icon-triangle-1-e"
}
});
$('#loginButton').click(function() {
var userName = $.trim($('#userName').val());
var passwd = $('#password').val();
if(!userName || !passwd) {
$('#errorMsg').show();
} else {
$('#errorMsg').hide();
loginUser(userName, passwd);
}
});
$('#resetButton').click(function() {
$('#userName').val('');
$('#password').val('');
});
});
</script>
<style type="text/css">
body {
font-size:12px;
}
.loginFormArea {
width:400px;
padding:15px;
}
.loginInput {
width: 200px;
}
</style>
</head>
<body>
<div id="container">
<table align="center">
<tr>
<td>
<div>
<h2>Welcome to Appcelerator Cloud Services Javascript SDK Demo!</h2>
</div>
<div id="mainArea" class="loginFormArea ui-widget ui-widget-content ui-corner-all">
<table align="center" border="0" cellspacing="0" cellpadding="5">
<tr>
<td colspan="2">
<div id="errorMsg" class="ui-state-error ui-corner-all" style="float:left;display:none">
<span class="ui-icon ui-icon-alert" style="float:left"></span>
<span class="ui-state-error-text" style="float:left">user name or password cannot be empty</span>
</div>
</td>
</tr>
<tr>
<td align="right" >User Name:</td>
<td><input id="userName" class="ui-widget ui-corner-all loginInput" value=""/></td>
</tr>
<tr>
<td align="right" >Password:</td>
<td><input id="password" type="password" class="ui-widget ui-corner-all loginInput"/></td>
</tr>
<tr>
<td></td>
<td nowrap><a id="loginButton" href="javascript:void(0)">Login</a> <a id="resetButton" href="javascript:void(0)">Reset</a></td>
</tr>
<tr>
<td align="right" colspan="2">
<a onclick="loadSignUp()" href="javascript:void(0)">Sign Up!</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>