Commit d48d9121 by Masaru Abe

#13000

parent b6e71f20
$(function(){
$('#gotop').hide(); // �f�t�H���g�Ŕ�\���Ƃ���
$('#gotop').hide();
$(window).scroll(function(){
if ($(this).scrollTop() > 100) { // scrollTop() �Ō��݂̃X�N���[����̏�ʒu��擾
$('#gotop').fadeIn(); // 100��߂��Ă�����A#backToTop�i�߂�{�^���j��t�F�[�h�C��������
if ($(this).scrollTop() > 100) {
$('#gotop').fadeIn();
} 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(){
$('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 = {};
......@@ -581,8 +573,6 @@ $(document).ready(function (e) {
} else if (COMMON.isAnonymousLogin()) {
console.log("COMMON.isAnonymousLogin");
$('#anonymous').show();
setTimeout(
function () {
......@@ -635,11 +625,25 @@ LOGIN.initLoginAnonymousUser = function() {
document.title = i18nText('dspLogin') + ' | ' + i18nText('sysAppTitle');
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 = {
previousSid: null,
loginId: sysSettings.anonymousLoginId,
urlpath: sysSettings.anonymousLoginPath
loginId: loginId,
urlpath: urlPath
};
avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), null, 'webClientAnonymousLogin', 'post', params, function (data) {
......@@ -656,11 +660,11 @@ LOGIN.initLoginAnonymousUser = function() {
//avwCreateUserSession();
// set info user anonymous login
ClientData.userInfo_accountPath(sysSettings.anonymousLoginPath);
ClientData.userInfo_accountPath_session(sysSettings.anonymousLoginPath);
ClientData.userInfo_accountPath(urlPath);
ClientData.userInfo_accountPath_session(urlPath);
ClientData.userInfo_loginId(sysSettings.anonymousLoginId);
ClientData.userInfo_loginId_session(sysSettings.anonymousLoginId);
ClientData.userInfo_loginId(loginId);
ClientData.userInfo_loginId_session(loginId);
ClientData.userInfo_userName(data.userName);
......@@ -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