Commit fe83191c by Masaru Abe

ストリーミング対応

parent f9e9d170
...@@ -2298,12 +2298,13 @@ COMMON.SetStartLog = function(strContentId) { ...@@ -2298,12 +2298,13 @@ COMMON.SetStartLog = function(strContentId) {
for (var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) { for (var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
if (arrContentLogs[nIndex].contentid == strContentId) { if (arrContentLogs[nIndex].contentid == strContentId) {
arrContentLogs[nIndex].readingStartDate = new Date();
arrContentLogs[nIndex].readingEndDate = (new Date()).addSeconds(1); if(!ClientData.isStreamingMode()){
arrContentLogs[nIndex].readingStartDate = new Date();
// Reading time arrContentLogs[nIndex].readingEndDate = (new Date()).addSeconds(1);
arrContentLogs[nIndex].readingTime = arrContentLogs[nIndex].readingEndDate.subtractBySeconds(arrContentLogs[nIndex].readingStartDate); // Reading time
arrContentLogs[nIndex].readingTime = arrContentLogs[nIndex].readingEndDate.subtractBySeconds(arrContentLogs[nIndex].readingStartDate);
}
isFound = true; isFound = true;
break; break;
} }
......
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
</script> </script>
</head> </head>
<body id="viewer" oncontextmenu="return false;"> <!-- oncontextmenu="return false;" -->
<body id="viewer" >
<div id="wrapper"> <div id="wrapper">
<!--Viewer component is added here --> <!--Viewer component is added here -->
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<meta http-equiv="Cache-Control" content="no-store"> <meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1"> <meta http-equiv="Expires" content="-1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta name="viewport" content="target-densitydpi=device-dpi,width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<!-- <!--
<meta name="viewport" content="width=device-width,target-densitydpi=128" /> <meta name="viewport" content="width=device-width,target-densitydpi=128" />
--> -->
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
opacity: 0.6; opacity: 0.6;
} }
#menu li { #menu li {
width: 14.3%; width: 14.2%;
float: left; float: left;
padding: 0; padding: 0;
margin: 0; margin: 0;
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
padding: 12px 0; padding: 6px 0;
text-decoration: none; text-decoration: none;
display: block; display: block;
} }
...@@ -111,6 +111,9 @@ ...@@ -111,6 +111,9 @@
$(document).ready(function() { $(document).ready(function() {
//CONTENTVIEW.ready(); //CONTENTVIEW.ready();
//CONTENTVIEW_STREAMING.ready(); //CONTENTVIEW_STREAMING.ready();
//$('#menu').hide();
}); });
//デバイスから呼ばれるGPS情報 //デバイスから呼ばれるGPS情報
...@@ -495,14 +498,14 @@ ...@@ -495,14 +498,14 @@
</div> </div>
<div id="debug"></div> <div id="debug"></div>
<ul id="menu"> <ul id="menu" style="display:none;">
<li><a id="firstpage" >最初</a></li> <li><a id="firstpage" ><img src="img/menu/icon-fast-forward.png" alt=""></a></li>
<li><a id="prevpage" ></a></li> <li><a id="prevpage" ><img src="img/menu/icon-chevron-left.png" alt=""></a></li>
<li><a id="nextpage" ></a></li> <li><a id="nextpage" ><img src="img/menu/icon-chevron-right.png" alt=""></a></li>
<li><a id="lastpage" >最後</a></li> <li><a id="lastpage" ><img src="img/menu/icon-fast-backward.png" alt=""></a></li>
<li><a id="zoomin" ></a></li> <li><a id="zoomin" ><img src="img/menu/icon-zoom-in.png" alt=""></a></li>
<li><a id="zoomfit" ></a></li> <li><a id="zoomfit" ><img src="img/menu/icon-resize-small.png" alt=""></a></li>
<li><a id="zoomout" ></a></li> <li><a id="zoomout" ><img src="img/menu/icon-zoom-out.png" alt=""></a></li>
</ul> </ul>
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank"> <iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
...@@ -510,3 +513,4 @@ ...@@ -510,3 +513,4 @@
</iframe> </iframe>
</body> </body>
</html> </html>
...@@ -1602,7 +1602,7 @@ CONTENTVIEW.oldContent_Back = function() { ...@@ -1602,7 +1602,7 @@ CONTENTVIEW.oldContent_Back = function() {
/* handle display or hide toolbar */ /* handle display or hide toolbar */
CONTENTVIEW.handleDisplayToolbar = function() { CONTENTVIEW.handleDisplayToolbar = function() {
console.log("CONTENTVIEW_GENERAL.isLoadingObject:" + CONTENTVIEW_GENERAL.isLoadingObject); //console.log("CONTENTVIEW_GENERAL.isLoadingObject:" + CONTENTVIEW_GENERAL.isLoadingObject);
if (CONTENTVIEW_GENERAL.isLoadingObject == false) { if (CONTENTVIEW_GENERAL.isLoadingObject == false) {
/* save marking */ /* save marking */
...@@ -2642,6 +2642,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2642,6 +2642,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.objectId obj.objectId
); );
} else if (obj.actionType == 6) { /*send mail */ } else if (obj.actionType == 6) { /*send mail */
pageObj = new CONTENTVIEW_CREATEOBJECT.sendMail( pageObj = new CONTENTVIEW_CREATEOBJECT.sendMail(
obj.mediaType, obj.mediaType,
obj.actionType, obj.actionType,
...@@ -2912,8 +2913,10 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2912,8 +2913,10 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.objectId obj.objectId
); );
} }
// add pageObject if( pageObj != null ){
this.addPageObject(pageObj); // add pageObject
this.addPageObject(pageObj);
}
} }
}; };
//Start Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary: Edit function to draw on multi canvas //Start Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary: Edit function to draw on multi canvas
......
...@@ -31,16 +31,25 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -31,16 +31,25 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
+ '</iframe></div>' + '</iframe></div>'
+ '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>' + '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
); );
$('#dialog h1 img').click(function(){
//時間記録 $("#dialog h1 img").on({
var dateEnd = new Date(); 'click touchend': function(ev){
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //時間記録
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime ); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
$container.removeAttr('style'); //alert("actionTime:" + actionTime);
CONTENTVIEW_GENERAL.hideDialog(); COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog();
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
}); });
//時間記録 //時間記録
......
...@@ -252,8 +252,10 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.setup = function (mediaType, actio ...@@ -252,8 +252,10 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.setup = function (mediaType, actio
this.visible = visible; this.visible = visible;
this.imageUrl = imageUrl; this.imageUrl = imageUrl;
this.image = new Image(); this.image = new Image();
this.image.src = this.imageUrl; if( this.imageUrl != null ){
this.image.src = this.imageUrl;
}
this.objectId = objectId; this.objectId = objectId;
}; };
...@@ -779,10 +781,22 @@ CONTENTVIEW_CREATEOBJECT.trigger = function (mediaType, actionType, id, imageUrl ...@@ -779,10 +781,22 @@ CONTENTVIEW_CREATEOBJECT.trigger = function (mediaType, actionType, id, imageUrl
} else { /* video */ } else { /* video */
CONTENTVIEW.stopAllAudio(); CONTENTVIEW.stopAllAudio();
CONTENTVIEW.showVideoObject(CONTENTVIEW.objType4_5[nIndex].x, CONTENTVIEW.objType4_5[nIndex].y, CONTENTVIEW.objType4_5[nIndex].width, CONTENTVIEW.objType4_5[nIndex].height, CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].fileName, false); CONTENTVIEW.showVideoObject(CONTENTVIEW.objType4_5[nIndex].x, CONTENTVIEW.objType4_5[nIndex].y, CONTENTVIEW.objType4_5[nIndex].width, CONTENTVIEW.objType4_5[nIndex].height, CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].fileName, false);
if(ClientData.isStreamingMode()){
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPage");
if (myVideo.paused)
{
myVideo.play();
}
}
}
//詳細ログ用 動画なのでダミーで1以上 //詳細ログ用 動画なのでダミーで1以上
objectLog.actionTime = "1"; objectLog.actionTime = "1";
//リソースID //リソースID
objectLog.resourceId = CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].resourceId; objectLog.resourceId = CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].resourceId;
} }
break; break;
} }
...@@ -805,7 +819,8 @@ CONTENTVIEW_CREATEOBJECT.htmlLinkButton = function (mediaType, actionType, id, i ...@@ -805,7 +819,8 @@ CONTENTVIEW_CREATEOBJECT.htmlLinkButton = function (mediaType, actionType, id, i
//abe //abe
//alert("htmlLinkButton"); //alert("htmlLinkButton");
//CONTENTVIEW_STREAMING.debugLog("htmlLinkButton:" + resourceUrl + ":" + objectId);
/*stop audio on page */ /*stop audio on page */
CONTENTVIEW.stopAllAudio(); CONTENTVIEW.stopAllAudio();
...@@ -839,7 +854,7 @@ CONTENTVIEW_CREATEOBJECT.showHtml = function(url, objectId ){ ...@@ -839,7 +854,7 @@ CONTENTVIEW_CREATEOBJECT.showHtml = function(url, objectId ){
//abe //abe
//alert("showHtml"); //alert("showHtml");
var $container = $('#dialog'); var $container = $('#dialog');
$container.html(''); $container.html('');
...@@ -918,7 +933,7 @@ CONTENTVIEW_CREATEOBJECT.anket = function (mediaType, actionType, id, imageUrl, ...@@ -918,7 +933,7 @@ CONTENTVIEW_CREATEOBJECT.anket = function (mediaType, actionType, id, imageUrl,
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + ClientData.userInfo_sid(); var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + ClientData.userInfo_sid();
if(ClientData.isStreamingMode()){ if(ClientData.isStreamingMode()){
//ストリーミング //ストリーミング
url = url + "?isStreaming=true"; url = url + "&isStreaming=true";
} }
var isFullScreen = false; var isFullScreen = false;
...@@ -1041,6 +1056,11 @@ CONTENTVIEW_CREATEOBJECT.sendMail = function (mediaType, actionType, id, imageUr ...@@ -1041,6 +1056,11 @@ CONTENTVIEW_CREATEOBJECT.sendMail = function (mediaType, actionType, id, imageUr
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId); this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () { this.action = function () {
//ストリーミングなら反応しない
if(ClientData.isStreamingMode()){
return;
}
//詳細ログ作成 //詳細ログ作成
var objectLog = new ObjectLogEntity(); var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID; objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
...@@ -1681,19 +1701,58 @@ CONTENTVIEW_CREATEOBJECT.imagePreview = function (mediaType, actionType, id, ima ...@@ -1681,19 +1701,58 @@ CONTENTVIEW_CREATEOBJECT.imagePreview = function (mediaType, actionType, id, ima
CONTENTVIEW_IMAGEPREVIEW.showImagePreview($('#divImagePreview'), imagePreview); CONTENTVIEW_IMAGEPREVIEW.showImagePreview($('#divImagePreview'), imagePreview);
$("#btnClose").live('click', function (e) { $("#btnClose").on({
'click touchend': function(ev){
//時間記録
var dateEnd = new Date(); //時間記録
var actionTime = dateEnd.subtractBySeconds(dateStart); var dateEnd = new Date();
//alert("actionTime:" + actionTime); var actionTime = dateEnd.subtractBySeconds(dateStart);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime ); //alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
CONTENTVIEW_GENERAL.hideDialog(); CONTENTVIEW_GENERAL.hideDialog();
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
}); });
CONTENTVIEW_GENERAL.showDialog(true); CONTENTVIEW_GENERAL.showDialog(true);
//タッチイベントキャンセル
if(ClientData.isStreamingMode()){
//document.getElementById('divImagePreview').addEventListener('touchstart', function(evt){
// $("#debug").html("divImagePreview touchstart1");
// evt.preventDefault();
// evt.stopPropagation();
// return false;}, false);
//document.getElementById('divImagePreview').addEventListener('touchmove', function(env){
// $("#debug").html("divImagePreview touchmove");
// evt.preventDefault();
// evt.stopPropagation();
// return false;}, false);
//document.getElementById('divImagePreview').addEventListener('touchend', function(env){return false;}, false);
//document.getElementById('slideWrapper').addEventListener('touchstart', function(env){
// $("#debug").html("slideWrapper touchstart");
// return false;
// }, false);
//document.getElementById('slideWrapper').addEventListener('touchmove', function(env){return false;}, false);
//document.getElementById('slideWrapper').addEventListener('touchend', function(env){return false;}, false);
//document.getElementById('main-img').addEventListener('touchstart', function(env){
// $("#debug").html("main-img touchstart");
// evt.preventDefault();
// evt.stopPropagation();
// return false;
// }, false);
//document.getElementById('main-img').addEventListener('touchmove', function(env){return false;}, false);
//document.getElementById('main-img').addEventListener('touchend', function(env){return false;}, false);
}
//時間記録 //時間記録
var dateStart = new Date(); var dateStart = new Date();
...@@ -2039,10 +2098,8 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () { ...@@ -2039,10 +2098,8 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
CONTENTVIEW_CREATEOBJECT.createPageBGM(); CONTENTVIEW_CREATEOBJECT.createPageBGM();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM //END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){ if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
//Get Next Page Object //Get Next Page Object
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() - 1); CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() - 1);
//Load Next //Load Next
CONTENTVIEW_GETDATA.renderPrevPage(); CONTENTVIEW_GETDATA.renderPrevPage();
}else{ }else{
...@@ -2054,6 +2111,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () { ...@@ -2054,6 +2111,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
/* init image had draw */ /* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking(); CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */ /* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) { if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') { if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
...@@ -2064,6 +2122,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () { ...@@ -2064,6 +2122,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
} else { } else {
document.title = CONTENTVIEW_GENERAL.contentName + ' | ' + I18N.i18nText('sysAppTitle'); document.title = CONTENTVIEW_GENERAL.contentName + ' | ' + I18N.i18nText('sysAppTitle');
} }
/* set end log */ /* set end log */
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID); COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_EVENTS.createLockLayout(false); CONTENTVIEW_EVENTS.createLockLayout(false);
...@@ -2078,7 +2137,6 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () { ...@@ -2078,7 +2137,6 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
CONTENTVIEW.checkDisableButtonZoom(); CONTENTVIEW.checkDisableButtonZoom();
} }
} }
}); });
} }
...@@ -2331,8 +2389,8 @@ CONTENTVIEW_CREATEOBJECT.createTextConfirmAudio = function() { ...@@ -2331,8 +2389,8 @@ CONTENTVIEW_CREATEOBJECT.createTextConfirmAudio = function() {
CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObjects, onCompleteFunc) { CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObjects, onCompleteFunc) {
//abe 次のページを作成している //abe 次のページを作成している
//alert("CreateObj_createPage:" + pageNumber); //console.log("CreateObj_createPage:" + pageNumber)
var page = new CONTENTVIEW.ContentPage(pageNumber, pageImage); var page = new CONTENTVIEW.ContentPage(pageNumber, pageImage);
/* add page Object */ /* add page Object */
//Start Function: No.12 //Start Function: No.12
...@@ -2342,7 +2400,7 @@ CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObject ...@@ -2342,7 +2400,7 @@ CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObject
//End Function: No.12 //End Function: No.12
/* load page */ /* load page */
page.load(onCompleteFunc); page.load(onCompleteFunc);
return page; return page;
}; };
...@@ -2399,7 +2457,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) { ...@@ -2399,7 +2457,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
// if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){ // if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){
// audio = audio.replace("webResourceDownload/", "webResourceDownload"); // audio = audio.replace("webResourceDownload/", "webResourceDownload");
// } // }
if (audio != '') { if (audio != '') {
if (type == "0") { /* play when click */ if (type == "0") { /* play when click */
CONTENTVIEW.stopAllAudio(); CONTENTVIEW.stopAllAudio();
...@@ -2451,6 +2509,14 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) { ...@@ -2451,6 +2509,14 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
document.getElementById("play_audio_0").load(); document.getElementById("play_audio_0").load();
document.getElementById("play_audio_0").play(); document.getElementById("play_audio_0").play();
} }
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myAudio=document.getElementById("play_audio_0");
if (myAudio.paused)
{
myAudio.play();
}
}
} }
else if (type == "1") { /* play all page */ else if (type == "1") { /* play all page */
...@@ -2484,6 +2550,15 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) { ...@@ -2484,6 +2550,15 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
} }
} }
} }
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myAudio=document.getElementById("play_audio_1");
if (myAudio.paused)
{
myAudio.play();
}
}
} }
else { else {
CONTENTVIEW.TypeAudio1 = type; CONTENTVIEW.TypeAudio1 = type;
...@@ -2578,6 +2653,15 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) { ...@@ -2578,6 +2653,15 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
} }
//END TRB00069 //END TRB00069
} }
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myAudio=document.getElementById("play_audio_1");
if (myAudio.paused)
{
myAudio.play();
}
}
} }
} }
else if (type == "2") { /* play on page */ else if (type == "2") { /* play on page */
......
...@@ -927,7 +927,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) { ...@@ -927,7 +927,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
if(!CONTENTVIEW_EVENTS.isPreventClick){ if(!CONTENTVIEW_EVENTS.isPreventClick){
//その他のエリア //その他のエリア
console.log("click!!"); //console.log("click!!");
} }
} }
...@@ -1416,22 +1416,15 @@ CONTENTVIEW_EVENTS.resetNaviAction = function(){ ...@@ -1416,22 +1416,15 @@ CONTENTVIEW_EVENTS.resetNaviAction = function(){
}; };
CONTENTVIEW_EVENTS.onTouchstart = function(evt){ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
//evt.preventDefault();
//if(ClientData.isStreamingMode()){
// if ($('#menu').is(':hidden')) {
// // 非表示の場合の処理
// $('#menu').show();
// } else {
// // 表示されている場合の処理
// $('#menu').hide();
// }
//}
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
return; return;
} }
//evt.preventDefault();
//$('#debug').html("CONTENTVIEW_EVENTS.onTouchstart");
//CONTENTVIEW_STREAMING.handleDisplayToolbar();
var bContinue = true; var bContinue = true;
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { //if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
...@@ -2180,6 +2173,10 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){ ...@@ -2180,6 +2173,10 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
CONTENTVIEW_EVENTS.nextPage_click(); CONTENTVIEW_EVENTS.nextPage_click();
} }
} }
//CONTENTVIEW_STREAMING.debugLog("CONTENTVIEW_EVENTS.onTouchEnd");
CONTENTVIEW_STREAMING.handleDisplayToolbar();
} }
} }
} }
......
...@@ -36,7 +36,6 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage ...@@ -36,7 +36,6 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject); CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
...@@ -96,6 +95,13 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) { ...@@ -96,6 +95,13 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
* Action Type = 11 : html * Action Type = 11 : html
*/ */
//ストリーミングならemailは表示しない
//if(ClientData.isStreamingMode()){
// if (iValueObj.action.actionType == 6) {
// return null;
// }
//}
var pageObject = []; var pageObject = [];
pageObject['mediaType'] = iValueObj.mediaType; pageObject['mediaType'] = iValueObj.mediaType;
...@@ -318,6 +324,8 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) { ...@@ -318,6 +324,8 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
} }
//END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get //END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
//CONTENTVIEW_STREAMING.debugLog("resourceUrl:" + obj.resourceUrl);
pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl; pageObject["resourceUrl"] = resourceUrl;
} }
...@@ -1262,14 +1270,13 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){ ...@@ -1262,14 +1270,13 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
CONTENTVIEW.showErrorScreen(); CONTENTVIEW.showErrorScreen();
}); });
} }
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages; CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage) CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects) .setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.previousPage(); .previousPage();
} }
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
}; };
//Get next page objects by page index //Get next page objects by page index
...@@ -1299,8 +1306,8 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1299,8 +1306,8 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject); CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
...@@ -1345,6 +1352,7 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1345,6 +1352,7 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
//Get prev page objects by page index //Get prev page objects by page index
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) { CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.prevPageObjects = []; CONTENTVIEW_GENERAL.prevPageObjects = [];
var currentPageObjects; var currentPageObjects;
...@@ -1369,8 +1377,8 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1369,8 +1377,8 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject); CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
...@@ -1410,6 +1418,7 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1410,6 +1418,7 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
} }
} }
} }
}; };
//Switch canvas when flipping page //Switch canvas when flipping page
......
...@@ -122,11 +122,21 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() { ...@@ -122,11 +122,21 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() {
var maxW = "798"; var maxW = "798";
var ratio = 1.566; var ratio = 1.566;
var maxH = maxW / ratio; var maxH = maxW / ratio;
var canvas = document.getElementById('main');
if(ClientData.isStreamingMode()){
if( canvas.width < maxW ){
maxW = canvas.width * 0.9;
maxH = maxW / ratio;
}
}
$("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px');
/*
if ($("#dialog").width() < maxW || $("#dialog").height() < maxH) { if ($("#dialog").width() < maxW || $("#dialog").height() < maxH) {
if ($("#dialog").width() < maxW) { if ($("#dialog").width() < maxW) {
$("#dialog").css('width', maxW + 'px'); $("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px'); $("#dialog").css('height', maxH + 'px');
...@@ -140,6 +150,7 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() { ...@@ -140,6 +150,7 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() {
$("#dialog").css('width', maxW + 'px'); $("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px'); $("#dialog").css('height', maxH + 'px');
} }
*/
$("#dialog").center(); $("#dialog").center();
}; };
......
...@@ -133,8 +133,6 @@ CONTENTVIEW_INITOBJECT.initPage = function() { ...@@ -133,8 +133,6 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
// Lock screen // Lock screen
//COMMON.LockScreen(); //COMMON.LockScreen();
$("#debug").html("test_111");
CONTENTVIEW.StartTimerUpdateLog(); CONTENTVIEW.StartTimerUpdateLog();
...@@ -250,8 +248,8 @@ CONTENTVIEW_INITOBJECT.initPage = function() { ...@@ -250,8 +248,8 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
/*Init Page */ /*Init Page */
CONTENTVIEW_GENERAL.nAjaxLoad++; CONTENTVIEW_GENERAL.nAjaxLoad++;
console.log("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad); //console.log("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
$("#debug").html("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad); //CONTENTVIEW_STREAMING.debugLog("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
if (CONTENTVIEW_GENERAL.nAjaxLoad == 8) { if (CONTENTVIEW_GENERAL.nAjaxLoad == 8) {
...@@ -278,7 +276,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() { ...@@ -278,7 +276,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
.setUpPage(0); .setUpPage(0);
CONTENTVIEW_CREATEOBJECT.createPageBGM(); CONTENTVIEW_CREATEOBJECT.createPageBGM();
//Get next //Get next
if(CONTENTVIEW_GENERAL.totalPage > 1){ if(CONTENTVIEW_GENERAL.totalPage > 1){
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1); CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
//名前空間用のオブジェクトを用意する //名前空間用のオブジェクトを用意する
var CONTENTVIEW_STREAMING = {}; var CONTENTVIEW_STREAMING = {};
CONTENTVIEW_STREAMING.isShowMenu = false;
CONTENTVIEW_STREAMING.ready = function(){ CONTENTVIEW_STREAMING.ready = function(){
//CONTENTVIEW.handleDisplayToolbar(); //CONTENTVIEW.handleDisplayToolbar();
...@@ -10,7 +12,7 @@ CONTENTVIEW_STREAMING.ready = function(){ ...@@ -10,7 +12,7 @@ CONTENTVIEW_STREAMING.ready = function(){
CONTENTVIEW_STREAMING.movePage = function(pageNo){ CONTENTVIEW_STREAMING.movePage = function(pageNo){
console.log("CONTENTVIEW_STREAMING.movePage"); //console.log("CONTENTVIEW_STREAMING.movePage");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
//ページ番号を送信 //ページ番号を送信
var url = "abookpagemove://?contentId=" + CONTENTVIEW_GENERAL.contentID + "&page=" + pageNo; var url = "abookpagemove://?contentId=" + CONTENTVIEW_GENERAL.contentID + "&page=" + pageNo;
...@@ -21,7 +23,7 @@ CONTENTVIEW_STREAMING.movePage = function(pageNo){ ...@@ -21,7 +23,7 @@ CONTENTVIEW_STREAMING.movePage = function(pageNo){
CONTENTVIEW_STREAMING.moveContent = function(contentId){ CONTENTVIEW_STREAMING.moveContent = function(contentId){
console.log("CONTENTVIEW_STREAMING.moveContent"); //console.log("CONTENTVIEW_STREAMING.moveContent");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
//コンテンツIDを送信 //コンテンツIDを送信
var url = "abookopen://?contentId=" + contentId; var url = "abookopen://?contentId=" + contentId;
...@@ -32,28 +34,51 @@ CONTENTVIEW_STREAMING.moveContent = function(contentId){ ...@@ -32,28 +34,51 @@ CONTENTVIEW_STREAMING.moveContent = function(contentId){
CONTENTVIEW_STREAMING.sendLog = function(){ CONTENTVIEW_STREAMING.sendLog = function(){
console.log("CONTENTVIEW_STREAMING.sendLog"); //console.log("CONTENTVIEW_STREAMING.sendLog");
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID); COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog(); COMMON.RegisterLog();
//サウンド再生中なら停止
CONTENTVIEW.stopAllAudio();
//送信終了を通知 //送信終了を通知
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var url = "abooksendlog://?send=true"; var url = "abooksendlog://?send=true";
location.href = url; location.href = url;
//$("#debug").html("abooksendlog://?send=true"); //CONTENTVIEW_STREAMING.debugLog("abooksendlog://?send=true");
} }
}; };
CONTENTVIEW_STREAMING.initPageView = function(){ CONTENTVIEW_STREAMING.initPageView = function(){
console.log("CONTENTVIEW_STREAMING.initPageView"); //console.log("CONTENTVIEW_STREAMING.initPageView");
//初期描画完了を通知 //初期描画完了を通知
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { //if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
var url = "abookopenfinish://?init=true"; var url = "abookopenfinish://?init=true";
location.href = url; location.href = url;
$("#debug").html("send abookopenfinish://?init=true"); //CONTENTVIEW_STREAMING.debugLog("send abookopenfinish://?init=true");
} }
}; };
CONTENTVIEW_STREAMING.handleDisplayToolbar = function(){
if(ClientData.isStreamingMode()){
if ($('#menu').is(':hidden')) {
// 非表示の場合の処理
$('#menu').show();
} else {
// 表示されている場合の処理
$('#menu').hide();
}
}
};
CONTENTVIEW_STREAMING.debugLog = function(msg){
//$("#debug").html(msg);
};
...@@ -19,16 +19,9 @@ STVIEW.processLogin = function(cid,sid) { ...@@ -19,16 +19,9 @@ STVIEW.processLogin = function(cid,sid) {
var apiLoginUrl = ClientData.conf_apiLoginUrl(); var apiLoginUrl = ClientData.conf_apiLoginUrl();
//alert("aaaa"); //alert("aaaa");
$('#main-error-message').html("aaaaaa"); $('#main-error-message').html("loading...");
$('#main-error-message').show(); $('#main-error-message').show();
//window.location.href = "abvw/" + COMMON.ScreenIds.ContentViewStreaming;
//window.location.href = "./login.html";
//location.href = "http://web3.agentec.jp/";
//$('#main-error-message').html("bcdef");
//$('#main-error-message').show();
AVWEB.avwCmsApiWithUrl(apiLoginUrl, null, 'webClientStreamingLogin', 'GET', params, function (data) { AVWEB.avwCmsApiWithUrl(apiLoginUrl, null, 'webClientStreamingLogin', 'GET', params, function (data) {
//requirePasswordChange = data.requirePasswordChange; //requirePasswordChange = data.requirePasswordChange;
LOGIN.userinfo_sid = data.sid; LOGIN.userinfo_sid = data.sid;
...@@ -48,23 +41,24 @@ STVIEW.processLogin = function(cid,sid) { ...@@ -48,23 +41,24 @@ STVIEW.processLogin = function(cid,sid) {
//ストリーミングモード有効化 //ストリーミングモード有効化
ClientData.isStreamingMode(true); ClientData.isStreamingMode(true);
//GPS情報 //GPS情報
ClientData.latitude(STVIEW.latitude); if( STVIEW.latitude != '' ){
ClientData.longitude(STVIEW.longitude); ClientData.latitude(STVIEW.latitude);
}
if( STVIEW.longitude != '' ){
ClientData.longitude(STVIEW.longitude);
}
$('#main-error-message').css('display', 'none'); $('#main-error-message').css('display', 'none');
if (data.requirePasswordChange == 0) { if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
$('#main-error-message').html("login ok move to:" + COMMON.ScreenIds.ContentViewStreaming); //$('#main-error-message').html("login ok move to:" + COMMON.ScreenIds.ContentViewStreaming);
$('#main-error-message').show(); //$('#main-error-message').show();
//コンテンツIDセット //コンテンツIDセット
ClientData.contentInfo_contentId(cid); ClientData.contentInfo_contentId(cid);
//ストリーミングのビューアへ移動 //ストリーミングのビューアへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming); AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming + "?123456");
//$('#main-error-message').html("move...");
//$('#main-error-message').show();
} else { } else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001')); $('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
...@@ -135,15 +129,39 @@ STVIEW.ready = function(){ ...@@ -135,15 +129,39 @@ STVIEW.ready = function(){
//location.href="http://freebsd.csie.nctu.edu.tw/~freedom/html5/"; //location.href="http://freebsd.csie.nctu.edu.tw/~freedom/html5/";
//return; //return;
//console.log("STVIEW.ready");
//引数の確認
var sid = COMMON.getUrlParam('sid', '');
var cid = COMMON.getUrlParam('cid', '');
var page = COMMON.getUrlParam('page', '');
var latitude = COMMON.getUrlParam('latitude', '');
var longitude = COMMON.getUrlParam('longitude', '');
var reload = COMMON.getUrlParam('reload', '');
var isView = false;
if( !sid || !cid ){
//表示出来ない
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
return;
}
console.log("STVIEW.ready"); var isReload = false;
if( reload != "" ){
if( reload == "true" ){
isReload = true;
}
}
//---初期化 //---初期化
//セッションストレージクリア if( isReload == false ){
SessionStorageUtils.clear(); //セッションストレージクリア
AVWEB.avwUserSessionObj = null; SessionStorageUtils.clear();
// create new session AVWEB.avwUserSessionObj = null;
AVWEB.avwCreateUserSession(); // create new session
AVWEB.avwCreateUserSession();
}
I18N.initi18n(); I18N.initi18n();
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
...@@ -157,23 +175,9 @@ console.log("STVIEW.ready"); ...@@ -157,23 +175,9 @@ console.log("STVIEW.ready");
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl ); ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl ); ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
//念のため前回までの閲覧ログは削除 if( isReload == false ){
ClientData.ContentLogData([]); //念のため前回までの閲覧ログは削除
//---初期化 ClientData.ContentLogData([]);
//引数の確認
var sid = COMMON.getUrlParam('sid', '');
var cid = COMMON.getUrlParam('cid', '');
var page = COMMON.getUrlParam('page', '');
var latitude = COMMON.getUrlParam('latitude', '');
var longitude = COMMON.getUrlParam('longitude', '');
var isView = false;
if( !sid || !cid ){
//表示出来ない
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
return;
} }
//ページ番号指定有り //ページ番号指定有り
...@@ -186,7 +190,7 @@ console.log("STVIEW.ready"); ...@@ -186,7 +190,7 @@ console.log("STVIEW.ready");
if( latitude != "" ){ if( latitude != "" ){
STVIEW.latitude = latitude; STVIEW.latitude = latitude;
} }
if( latitude != "" ){ if( longitude != "" ){
STVIEW.longitude = longitude; STVIEW.longitude = longitude;
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script type="text/javascript" src="./abvw/common/js/common.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/Limit_Access_Content.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/login.js?__UPDATEID__"></script> <script type="text/javascript" src="./abvw/js/login.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/stview.js?__UPDATEID__"></script> <script type="text/javascript" src="./abvw/js/stview.js?__UPDATEID__2"></script>
<style> <style>
#loader-bg { #loader-bg {
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
//デバイスから呼ばれる //デバイスから呼ばれる
function setLocation(latitude, longitude){ function setLocation(latitude, longitude){
alert("stview receive setLocation:" + latitude + "," + longitude ); //alert("stview receive setLocation:" + latitude + "," + longitude );
if( STVIEW.latitude != null ){ if( STVIEW.latitude != null ){
STVIEW.latitude = latitude; STVIEW.latitude = latitude;
} }
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
//デバイスから呼ばれる閲覧ログ送信指示 //デバイスから呼ばれる閲覧ログ送信指示
function sendLog(){ function sendLog(){
alert("stview receive sendLog "); //alert("stview receive sendLog ");
//送信終了を通知 //送信終了を通知
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { //if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var url = "abooksendlog://?send=true"; var url = "abooksendlog://?send=true";
......
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