Commit c7c941af by Masaru Abe

Merge branch 'feature/1.7_19490_Getits_toolbar_hidden' into 'feature/1.7'

#19490 360°Getits Webビューアツールバーの非表示



See merge request !9
parents 6910c94a c355fa8b
...@@ -372,6 +372,7 @@ COMMON.Keys = { ...@@ -372,6 +372,7 @@ COMMON.Keys = {
conf_apiLoginUrl : 'conf_apiLoginUrl', conf_apiLoginUrl : 'conf_apiLoginUrl',
conf_apiResourceDlUrl : 'conf_apiResourceDlUrl', conf_apiResourceDlUrl : 'conf_apiResourceDlUrl',
storeUrl : 'storeUrl', storeUrl : 'storeUrl',
siteUrl : 'siteUrl',
latitude : 'latitude', latitude : 'latitude',
longitude : 'longitude', longitude : 'longitude',
...@@ -1708,6 +1709,14 @@ var ClientData = { ...@@ -1708,6 +1709,14 @@ var ClientData = {
return SessionStorageUtils.get(COMMON.Keys.storeUrl); return SessionStorageUtils.get(COMMON.Keys.storeUrl);
} }
}, },
siteUrl : function(data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.siteUrl, data);
} else {
return SessionStorageUtils.get(COMMON.Keys.siteUrl);
}
},
latitude : function(data) { latitude : function(data) {
if (arguments.length > 0) { if (arguments.length > 0) {
......
...@@ -2123,6 +2123,35 @@ CONTENTVIEW.panoOldContent = function(){ ...@@ -2123,6 +2123,35 @@ CONTENTVIEW.panoOldContent = function(){
return oldPageNo; return oldPageNo;
}; };
CONTENTVIEW.createSessionForPanoramaContent = function(apiUrl, func, linkUrlTmp){
var params = {
sid: ClientData.userInfo_sid()
};
var sysSettings = AVWEB.avwSysSetting();
// ajax によるAPIの実行(json)
$.ajax( {
async: false,
type: 'GET',
url: apiUrl,
dataType: 'text',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
var linkUrlTmp2 = linkUrlTmp + ";jsessionid=" + data;
func(linkUrlTmp2);
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
AVWEB.avwLog("error" + errorThrown);
}
});
};
//Display overlay dialog for specify content type //Display overlay dialog for specify content type
CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
...@@ -2140,85 +2169,33 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){ ...@@ -2140,85 +2169,33 @@ CONTENTVIEW.displayOverlayForSpecifyContentType = function( resourceUrl ){
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
var url = ClientData.conf_apiUrl(); var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath()); var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
if(ClientData.isGetitsMode() == true){ var apiUrl = linkUrlTmp + "/createSession/";
var linkUrlGetits = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "open/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlGetits); CONTENTVIEW.panoOldContent();
}else{
var apiUrl = linkUrlTmp + "/createSession/"; linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/";
CONTENTVIEW.panoOldContent(); CONTENTVIEW.createSessionForPanoramaContent(apiUrl,function(){
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlTmp);
linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/panorama/play/" + CONTENTVIEW_GENERAL.contentID + "/"; }, linkUrlTmp);
var params = {
sid: ClientData.userInfo_sid()
};
var sysSettings = AVWEB.avwSysSetting();
// ajax によるAPIの実行(json)
$.ajax( {
async: false,
type: 'GET',
url: apiUrl,
dataType: 'text',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
var linkUrlTmp2 = linkUrlTmp + ";jsessionid=" + data;
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlTmp2);
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
console.log("error" + errorThrown);
}
});
}
}else if(CONTENTVIEW_GENERAL.contentType == 'panoImage'){ }else if(CONTENTVIEW_GENERAL.contentType == 'panoImage'){
var url = ClientData.conf_apiUrl(); var url = ClientData.conf_apiUrl();
var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath()); var linkUrlTmp = AVWEB.format(url, ClientData.userInfo_accountPath());
if(ClientData.isGetitsMode() == true){
var linkUrlGetits = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "open/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/"; var apiUrl = linkUrlTmp + "/createSession/";
CONTENTVIEW.handleForContentTypePanoMovie(linkUrlGetits);
}else{ var oldPageNo = CONTENTVIEW.panoOldContent();
var apiUrl = linkUrlTmp + "/createSession/";
if(oldPageNo != null){
var oldPageNo = CONTENTVIEW.panoOldContent(); linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/" + "?startscene=scene" + oldPageNo+"&a=1";
}else{
if(oldPageNo != null){ linkUrlTmp = linkUrlTmp.substring(0, linkUrlTmp.length - 6) + "shop/vtour/play/" + CONTENTVIEW_GENERAL.contentID + "/";
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);
var params = {
sid: ClientData.userInfo_sid()
};
var sysSettings = AVWEB.avwSysSetting();
// ajax によるAPIの実行(json)
$.ajax( {
async: false,
type: 'GET',
url: apiUrl,
dataType: 'text',
data: params,
crossDomain: true,
beforeSend: function(xhr) {
xhr.setRequestHeader('X-AGT-AppId', sysSettings.appName);
xhr.setRequestHeader('X-AGT-AppVersion', sysSettings.appVersion);
},
success: function(data) {
var linkUrlTmp2 = linkUrlTmp + ";jsessionid=" + data;
CONTENTVIEW.handleForContentTypePanoImage(linkUrlTmp2);
},
error: function(xmlHttpRequest, txtStatus, errorThrown) {
/* call custom error process */
console.log("error" + errorThrown);
}
});
}
} }
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Html){
......
...@@ -557,22 +557,12 @@ CONTENTVIEW_INITOBJECT.isHasPageBGM = function(){ ...@@ -557,22 +557,12 @@ CONTENTVIEW_INITOBJECT.isHasPageBGM = function(){
//END TRB00069 //END TRB00069
CONTENTVIEW_INITOBJECT.initPageMediaAndHtmlType = function(){ CONTENTVIEW_INITOBJECT.initPageMediaAndHtmlType = function(){
//$('#divImageLoading').css('display', 'block'); //$('#divImageLoading').css('display', 'block');
if(ClientData.isGetitsMode()){ /* init footer toolbar */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoImage || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PanoMovie){ $('#footer_toolbar_2').hide();
var $container = $('#dialog'); $('#footer_toolbar_1').show();
$("#header_toolbar").hide();
$("#footer_toolbar_1").hide();
$container.css('top', '0%')
.css('left', '0%')
.css('height', '100%')
.css('width', '100%');
}
}else{
/* init footer toolbar */
$('#footer_toolbar_2').hide();
$('#footer_toolbar_1').show();
}
/* init pos bottom toolbar*/ /* init pos bottom toolbar*/
CONTENTVIEW_INITOBJECT.initDisplayToolbarDevice(); CONTENTVIEW_INITOBJECT.initDisplayToolbarDevice();
......
...@@ -751,12 +751,16 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) { ...@@ -751,12 +751,16 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
} else { } else {
// Go to Conten view page // Go to Conten view page
if(ClientData.isGetitsMode()){ if(ClientData.isGetitsMode()){
if(contentType == COMMON.ContentTypeKeys.Type_Html || contentType == COMMON.ContentTypeKeys.Type_Link){ if(contentType == COMMON.ContentTypeKeys.Type_Html || contentType == COMMON.ContentTypeKeys.Type_Link || contentType == COMMON.ContentTypeKeys.Type_PanoImage || contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath()); var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
var htmlUrl = LOGIN.htmlLinkById(strContentId, contentType); var htmlUrl = LOGIN.htmlLinkById(strContentId, contentType);
if(htmlUrl){ if(htmlUrl){
//TODO 閲覧ログ送信 //TODO 閲覧ログ送信
location.href=htmlUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl + "&cid=" + strContentId; if(contentType == COMMON.ContentTypeKeys.Type_Html){
location.href=htmlUrl + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl + "&cid=" + strContentId;
}else{
location.href = htmlUrl;
}
} }
return; return;
} }
...@@ -814,16 +818,22 @@ LOGIN.htmlLinkById = function(contentId,contentType) { ...@@ -814,16 +818,22 @@ LOGIN.htmlLinkById = function(contentId,contentType) {
}; };
var resourceUrl = ""; var resourceUrl = "";
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params, if(contentType == COMMON.ContentTypeKeys.Type_PanoImage){
function(data) { resourceUrl = ClientData.siteUrl() + ClientData.userInfo_accountPath() + "/open/vtour/play/" + contentId;
if(contentType == COMMON.ContentTypeKeys.Type_Html){ }else if(contentType == COMMON.ContentTypeKeys.Type_PanoMovie){
resourceUrl = data.contentDataSub[0].resourceUrl; resourceUrl = ClientData.siteUrl() + ClientData.userInfo_accountPath() + "/open/panorama/play/" + contentId;
} else if(contentType == COMMON.ContentTypeKeys.Type_Link){ }else{
resourceUrl = data.contentData.content.url; AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "webGetContent", 'GET', params,
} function(data) {
} if(contentType == COMMON.ContentTypeKeys.Type_Html){
); resourceUrl = data.contentDataSub[0].resourceUrl;
} else if(contentType == COMMON.ContentTypeKeys.Type_Link){
resourceUrl = data.contentData.content.url;
}
}
);
}
if( !resourceUrl ){ if( !resourceUrl ){
resourceUrl = ""; resourceUrl = "";
} }
...@@ -901,6 +911,8 @@ LOGIN.ready = function() { ...@@ -901,6 +911,8 @@ LOGIN.ready = function() {
// getitsモード有効 // getitsモード有効
ClientData.isGetitsMode(true); ClientData.isGetitsMode(true);
ClientData.siteUrl(siteUrl);
// api接続先設定 // api接続先設定
ClientData.conf_apiUrl(siteUrl + "{0}/abvapi"); ClientData.conf_apiUrl(siteUrl + "{0}/abvapi");
ClientData.conf_apiLoginUrl(siteUrl + "nuabvapi"); ClientData.conf_apiLoginUrl(siteUrl + "nuabvapi");
......
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