Commit b574efee by vietdo

#19267 vtour対応

parent d7561b03
......@@ -2395,10 +2395,11 @@ COMMON.SetStartLog = function(strContentId) {
log.longitude = ClientData.longitude();
// PageLog 1ページ目セット(1レコードは必須)
var pageLog = new PageLogEntity();
pageLog.contentid = strContentId;
log.pageLogArray.push(pageLog);
if(CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoMovie){
var pageLog = new PageLogEntity();
pageLog.contentid = strContentId;
log.pageLogArray.push(pageLog);
}
// Add to storage
arrContentLogs.push(log);
}
......@@ -2450,7 +2451,6 @@ COMMON.SetEndLog = function(strContentId) {
// 1ページ分のページ閲覧ログを作成
COMMON.SetPageLog = function(strContentId, strPageNo) {
var arrContentLogs = ClientData.ContentLogData();
for ( var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
......@@ -2459,7 +2459,11 @@ COMMON.SetPageLog = function(strContentId, strPageNo) {
// PageLog追加
var pageLog = new PageLogEntity();
pageLog.contentid = strContentId;
pageLog.pageNo = strPageNo + 1; // 0始まりのページ番号
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){
pageLog.pageNo = strPageNo;
}else{
pageLog.pageNo = strPageNo + 1; // 0始まりのページ番号
}
arrContentLogs[nIndex].pageLogArray.push(pageLog);
}
......@@ -2560,13 +2564,13 @@ COMMON.RegisterLog = function(is) {
var pageLogArray = arrContentLogs[nIndex].pageLogArray;
// 詳細ログオプションが有効ならページ閲覧ログデータ作成
if (pageLogArray != null && pageLogArray.length > 0) {
console.log("pageLogArray.length:"+pageLogArray.length)
var lines = [];
// 終了時間と閲覧時間の設定
var pageLogStart;
var pageLogEnd;
// 2レコード目からチェック
for ( var nIndex2 = 1; nIndex2 < pageLogArray.length; nIndex2++) {
for ( var nIndex2 = 1; nIndex2 < pageLogArray.length; nIndex2++) {console.log("pageLog:"+pageLogArray[nIndex2 - 1].pageNo);
// 一つ前のログの終了日時がnullなら次のレコードの開始日時をセット
if (pageLogArray[nIndex2 - 1].readingEndDate == null) {
pageLogArray[nIndex2 - 1].readingEndDate = pageLogArray[nIndex2].readingStartDate;
......
......@@ -1629,7 +1629,7 @@ CONTENTVIEW.handleFromJumpContent = function() {
if (ClientData.common_prePageNo()) {
CONTENTVIEW_GENERAL.isJumpNotFromFirstPage = true;
CONTENTVIEW.changePageWithoutSlide(CONTENTVIEW.changePageNo(ClientData.common_prePageNo()));
ClientData.common_prePageNo(null)
ClientData.common_prePageNo(null);
}
};
......@@ -1643,10 +1643,15 @@ CONTENTVIEW.oldContent_Back = function() {
/*move to page */
//CONTENTVIEW.changePage(oldContent.oldPageIndex);
CONTENTVIEW.changePageWithoutSlide(oldContent.oldPageIndex);
if(CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoMovie && CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoImage){
CONTENTVIEW.changePageWithoutSlide(oldContent.oldPageIndex);
}
/*remove*/
oldDataBack.splice(oldDataBack.length - 1, 1);
if(oldDataBack.length == 0){
ClientData.common_prePageNo(null);
}
ClientData.JumpQueue(oldDataBack);
ClientData.IsJumpBack(false);
......@@ -2099,12 +2104,29 @@ CONTENTVIEW.displayOverlayForHtmlAndMediaType = function(){
};
//END TRB00075 - Editor: Long - Date - 24/09/2013 - Summary : Fix for prevent moving page when display dialog
CONTENTVIEW.panoOldContent = function(){
if(ClientData.IsJumpBack() == true){
var oldDataBack = ClientData.JumpQueue();
oldPageNo = oldDataBack[oldDataBack.length - 1].oldPageIndex;
oldDataBack.splice(oldDataBack.length - 1, 1);
ClientData.JumpQueue(oldDataBack);
if(oldDataBack.length == 0){
ClientData.common_prePageNo(null);
ClientData.IsJumpBack(false);
}
}
}
//Display overlay dialog for specify content type
CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
var contentId = ClientData.contentInfo_contentId();
if( resourceUrl == null ){
resourceUrl = CONTENTVIEW.downloadResourceById(contentId);
resourceUrl = CONTENTVIEW.downloadResourceById(CONTENTVIEW_GENERAL.contentID);
}
//CONTENTVIEW_GENERAL.contentType = COMMON.ContentTypeKeys.Type_Html;
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music){
......@@ -2157,7 +2179,13 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlGetits);
}else{
var apiUrl = linkUrlTmp + "/createSession/";
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + ClientData.contentInfo_contentId() + "/";
var oldPageNo = null;
CONTENTVIEW.panoOldContent();
if(oldPageNo != null){
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/" + "?startscene=scene" + oldPageNo+"&a=1";
}else{
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/";
}
var params = {
sid: ClientData.userInfo_sid()
};
......@@ -2174,7 +2202,7 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
success: function(data) {
var linkUrlTmp2 = linkUrlTmp + ";jsessionid=" + data;
CONTENTVIEW.handleForContentTypePanoImage(linkUrlTmp2);
},
......@@ -5883,7 +5911,7 @@ CONTENTVIEW.ready = function(initContentId){
getType: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
......@@ -6116,26 +6144,140 @@ CONTENTVIEW.resvCustomLog = function(param1,param2,param3,param4,param5){
};
CONTENTVIEW.panoMovieObjectLog = function(log){
var pageLog = JSON.parse(log);
//Panomovieの詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.actionDate = new Date();
objectLog.pageNo = "1";
objectLog.objectId = pageLog.objectId;
objectLog.resourceId = pageLog.resourceId;
objectLog.mediaType = pageLog.mediaType;
objectLog.actionType = pageLog.actionType;
objectLog.actionTime = "0";
objectLog.actionValue = pageLog.actionValue;
objectLog.locationX = pageLog.locationX;
objectLog.locationY = pageLog.locationY;
objectLog.locationHeight = pageLog.locationHeight;
objectLog.locationWidth = pageLog.locationWidth;
objectLog.eventType = pageLog.eventType;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
CONTENTVIEW.panoLog = function(log, scheme){
console.log("scheme:"+scheme);
var panoLog = JSON.parse(log);
if(scheme == "abookdetaillog"){
var panoObjectLog = panoLog;
//Panomovieの詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.actionDate = new Date();
objectLog.pageNo = "1";
objectLog.objectId = panoObjectLog.objectId;
objectLog.resourceId = panoObjectLog.resourceId;
objectLog.mediaType = panoObjectLog.mediaType;
objectLog.actionType = panoObjectLog.actionType;
objectLog.actionTime = "0";
objectLog.actionValue = panoObjectLog.actionValue;
objectLog.locationX = panoObjectLog.locationX;
objectLog.locationY = panoObjectLog.locationY;
objectLog.locationHeight = panoObjectLog.locationHeight;
objectLog.locationWidth = panoObjectLog.locationWidth;
objectLog.eventType = panoObjectLog.eventType;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
}else if(scheme == "abookmovepage"){
var panoPageLog = panoLog;
CONTENTVIEW_GENERAL.panoPageNo = panoPageLog.pageNo;
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, panoPageLog.pageNo);
}
};
CONTENTVIEW.panoContentLink = function(targetContentId, page, contentName){
var params = {
contentId: targetContentId,
sid: CONTENTVIEW.getSessionId(),
getType: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params,
function (data) {
/* set end log */
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog();
if(data.contentData.alertMessageLevel){
if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.ShowAlert){
if(data.contentData.alertMessage){
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GENERAL.panoPageNo };
CONTENTVIEW_CREATEOBJECT.moveContentParam = {};
CONTENTVIEW_CREATEOBJECT.moveContentParam = {
'preContentId' : targetContentId,
'prePageNo' : page,
'oldContent' : oldContent
};
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog(data.contentData.alertMessageLevel, data.contentData.alertMessage);
}
}
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.RequirePassword){
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GENERAL.panoPageNo };
CONTENTVIEW_CREATEOBJECT.moveContentParam = {};
CONTENTVIEW_CREATEOBJECT.moveContentParam = {
'preContentId' : contentId,
'prePageNo' : pageNo,
'oldContent' : oldContent
};
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog(data.contentData.alertMessageLevel);
}
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.None){
ClientData.common_preContentId(targetContentId);
ClientData.common_prePageNo(page);
/* store old page */
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GENERAL.panoPageNo };
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
if(ClientData.isStreamingMode()){
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewStreaming);
} else {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode() ) {
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewGetits);
} else {
CONTENTVIEW.screenMove();
}
}
}
}
//Type 0
else{
ClientData.common_preContentId(contentId);
ClientData.common_prePageNo(pageNo);
/* store old page */
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GENERAL.panoPageNo };
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
if(ClientData.isStreamingMode()){
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewStreaming);
} else {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile() && ClientData.isGetitsMode()) {
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewGetits);
} else {
CONTENTVIEW.screenMove();
}
}
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 404) {
CONTENTVIEW.showAlertScreen(I18N.i18nText('msgContentNotExist'), null);
}
else {
// Show system error
AVWEB.showSystemError();
}
}
);
};
window.addEventListener("message", receiveSize, false);
......
......@@ -1299,12 +1299,13 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
CONTENTVIEW_INITOBJECT.clearViewerComponent();
if (ClientData.JumpQueue()) {
var oldDataBack = ClientData.JumpQueue();
if (oldDataBack.length > 0) {
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
ClientData.IsJumpBack(true);
CONTENTVIEW.screenMove();
ClientData.IsJumpBack(true);
} else {
/*check back */
//if (ClientData.BookmarkScreen()) {
......@@ -1323,7 +1324,6 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
//} else {
// window.history.back();
//}
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
......
......@@ -555,6 +555,9 @@ CONTENTVIEW_GENERAL.ready = function(initContentId){
//Start Function : No.9
CONTENTVIEW_GENERAL._object3DImageArr = [];
//panoPageNo
CONTENTVIEW_GENERAL.panoPageNo = null;
//オーサリングプレビュー対応
if(initContentId != null && initContentId != undefined){
CONTENTVIEW_GENERAL.pid = initContentId;
......
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