Commit eb965c4c authored by Vanessa's avatar Vanessa

default-init 样式

parent 67d9c477
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
# Description: B3log Solo language configurations(en_US). # Description: B3log Solo language configurations(en_US).
# Version: 2.1.0.5, Mar 11, 2013 # Version: 2.1.0.6, Apr 1, 2013
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
...@@ -56,7 +56,7 @@ aboutContentLabel=<p><a href="https://github.com/b3log/b3log-solo" target="_blan ...@@ -56,7 +56,7 @@ aboutContentLabel=<p><a href="https://github.com/b3log/b3log-solo" target="_blan
is an open source (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache License 2.0</a>) blogging program, which can run on <a href="http://code.google.com/appengine" target="_blank">Google App Engine</a> and a standard Servlet container.</p>\ is an open source (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache License 2.0</a>) blogging program, which can run on <a href="http://code.google.com/appengine" target="_blank">Google App Engine</a> and a standard Servlet container.</p>\
<p><a href="http://b3log.org" target="_blank">B3log</a> advocates the rights of equality, freedom and passion, and we are trying to create a bran-new experience about individual blogging + community. Sound interesting? <a href="https://github.com/b3log/b3log-solo/wiki/Join_us" target="_blank">Join us</a>!</p>\ <p><a href="http://b3log.org" target="_blank">B3log</a> advocates the rights of equality, freedom and passion, and we are trying to create a bran-new experience about individual blogging + community. Sound interesting? <a href="https://github.com/b3log/b3log-solo/wiki/Join_us" target="_blank">Join us</a>!</p>\
<a target="blank" href="http://me.alipay.com/b3log">\ <a target="blank" href="http://me.alipay.com/b3log">\
<div class="ico-alipay-me" alt="Alipay B3log" title="\u901A\u8FC7\u652F\u4ED8\u5B9D\u6536\u6B3E\u4E3B\u9875\u8FDB\u884C\u6350\u8D60"></div></a> <div class="ico-alipay-me" alt="Alipay B3log" title="\u901a\u8fc7\u652f\u4ed8\u5b9d\u6536\u6b3e\u4e3b\u9875\u8fdb\u884c\u6350\u8d60"></div></a>
confirmLabel=Confirm confirmLabel=Confirm
adminConsoleLabel=Admin adminConsoleLabel=Admin
adminIndexLabel=Admin Index adminIndexLabel=Admin Index
...@@ -192,6 +192,7 @@ blogArticleImportLabel=Article Import ...@@ -192,6 +192,7 @@ blogArticleImportLabel=Article Import
userName1Label=Username: userName1Label=Username:
userLabel=User userLabel=User
userPassword1Label=Password: userPassword1Label=Password:
userPasswordLabel=Password
categoryLabel=Category categoryLabel=Category
noticeBoard1Label=Notice Board: noticeBoard1Label=Notice Board:
noticeBoardLabel=Notice Board noticeBoardLabel=Notice Board
...@@ -264,9 +265,9 @@ Welcome to the <a href="http://symphony.b3log.org" target="_blank">B3log Symphon ...@@ -264,9 +265,9 @@ Welcome to the <a href="http://symphony.b3log.org" target="_blank">B3log Symphon
<span style="font-size:12px"><span style="color:red">Note</span>: Only to ensure Email is the same and <a href="/article/1353772377257" target="_blank">synchronization configured</a> is correctly,\ <span style="font-size:12px"><span style="color:red">Note</span>: Only to ensure Email is the same and <a href="/article/1353772377257" target="_blank">synchronization configured</a> is correctly,\
Your posts and comments can <i>maintain bisynchronous</i> in the community and the B3log Solo.</p> Your posts and comments can <i>maintain bisynchronous</i> in the community and the B3log Solo.</p>
killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span> killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span>
readmoreLabel=Read more\u00BB readmoreLabel=Read more\u00bb
readmore2Label=Read more readmore2Label=Read more
replyLabel=Reply\u00BB replyLabel=Reply\u00bb
homeLabel=Home homeLabel=Home
enableArticleUpdateHint1Label=Enable Article Update Hint: enableArticleUpdateHint1Label=Enable Article Update Hint:
allowVisitDraftViaPermalink1Label=Allow Visit Draft Via Link: allowVisitDraftViaPermalink1Label=Allow Visit Draft Via Link:
...@@ -347,8 +348,8 @@ duplicatedPermalinkLabel=Duplicated permalink! ...@@ -347,8 +348,8 @@ duplicatedPermalinkLabel=Duplicated permalink!
invalidPermalinkFormatLabel=Invalid permalink format! invalidPermalinkFormatLabel=Invalid permalink format!
duplicatedEmailLabel=Duplicated email! duplicatedEmailLabel=Duplicated email!
refreshAndRetryLabel=Please refresh and try again! refreshAndRetryLabel=Please refresh and try again!
editorLeaveLabel=Content is not null, Do you leave\uFF1F editorLeaveLabel=Content is not null, Do you leave\uff1f
editorPostLabel=Content is not null, Do you clear\uFF1F editorPostLabel=Content is not null, Do you clear\uff1f
#### ####
confirmRemoveLabel=Are You Remove confirmRemoveLabel=Are You Remove
confirmInitLabel=Are You Sure? confirmInitLabel=Are You Sure?
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<title>${articleViewPwdLabel}</title> <title>${articleViewPwdLabel}</title>
<meta name="keywords" content="GAE 博客,GAE blog,b3log" /> <meta name="keywords" content="GAE 博客,GAE blog,b3log" />
<meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客" /> <meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" /> <meta name="author" content="B3log Team" />
<meta name="generator" content="B3log" /> <meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" /> <meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" /> <meta name="robots" content="noindex, follow" />
......
...@@ -18,57 +18,98 @@ ...@@ -18,57 +18,98 @@
* 403, 404, 500, article-pwd, init, login and kill-browser page style. * 403, 404, 500, article-pwd, init, login and kill-browser page style.
* *
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a> * @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.1.2, Aug 27, 2012 * @version 1.0.1.3, Apr 1, 2013
*/ */
html { html {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
*,html,body { html,body {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
body { body {
background-color: #F3F1E5; background-color: #F3F1E5;
color: #4D505D; color: #333;
font-family: \5fae\8f6f\96c5\9ed1; font-family: \5fae\8f6f\96c5\9ed1;
font-size: small; font-size: small;
height: 100%; height: 100%;
} }
button { h2 {
background: url(../images/icon.png) repeat center bottom; background: linear-gradient(#F9F9F9, #ECECEC) repeat scroll 0 0 transparent;
border: 1px solid; border-radius: 4px 4px 0 0;
border-color: #CCC #BBBBBB #A0A0A0; font-size: 16px;
border-radius: 4px;
height: 28px;
margin: 0; margin: 0;
padding: 0 6px; padding: 10px 20px;
vertical-align: top; text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.5);
float: right;
margin: 12px 0 0 24px;
outline: none;
} }
input { input {
background: none repeat scroll 0 0 #FBFBFB; border: 1px solid #CCCCCC;
border: 1px solid #E5E5E5; border-radius: 3px 3px 3px 3px;
box-shadow: 1px 1px 2px rgba(200, 200, 200, 0.2) inset; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075) inset;
color: #4D505D; font-size: 13px;
font-family: Helvetica,Arial,'sans-serif','\5fae\8f6f\96c5\9ed1'; margin: 15px 0;
font-size: 20px; padding: 7px 8px;
font-weight: 200; transition: all 0.15s ease-in 0s;
height: 28px; vertical-align: middle;
margin-top: 10px; width: 410px;
outline: medium none;
padding: 3px;
width: 280px;
} }
input:focus { input:focus {
box-shadow: 0px 0px 5px rgba(200, 200, 200, 0.9); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075) inset, 0 0 5px rgbargba(200, 200, 200, 0.9);
border: 1px solid #E6E5D9;
}
.form {
padding: 20px;
}
label {
font-size: 13px;
}
button {
position:relative;
display:inline-block;
font-size:13px;
font-weight:700;
color:#333;
text-shadow:0 1px 0 rgba(255,255,255,0.9);
white-space:nowrap;
background-color:#eaeaea;
background-image:linear-gradient(#fafafa,#eaeaea);
background-repeat:repeat-x;
border-radius:3px;
border:1px solid #ddd;
border-bottom-color:#c5c5c5;
box-shadow:0 1px 3px rgba(0,0,0,0.075);
vertical-align:baseline;
cursor:pointer;
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
-webkit-appearance:none;
outline:none;
padding:7px 15px;
margin-top: 10px;
}
button:hover,
button:active {
color:#fff;
text-decoration:none;
text-shadow:0 -1px 0 rgba(0,0,0,0.25);
background-color:#3072b3;
background-image:linear-gradient(#599bcd,#3072b3);
background-repeat:repeat-x;
border-color:#2a65a0;
} }
.clear { .clear {
...@@ -86,7 +127,7 @@ input:focus { ...@@ -86,7 +127,7 @@ input:focus {
display: none; display: none;
} }
.icon { .main .icon {
position: absolute; position: absolute;
right: 0px; right: 0px;
top: 0px; top: 0px;
...@@ -141,17 +182,10 @@ input:focus { ...@@ -141,17 +182,10 @@ input:focus {
text-decoration: none; text-decoration: none;
} }
.main ul {
margin-bottom: 73px;
}
.main li { .main li {
margin: 6px 0 6px 16px; margin: 6px 0 6px 16px;
} }
.main p {
margin: 12px 0;
}
.mian tr { .mian tr {
height: 54px; height: 54px;
...@@ -172,16 +206,17 @@ input:focus { ...@@ -172,16 +206,17 @@ input:focus {
} }
/* start article-pwd */ /* start article-pwd */
.article-pwd > div,
.article-pwd > form {
margin: 0 20px;
}
.article-pwd > div { .article-pwd > div {
margin-bottom: 10px; margin-bottom: 10px;
max-height: 264px; max-height: 264px;
overflow: auto; overflow: auto;
word-wrap: break-word; word-wrap: break-word;
} }
.article-pwd #confirm {
margin-top: 6px;
}
/* end article-pwd */ /* end article-pwd */
/* start 403/404/500 */ /* start 403/404/500 */
...@@ -209,39 +244,53 @@ input:focus { ...@@ -209,39 +244,53 @@ input:focus {
} }
/* end 403/404/500 */ /* end 403/404/500 */
/* start login */
.login table {
margin: 66px auto;
}
/* end login */
/* start kill */ /* start kill */
.kill { .kill img {
position: absolute; position: absolute;
right: 40px; right: 40px;
top: 230px; top: 200px;
}
.kill ul {
margin-bottom: 50px;
}
.kill p {
margin: 12px 20px;
}
.kill span {
margin-left: 20px;
} }
/* end kill */ /* end kill */
/* start init and login */ /* start init */
#init { #init {
position: absolute; position: absolute;
top: 102px; top: 81px;
width: 470px; width: 470px;
} }
#init input {
margin: 5px 0;
padding: 5px 8px;
}
#sys p { #sys p {
height: 166px; height: 166px;
} }
#sys {
padding: 0 20px;
}
#initButton { #initButton {
margin-right: 10px; margin-right: 10px;
} }
#tip { #tip {
color: #21759B; color: #21759B;
float: right;
font-weight: bold; font-weight: bold;
margin-top: 18px; margin-left: 10px;
} }
/* end init and login */ /* end init */
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<title>${welcomeToSoloLabel} B3log Solo!</title> <title>${welcomeToSoloLabel} B3log Solo!</title>
<meta name="keywords" content="GAE 博客,GAE blog,b3log,init" /> <meta name="keywords" content="GAE 博客,GAE blog,b3log,init" />
<meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客,初始化程序" /> <meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客,初始化程序" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" /> <meta name="author" content="B3log Team" />
<meta name="generator" content="B3log" /> <meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" /> <meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" /> <meta name="robots" content="noindex, follow" />
...@@ -81,55 +82,25 @@ ...@@ -81,55 +82,25 @@
</a> </a>
</h2> </h2>
<div id="init"> <div id="init">
<div id="user"> <div id="user" class="form">
<table>
<tr>
<td width="170px">
<label for="userEmail"> <label for="userEmail">
${commentEmail1Label} ${commentEmail1Label}
</label> </label>
</td>
<td>
<input id="userEmail" /> <input id="userEmail" />
</td>
</tr>
<tr>
<td>
<label for="userName"> <label for="userName">
${userName1Label} ${userName1Label}
</label> </label>
</td>
<td>
<input id="userName" /> <input id="userName" />
</td>
</tr>
<tr>
<td>
<label for="userPassword"> <label for="userPassword">
${userPassword1Label} ${userPassword1Label}
</label> </label>
</td>
<td>
<input type="password" id="userPassword" /> <input type="password" id="userPassword" />
</td>
</tr>
<tr>
<td>
<label for="userPasswordConfirm"> <label for="userPasswordConfirm">
${userPasswordConfirm1Label} ${userPasswordConfirm1Label}
</label> </label>
</td>
<td>
<input type="password" id="userPasswordConfirm" /> <input type="password" id="userPasswordConfirm" />
</td>
</tr>
<tr>
<td colspan="2">
<button onclick='getUserInfo();'>${nextStepLabel}</button> <button onclick='getUserInfo();'>${nextStepLabel}</button>
<span id="tip"></span> <span id="tip"></span>
</td>
</tr>
</table>
</div> </div>
<div id="sys" class="none"> <div id="sys" class="none">
${initIntroLabel} ${initIntroLabel}
...@@ -159,7 +130,7 @@ ...@@ -159,7 +130,7 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
var validate = function () { var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, ""); var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) { if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}"); $("#tip").text("${mailInvalidLabel}");
...@@ -180,10 +151,10 @@ ...@@ -180,10 +151,10 @@
return false; return false;
}; };
var getUserInfo = function () { var getUserInfo = function() {
if (validate()) { if (validate()) {
$("#init").animate({ $("#init").animate({
"top": -130 "top": -190
}); });
$("#user").animate({ $("#user").animate({
...@@ -197,9 +168,9 @@ ...@@ -197,9 +168,9 @@
} }
}; };
var returnTo = function () { var returnTo = function() {
$("#init").animate({ $("#init").animate({
"top": 102 "top": 81
}); });
$("#user").animate({ $("#user").animate({
...@@ -208,24 +179,24 @@ ...@@ -208,24 +179,24 @@
$("#sys").animate({ $("#sys").animate({
"opacity": 0 "opacity": 0
}, 800, function () { }, 800, function() {
this.style.display = "none"; this.style.display = "none";
}); });
}; };
var initSys = function () { var initSys = function() {
var requestJSONObject = { var requestJSONObject = {
"userName": $("#userName").val(), "userName": $("#userName").val(),
"userEmail": $("#userEmail").val(), "userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val() "userPassword": $("#userPassword").val()
}; };
if(confirm("${confirmInitLabel}")){ if (confirm("${confirmInitLabel}")) {
$.ajax({ $.ajax({
url: "${contextPath}/init", url: "${contextPath}/init",
type: "POST", type: "POST",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){ success: function(result, textStatus) {
if (!result.sc) { if (!result.sc) {
alert(result.msg); alert(result.msg);
return; return;
...@@ -237,16 +208,16 @@ ...@@ -237,16 +208,16 @@
} }
}; };
(function () { (function() {
try { try {
$("#userEmail").focus(); $("#userEmail").focus();
$("input").keypress(function (event) { $("input").keypress(function(event) {
if (event.keyCode === 13) { if (event.keyCode === 13) {
event.preventDefault(); event.preventDefault();
} }
}); });
$("#userPasswordConfirm").keypress(function (event) { $("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) { if (event.keyCode === 13) {
getUserInfo(); getUserInfo();
} }
......
...@@ -3258,11 +3258,18 @@ admin.userList = { ...@@ -3258,11 +3258,18 @@ admin.userList = {
userData[i].isAdmin = "&nbsp;" + Label.administratorLabel; userData[i].isAdmin = "&nbsp;" + Label.administratorLabel;
userData[i].expendRow = "<a href='javascript:void(0)' onclick=\"admin.userList.get('" + userData[i].expendRow = "<a href='javascript:void(0)' onclick=\"admin.userList.get('" +
users[i].oId + "', '" + users[i].userRole + "')\">" + Label.updateLabel + "</a>"; users[i].oId + "', '" + users[i].userRole + "')\">" + Label.updateLabel + "</a>";
} else { } else if ("defaultRole" === users[i].userRole) {
userData[i].expendRow = "<a href='javascript:void(0)' onclick=\"admin.userList.get('" + userData[i].expendRow = "<a href='javascript:void(0)' onclick=\"admin.userList.get('" +
users[i].oId + "', '" + users[i].userRole + "')\">" + Label.updateLabel + "</a>\ users[i].oId + "', '" + users[i].userRole + "')\">" + Label.updateLabel + "</a>\
<a href='javascript:void(0)' onclick=\"admin.userList.del('" + users[i].oId + "', '" + users[i].userName + "')\">" + Label.removeLabel + "</a>"; <a href='javascript:void(0)' onclick=\"admin.userList.del('" + users[i].oId + "', '" + users[i].userName + "')\">" + Label.removeLabel + "</a>" +
"<a href='javascript:void(0)' onclick=\"admin.userList.changeRole('" + users[i].oId + "')\">" + "ChangeRole" + "</a>";
userData[i].isAdmin = Label.commonUserLabel; userData[i].isAdmin = Label.commonUserLabel;
} else {
userData[i].expendRow = "<a href='javascript:void(0)' onclick=\"admin.userList.get('" +
users[i].oId + "', '" + users[i].userRole + "')\">" + Label.updateLabel + "</a>\
<a href='javascript:void(0)' onclick=\"admin.userList.del('" + users[i].oId + "', '" + users[i].userName + "')\">" + Label.removeLabel + "</a>" +
"<a href='javascript:void(0)' onclick=\"admin.userList.changeRole('" + users[i].oId + "')\">" + "ChangeRole" + "</a>";
userData[i].isAdmin = Label.visitorUserLabel;
} }
} }
...@@ -3435,6 +3442,39 @@ admin.userList = { ...@@ -3435,6 +3442,39 @@ admin.userList = {
} }
}, },
/**
* 修改角色
* @param id
*/
changeRole : function(id){
$.ajax({
url: latkeConfig.servePath + "/console/changeRole/" + id,
type: "GET",
cache: false,
success: function(result, textStatus){
$("#tipMsg").text(result.msg);
if (!result.sc) {
$("#loadMsg").text("");
return;
}
var pageNum = admin.userList.pageInfo.currentPage;
if (admin.userList.pageInfo.currentCount === 1 && admin.userList.pageInfo.pageCount !== 1 &&
admin.userList.pageInfo.currentPage === admin.userList.pageInfo.pageCount) {
admin.userList.pageInfo.pageCount--;
pageNum = admin.userList.pageInfo.pageCount;
}
var hashList = window.location.hash.split("/");
if (pageNum !== parseInt(hashList[hashList.length - 1])) {
admin.setHashByPage(pageNum);
}
admin.userList.getList(pageNum);
$("#loadMsg").text("");
}
});
},
/* /*
* 验证字段 * 验证字段
* @status 更新或者添加时进行验证 * @status 更新或者添加时进行验证
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<title>${blogTitle}</title> <title>${blogTitle}</title>
<meta name="keywords" content="GAE 博客,blog,b3log,kill IE6" /> <meta name="keywords" content="GAE 博客,blog,b3log,kill IE6" />
<meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客,Let's kill IE6" /> <meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客,Let's kill IE6" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" /> <meta name="author" content="B3log Team" />
<meta name="generator" content="B3log" /> <meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" /> <meta name="revised" content="B3log, ${year}" />
<meta http-equiv="Window-target" content="_top" /> <meta http-equiv="Window-target" content="_top" />
...@@ -22,9 +23,9 @@ ...@@ -22,9 +23,9 @@
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/> <img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a> </a>
</div> </div>
<div class="main"> <div class="main kill">
${killBrowserLabel} ${killBrowserLabel}
<img class="kill" src='${staticServePath}/images/kill-browser.png' title='Kill IE6' alt='Kill IE6'/> <img src='${staticServePath}/images/kill-browser.png' title='Kill IE6' alt='Kill IE6'/>
<a href="http://b3log.org" target="_blank"> <a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/> <img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a> </a>
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<title>${welcomeToSoloLabel} B3log Solo!</title> <title>${welcomeToSoloLabel} B3log Solo!</title>
<meta name="keywords" content="GAE 博客,GAE blog,b3log" /> <meta name="keywords" content="GAE 博客,GAE blog,b3log" />
<meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客" /> <meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" /> <meta name="author" content="B3log Team" />
<meta name="generator" content="B3log" /> <meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" /> <meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" /> <meta name="robots" content="noindex, follow" />
...@@ -23,42 +24,22 @@ ...@@ -23,42 +24,22 @@
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/> <img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a> </a>
</div> </div>
<div class="main login"> <div class="main">
<h2> <h2>
<span>${welcomeToSoloLabel}</span> ${loginLabel}
<a target="_blank" href="http://b3log.org">
${b3logLabel}
<span class="solo">&nbsp;Solo</span>
</a>
</h2> </h2>
<table> <div class="form">
<tr>
<td width="60px">
<label for="userEmail"> <label for="userEmail">
${commentEmail1Label} ${commentEmailLabel}
</label> </label>
</td>
<td>
<input id="userEmail" /> <input id="userEmail" />
</td>
</tr>
<tr>
<td>
<label for="userPassword"> <label for="userPassword">
${userPassword1Label} ${userPasswordLabel} <a href="/forgot">(${forgotLabel})</a>
</label> </label>
</td>
<td>
<input type="password" id="userPassword" /> <input type="password" id="userPassword" />
</td>
</tr>
<tr>
<td colspan="2">
<button onclick='login();'>${loginLabel}</button> <button onclick='login();'>${loginLabel}</button>
<span id="tip"></span> <span id="tip"></span>
</td> </div>
</tr>
</table>
<a href="http://b3log.org" target="_blank"> <a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/> <img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a> </a>
...@@ -79,10 +60,10 @@ ...@@ -79,10 +60,10 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
(function () { (function() {
$("#userEmail").focus(); $("#userEmail").focus();
$("#userPassword, #userEmail").keypress(function (event) { $("#userPassword, #userEmail").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed if (13 === event.keyCode) { // Enter pressed
login(); login();
} }
...@@ -96,7 +77,7 @@ ...@@ -96,7 +77,7 @@
} }
})(); })();
var login = function () { var login = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) { if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) {
$("#tip").text("${mailInvalidLabel}"); $("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus(); $("#userEmail").focus();
...@@ -119,10 +100,10 @@ ...@@ -119,10 +100,10 @@
type: "POST", type: "POST",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
error: function(){ error: function() {
// alert("Login error!"); // alert("Login error!");
}, },
success: function(data, textStatus){ success: function(data, textStatus) {
if (!data.isLoggedIn) { if (!data.isLoggedIn) {
$("#tip").text(data.msg); $("#tip").text(data.msg);
return; return;
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<title>${blogTitle}</title> <title>${blogTitle}</title>
<meta name="keywords" content="GAE 博客,blog,b3log,kill IE6" /> <meta name="keywords" content="GAE 博客,blog,b3log,kill IE6" />
<meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客,Let's kill IE6" /> <meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客,Let's kill IE6" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" /> <meta name="author" content="B3log Team" />
<meta name="generator" content="B3log" /> <meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" /> <meta name="revised" content="B3log, ${year}" />
<meta http-equiv="Window-target" content="_top" /> <meta http-equiv="Window-target" content="_top" />
...@@ -100,7 +101,7 @@ ...@@ -100,7 +101,7 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
var validate = function () { var validate = function() {
var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, ""); var userName = $("#userName").val().replace(/(^\s*)|(\s*$)/g, "");
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) { if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail").val())) {
$("#tip").text("${mailInvalidLabel}"); $("#tip").text("${mailInvalidLabel}");
...@@ -121,7 +122,7 @@ ...@@ -121,7 +122,7 @@
return false; return false;
}; };
var getUserInfo = function () { var getUserInfo = function() {
if (validate()) { if (validate()) {
var requestJSONObject = { var requestJSONObject = {
"userName": $("#userName").val(), "userName": $("#userName").val(),
...@@ -133,12 +134,12 @@ ...@@ -133,12 +134,12 @@
type: "POST", type: "POST",
cache: false, cache: false,
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
success: function(result, textStatus){ success: function(result, textStatus) {
$("#tip").text(result.msg); $("#tip").text(result.msg);
if (!result.sc) { if (!result.sc) {
return; return;
} }
setTimeout(function(){ setTimeout(function() {
window.location.href = "${servePath}"; window.location.href = "${servePath}";
}, 1000); }, 1000);
} }
...@@ -146,8 +147,8 @@ ...@@ -146,8 +147,8 @@
} }
} }
$(function(){ $(function() {
$("#userPasswordConfirm").keypress(function (event) { $("#userPasswordConfirm").keypress(function(event) {
if (event.keyCode === 13) { if (event.keyCode === 13) {
getUserInfo(); getUserInfo();
} }
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<title>${welcomeToSoloLabel} B3log Solo!</title> <title>${welcomeToSoloLabel} B3log Solo!</title>
<meta name="keywords" content="GAE 博客,GAE blog,b3log" /> <meta name="keywords" content="GAE 博客,GAE blog,b3log" />
<meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客" /> <meta name="description" content="An open source blog based on GAE Java,GAE Java 开源博客" />
<meta name="owner" content="B3log Team" />
<meta name="author" content="B3log Team" /> <meta name="author" content="B3log Team" />
<meta name="generator" content="B3log" /> <meta name="generator" content="B3log Solo" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta name="revised" content="B3log, ${year}" /> <meta name="revised" content="B3log, ${year}" />
<meta name="robots" content="noindex, follow" /> <meta name="robots" content="noindex, follow" />
...@@ -23,32 +24,19 @@ ...@@ -23,32 +24,19 @@
<img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/> <img border="0" width="153" height="56" alt="B3log" title="B3log" src="${staticServePath}/images/logo.jpg"/>
</a> </a>
</div> </div>
<div class="main login"> <div class="main">
<h2> <h2>
<span>${welcomeToSoloLabel}</span> ${forgotLabel}
<a target="_blank" href="http://b3log.org">
${b3logLabel}
<span class="solo">&nbsp;Solo</span>
</a>
</h2> </h2>
<table> <div class="form">
<tr>
<td width="60px">
<label for="userEmail"> <label for="userEmail">
${commentEmail1Label} ${commentEmailLabel}
</label> </label>
</td>
<td>
<input id="userEmail" /> <input id="userEmail" />
</td>
</tr>
<tr>
<td colspan="2">
<button onclick='forgot();'>${sendLabel}</button> <button onclick='forgot();'>${sendLabel}</button>
<span id="tip"></span> <span id="tip"></span>
</td> </div>
</tr>
</table>
<a href="http://b3log.org" target="_blank"> <a href="http://b3log.org" target="_blank">
<img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/> <img border="0" class="icon" alt="B3log" title="B3log" src="${staticServePath}/favicon.png"/>
</a> </a>
...@@ -69,10 +57,10 @@ ...@@ -69,10 +57,10 @@
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
(function () { (function() {
$("#userEmail").focus(); $("#userEmail").focus();
$("#userEmail").keypress(function (event) { $("#userEmail").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed if (13 === event.keyCode) { // Enter pressed
forgot(); forgot();
} }
...@@ -86,7 +74,7 @@ ...@@ -86,7 +74,7 @@
} }
})(); })();
var forgot = function () { var forgot = function() {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) { if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#userEmail" + status).val())) {
$("#tip").text("${mailInvalidLabel}"); $("#tip").text("${mailInvalidLabel}");
$("#userEmail").focus(); $("#userEmail").focus();
...@@ -102,13 +90,15 @@ ...@@ -102,13 +90,15 @@
type: "POST", type: "POST",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
error: function(){ error: function() {
// alert("reset password error!"); // alert("reset password error!");
}, },
success: function(data, textStatus){ success: function(data, textStatus) {
$("#tip").text(data.msg); $("#tip").text(data.msg);
if (data.succeed) { if (data.succeed) {
setTimeout(function() { window.location.href = data.to; }, 3000); setTimeout(function() {
window.location.href = data.to;
}, 3000);
} }
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment