Commit 3debc584 by Masaru Abe

HTMLカスタムログ対応

parent 178f9281
......@@ -430,6 +430,8 @@ function LogEntity() {
this.pageLogArray = [];
// 詳細ログ配列
this.objectLogArray = [];
// カスタムログ配列
this.customLogArray = [];
};
// Entity for PageLog
function PageLogEntity() {
......@@ -455,6 +457,16 @@ function ObjectLogEntity() {
this.locationHeight = "";
this.locationWidth = "";
};
//Entity for CustomLog
function CustomLogEntity() {
this.contentid = "";
this.actionDate = new Date();
this.param1 = "";
this.param2 = "";
this.param3 = "";
this.param4 = "";
this.param5 = "";
};
/*
* Extract memo data from result of API and merge with local memo
......@@ -2479,6 +2491,26 @@ COMMON.SetObjectLogActionTime = function(strContentId, objectId, actionTime) {
};
//カスタムログを作成
COMMON.SetCustomLog = function(strContentId, customLog) {
// オーサリングプレビューなら無視
if (COMMON.isAuthoringPreview()) {
return;
}
var arrContentLogs = ClientData.ContentLogData();
for ( var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
if (arrContentLogs[nIndex].contentid == strContentId) {
// ObjectLog追加
arrContentLogs[nIndex].customLogArray.push(customLog);
}
}
ClientData.ContentLogData(arrContentLogs);
};
/*
* Register reading log of content to server by calling api
*/
......@@ -2499,6 +2531,7 @@ COMMON.RegisterLog = function(is) {
// ページログJSONデータの作成
var pageLogJson = "";
var objectLogJson = "";
var customLogJson = "";
// biz/adモードで詳細ログY か getitsでgetits詳細ログY の場合
if ((ClientData.isGetitsMode() == false && ClientData.serviceOpt_usable_readinglog_object() == 'Y')
......@@ -2608,6 +2641,67 @@ COMMON.RegisterLog = function(is) {
}
//カスタムログが有効な場合
if(ClientData.serviceOpt_html_custom_log() == 'Y'){
var customLogArray = arrContentLogs[nIndex].customLogArray;
// カスタムログオプションが有効ならログデータ作成
if (customLogArray != null && customLogArray.length > 0) {
var lines = [];
var actionDate;
// JSONデータ作成
for ( var nIndex2 = 0; nIndex2 < customLogArray.length; nIndex2++) {
actionDate = new Date(customLogArray[nIndex2].actionDate);
var line = [];
line.push(actionDate.jpDateTimeString1());
if (customLogArray[nIndex2].param1 != null) {
line.push(customLogArray[nIndex2].param1);
} else {
line.push("");
}
if (customLogArray[nIndex2].param2 != null) {
line.push(customLogArray[nIndex2].param2);
} else {
line.push("");
}
if (customLogArray[nIndex2].param3 != null) {
line.push(customLogArray[nIndex2].param3);
} else {
line.push("");
}
if (customLogArray[nIndex2].param4 != null) {
line.push(customLogArray[nIndex2].param4);
} else {
line.push("");
}
if (customLogArray[nIndex2].param5 != null) {
line.push(customLogArray[nIndex2].param5);
} else {
line.push("");
}
lines.push(line);
}
if (lines.length > 0) {
customLogJson = "{ header:[\"actionDate\",\"param1\",\"param2\",\"param3\",\"param4\",\"param5\"],";
customLogJson = customLogJson + "lines:";
customLogJson = customLogJson + JSON.stringify(lines);
customLogJson = customLogJson + "}";
}
}
}
var params = {
sid : ClientData.userInfo_sid(),
contentId : arrContentLogs[nIndex].contentid,
......@@ -2619,6 +2713,7 @@ COMMON.RegisterLog = function(is) {
longitude : arrContentLogs[nIndex].longitude,
pageLog : pageLogJson,
objectLog : objectLogJson,
customLog : customLogJson,
isStreaming : ClientData.isStreamingMode()
};
// API送信結果判定
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta name="viewport" content="">
<title></title>
<link rel="stylesheet" type="text/css" href="common/css/default.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/jquery-ui.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/jquery.toastmessage.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/default.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="common/css/screenLock.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/reset.css?__UPDATEID__" />
<!-- CSSビュー -->
<link rel="stylesheet" type="text/css" href="common/css/jquery.powertip.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/viewer.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/layout/Anket.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="css/delete_shiori.css?__UPDATEID__" />
<script type="text/javascript" src="./common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery-ui-1.8.23.custom.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.ui.touch-punch.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.toastmessage.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/jquery.cookie.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/jquery.treeview.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/jquery.treeview.edit.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./common/js/screenLock.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/avweb.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/uuid.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_OpenUri.js?__UPDATEID__"></script>
<style>
html{
-ms-touch-action : none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
CONTENTVIEW_OPENURI.ready();
});
</script>
</head>
<body id="contentview_openuri" oncontextmenu="return false;">
<div id="ws-body" class="wrapper_ws" >
<div id="main-ws">
</div>
</div>
<div id="viewer" style="display:none;" >
</div>
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
this frame prevents back forward cache
</iframe>
</body>
</html>
\ No newline at end of file
......@@ -11,9 +11,10 @@ CONTENTPREVIEW.ready = function(){
var sid = COMMON.getUrlParam('sid','');
var contentId = COMMON.getUrlParam('contentId','');
var urlPath = COMMON.getUrlParam('urlpath','');
ClientData.userInfo_sid(sid);
ClientData.userInfo_sid_local(sid);
ClientData.userInfo_accountPath(COMMON.getUrlParam('urlpath',''));
ClientData.userInfo_accountPath(urlPath);
ClientData.contentInfo_contentId(contentId);
ClientData.conf_apiUrl( sysSettings.apiUrl );
......
......@@ -2116,12 +2116,11 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html){
//DHカスタム
var linkUrlTmp = resourceUrl;
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
//HTMLカスタムログオプション有り
if(ClientData.serviceOpt_html_custom_log() == 'Y'){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
linkUrlTmp = linkUrlTmp + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl ;
linkUrlTmp = linkUrlTmp + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl + "&cid=" + CONTENTVIEW_GENERAL.contentID;
}
CONTENTVIEW.handleForContentTypeHTML(linkUrlTmp);
}
......@@ -5753,6 +5752,7 @@ CONTENTVIEW.ready = function(initContentId){
getType: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
......@@ -5941,4 +5941,51 @@ CONTENTVIEW.getSessionId = function(){
};
CONTENTVIEW.resvCustomLog = function(param1,param2,param3,param4,param5){
console.log("resvCustomLog:" + param1 + "-" + param2);
//カスタムログ作成
var customLog = new CustomLogEntity();
customLog.contentid = CONTENTVIEW_GENERAL.contentID;
if(param1 == null){
customLog.param1 = "";
} else {
customLog.param1 = param1;
}
if(param2 == null){
customLog.param2 = "";
} else {
customLog.param2 = param2;
}
if(param3 == null){
customLog.param3 = "";
} else {
customLog.param3 = param3;
}
if(param4 == null){
customLog.param4 = "";
} else {
customLog.param4 = param4;
}
if(param5 == null){
customLog.param5 = "";
} else {
customLog.param5 = param5;
}
COMMON.SetCustomLog(CONTENTVIEW_GENERAL.contentID, customLog);
};
window.addEventListener("message", receiveSize, false);
function receiveSize(e) {
//if (e.origin === "http://hogehoge.com") // for security: set this to the domain of the iframe - use e.uri if you need more specificity
// document.getElementById("bar").style.height = e.data + "px";
console.log("receiveSize:" + e.data);
};
......@@ -1788,12 +1788,16 @@ CONTENTVIEW_CREATEOBJECT.linkURL = function (mediaType, actionType, id, imageUrl
//---
var linkUrlTmp = linkUrl;
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
//HTMLカスタムログオプション有り
if(ClientData.serviceOpt_html_custom_log() == 'Y'){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
linkUrlTmp = linkUrlTmp + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl ;
linkUrlTmp = linkUrlTmp + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl + "&cid=" + CONTENTVIEW_GENERAL.contentID;
}
//モバイル&getitsなら強制的にWindowOpen
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode() ) {
browserType = 1;
}
if( browserType == 0 ){
CONTENTVIEW_CREATEOBJECT.showHtml(linkUrlTmp, objectId );
CONTENTVIEW_GENERAL.showDialog(true);
......
......@@ -324,10 +324,10 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
//HTMLカスタムログオプション有り
if(ClientData.serviceOpt_html_custom_log() == 'Y'){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
resourceUrl = resourceUrl + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl ;
resourceUrl = resourceUrl + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl + "&cid=" + CONTENTVIEW_GENERAL.contentID;
}
break;
}
......@@ -766,10 +766,10 @@ CONTENTVIEW_GETDATA.getMediaType9 = function(iValueObj) {
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
//HTMLカスタムログオプション有り
if(ClientData.serviceOpt_html_custom_log() == 'Y'){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
resourceUrl = resourceUrl + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl ;
resourceUrl = resourceUrl + "?sid=" + CONTENTVIEW.getSessionId() + "&apiurl=" + apiUrl + "&cid=" + CONTENTVIEW_GENERAL.contentID;
}
break;
}
......
//名前空間用のオブジェクトを用意する
var CONTENTVIEW_OPENURI = {};
CONTENTVIEW_OPENURI.ready = function(){
//ビューア、共有表示パーツ読み込み
$("#viewer").load("./inc_contentview.html?__UPDATEID__", function (myData, myStatus, xhr){
//読み込み完了時の処理
I18N.i18nReplaceText();
});
setTimeout(function(){
CONTENTVIEW_OPENURI.showContentView();
}, 200);
};
CONTENTVIEW_OPENURI.showContentView = function(){
$("#ws-body").hide();
//$("#topcontrol").hide();
CONTENTVIEW_INITOBJECT.clearViewerComponent();
CONTENTVIEW.cssInit();
$("#viewer").show();
CONTENTVIEW.ready();
};
$("document").ready(function () {
//CONTENTVIEW_OPENURI.ready();
});
......@@ -30,7 +30,7 @@ html,body{
}
body{
background:#088A68;
background:#088A68;
}
/*----------------------------*/
......@@ -59,7 +59,7 @@ background:#088A68;
.wrapper {
}
#main{
#main-ws{
}
a
......@@ -130,7 +130,7 @@ section a.loginbtn:hover {
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#23486F', endColorstr='#36638B');
background-color:#36638B;
}
#login .wrapper #main article section a.loginbtn:active {
#login .wrapper #main-ws article section a.loginbtn:active {
}
section .loginbtn a:not(:target) {
......@@ -175,11 +175,11 @@ section .loginbtn a:hover:not(:target) {
font-size: 14px;
font-weight: bolder;
}
#login .wrapper #main article section table tr td input {
#login .wrapper #main-ws article section table tr td input {
}
#login article section table tr th,#login article section table tr td {
}
#login .wrapper #main article section table {
#login .wrapper #main-ws article section table {
border-bottom:dotted 1px #BBBBBB;
}
......@@ -187,7 +187,7 @@ section .loginbtn a:hover:not(:target) {
background: url(../../img/login/login_border.jpg) top repeat-x;
opacity:0;
}
#login .wrapper #main article img {
#login .wrapper #main-ws article img {
}
#loader {
}
......@@ -196,13 +196,12 @@ section .loginbtn a:hover:not(:target) {
background-color: #000;
opacity: 0.3;
}
#login .wrapper #main article ul {
#login .wrapper #main-ws article ul {
}
#login .wrapper #main article li {
#login .wrapper #main-ws article li {
}
/* footer */
footer{
background-color: #EDF2F2;
......@@ -215,7 +214,7 @@ footer{
.focus{ color: #969696;}
#user_change footer .border .cnt_footer img { }
#login .wrapper #main article section .error {
#login .wrapper #main-ws article section .error {
font-size: 13px;
color: #FF0000;
font-weight: bolder;
......@@ -236,3 +235,4 @@ footer{
#logologin
{
}
......@@ -11,27 +11,25 @@
<title></title>
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/common.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/theme/common.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery-ui.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery.toastmessage.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/theme/login.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login_validation.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/theme/login_validation.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/limit_access.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/theme/limit_access.css?#UPDATEID#" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/theme/common.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery-ui.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/common/css/jquery.toastmessage.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login_validation.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/limit_access.css?__UPDATEID__" />
<link rel="stylesheet" type="text/css" href="./abvw/css/layout/login_getits.css?__UPDATEID__" />
<script type="text/javascript" src="./abvw/common/js/jquery-1.8.1.min.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/thickbox.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/jquery-ui-1.8.23.custom.min.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/jquery.toastmessage.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/screenLock.js?#UPDATEID#" ></script>
<script type="text/javascript" src="./abvw/common/js/avweb.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/i18n.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/common.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/js/Limit_Access_Content.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/js/login.js?#UPDATEID#"></script>
<script type="text/javascript" src="./abvw/common/js/jquery-1.8.1.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/thickbox.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/jquery-ui-1.8.23.custom.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/jquery.toastmessage.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/screenLock.js?__UPDATEID__" ></script>
<script type="text/javascript" src="./abvw/common/js/avweb.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/Limit_Access_Content.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/login.js?__UPDATEID__"></script>
<!--[if gte IE 9]>
<style type="text/css">
......@@ -58,7 +56,7 @@
<div id="loader"><img src="./abvw/img/login/loading_icon.gif" width="200" height="200"></div>
<div id="fade"></div>
<div class="wrapper">
<div id="main">
<div id="main-ws">
<!--
<ul class="floatR" id="menu-language"><li class="language"><a id="language-ja"><img src="./abvw/img/common/flg_jpn.png" width="29" height="20"></a></li><li class="language"><a id="language-en"><img src="./abvw/img/common/flg_usa.png" width="29" height="20"></a></li><li class="language"><a id="language-ko"><img src="./abvw/img/common/flg_kor.png" width="29" height="20"></a></li></ul>
-->
......
......@@ -38,18 +38,6 @@
<![endif]-->
<script type="text/javascript">
//$('head').append(
// '<style type="text/css">#container { display: none; } #fade, #loader { display: block; }</style>'
//);
//jQuery.event.add(window,"load",function() { // 全ての読み込み完了後に呼ばれる関数
// var pageH = $("#container").height();
// console.log("pageH:" + pageH);
//
// $("#fade").css("height", pageH).delay(900).fadeOut(800);
// $("#loader").delay(600).fadeOut(300);
// $("#container").css("display", "block");
//});
$(document).ready(function(){
LOGIN.ready();
});
......
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