Commit d48d9121 by Masaru Abe

#13000

parent b6e71f20
$(function(){ $(function(){
$('#gotop').hide(); // �f�t�H���g�Ŕ�\���Ƃ��� $('#gotop').hide();
$(window).scroll(function(){ $(window).scroll(function(){
if ($(this).scrollTop() > 100) { // scrollTop() �Ō��݂̃X�N���[����̏�ʒu��擾 if ($(this).scrollTop() > 100) {
$('#gotop').fadeIn(); // 100��߂��Ă�����A#backToTop�i�߂�{�^���j��t�F�[�h�C�������� $('#gotop').fadeIn();
} else { } else {
$('#gotop').fadeOut(); // ����ȊO�́A�t�F�[�h�A�E�g $('#gotop').fadeOut();
} }
}); });
// �N���b�N���ɃX���[�Y�Ƀy�[�W�㕔�փX�N���[��������
$('#gotop').click(function(){ $('#gotop').click(function(){
$('body,html').animate({ scrollTop: 0 }, 350); $('body,html').animate({ scrollTop: 0 }, 350);
return false; // ���y1�z return false;
}); });
}); });
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
//グローバルの名前空間用のオブジェクトを用意する //グローバルの名前空間用のオブジェクトを用意する
var LOGIN = {}; var LOGIN = {};
...@@ -581,8 +573,6 @@ $(document).ready(function (e) { ...@@ -581,8 +573,6 @@ $(document).ready(function (e) {
} else if (COMMON.isAnonymousLogin()) { } else if (COMMON.isAnonymousLogin()) {
console.log("COMMON.isAnonymousLogin");
$('#anonymous').show(); $('#anonymous').show();
setTimeout( setTimeout(
function () { function () {
...@@ -631,15 +621,29 @@ LOGIN.initLoginNormalUser = function() { ...@@ -631,15 +621,29 @@ LOGIN.initLoginNormalUser = function() {
// init login for anonymous user // init login for anonymous user
LOGIN.initLoginAnonymousUser = function() { LOGIN.initLoginAnonymousUser = function() {
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle'); document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
var sysSettings = avwSysSetting(); // get info in conf.json var sysSettings = avwSysSetting(); // get info in conf.json
var loginId = sysSettings.anonymousLoginId;
var urlPath = sysSettings.anonymousLoginPath;
if( loginId == "" ){
loginId = "nologin";
}
if( urlPath == "" ){
//URLからパース
urlPath = LOGIN.getUrlPath();
if( urlPath == null ){
urlPath = "dmy";
}
}
var params = { var params = {
previousSid: null, previousSid: null,
loginId: sysSettings.anonymousLoginId, loginId: loginId,
urlpath: sysSettings.anonymousLoginPath urlpath: urlPath
}; };
avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), null, 'webClientAnonymousLogin', 'post', params, function (data) { avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), null, 'webClientAnonymousLogin', 'post', params, function (data) {
...@@ -656,11 +660,11 @@ LOGIN.initLoginAnonymousUser = function() { ...@@ -656,11 +660,11 @@ LOGIN.initLoginAnonymousUser = function() {
//avwCreateUserSession(); //avwCreateUserSession();
// set info user anonymous login // set info user anonymous login
ClientData.userInfo_accountPath(sysSettings.anonymousLoginPath); ClientData.userInfo_accountPath(urlPath);
ClientData.userInfo_accountPath_session(sysSettings.anonymousLoginPath); ClientData.userInfo_accountPath_session(urlPath);
ClientData.userInfo_loginId(sysSettings.anonymousLoginId); ClientData.userInfo_loginId(loginId);
ClientData.userInfo_loginId_session(sysSettings.anonymousLoginId); ClientData.userInfo_loginId_session(loginId);
ClientData.userInfo_userName(data.userName); ClientData.userInfo_userName(data.userName);
...@@ -895,3 +899,17 @@ LOGIN.getUrlParams = function(name){ ...@@ -895,3 +899,17 @@ LOGIN.getUrlParams = function(name){
} }
}; };
//Get urlPath String
LOGIN.getUrlPath = function(){
//URL文字列から事業者ID部分を抽出
var regex = new RegExp( "/webad/([^&#]*)/" );
var results = regex.exec( window.location.href );
if( results == null ){
return "";
}
else{
return results[1];
}
};
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