Commit 721c5295 by vietdo

#15800 試験(ActionType=14)のJSON解析とビューア画面への表示

parent 86419b42
......@@ -221,6 +221,8 @@ COMMON.Keys = {
serviceOpt_apns: 'apns',
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_usable_push_message: 'usable_push_message',
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_encryption: 'encryption',
// Session :共通(common)_コンテンツID:Integer
common_contentId: 'common_contentId',
// Local :共通(common)_コンテンツID:Integer
......@@ -1271,6 +1273,15 @@ var ClientData = {
}
},
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_encryption: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(COMMON.Keys.serviceOpt_encryption, data);
} else {
return SessionStorageUtils.get(COMMON.Keys.serviceOpt_encryption);
}
},
// Session :事業者オプション(serviceOpt)_カタログエディション:Char(Y:可能, N:不可)
serviceOpt_catalog_edition: function (data) {
if (arguments.length > 0) {
......
<!-- ビューアエリア FROM -->
<div id="wrapper" style="">
<!--Viewer component is added here -->
<div id="overlay" class="web_dialog_overlay"> </div>
<div id="dialog" class="web_dialog"> </div>
......@@ -42,7 +42,7 @@
<span class="gloupe">
<a id="imgmemo" class="memoDisplay" title="メモ表示" lang="txtTooltipShowMemo"> </a>
<a id="imgaddmemo" class="memoAdd" title="メモ追加" lang="txtTooltipAddMemo"> </a>
</span>
</span>
<span class="lgloupe">
<a id="imgmarking" class="marking" title="マーキング" lang="txtTooltipShowMarking"> </a>
<a id="imgmarkingtoolbar" class="markingToolbar" title="マーキングツールバー表示" lang="txtTooltipShowMarkingTool"> </a>
......@@ -87,7 +87,7 @@
<!-- ================================================================================== -->
<!-- Marking group [start]
<!-- ================================================================================== -->
<!-- Marking [start] -->
<aside class="markingBox" id="dlgMarking">
<h1 class="markingBoxHd">
......@@ -106,7 +106,7 @@
</ul>
<a id="dlgMarking_dspPgClear" class="clearbtn lang" lang="dspPgClear">このページクリア</a>
<a id="dlgMarking_dspSave" class="savebtn lang" lang="dspSave" >保存</a>
<a id="dlgMarking_dspCancel" class="cancelbtn lang" lang="dspCancel">キャンセル</a>
<a id="dlgMarking_dspCancel" class="cancelbtn lang" lang="dspCancel">キャンセル</a>
</div>
</aside>
<!-- Marking [ end ] -->
......@@ -138,7 +138,7 @@
</li>
<li>
<a id="text_dlgGomu_rdo1">
<input type="radio" id="dlgGomu_rdo1" name="rdoSize" value="1" checked="checked"/>
<input type="radio" id="dlgGomu_rdo1" name="rdoSize" value="1" checked="checked"/>
<span><label for="dlgGomu_rdo1" class="lang" lang="txtMkgS"></label></span>
<img class="sizeS" src="img/viewer/en_s.png" alt="">
</a>
......@@ -154,14 +154,14 @@
</div>
</div>
<!-- Eraser [ end ] -->
<!-- Maker [ start ] -->
<div id="dlgMaker" class="rayermenu1">
<ul class="popcolumnL">
<li>
<a id="marker-oversize-text">
<input type="radio" id="maker-size-oversize" name="maker-size" />
<span><label for="maker-size-oversize" class="lang" lang="txtMkgSB">XL</label></span>
<span><label for="maker-size-oversize" class="lang" lang="txtMkgSB">XL</label></span>
<img class="sizeXL" src="img/viewer/en_xl.png" alt="">
</a>
</li>
......@@ -217,14 +217,14 @@
</div>
</div>
<!-- Maker [ end ] -->
<!-- Pen [ start ] -->
<div id="dlgPen" class="rayermenu1">
<ul class="popcolumnL">
<li>
<a id="pen-oversize-text">
<input type="radio" id="pen-size-oversize" name="maker-size"/>
<span><label for="pen-size-oversize" class="lang" lang="txtMkgSB">XL</label></span>
<span><label for="pen-size-oversize" class="lang" lang="txtMkgSB">XL</label></span>
<img class="sizeXL" src="img/viewer/en_xl.png" alt="">
</a>
</li>
......@@ -280,17 +280,17 @@
</div>
</div>
<!-- Pen [ end ] -->
<div id="dlgOverlay"> </div>
<div id="dlgOverlay"> </div>
<!-- ================================================================================== -->
<!-- Marking group [end]
<!-- ================================================================================== -->
<!-- ================================================================================== -->
<!-- Footer [start]
<!-- ================================================================================== -->
<footer id="footer_toolbar_1" class="footer">
<div class="ftinner">
<div class="ftinner">
<!-- slider transition sizing -->
<div class="ftLcolumn">
<!-- slider [start] -->
......@@ -301,7 +301,7 @@
<a id="control_process" class="sld02"><div id="slider_page" > </div></a>
</div>
<!-- slider [end] -->
<!-- transition [start] -->
<!-- temporary tool tip - must be change "lang" -->
<div id="control_movepage" class="transition fix">
......@@ -311,7 +311,7 @@
<a id="lastpage" class="last"> </a>
</div>
<!-- transition [end] -->
<!-- sizing [start] -->
<!-- temporary tool tip - must be change "lang" -->
<div id="control_zoom" class="sizing">
......@@ -321,7 +321,7 @@
</div>
<!-- sizing [end] -->
</div>
<!-- toolbar -->
<div class="ftRcolumn">
<a id="control_screen" class="toolbar"> </a>
......@@ -334,32 +334,32 @@
<a id="control_screen_2" class="toolbar_close" style=""> </a>
<!-- ================================================================================== -->
<!-- Footer [end]
<!-- ================================================================================== -->
<!-- ================================================================================== -->
<section id="bgmConfirm" class="sectionDeleteConfirm" style="display:none;">
<h1 class="lang" lang=""> </h1>
<p class="message lang" lang="msgBGMPlayConfirm" id="txtAudio">このコンテンツはBGMが流れるようになっています。BGMを再生してもよろしいですか?</p>
<p class="message lang" lang="msgBGMPlayConfirm" id="txtAudio">このコンテンツはBGMが流れるようになっています。BGMを再生してもよろしいですか?</p>
<p class="deletebtn" ><a id="bgmConfirm_dspOK" lang="dspOK" class="ok_audio lang">OK</a></p>
</section>
<section id="bgmConfirm_page" class="sectionDeleteConfirm" style="display:none;">
<h1 class="lang" lang=""> </h1>
<p class="message lang" lang="msgBGMPlayConfirm" id="txtAudio_page">このコンテンツはBGMが流れるようになっています。BGMを再生してもよろしいですか?</p>
<p class="message lang" lang="msgBGMPlayConfirm" id="txtAudio_page">このコンテンツはBGMが流れるようになっています。BGMを再生してもよろしいですか?</p>
<p class="deletebtn" ><a id="bgmConfirm_dspOK_page" lang="dspOK" class="ok_audio lang">OK</a></p>
</section>
<section id="contentVideoConfirm" class="sectionDeleteConfirm" style="display:none;">
<h1 class="lang" lang=""> </h1>
<p class="message lang" lang="txtMediaAutoPlayWarning" id="txtContentVideo">Confirm Play Video</p>
<p class="message lang" lang="txtMediaAutoPlayWarning" id="txtContentVideo">Confirm Play Video</p>
<p class="deletebtn" ><a id="contentVideoConfirm_OK" lang="dspOK" class="ok_audio lang">OK</a></p>
</section>
<section id="contentAudioConfirm" class="sectionDeleteConfirm" style="display:none;">
<h1 class="lang" lang=""> </h1>
<p class="message lang" lang="txtMediaAutoPlayWarning" id="txtContentAudio">Confirm Play Audio</p>
<p class="message lang" lang="txtMediaAutoPlayWarning" id="txtContentAudio">Confirm Play Audio</p>
<p class="deletebtn" ><a id="contentAudioConfirm_OK" lang="dspOK" class="ok_audio lang">OK</a></p>
</section>
</div>
<!-- ビューアエリア TO -->
......@@ -382,6 +382,7 @@
<script type="text/javascript" src="./js/contentview_PopupText.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_Paint.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_Anket.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_Exam.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_3d.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_ContentTypeNone.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/contentview_ImagePreview.js?__UPDATEID__"></script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -9,7 +9,7 @@ CONTENTVIEW_CALLAPI.abapi = function(name, param, method, callback) {
/* get Json stored content info */
CONTENTVIEW_CALLAPI.getJsonContentInfo = function( doneFunc ) {
//console.log("CONTENTVIEW_CALLAPI.getJsonContentInfo");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
......@@ -24,7 +24,7 @@ CONTENTVIEW_CALLAPI.getJsonContentInfo = function( doneFunc ) {
};
CONTENTVIEW_CALLAPI.getJsonContentInfoDone = function(doneFunc){
var ajax1 = CONTENTVIEW_CALLAPI.webGetContentDataWhen();
var ajax2 = CONTENTVIEW_CALLAPI.getSearchDataFromJsonWhen();
var ajax3 = CONTENTVIEW_CALLAPI.getJsonDataPageTitleWhen();
......@@ -67,19 +67,19 @@ CONTENTVIEW_CALLAPI.getJsonContentInfoDone = function(doneFunc){
doneFunc();
}
});
};
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
//未使用
CONTENTVIEW_CALLAPI.webGetPageImageContentSize = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPageSize",
"GET",
......@@ -92,21 +92,21 @@ CONTENTVIEW_CALLAPI.webGetPageImageContentSize = function() {
};
CONTENTVIEW_CALLAPI.webGetContentPageSizeWhen = function(){
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 6,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.webGetContentPageSizeDone = function(data){
......@@ -114,7 +114,7 @@ CONTENTVIEW_CALLAPI.webGetContentPageSizeDone = function(data){
$.each(data.contentData.pageInfoData.pagesInfo, function(i, n){
CONTENTVIEW_GENERAL.contentPageSizeArr.push(n);
});
//Get Page size of firstPage
CONTENTVIEW_CALLAPI.getPageSizeByPageNo(1);
} else {
......@@ -126,30 +126,30 @@ CONTENTVIEW_CALLAPI.webGetContentPageSizeDone = function(data){
CONTENTVIEW_CALLAPI.getPageSizeByPageNo = function(pageNo){
for(var i = 0; i < CONTENTVIEW_GENERAL.contentPageSizeArr.length; i++){
var page = CONTENTVIEW_GENERAL.contentPageSizeArr[i];
if(page.pageNo == pageNo){
if(page.pageNo == pageNo){
CONTENTVIEW_GENERAL.widthContentImage = page.pageWidth;
CONTENTVIEW_GENERAL.heightContentImage = page.pageHeight;
CONTENTVIEW_GENERAL.heightContentImage = page.pageHeight;
}
}
};
CONTENTVIEW_CALLAPI.webGetContentDataWhen = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 1,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.webGetContentDataDone = function(data) {
......@@ -158,21 +158,21 @@ CONTENTVIEW_CALLAPI.webGetContentDataDone = function(data) {
/* get Json stored page title */
CONTENTVIEW_CALLAPI.getJsonDataPageTitleWhen = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 3,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getJsonDataPageTitleDone = function(data) {
......@@ -190,21 +190,21 @@ CONTENTVIEW_CALLAPI.getJsonDataPageTitleDone = function(data) {
/* get Json webGetContent4 */
CONTENTVIEW_CALLAPI.getJsonDataType4When = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 4,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getJsonDataType4Done = function(data) {
......@@ -213,21 +213,21 @@ CONTENTVIEW_CALLAPI.getJsonDataType4Done = function(data) {
/* get Json webGetContent5 */
CONTENTVIEW_CALLAPI.getJsonDataType5When = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 5,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getJsonDataType5Done = function(data) {
......@@ -236,37 +236,37 @@ CONTENTVIEW_CALLAPI.getJsonDataType5Done = function(data) {
/* read file Json -> get page objects */
CONTENTVIEW_CALLAPI.getDataJsonFileWhen = function() {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
getType: 2,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getDataJsonFileDone = function(data) {
var JsonFile = data.contentData;
CONTENTVIEW_GENERAL.pageObjectsData = [];
if (JsonFile.vertical) {
if (JsonFile.vertical.pages) {
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.vertical.pages;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < CONTENTVIEW_GENERAL.pageObjectsData.length; i++){
var obj = CONTENTVIEW_GENERAL.pageObjectsData[i];
obj["contentDataSub"] = data.contentDataSub;
}
}
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
}
......@@ -274,48 +274,47 @@ CONTENTVIEW_CALLAPI.getDataJsonFileDone = function(data) {
else if (JsonFile.horizontal) {
if (JsonFile.horizontal.pages) {
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.horizontal.pages;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < CONTENTVIEW_GENERAL.pageObjectsData.length; i++){
var obj = CONTENTVIEW_GENERAL.pageObjectsData[i];
obj["contentDataSub"] = data.contentDataSub;
}
}
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
}
}
//Start : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
else{
CONTENTVIEW_GENERAL.pageObjectsData = JsonFile.content.pages;
if(data.contentDataSub != null && data.contentDataSub.length > 0){
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < CONTENTVIEW_GENERAL.pageObjectsData.length; i++){
var obj = CONTENTVIEW_GENERAL.pageObjectsData[i];
obj["contentDataSub"] = data.contentDataSub;
}
}
}
}
//Get Data Of page to draw page
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
var pageDataInfo = [];
pageDataInfo["height"] = JsonFile.height;
pageDataInfo["width"] = JsonFile.width;
pageDataInfo["alpha"] = JsonFile.backgroundAlpha;
pageDataInfo["color"] = JsonFile.backgroundColor;
CONTENTVIEW_GENERAL.totalPage = parseInt(JsonFile.totalPageNum);
CONTENTVIEW_GENERAL.pageImages = CONTENTVIEW_CONTENTTYPENONE.returnImageString(pageDataInfo);
CONTENTVIEW_GENERAL.widthContentImage = JsonFile.width;
CONTENTVIEW_GENERAL.heightContentImage = JsonFile.height;
}
}
//End : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
};
CONTENTVIEW_CALLAPI.loadDataBookmark = function(lstPageNo) {
......@@ -328,7 +327,7 @@ CONTENTVIEW_CALLAPI.loadDataBookmark = function(lstPageNo) {
thumbnailFlg: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
......@@ -383,21 +382,21 @@ CONTENTVIEW_CALLAPI.getSearchDataFromJsonWhen = function() {
arrPageNo += "," + (nIndex + 1);
}
}
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
thumbnailFlg: 0,
isStreaming: ClientData.isStreamingMode()
};
return AVWEB._callCmsApiWhen(
ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
params
);
};
CONTENTVIEW_CALLAPI.getSearchDataFromJsonDone = function(data) {
......@@ -407,7 +406,7 @@ CONTENTVIEW_CALLAPI.getSearchDataFromJsonDone = function(data) {
CONTENTVIEW_CALLAPI.loadDataSearch = function(lstPageNo) {
if (CONTENTVIEW_GENERAL.isSendingData == true) {
var params = {
contentId: CONTENTVIEW_GENERAL.contentID,
sid: CONTENTVIEW.getSessionId(),
......@@ -415,7 +414,7 @@ CONTENTVIEW_CALLAPI.loadDataSearch = function(lstPageNo) {
thumbnailFlg: 1,
isStreaming: ClientData.isStreamingMode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webContentPage",
"GET",
......
......@@ -980,6 +980,91 @@ CONTENTVIEW_CREATEOBJECT.anket = function (mediaType, actionType, id, imageUrl,
};
CONTENTVIEW_CREATEOBJECT.anket.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
CONTENTVIEW_CREATEOBJECT.exam = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, showResult, sendResult, replyLimit, fullscreen, saveAs, resourceId, enquete, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.pageNo = CONTENTVIEW_GETDATA.getPageIndex() + 1; //0始まりのページ番号
objectLog.objectId = objectId;
objectLog.resourceId = resourceId;
objectLog.mediaType = mediaType;
objectLog.actionType = actionType;
objectLog.actionValue = enquete; //objectNameのほうが良かった
objectLog.actionTime = "0";
objectLog.locationX = x;
objectLog.locationY = y;
objectLog.locationHeight = h;
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId();
if(ClientData.isStreamingMode()){
//ストリーミング
url = url + "&isStreaming=true";
}
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
isFullScreen = true;
}
CONTENTVIEW_EXAM.showExam(url, isFullScreen, objectId);
CONTENTVIEW_GENERAL.showDialog(true);
};
};
CONTENTVIEW_CREATEOBJECT.exam.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
CONTENTVIEW_CREATEOBJECT.quiz = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, replyLimit, fullscreen, saveAs, resourceId, enquete, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.pageNo = CONTENTVIEW_GETDATA.getPageIndex() + 1; //0始まりのページ番号
objectLog.objectId = objectId;
objectLog.resourceId = resourceId;
objectLog.mediaType = mediaType;
objectLog.actionType = actionType;
objectLog.actionValue = enquete; //objectNameのほうが良かった
objectLog.actionTime = "0";
objectLog.locationX = x;
objectLog.locationY = y;
objectLog.locationHeight = h;
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + CONTENTVIEW.getSessionId();
if(ClientData.isStreamingMode()){
//ストリーミング
url = url + "&isStreaming=true";
}
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
isFullScreen = true;
}
CONTENTVIEW_EXAM.showExam(url, isFullScreen, objectId);
CONTENTVIEW_GENERAL.showDialog(true);
};
};
CONTENTVIEW_CREATEOBJECT.quiz.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
/* mediaType=3 Audio object : extends PageObject */
......@@ -2383,7 +2468,6 @@ CONTENTVIEW_CREATEOBJECT.createTextConfirmAudio = function() {
CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObjects, onCompleteFunc) {
//abe 次のページを作成している
console.log("CreateObj_createPage:" + pageNumber);
var page = new CONTENTVIEW.ContentPage(pageNumber, pageImage);
/* add page Object */
//Start Function: No.12
......
......@@ -4,24 +4,24 @@ var CONTENTVIEW_EVENTS = {};
/* add memo click */
CONTENTVIEW_EVENTS.handleAddMemo = function(event) {
if (ClientData.IsAddingMemo() == true) {
ClientData.IsAddingMemo(false);
CONTENTVIEW_GENERAL.isCopyMemo = false;
/* draw memo */
CONTENTVIEW.drawMemoOnScreen();
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawMemoOnScreen(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawMemoOnScreen(2);
}
//End Function : No.4
////Start Function : No.4
//if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
// CONTENTVIEW.drawMemoOnScreen(1);
......@@ -35,7 +35,7 @@ CONTENTVIEW_EVENTS.handleAddMemo = function(event) {
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
}
}
else {
ClientData.IsDisplayMemo(true);
......@@ -48,7 +48,7 @@ CONTENTVIEW_EVENTS.handleAddMemo = function(event) {
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawMemoOnScreen(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawMemoOnScreen(2);
}
......@@ -74,18 +74,18 @@ CONTENTVIEW_EVENTS.handleAddMemo = function(event) {
/* Marking toolbar*/
CONTENTVIEW_EVENTS.imgmarking_click = function() {
if (ClientData.IsDisplayMarking() == false) {
ClientData.IsDisplayMarking(true);
CONTENTVIEW.drawCanvas();
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawCanvas(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawCanvas(2);
}
......@@ -106,12 +106,12 @@ CONTENTVIEW_EVENTS.imgmarking_click = function() {
$('#imgmarking').addClass('marking');*/
CONTENTVIEW.drawCanvas();
//Start Function : No.4
if(CONTENTVIEW_GETDATA.getContent().hasNextPage()){
CONTENTVIEW.drawCanvas(1);
}
if(CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
CONTENTVIEW.drawCanvas(2);
}
......@@ -123,13 +123,13 @@ CONTENTVIEW_EVENTS.imgmarking_click = function() {
/* event for list bookmark: changePageNo */
CONTENTVIEW_EVENTS.clickBookmark = function() {
var targetPageIndex = $(this).attr('id');
if(targetPageIndex != CONTENTVIEW_GETDATA.getPageIndex()){
CONTENTVIEW.changePage(targetPageIndex);
}
/* close popup */
// $('#divListBookmark').dialog("close");
$("#overlay").hide();
......@@ -287,104 +287,104 @@ CONTENTVIEW_EVENTS.clickSearchDetail = function() {
CONTENTVIEW.changePage($(this).attr('id'));
};
//Start: Function : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
//Start: Function : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
/* event next page */
CONTENTVIEW_EVENTS.nextPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().hasNextPage()) {
var pageNo = CONTENTVIEW_GETDATA.getPageIndex() + 1;
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, pageNo);
CONTENTVIEW.playBGMOfContent();
CONTENTVIEW.playBGMOfPage(pageNo);
CONTENTVIEW.playBGMOfPage(pageNo);
CONTENTVIEW_GENERAL.isLoadingObject = true;
CONTENTVIEW.cancelClick = true;
CONTENTVIEW_GENERAL.disableAllControl();
CONTENTVIEW_GENERAL.disableAllControl();
$('#divImageLoading').css('display', 'block');
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
CONTENTVIEW_EVENTS.createLockLayout(true);
tran.flipNextPage();
}
};
/* event prev page */
CONTENTVIEW_EVENTS.prevPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().hasPreviousPage()) {
var pageNo = CONTENTVIEW_GETDATA.getPageIndex() - 1;
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, pageNo);
CONTENTVIEW.playBGMOfContent();
CONTENTVIEW.playBGMOfPage(pageNo);
CONTENTVIEW_GENERAL.isLoadingObject = true;
CONTENTVIEW_GENERAL.isLoadingObject = true;
CONTENTVIEW.cancelClick = true;
CONTENTVIEW_GENERAL.disableAllControl();
$('#divImageLoading').css('display', 'block');
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
CONTENTVIEW_EVENTS.createLockLayout(true);
tran.flipPreviousPage();
}
};
//End: Function : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
//End: Function : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
/* event first page */
CONTENTVIEW_EVENTS.firstPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().pageIndex != 0) {
if(CONTENTVIEW_GETDATA.getContent().pageIndex == 1){
CONTENTVIEW_EVENTS.prevPage_click();
}
else{
//abe
//alert("firstPage_click:" + CONTENTVIEW_GENERAL.contentID );
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, 0 );
CONTENTVIEW.playBGMOfContent();
CONTENTVIEW.playBGMOfPage(0);
CONTENTVIEW_GENERAL.disableAllControl();
$('#divImageLoading').css('display', 'block');
// Clear canvas offscreen
CONTENTVIEW_GENERAL.clearCanvas(document.getElementById("offscreen"));
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
CONTENTVIEW_GENERAL.pageImages = data;
/* get page Objects */
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
......@@ -401,38 +401,38 @@ CONTENTVIEW_EVENTS.firstPage_click = function() {
tran.flipToPage(0);
}
//END : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
}
}
}
};
/* event last page */
CONTENTVIEW_EVENTS.lastPage_click = function() {
if (CONTENTVIEW_GETDATA.getContent().pageIndex != (CONTENTVIEW_GENERAL.totalPage - 1)) {
if(CONTENTVIEW_GETDATA.getContent().pageIndex == CONTENTVIEW_GENERAL.totalPage - 2){
CONTENTVIEW_EVENTS.nextPage_click();
}
else{
//abe
//alert("lastPage_click:" + CONTENTVIEW_GENERAL.contentID );
COMMON.SetPageLog( CONTENTVIEW_GENERAL.contentID, CONTENTVIEW_GENERAL.totalPage - 1 );
CONTENTVIEW.playBGMOfContent();
CONTENTVIEW.playBGMOfPage(CONTENTVIEW_GENERAL.totalPage - 1);
CONTENTVIEW_GENERAL.disableAllControl();
$('#divImageLoading').css('display', 'block');
// Clear canvas offscreen
CONTENTVIEW_GENERAL.clearCanvas(document.getElementById("offscreen"));
//CONTENTVIEW_GENERAL.pageImages = CONTENTVIEW_GETDATA.getURLPageImage("webContentPageImage") + "?contentId=" + CONTENTVIEW_GENERAL.contentID + "&sid=" + CONTENTVIEW.getSessionId() + "&pageNo=" + (CONTENTVIEW_GENERAL.totalPage - 1);
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
AVWEB.avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: CONTENTVIEW_GENERAL.totalPage },
......@@ -442,17 +442,17 @@ CONTENTVIEW_EVENTS.lastPage_click = function() {
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GENERAL.totalPage - 1);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(CONTENTVIEW_GENERAL.totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
......@@ -460,51 +460,51 @@ CONTENTVIEW_EVENTS.lastPage_click = function() {
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects);
$('#divImageLoading').css('display', 'none');
CONTENTVIEW.checkDisableButtonZoom();
var tran = new CONTENTVIEW_CREATEOBJECT.Transition();
tran.flipToPage(CONTENTVIEW_GENERAL.totalPage - 1);
}
//END : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
}
}
}
};
CONTENTVIEW_EVENTS.createLockLayout = function(opt){
if(opt == true){
if(opt == true){
if(!$('#locking').size()){
var $html = $('<div id="locking" style="z-index: 100; position: absolute; height: 100%; width: 100%; background: white; opacity: 0 "></div>');
var $html = $('<div id="locking" style="z-index: 100; position: absolute; height: 100%; width: 100%; background: white; opacity: 0 "></div>');
$('#wrapper').append($html);
$html.show();
$('#locking').live('click', function(event){ event.preventDefault(); });
}
else{
$('#locking').show();
}
}
else{
//$('body').append($html);
if($('#locking').size()){
$('#locking').hide();
$('#locking').remove();
}
}
$('#locking').remove();
}
}
};
//START TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
//START TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
/* handle keydown */
$(document).keydown(function (e) {
/* set fag true when click ctrl */
if (e.ctrlKey) {
CONTENTVIEW_GENERAL.ctrlMode = true;
}
if(e.altKey){
CONTENTVIEW_EVENTS.altMode = true;
}
......@@ -515,13 +515,13 @@ $(document).keydown(function (e) {
/* do nothing*/
} else {
switch (e.keyCode) {
/* move page */
/* move page */
case COMMON.ShortKeys.MovePrevious: /* move prev */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
if (CONTENTVIEW_GETDATA.getContent().hasPreviousPage()) {
CONTENTVIEW_EVENTS.prevPage_click();
}
}
}
break;
case COMMON.ShortKeys.MoveNext: /* move next */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
......@@ -532,29 +532,29 @@ $(document).keydown(function (e) {
break;
/* zoom */
/* zoom */
case COMMON.ShortKeys.ZoomIn: /* zoomIn */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomIn();
}
break;
case COMMON.ShortKeys.ZoomOut: /* zoomOut */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomOut();
}
break;
case COMMON.ShortKeys.ZoomFit: /* screenFit*/
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.screenFit();
}
}
break;
/* marking && toolbar */
/* marking && toolbar */
case COMMON.ShortKeys.ShowHideToolbar: /* handle toolbar */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
......@@ -568,55 +568,55 @@ $(document).keydown(function (e) {
CONTENTVIEW.fullScreenForNotPdfType();
}
}
break;
case COMMON.ShortKeys.ShowHideMarking: /* hide marking */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_EVENTS.imgmarking_click();
}
break;
}
}
}
if(CONTENTVIEW_EVENTS.altMode == true && CONTENTVIEW_GENERAL.ctrlMode == false){
if (ClientData.IsAddingMarking() == true || CONTENTVIEW_GENERAL.isLoadingObject == true) {
/* do nothing*/
}
}
else {
switch (e.keyCode) {
/* zoom */
/* zoom */
case COMMON.ShortKeys.ZoomInAlt: /* zoomIn */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomIn();
}
}
break;
case COMMON.ShortKeys.ZoomOutAlt: /* zoomOut */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomOut();
}
}
break;
case COMMON.ShortKeys.ZoominAlt_Firefox: /* zoomIn */
if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomIn();
}
}
}
}
break;
case COMMON.ShortKeys.ZoomOutAlt_Firefox: /* zoomOut */
if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image
|| CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW.zoomOut();
}
}
}
}
break;
}
}
}
......@@ -627,11 +627,11 @@ $(document).keyup(function (e) {
CONTENTVIEW_GENERAL.ctrlMode = false;
CONTENTVIEW_EVENTS.altMode = false;
});
//END TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
//END TRB00049 - Editor: Long - Date: 09/26/2013 - Summary : Add short key alt
//START TRB - Editor : Long -Date : 10/01/2013 - Summary : Re Assign sid for image 3d
CONTENTVIEW_EVENTS.update3DImagesArr = function(){
if(CONTENTVIEW_GENERAL._object3DImageArr.length > 0){
var temp3DArr = [];
CONTENTVIEW_GENERAL._object3DImageArr = []; //ここで初期化?
......@@ -652,36 +652,36 @@ CONTENTVIEW_EVENTS.update3DImagesArr = function(){
var tempWidth = object3d["width"];
var tempX = object3d["x"];
var tempY = object3d["y"];
tempInitImage = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + COMMON.getUrlParam('resourceId',tempInitImage);
for(var j = 0; j< temp3dview.length; j++){
var url = temp3dview[j];
var id = COMMON.getUrlParam('resourceId',url);
temp3dview[j] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + id;
}
var arr3D = [];
arr3D["3dview"] = temp3dview;
arr3D["_currFrameX"] = tempCurrX;
arr3D["_currFrameY"] = tempCurrY;
var arr3D = [];
arr3D["3dview"] = temp3dview;
arr3D["_currFrameX"] = tempCurrX;
arr3D["_currFrameY"] = tempCurrY;
arr3D["lastSelectedFrame"] = tempLastSelectedFrame;
arr3D["actionType"] = tempActionType;
arr3D["height"] = tempHeight;
arr3D["horizonCount"] = tempHorizonCnt;
arr3D["id"] = tempId;
arr3D["initImage"] = tempInitImage;
arr3D["mediaType"] = tempMediaType;
arr3D["verticalCount"] = tempVerticalCnt;
arr3D["actionType"] = tempActionType;
arr3D["height"] = tempHeight;
arr3D["horizonCount"] = tempHorizonCnt;
arr3D["id"] = tempId;
arr3D["initImage"] = tempInitImage;
arr3D["mediaType"] = tempMediaType;
arr3D["verticalCount"] = tempVerticalCnt;
arr3D["visible"] = tempVisible;
arr3D["width"] = tempWidth;
arr3D["x"] = tempX;
arr3D["y"] = tempY;
arr3D["width"] = tempWidth;
arr3D["x"] = tempX;
arr3D["y"] = tempY;
temp3DArr.push(arr3D);
}
CONTENTVIEW_GENERAL._object3DImageArr = temp3DArr;
}
}
};
//END TRB - Editor : Long -Date : 10/01/2013 - Summary : Re Assign sid for image 3d
......@@ -694,7 +694,7 @@ CONTENTVIEW_EVENTS.onUnlock = function() {
if (CONTENTVIEW_GENERAL.pageObjects[nIndex].mediaType == '3' && CONTENTVIEW_GENERAL.pageObjects[nIndex].playType == '1') {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
$('#play_audio_1').attr('src', CONTENTVIEW_GENERAL.pageObjects[nIndex].audioFile);
//document.getElementById("play_audio_1").load();
//document.getElementById("play_audio_1").load();
document.getElementById("play_audio_1").play();
CONTENTVIEW_GENERAL.isPlayBGMUnlock = true;
} else {
......@@ -702,7 +702,7 @@ CONTENTVIEW_EVENTS.onUnlock = function() {
}
}
}
//Start Function: No.4 - Editor : Long - Date : 08/12/2013 - Summary : ReDraw canvas when has new sid
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex());
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages).setPageObjects(CONTENTVIEW_GENERAL.pageObjects).setUpPage(CONTENTVIEW_GETDATA.getPageIndex());
......@@ -713,29 +713,29 @@ CONTENTVIEW_EVENTS.onUnlock = function() {
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
CONTENTVIEW_GETDATA.renderNextPage();
}
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() - 1);
CONTENTVIEW_GETDATA.renderPrevPage();
}
}
//End Function: No.4 - Editor : Long - Date : 08/12/2013 - Summary : ReDraw canvas when has new sid
};
CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
event.preventDefault();
if(CONTENTVIEW_GENERAL.isLoadingObject){
event.preventDefault();
if(CONTENTVIEW_GENERAL.isLoadingObject){
return;
}
else{
CONTENTVIEW.cancelClick = false;
}
}
if (!CONTENTVIEW.cancelClick) {
//change coordinates
//change coordinates
var imagePt = CONTENTVIEW.screenToImage(event.pageX, event.pageY);
var canvasWidth = $('#offscreen').width();
CONTENTVIEW_GENERAL.posXPopupMemo = event.pageX;
......@@ -744,10 +744,10 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
if ((event.pageX - CONTENTVIEW.marginX) >= CONTENTVIEW.destRect.left && (event.pageX - CONTENTVIEW.marginX) <= CONTENTVIEW.destRect.right) {
/* click add memo */
if (ClientData.IsAddingMemo() == true) {
if (!ClientData.memo_copyText()) {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), event.pageX, event.pageY, function () {
//set flag change memo
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
......@@ -761,35 +761,35 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
} else {
if (CONTENTVIEW_GENERAL.typeSelectMemo == 1) { /* add new */
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
CONTENTVIEW.drawMemoOnScreen();
//change image
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
} else if (CONTENTVIEW_GENERAL.typeSelectMemo == 2) { /* copy */
CONTENTVIEW_MEMO.CopyMemo(ClientData.memo_copyText(), CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
CONTENTVIEW.drawMemoOnScreen();
//change image
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
}
}
}
}
else {
var isClickMemo = false;
......@@ -846,14 +846,14 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
/* check exist object in mouse position */
var hitPageObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if (hitPageObj) {
if(!CONTENTVIEW.is3DObject(hitPageObj)){
hitPageObj.action();
hitPageObj.action();
}
else{
//event.preventDefault();
}
}
}
else {
......@@ -867,7 +867,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
/*set true for flag click memo */
isClickLinkList = true;
}
}
}
}
......@@ -878,52 +878,52 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
//START TRB00097
if(CONTENTVIEW.userScale == 1){
CONTENTVIEW_EVENTS.prevPage_click();
CONTENTVIEW_EVENTS.prevPage_click();
}
//END TRB00097
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
}
}
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
//START TRB00097
if(CONTENTVIEW.userScale == 1){
CONTENTVIEW_EVENTS.nextPage_click();
}
//END TRB00097
CONTENTVIEW_EVENTS.nextPage_click();
}
//END TRB00097
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
}
}
}
if(!CONTENTVIEW_EVENTS.isPreventClick){
//その他のエリア
//console.log("click!!");
}
}
}
}
}
}
else {
}
else {
if (ClientData.IsAddingMarking() == false && CONTENTVIEW_GENERAL.isCopyMemo == false) {
var cwMain = $('#main').width();
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
if (event.pageX > 0 && event.pageX < 300) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
if(!CONTENTVIEW_EVENTS.isPreventClick){
CONTENTVIEW_EVENTS.prevPage_click();
//CONTENTVIEW_EVENTS.isPreventClick = true;
//CONTENTVIEW_EVENTS.isPreventClick = true;
}
else{
CONTENTVIEW_EVENTS.isPreventClick = false;
}
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
CONTENTVIEW_EVENTS.nextPage_click();
}
else{
......@@ -931,7 +931,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
}
}
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
}
}
}
}
CONTENTVIEW.cancelClick = false;
......@@ -941,18 +941,18 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
CONTENTVIEW_EVENTS.mouseWheel_CanvasMain = function(event, detail) {
//console.log("mouseWheel:" + detail);
//event.preventDefault();
//event.preventDefault();
if(CONTENTVIEW_EVENTS._isTouching){
return;
}
if(ClientData.IsAddingMarking() == true){
return;
return;
}
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW.moveFlag = false;
CONTENTVIEW.moveFlag = false;
}
/* base image move when userScale over 1 */
......@@ -977,26 +977,26 @@ CONTENTVIEW_EVENTS.mouseWheel_CanvasMain = function(event, detail) {
};
CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
event.preventDefault();
event.preventDefault();
//Start Function : No.20 - Editor : Long
if(CONTENTVIEW_EVENTS._isTouching){
//CONTENTVIEW_EVENTS._isTouching = false;
return;
}
if(ClientData.IsAddingMarking() == true){
return;
return;
}
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW.moveFlag = false;
CONTENTVIEW.moveFlag = false;
}
//End Function : No.20 - Editor : Long
//event.preventDefault();
//event.preventDefault();
/* base image move when userScale over 1 */
if (CONTENTVIEW.moveFlag && CONTENTVIEW.userScale != 1) {
$('#main').css('cursor', 'pointer');
......@@ -1044,11 +1044,11 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
//Prevent 3d animate when moving
CONTENTVIEW_EVENTS.isPageTransition = true;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
CONTENTVIEW_EVENTS.isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
var x = event.pageX;
var y = event.pageY;
var deltaX = x - CONTENTVIEW_GENERAL.px;
......@@ -1057,22 +1057,22 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
CONTENTVIEW_GENERAL.py = y;
currPos = {x:event.pageX,y:event.pageY};
// pevious page not exist -> do not move
if(!CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
if(currPos.x >= CONTENTVIEW_GENERAL._clickFirstPos.x){
return;
}
}
}
// next page not exist -> do not move
if(!CONTENTVIEW_GETDATA.getContent().hasNextPage()){
if(currPos.x <= CONTENTVIEW_GENERAL._clickFirstPos.x){
return;
}
return;
}
}
//examinate direction
//examinate direction
if(CONTENTVIEW_GENERAL._moveNum==0 && deltaX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
}
......@@ -1092,29 +1092,29 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
if(CONTENTVIEW_GENERAL._moveNum==0 && deltaX > 0){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
}
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
var left = $('#canvasWrapper').css('left').replace("px","");
left = parseInt(left) + deltaX;
$('#canvasWrapper').css('left', left + "px");
}
}
}
if(CONTENTVIEW.moveFlag == false && CONTENTVIEW_EVENTS._3dAnimate == true){
if(CONTENTVIEW.moveFlag == false && CONTENTVIEW_EVENTS._3dAnimate == true){
var imagePt = CONTENTVIEW.screenToImage(event.pageX, event.pageY);
var hitObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
if(CONTENTVIEW.is3DObject(hitObj)){
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
}
}
}
//End Function : No.20
var cwMain = $('#main').width();
var chMain = $('#main').height();
......@@ -1134,7 +1134,7 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
} else {
$('#button_pre_canvas').css('opacity', '0');
}
}
}
else {
$('#button_pre_canvas').css('opacity', '0');
}
......@@ -1157,97 +1157,97 @@ CONTENTVIEW_EVENTS.mouseMove_CanvasMain = function(event) {
} else {
$('#button_next_canvas').css('opacity', '0');
}
};
CONTENTVIEW_EVENTS.mouseDown_CanvasMain = function(event) {
event.preventDefault();
//Start Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
//Start Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(CONTENTVIEW_EVENTS._isTouching){
// //CONTENTVIEW_EVENTS._isTouching = false;
return;
return;
}
if(ClientData.IsAddingMarking() == true){
return;
return;
}
//End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
//End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(!CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW.moveFlag = true;
}
else{
CONTENTVIEW.moveFlag = false;
}
//event.preventDefault();
//event.preventDefault();
$('#main').css('cursor', 'default');
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
CONTENTVIEW_GENERAL.px = event.pageX;
CONTENTVIEW_GENERAL.py = event.pageY;
CONTENTVIEW_GENERAL.py = event.pageY;
//Start Function : No.20
CONTENTVIEW_GENERAL._clickFirstPos = {x:event.pageX, y: event.pageY};
CONTENTVIEW_GENERAL._clickLastPos = {x:event.pageX, y: event.pageY};
CONTENTVIEW_GENERAL._moveNum = 0;
CONTENTVIEW_GENERAL._moveNum = 0;
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
//End Function : No.20
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
}
//End Function : No.20
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = CONTENTVIEW.screenToImage(CONTENTVIEW_GENERAL.px, CONTENTVIEW_GENERAL.py);
var hitPageObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
CONTENTVIEW.moveFlag = true;
CONTENTVIEW_EVENTS._3dAnimate = false;
if(CONTENTVIEW.is3DObject(hitPageObj)){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(CONTENTVIEW.is3DObject(hitPageObj)){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(!CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS._3dAnimate = true;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
CONTENTVIEW.moveFlag = false;
hitPageObj.action(imagePt);
CONTENTVIEW.moveFlag = false;
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW.moveFlag = true;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
CONTENTVIEW.moveFlag = true;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
else {
//event.preventDefault();
CONTENTVIEW_GENERAL.px = event.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = event.targetTouches[0].pageY;
CONTENTVIEW_GENERAL.py = event.targetTouches[0].pageY;
}
};
CONTENTVIEW_EVENTS.mouseUp_CanvasMain = function(event) {
event.preventDefault();
if(ClientData.IsAddingMarking() == true){
return;
return;
}
if(CONTENTVIEW.moveFlag) {
CONTENTVIEW.moveFlag = false;
$('#main').css('cursor', 'default');
......@@ -1259,24 +1259,24 @@ CONTENTVIEW_EVENTS.mouseUp_CanvasMain = function(event) {
}else {
CONTENTVIEW_GETDATA.correctCanvasPosition();
}
//Check if mouse move is fired to prevent click next/ prev page
//isInMouseMove = false;
}
if(CONTENTVIEW_EVENTS._3dAnimate == true){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
CONTENTVIEW_3D._curr3dObject.action();
}
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS.isPageTransition = false;
}
//End Function : No.20
};
......@@ -1289,9 +1289,9 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
//画面クリア
CONTENTVIEW_INITOBJECT.clearViewerComponent();
if (ClientData.JumpQueue()) {
var oldDataBack = ClientData.JumpQueue();
if (oldDataBack.length > 0) {
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
......@@ -1304,7 +1304,7 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
//} else {
// window.history.back();
//}
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
}
......@@ -1315,10 +1315,10 @@ CONTENTVIEW_EVENTS.imgBack_click = function() {
//} else {
// window.history.back();
//}
//元の画面に戻って画面復帰
CONTENTVIEW.screenBack();
}
};
......@@ -1355,7 +1355,7 @@ CONTENTVIEW_EVENTS.click_liAddMemo = function(event) {
$("#overlay").hide();
//ClientData.memo_copyText(null);
//ClientData.IsAddingMemo(false);
//ClientData.IsAddingMemo(false);
};
CONTENTVIEW_EVENTS.click_liCopyMemo = function() {
......@@ -1365,8 +1365,8 @@ CONTENTVIEW_EVENTS.click_liCopyMemo = function() {
/* unlock dialog overlay */
$("#overlay").hide();
//ClientData.memo_copyText(null);
//ClientData.IsAddingMemo(false);
//ClientData.memo_copyText(null);
//ClientData.IsAddingMemo(false);
};
CONTENTVIEW_EVENTS.click_liDeleteMemo = function() {
......@@ -1389,45 +1389,45 @@ CONTENTVIEW_EVENTS.click_liDeleteMemo = function() {
*/
CONTENTVIEW_EVENTS.resetNaviAction = function(){
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
CONTENTVIEW_GENERAL._moveNum = 0;
CONTENTVIEW_GENERAL._moveNum = 0;
CONTENTVIEW_GENERAL.touchStartedTime = new Date();
$('#mainPre').css("display",'none');
$('#mainNext').css("display",'none');
CONTENTVIEW_GENERAL._touchFirstPos = null;
CONTENTVIEW_GENERAL._touchLastPos=null;
//console.log("================correctCanvasPosition===============");
//console.log("================correctCanvasPosition===============");
CONTENTVIEW_GETDATA.correctCanvasPosition();
};
CONTENTVIEW_EVENTS.onTouchstart = function(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
return;
}
//evt.preventDefault();
//$('#debug').html("CONTENTVIEW_EVENTS.onTouchstart");
//CONTENTVIEW_STREAMING.handleDisplayToolbar();
var bContinue = true;
if( CONTENTVIEW_GENERAL._bTouchDeviceEnabled || CONTENTVIEW_GENERAL._bWin8TouchEnabled){
evt.preventDefault();
evt.stopPropagation();
}
if(CONTENTVIEW_GENERAL.isLoadingObject){
bContinue = false;
}
}
if( evt.pointerType != null ){
//console.log("evt.pointerType:" + evt.pointerType);
//evt.pointerType は IE以外 undef
switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH:
CONTENTVIEW_EVENTS._isTouching = true;
break;
break;
case evt.MSPOINTER_TYPE_PEN:
bContinue = false;
break;
......@@ -1439,21 +1439,21 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
} else {
CONTENTVIEW_EVENTS._isTouching = true;
}
if(!bContinue){
return;
return;
}
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageZoomTouch = false;
var touch1 = null;
var touch2 = null;
var touch2 = null;
CONTENTVIEW_GENERAL._touchLastPos = null;
CONTENTVIEW_GENERAL._touchFirstPos = null;
if(CONTENTVIEW_GENERAL._bWin8TouchEnabled){
CONTENTVIEW_GENERAL._bufferPoints = [];
if(CONTENTVIEW_GENERAL._startPoints.length == 0){
// start navi page case
......@@ -1466,44 +1466,44 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
else{
CONTENTVIEW_EVENTS.touchDownFirstPosX = evt.clientX;
CONTENTVIEW_EVENTS.touchDownFirstPosY = evt.clientY;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = CONTENTVIEW.screenToImage(evt.pageX, evt.pageY);
var hitPageObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
CONTENTVIEW_EVENTS._3dAnimate = false;
if (hitPageObj) {
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(CONTENTVIEW.is3DObject(hitPageObj)){
if(CONTENTVIEW_EVENTS.isPageTransition){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(CONTENTVIEW.is3DObject(hitPageObj)){
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS._3dAnimate = false;
}
else{
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
CONTENTVIEW_EVENTS._3dAnimate = true;
CONTENTVIEW_EVENTS._3dAnimate = true;
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
}
else if(CONTENTVIEW_GENERAL._startPoints.length == 1){
// start zoom page action
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
// reset navi page action if exists
CONTENTVIEW_EVENTS.resetNaviAction();
}
CONTENTVIEW_EVENTS.resetNaviAction();
}
touch1 = CONTENTVIEW_GENERAL._startPoints[0];
touch2 = {clientX: evt.clientX, clientY: evt.clientY,pointerId: evt.pointerId};
CONTENTVIEW_GENERAL._startPoints.push(touch2);
//set last dist
CONTENTVIEW_GENERAL._lastDist = CONTENTVIEW_EVENTS.getDistance({
x: touch1.clientX,
......@@ -1512,27 +1512,27 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
x: touch2.clientX,
y: touch2.clientY
});
CONTENTVIEW_GENERAL.px = touch1.clientX+touch2.clientX/2;
CONTENTVIEW_GENERAL.py = touch1.clientY+touch2.clientY/2;
}
}
else {
//when CONTENTVIEW_GENERAL._startPoints.length > 1
touch1 = {clientX: evt.clientX, clientY: evt.clientY,pointerId: evt.pointerId};
CONTENTVIEW_GENERAL._startPoints.push(touch1);
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.resetNaviAction();
}
}
if(CONTENTVIEW_GENERAL._isPageZoomTouch){
CONTENTVIEW_EVENTS.resetZoomAction();
}
}
}
}
else{
// not is win 8 touch event
else{
// not is win 8 touch event
touch1 = evt.touches[0];
touch2 = evt.touches[1];
if(touch2 == null){
......@@ -1541,50 +1541,50 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
CONTENTVIEW_EVENTS._touchPageY = evt.touches[0].pageY;
//set touch to move page flag
if(CONTENTVIEW.userScale == 1){
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
CONTENTVIEW_GENERAL._moveNum = 0;
CONTENTVIEW_GENERAL.touchStartedTime = new Date();
// set first and last Pos
CONTENTVIEW_GENERAL._touchFirstPos = {x:touch1.clientX, y: touch1.clientX};
CONTENTVIEW_GENERAL._touchLastPos = {x:touch1.clientX, y: touch1.clientX};
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = CONTENTVIEW.screenToImage(touch1.pageX, touch1.pageY);
var hitPageObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if(CONTENTVIEW.is3DObject(hitPageObj)){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if (hitPageObj) {
if(CONTENTVIEW.is3DObject(hitPageObj)){
//START TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._isClick = true;
}
else{
else{
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown;
CONTENTVIEW_3D._curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
CONTENTVIEW_EVENTS._3dAnimate = true;
CONTENTVIEW_EVENTS._isClick = false;
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
//END TRB00090 - Editor: Long - Date : 09/26/2013 - Summary : remove time to detect 3d animate
}
else{
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._isClick = true;
}
}
}
else{
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_EVENTS._isClick = true;
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
else if(CONTENTVIEW.userScale != 1){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
......@@ -1597,10 +1597,10 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
else {
//ここにこない
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
}
}
}
//set begin value for zoom
if(touch1 && touch2) {
CONTENTVIEW_GENERAL._lastDist = CONTENTVIEW_EVENTS.getDistance({
......@@ -1612,31 +1612,31 @@ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
});
CONTENTVIEW_GENERAL.px = touch1.clientX+touch2.clientX/2;
CONTENTVIEW_GENERAL.py = touch1.clientY+touch1.clientY/2;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
}
}
}
};
//CONTENTVIEW_EVENTS.TouchmoveCount = 0;
CONTENTVIEW_EVENTS.onTouchmove = function(evt){
if(ClientData.IsAddingMarking() == true){
return;
return;
}
var bContinue = true;
if(CONTENTVIEW_GENERAL.isLoadingObject){
bContinue = false;
}
if( evt.pointerType != null ){
//evt.pointerType は IE以外 undef
switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH:
CONTENTVIEW_EVENTS._isTouching = true;
break;
break;
case evt.MSPOINTER_TYPE_PEN:
bContinue = false;
break;
......@@ -1648,33 +1648,33 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
} else {
CONTENTVIEW_EVENTS._isTouching = true;
}
if(!bContinue){
return;
return;
}
if(CONTENTVIEW_GENERAL._bTouchDeviceEnabled || CONTENTVIEW_GENERAL._bWin8TouchEnabled){
evt.preventDefault();
evt.stopPropagation();
}
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// CONTENTVIEW_EVENTS.TouchmoveCount = CONTENTVIEW_EVENTS.TouchmoveCount + 1;
//}
var touch1 = null;
var touch2 = null;
if(CONTENTVIEW_GENERAL._bWin8TouchEnabled){
var touch2 = null;
if(CONTENTVIEW_GENERAL._bWin8TouchEnabled){
if(CONTENTVIEW_GENERAL._startPoints.length == 1){
//move page case
//move page case
//when change from zoom mode
if(CONTENTVIEW.userScale != 1){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
//START TRB00097
CONTENTVIEW.cancelClick = true;
//END TRB00097
$('#main').css('cursor', 'pointer');
$('#main').css('cursor', 'pointer');
var mx;
var my;
......@@ -1687,14 +1687,14 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
mx = evt.targetTouches[0].pageX - CONTENTVIEW_GENERAL.px;
my = evt.targetTouches[0].pageY - CONTENTVIEW_GENERAL.py;
}
var sx = 1 / CONTENTVIEW.userScale;
var sy = 1 / CONTENTVIEW.userScale;
// calc scaling moving distance
CONTENTVIEW.moveX = Math.round(-mx * sx);
CONTENTVIEW.moveY = Math.round(-my * sy);
// store current mouse point
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
CONTENTVIEW_GENERAL.px = evt.pageX;
......@@ -1703,65 +1703,65 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
CONTENTVIEW_GENERAL.px = evt.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = evt.targetTouches[0].pageY;
}
// redraw
CONTENTVIEW.flip();
CONTENTVIEW.zoomVideo();
CONTENTVIEW.closeDialogPopUpText();
CONTENTVIEW.closeDialogPopUpText();
}
else{
if(CONTENTVIEW_EVENTS._3dAnimate){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
var imagePt = CONTENTVIEW.screenToImage(evt.pageX, evt.pageY);
var hitObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
if(hitObj){
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
hitObj.action(imagePt);
}
}
else{
CONTENTVIEW_GENERAL._isPageNaviTouch = true;
//Detect is page transition to prevent 3d object animate
var posDiffX = evt.clientX - CONTENTVIEW_EVENTS.touchDownFirstPosX ;
var posDiffY = evt.clientY - CONTENTVIEW_EVENTS.touchDownFirstPosY ;
if(Math.abs(posDiffX) < CONTENTVIEW_EVENTS.clickLimitArea && Math.abs(posDiffY) < CONTENTVIEW_EVENTS.clickLimitArea){
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.isPreventClick = false;
}
CONTENTVIEW_EVENTS.isPreventClick = false;
}
else{
CONTENTVIEW_EVENTS.isPageTransition = true;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
//Prevent CLick when page is being transit
CONTENTVIEW_EVENTS.isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
}
CONTENTVIEW_EVENTS.isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
}
touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
CONTENTVIEW_GENERAL._bufferPoints.push(touch1); // add to buffer to use for another action if occur. ex: zoom page
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block');
$('#mainNext').css("display",'block');
}
CONTENTVIEW_GENERAL.touchStartedTime = new Date();
var temp = CONTENTVIEW_GENERAL._startPoints[0];
// set first and last Pos
if(CONTENTVIEW_GENERAL._touchFirstPos == null){
CONTENTVIEW_GENERAL._touchFirstPos = {x:temp.clientX, y: temp.clientX};
CONTENTVIEW_GENERAL._moveNum = 0;
}
}
if(CONTENTVIEW_GENERAL._touchLastPos==null){
CONTENTVIEW_GENERAL._touchLastPos = {x:temp.clientX, y: temp.clientX};
}
}
}
}
}
}
else if(CONTENTVIEW_GENERAL._startPoints.length == 2){
......@@ -1770,8 +1770,8 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
//rest navi touch if active
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.resetNaviAction();
}
}
//console.log("zoom page case");
if(CONTENTVIEW_GENERAL._bufferPoints.length == 0) {
//first point so that wait to next point
......@@ -1781,18 +1781,18 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
}else if(CONTENTVIEW_GENERAL._bufferPoints.length == 1) {
// second point so that get first point and process zoom page
touch1 = CONTENTVIEW_GENERAL._bufferPoints[0];
// check pointer id
if(touch1.pointerId == evt.pointerId){
// one touch session is identify by one pointerId
// in this case do nothing and go to get next pointerId
// in this case do nothing and go to get next pointerId
return;
}else if(touch1.pointerId > evt.pointerId){
CONTENTVIEW_GENERAL._bufferPoints = []; // reset buffer to get pointerId with correct order from begin
return;
return;
}
touch2 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
//console.log("_bufferPoints.length:" + CONTENTVIEW_GENERAL._bufferPoints.length);
CONTENTVIEW_GENERAL._bufferPoints = [];
}
......@@ -1801,7 +1801,7 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
//reset navi touch if active
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.resetNaviAction();
}
}
if(CONTENTVIEW_GENERAL._isPageZoomTouch){
CONTENTVIEW_EVENTS.resetZoomAction();
......@@ -1809,34 +1809,34 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
return;
}
//process
//process
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
currPos = {x:touch1.clientX, y: touch1.clientY};
if(!CONTENTVIEW_EVENTS.processNaviPage(currPos)){
// can not move to previous or next page
return;
return;
}
}
// zoom page case
if(CONTENTVIEW_GENERAL._isPageZoomTouch) {
CONTENTVIEW_EVENTS.processZoomPage(touch1, touch2);
}
}
}
else{
//CONTENTVIEW_EVENTS._isClick = false;
//CONTENTVIEW_EVENTS._isClick = false;
// for android or ipad
touch1 = evt.touches[0];
touch2 = evt.touches[1];
if( touch2 != null ){
CONTENTVIEW_EVENTS._isClick = false;
CONTENTVIEW_EVENTS._isClick = false;
}
if(CONTENTVIEW_EVENTS._3dAnimate){
var imagePt = CONTENTVIEW.screenToImage(touch1.pageX, touch1.pageY);
var hitObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
//START TRB00090 - Editor: Long - Date 09/30/2013 - Summary: Fix animate 3d object in ipad
......@@ -1844,88 +1844,88 @@ CONTENTVIEW_EVENTS.onTouchmove = function(evt){
if(CONTENTVIEW.is3DObject(hitObj)){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
hitObj.action(imagePt);
}
}
else{
CONTENTVIEW_EVENTS._3dAnimate = false;
//CONTENTVIEW_GENERAL._isPageNaviTouch = true;
}
}
//END TRB00090 - Editor: Long - Date 09/30/2013 - Summary: Fix animate 3d object in ipad
}
else{
//update last touch position
//update last touch position
if(touch2 == null && CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_EVENTS.isPageTransition = true;
currPos = {x:touch1.clientX, y: touch1.clientY};
if(!CONTENTVIEW_EVENTS._transitionObject.processNaviPage(currPos)){
// can not move to previous or next page
return;
return;
}
}
else{
//when change from zoom mode
if(CONTENTVIEW.userScale != 1){
$('#main').css('cursor', 'pointer');
$('#main').css('cursor', 'pointer');
var mx;
var my;
mx = evt.targetTouches[0].pageX - CONTENTVIEW_GENERAL.px;
my = evt.targetTouches[0].pageY - CONTENTVIEW_GENERAL.py;
var sx = 1 / CONTENTVIEW.userScale;
var sy = 1 / CONTENTVIEW.userScale;
// calc scaling moving distance
CONTENTVIEW.moveX = Math.round(-mx * sx);
CONTENTVIEW.moveY = Math.round(-my * sy);
//移動量調整
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW.moveX = CONTENTVIEW.moveX * 10;
CONTENTVIEW.moveY = CONTENTVIEW.moveY * 10;
}
CONTENTVIEW_GENERAL.px = evt.targetTouches[0].pageX;
CONTENTVIEW_GENERAL.py = evt.targetTouches[0].pageY;
// redraw
CONTENTVIEW.flip();
CONTENTVIEW.zoomVideo();
CONTENTVIEW.closeDialogPopUpText();
CONTENTVIEW.closeDialogPopUpText();
}
}
// zoom page case
if(touch1 && touch2) {
CONTENTVIEW_EVENTS.processZoomPage(touch1, touch2);
}
}
}
}
}
};
CONTENTVIEW_EVENTS.onTouchend = function(evt){
if(ClientData.IsAddingMarking() == true){
return;
return;
}
var bContinue = true;
if(CONTENTVIEW_GENERAL.isLoadingObject){
bContinue = false;
}
if( evt.pointerType != null ){
//evt.pointerType は IE以外 undef
switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH:
CONTENTVIEW_EVENTS._isTouching = true;
break;
break;
case evt.MSPOINTER_TYPE_PEN:
CONTENTVIEW_EVENTS._isTouching = false;
bContinue = false;
......@@ -1939,39 +1939,39 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//タッチ操作終了
CONTENTVIEW_EVENTS._isTouching = false;
}
if(!bContinue){
return;
}
return;
}
if(CONTENTVIEW_GENERAL._bTouchDeviceEnabled || CONTENTVIEW_GENERAL._bWin8TouchEnabled){
evt.preventDefault();
evt.stopPropagation();
}
CONTENTVIEW_GENERAL._lastScaleDelta = CONTENTVIEW.userScale -1;
if(CONTENTVIEW_GENERAL._bWin8TouchEnabled){
// reset all flag
CONTENTVIEW_GENERAL._startPoints = [];
CONTENTVIEW_GENERAL._bufferPoints = [];
if(CONTENTVIEW_EVENTS._3dAnimate == true){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
CONTENTVIEW_3D._curr3dObject.action();
}
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS.isPageTransition = false;
CONTENTVIEW_EVENTS.touchDownFirstPosX = 0;
CONTENTVIEW_EVENTS.touchDownFirstPosY = 0;
}
}
}
//move page if enough condition
//move page if enough condition
if(CONTENTVIEW_GENERAL._bTransitionEnable){
if(CONTENTVIEW_GENERAL._isPageNaviTouch){
CONTENTVIEW_GENERAL._isPageNaviTouch = false;
......@@ -2003,33 +2003,33 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
//Check if click event on ipad
if(CONTENTVIEW_EVENTS._isClick == true){
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW_EVENTS._isClick = false;
if(CONTENTVIEW_GENERAL.isLoadingObject){
CONTENTVIEW_EVENTS._isClick = false;
return;
}
else{
CONTENTVIEW.cancelClick = false;
}
if (!CONTENTVIEW.cancelClick) {
var imagePt = CONTENTVIEW.screenToImage(CONTENTVIEW_EVENTS._touchPageX, CONTENTVIEW_EVENTS._touchPageY);
var canvasWidth = $('#offscreen').width();
CONTENTVIEW_GENERAL.posXPopupMemo = CONTENTVIEW_EVENTS._touchPageX;
CONTENTVIEW_GENERAL.posYPopupMemo = CONTENTVIEW_EVENTS._touchPageY;
if ((CONTENTVIEW_EVENTS._touchPageX - CONTENTVIEW.marginX) >= CONTENTVIEW.destRect.left && (CONTENTVIEW_EVENTS._touchPageX - CONTENTVIEW.marginX) <= CONTENTVIEW.destRect.right) {
if (ClientData.IsAddingMemo() == true) {
if (!ClientData.memo_copyText()) {
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_EVENTS._touchPageX, CONTENTVIEW_EVENTS._touchPageY, function () {
//set flag change memo
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
CONTENTVIEW.drawMemoOnScreen();
//change image
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
......@@ -2037,28 +2037,28 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
else {
if (CONTENTVIEW_GENERAL.typeSelectMemo == 1) { /* add new */
CONTENTVIEW_MEMO.AddMemo(CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
CONTENTVIEW.drawMemoOnScreen();
//change image
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
} else if (CONTENTVIEW_GENERAL.typeSelectMemo == 2) { /* copy */
CONTENTVIEW_MEMO.CopyMemo(ClientData.memo_copyText(), CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex()), $('#divDialogMemo'), CONTENTVIEW_GENERAL.posXPopupMemo, CONTENTVIEW_GENERAL.posYPopupMemo, function () {
//set flag change memo
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
CONTENTVIEW.drawMemoOnScreen();
//change image
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
......@@ -2067,17 +2067,17 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
}
else{
var isClickMemo = false;
if (CONTENTVIEW_GENERAL.isOpenPopUpText == true) {
CONTENTVIEW_GENERAL.isOpenPopUpText = false;
CONTENTVIEW_POPUPTEXT.ClosePopupText();
}
if (CONTENTVIEW_GENERAL.isOpenPopUpMemo == true) {
CONTENTVIEW_GENERAL.isOpenPopUpMemo = false;
$("#pop_up_memo").hide();
}
/* click memo edit */
if (ClientData.IsDisplayMemo() == true) {
CONTENTVIEW_GETDATA.getAllMemoOfPage();
......@@ -2087,70 +2087,70 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
if (hitPageObjMemo.hitTest(imagePt.x, imagePt.y)) {
//console.log("PageObject Hit!! Id: " + hitPageObjMemo.id);
//hitPageObjMemo.action();
/* save object memo */
CONTENTVIEW_GENERAL.objEditMemo = hitPageObjMemo;
var posMemoX = CONTENTVIEW_EVENTS._touchPageX;
var posMemoY = CONTENTVIEW_EVENTS._touchPageY;
if (imagePt.y > CONTENTVIEW_GENERAL.heightEachPage - $("#pop_up_memo").height()) {
posMemoY = posMemoY - $("#pop_up_memo").height();
}
if (imagePt.x > CONTENTVIEW_GENERAL.widthEachPage - $("#pop_up_memo").width()) {
posMemoX = posMemoX - $("#pop_up_memo").width();
}
/*display pop-up-memo */
$("#pop_up_memo").css('top', posMemoY).css('left', posMemoX);
$("#pop_up_memo").show();
/*set true for flag click memo */
isClickMemo = true;
CONTENTVIEW_GENERAL.isOpenPopUpMemo = true;
}
}
}
/* click pageObject */
if (isClickMemo == false) {
var isClickLinkList = false;
/* check exist object in mouse position */
var hitPageObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if (hitPageObj) {
if(!CONTENTVIEW.is3DObject(hitPageObj)){
hitPageObj.action();
hitPageObj.action();
}
}
else {
/* check click link list */
for (var nIndex = 0; nIndex < CONTENTVIEW_CREATEOBJECT.webGetContentType4Objects.length; nIndex++) {
var hitPageObjLinkList = CONTENTVIEW_CREATEOBJECT.webGetContentType4Objects[nIndex];
if (hitPageObjLinkList.hitTest(imagePt.x, imagePt.y)) {
if(hitPageObjLinkList.pageNo == CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex())){
hitPageObjLinkList.action();
/*set true for flag click memo */
isClickLinkList = true;
}
}
}
}
if (isClickLinkList == false && ClientData.IsAddingMarking() == false) {
//Androidは遅いのでタッチエンドで描画
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// // redraw
// CONTENTVIEW.flip();
// CONTENTVIEW.zoomVideo();
// CONTENTVIEW.closeDialogPopUpText();
// CONTENTVIEW.closeDialogPopUpText();
//}
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
/* area next and prev page */
var cwMain = $('#main').width();
......@@ -2160,7 +2160,7 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
CONTENTVIEW_EVENTS.nextPage_click();
}
}
//CONTENTVIEW_STREAMING.debugLog("CONTENTVIEW_EVENTS.onTouchEnd");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile()) {
CONTENTVIEW.handleDisplayMobileToolbar();
......@@ -2168,20 +2168,20 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
}
}
}
}
}
}
else {
if (ClientData.IsAddingMarking() == false && CONTENTVIEW_GENERAL.isCopyMemo == false) {
//Androidは遅いのでタッチエンドで描画
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// // redraw
// CONTENTVIEW.flip();
// CONTENTVIEW.zoomVideo();
// CONTENTVIEW.closeDialogPopUpText();
// CONTENTVIEW.closeDialogPopUpText();
//}
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
var cwMain = $('#main').width();
if (CONTENTVIEW_EVENTS._touchPageX > 0 && CONTENTVIEW_EVENTS._touchPageX < 300) {
......@@ -2201,17 +2201,17 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
if(CONTENTVIEW_EVENTS._3dAnimate == true){
CONTENTVIEW_EVENTS._3dAnimate = false;
CONTENTVIEW_3D._3dAction = CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp;
CONTENTVIEW_3D._curr3dObject.action();
CONTENTVIEW_3D._curr3dObject.action();
}
if(CONTENTVIEW_EVENTS.isPageTransition){
CONTENTVIEW_EVENTS.isPageTransition = false;
}
}
}
};
CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
var dist = CONTENTVIEW_EVENTS.getDistance({
x: touch1.clientX,
y: touch1.clientY
......@@ -2219,33 +2219,33 @@ CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
x: touch2.clientX,
y: touch2.clientY
});
if(CONTENTVIEW_GENERAL._lastDist != dist) {
if(dist > CONTENTVIEW_GENERAL._lastDist){
if(dist > CONTENTVIEW_GENERAL._lastDist){
CONTENTVIEW.userScale += 0.05;
if (CONTENTVIEW.userScale > 4) {
CONTENTVIEW.userScale = 4;
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
}else {
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.flip();
//Start Function : No.4 - Editor : Long - Date : 08/13/2013 - Summary : Fix for zooming
if(CONTENTVIEW_GETDATA.getPageIndex() < CONTENTVIEW_GENERAL.totalPage - 1){
//START TRB00097
//CONTENTVIEW.flip(1);
//END TRB00097
}
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
//START TRB00097
//CONTENTVIEW.flip(2);
//END TRB00097
}
//End Function : No.4 - Editor : Long - Date : 08/13/2013 - Summary : Fix for zooming
/* zoom video */
CONTENTVIEW.zoomVideo();
}
......@@ -2266,7 +2266,7 @@ CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
//CONTENTVIEW.flip(1);
//END TRB00097
}
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
//START TRB00097
//CONTENTVIEW.flip(2);
......@@ -2278,8 +2278,8 @@ CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
}
}
}
CONTENTVIEW.checkDisableButtonZoom();
CONTENTVIEW.checkDisableButtonZoom();
};
/*
......@@ -2287,28 +2287,28 @@ CONTENTVIEW_EVENTS.processZoomPage = function(touch1, touch2){
*/
CONTENTVIEW_EVENTS.processNaviPage = function(currPos){
if(!CONTENTVIEW_GENERAL._bTransitionEnable){
return;
}
// get moved delta period
var lMoveX = currPos.x - CONTENTVIEW_GENERAL._touchLastPos.x;
// pevious page not exist -> do not move
if(!CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
if(currPos.x >= CONTENTVIEW_GENERAL._touchFirstPos.x){
return false;
}
}
}
// next page not exist -> do not move
if(!CONTENTVIEW_GETDATA.getContent().hasNextPage()){
if(currPos.x <= CONTENTVIEW_GENERAL._touchFirstPos.x){
return false;
}
return false;
}
}
//examinate direction
//examinate direction
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
}
......@@ -2329,16 +2329,16 @@ CONTENTVIEW_EVENTS.processNaviPage = function(currPos){
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
}
//console.log("_moveNum:" +CONTENTVIEW_GENERAL._moveNum);
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
var left = $('#canvasWrapper').css('left').replace("px","");
left = parseInt(left) + lMoveX ;
$('#canvasWrapper').css('left', left + "px");
}
CONTENTVIEW_GENERAL._touchLastPos = {x:currPos.x, y: currPos.y};
return true;
};
};
/*
* reset zoom action as point session increase
......@@ -2359,7 +2359,7 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
return;
// get moved delta period
var lMoveX = currPos.x - CONTENTVIEW_GENERAL._touchLastPos.x;
// pevious page not exist -> do not move
if(!CONTENTVIEW_GETDATA.getContent().hasPreviousPage()){
if(currPos.x >= CONTENTVIEW_GENERAL._touchFirstPos.x)
......@@ -2371,7 +2371,7 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
if(currPos.x <= CONTENTVIEW_GENERAL._touchFirstPos.x)
return false;
}
//examinate direction
//examinate direction
if(CONTENTVIEW_GENERAL._moveNum==0 && lMoveX < 0){
CONTENTVIEW_GENERAL._moveNum = 2; // go from right to left => next page
}
......@@ -2392,15 +2392,15 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
CONTENTVIEW_GENERAL._moveNum = -2; // go from left to right + back to left + go to right=> priveous page
}
//console.log("_moveNum:" +CONTENTVIEW_GENERAL._moveNum);
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
var left = $('#canvasWrapper').css('left').replace("px","");
left = parseInt(left) + lMoveX ;
$('#canvasWrapper').css('left', left + "px");
}
CONTENTVIEW_GENERAL._touchLastPos = {x:currPos.x, y: currPos.y};
return true;
return true;
};
CONTENTVIEW_EVENTS._transitionObject = new TransitionObject();
......@@ -2410,12 +2410,12 @@ $(function () {
});
CONTENTVIEW_EVENTS.ready = function(){
CONTENTVIEW_EVENTS.altMode = false;
CONTENTVIEW_EVENTS.altMode = false;
//limit area to detech if it is click(on win8)
CONTENTVIEW_EVENTS.clickLimitArea = 20;
//touch position
//touch position
CONTENTVIEW_EVENTS.touchDownFirstPosX = 0;
CONTENTVIEW_EVENTS.touchDownFirstPosY = 0;
//position for click event on touch device
......@@ -2431,6 +2431,6 @@ CONTENTVIEW_EVENTS.ready = function(){
CONTENTVIEW_EVENTS._3dAnimate = false;
//is prevent click event
CONTENTVIEW_EVENTS.isPreventClick = false;
};
......@@ -3,11 +3,11 @@
var CONTENTVIEW_GENERAL = {};
CONTENTVIEW_GENERAL.getNextContent = function(){
return CONTENTVIEW_GENERAL.nextContent;
return CONTENTVIEW_GENERAL.nextContent;
};
CONTENTVIEW_GENERAL.getPrevContent = function(){
return CONTENTVIEW_GENERAL.prevContent;
return CONTENTVIEW_GENERAL.prevContent;
};
//End Function : No.9
......@@ -202,16 +202,16 @@ CONTENTVIEW_GENERAL.enableAllControl = function() {
//Start Function: No.12
if (CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile) {
$("#slider_page").slider("option", "disabled", false);
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
COMMON.enable('#txtSearch', '#txtSlider');
}
COMMON.enable('#txtSearch', '#txtSlider');
}
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
COMMON.enable('#txtSlider');
}
}
}
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() == false && CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
$('#button_next_canvas').css('display', 'block');
$('#button_pre_canvas').css('display', 'block');
......@@ -330,7 +330,7 @@ CONTENTVIEW_GENERAL.enableAllControl = function() {
}
}
}
if( ClientData.isGetitsMode() == true ){
$('#imgHome').unbind('click');
$('#imgHome').removeClass();
......@@ -341,7 +341,7 @@ CONTENTVIEW_GENERAL.enableAllControl = function() {
$('#imgBack').removeClass();
$('#imgBack').addClass('back_off');
}
CONTENTVIEW.checkExistNextPrePage();
};
......@@ -353,14 +353,14 @@ CONTENTVIEW_GENERAL.clearCanvas = function(targetCanvas) {
};
CONTENTVIEW_GENERAL.showDialog = function(modal) {
if(ClientData.isStreamingMode() || CONTENTVIEW_GENERAL.avwUserEnvObj.isMobile()){
$("#dialog").css('z-index', 998);
$("#dialog").fadeIn(300);
} else {
$("#overlay").show();
$("#dialog").fadeIn(300);
if (modal) {
$("#overlay").unbind("click");
}
......@@ -370,7 +370,7 @@ CONTENTVIEW_GENERAL.showDialog = function(modal) {
});
}
}
};
CONTENTVIEW_GENERAL.hideDialog = function() {
......@@ -384,7 +384,7 @@ $(function () {
});
CONTENTVIEW_GENERAL.ready = function(){
/* init variable */
CONTENTVIEW_GENERAL.pageImages = '';
CONTENTVIEW_GENERAL.totalPage = 0;
......@@ -503,7 +503,7 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.animateType = undefined;
CONTENTVIEW_GENERAL.animatePeriod = undefined;
//Start Function : No.20
//CONTENTVIEW_GENERAL._moveFlag = false;
CONTENTVIEW_GENERAL._moveNum = false;
......@@ -516,11 +516,11 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.touchStartedTime = null;
CONTENTVIEW_GENERAL._touchMoveTimePeriod = 0; // 0 s
CONTENTVIEW_GENERAL._touchMoveTimePeriodInvalid = 5000; // 5 s
//CONTENTVIEW_GENERAL._bHasNext = false;
//CONTENTVIEW_GENERAL._bHasPrev = false;
//CONTENTVIEW_GENERAL._bHasNext = false;
//CONTENTVIEW_GENERAL._bHasPrev = false;
CONTENTVIEW_GENERAL._startPoints = [];
CONTENTVIEW_GENERAL._bufferPoints = [];
//CONTENTVIEW_GENERAL._bImageMainReload = true; // to not run onload again on the next time on set src value
//CONTENTVIEW_GENERAL._bImageMainReload = true; // to not run onload again on the next time on set src value
//CONTENTVIEW_GENERAL._bImageMainPreReload = true; // to not run onload again on the next time on set src value
//CONTENTVIEW_GENERAL._bImageMainNextReload = true; // to not run onload again on the next time on set src value
CONTENTVIEW_GENERAL._lastDist = 0;
......@@ -529,10 +529,10 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL._bWin8TouchEnabled = false;
CONTENTVIEW_GENERAL._bTransitionEnable = true;
CONTENTVIEW_GENERAL._bTouchDeviceEnabled = false;
//Start Function : No.9
//Start Function : No.9
CONTENTVIEW_GENERAL._object3DImageArr = [];
};
......@@ -18,15 +18,15 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
if (contentData[nIndex].page == nIndexPage) {
currentPageObjects = contentData[nIndex].objects;
//Start Function: No.9 - Editor : Long - Summary :
//Start Function: No.9 - Editor : Long - Summary :
if(contentData[nIndex].contentDataSub != null && contentData[nIndex].contentDataSub.length > 0){
//currentPageObjects["contentDataSub"] = contentData[nIndex].contentDataSub;
for(var i = 0; i < currentPageObjects.length; i++){
var tempObj = currentPageObjects[i];
tempObj["contentDataSub"] = contentData[nIndex].contentDataSub;
}
}
//End Function: No.9 - Editor : Long
}
}
//End Function: No.9 - Editor : Long
break;
}
}
......@@ -74,6 +74,14 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
var pageObject = CONTENTVIEW_GETDATA.getMediaType11(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 12) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
}
}
}
......@@ -88,7 +96,7 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
* Action Type = 4 : image preview
* Action Type = 5 : jump page
* Action Type = 6 : email
* Action Type = 7 :
* Action Type = 7 :
* Action Type = 8 : popup
* Action Type = 9 : video
* Action Type = 10 : content
......@@ -107,14 +115,14 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['id'] = "MediaType1_" + iValueObj.action.actionType;
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if (iValueObj.action.actionType == 0) {
/*get mediaInfo */
if (iValueObj.mediaInfo) {
......@@ -214,12 +222,12 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
var dataImageFromResource = [];
pageObject['imagePreviewResourceIds'] = [];
//START TRB00077 - Editor : Long - Date: 09/24/2013- Summary : Display image preview no image
if(dataResourceImage){
if(dataResourceImage){
for (var nIndex = 0; nIndex < dataResourceImage.length; nIndex++) {
dataImageFromResource.push(AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceName=" + COMMON.removeExt(dataResourceImage[nIndex]));
}
pageObject['imagePreviewResourceIds'] = iValueObj.action.resourceIds;
}
}
//END TRB00077 - Editor : Long - Date: 09/24/2013- Summary : Display image preview no image
pageObject['imagePreview'] = dataImageFromResource;
......@@ -292,19 +300,19 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
pageObject['pageNo'] = iValueObj.action.pageNo;
}
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
else if(iValueObj.action.actionType == 11){
var resourceId = iValueObj.action.resourceId;
var resourceUrl = "";
//START TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
if(iValueObj.contentDataSub){
for(var i = 0; i < iValueObj.contentDataSub.length; i++){
var tempData = iValueObj.contentDataSub[i];
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
......@@ -314,19 +322,19 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
break;
}
}
}
}
//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=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
}
else if(iValueObj.action.actionType == 12){
pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
pageObject["questionNo"] = iValueObj.action.questionNo;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
......@@ -335,7 +343,7 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
pageObject["enquete"] = iValueObj.action.enquete;
//pageObject["objectId"] = iValueObj.action.objectId;
}
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
return pageObject;
};
......@@ -533,7 +541,7 @@ CONTENTVIEW_GETDATA.getMediaType6 = function(iValueObj) {
pageObject['actionType'] = '';
}
if(iValueObj.mediaInfo.resourceId){
pageObject['id'] = "trigger" + iValueObj.mediaInfo.resourceId;
}
......@@ -543,7 +551,7 @@ CONTENTVIEW_GETDATA.getMediaType6 = function(iValueObj) {
/*get mediaInfo */
if (iValueObj.mediaInfo) {
if(iValueObj.mediaInfo.resourceId){
/* get image from Json */
pageObject['imageUrl'] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
......@@ -551,8 +559,8 @@ CONTENTVIEW_GETDATA.getMediaType6 = function(iValueObj) {
else{
pageObject['imageUrl'] = 'img/iPad_video.png';
}
}
}
else {
pageObject['imageUrl'] = null;
}
......@@ -560,7 +568,7 @@ CONTENTVIEW_GETDATA.getMediaType6 = function(iValueObj) {
/*get index */
if (iValueObj.action.index) {
pageObject['index'] = iValueObj.action.index;
}
}
else {
pageObject['index'] = '';
}
......@@ -568,7 +576,7 @@ CONTENTVIEW_GETDATA.getMediaType6 = function(iValueObj) {
/*get target */
if (iValueObj.action.target) {
pageObject['target'] = iValueObj.action.target;
}
}
else {
pageObject['target'] = '';
}
......@@ -635,32 +643,32 @@ CONTENTVIEW_GETDATA.getMediaType7 = function(iValueObj) {
//Start Function : No.9 - Editor : Long - Date : 08/15/2013 - Summary : Handle 3d object
CONTENTVIEW_GETDATA.getMediaType8 = function(iValueObj) {
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType8_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
if(iValueObj.action.actionType == 9){
pageObject['horizonCount'] = iValueObj.mediaInfo.horizonCount;
pageObject['verticalCount'] = iValueObj.mediaInfo.verticalCount;
pageObject['initImage'] = AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
var _3dViewObject = [];
var data3d = iValueObj.action["3dview"];
var horizonCnt = 0;
var verticalCnt = 1;
var verticalCnt = 1;
while(verticalCnt <= iValueObj.mediaInfo.verticalCount){
horizonCnt++;
if(horizonCnt > iValueObj.mediaInfo.horizonCount){
......@@ -671,11 +679,11 @@ CONTENTVIEW_GETDATA.getMediaType8 = function(iValueObj) {
horizonCnt = 1;
}
_3dViewObject[CONTENTVIEW_GETDATA.convNumTo2Char(verticalCnt)+"-"+CONTENTVIEW_GETDATA.convNumTo2Char(horizonCnt)] =
AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId()
_3dViewObject[CONTENTVIEW_GETDATA.convNumTo2Char(verticalCnt)+"-"+CONTENTVIEW_GETDATA.convNumTo2Char(horizonCnt)] =
AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId()
+ "&resourceId=" + data3d[CONTENTVIEW_GETDATA.convNumTo2Char(verticalCnt) +"-"+ CONTENTVIEW_GETDATA.convNumTo2Char(horizonCnt)].resourceId;
}
}
pageObject['3dview'] = _3dViewObject;
}
......@@ -691,35 +699,35 @@ CONTENTVIEW_GETDATA.getMediaType8 = function(iValueObj) {
CONTENTVIEW_GETDATA.getMediaType9 = function(iValueObj) {
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType9_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if(iValueObj.action.actionType == 11){
if(iValueObj.action.actionType == 11){
var resourceId = iValueObj.mediaInfo.resourceId;
var resourceUrl = "";
//START TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
if(iValueObj.contentDataSub){
for(var i = 0; i < iValueObj.contentDataSub.length; i++){
var tempData = iValueObj.contentDataSub[i];
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
//DHカスタム
......@@ -730,43 +738,45 @@ CONTENTVIEW_GETDATA.getMediaType9 = function(iValueObj) {
break;
}
}
}
}
//START TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
pageObject["imageUrl"] = 'img/htmltype.png';
pageObject["resourceUrl"] = resourceUrl;
pageObject["resourceUrl"] = resourceUrl;
}
return pageObject;
};
CONTENTVIEW_GETDATA.getMediaType11 = function(iValueObj) {
console.log(iValueObj);
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType11_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if(iValueObj.action.actionType == 12){
if(iValueObj.action.actionType == 12){
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg';
pageObject["questionNo"] = iValueObj.action.questionNo;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
......@@ -779,11 +789,91 @@ CONTENTVIEW_GETDATA.getMediaType11 = function(iValueObj) {
return pageObject;
};
CONTENTVIEW_GETDATA.getMediaType12 = function(iValueObj) {
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType12_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if(iValueObj.action.actionType == 14){
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg';
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["resourceId"] = resourceId;
pageObject["enquete"] = iValueObj.action.enquete;
pageObject["showResult"] = iValueObj.action.showResult;
pageObject["sendResult"] = iValueObj.action.sendResult;
//pageObject["objectId"] = iValueObj.action.objectId;
}
return pageObject;
}
CONTENTVIEW_GETDATA.getMediaType13 = function(iValueObj) {
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType12_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
//詳細ログ用
try{
pageObject["objectId"] = iValueObj.action.objectId;
}catch(e){
pageObject["objectId"] = "";
}
if(iValueObj.action.actionType == 15){
var resourceId = iValueObj.mediaInfo.resourceId;
pageObject["imageUrl"] = 'img/anket.jpg';
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
pageObject["resourceId"] = resourceId;
pageObject["enquete"] = iValueObj.action.enquete;
//pageObject["objectId"] = iValueObj.action.objectId;
}
return pageObject;
}
CONTENTVIEW_GETDATA.convNumTo2Char = function(num){
var nRet = "";
if(num < 10)
nRet = "0" + num;
else
else
nRet = "" + num;
return nRet;
};
......@@ -904,7 +994,7 @@ CONTENTVIEW_GETDATA.getBookmarklist = function(pos) {
return false;
}
});
$('#bookmarkBoxHdBM').append(I18N.i18nText('txtShioriCtnLs'));
//title end
//COMMON.lockLayout();
......@@ -915,7 +1005,7 @@ CONTENTVIEW_GETDATA.getBookmarklist = function(pos) {
$("#divListBookmark").show();
$("#divListBookmark").offset({ left: pos[0], top: (pos[1] + $('#bookmarkBoxHdBM').height()) });
}
else {
else {
CONTENTVIEW.handleAPIWebContentPage(CONTENTVIEW_GENERAL.dataWebContentPage, pos)
}
};
......@@ -925,7 +1015,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
if (CONTENTVIEW_GENERAL.dataJsonType5.length > 0) {
$('#divListIndex').children().remove();
// $("#divListIndex").dialog({
// $("#divListIndex").dialog({
// show: "blind",
// modal: true,
// width: CONTENTVIEW_GENERAL.WIDTH_DIALOG_INDEX,
......@@ -938,7 +1028,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
//title start
$('#indexBoxHdIndex').children().remove();
$('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>');
//$("#indexClosing").click(CONTENTVIEW_EVENTS.closeIndexBox);
$("#indexClosing").on({
'click touchend': function(ev){
......@@ -950,7 +1040,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
return false;
}
});
$('#indexBoxHdIndex').append(I18N.i18nText('txtIndex'));
//title end
//COMMON.lockLayout();
......@@ -961,7 +1051,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
$("#divListIndex").show();
$("#divListIndex").offset({ left: pos[0], top: (pos[1] + $('#indexBoxHdIndex').height()) });
//set data for dialog index
//set data for dialog index
var dataContent = CONTENTVIEW_GENERAL.dataJsonType5;
var arrData = new Array();
$.each(dataContent, function (i, value) {
......@@ -994,7 +1084,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
$('#divListIndex').append('<span class="no-item">' + I18N.i18nText('msgNoIndex') + '</span>');
// //show dialog index
// $("#divListIndex").dialog({
// $("#divListIndex").dialog({
// show: "blind",
// modal: true,
// resizable:false,
......@@ -1006,7 +1096,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
//title start
$('#indexBoxHdIndex').children().remove();
$('#indexBoxHdIndex').html('<a id="indexClosing" class="delete" > </a>');
//$("#indexClosing").click(CONTENTVIEW_EVENTS.closeIndexBox);
$("#indexClosing").on({
'click touchend': function(ev){
......@@ -1018,7 +1108,7 @@ CONTENTVIEW_GETDATA.getPageIndexJson = function(pos) {
return false;
}
});
$('#indexBoxHdIndex').append(I18N.i18nText('txtIndex'));
//title end
//COMMON.lockLayout();
......@@ -1068,12 +1158,12 @@ CONTENTVIEW_GETDATA.getContentID = function() {
} else if (ClientData.IsJumpBack() == true) {
var dataJump = ClientData.JumpQueue();
CONTENTVIEW_GENERAL.contentID = dataJump[dataJump.length - 1].oldContentID;
//ストリーミングならデバイスに通知
if(ClientData.isStreamingMode()){
CONTENTVIEW_STREAMING.moveContent(CONTENTVIEW_GENERAL.contentID);
}
} else {
CONTENTVIEW_GENERAL.contentID = ClientData.contentInfo_contentId();
}
......@@ -1081,25 +1171,25 @@ CONTENTVIEW_GETDATA.getContentID = function() {
//Download resource
CONTENTVIEW_GETDATA.getResourceByIdFromAPI = function(resourceId){
return AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + resourceId;
return AVWEB.getURL("webResourceDownload") + "&sid=" + CONTENTVIEW.getSessionId() + "&resourceId=" + resourceId;
};
//Get content info type Image
CONTENTVIEW_GETDATA.getContentInfoTypeImage = function(){
var resourceUrl = CONTENTVIEW.downloadResourceById(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_GENERAL.resourceImage.onload = function(){
var resourceUrl = CONTENTVIEW.downloadResourceById(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_GENERAL.resourceImage.onload = function(){
CONTENTVIEW_GENERAL.widthContentImage = CONTENTVIEW_GENERAL.resourceImage.width;
CONTENTVIEW_GENERAL.heightContentImage = CONTENTVIEW_GENERAL.resourceImage.height;
CONTENTVIEW_GETDATA.getContent().setPageImages(1, resourceUrl).setUpPage(0);
CONTENTVIEW.handleSliderBar();
CONTENTVIEW_GENERAL.heightContentImage = CONTENTVIEW_GENERAL.resourceImage.height;
CONTENTVIEW_GETDATA.getContent().setPageImages(1, resourceUrl).setUpPage(0);
CONTENTVIEW.handleSliderBar();
CONTENTVIEW_GETDATA.getContentDataForImageType();
$('#lblSlider').text('/ ' + 1);
//Start: TRB00019 - Editor : Long - Date : 28/08/2013 - Summary : Fix for android resize
/* window resize event */
$(window).resize(function () {
......@@ -1132,21 +1222,21 @@ CONTENTVIEW_GETDATA.getContentInfoTypeImage = function(){
CONTENTVIEW.changePosDialog();
/* close dialog popuptext */
CONTENTVIEW.closeDialogResize();
CONTENTVIEW.closeDialogResize();
});
/*init Image Bookmark */
CONTENTVIEW_INITOBJECT.initImageBookmark();
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* check status */
CONTENTVIEW.checkStatusImageMarking();
CONTENTVIEW.trackTransforms(CONTENTVIEW_GENERAL.context_main);
if (COMMON.isTouchDevice() == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth;
......@@ -1177,14 +1267,14 @@ CONTENTVIEW_GETDATA.getContentDataForImageType = function(){
getType: '1',
isStreaming: ClientData.isStreamingMode()
};
CONTENTVIEW_CALLAPI.abapi('webGetContent', params, 'GET', function (data) {
CONTENTVIEW_GENERAL.imageTypeData = data.contentData;
//Set default page No to image Type
CONTENTVIEW_GENERAL.imageTypeData["pageNo"] = 1;
document.title = data.contentData.contentName + ' | ' + I18N.i18nText('sysAppTitle');
});
document.title = data.contentData.contentName + ' | ' + I18N.i18nText('sysAppTitle');
});
};
/* grab viewer content object */
......@@ -1241,35 +1331,35 @@ CONTENTVIEW_GETDATA.getPosVideo = function(px, py, width, height, scale) {
//Render next Page Content
CONTENTVIEW_GETDATA.renderNextPage = function(){
//Get next page Number
var pageNo = parseInt(CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex())) + 1;
//Get next page background image
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
//console.log("CONTENTVIEW_GETDATA.renderNextPage");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
CONTENTVIEW_GENERAL.nextPageImage = data;
function (data) {
CONTENTVIEW_GENERAL.nextPageImage = data;
CONTENTVIEW_GENERAL.nextContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.nextPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.nextPageObjects)
.setPageObjects(CONTENTVIEW_GENERAL.nextPageObjects)
.nextPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
//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){
CONTENTVIEW_GENERAL.nextPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.nextContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.nextPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.nextPageObjects)
.setPageObjects(CONTENTVIEW_GENERAL.nextPageObjects)
.nextPage();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
......@@ -1278,59 +1368,59 @@ CONTENTVIEW_GETDATA.renderNextPage = function(){
//Render prev Page Content
CONTENTVIEW_GETDATA.renderPrevPage = function(){
//Get prev page Number
var pageNo = parseInt(CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex())) - 1;
//Get prev page background image
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
//console.log("CONTENTVIEW_GETDATA.renderPrevPage");
AVWEB.avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: CONTENTVIEW_GENERAL.contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
function (data) {
CONTENTVIEW_GENERAL.prevPageImage = data;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.previousPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
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)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.previousPage();
}
};
//Get next page objects by page index
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.nextPageObjects = [];
console.log(contentData);
var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
if (contentData[nIndex].page == nIndexPage) {
currentPageObjects = contentData[nIndex].objects;
//Start Function: No.9 - Editor : Long - Summary :
//Start Function: No.9 - Editor : Long - Summary :
if(contentData[nIndex].contentDataSub != null && contentData[nIndex].contentDataSub.length > 0){
//currentPageObjects["contentDataSub"] = contentData[nIndex].contentDataSub;
for(var i = 0; i < currentPageObjects.length; i++){
var tempObj = currentPageObjects[i];
tempObj["contentDataSub"] = contentData[nIndex].contentDataSub;
}
}
//End Function: No.9 - Editor : Long
}
}
//End Function: No.9 - Editor : Long
break;
}
}
if (currentPageObjects != undefined) {
for (var nIndex = 0; nIndex < currentPageObjects.length; nIndex++) {
/*get object page*/
......@@ -1374,30 +1464,38 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
var pageObject = CONTENTVIEW_GETDATA.getMediaType11(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
}
} else if (currentPageObjects[nIndex].mediaType == 12) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
}
}
}
};
//Get prev page objects by page index
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.prevPageObjects = [];
var currentPageObjects;
for (var nIndex = 0; nIndex < contentData.length; nIndex++) {
if (contentData[nIndex].page == nIndexPage) {
currentPageObjects = contentData[nIndex].objects;
//Start Function: No.9 - Editor : Long - Summary :
//Start Function: No.9 - Editor : Long - Summary :
if(contentData[nIndex].contentDataSub != null && contentData[nIndex].contentDataSub.length > 0){
//currentPageObjects["contentDataSub"] = contentData[nIndex].contentDataSub;
for(var i = 0; i < currentPageObjects.length; i++){
var tempObj = currentPageObjects[i];
tempObj["contentDataSub"] = contentData[nIndex].contentDataSub;
}
}
//End Function: No.9 - Editor : Long
}
}
//End Function: No.9 - Editor : Long
break;
}
}
......@@ -1445,49 +1543,57 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
var pageObject = CONTENTVIEW_GETDATA.getMediaType11(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
}
} else if (currentPageObjects[nIndex].mediaType == 12) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType12(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 13) { /*mediaType = 12*/
var pageObject = CONTENTVIEW_GETDATA.getMediaType13(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
}
}
}
};
//Switch canvas when flipping page
CONTENTVIEW_GETDATA.switchCanvas = function(nav){
// change div id
//console.log("bf widthEachPage:" + CONTENTVIEW_GENERAL.widthEachPage + " widthEachNextPage:" + CONTENTVIEW_GENERAL.widthEachNextPage + " widthEachPrevPage:" + CONTENTVIEW_GENERAL.widthEachPrevPage);
//console.log("bf widthEachPageApi:" + CONTENTVIEW_GENERAL.widthEachPageApi + " CONTENTVIEW_GENERAL.widthEachNextPageApi:" + CONTENTVIEW_GENERAL.widthEachNextPageApi + " widthEachPrevPageApi:" + CONTENTVIEW_GENERAL.widthEachPrevPageApi);
if(nav == 1){
$('#mainPre').attr("id","mainPreBK");
$('#main').attr("id","mainPre");
$('#mainNext').attr("id","main");
$('#mainPreBK').attr("id","mainNext");
$('#offscreenPre').attr("id","mainPreBK");
$('#offscreen').attr("id","offscreenPre");
$('#offscreenNext').attr("id","offscreen");
$('#mainPreBK').attr("id","offscreenNext");
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
CONTENTVIEW_GENERAL.widthEachPrevPage = CONTENTVIEW_GENERAL.widthEachPage;
CONTENTVIEW_GENERAL.widthEachPage = CONTENTVIEW_GENERAL.widthEachNextPage;
//#11478
CONTENTVIEW_GENERAL.widthEachPrevPageApi = CONTENTVIEW_GENERAL.widthEachPageApi;
CONTENTVIEW_GENERAL.widthEachPageApi = CONTENTVIEW_GENERAL.widthEachNextPageApi;
CONTENTVIEW_GENERAL.heightEachPrevPage = CONTENTVIEW_GENERAL.heightEachPage;
CONTENTVIEW_GENERAL.heightEachPage = CONTENTVIEW_GENERAL.heightEachNextPage;
//#11478
CONTENTVIEW_GENERAL.heightEachPrevPageApi = CONTENTVIEW_GENERAL.heightEachPageApi;
CONTENTVIEW_GENERAL.heightEachPageApi = CONTENTVIEW_GENERAL.heightEachNextPageApi;
CONTENTVIEW.srcRectPrev = CONTENTVIEW.srcRect;
CONTENTVIEW.srcRect = CONTENTVIEW.srcRectNext;
CONTENTVIEW.srcRect = CONTENTVIEW.srcRectNext;
CONTENTVIEW.destRectPrev = CONTENTVIEW.destRect;
CONTENTVIEW.destRect = CONTENTVIEW.destRectNext;
//#12373
CONTENTVIEW.userScale = 1;
CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
......@@ -1501,31 +1607,31 @@ CONTENTVIEW_GETDATA.switchCanvas = function(nav){
$('#main').attr("id","mainNext");
$('#mainPre').attr("id","main");
$('#mainNextBK').attr("id","mainPre");
$('#offscreenNext').attr("id","mainNextBK");
$('#offscreen').attr("id","offscreenNext");
$('#offscreenPre').attr("id","offscreen");
$('#mainNextBK').attr("id","offscreenPre");
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
CONTENTVIEW_GENERAL.widthEachNextPage = CONTENTVIEW_GENERAL.widthEachPage;
CONTENTVIEW_GENERAL.widthEachPage = CONTENTVIEW_GENERAL.widthEachPrevPage;
//#11478
CONTENTVIEW_GENERAL.widthEachNextPageApi = CONTENTVIEW_GENERAL.widthEachPageApi;
CONTENTVIEW_GENERAL.widthEachPageApi = CONTENTVIEW_GENERAL.widthEachPrevPageApi;
CONTENTVIEW_GENERAL.heightEachNextPage = CONTENTVIEW_GENERAL.heightEachPage;
CONTENTVIEW_GENERAL.heightEachPage = CONTENTVIEW_GENERAL.heightEachPrevPage;
//#11478
CONTENTVIEW_GENERAL.heightEachNextPageApi = CONTENTVIEW_GENERAL.heightEachPageApi;
CONTENTVIEW_GENERAL.heightEachPageApi = CONTENTVIEW_GENERAL.heightEachPrevPageApi;
CONTENTVIEW.srcRectNext = CONTENTVIEW.srcRect;
CONTENTVIEW.srcRect = CONTENTVIEW.srcRectPrev;
CONTENTVIEW.srcRect = CONTENTVIEW.srcRectPrev;
CONTENTVIEW.destRectNext = CONTENTVIEW.destRect;
CONTENTVIEW.destRect = CONTENTVIEW.destRectPrev;
//#12373
CONTENTVIEW.userScale = 1;
//#12373
......@@ -1533,70 +1639,70 @@ CONTENTVIEW_GETDATA.switchCanvas = function(nav){
CONTENTVIEW.flip();
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
}
//console.log("af widthEachPage:" + CONTENTVIEW_GENERAL.widthEachPage + " widthEachNextPage:" + CONTENTVIEW_GENERAL.widthEachNextPage + " widthEachPrevPage:" + CONTENTVIEW_GENERAL.widthEachPrevPage);
//console.log("af widthEachPageApi:" + CONTENTVIEW_GENERAL.widthEachPageApi + " widthEachNextPageApi:" + CONTENTVIEW_GENERAL.widthEachNextPageApi + " widthEachPrevPageApi:" + CONTENTVIEW_GENERAL.widthEachPrevPageApi);
};
//Assign content properties
CONTENTVIEW_GETDATA.assignCurrentContentPage = function(nav){
if(nav == 1){
if(nav == 1){
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.pageImages = CONTENTVIEW_GENERAL.nextPageImage;
CONTENTVIEW_GENERAL.prevContent.currentPage = CONTENTVIEW.content.currentPage;
CONTENTVIEW_GENERAL.prevContent.pageCount = CONTENTVIEW.content.pageCount;
CONTENTVIEW_GENERAL.prevContent.pageImages = CONTENTVIEW.content.pageImages;
CONTENTVIEW_GENERAL.prevContent.pageIndex = CONTENTVIEW.content.pageIndex;
CONTENTVIEW_GENERAL.prevContent.pageObjects = CONTENTVIEW.content.pageObjects;
CONTENTVIEW_GENERAL.prevContent.pageObjects = CONTENTVIEW.content.pageObjects;
CONTENTVIEW.content.currentPage = CONTENTVIEW_GENERAL.nextContent.currentPage;
CONTENTVIEW.content.pageCount = CONTENTVIEW_GENERAL.nextContent.pageCount;
CONTENTVIEW.content.pageImages = CONTENTVIEW_GENERAL.nextContent.pageImages;
CONTENTVIEW.content.pageIndex = CONTENTVIEW_GENERAL.nextContent.pageIndex;
CONTENTVIEW.content.pageObjects = CONTENTVIEW_GENERAL.nextContent.pageObjects;
CONTENTVIEW_GENERAL.prevPageObjects = CONTENTVIEW_GENERAL.pageObjects;
CONTENTVIEW_GENERAL.pageObjects = CONTENTVIEW_GENERAL.nextPageObjects;
}
else{
CONTENTVIEW_GENERAL.nextPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.pageImages = CONTENTVIEW_GENERAL.prevPageImage;
CONTENTVIEW_GENERAL.nextContent.currentPage = CONTENTVIEW.content.currentPage;
CONTENTVIEW_GENERAL.nextContent.pageCount = CONTENTVIEW.content.pageCount;
CONTENTVIEW_GENERAL.nextContent.pageImages = CONTENTVIEW.content.pageImages;
CONTENTVIEW_GENERAL.nextContent.pageIndex = CONTENTVIEW.content.pageIndex;
CONTENTVIEW_GENERAL.nextContent.pageObjects = CONTENTVIEW.content.pageObjects;
CONTENTVIEW_GENERAL.nextContent.pageObjects = CONTENTVIEW.content.pageObjects;
CONTENTVIEW.content.currentPage = CONTENTVIEW_GENERAL.prevContent.currentPage;
CONTENTVIEW.content.pageCount = CONTENTVIEW_GENERAL.prevContent.pageCount;
CONTENTVIEW.content.pageImages = CONTENTVIEW_GENERAL.prevContent.pageImages;
CONTENTVIEW.content.pageIndex = CONTENTVIEW_GENERAL.prevContent.pageIndex;
CONTENTVIEW.content.pageObjects = CONTENTVIEW_GENERAL.prevContent.pageObjects;
CONTENTVIEW.content.pageObjects = CONTENTVIEW_GENERAL.prevContent.pageObjects;
CONTENTVIEW_GENERAL.nextPageObjects = CONTENTVIEW_GENERAL.pageObjects;
CONTENTVIEW_GENERAL.pageObjects = CONTENTVIEW_GENERAL.prevPageObjects;
}
//abe
//alert("assignCurrentContentPage:" + content.currentPage);
};
//Correct Canvas Position
CONTENTVIEW_GETDATA.correctCanvasPosition = function(){
//correct canvas position
// Set default value for moving3D object to prevent other object fired when
//hold on 3d object and move next or prev page.
//hold on 3d object and move next or prev page.
CONTENTVIEW_EVENTS._3dAnimate = false;
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#canvasWrapper').css("left",'0px');
$('#main').css("left",'13px');
......@@ -1607,11 +1713,11 @@ CONTENTVIEW_GETDATA.correctCanvasPosition = function(){
}
else if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_FadeIn){
$('#mainNext').css("z-index",'0');
$('#mainPre').css("z-index",'0');
$('#mainPre').css("z-index",'0');
$('#mainNext').css("display", 'none');
$('#mainPre').css("display", 'none');
$('#mainPre').css("display", 'none');
}
};
//Get Page Transition configuration
......
......@@ -44,16 +44,16 @@ CONTENTVIEW_INITOBJECT.initDisplayMarking = function() {
}
CONTENTVIEW_GENERAL.disableAllControl();
}
}
else {
//change image
//change image
if(ClientData.serviceOpt_marking() == 'Y'){
$('#imgmarkingtoolbar').removeClass();
$('#imgmarkingtoolbar').addClass('markingToolbar');
}
}
}
}
}
else {
$("#dlgMarking").hide();
......@@ -63,11 +63,11 @@ CONTENTVIEW_INITOBJECT.initDisplayMarking = function() {
$('#draw_canvas').css('display', 'none');
//change image
//change image
if(ClientData.serviceOpt_marking() == 'Y'){
$('#imgmarkingtoolbar').removeClass();
$('#imgmarkingtoolbar').addClass('markingToolbar');
}
}
}
};
......@@ -116,7 +116,7 @@ CONTENTVIEW_INITOBJECT.setLoadingSize = function(){
var objWidth = $('#divImageLoading').width() /2 ;
var result = width - objWidth;
$('#divImageLoading').css('left', result);
$('#divImageLoading').css('left', result);
};
//END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
CONTENTVIEW_INITOBJECT.initPage = function() {
......@@ -129,11 +129,11 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
$('#footer_toolbar_1').show();
/* init pos bottom toolbar*/
CONTENTVIEW_INITOBJECT.initDisplayToolbarDevice();
CONTENTVIEW_INITOBJECT.initDisplayToolbarDevice();
// Lock screen
//COMMON.LockScreen();
CONTENTVIEW.StartTimerUpdateLog();
/* set start log */
......@@ -151,7 +151,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
CONTENTVIEW_CALLAPI.getJsonContentInfo(CONTENTVIEW_INITOBJECT.ajaxComplete8);
CONTENTVIEW_GETDATA.getPageTransitionConfig();
}
CONTENTVIEW_INITOBJECT.initializeViewerComponent('wrapper');
/* handle display tooltip */
......@@ -189,7 +189,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
return false;
}
});
}
/*event click next page button */
......@@ -218,7 +218,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
return false;
}
});
$('#liAddMemo').click(CONTENTVIEW_EVENTS.click_liAddMemo);
$('#liCopyMemo').click(CONTENTVIEW_EVENTS.click_liCopyMemo);
$('#liDeleteMemo').click(CONTENTVIEW_EVENTS.click_liDeleteMemo);
......@@ -227,7 +227,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
/*event search*/
CONTENTVIEW_EVENTS.showListSearchResult();
}
/* zoom event */
$('#zoomin').click(CONTENTVIEW.zoomIn);
$('#zoomout').click(CONTENTVIEW.zoomOut);
......@@ -258,21 +258,21 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
CONTENTVIEW_GENERAL.disableAllControl();
/* window resize event */
$(window).resize(function () {
$(window).resize(function () {
CONTENTVIEW.setViewportForWin8();
CONTENTVIEW.sizingScreen();
CONTENTVIEW.sizingScreen();
/* close dialog popuptext */
CONTENTVIEW.closeDialogResize();
CONTENTVIEW_INITOBJECT.setLoadingSize();
});
};
CONTENTVIEW_INITOBJECT.ajaxComplete8 = function(){
/* handle from bookmark page */
//handleFromBookMarkPage();
//handleFromBookMarkPage();
/* check move content */
if (ClientData.bookmark_pageNo()) {
CONTENTVIEW.handleFromBookMarkPage();
......@@ -284,25 +284,25 @@ CONTENTVIEW_INITOBJECT.ajaxComplete8 = function(){
CONTENTVIEW.oldContent_Back();
} else {
if (CONTENTVIEW_GETDATA.getPageIndex() == 0) {
//コンテンツ差し替えチェック
CONTENTVIEW.deleteMaxPageOverData();
if(CONTENTVIEW_INITOBJECT.isHasPageBGM()){
CONTENTVIEW.isPendingContentBGM = true;
} else {
CONTENTVIEW.isPendingContentBGM = false;
}
//console.log("CONTENTVIEW_GENERAL.isFullScreen:" + CONTENTVIEW_GENERAL.isFullScreen);
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages)
.setPageObjects(CONTENTVIEW_GENERAL.pageObjects)
.setUpPage(0);
CONTENTVIEW_CREATEOBJECT.createPageBGM();
//Get next
//Get next
if(CONTENTVIEW_GENERAL.totalPage > 1){
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
//Render next page
......@@ -397,18 +397,18 @@ CONTENTVIEW_INITOBJECT.ajaxComplete8 = function(){
}
}
CONTENTVIEW.setViewportForWin8();
//console.log("ajaxComp8 end");
};
CONTENTVIEW_INITOBJECT.ajaxComplete4 = function(){
if(CONTENTVIEW_GENERAL.contentType != COMMON.ContentTypeKeys.Type_NoFile){
return;
}
/* handle from bookmark page */
//handleFromBookMarkPage();
//handleFromBookMarkPage();
/* check move content */
if (ClientData.bookmark_pageNo()) {
CONTENTVIEW.handleFromBookMarkPage();
......@@ -421,20 +421,20 @@ CONTENTVIEW_INITOBJECT.ajaxComplete4 = function(){
} else {
if (CONTENTVIEW_GETDATA.getPageIndex() == 0) {
if(CONTENTVIEW_INITOBJECT.isHasPageBGM()){
CONTENTVIEW.isPendingContentBGM = true;
CONTENTVIEW.isPendingContentBGM = true;
}
CONTENTVIEW_GETDATA.getContent().setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.pageImages)
.setPageObjects(CONTENTVIEW_GENERAL.pageObjects)
.setUpPage(0);
CONTENTVIEW_CREATEOBJECT.createPageBGM();
if(CONTENTVIEW_GENERAL.totalPage > 1){
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
//Render next page
CONTENTVIEW_GETDATA.renderNextPage();
}
/* set pageTitle*/
if (CONTENTVIEW_GENERAL.dataPageTitle[0]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[0] != '') {
......@@ -445,15 +445,15 @@ CONTENTVIEW_INITOBJECT.ajaxComplete4 = function(){
} else {
document.title = CONTENTVIEW_GENERAL.contentName + ' | ' + I18N.i18nText('sysAppTitle');
}
/* handle slider bar */
CONTENTVIEW.handleSliderBar();
}
}
/* window resize event */
$(window).resize(function () {
if (COMMON.isTouchDevice() == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var tempRatio = document.documentElement.clientWidth / window.innerWidth;
......@@ -474,37 +474,37 @@ CONTENTVIEW_INITOBJECT.ajaxComplete4 = function(){
}
}
}
CONTENTVIEW.resizeScreen();
CONTENTVIEW_GENERAL.isChangeSizeScreen = false;
/* change position dialog */
CONTENTVIEW.changePosDialog();
/* close dialog popuptext */
CONTENTVIEW.closeDialogResize();
CONTENTVIEW.closeDialogResize();
});
/* check status button */
CONTENTVIEW.checkExistNextPrePage();
/*init Image Bookmark */
CONTENTVIEW_INITOBJECT.initImageBookmark();
$('#lblSlider').text('/ ' + CONTENTVIEW_GENERAL.totalPage);
/* memo */
CONTENTVIEW_INITOBJECT.initImageMemo();
CONTENTVIEW_INITOBJECT.initImageAddMemo();
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* check status */
CONTENTVIEW.checkStatusImageMarking();
CONTENTVIEW.trackTransforms(CONTENTVIEW_GENERAL.context_main);
if (COMMON.isTouchDevice() == true) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
CONTENTVIEW_GENERAL.standardRatio = document.documentElement.clientWidth / window.innerWidth;
......@@ -521,14 +521,14 @@ CONTENTVIEW_INITOBJECT.ajaxComplete4 = function(){
CONTENTVIEW.sizingScreen();
}
}
CONTENTVIEW.setViewportForWin8();
};
//START TRB00069
CONTENTVIEW_INITOBJECT.isHasPageBGM = function(){
var iResult = false;
CONTENTVIEW_GETDATA.getPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, 0);
for (var nIndex = 0; nIndex < CONTENTVIEW_GENERAL.pageObjects.length; nIndex++) {
......@@ -537,14 +537,14 @@ CONTENTVIEW_INITOBJECT.isHasPageBGM = function(){
break;
}
}
return iResult;
return iResult;
};
//END TRB00069
CONTENTVIEW_INITOBJECT.initPageMediaAndHtmlType = function(){
//$('#divImageLoading').css('display', 'block');
/* init footer toolbar */
......@@ -556,37 +556,37 @@ CONTENTVIEW_INITOBJECT.initPageMediaAndHtmlType = function(){
// Lock screen
COMMON.LockScreen();
//START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
//START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
CONTENTVIEW.StartTimerUpdateLog();
/* set start log */
COMMON.SetStartLog(CONTENTVIEW_GENERAL.contentID);
COMMON.SetStartLog(CONTENTVIEW_GENERAL.contentID);
//END TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
//enable SpecifyControl
CONTENTVIEW.enableSpecifyControl();
//Display overlay dialog for specify content type
CONTENTVIEW.displayOverlayForSpecifyContentType();
//Resize window
$(window).resize(function () {
//Check if content is zooming
if(CONTENTVIEW.isZoomingContent){
//var $container = $("#dialog");
// var w = window.innerWidth;
//var h = window.innerHeight;
//$container.css('height', h);
//$container.css('width', w);
}
}
});
CONTENTVIEW.handleSliderBar();
$('#lblSlider').text('/ ' + 1);
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid() == false) {
$("#slider_page").slider("option", "disabled", true);
}
......@@ -596,14 +596,14 @@ CONTENTVIEW_INITOBJECT.initPageMediaAndHtmlType = function(){
//ビュアーのキャンバスの表示領域をクリアする
CONTENTVIEW_INITOBJECT.clearViewerComponent = function(){
if ($('#canvasWrapper').length) {
//次回開いた時に残るので消す
var canvas = document.getElementById('main');
var context = canvas.getContext('2d');
context.clearRect(0, 0, canvas.width, canvas.height);
$('#mainPre').html('');
$('#main').html('');
$('#mainNext').html('');
......@@ -618,7 +618,7 @@ CONTENTVIEW_INITOBJECT.clearViewerComponent = function(){
$('#playaudioallpage').html('');
$('#text').html('');
}
};
//Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas
......@@ -647,8 +647,8 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
'<div id="text"></div>'
);
}
/* apply css style */
$('#canvasWrapper').css(
{
......@@ -656,20 +656,20 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
'height' : '100%',
'width' : '100%',
'left': '0px'
}
);
//Start : Function : No.20 - Editor : Le Long - Date: 27/08/2013 - Summary : For performing on ipad. On Android 4.1.x do not use overflow : hidden in parent canvas
//to avoid draw duplicate canvas bug.
//to avoid draw duplicate canvas bug.
if(CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()){
$('#wrapper').css('overflow', 'hidden');
}
//End: Function : No.20 - Editor : Le Long - Date: 27/08/2013 - Summary : For performing on ipad. On Android 4.1.x do not use overflow : hidden in parent canvas
//to avoid draw duplicate canvas bug.
//to avoid draw duplicate canvas bug.
$('#main').css(
{
'position': 'absolute',
......@@ -678,15 +678,15 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
'box-shadow': '3px 3px 14px #333',
'border-radius': '4px',
'z-index' : '0'
}
);
);
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#mainNext').css(
{
'position': 'absolute',
'top': CONTENTVIEW.marginY + 'px',
'left': CONTENTVIEW.marginX + 'px',
......@@ -698,7 +698,7 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
);
$('#mainPre').css(
{
'position': 'absolute',
'top': CONTENTVIEW.marginY + 'px',
'left': CONTENTVIEW.marginX + 'px',
......@@ -712,7 +712,7 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
else{
$('#mainNext').css(
{
'position': 'absolute',
'top': CONTENTVIEW.marginY + 'px',
'left': CONTENTVIEW.marginX + 'px',
......@@ -724,7 +724,7 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
);
$('#mainPre').css(
{
'position': 'absolute',
'top': CONTENTVIEW.marginY + 'px',
'left': CONTENTVIEW.marginX + 'px',
......@@ -735,7 +735,7 @@ CONTENTVIEW_INITOBJECT.initializeViewerComponent = function(viewId) {
}
);
}
$('#offscreen').css(
{
'visibility': 'hidden',
......@@ -804,9 +804,9 @@ CONTENTVIEW_INITOBJECT.initImageCheckMarking = function() {
var dataMarking = ClientData.MarkingData();
var isExistMarking = false;
//Start Function: No.12 - Editor : Long
var tempPageNo = 0;
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_Image)
{
......@@ -816,8 +816,8 @@ CONTENTVIEW_INITOBJECT.initImageCheckMarking = function() {
tempPageNo = CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex());
}
//End Function: No.12 - Editor : Long
for (var nIndex = 0; nIndex < dataMarking.length; nIndex++) {
if (dataMarking[nIndex].contentid == CONTENTVIEW_GENERAL.contentID
&& dataMarking[nIndex].pageNo == tempPageNo) {
......
......@@ -920,7 +920,6 @@ HEADER.getPushMessageList = function() {
"post",
params,
function (data) {
console.log(data);
// reset number message
ClientData.pushInfo_newMsgNumber(0);
// hide number new message
......
......@@ -23,7 +23,12 @@ $(document).ready(function () {
$("#dspSave").click(SETTINGS.dspSave_Click);
$("#dspPwdUpd").click(SETTINGS.dspPwdUpd_Click);
if(ClientData.serviceOpt_encryption() == 'Y') {
$("#dspPwdUpd").hide();
} else {
$("#dspPwdUpd").click(SETTINGS.dspPwdUpd_Click);
}
$("#dspOptReset").click(SETTINGS.dspOptReset_Click);
......
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