forked from chenfeishao/console.easemob.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_home.html
executable file
·266 lines (250 loc) · 11.2 KB
/
admin_home.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
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>环信开发者中心</title>
<!--
<link href="//cdnjscn.b0.upaiyun.com/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="//cdnjscn.b0.upaiyun.com/libs/twitter-bootstrap/2.3.2/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" media="screen"/>
-->
<link href="assets/css/bootstrap-2.3.2.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/bootstrap-responsive-2.3.2.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/font-awesome-3.1.0.min.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if IE 7]>
<link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--fonts-->
<!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" /> -->
<!--ace styles-->
<link href="assets/css/ace.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/ace-responsive.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/ace-skins.min.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if lte IE 8]>
<link rel="stylesheet" href="assets/css/ace-ie.min.css" />
<![endif]-->
<link href="assets/css/management.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/manage.css" rel="stylesheet" type="text/css" media="screen"/>
<!--
<script src="//cdnjscn.b0.upaiyun.com/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="//cdnjscn.b0.upaiyun.com/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="//cdnjscn.b0.upaiyun.com/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="//cdnjscn.b0.upaiyun.com/libs/json2/20130526/json2.min.js"></script>
-->
<script src="assets/js/jquery-1.7.2.min.js"></script>
<script src="assets/js/jquery.cookie-1.3.js"></script>
<script src="assets/js/bootstrap-2.3.2.min.js"></script>
<script src="assets/js/json2.js"></script>
<script src="assets/js/ace-elements.min.js"></script>
<script src="assets/js/ace.min.js"></script>
<script src="assets/js/management.js"></script>
<script type="text/javascript">
$(function(){
if (!getToken() || getToken()==''){
logout();
}
adminInfo();
$('#companyNameInput').val('');
$('#telephoneInput').val('');
$('#companyNameInput').hide();
$('#companyNameInputMsg').hide();
$('#telephoneInput').hide();
$('#telephoneInputMsg').hide();
$('#showEditBtn').show();
$('#saveAdminInfoBtn').hide();
$('#cancelSaveAdminInfoBtn').hide();
});
function showEdit(){
var companyName = $('#companyName').text();
var telephone = $('#telephone').text();
$('#showEditBtn').hide();
$('#companyName').hide();
$('#telephone').hide();
$('#saveAdminInfoBtn').show();
$('#cancelSaveAdminInfoBtn').show();
$('#companyNameInput').show();
$('#companyNameInputMsg').show();
$('#telephoneInput').show();
$('#telephoneInputMsg').show();
$('#companyNameInput').val(companyName);
$('#telephoneInput').val(telephone);
}
function cancelSaveAdminInfo(){
$('#showEditBtn').show();
$('#companyName').show();
$('#telephone').show();
$('#saveAdminInfoBtn').hide();
$('#cancelSaveAdminInfoBtn').hide();
$('#companyNameInput').hide();
$('#telephoneInput').hide();
$('#companyNameInput').val('');
$('#telephoneInput').val('');
$('#companyNameInputMsg').hide();
$('#telephoneInputMsg').hide();
}
function saveAdminInfo(){
var username = $('#username').text();
var companyNameInput = $('#companyNameInput').val();
var telephoneInput = $('#telephoneInput').val();
var companyNameInputRegex = /^[0-9a-zA-Z\-_\u4e00-\u9faf]*$/;
if(!companyNameInputRegex.test(companyNameInput)){
$('#companyNameInputMsg').text('公司名称只能是汉字,字母,数字、横线、下划线及其组合!');
$('#companyNameInputMsg').css('color','red');
return ;
}
$('#companyNameInputMsg').hide();
var telephoneInputRegex = /^[0-9]*$/;
if(telephoneInput != '' && !telephoneInputRegex.test(telephoneInput)){
$('#telephoneInputMsg').text('联系电话号码只能是数字!');
$('#telephoneInputMsg').css('color','red');
return ;
}
$('#telephoneInputMsg').hide();
updateAdminInfo(username, companyNameInput, telephoneInput);
}
window.onresize = window.onload = function(){
var w,h;
if(!!(window.attachEvent && !window.opera)) {
h = document.documentElement.clientHeight;
w = document.documentElement.clientWidth;
}else{
h = window.innerHeight;
w = window.innerWidth;
}
$("#headerlogo").width(w/6.5);
$("#headerlogo").height(h/16)
}
</script>
</head>
<body>
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="javascript:void(0);"><img id="headerlogo" src="assets/images/home_logo.png" alt="管理后台"/></a>
<div id="headhref" class="lianjie" style="width:40%; margin-left:20%;">
<ol>
<li style="width:20%;"><a href="http://www.easemob.com" target="_blank"><h5>主页</h5></a></li>
<li style="width:20%;"><a href="http://www.easemob.com/docs/gettingstart" target="_blank"><h5>文档</h5></a></li>
<li style="width:20%;"><a href="http://www.easemob.com/faq" target="_blank"><h5>帮助</h5></a></li>
<li style="width:20%;"><a href="http://www.imgeek.org/forum.php" target="_blank"><h5>社区</h5></a></li>
<li style="width:20%;"><a href="http://www.easemob.com/sdk" target="_blank"><h5>下载SDK</h5></a></li>
</ol>
</div>
<ul class="nav ace-nav pull-right" style="top:5px; margin-right:0">
<li class="light-blue user-profile"> <a class="user-menu dropdown-toggle" href="javascript:void(0);" data-toggle="dropdown"> <span id="user_info"></span> <i class="icon-caret-down"></i> </a>
<ul id="user_menu" class="pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer">
<li class="divider"></li>
<li> <a href="admin_home.html"> <i class="icon-user"></i> 账户 </a> </li>
<li> <a onClick="logout();" href="javascript:void(0);"> <i class="icon-off"></i> 退出 </a> </li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="main-container" class="container-fluid"> <a href="javascript:void(0);" id="menu-toggler"> <span></span> </a>
<div id="sidebar">
<div id="sidebar-shortcuts">
<div style="min-height: 40px;" id="sidebar-shortcuts-large"> </div>
<div style="min-height: 40px;" id="sidebar-shortcuts-mini"> </div>
</div>
<ul class="nav nav-list">
<li> <a href="app_list.html" target="_self"> <i class="icon-ambulance"></i> <span>我的应用</span> </a></li>
<li class="active"> <a href="admin_home.html" target="_self"> <i class="icon-user"></i> <span>个人信息</span> </a></li>
</ul>
<div id="sidebar-collapse"> <i class="icon-double-angle-left"></i> </div>
</div>
<div class="clearfix" id="main-content">
<div id="breadcrumbs">
<ul class="breadcrumb">
<li> <i class="icon-home"></i> 个人信息 </li>
</ul>
</div>
<div class="clearfix" id="page-content">
<div class="pagination pagination-left">
<ul>
<li> <a href="admin_home.html" ><font color="green">个人信息</font></a> </li>
</ul>
<ul>
<li> <a href="admin_home_passwd.html">修改密码</a> </li>
</ul>
</div>
<div class="row-fluid">
<div class="row-fluid">
<table class="table table-striped table-bordered table-hover">
<div class="widget-body"></div>
<tbody id="appListBody">
<div class="widget-body">
<div class="widget-main no-padding">
<div class="form-horizontal" style="padding-top:20px;">
<div class="row-fluid">
<div class="span12">
<div class="control-group">
<label for="username" class="control-label">登录账号:</label>
<div class="controls" style="padding-top:5px;">
<span id="username"></span>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="control-group">
<label for="email" class="control-label">邮箱账号:</label>
<div class="controls" style="padding-top:5px;">
<span id="email"></span>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="control-group">
<label for="companyName" class="control-label">公司名称:</label>
<div class="controls" style="padding-top:5px;">
<span id="companyName"></span>
<input type="text" id="companyNameInput" name="companyNameInput" value="" />
<span id="companyNameInputMsg"></span>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="control-group">
<label for="telephone" class="control-label">联系电话:</label>
<div class="controls" style="padding-top:5px;">
<span id="telephone"></span>
<input type="text" id="telephoneInput" name="telephoneInput" value="" />
<span id="telephoneInputMsg"></span>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<!--<div class="span12">
<div class="control-group">
<label for="createTime" class="control-label">创建日期:</label>
<div class="controls" style="padding-top:5px;">
<span id="createTime"></span>
</div>
</div>
</div>
</div>-->
</div>
<div style="margin-left:180px;margin-bottom:20px">
<button id="showEditBtn" onclick="showEdit();" href="javascript:void(0);" class="btn btn-small btn-success"><i class="icon-edit bigger-110"></i> 修改 </button>
<button id="cancelSaveAdminInfoBtn" onclick="cancelSaveAdminInfo();" href="javascript:void(0);" class="btn btn-small btn-success"><i class="icon-remove bigger-110"> 放弃</i> </button>
<button id="saveAdminInfoBtn" onclick="saveAdminInfo();" href="javascript:void(0);" class="btn btn-small btn-success"><i class="icon-save bigger-110"></i> 保存 </button>
</div>
</div>
</div>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
</html>