Commit 721c5295 by vietdo

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

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