Commit 5c66731e by Masaru Abe

#12786 1.11.0対応

parent 95342c7f
......@@ -57,7 +57,7 @@ var UserEnvironment = function() {
};
/** check user browser */
function checkBrowser(userAgent) {
if(userAgent.toLowerCase().indexOf("msie") >= 0) {
if(userAgent.toLowerCase().indexOf("msie") >= 0 || userAgent.toLowerCase().indexOf("trident") >= 0) {
return "msie";
}
if(userAgent.toLowerCase().indexOf("firefox") >= 0) {
......
......@@ -161,6 +161,11 @@ var Keys = {
serviceOpt_marking: 'marking',
// Session :事業者オプション(serviceOpt)_一定期間経過後アプリロック:Char(Y:可能, N:不可)
serviceOpt_force_login_periodically: 'force_login_periodically',
// Session :事業者オプション(serviceOpt)_パスワード変更:Char(Y:可能, N:不可)
serviceOpt_change_pw: 'change_pw',
// Session :事業者オプション(serviceOpt)_パスワードポリシー:Integer(0:標準, 1:S社)
serviceOpt_password_policy: 'password_policy',
// Session :共通(common)_コンテンツID:Integer
common_contentId: 'common_contentId',
// Local :共通(common)_コンテンツID:Integer
......@@ -1054,6 +1059,24 @@ var ClientData = {
}
},
// Session :事業者オプション(serviceOpt)_パスワード変更:Char(Y:可能, N:不可)
serviceOpt_change_pw: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.serviceOpt_change_pw, data);
} else {
return SessionStorageUtils.get(Keys.serviceOpt_change_pw);
}
},
// Session :事業者オプション(serviceOpt)_パスワードポリシー:Integer(0:標準, 1:S社)
serviceOpt_password_policy: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(Keys.serviceOpt_password_policy, data);
} else {
return SessionStorageUtils.get(Keys.serviceOpt_password_policy);
}
},
// Session :共通(common)_コンテンツID:Integer
common_contentId: function (data) {
if (arguments.length > 0) {
......
......@@ -35,7 +35,7 @@ $(document).ready(function () {
ClientData.BookmarkScreen(ScreenIds.BookmarkList);
//Check if Force Change password
if(ClientData.requirePasswordChange() != 1){
if(ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N'){
// Synchronize bookmarks with server
SyncContent();
......
......@@ -53,7 +53,7 @@ $(document).ready(function(){
ClientData.BookmarkScreen(ScreenIds.ContentSearch);
//Check if Force Change password
if(ClientData.requirePasswordChange() != 1){
if(ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N'){
//Format text display more record
formatDisplayMoreRecord();
......
......@@ -9,8 +9,6 @@ $(document).ready(function () {
if (!avwCheckLogin(ScreenIds.Login)) return;
// Set event to prevent leave
//avwSetLogoutNortice();
if(ClientData.requirePasswordChange() != 1 ) {
......
......@@ -52,7 +52,7 @@ $(document).ready(function(){
ClientData.BookmarkScreen(ScreenIds.History);
if(ClientData.requirePasswordChange() != 1){
if(ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N'){
if(ClientData.ReadingContentIds() == null || ClientData.ReadingContentIds() == 'undefined' || ClientData.ReadingContentIds().length == 0){
}else{
syncReadingContent();
......
......@@ -59,7 +59,7 @@ $(document).ready(function () {
ClientData.BookmarkScreen(ScreenIds.Home);
//Check if Force Change password
if (ClientData.requirePasswordChange() != 1) {
if (ClientData.requirePasswordChange() != 1 || ClientData.serviceOpt_change_pw() == 'N' ) {
// Register log
RegisterLog();
......
......@@ -24,6 +24,8 @@ var force_pw_change_periodically;
var user_data_backup;
var marking;
var force_login_periodically;
var change_pw;
var password_policy;
var login_errorMessage = "";
//Load login Info
......@@ -230,7 +232,7 @@ function processLogin() {
$('#main-error-message').css('display', 'none');
if (data.requirePasswordChange == 0) {
if (data.requirePasswordChange == 0 || change_pw == 'N' ) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
}
......@@ -488,6 +490,12 @@ function saveServiceUserOption(){
else if(option.serviceName == 'user_data_backup'){
ClientData.serviceOpt_user_data_backup(option.value);
}
else if(option.serviceName == 'change_pw'){
ClientData.serviceOpt_change_pw(option.value);
}
else if(option.serviceName == 'password_policy'){
ClientData.serviceOpt_password_policy(option.value);
}
});
};
......@@ -511,6 +519,13 @@ function getServiceOptionList(){
else if(option.serviceName == 'user_data_backup'){
user_data_backup = option.value;
}
else if(option.serviceName == 'change_pw'){
change_pw = option.value;
}
else if(option.serviceName == 'password_policy'){
password_policy = option.value;
}
});
};
......
......@@ -59,12 +59,15 @@ $(document).ready(function () {
$("#dspOptBk").hide();
}
if ( ClientData.serviceOpt_change_pw() == 'N' ) {
$("#dspPwdUpd").hide();
} else {
// Get flag to determine must change password
avwCmsApi(ClientData.userInfo_accountPath(), "requirePasswordChange", 'GET', { sid: ClientData.userInfo_sid() },
avwCmsApi_requirePasswordChange_success,
null
);
}
// In case: user_data_backup = "Y" -> backup
if (ClientData.serviceOpt_user_data_backup() != "Y") {
......@@ -526,22 +529,19 @@ function dspPwdUpd1_Click(e) {
if (isOK) {
/*
// Check max length
if (!ValidationUtil.CheckMaxLengthForByte(getCurrentPassword(), 16)) {
isOK = false;
}
if (!ValidationUtil.CheckMaxLengthForByte(getNewPassword(), 16)) {
isOK = false;
}
if (!ValidationUtil.CheckMaxLengthForByte(getNewPasswordRe(), 16)) {
isOK = false;
}
// Data type
if (!ValidationUtil.IsAlphabetOrNumberOrSymbol(getCurrentPassword())) {
isOK = false;
}
if (!ValidationUtil.IsAlphabetOrNumberOrSymbol(getNewPassword())) {
......@@ -550,12 +550,9 @@ function dspPwdUpd1_Click(e) {
if (!ValidationUtil.IsAlphabetOrNumberOrSymbol(getNewPasswordRe())) {
isOK = false;
}
*/
var str = getCurrentPassword() + "";
// if (str.contains("_") || str.contains("‐")) {
// isOK = false;
// }
}
// Do changing password
......
......@@ -133,15 +133,15 @@
<span id="dialog-error-message" class="alertTxtDialog lang"> </span>
<dl>
<dt><label id="lblPwdCur" class="lang" lang="txtPwdCurr">現在パスワード</label></dt>
<dd><input type="password" id="txtPwdCur" maxlength="16" /></dd>
<dd><input type="password" id="txtPwdCur" maxlength="128" /></dd>
</dl>
<dl>
<dt><label id="lblPwdNew" class="lang" lang="txtPwdNew">変更パスワード</label></dt>
<dd><input type="password" id="txtPwdNew" maxlength="16" /></dd>
<dd><input type="password" id="txtPwdNew" maxlength="128" /></dd>
</dl>
<dl>
<dt><label id="lblPwdNewRe" class="lang" lang="txtPwdNewRe">(再)変更パスワード</label></dt>
<dd><input type="password" id="txtPwdNewRe" maxlength="16" /></dd>
<dd><input type="password" id="txtPwdNewRe" maxlength="128" /></dd>
</dl>
<p><label class="lang" lang="txtPwdRemind" id="txtChangePassComment">※スキップを選択すると、30日間このメッセージは表示されません</label></p>
<p class="loginbtn"><a class="change lang" href="#" id="dspPwdUpd1" lang="dspChange">変更</a><a class="skip lang" href="#" lang="dspSkip" id="dspSkip">スキップ</a><a class="cancel lang" href="#" lang="dspCancel" id="dspCancel">キャンセル</a></p>
......
......@@ -76,15 +76,15 @@
<dl>
<dt class="lang" lang="txtPwdCurr">現在パスワード:</dt>
<dd><input type="password" id="txtCurrentPass" maxlength="16" /></dd>
<dd><input type="password" id="txtCurrentPass" maxlength="128" /></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNew">変更パスワード:</dt>
<dd><input type="password" id="txtNewPass" maxlength="16"/></dd>
<dd><input type="password" id="txtNewPass" maxlength="128"/></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNewRe">新パスワード(確認):</dt>
<dd><input type="password" id="txtConfirmNew" maxlength="16"/></dd>
<dd><input type="password" id="txtConfirmNew" maxlength="128"/></dd>
</dl>
<p class="lang memory" lang="txtPwdRemind" id="txtPwdRemind" >※スキップを選択すると、30日間このメッセージは表示されません</p>
<p class="loginbtn"><a class="skip lang" id="btnSkip" lang="dspSkip">スキップ</a><a class="change lang" id="btnChange" lang="dspChange">変更</a></p>
......
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