样式调整

This commit is contained in:
wangwenrui
2018-12-25 20:12:01 +08:00
parent 29fdc28c23
commit 35c9c2e74a
2 changed files with 190 additions and 4 deletions

View File

@@ -108,12 +108,12 @@
<li class="dropdown"><a class="btn dropdown-toggle"
data-toggle="dropdown" href="javaScript:void(0)"> <i
data-toggle="dropdown" href="javaScript:void(0)" > <i
class="halflings-icon white user"></i> #(session.loginUser.login_name)<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<ul class="dropdown-menu" style="width: 180px;">
<li class="dropdown-menu-title" style="height:25px">
<a href="/toResetPwd" class="international-a" style="width:100%" target="rightiFrame">
<a href="/toResetPwd" class="international-a" style="width:93.5%" target="rightiFrame">
<span>#(_res.get("reset.password"))</span>
<i class='icon-edit'></i>
</a>
@@ -121,7 +121,7 @@
</li>
<li class="dropdown-menu-title" style="height:25px">
<a href="/exit" class="international-a" style="width:100%">
<a href="/exit" class="international-a" style="width:93.5%">
<span>#(_res.get("exit.system"))</span>
<i class='icon-off'></i>
</a>

186
gloam/WebRoot/resetPwd.html Normal file
View File

@@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="en">
<head>
#include("/common/header.html")
<link id="bootstrap-style" href="/css/chart.css" rel="stylesheet">
<script type="text/javascript">
$(function() {
var updateMsg = $("#updateMsg").val();
if (updateMsg != null && updateMsg != '') { //获取更新后提示信息
if (updateMsg == "success") {
alert("i18n_resetPwd.text.pwdUpdateSuccess_n81i");
window.location.href = "/exit";
} else {
alert(updateMsg);
window.location.href = "/exit";
}
}
//$("#pwd,#repwd,#button").prop("style", "display:none;");
$("#mysub").attr("disabled", "disabled");
$("#oldpwdin").focus();
$("#oldpwdin").blur(function() {
validatePwd();
});
document.onkeydown=function(event){
var e = event || window.event || arguments.callee.caller.arguments[0];
if(e && e.keyCode==13){ // enter 键
validatePwd();
}
};
function validatePwd() {
var oldpwd = $(oldpwdin).val();
if (oldpwd == null || oldpwd == "") {
$("#oldpwdMsg").html('<font style="color:red;font-size: 12px;">i18n_resetPwd.text.pwdIsNull_n81i</font>');
} else {
$.ajax({//验证密码
type : "POST",
url : "/validatePwd",
data : "oldpwd=" + oldpwd,
dataType : "json",
success : function(data) {
$("#oldpwdMsg").html("");
var msg = data.validateMsg;
if (msg != null && msg == 'success') {
//$("#oldpwd").prop("style", "display:none;");
//$("#pwd,#repwd,#button").prop("style","display;");
$("#oldpwdMsg").html("<img src='/img/yes.gif' style='height: 12px'/></br></br>");
$("#mysub").attr("disabled", "disabled");
} else if (msg != null && msg == "faild") {
alert("i18n_LoginController.text.userValidateErr_n81i");
window.location.href = "/exit";
} else {
$("#oldpwdMsg").html('<font style="color:red;font-size: 12px;">i18n_resetPwd.text.pwdErr_n81i</br></font>');
}
}
});
}
}
$("#newPwd").blur(function() {
$("#pwdMsg").html("");
var newPwd = $("#newPwd").val().trim();
//var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
var reg=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/;
if (!reg.test(newPwd)) {
$("#pwdMsg").html('<font style="color:red;font-size: 12px;">i18n_resetPwd.text.pwdFormat_n81i</br></font>');
$("#mysub").attr("disabled", "disabled");
} else {
$("#pwdMsg").html("<img src='/img/yes.gif' style='height: 12px'/></br>");
}
});
$("#reNewPwd").blur(
function() {
$("#repwdMsg").html("");
var pwd = $("#newPwd").val().trim();
var repwd = $("#reNewPwd").val().trim();
if (pwd == null || pwd == "" || repwd == null
|| repwd == '' || pwd != repwd) {
$("#repwdMsg").html('<font style="color:red;font-size: 12px;">i18n_resetPwd.text.notSame_n81i</br></font>');
$("#mysub").attr("disabled", "disabled");
} else {
$("#repwdMsg").html("<img src='/img/yes.gif' style='height: 12px'/></br>");
$("#mysub").removeAttr("disabled");
}
});
});
function submit() {
$("#pwdForm").submit();
}
</script>
</head>
<body class="bcColor noScroll-y aC">
<!--中间部分右边开始-->
<div class="container-fluid-full">
<div class="row-fluid">
<noscript>
<div class="alert alert-block span10">
<h4 class="alert-heading">Warning!</h4>
<p>
You need to have <a href="http://en.wikipedia.org/wiki/JavaScript"
target="_blank">JavaScript</a> enabled to use this site.
</p>
</div>
</noscript>
<!-- start: Content -->
<div id="content" class="span10">
<div class="row-fluid " style="margin-top: 10px">
<div class="box span12">
<div class="box-header" data-original-title>
<h2>
<i class=" halflings-icon align-justify"></i><span class="break"></span>
</h2>
</div>
<div class="box-content lianxiang">
<input type="hidden" name="updateMsg" value="#(updateMsg)"
id="updateMsg" />
<form class="form-horizontal" action="/resetPwd" method="post"
id="pwdForm">
<table id="info" style="margin:auto 250px">
<tbody>
<tr id="oldpwd">
<td>
<div class="control-group">
<label class="control-label" for="selectError3">i18n_resetPwd.text.inputPwd_n81i</label>
<div class="controls">
<input type="password" name="oldpassword" id="oldpwdin"
value="" />
</div>
</div>
</td>
<td width="400px" ><span id='oldpwdMsg'></span></td>
</tr>
<tr id="pwd">
<td>
<div class="control-group">
<label class="control-label" for="selectError3">i18n_resetPwd.text.inputNewPwd_n81i</label>
<div class="controls">
<input type="password" name="password" id="newPwd"
value="" />
</div>
</div>
</td>
<td width="400px" > <span id='pwdMsg'></span></br></td>
</tr>
<tr id="repwd">
<td>
<div class="control-group">
<label class="control-label" for="selectError3">i18n_resetPwd.text.reInputNewPwd_n81i</label>
<div class="controls">
<input type="password" name="repassword" id="reNewPwd" />
</div>
</div>
</td>
<td width="400px" ><span id='repwdMsg' ></span></br></td>
</tr>
<tr id="button">
<td>
<div style="margin-left: 185px">
<button onclick="submit()" id="mysub" type="button"
class="btn btn-primary">i18n_acts.button.submit_n81i</button>
<button type="reset" class="btn">i18n_sp.button.cancel_n81i</button>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>