Commit 934573a6 by Masaru Abe

#26109 オブジェクト360対応

parent d855560a
......@@ -2166,37 +2166,6 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video){
CONTENTVIEW.handleForContentTypeVideo(resourceUrl);
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/";
CONTENTVIEW.panoOldContent();
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlTmp);
}, linkUrlTmp);
}else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){
var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/";
var oldPageNo = 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 + "/";
}
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoImage(linkUrlTmp);
},linkUrlTmp);
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html){
var linkUrlTmp = resourceUrl;
......@@ -2209,9 +2178,53 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Exam){
CONTENTVIEW.handleForContentTypeExam(resourceUrl);
} else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Enquete){
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Enquete){
CONTENTVIEW.handleForContentTypeEnquete(resourceUrl);
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/";
CONTENTVIEW.panoOldContent();
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlTmp);
}, linkUrlTmp);
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){
var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/";
var oldPageNo = 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 + "/";
}
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoImage(linkUrlTmp);
},linkUrlTmp);
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
var apiUrl = linkUrlTmp + "/createSession/";
CONTENTVIEW.panoOldContent();
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/objectvr/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypeObjectVR(linkUrlTmp);
}, linkUrlTmp);
}
if (COMMON.isTouchDevice() == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth;
......@@ -2366,7 +2379,6 @@ CONTENTVIEW.handleForContentTypePanoMovie = function(resourceUrl){
$container.css('width','100%');
$container.css('background-color','white');
//START TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
if(CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()){
$container.html('<iframe src="'+ resourceUrl +'" style="position: absolute; width: 100%;"></iframe>');
......@@ -2377,12 +2389,11 @@ CONTENTVIEW.handleForContentTypePanoMovie = function(resourceUrl){
$container.html('<iframe src="'+ resourceUrl +'" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="position: absolute; width: 100%; height: 100%; "> </iframe>');
$container.css('overflow', 'hidden');
}
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
$container.show();
return;
};
//handle for content type = panoMovie
//handle for content type = panoImage
CONTENTVIEW.handleForContentTypePanoImage = function(resourceUrl){
//Create Dialog overlay
var $container = $('#dialog');
......@@ -2392,7 +2403,6 @@ CONTENTVIEW.handleForContentTypePanoImage = function(resourceUrl){
$container.css('width','100%');
$container.css('background-color','white');
//START TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
if(CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()){
$container.html('<iframe src="'+ resourceUrl +'" style="position: absolute; width: 100%;"></iframe>');
......@@ -2403,7 +2413,30 @@ CONTENTVIEW.handleForContentTypePanoImage = function(resourceUrl){
$container.html('<iframe src="'+ resourceUrl +'" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="position: absolute; width: 100%; height: 100%; "> </iframe>');
$container.css('overflow', 'hidden');
}
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
$container.show();
return;
};
//handle for content type = objectvr
CONTENTVIEW.handleForContentTypeObjectVR = function(resourceUrl){
//Create Dialog overlay
var $container = $('#dialog');
$container.html('');
$container.css('left','0%');
$container.css('width','100%');
$container.css('background-color','white');
if(CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()){
$container.html('<iframe src="'+ resourceUrl +'" style="position: absolute; width: 100%;"></iframe>');
$container.css('overflow', 'scroll');
$container.css('-webkit-overflow-scrolling', 'touch');
}
else{
$container.html('<iframe src="'+ resourceUrl +'" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="position: absolute; width: 100%; height: 100%; "> </iframe>');
$container.css('overflow', 'hidden');
}
$container.show();
return;
};
......@@ -2534,7 +2567,9 @@ CONTENTVIEW.handleForContentTypeEnquete = function(resourceUrl){
//Check type of content
CONTENTVIEW.isMediaAndHTMLContent = function(){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == 'panoImage'){
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
return true;
}
else{
......@@ -2549,7 +2584,8 @@ CONTENTVIEW.enableSpecifyControl = function(){
CONTENTVIEW_GENERAL.disableAllControl();
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Music ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == 'panoImage'){
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Video || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
CONTENTVIEW.enableControlForMediaAndHtmlType();
}
......@@ -2675,16 +2711,9 @@ CONTENTVIEW.originalScreenForNotPdfType = function(){
$container.css('background-color', 'white');
$container.css('overflow', 'scroll');
$container.css('-webkit-overflow-scrolling', 'touch');
}else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
$container.css('left','0%');
$container.css('position','absolute');
//$container.css('height','100%');
$container.css('width','100%');
$container.css('background-color', 'white');
$container.css('overflow', 'scroll');
$container.css('-webkit-overflow-scrolling', 'touch');
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage){
}else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage ||
CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
$container.css('left','0%');
$container.css('position','absolute');
//$container.css('height','100%');
......@@ -6168,7 +6197,7 @@ CONTENTVIEW.panoLog = function(log, scheme){
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.actionDate = new Date();
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
objectLog.pageNo = "1";
}else{
objectLog.pageNo = panoObjectLog.pageNo;
......
......@@ -1102,6 +1102,11 @@ HEADER.getIconTypeContent = function(contentType) {
src = 'img/bookshelf/icon_12.png';
break;
}
case COMMON.ContentTypeKeys.Type_ObjectVR:
{
src = 'img/bookshelf/icon_13.png';
break;
}
default: break;
}
return src;
......
......@@ -751,7 +751,9 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
} else {
// Go to Conten view page
if(ClientData.isGetitsMode()){
if(contentType == COMMON.ContentTypeKeys.Type_Html || contentType == COMMON.ContentTypeKeys.Type_Link || contentType == COMMON.ContentTypeKeys.Type_PanoImage || contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
if(contentType == COMMON.ContentTypeKeys.Type_Html || contentType == COMMON.ContentTypeKeys.Type_Link ||
contentType == COMMON.ContentTypeKeys.Type_PanoImage || contentType == COMMON.ContentTypeKeys.Type_PanoMovie ||
contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
var htmlUrl = LOGIN.htmlLinkById(strContentId, contentType);
if(htmlUrl){
......@@ -760,7 +762,7 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
location.href=htmlUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl + "&cid=" + strContentId;
}else{
location.href = htmlUrl;
}
}
}
return;
}
......@@ -822,6 +824,8 @@ LOGIN.htmlLinkById = function(contentId,contentType) {
resourceUrl = ClientData.siteUrl() + ClientData.userInfo_accountPath() + "/open/vtour/play/" + contentId;
}else if(contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
resourceUrl = ClientData.siteUrl() + ClientData.userInfo_accountPath() + "/open/panorama/play/" + contentId;
}else if(contentType == COMMON.ContentTypeKeys.Type_ObjectVR){
resourceUrl = ClientData.siteUrl() + ClientData.userInfo_accountPath() + "/open/objectvr/play/" + contentId;
}else{
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
function(data) {
......
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