Commit cbb8b243 by Masaru Abe

ログイン有りでのOpenUrl対応

parent 290f3c6e
......@@ -190,50 +190,47 @@ $(document).ready(function () {
checkForceChangePassword();
}
//日比谷用設定ボタン隠す
$('#dspHibiya').hide();
//カタログエディション対応判定
if( ClientData.serviceOpt_catalog_edition() == 'Y'){
$('.tabUnit').hide();
//センタリングするようサイズ調整
$('#main').width(660);
} else {
$('.tabUnit').show();
}
// hide tab group with user anonymous
if (isAnonymousLogin()) {
//カタログエディション対応判定
if( ClientData.serviceOpt_catalog_edition() == 'Y'){
$('.tabUnit').hide();
//センタリングするようサイズ調整
$('#main').width(660);
} else {
$('.tabUnit').show();
$('.switchingTab .colright').hide();
}
//日比谷対応判定
if( ClientData.serviceOpt_hibiyakadan_catalog() == 'Y'){
$('#dspHibiya').show();
jQuery( '#dlgAddMemberGroup' ).dialog( {
autoOpen: false,
modal: true,
width: 350
});
$('#dspHibiya').click(dspHibiyaClickFunction);
$('#btnAddMemberGroupSearch').click(btnAddMemberGroupSearchClickFunction);
} else {
$('#dspHibiya').hide();
}
//プッシュメッセージ隠す
$('#dspPushMessage').hide();
//グループ選択隠す
$('.switchingTab .colright').hide();
//プッシュメッセージ隠す
$('#dspPushMessage').hide();
//日比谷対応判定
if( ClientData.serviceOpt_hibiyakadan_catalog() == 'Y'){
$('#dspHibiya').show();
jQuery( '#dlgAddMemberGroup' ).dialog( {
autoOpen: false,
modal: true,
width: 350
});
$('#dspHibiya').click(dspHibiyaClickFunction);
$('#btnAddMemberGroupSearch').click(btnAddMemberGroupSearchClickFunction);
}
} else {
$('.tabUnit').show();
//$('.tabUnit').show();
$('.switchingTab .colright').show();
}
}
// set scroll for tree view with IE9 on win7
var ua = window.navigator.userAgent.toLowerCase();
if (/msie 9.0/.test(ua) && /windows nt 6.1/.test(ua) && !/tablet/.test(ua)) {
$('.tab_bg_color').css({ "overflow-x": "scroll" });
}
//if (isIE9()) {
// $('.tab_bg_color').css({ "overflow-x": "scroll" });
//}
});
......
......@@ -187,6 +187,9 @@ function processLogin() {
var sysSettings = avwSysSetting();
var apiLoginUrl = sysSettings.apiLoginUrl;
//引数パラメータがあれば取得
var paramContentID = login.getUrlParams('cid');
avwCmsApiWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params, function (data) {
requirePasswordChange = data.requirePasswordChange;
userinfo_sid = data.sid;
......@@ -206,7 +209,15 @@ function processLogin() {
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
//OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
else if (data.requirePasswordChange == 1) {
......@@ -232,8 +243,16 @@ function processLogin() {
var skpPwdDt = new Date(skipPwdDate);
var numDay = date.subtractByDays(skpPwdDt);
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
//OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
else if (numDay > 30) {
OpenChangePasswordDialog();
......@@ -244,7 +263,15 @@ function processLogin() {
}
else { // no need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
//OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
}
else if (data.requirePasswordChange == 2) {
......@@ -265,7 +292,15 @@ function processLogin() {
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
//OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
else if (numDay > 30) {
OpenChangePasswordDialog();
......@@ -280,7 +315,14 @@ function processLogin() {
}
else { // No need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
avwScreenMove("abvw/" + ScreenIds.Home);
//OpenUrlでコンテンツ開く場合
if( paramContentID != '' ){
login.showContentViewByOpenUrl(paramContentID);
} else {
//ホームへ移動
avwScreenMove("abvw/" + ScreenIds.Home);
}
}
}
}
......@@ -289,19 +331,8 @@ function processLogin() {
$('#main-error-message').html(format(i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show();
// $('#main-error-message').attr('lang', 'msgLoginErrWrong');
// //$('#main-error-message').html(i18nText('msgLoginErrWrong'));
// //alert($('#main-error-message').html());
// $('#main-error-message').css('display', 'block');
// if (ClientData.userInfo_language() != null) {
// changeLanguage(ClientData.userInfo_language());
// }
// else {
// changeLanguage(Consts.ConstLanguage_Ja);
// }
}
}, function (xhr, statusText, errorThrown) {
if (xhr.responseText && xhr.status != 0) {
login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
......@@ -453,7 +484,22 @@ function saveServiceUserOption(){
}
else if (option.serviceName == 'web_screen_lock_wait') {
ClientData.serviceOpt_web_screen_lock_wait(option.value);
}
else if( option.serviceName == 'catalog_edition' ) {
ClientData.serviceOpt_catalog_edition(option.value);
}
else if( option.serviceName == 'hibiyakadan_catalog' ) {
ClientData.serviceOpt_hibiyakadan_catalog(option.value);
}
else if( option.serviceName == 'usable_readinglog_gps' ) {
ClientData.serviceOpt_usable_readinglog_gps(option.value);
}
else if( option.serviceName == 'usable_readinglog_object' ) {
ClientData.serviceOpt_usable_readinglog_object(option.value);
}
});
};
......@@ -476,7 +522,8 @@ function getServiceOptionList(){
}
else if(option.serviceName == 'user_data_backup'){
user_data_backup = option.value;
}
}
});
};
......@@ -567,6 +614,7 @@ function initLoginAnonymousUser() {
};
avwCmsApiWithUrl(sysSettings.apiLoginUrl, null, 'webClientAnonymousLogin', 'post', params, function (data) {
if (data.result == 'success') {
//clear session of old anonymous user
......@@ -600,19 +648,20 @@ function initLoginAnonymousUser() {
optionList = data.serviceOptionList;
// save service user option
$.each(data.serviceOptionList, function (i, option) {
if (option.serviceName == 'marking') {
ClientData.serviceOpt_marking(option.value);
} else if( option.serviceName == 'catalog_edition' ) {
ClientData.serviceOpt_catalog_edition(option.value);
} else if( option.serviceName == 'hibiyakadan_catalog' ) {
ClientData.serviceOpt_hibiyakadan_catalog(option.value);
} else if( option.serviceName == 'usable_readinglog_gps' ) {
ClientData.serviceOpt_usable_readinglog_gps(option.value);
} else if( option.serviceName == 'usable_readinglog_object' ) {
ClientData.serviceOpt_usable_readinglog_object(option.value);
}
});
saveServiceUserOption();
//$.each(data.serviceOptionList, function (i, option) {
// if (option.serviceName == 'marking') {
// ClientData.serviceOpt_marking(option.value);
// } else if( option.serviceName == 'catalog_edition' ) {
// ClientData.serviceOpt_catalog_edition(option.value);
// } else if( option.serviceName == 'hibiyakadan_catalog' ) {
// ClientData.serviceOpt_hibiyakadan_catalog(option.value);
// } else if( option.serviceName == 'usable_readinglog_gps' ) {
// ClientData.serviceOpt_usable_readinglog_gps(option.value);
// } else if( option.serviceName == 'usable_readinglog_object' ) {
// ClientData.serviceOpt_usable_readinglog_object(option.value);
// }
//});
// hide splash screen then move to home page
$('#anonymous').fadeOut('slow', 'swing', function () {
//avwScreenMove("abvw/" + ScreenIds.Home);
......
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