Commit b574efee by vietdo

#19267 vtour対応

parent d7561b03
...@@ -2395,10 +2395,11 @@ COMMON.SetStartLog = function(strContentId) { ...@@ -2395,10 +2395,11 @@ COMMON.SetStartLog = function(strContentId) {
log.longitude = ClientData.longitude(); log.longitude = ClientData.longitude();
// PageLog 1ページ目セット(1レコードは必須) // PageLog 1ページ目セット(1レコードは必須)
if(CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoMovie){
var pageLog = new PageLogEntity(); var pageLog = new PageLogEntity();
pageLog.contentid = strContentId; pageLog.contentid = strContentId;
log.pageLogArray.push(pageLog); log.pageLogArray.push(pageLog);
}
// Add to storage // Add to storage
arrContentLogs.push(log); arrContentLogs.push(log);
} }
...@@ -2450,7 +2451,6 @@ COMMON.SetEndLog = function(strContentId) { ...@@ -2450,7 +2451,6 @@ COMMON.SetEndLog = function(strContentId) {
// 1ページ分のページ閲覧ログを作成 // 1ページ分のページ閲覧ログを作成
COMMON.SetPageLog = function(strContentId, strPageNo) { COMMON.SetPageLog = function(strContentId, strPageNo) {
var arrContentLogs = ClientData.ContentLogData(); var arrContentLogs = ClientData.ContentLogData();
for ( var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) { for ( var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
...@@ -2459,7 +2459,11 @@ COMMON.SetPageLog = function(strContentId, strPageNo) { ...@@ -2459,7 +2459,11 @@ COMMON.SetPageLog = function(strContentId, strPageNo) {
// PageLog追加 // PageLog追加
var pageLog = new PageLogEntity(); var pageLog = new PageLogEntity();
pageLog.contentid = strContentId; pageLog.contentid = strContentId;
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){
pageLog.pageNo = strPageNo;
}else{
pageLog.pageNo = strPageNo + 1; // 0始まりのページ番号 pageLog.pageNo = strPageNo + 1; // 0始まりのページ番号
}
arrContentLogs[nIndex].pageLogArray.push(pageLog); arrContentLogs[nIndex].pageLogArray.push(pageLog);
} }
...@@ -2560,13 +2564,13 @@ COMMON.RegisterLog = function(is) { ...@@ -2560,13 +2564,13 @@ COMMON.RegisterLog = function(is) {
var pageLogArray = arrContentLogs[nIndex].pageLogArray; var pageLogArray = arrContentLogs[nIndex].pageLogArray;
// 詳細ログオプションが有効ならページ閲覧ログデータ作成 // 詳細ログオプションが有効ならページ閲覧ログデータ作成
if (pageLogArray != null && pageLogArray.length > 0) { if (pageLogArray != null && pageLogArray.length > 0) {
console.log("pageLogArray.length:"+pageLogArray.length)
var lines = []; var lines = [];
// 終了時間と閲覧時間の設定 // 終了時間と閲覧時間の設定
var pageLogStart; var pageLogStart;
var pageLogEnd; var pageLogEnd;
// 2レコード目からチェック // 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なら次のレコードの開始日時をセット // 一つ前のログの終了日時がnullなら次のレコードの開始日時をセット
if (pageLogArray[nIndex2 - 1].readingEndDate == null) { if (pageLogArray[nIndex2 - 1].readingEndDate == null) {
pageLogArray[nIndex2 - 1].readingEndDate = pageLogArray[nIndex2].readingStartDate; pageLogArray[nIndex2 - 1].readingEndDate = pageLogArray[nIndex2].readingStartDate;
......
...@@ -1629,7 +1629,7 @@ CONTENTVIEW.handleFromJumpContent = function() { ...@@ -1629,7 +1629,7 @@ CONTENTVIEW.handleFromJumpContent = function() {
if (ClientData.common_prePageNo()) { if (ClientData.common_prePageNo()) {
CONTENTVIEW_GENERAL.isJumpNotFromFirstPage = true; CONTENTVIEW_GENERAL.isJumpNotFromFirstPage = true;
CONTENTVIEW.changePageWithoutSlide(CONTENTVIEW.changePageNo(ClientData.common_prePageNo())); CONTENTVIEW.changePageWithoutSlide(CONTENTVIEW.changePageNo(ClientData.common_prePageNo()));
ClientData.common_prePageNo(null) ClientData.common_prePageNo(null);
} }
}; };
...@@ -1643,10 +1643,15 @@ CONTENTVIEW.oldContent_Back = function() { ...@@ -1643,10 +1643,15 @@ CONTENTVIEW.oldContent_Back = function() {
/*move to page */ /*move to page */
//CONTENTVIEW.changePage(oldContent.oldPageIndex); //CONTENTVIEW.changePage(oldContent.oldPageIndex);
if(CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoMovie && CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_PanoImage){
CONTENTVIEW.changePageWithoutSlide(oldContent.oldPageIndex); CONTENTVIEW.changePageWithoutSlide(oldContent.oldPageIndex);
}
/*remove*/ /*remove*/
oldDataBack.splice(oldDataBack.length - 1, 1); oldDataBack.splice(oldDataBack.length - 1, 1);
if(oldDataBack.length == 0){
ClientData.common_prePageNo(null);
}
ClientData.JumpQueue(oldDataBack); ClientData.JumpQueue(oldDataBack);
ClientData.IsJumpBack(false); ClientData.IsJumpBack(false);
...@@ -2099,12 +2104,29 @@ CONTENTVIEW.displayOverlayForHtmlAndMediaType = function(){ ...@@ -2099,12 +2104,29 @@ CONTENTVIEW.displayOverlayForHtmlAndMediaType = function(){
}; };
//END TRB00075 - Editor: Long - Date - 24/09/2013 - Summary : Fix for prevent moving page when display dialog //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 //Display overlay dialog for specify content type
CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
var contentId = ClientData.contentInfo_contentId(); var contentId = ClientData.contentInfo_contentId();
if( resourceUrl == null ){ if( resourceUrl == null ){
resourceUrl = CONTENTVIEW.downloadResourceById(contentId); resourceUrl = CONTENTVIEW.downloadResourceById(CONTENTVIEW_GENERAL.contentID);
} }
//CONTENTVIEW_GENERAL.contentType = COMMON.ContentTypeKeys.Type_Html; //CONTENTVIEW_GENERAL.contentType = COMMON.ContentTypeKeys.Type_Html;
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music){ if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music){
...@@ -2157,7 +2179,13 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){ ...@@ -2157,7 +2179,13 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlGetits); CONTENTVIEW.handleForContentTypePanoMovie(linkUrlGetits);
}else{ }else{
var apiUrl = linkUrlTmp + "/createSession/"; 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 = { var params = {
sid: ClientData.userInfo_sid() sid: ClientData.userInfo_sid()
}; };
...@@ -6116,26 +6144,140 @@ CONTENTVIEW.resvCustomLog = function(param1,param2,param3,param4,param5){ ...@@ -6116,26 +6144,140 @@ CONTENTVIEW.resvCustomLog = function(param1,param2,param3,param4,param5){
}; };
CONTENTVIEW.panoMovieObjectLog = function(log){ CONTENTVIEW.panoLog = function(log, scheme){
var pageLog = JSON.parse(log); console.log("scheme:"+scheme);
var panoLog = JSON.parse(log);
if(scheme == "abookdetaillog"){
var panoObjectLog = panoLog;
//Panomovieの詳細ログ作成 //Panomovieの詳細ログ作成
var objectLog = new ObjectLogEntity(); var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID; objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.actionDate = new Date(); objectLog.actionDate = new Date();
objectLog.pageNo = "1"; objectLog.pageNo = "1";
objectLog.objectId = pageLog.objectId; objectLog.objectId = panoObjectLog.objectId;
objectLog.resourceId = pageLog.resourceId; objectLog.resourceId = panoObjectLog.resourceId;
objectLog.mediaType = pageLog.mediaType; objectLog.mediaType = panoObjectLog.mediaType;
objectLog.actionType = pageLog.actionType; objectLog.actionType = panoObjectLog.actionType;
objectLog.actionTime = "0"; objectLog.actionTime = "0";
objectLog.actionValue = pageLog.actionValue; objectLog.actionValue = panoObjectLog.actionValue;
objectLog.locationX = pageLog.locationX; objectLog.locationX = panoObjectLog.locationX;
objectLog.locationY = pageLog.locationY; objectLog.locationY = panoObjectLog.locationY;
objectLog.locationHeight = pageLog.locationHeight; objectLog.locationHeight = panoObjectLog.locationHeight;
objectLog.locationWidth = pageLog.locationWidth; objectLog.locationWidth = panoObjectLog.locationWidth;
objectLog.eventType = pageLog.eventType; objectLog.eventType = panoObjectLog.eventType;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog); 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); window.addEventListener("message", receiveSize, false);
......
...@@ -1303,8 +1303,9 @@ CONTENTVIEW_EVENTS.imgBack_click = function() { ...@@ -1303,8 +1303,9 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
var oldDataBack = ClientData.JumpQueue(); var oldDataBack = ClientData.JumpQueue();
if (oldDataBack.length > 0) { if (oldDataBack.length > 0) {
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView); //AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
CONTENTVIEW.screenMove();
ClientData.IsJumpBack(true); ClientData.IsJumpBack(true);
CONTENTVIEW.screenMove();
} else { } else {
/*check back */ /*check back */
//if (ClientData.BookmarkScreen()) { //if (ClientData.BookmarkScreen()) {
...@@ -1323,7 +1324,6 @@ CONTENTVIEW_EVENTS.imgBack_click = function() { ...@@ -1323,7 +1324,6 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
//} else { //} else {
// window.history.back(); // window.history.back();
//} //}
//元の画面に戻って画面復帰 //元の画面に戻って画面復帰
CONTENTVIEW.screenBack(); CONTENTVIEW.screenBack();
......
...@@ -555,6 +555,9 @@ CONTENTVIEW_GENERAL.ready = function(initContentId){ ...@@ -555,6 +555,9 @@ CONTENTVIEW_GENERAL.ready = function(initContentId){
//Start Function : No.9 //Start Function : No.9
CONTENTVIEW_GENERAL._object3DImageArr = []; CONTENTVIEW_GENERAL._object3DImageArr = [];
//panoPageNo
CONTENTVIEW_GENERAL.panoPageNo = null;
//オーサリングプレビュー対応 //オーサリングプレビュー対応
if(initContentId != null && initContentId != undefined){ if(initContentId != null && initContentId != undefined){
CONTENTVIEW_GENERAL.pid = initContentId; 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