Commit d87075ce by Vo Duc Thang

08/23 Release

 No.1: 汎用プッシュメッセージ
 No.8: スクリーンロック
 No.4: ページめくり効果:  設定変更画面,コンテンツ閲覧画面 (Mouse on PCのみ)
parent 15f984ed
...@@ -297,7 +297,7 @@ var Keys = { ...@@ -297,7 +297,7 @@ var Keys = {
userOpt_bkShioriFlag: 'userOpt_bkShioriFlag', userOpt_bkShioriFlag: 'userOpt_bkShioriFlag',
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger // Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition: 'userOpt_pageTransition', userOpt_pageTransition: 'userOpt_pageTransition',
// Local :ユーザオプション(userOpt)_アニメーション時間:Interger // Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod: 'userOpt_pageTransitionPeriod' userOpt_pageTransitionPeriod: 'userOpt_pageTransitionPeriod'
...@@ -1140,7 +1140,7 @@ var ClientData = { ...@@ -1140,7 +1140,7 @@ var ClientData = {
} }
}, },
// Local :ユーザオプション(userOpt)_アニメーション時間:Interger // Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod: function (data) { userOpt_pageTransitionPeriod: function (data) {
if (arguments.length > 0) { if (arguments.length > 0) {
operateData(arguments, Keys.userOpt_pageTransitionPeriod, undefined); operateData(arguments, Keys.userOpt_pageTransitionPeriod, undefined);
...@@ -2037,8 +2037,9 @@ function getTimeWaitLockScreen() { ...@@ -2037,8 +2037,9 @@ function getTimeWaitLockScreen() {
} }
else else
{ {
timeWaitLockScreen = parseInt(ClientData.serviceOpt_web_screen_lock_wait()) * 60000; // time unit is minute var temp = ClientData.serviceOpt_web_screen_lock_wait();
if (timeWaitLockScreen < 0) { timeWaitLockScreen = temp * 60000; // time unit is minute
if (timeWaitLockScreen < 0 || temp % 1 != 0) {
timeWaitLockScreen = sysSettings.screenlockTimeDefault * 60000; timeWaitLockScreen = sysSettings.screenlockTimeDefault * 60000;
} }
else if (timeWaitLockScreen == 0) { // no lockscreen else if (timeWaitLockScreen == 0) { // no lockscreen
...@@ -2058,7 +2059,6 @@ function LockScreen() { ...@@ -2058,7 +2059,6 @@ function LockScreen() {
return; return;
} }
var timeWaitLockScreen = getTimeWaitLockScreen(); var timeWaitLockScreen = getTimeWaitLockScreen();
if (timeWaitLockScreen > 0) { if (timeWaitLockScreen > 0) {
//var message = i18nText("sysInfoScrLock01"); //var message = i18nText("sysInfoScrLock01");
screenLock({ screenLock({
...@@ -2134,6 +2134,16 @@ $(function () { ...@@ -2134,6 +2134,16 @@ $(function () {
if (ClientData.userOpt_logoutMode() == null || ClientData.userOpt_logoutMode() == undefined) { if (ClientData.userOpt_logoutMode() == null || ClientData.userOpt_logoutMode() == undefined) {
ClientData.userOpt_logoutMode(0); ClientData.userOpt_logoutMode(0);
} }
// set default page transition No.4
if (ClientData.userOpt_pageTransition() == null || ClientData.userOpt_logoutMode() == undefined) {
ClientData.userOpt_pageTransition(0);
}
if (ClientData.userOpt_pageTransitionPeriod() == null || ClientData.userOpt_pageTransitionPeriod() == undefined) {
ClientData.userOpt_pageTransitionPeriod(1);
}
} }
}); });
......
...@@ -121,11 +121,11 @@ function screenLock(options) { ...@@ -121,11 +121,11 @@ function screenLock(options) {
// すでにロック状態かどうかをチェックし、ロック状態であれば、即ロックをかける // すでにロック状態かどうかをチェックし、ロック状態であれば、即ロックをかける
if(isLocked()) { if(isLocked()) {
idleStateTimeout = 0; idleStateTimeout = 0;
}
}
// clear lock state // clear lock state
removeLockState();
removeLockState();
// set idle timeout // set idle timeout
idleTimerId = setTimeout(function() { idleTimerId = setTimeout(function() {
...@@ -216,25 +216,26 @@ function screenLock(options) { ...@@ -216,25 +216,26 @@ function screenLock(options) {
// execute unlock process // execute unlock process
function executeUnlock() { function executeUnlock() {
if(unlockFunc) { if (unlockFunc) {
var val = unlockFunc($('#passwd-txt').val(), forceUnlockFunc); var val = unlockFunc($('#passwd-txt').val(), forceUnlockFunc);
if(!val.result) { if (!val.result) {
$('#screenLockErrMsg').text(format(errorMessage, val.errorCode.errorMessage)); $('#screenLockErrMsg').text(format(errorMessage, val.errorCode.errorMessage));
$('#screenLockErrMsg').fadeIn(); $('#screenLockErrMsg').fadeIn();
$('#passwd-txt').focus(); $('#passwd-txt').focus();
return;
}
else {
// Set new timeout value // Set new timeout value
if (val.newTimeout) {
timeout = val.newTimeout; timeout = val.newTimeout;
} }
return; /*
}
/*
if(!unlockFunc($('#passwd-txt').val(), forceUnlockFunc)) { if(!unlockFunc($('#passwd-txt').val(), forceUnlockFunc)) {
$('#screenLockErrMsg').fadeIn(); $('#screenLockErrMsg').fadeIn();
$('#passwd-txt').focus(); $('#passwd-txt').focus();
return; return;
} }
*/ */
} }
defaultOptions.unlockFunc(elmId); defaultOptions.unlockFunc(elmId);
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20130712)User:", "txtLoginUser":"(Ver.20130823)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
...@@ -129,14 +129,15 @@ ...@@ -129,14 +129,15 @@
"txtBkShiori":"EN_しおり", "txtBkShiori":"EN_しおり",
"txtResSelect":"EN_リストアするデータを選択してください。", "txtResSelect":"EN_リストアするデータを選択してください。",
"txtBkDefault":"EN_バックアップのデフォルト:", "txtBkDefault":"EN_バックアップのデフォルト:",
"txtOptPageTrans":"ビューのアニメーション種類", "txtOptPageTrans":"EN_ビューのアニメーション種類",
"txtOptPageTransSlide":"スライド", "txtOptPageTransSlide":"EN_スライド",
"txtOptPageTransFade":"フェード", "txtOptPageTransFade":"EN_フェード",
"txtOptPageTransRev":"リヴェール&ムーブイン", "txtOptPageTransRev":"EN_リヴェール&ムーブイン",
"txtOptPageTransPeriod":"アニメーション時間(Sec)", "txtOptPageTransPeriod":"EN_アニメーション時間(Sec)",
"msgPushAlert":"新着メッセージがあります!!!", "msgPushAlert":"EN_新着メッセージがあります!!!",
"txtPushAlert":"通知", "txtPushAlert":"EN_通知",
"txtNext":"次>", "txtNext":"EN_次>",
"txtPrevious":"<前", "txtPrevious":"EN_<前",
"msgAnonymousLoginErr":"ログインできません。(エラーコード:)" "msgAnonymousLoginErr":"EN_ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"EN_ログインできません。"
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20130712)ログイン中:", "txtLoginUser":"(Ver.20130823)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
...@@ -138,6 +138,6 @@ ...@@ -138,6 +138,6 @@
"txtPushAlert":"通知", "txtPushAlert":"通知",
"txtNext":"次>", "txtNext":"次>",
"txtPrevious":"<前", "txtPrevious":"<前",
"msgAnonymousLoginErr":"ログインできません。(エラーコード:)" "msgAnonymousLoginErr":"ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"ログインできません。"
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20130712)로그인 중:", "txtLoginUser":"(Ver.20130823)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
...@@ -129,14 +129,15 @@ ...@@ -129,14 +129,15 @@
"txtBkShiori":"KO_しおり", "txtBkShiori":"KO_しおり",
"txtResSelect":"KO_リストアするデータを選択してください。", "txtResSelect":"KO_リストアするデータを選択してください。",
"txtBkDefault":"KO_バックアップのデフォルト:", "txtBkDefault":"KO_バックアップのデフォルト:",
"txtOptPageTrans":"ビューのアニメーション種類", "txtOptPageTrans":"KO_ビューのアニメーション種類",
"txtOptPageTransSlide":"スライド", "txtOptPageTransSlide":"KO_スライド",
"txtOptPageTransFade":"フェード", "txtOptPageTransFade":"KO_フェード",
"txtOptPageTransRev":"リヴェール&ムーブイン", "txtOptPageTransRev":"KO_リヴェール&ムーブイン",
"txtOptPageTransPeriod":"アニメーション時間(Sec)", "txtOptPageTransPeriod":"KO_アニメーション時間(Sec)",
"msgPushAlert":"新着メッセージがあります!!!", "msgPushAlert":"KO_新着メッセージがあります!!!",
"txtPushAlert":"通知", "txtPushAlert":"KO_通知",
"txtNext":"次>", "txtNext":"KO_次>",
"txtPrevious":"<前", "txtPrevious":"KO_<前",
"msgAnonymousLoginErr":"ログインできません。(エラーコード:)" "msgAnonymousLoginErr":"KO_ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"KO_ログインできません。"
} }
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<!--<meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1" />--> <meta http-equiv="X-UA-Compatible" content="IE=9,10,chrome=1" />
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store"> <meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1"> <meta http-equiv="Expires" content="-1">
<title> </title> <title> </title>
<link rel="stylesheet" type="text/css" href="./common/css/default.css" /> <link rel="stylesheet" type="text/css" href="./common/css/default.css" />
<link rel="stylesheet" type="text/css" href="./css/contentview.css" /> <link rel="stylesheet" type="text/css" href="./css/contentview.css" />
...@@ -50,6 +49,7 @@ ...@@ -50,6 +49,7 @@
<script src="./js/contentview_Marking.js"></script> <script src="./js/contentview_Marking.js"></script>
<script src="./js/contentview_PopupText.js"></script> <script src="./js/contentview_PopupText.js"></script>
<script src="./js/contentview_Paint.js"></script> <script src="./js/contentview_Paint.js"></script>
<script src="./js/contentview_Anket.js"></script>
<script src="common/js/zoomDetector.js" type="text/javascript"></script> <script src="common/js/zoomDetector.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="css/reset.css" /> <link type="text/css" rel="stylesheet" href="css/reset.css" />
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
<script type="text/javascript" src="common/js/script.js"></script> <script type="text/javascript" src="common/js/script.js"></script>
<style> <style>
html, body{ html{
-ms-touch-action : none !important; -ms-touch-action : none;
} }
</style> </style>
...@@ -349,5 +349,6 @@ ...@@ -349,5 +349,6 @@
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank"> <iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
this frame prevents back forward cache this frame prevents back forward cache
</iframe> </iframe>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -76,13 +76,14 @@ article{ ...@@ -76,13 +76,14 @@ article{
section{ section{
width:800px; width:800px;
display:block; display:block;
padding:33px 0 0; /*padding:33px 0 0;*/
padding:23px 0 0;
margin:0 auto; margin:0 auto;
overflow:hidden; overflow:hidden;
} }
section div#user_info{ section div#user_info{
margin-bottom:40px; margin-bottom:30px;
} }
section div#user_info h2{ section div#user_info h2{
...@@ -166,7 +167,7 @@ section div#user_info .passchgbtn a:hover:not(:target) { ...@@ -166,7 +167,7 @@ section div#user_info .passchgbtn a:hover:not(:target) {
div#user_option{ div#user_option{
width:inherit; width:inherit;
height:415px; /*height:415px;*/
background:url(../img/common/back_dot.gif); background:url(../img/common/back_dot.gif);
-moz-border-radius:6px; -moz-border-radius:6px;
-webkit-border-radius:6px; -webkit-border-radius:6px;
...@@ -174,7 +175,8 @@ div#user_option{ ...@@ -174,7 +175,8 @@ div#user_option{
} }
div#user_option h3{ div#user_option h3{
padding:25px 0 0 0; /*padding:25px 0 0 0;*/
padding:20px 0 0 0;
margin:0 0 8px 30px; margin:0 0 8px 30px;
font-size:14px; font-size:14px;
font-weight:bold; font-weight:bold;
...@@ -241,7 +243,7 @@ section div#user_option input { ...@@ -241,7 +243,7 @@ section div#user_option input {
} }
section div#user_option .backupbtn { section div#user_option .backupbtn {
margin:0 0 35px 30px; margin:0 0 20px 30px;
} }
section div#user_option .backupbtn a { section div#user_option .backupbtn a {
width:125px; width:125px;
...@@ -292,7 +294,7 @@ section div#user_option .backupbtn a:hover:not(:target) { ...@@ -292,7 +294,7 @@ section div#user_option .backupbtn a:hover:not(:target) {
} }
section #user_option .savebtn{ section #user_option .savebtn{
padding:30px 0 0 30px; padding:20px 0 0 20px;
border-top:1px solid #CCC; border-top:1px solid #CCC;
} }
...@@ -602,3 +604,30 @@ section h1{ ...@@ -602,3 +604,30 @@ section h1{
font-size: large; font-size: large;
font-family: 'trebuchet ms', verdana, arial; font-family: 'trebuchet ms', verdana, arial;
} }
/* No.4 */
#cboAnimation
{
margin-left:120px;
}
.lblOptPageTransPeriod
{
padding-left:20px;
}
#txtValueAnimation
{
width:30px;
border:solid 1px #222;
text-align:center;
}
#slidebar-animation
{
display:inline-block;
width:200px;
margin:0 8px;
}
#slidebar-container
{
display:inline-block;
padding:0 5px;
}
\ No newline at end of file
...@@ -821,7 +821,7 @@ function downloadResourceById(contentId){ ...@@ -821,7 +821,7 @@ function downloadResourceById(contentId){
//Download resource //Download resource
function getResourceByIdFromAPI(resourceId){ function getResourceByIdFromAPI(resourceId){
return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId; return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
}; };
/* get url */ /* get url */
......
...@@ -196,8 +196,15 @@ function bookmarkPage() { ...@@ -196,8 +196,15 @@ function bookmarkPage() {
var enBookmark = new BookMarkEntity(); var enBookmark = new BookMarkEntity();
enBookmark.contentid = contentID; enBookmark.contentid = contentID;
enBookmark.pageNo = changePageIndex(getPageIndex()); enBookmark.pageNo = changePageIndex(getPageIndex());
if(contentType == ContentTypeKeys.Type_Image){
enBookmark.contentTitle = imageTypeData.contentName;
enBookmark.contentTitleKana = imageTypeData.contentNameKana;
}
else{
enBookmark.contentTitle = dataWebContentPage.contentTitle; enBookmark.contentTitle = dataWebContentPage.contentTitle;
enBookmark.contentTitleKana = dataWebContentPage.contentTitleKana; enBookmark.contentTitleKana = dataWebContentPage.contentTitleKana;
}
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark. //=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark.
enBookmark.bookmarkid = getUUID(); enBookmark.bookmarkid = getUUID();
enBookmark.registerDate = new Date(); enBookmark.registerDate = new Date();
...@@ -299,6 +306,9 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -299,6 +306,9 @@ function handleAPIWebContentPage(dataJson, pos) {
$("#divListBookmark").offset({ left: pos[0], top: (pos[1] + $('#bookmarkBoxHdBM').height()) }); $("#divListBookmark").offset({ left: pos[0], top: (pos[1] + $('#bookmarkBoxHdBM').height()) });
$('#divListBookmark').children().remove(); $('#divListBookmark').children().remove();
//Start Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) { for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1; nIndexBookMark = -1;
var contentPage = dataJson.pages; var contentPage = dataJson.pages;
...@@ -374,20 +384,58 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -374,20 +384,58 @@ function handleAPIWebContentPage(dataJson, pos) {
imgTemp.src = "img/view_loading.gif"; imgTemp.src = "img/view_loading.gif";
/*avwCmsApiSync(ClientData.userInfo_accountPath(), lstPageNoBookMark.push(bmList[nIndex].pageNo);
"webContentPage", }
"GET",
{sid:ClientData.userInfo_sid(),contentId: contentID,pageNos: bmList[nIndex].pageNo, thumbnailFlg:1},
function(data){ } else { /* page deleted */
getDataLoaded(data.pages); $('#divListBookmark').append(
' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' +
' <span class="mdltext">' +
' <span>' + i18nText('txtPage') + bmList[nIndex].pageNo + '</span> <br /> ' +
' </span>' +
' </li>' +
' <li>' +
' <span class="mdltext">' +
' <span style="color:red">' + i18nText('msgShioriDeleted') + '</span>' +
' </span>' +
' </li>'
);
}
}
}
else if(contentType == ContentTypeKeys.Type_Image){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1;
var contentPage = imageTypeData;
if (contentPage.pageNo == bmList[nIndex].pageNo) {
nIndexBookMark = nIndexJson;
}
if (nIndexBookMark != -1) { /* page exist */
$('#divListBookmark').append(
' <li id="' + 1 + '">' +
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
' <span class="mdltext">' +
i18nText('txtPage') + 1 + '<br /> ' +
truncate(htmlEncode(contentPage.contentName), 20) +
' </span>' +
' </li>'
);
//Resize Image //Resize Image
var imgTemp = new Image(); var imgTemp = new Image();
$('#img_bookmark_' +data.pages[0].pageNo).attr('src',formatStringBase64(data.pages[0].pageThumbnail)); var imageContent = new Image();
var imageUrl = downloadResourceById(contentID);
imgTemp.onload = function(){ imgTemp.onload = function () {
if(imgTemp.width > imgTemp.height) { if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', ''); $("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height'); $("img.imgbox").removeAttr('height');
...@@ -398,18 +446,21 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -398,18 +446,21 @@ function handleAPIWebContentPage(dataJson, pos) {
$("img.imgbox").removeAttr('width'); $("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43'); $("img.imgbox").attr('height', '43');
} }
imageContent.onload = function(){
$("img.imgbox").attr('src', imageUrl);
}; };
imgTemp.src = formatStringBase64(data.pages[0].pageThumbnail); imageContent.src = imageUrl;
}, };
null); */
lstPageNoBookMark.push(bmList[nIndex].pageNo); imgTemp.src = "img/view_loading.gif";
}
lstPageNoBookMark.push(bmList[nIndex].pageNo);
} else { /* page deleted */ } else { /* page deleted */
$('#divListBookmark').append( $('#divListBookmark').append(
' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' + ' <li id="' + 0 + '">' +
' <span class="mdltext">' + ' <span class="mdltext">' +
' <span>' + i18nText('txtPage') + bmList[nIndex].pageNo + '</span> <br /> ' + ' <span>' + i18nText('txtPage') + bmList[nIndex].pageNo + '</span> <br /> ' +
...@@ -423,10 +474,16 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -423,10 +474,16 @@ function handleAPIWebContentPage(dataJson, pos) {
); );
} }
} }
}
//End Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF){
if (lstPageNoBookMark.length > 0) { if (lstPageNoBookMark.length > 0) {
isSendingData = true; isSendingData = true;
loadDataBookmark(lstPageNoBookMark); loadDataBookmark(lstPageNoBookMark);
} }
}
}; };
/* check data has load */ /* check data has load */
...@@ -613,7 +670,6 @@ function eventEnd_CopyText(e) { ...@@ -613,7 +670,6 @@ function eventEnd_CopyText(e) {
}; };
/*format Image string */ /*format Image string */
function formatStringBase64(imgStr) { function formatStringBase64(imgStr) {
var outputString = 'data:image/jpeg;base64,' + imgStr; var outputString = 'data:image/jpeg;base64,' + imgStr;
...@@ -762,7 +818,6 @@ function searchHandle() { ...@@ -762,7 +818,6 @@ function searchHandle() {
} }
}; };
/* load data to dialog search */ /* load data to dialog search */
function loadDataToDialogSearch(searchResultTemp) { function loadDataToDialogSearch(searchResultTemp) {
...@@ -910,13 +965,22 @@ function changePage(page_index) { ...@@ -910,13 +965,22 @@ function changePage(page_index) {
page_index = Number(page_index); page_index = Number(page_index);
if (page_index != getContent().pageIndex) { if (page_index != getContent().pageIndex) {
playBGMOfContent(); playBGMOfContent();
playBGMOfPage(page_index); playBGMOfPage(page_index);
disableAllControl(); disableAllControl();
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
//Start Function : No.4 - Editor : Long - Date : 08/19/2013
if(page_index == getContent().pageIndex + 1){
nextPage_click();
}
else if(page_index == getContent().pageIndex - 1){
prevPage_click();
}
//End Function : No.4 - Editor : Long - Date : 08/19/2013
else{
// Clear canvas offscreen // Clear canvas offscreen
clearCanvas(document.getElementById("offscreen")); clearCanvas(document.getElementById("offscreen"));
...@@ -927,7 +991,9 @@ function changePage(page_index) { ...@@ -927,7 +991,9 @@ function changePage(page_index) {
/* get page Objects */ /* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, page_index); getPageObjectsByPageIndex(pageObjectsData, page_index);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); getContent().setPageImages(totalPage, pageImages)
.setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
...@@ -936,9 +1002,10 @@ function changePage(page_index) { ...@@ -936,9 +1002,10 @@ function changePage(page_index) {
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
alert('erro');
showErrorScreen(); showErrorScreen();
}); });
}
} else if (ClientData.IsJumpBack() == true } else if (ClientData.IsJumpBack() == true
|| ClientData.common_prePageNo()) { || ClientData.common_prePageNo()) {
getContent().setPageImages(totalPage, pageImages) getContent().setPageImages(totalPage, pageImages)
...@@ -1680,6 +1747,7 @@ function handleSliderBar() { ...@@ -1680,6 +1747,7 @@ function handleSliderBar() {
stop: function (event, ui) { stop: function (event, ui) {
changePage(ui.value - 1); changePage(ui.value - 1);
} }
}); });
...@@ -2134,9 +2202,7 @@ $("document").ready(function () { ...@@ -2134,9 +2202,7 @@ $("document").ready(function () {
//$('html').bind('touchstart', function(event){event.stopPropagation()}, false); //$('html').bind('touchstart', function(event){event.stopPropagation()}, false);
//$('html').bind('touchend', function(event){event.stopPropagation()}, false); //$('html').bind('touchend', function(event){event.stopPropagation()}, false);
//Start Function : No.20 //Start Function : No.20
if ($.browser.msie ) {
_bWin8TouchEnabled = window.navigator.msPointerEnabled;
}
//End Function : No.20 //End Function : No.20
/* check login */ /* check login */
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
...@@ -2349,8 +2415,35 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2349,8 +2415,35 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.contentId, obj.contentId,
obj.pageNo obj.pageNo
); );
//Start Function : No.9 - Editor : Long - Summary :
}else if(obj.actionType == 11){
pageObj = new htmlLinkButton(
obj.mediaType,
obj.actionType,
obj.id,
obj.imageUrl,
obj.x,
obj.y,
obj.width,
obj.height,
obj.visible,
obj.resourceUrl
);
}else if(obj.actionType == 12){
pageObj = new anket(
obj.mediaType,
obj.actionType,
obj.id,
obj.imageUrl,
obj.x,
obj.y,
obj.width,
obj.height,
obj.visible,
obj.resourceUrl
);
} }
//End Function : No.9 - Editor : Long - Summary :
break; break;
case 2: case 2:
pageObj = new videoType2( pageObj = new videoType2(
...@@ -2472,7 +2565,40 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2472,7 +2565,40 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj['3dview'] obj['3dview']
); );
break; break;
//pageObj = case 9:
//mediaType = 9
if(obj.actionType == 11){
pageObj = new htmlLinkButton(
obj.mediaType,
obj.actionType,
obj.id,
obj.imageUrl,
obj.x,
obj.y,
obj.width,
obj.height,
obj.visible,
obj.resourceUrl
);
}
break;
case 11:
//mediaType = 11
if(obj.actionType == 12){
pageObj = new anket(
obj.mediaType,
obj.actionType,
obj.id,
obj.imageUrl,
obj.x,
obj.y,
obj.width,
obj.height,
obj.visible,
obj.resourceUrl
);
}
break;
//Start Function : No.9 - Editor : Long - Date : 08/15/2013 - Summary : 3d object //Start Function : No.9 - Editor : Long - Date : 08/15/2013 - Summary : 3d object
default: default:
// default Object // default Object
...@@ -2568,17 +2694,42 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2568,17 +2694,42 @@ ContentPage.prototype.drawPage = function (context, opt) {
drawMarkingOnScreen(opt); drawMarkingOnScreen(opt);
/*set status is loading page */ /*set status is loading page */
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
isLoadingObject = false; isLoadingObject = false;
}
}
else{
isLoadingObject = false;
}
/* enable controls in page */ /* enable controls in page */
if (ClientData.IsAddingMarking() == true) { if (ClientData.IsAddingMarking() == true) {
disableAllControl(); disableAllControl();
enableButtonMarking(); enableButtonMarking();
} else { } else {
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl(); enableAllControl();
} }
//End Function : No.4 - Summary : make sure next or prev page is loaded
}
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
//End Function : No.4 - Summary : make sure next or prev page is loaded
/* set pos video */ /* set pos video */
zoomVideo(); zoomVideo();
} }
...@@ -2589,17 +2740,43 @@ ContentPage.prototype.drawPage = function (context, opt) { ...@@ -2589,17 +2740,43 @@ ContentPage.prototype.drawPage = function (context, opt) {
drawMarkingOnScreen(opt); drawMarkingOnScreen(opt);
/*set status is loading page */ /*set status is loading page */
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
isLoadingObject = false;
}
}
else{
isLoadingObject = false; isLoadingObject = false;
}
/* enable controls in page */ /* enable controls in page */
if (ClientData.IsAddingMarking() == true) { if (ClientData.IsAddingMarking() == true) {
disableAllControl(); disableAllControl();
enableButtonMarking() enableButtonMarking()
} else { } else {
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
enableAllControl(); enableAllControl();
} }
}
else{
enableAllControl();
}
//End Function : No.4 - Summary : make sure next or prev page is loaded
}
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure next or prev page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
}
//End Function : No.4 - Summary : make sure next or prev page is loaded
/* set pos video */ /* set pos video */
zoomVideo(); zoomVideo();
...@@ -2826,26 +3003,50 @@ function removeObject() { ...@@ -2826,26 +3003,50 @@ function removeObject() {
/* View Component setDefaultEvent */ /* View Component setDefaultEvent */
function setDefaultEvent() { function setDefaultEvent() {
var canvasPre = document.getElementById('mainPre');
var canvasNext = document.getElementById('mainNext');
//mouse event
// add event for wrap
//remove wrapper event
canvasPre.removeEventListener('mousedown',function(){},false);
canvasPre.removeEventListener('mousemove',function(){},false);
canvasPre.removeEventListener('mouseup',function(){},false);
canvasPre.removeEventListener('mouseout',function(){},false);
canvasNext.removeEventListener('mousedown',function(){},false);
canvasNext.removeEventListener('mousemove',function(){},false);
canvasNext.removeEventListener('mouseup',function(){},false);
canvasNext.removeEventListener('mouseout',function(){},false);
document.getElementById('main').addEventListener('click', onClick_CanvasMain, false); document.getElementById('main').addEventListener('click', onClick_CanvasMain, false);
document.getElementById('divCheckExistMarking').addEventListener('click', onClick_CanvasMain, false); document.getElementById('divCheckExistMarking').addEventListener('click', onClick_CanvasMain, false);
if (isTouchDevice() == true) {
document.getElementById('main').removeEventListener('click', false);
document.getElementById('main').addEventListener('touchstart', onTouchstart, false);
document.getElementById('main').addEventListener('touchmove', onTouchmove, false);
document.getElementById('main').addEventListener('touchend', onTouchend, false);
//document.getElementById('main').addEventListener('touchstart', onTouchstart, false);
//document.getElementById('main').addEventListener('touchmove', onTouchmove, false);
//document.getElementById('main').addEventListener('touchend', onTouchend, false);
} else {
if(avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android"){
document.getElementById('main').addEventListener('mousedown', mouseDown_CanvasMain, false); document.getElementById('main').addEventListener('mousedown', mouseDown_CanvasMain, false);
document.getElementById('main').addEventListener('mousemove', mouseMove_canvasMain, false); document.getElementById('main').addEventListener('mousemove', mouseMove_canvasMain, false);
document.getElementById('main').addEventListener('mouseup', mouseUp_CanvasMain, false); document.getElementById('main').addEventListener('mouseup', mouseUp_CanvasMain, false);
document.getElementById('divCheckExistMarking').addEventListener('mousedown', mouseDown_CanvasMain, false); if ($.browser.msie ) {
document.getElementById('divCheckExistMarking').addEventListener('mousemove', mouseMove_canvasMain, false); _bWin8TouchEnabled = window.navigator.msPointerEnabled;
document.getElementById('divCheckExistMarking').addEventListener('mouseup', mouseUp_CanvasMain, false); }
if(_bWin8TouchEnabled){
document.getElementById('main').addEventListener('MSPointerDown', onTouchstart, false);
document.getElementById('main').addEventListener('MSPointerMove', onTouchmove, false);
document.getElementById('main').addEventListener('MSPointerUp', onTouchend, false);
}
}
else if(avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android"){
document.getElementById('main').removeEventListener('click', function(){}, false);
document.getElementById('main').addEventListener('touchstart', onTouchstart, false);
document.getElementById('main').addEventListener('touchmove', onTouchmove, false);
document.getElementById('main').addEventListener('touchend', onTouchend, false);
}
$('#main').mouseout(function (event) { $('#main').mouseout(function (event) {
if (moveFlag) { if (moveFlag) {
...@@ -2855,13 +3056,6 @@ function setDefaultEvent() { ...@@ -2855,13 +3056,6 @@ function setDefaultEvent() {
$('#button_pre_canvas').css('opacity', '0'); $('#button_pre_canvas').css('opacity', '0');
$('#button_next_canvas').css('opacity', '0'); $('#button_next_canvas').css('opacity', '0');
}); });
}
if(_bWin8TouchEnabled){
document.getElementById('main').addEventListener('MSPointerDown', onTouchstart, false);
document.getElementById('main').addEventListener('MSPointerMove', onTouchmove, false);
document.getElementById('main').addEventListener('MSPointerUp', onTouchend, false);
}
}; };
/*disable all control when click copy memo */ /*disable all control when click copy memo */
...@@ -3373,6 +3567,7 @@ function drawGetWebContent4(context, opt) { ...@@ -3373,6 +3567,7 @@ function drawGetWebContent4(context, opt) {
}; };
//Start Function : No.4 - Editor : Long - Date: 08/14/2013 - Summary : For lazy loading //Start Function : No.4 - Editor : Long - Date: 08/14/2013 - Summary : For lazy loading
var isExistDrawing = false;
/* draw marking */ /* draw marking */
function drawMarkingOnScreen(opt) { function drawMarkingOnScreen(opt) {
...@@ -3409,7 +3604,7 @@ function drawMarkingOnScreen(opt) { ...@@ -3409,7 +3604,7 @@ function drawMarkingOnScreen(opt) {
context = canvas.getContext('2d'); context = canvas.getContext('2d');
if (ClientData.IsAddingMarking() == false && ClientData.IsDisplayMarking() == true) { if (ClientData.IsAddingMarking() == false && ClientData.IsDisplayMarking() == true) {
var isExistDrawing = false; isExistDrawing = false;
/* get data marking on local */ /* get data marking on local */
var dataMarking = ClientData.MarkingData(); var dataMarking = ClientData.MarkingData();
...@@ -3607,7 +3802,6 @@ function flip(opt) { ...@@ -3607,7 +3802,6 @@ function flip(opt) {
srcRect.left, srcRect.top, srcRect.right - srcRect.left, srcRect.bottom - srcRect.top, srcRect.left, srcRect.top, srcRect.right - srcRect.left, srcRect.bottom - srcRect.top,
destRect.left, destRect.top, width, height); destRect.left, destRect.top, width, height);
context.restore(); context.restore();
}; };
//End Function : No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function to draw multi canvas //End Function : No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function to draw multi canvas
......
function showAnket(url){
var $container = $('#dialog');
$container.html('');
$container.attr('style', 'background-color: white; position: absolute; top: 0% !important; height: 100% !important;width: 25% !important; opacity: 0.85');
$container.draggable({ handle: "h1" });
$container.html(
'<h1 style="height:25px;background:url(./img/viewer/pophdbg.png) 0 0 repeat; ">'
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>'
+ '<iframe src="'+ url +'" style="position: absolute; width: 100%; height: 95%; ">'
+ '</iframe>'
);
$('#dialog h1 img').click(function(){
$container.removeAttr('style');
hideDialog();
});
};
\ No newline at end of file
...@@ -115,6 +115,14 @@ function getDataJsonFile() { ...@@ -115,6 +115,14 @@ function getDataJsonFile() {
else if (JsonFile.horizontal) { else if (JsonFile.horizontal) {
if (JsonFile.horizontal.pages) { if (JsonFile.horizontal.pages) {
pageObjectsData = JsonFile.horizontal.pages; pageObjectsData = JsonFile.horizontal.pages;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
if(data.contentDataSub != null && data.contentDataSub.length > 0){
for(var i = 0; i < pageObjectsData.length; i++){
var obj = pageObjectsData[i];
obj["contentDataSub"] = data.contentDataSub;
}
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
} }
} }
...@@ -167,7 +175,6 @@ function loadDataBookmark(lstPageNo) { ...@@ -167,7 +175,6 @@ function loadDataBookmark(lstPageNo) {
} }
}; };
/* get data using for search */ /* get data using for search */
function getSearchDataFromJson() { function getSearchDataFromJson() {
//get data from JSON file //get data from JSON file
......
...@@ -275,18 +275,54 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -275,18 +275,54 @@ PageObject.prototype.drawPageObject = function (context, opt) {
drawMarkingOnScreen(opt); drawMarkingOnScreen(opt);
/*set status is loading page */ /*set status is loading page */
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
isLoadingObject = false; isLoadingObject = false;
}
}
else{
isLoadingObject = false;
}
//End Function : No.4 - Summary : make sure all page is loaded
/* enable controls in page */ /* enable controls in page */
if (ClientData.IsAddingMarking() == true) { if (ClientData.IsAddingMarking() == true) {
disableAllControl(); disableAllControl();
enableButtonMarking() //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
enableButtonMarking();
}
}
else{
enableButtonMarking();
}
//End Function : No.4 - Summary : make sure all page is loaded
} else { } else {
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
enableAllControl(); enableAllControl();
} }
}
else{
enableAllControl();
}
//End Function : No.4 - Summary : make sure all page is loaded
}
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
//End Functi
/* set pos video */ /* set pos video */
zoomVideo(); zoomVideo();
...@@ -304,13 +340,40 @@ PageObject.prototype.drawPageObject = function (context, opt) { ...@@ -304,13 +340,40 @@ PageObject.prototype.drawPageObject = function (context, opt) {
/* enable controls in page */ /* enable controls in page */
if (ClientData.IsAddingMarking() == true) { if (ClientData.IsAddingMarking() == true) {
disableAllControl(); disableAllControl();
enableButtonMarking() //Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
enableButtonMarking();
}
}
else{
enableButtonMarking();
}
//End Function : No.4 - Summary : make sure all page is loaded
} else { } else {
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
enableAllControl();
}
}
else{
enableAllControl(); enableAllControl();
} }
//End Function : No.4 - Summary : mak
}
/*finish loading */ /*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded
if(contentType == ContentTypeKeys.Type_PDF){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
}
}
else{
$('#divImageLoading').css('display', 'none');
}
//End Func
/* set pos video */ /* set pos video */
zoomVideo(); zoomVideo();
...@@ -331,17 +394,28 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -331,17 +394,28 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
var object3DInfoArr = get3dObjectInfoById(id); var object3DInfoArr = get3dObjectInfoById(id);
var object3DPageX;
var object3DPageY;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
object3DPageX = event.targetTouches[0].pageX;
object3DPageY = event.targetTouches[0].pageY;
}
else{
object3DPageX = event.pageX;
object3DPageY = event.pageY;
}
if(object3DInfoArr._3dLastId == ''){ if(object3DInfoArr._3dLastId == ''){
object3DInfoArr._3dH = Math.round(hCnt/2); object3DInfoArr._3dH = Math.round(hCnt/2);
object3DInfoArr._3dV = Math.round(vCnt/2); object3DInfoArr._3dV = Math.round(vCnt/2);
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
} }
else{ else{
if(event.pageX < object3DInfoArr._3dFirstPointX){ if(object3DPageX < object3DInfoArr._3dFirstPointX){
if(event.pageY < object3DInfoArr._3dFirstPointY){ if(object3DPageY < object3DInfoArr._3dFirstPointY){
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dH--; object3DInfoArr._3dH--;
object3DInfoArr._3dV--; object3DInfoArr._3dV--;
...@@ -357,13 +431,12 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -357,13 +431,12 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
cntTime = 0; cntTime = 0;
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
else if(event.pageY > object3DInfoArr._3dFirstPointY){ else if(object3DPageY > object3DInfoArr._3dFirstPointY){
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dH--; object3DInfoArr._3dH--;
object3DInfoArr._3dV++; object3DInfoArr._3dV++;
...@@ -379,13 +452,12 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -379,13 +452,12 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
cntTime = 0; cntTime = 0;
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
else{ else{
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dH--; object3DInfoArr._3dH--;
...@@ -395,15 +467,15 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -395,15 +467,15 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
cntTime = 0; cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
} }
else if(event.pageX > object3DInfoArr._3dFirstPointX){ else if(object3DPageX > object3DInfoArr._3dFirstPointX){
if(event.pageY < object3DInfoArr._3dFirstPointY){ if(object3DPageY < object3DInfoArr._3dFirstPointY){
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dH++; object3DInfoArr._3dH++;
object3DInfoArr._3dV--; object3DInfoArr._3dV--;
...@@ -418,13 +490,13 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -418,13 +490,13 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
cntTime = 0; cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
else if(event.pageY > object3DInfoArr._3dFirstPointY){ else if(object3DPageY > object3DInfoArr._3dFirstPointY){
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dH++; object3DInfoArr._3dH++;
object3DInfoArr._3dV++; object3DInfoArr._3dV++;
...@@ -439,13 +511,13 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -439,13 +511,13 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
cntTime = 0; cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
else{ else{
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dH++; object3DInfoArr._3dH++;
if(object3DInfoArr._3dH > hCnt){ if(object3DInfoArr._3dH > hCnt){
...@@ -454,15 +526,15 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -454,15 +526,15 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
cntTime = 0; cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
} }
else{ else{
if(event.pageY < object3DInfoArr._3dFirstPointY){ if(object3DPageY < object3DInfoArr._3dFirstPointY){
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dV--; object3DInfoArr._3dV--;
...@@ -472,13 +544,13 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -472,13 +544,13 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
cntTime = 0; cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
else if(event.pageY > object3DInfoArr._3dFirstPointY){ else if(object3DPageY > object3DInfoArr._3dFirstPointY){
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
object3DInfoArr._3dV++; object3DInfoArr._3dV++;
...@@ -488,17 +560,17 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, ...@@ -488,17 +560,17 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
cntTime = 0; cntTime = 0;
_3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); _3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
} }
else{ else{
if(cntTime == 50){ if(cntTime == 35){
if(_isEnableRotate){ if(_isEnableRotate){
cntTime = 0; cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH); object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
$('#test').html(object3DInfoArr._3dLastId);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h); change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
} }
} }
...@@ -518,13 +590,12 @@ function change3DImage(objectId, imageId, x, y, w, h){ ...@@ -518,13 +590,12 @@ function change3DImage(objectId, imageId, x, y, w, h){
} }
var imageUrl; var imageUrl;
var imageObj = new Image();
for(var i = 0 ; i < _object3DImageArr.length; i++){ for(var i = 0 ; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i]; var obj = _object3DImageArr[i];
if(obj.id == objectId){ if(obj.id == objectId){
var imageObj = obj["3dview"]; var Obj1 = obj["3dview"];
imageUrl = imageObj[imageId]; imageUrl = Obj1[imageId];
break; break;
} }
} }
...@@ -534,7 +605,17 @@ function change3DImage(objectId, imageId, x, y, w, h){ ...@@ -534,7 +605,17 @@ function change3DImage(objectId, imageId, x, y, w, h){
var canvasObject = document.getElementById("offscreen"); var canvasObject = document.getElementById("offscreen");
var contextObject = canvasObject.getContext("2d"); var contextObject = canvasObject.getContext("2d");
contextObject.drawImage(imageObj, x, y, w, h); contextObject.drawImage(imageObj, x, y, w, h);
if (ClientData.IsAddingMarking() == false && ClientData.IsDisplayMarking() == true) {
drawMarkingOnScreen();
if(!isExistDrawing){
flip();
}
}
else{
flip(); flip();
}
_isEnableRotate = true; _isEnableRotate = true;
}; };
imageObj.src = imageUrl; imageObj.src = imageUrl;
...@@ -666,6 +747,57 @@ var trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index, ...@@ -666,6 +747,57 @@ var trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index,
}; };
trigger.prototype = new PageObject(); trigger.prototype = new PageObject();
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, resourceUrl) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null);
this.action = function () {
/*stop audio on page */
stopAllAudio();
if (resourceUrl != "") {
showHtml(resourceUrl);
showDialog(true);
}
};
};
htmlLinkButton.prototype = new PageObject();
function showHtml(url){
var $container = $('#dialog');
$container.html('');
$container.attr('style', 'background-color: white; width:100%; left:0% !important');
$container.html(
'<h1 style="height:25px;background:url(./img/viewer/pophdbg.png) 0 0 repeat; ">'
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>'
+ '<iframe src="'+ url +'" style="position: absolute; width: 100%; height: 95%; ">'
+ '</iframe>'
);
$('#dialog h1 img').click(function(){
$container.removeAttr('style');
hideDialog();
});
}
var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, resourceUrl, questionNo, replyLimit, fullscreen, saveAs) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null);
this.action = function () {
/*stop audio on page */
stopAllAudio();
if (resourceUrl != "") {
showAnket(resourceUrl);
showDialog(true);
}
};
};
anket.prototype = new PageObject();
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
/* mediaType=3 Audio object : extends PageObject */ /* mediaType=3 Audio object : extends PageObject */
var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, audioFile, playType) { var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, audioFile, playType) {
...@@ -969,14 +1101,17 @@ Transition.prototype.flipNextPage = function () { ...@@ -969,14 +1101,17 @@ Transition.prototype.flipNextPage = function () {
$('#mainNext').css('opacity', '1'); $('#mainNext').css('opacity', '1');
$('#main').css('z-index', '1'); $('#main').css('z-index', '1');
} }
else{
$('#mainNext').css('display', 'block');
}
if (getContent().hasNextPage()) { if (getContent().hasNextPage()) {
if(animateType == animateTypeKeys.Type_Slide){ if(animateType == animateTypeKeys.Type_Slide){
$('#canvasWrapper').animate( $('#canvasWrapper').stop(true).animate(
{ left: '-' + w + 'px' }, { left: '-' + w + 'px' },
{ {
duration: "slow", duration: animatePeriod,
complete: function () { complete: function () {
assignCurrentContentPage(1); assignCurrentContentPage(1);
...@@ -993,13 +1128,13 @@ Transition.prototype.flipNextPage = function () { ...@@ -993,13 +1128,13 @@ Transition.prototype.flipNextPage = function () {
//Change slider //Change slider
changeSlider(getContent().pageIndex); changeSlider(getContent().pageIndex);
//Draw marking on current screen //Draw marking on current screen
drawMarkingOnScreen(); //drawMarkingOnScreen();
//Correct position of canvas for next flipping //Correct position of canvas for next flipping
correctCanvasPosition(); correctCanvasPosition();
if(getPageIndex() < totalPage - 1){ if(getPageIndex() < totalPage - 1){
//Get Next Page Object //Get Next Page Object
...@@ -1008,8 +1143,6 @@ Transition.prototype.flipNextPage = function () { ...@@ -1008,8 +1143,6 @@ Transition.prototype.flipNextPage = function () {
//Load Next //Load Next
renderNextPage(); renderNextPage();
screenFit();
}else{ }else{
//Enable all control //Enable all control
enableAllControl(); enableAllControl();
...@@ -1017,8 +1150,6 @@ Transition.prototype.flipNextPage = function () { ...@@ -1017,8 +1150,6 @@ Transition.prototype.flipNextPage = function () {
isLoadingObject = false; isLoadingObject = false;
} }
/* init image had draw */ /* init image had draw */
initDisplayMarking(); initDisplayMarking();
...@@ -1034,14 +1165,15 @@ Transition.prototype.flipNextPage = function () { ...@@ -1034,14 +1165,15 @@ Transition.prototype.flipNextPage = function () {
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
createLockLayout(false);
} }
}); });
} }
else if(animateType == animateTypeKeys.Type_FadeIn){ else if(animateType == animateTypeKeys.Type_FadeIn){
$('#main').animate( $('#main').stop(true).animate(
{ 'opacity': 0 }, { 'opacity': 0 },
{ {
duration: "slow", duration: animatePeriod,
complete: function () { complete: function () {
assignCurrentContentPage(1); assignCurrentContentPage(1);
...@@ -1059,7 +1191,7 @@ Transition.prototype.flipNextPage = function () { ...@@ -1059,7 +1191,7 @@ Transition.prototype.flipNextPage = function () {
changeSlider(getContent().pageIndex); changeSlider(getContent().pageIndex);
//Draw marking on current screen //Draw marking on current screen
drawMarkingOnScreen(); //drawMarkingOnScreen();
//Correct position of canvas for next flipping //Correct position of canvas for next flipping
correctCanvasPosition(); correctCanvasPosition();
...@@ -1073,7 +1205,6 @@ Transition.prototype.flipNextPage = function () { ...@@ -1073,7 +1205,6 @@ Transition.prototype.flipNextPage = function () {
//Load Next //Load Next
renderNextPage(); renderNextPage();
screenFit();
} }
else{ else{
//Enable all control //Enable all control
...@@ -1097,6 +1228,7 @@ Transition.prototype.flipNextPage = function () { ...@@ -1097,6 +1228,7 @@ Transition.prototype.flipNextPage = function () {
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
createLockLayout(false);
} }
}); });
} }
...@@ -1112,12 +1244,15 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1112,12 +1244,15 @@ Transition.prototype.flipPreviousPage = function () {
$('#mainPre').css('opacity', '1'); $('#mainPre').css('opacity', '1');
$('#main').css('z-index', '1'); $('#main').css('z-index', '1');
} }
else{
$('#mainPre').css('display', 'block');
}
if (getContent().hasPreviousPage()) { if (getContent().hasPreviousPage()) {
if(animateType == animateTypeKeys.Type_Slide){ if(animateType == animateTypeKeys.Type_Slide){
$('#canvasWrapper').animate( $('#canvasWrapper').stop(true).animate(
{ left: w + 'px' }, { left: w + 'px' },
{ {
duration: "slow", duration: animatePeriod,
complete: function () { complete: function () {
assignCurrentContentPage(2); assignCurrentContentPage(2);
...@@ -1135,7 +1270,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1135,7 +1270,7 @@ Transition.prototype.flipPreviousPage = function () {
changeSlider(getContent().pageIndex); changeSlider(getContent().pageIndex);
//Draw marking on current screen //Draw marking on current screen
drawMarkingOnScreen(); //drawMarkingOnScreen();
//Correct position of canvas for next flipping //Correct position of canvas for next flipping
correctCanvasPosition(); correctCanvasPosition();
...@@ -1154,7 +1289,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1154,7 +1289,7 @@ Transition.prototype.flipPreviousPage = function () {
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
isLoadingObject = false; isLoadingObject = false;
} }
screenFit();
/* init image had draw */ /* init image had draw */
initDisplayMarking(); initDisplayMarking();
/* change title of page */ /* change title of page */
...@@ -1169,14 +1304,15 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1169,14 +1304,15 @@ Transition.prototype.flipPreviousPage = function () {
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
createLockLayout(false);
} }
}); });
} }
else{ else{
$('#main').animate( $('#main').stop(true).animate(
{ opacity: '0' }, { opacity: '0' },
{ {
duration: "slow", duration: animatePeriod,
complete: function () { complete: function () {
assignCurrentContentPage(2); assignCurrentContentPage(2);
...@@ -1194,7 +1330,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1194,7 +1330,7 @@ Transition.prototype.flipPreviousPage = function () {
changeSlider(getContent().pageIndex); changeSlider(getContent().pageIndex);
//Draw marking on current screen //Draw marking on current screen
drawMarkingOnScreen(); //drawMarkingOnScreen();
//Correct position of canvas for next flipping //Correct position of canvas for next flipping
correctCanvasPosition(); correctCanvasPosition();
...@@ -1216,7 +1352,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1216,7 +1352,7 @@ Transition.prototype.flipPreviousPage = function () {
/* init image had draw */ /* init image had draw */
initDisplayMarking(); initDisplayMarking();
screenFit();
/* change title of page */ /* change title of page */
if (dataPageTitle[getContent().pageIndex]) { if (dataPageTitle[getContent().pageIndex]) {
if (dataPageTitle[getContent().pageIndex] != '') { if (dataPageTitle[getContent().pageIndex] != '') {
...@@ -1229,6 +1365,7 @@ Transition.prototype.flipPreviousPage = function () { ...@@ -1229,6 +1365,7 @@ Transition.prototype.flipPreviousPage = function () {
} }
/* set end log */ /* set end log */
SetEndLog(contentID); SetEndLog(contentID);
createLockLayout(false);
} }
}); });
} }
...@@ -1248,33 +1385,36 @@ Transition.prototype.flipToPage = function (index) { ...@@ -1248,33 +1385,36 @@ Transition.prototype.flipToPage = function (index) {
$('#main').animate( $('#main').animate(
{ left: w + 'px' }, { left: w + 'px' },
{ {
duration: "slow", duration: animatePeriod,
complete: function () { complete: function () {
$('#main').css('left', -w + 'px'); $('#main').css('left', -w + 'px');
$('#main').animate( $('#main').animate(
{ left: marginX + 'px' }, { left: marginX + 'px' },
{ duration: 'slow', { duration: animatePeriod,
complete: function () { complete: function () {
isFirstLoad = true; isFirstLoad = true;
screenFit(); //screenFit();
} }
}); });
//change pageIndex and image bookmark //change pageIndex and image bookmark
userScale = 1;
changeScale(userScale);
checkDisableButtonZoom();
getContent().toPage(index); getContent().toPage(index);
if(getPageIndex() > 0){ if(index > 0){
prevContent.pageIndex = getPageIndex(); prevContent.pageIndex = getPageIndex();
getPrevPageObjectsByPageIndex(pageObjectsData, getPageIndex() - 1); getPrevPageObjectsByPageIndex(pageObjectsData, index - 1);
renderPrevPage(); renderPrevPage();
} }
if(getPageIndex() < totalPage - 1){ if(index < totalPage - 1){
nextContent.pageIndex = getPageIndex(); nextContent.pageIndex = getPageIndex();
getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1); getNextPageObjectsByPageIndex(pageObjectsData, index + 1);
renderNextPage(); renderNextPage();
} }
screenFit();
initImageBookmark(); initImageBookmark();
checkExistNextPrePage(); checkExistNextPrePage();
changeSlider(index); changeSlider(index);
...@@ -1301,30 +1441,33 @@ Transition.prototype.flipToPage = function (index) { ...@@ -1301,30 +1441,33 @@ Transition.prototype.flipToPage = function (index) {
$('#main').animate( $('#main').animate(
{ left: '-' + w + 'px' }, { left: '-' + w + 'px' },
{ {
duration: "slow", duration: animatePeriod,
complete: function () { complete: function () {
$('#main').css('left', w + 'px'); $('#main').css('left', w + 'px');
$('#main').animate( $('#main').animate(
{ left: marginX + 'px' }, { left: marginX + 'px' },
{ duration: 'slow', { duration: animatePeriod,
complete: function () { complete: function () {
isFirstLoad = true; isFirstLoad = true;
screenFit(); //screenFit();
} }
}); });
//change pageIndex and image bookmark //change pageIndex and image bookmark
userScale = 1;
changeScale(userScale);
checkDisableButtonZoom();
getContent().toPage(index); getContent().toPage(index);
if(getPageIndex() > 0){ if(index > 0){
prevContent.pageIndex = getPageIndex(); prevContent.pageIndex = getPageIndex();
getPrevPageObjectsByPageIndex(pageObjectsData, getPageIndex() - 1); getPrevPageObjectsByPageIndex(pageObjectsData, index - 1);
renderPrevPage(); renderPrevPage();
} }
if(getPageIndex() < totalPage - 1){ if(index < totalPage - 1){
nextContent.pageIndex = getPageIndex(); nextContent.pageIndex = getPageIndex();
getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1); getNextPageObjectsByPageIndex(pageObjectsData, index + 1);
renderNextPage(); renderNextPage();
} }
initImageBookmark(); initImageBookmark();
......
...@@ -299,12 +299,14 @@ function nextPage_click() { ...@@ -299,12 +299,14 @@ function nextPage_click() {
playBGMOfPage(getPageIndex() + 1); playBGMOfPage(getPageIndex() + 1);
isLoadingObject = true; isLoadingObject = true;
//cancelClick = true; cancelClick = true;
disableAllControl(); disableAllControl();
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
var tran = new Transition(); var tran = new Transition();
createLockLayout(true);
tran.flipNextPage(); tran.flipNextPage();
} }
}; };
...@@ -317,13 +319,15 @@ function prevPage_click() { ...@@ -317,13 +319,15 @@ function prevPage_click() {
playBGMOfPage(getPageIndex() - 1); playBGMOfPage(getPageIndex() - 1);
isLoadingObject = true; isLoadingObject = true;
//cancelClick = true; cancelClick = true;
disableAllControl(); disableAllControl();
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
var tran = new Transition(); var tran = new Transition();
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 :
...@@ -402,6 +406,27 @@ function lastPage_click() { ...@@ -402,6 +406,27 @@ function lastPage_click() {
}; };
function createLockLayout(opt){
if(opt == true){
var $html = $('<div id="locking" style="z-index: 100; position: absolute; height: 100%; width: 100%; display: none;"></div>');
$('#wrapper').append($html);
$html.show();
$('#locking').live('click', function(event){ event.preventDefault(); });
}
else{
//$('body').append($html);
$('#locking').hide();
$('#locking').remove();
}
};
/* handle keydown */ /* handle keydown */
$(document).keydown(function (e) { $(document).keydown(function (e) {
...@@ -410,7 +435,6 @@ $(document).keydown(function (e) { ...@@ -410,7 +435,6 @@ $(document).keydown(function (e) {
ctrlMode = true; ctrlMode = true;
} }
/* set hot key */ /* set hot key */
if (ctrlMode == true) { if (ctrlMode == true) {
if (ClientData.IsAddingMarking() == true || isLoadingObject == true) { if (ClientData.IsAddingMarking() == true || isLoadingObject == true) {
...@@ -476,14 +500,14 @@ function onUnlock() { ...@@ -476,14 +500,14 @@ function onUnlock() {
//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
getPageObjectsByPageIndex(pageObjectsData, getPageIndex()); getPageObjectsByPageIndex(pageObjectsData, getPageIndex());
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects).setUpPage(getPageIndex); getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects).setUpPage(getPageIndex());
if(getPageIndex() < totalPage - 1){ if(getPageIndex() < totalPage - 1){
getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1); getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1);
renderNextPage(); renderNextPage();
} }
if(getPageIndex() < 0){ if(getPageIndex() > 0){
getPrevPageObjectsByPageIndex(pageObjectsData, getPageIndex() - 1); getPrevPageObjectsByPageIndex(pageObjectsData, getPageIndex() - 1);
renderPrevPage(); renderPrevPage();
} }
...@@ -493,9 +517,10 @@ function onUnlock() { ...@@ -493,9 +517,10 @@ function onUnlock() {
function onClick_CanvasMain(event) { function onClick_CanvasMain(event) {
//alert(cancelClick); event.preventDefault();
if(isLoadingObject){ if(isLoadingObject){
cancelClick = true; return;
} }
else{ else{
cancelClick = false; cancelClick = false;
...@@ -616,12 +641,12 @@ function onClick_CanvasMain(event) { ...@@ -616,12 +641,12 @@ function onClick_CanvasMain(event) {
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) { if (hitPageObj) {
//$('#test').html(imagePt.x + " ~ " + imagePt.y);
if(!is3DObject(hitPageObj)){ if(!is3DObject(hitPageObj)){
hitPageObj.action(); hitPageObj.action();
} }
else{ else{
event.preventDefault(); //event.preventDefault();
} }
} }
else { else {
...@@ -644,9 +669,15 @@ function onClick_CanvasMain(event) { ...@@ -644,9 +669,15 @@ function onClick_CanvasMain(event) {
/* area next and prev page */ /* area next and prev page */
var cwMain = $('#main').width(); var cwMain = $('#main').width();
if (event.pageX > 0 && event.pageX < 300) { if (event.pageX > 0 && event.pageX < 300) {
prevPage_click(); prevPage_click();
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) { } else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
nextPage_click(); nextPage_click();
} }
} }
} }
...@@ -656,10 +687,15 @@ function onClick_CanvasMain(event) { ...@@ -656,10 +687,15 @@ function onClick_CanvasMain(event) {
else { else {
if (ClientData.IsAddingMarking() == false && isCopyMemo == false) { if (ClientData.IsAddingMarking() == false && isCopyMemo == false) {
var cwMain = $('#main').width(); var cwMain = $('#main').width();
if (event.pageX > 0 && event.pageX < 300) { if (event.pageX > 0 && event.pageX < 300) {
prevPage_click(); prevPage_click();
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) { } else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
nextPage_click(); nextPage_click();
} }
} }
} }
...@@ -669,13 +705,24 @@ function onClick_CanvasMain(event) { ...@@ -669,13 +705,24 @@ function onClick_CanvasMain(event) {
function mouseMove_canvasMain(event) { function mouseMove_canvasMain(event) {
//Start Function : No.20 - Editor : Long
if(_isTouching){
//_isTouching = false;
return;
}
if(isLoadingObject){
moveFlag = false;
}
//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 (moveFlag && userScale != 1) { if (moveFlag && userScale != 1) {
$('#main').css('cursor', 'pointer'); $('#main').css('cursor', 'pointer');
cancelClick = true;
var mx; var mx;
var my; var my;
// calc mouse moving distance // calc mouse moving distance
...@@ -700,6 +747,7 @@ function mouseMove_canvasMain(event) { ...@@ -700,6 +747,7 @@ function mouseMove_canvasMain(event) {
px = event.pageX; px = event.pageX;
py = event.pageY; py = event.pageY;
} else { } else {
//event.preventDefault();
px = event.targetTouches[0].pageX; px = event.targetTouches[0].pageX;
py = event.targetTouches[0].pageY; py = event.targetTouches[0].pageY;
} }
...@@ -713,7 +761,7 @@ function mouseMove_canvasMain(event) { ...@@ -713,7 +761,7 @@ function mouseMove_canvasMain(event) {
} }
//Start Function : No.20 //Start Function : No.20
else if(moveFlag && userScale == 1){ else if(moveFlag && userScale == 1){
cancelClick = true;
var x = event.pageX; var x = event.pageX;
var y = event.pageY; var y = event.pageY;
var deltaX = x - px; var deltaX = x - px;
...@@ -755,17 +803,22 @@ function mouseMove_canvasMain(event) { ...@@ -755,17 +803,22 @@ function mouseMove_canvasMain(event) {
_moveNum = -2; // go from left to right + back to left + go to right=> priveous page _moveNum = -2; // go from left to right + back to left + go to right=> priveous page
} }
if(animateType == 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(moveFlag == false && _3dAnimate == true){ if(moveFlag == false && _3dAnimate == true){
var imagePt = screenToImage(event.pageX, event.pageY); var imagePt = screenToImage(event.pageX, event.pageY);
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){ if(hitObj){
cntTime++; cntTime++;
hitObj.action(event); hitObj.action(event);
} }
else{ else{
...@@ -773,7 +826,6 @@ function mouseMove_canvasMain(event) { ...@@ -773,7 +826,6 @@ function mouseMove_canvasMain(event) {
} }
} }
//End Function : No.20 //End Function : No.20
var cwMain = $('#main').width(); var cwMain = $('#main').width();
var chMain = $('#main').height(); var chMain = $('#main').height();
...@@ -816,12 +868,19 @@ function mouseMove_canvasMain(event) { ...@@ -816,12 +868,19 @@ function mouseMove_canvasMain(event) {
} else { } else {
$('#button_next_canvas').css('opacity', '0'); $('#button_next_canvas').css('opacity', '0');
} }
}; };
var _3dAnimate = false; var _3dAnimate = false;
var cntTime = 0; var cntTime = 0;
function mouseDown_CanvasMain(event) { function mouseDown_CanvasMain(event) {
//Start Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(_isTouching){
//_isTouching = false;
return;
}
//End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(!isLoadingObject){ if(!isLoadingObject){
moveFlag = true; moveFlag = true;
...@@ -830,13 +889,9 @@ function mouseDown_CanvasMain(event) { ...@@ -830,13 +889,9 @@ function mouseDown_CanvasMain(event) {
moveFlag = false; moveFlag = false;
} }
if (isTouchDevice() != true) {
event.preventDefault(); event.preventDefault();
}
$('#main').css('cursor', 'default');
var isClickOnObject = false; $('#main').css('cursor', 'default');
if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") { if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") {
px = event.pageX; px = event.pageX;
...@@ -852,14 +907,17 @@ function mouseDown_CanvasMain(event) { ...@@ -852,14 +907,17 @@ function mouseDown_CanvasMain(event) {
//End Function : No.20 //End Function : No.20
var imagePt = screenToImage(px, py);
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary : //Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = screenToImage(px, py);
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
//alert(hitPageObj);
if (hitPageObj) { if (hitPageObj) {
moveFlag = false;
if(userScale != 1){
moveFlag = true;
}
else{
moveFlag = false;
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
var arr3DInfo = []; var arr3DInfo = [];
...@@ -873,11 +931,17 @@ function mouseDown_CanvasMain(event) { ...@@ -873,11 +931,17 @@ function mouseDown_CanvasMain(event) {
_3dAnimate = false; _3dAnimate = false;
} }
} }
}
else{
moveFlag = true;
}
//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();
px = event.targetTouches[0].pageX; px = event.targetTouches[0].pageX;
py = event.targetTouches[0].pageY; py = event.targetTouches[0].pageY;
} }
...@@ -885,6 +949,9 @@ function mouseDown_CanvasMain(event) { ...@@ -885,6 +949,9 @@ function mouseDown_CanvasMain(event) {
function mouseUp_CanvasMain(event) { function mouseUp_CanvasMain(event) {
//Start Function : No.20 //Start Function : No.20
event.preventDefault();
if(moveFlag) { if(moveFlag) {
moveFlag = false; moveFlag = false;
$('#main').css('cursor', 'default'); $('#main').css('cursor', 'default');
...@@ -896,14 +963,17 @@ function mouseUp_CanvasMain(event) { ...@@ -896,14 +963,17 @@ function mouseUp_CanvasMain(event) {
}else { }else {
correctCanvasPosition(); correctCanvasPosition();
} }
//Check if mouse move is fired to prevent click next/ prev page
//isInMouseMove = false;
} }
if(_3dAnimate == true){ if(_3dAnimate == true){
_3dAnimate = false; _3dAnimate = false;
_3dFirstPointX = event.pageX; _3dFirstPointX = event.pageX;
_3dFirstPointY = event.pageY; _3dFirstPointY = event.pageY;
cntTime = 0;
} }
//End Function : No.20 //End Function : No.20
}; };
...@@ -1014,16 +1084,15 @@ function resetNaviAction(){ ...@@ -1014,16 +1084,15 @@ function resetNaviAction(){
correctCanvasPosition(); correctCanvasPosition();
}; };
var _isTouching = false;
var _isClick = false;
function onTouchstart(evt){ function onTouchstart(evt){
//console.log("onTouchstart:::");
var bContinue = true;
if(isTouchDevice()){ var bContinue = true;
evt.stopPropagation();
}
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault(); evt.preventDefault();
}
if(isLoadingObject){ if(isLoadingObject){
bContinue = false; bContinue = false;
...@@ -1031,15 +1100,13 @@ function onTouchstart(evt){ ...@@ -1031,15 +1100,13 @@ function onTouchstart(evt){
switch (evt.pointerType) { switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH: case evt.MSPOINTER_TYPE_TOUCH:
//evt.target.style.backgroundColor = "blue"; // A touchscreen was used _isTouching = true;
//console.log("MSPOINTER_TYPE_TOUCH:::");
break; break;
case evt.MSPOINTER_TYPE_PEN: case evt.MSPOINTER_TYPE_PEN:
//evt.target.style.backgroundColor = "green"; // A pen was used
bContinue = false; bContinue = false;
break; break;
case evt.MSPOINTER_TYPE_MOUSE: case evt.MSPOINTER_TYPE_MOUSE:
//evt.target.style.backgroundColor = "yellow"; // A mouse was used _isTouching = false;
bContinue = false; bContinue = false;
break; break;
} }
...@@ -1051,7 +1118,6 @@ function onTouchstart(evt){ ...@@ -1051,7 +1118,6 @@ function onTouchstart(evt){
_isPageNaviTouch = false; _isPageNaviTouch = false;
_isPageZoomTouch = false; _isPageZoomTouch = false;
//evt.preventDefault();
var touch1 = null; var touch1 = null;
var touch2 = null; var touch2 = null;
_touchLastPos = null; _touchLastPos = null;
...@@ -1060,7 +1126,6 @@ function onTouchstart(evt){ ...@@ -1060,7 +1126,6 @@ function onTouchstart(evt){
if(_bWin8TouchEnabled){ if(_bWin8TouchEnabled){
_bufferPoints = []; _bufferPoints = [];
if(_startPoints.length == 0){ if(_startPoints.length == 0){
// start navi page case // start navi page case
touch1 = {clientX: evt.clientX, clientY: evt.clientY,pointerId: evt.pointerId}; touch1 = {clientX: evt.clientX, clientY: evt.clientY,pointerId: evt.pointerId};
_startPoints.push(touch1); _startPoints.push(touch1);
...@@ -1068,8 +1133,30 @@ function onTouchstart(evt){ ...@@ -1068,8 +1133,30 @@ function onTouchstart(evt){
px = evt.pageX; px = evt.pageX;
py = evt.pageY; py = evt.pageY;
} }
else{
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = screenToImage(evt.pageX, evt.pageY);
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if(is3DObject(hitPageObj)){
var arr3DInfo = [];
} else if(_startPoints.length == 1){ arr3DInfo["_3dFirstPointX"] = evt.pageX;
arr3DInfo["_3dFirstPointY"] = evt.pageY;
set3dObjectInfoById(hitPageObj.id, arr3DInfo);
_3dAnimate = true;
}
else{
_3dAnimate = false;
}
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
}
}
else if(_startPoints.length == 1){
// start zoom page action // start zoom page action
if(_isPageNaviTouch){ if(_isPageNaviTouch){
// reset navi page action if exists // reset navi page action if exists
...@@ -1093,8 +1180,6 @@ function onTouchstart(evt){ ...@@ -1093,8 +1180,6 @@ function onTouchstart(evt){
px = touch1.clientX+touch2.clientX/2; px = touch1.clientX+touch2.clientX/2;
py = touch1.clientY+touch2.clientY/2; py = touch1.clientY+touch2.clientY/2;
//console.log("_lastDist:" + _lastDist);
} }
else { else {
//when _startPoints.length > 1 //when _startPoints.length > 1
...@@ -1108,16 +1193,16 @@ function onTouchstart(evt){ ...@@ -1108,16 +1193,16 @@ function onTouchstart(evt){
resetZoomAction(); 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){
_isClick = true;
_touchPageX = evt.touches[0].pageX;
_touchPageY = evt.touches[0].pageY;
//set touch to move page flag //set touch to move page flag
if(touch2 == null && userScale == 1){ if(touch2 == null && userScale == 1){
$('#mainPre').css("display",'block'); $('#mainPre').css("display",'block');
...@@ -1131,16 +1216,40 @@ function onTouchstart(evt){ ...@@ -1131,16 +1216,40 @@ function onTouchstart(evt){
_touchFirstPos = {x:touch1.clientX, y: touch1.clientX}; _touchFirstPos = {x:touch1.clientX, y: touch1.clientX};
_touchLastPos = {x:touch1.clientX, y: touch1.clientX}; _touchLastPos = {x:touch1.clientX, y: touch1.clientX};
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = screenToImage(touch1.pageX, touch1.pageY);
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if(is3DObject(hitPageObj)){
var arr3DInfo = [];
arr3DInfo["_3dFirstPointX"] = touch1.pageX;
arr3DInfo["_3dFirstPointY"] = touch1.pageY;
set3dObjectInfoById(hitPageObj.id, arr3DInfo);
_3dAnimate = true;
_isClick = false;
}
else{
_3dAnimate = false;
_isClick = true;
}
}
else{
_3dAnimate = false;
_isClick = true;
}
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
} }
else if(touch2 == null && userScale != 1){ else if(touch2 == null && userScale != 1){
_isPageNaviTouch = false; _isPageNaviTouch = false;
px = evt.pageX; px = evt.pageX;
py = evt.pageY; py = evt.pageY;
//onClick_CanvasMain();
} }
else { else {
_isPageNaviTouch = false; _isPageNaviTouch = false;
} }
...@@ -1164,28 +1273,21 @@ function onTouchstart(evt){ ...@@ -1164,28 +1273,21 @@ function onTouchstart(evt){
}; };
function onTouchmove(evt){ function onTouchmove(evt){
//console.log("onTouchmove :::");
var bContinue = true;
var bContinue = true;
if(isLoadingObject){ if(isLoadingObject){
bContinue = false; bContinue = false;
} }
if(isTouchDevice()){
evt.stopPropagation();
}
switch (evt.pointerType) { switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH: case evt.MSPOINTER_TYPE_TOUCH:
//evt.target.style.backgroundColor = "blue"; // A touchscreen was used _isTouching = true;
//console.log("MSPOINTER_TYPE_TOUCH:::");
break; break;
case evt.MSPOINTER_TYPE_PEN: case evt.MSPOINTER_TYPE_PEN:
//evt.target.style.backgroundColor = "green"; // A pen was used
bContinue = false; bContinue = false;
break; break;
case evt.MSPOINTER_TYPE_MOUSE: case evt.MSPOINTER_TYPE_MOUSE:
//evt.target.style.backgroundColor = "yellow"; // A mouse was used _isTouching = false;
bContinue = false; bContinue = false;
break; break;
} }
...@@ -1195,10 +1297,15 @@ function onTouchmove(evt){ ...@@ -1195,10 +1297,15 @@ function onTouchmove(evt){
} }
//console.log("pointerId: " + evt.pointerId); //console.log("pointerId: " + evt.pointerId);
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault(); evt.preventDefault();
}
var touch1 = null; var touch1 = null;
var touch2 = null; var touch2 = null;
if(_bWin8TouchEnabled){ if(_bWin8TouchEnabled){
if(_startPoints.length == 1){ if(_startPoints.length == 1){
//move page case //move page case
...@@ -1206,7 +1313,7 @@ function onTouchmove(evt){ ...@@ -1206,7 +1313,7 @@ function onTouchmove(evt){
if(userScale != 1){ if(userScale != 1){
$('#main').css('cursor', 'pointer'); $('#main').css('cursor', 'pointer');
//cancelClick = true;
var mx; var mx;
var my; var my;
// calc mouse moving distance // calc mouse moving distance
...@@ -1243,6 +1350,23 @@ function onTouchmove(evt){ ...@@ -1243,6 +1350,23 @@ function onTouchmove(evt){
closeDialogPopUpText(); closeDialogPopUpText();
} }
else{ else{
if(_3dAnimate){
var imagePt = screenToImage(evt.pageX, evt.pageY);
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
cntTime++;
hitObj.action(evt);
}
else{
_3dAnimate = false;
//_isClick = true;
}
}
else{
_isPageNaviTouch = true; _isPageNaviTouch = true;
touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId}; touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
_bufferPoints.push(touch1); // add to buffer to use for another action if occur. ex: zoom page _bufferPoints.push(touch1); // add to buffer to use for another action if occur. ex: zoom page
...@@ -1264,7 +1388,9 @@ function onTouchmove(evt){ ...@@ -1264,7 +1388,9 @@ function onTouchmove(evt){
} }
} }
} }
}
else if(_startPoints.length == 2){ else if(_startPoints.length == 2){
//zoom page case //zoom page case
_isPageZoomTouch = true; _isPageZoomTouch = true;
//rest navi touch if active //rest navi touch if active
...@@ -1296,7 +1422,8 @@ function onTouchmove(evt){ ...@@ -1296,7 +1422,8 @@ function onTouchmove(evt){
//console.log("_bufferPoints.length:" + _bufferPoints.length); //console.log("_bufferPoints.length:" + _bufferPoints.length);
_bufferPoints = []; _bufferPoints = [];
} }
}else { }
else {
//reset navi touch if active //reset navi touch if active
if(_isPageNaviTouch){ if(_isPageNaviTouch){
resetNaviAction(); resetNaviAction();
...@@ -1325,14 +1452,33 @@ function onTouchmove(evt){ ...@@ -1325,14 +1452,33 @@ function onTouchmove(evt){
} }
}else{ }
else{
_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(_3dAnimate){
var imagePt = screenToImage(touch1.pageX, touch1.pageY);
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
cntTime++;
hitObj.action(evt);
}
else{
_isClick = false;
}
}
else{
//update last touch position //update last touch position
if(touch2 == null && _isPageNaviTouch){ if(touch2 == null && _isPageNaviTouch){
currPos = {x:touch1.clientX, y: touch1.clientY}; currPos = {x:touch1.clientX, y: touch1.clientY};
//if(!processNaviPage(currPos)){
if(! _transitionObject.processNaviPage(currPos)){ if(! _transitionObject.processNaviPage(currPos)){
// can not move to previous or next page // can not move to previous or next page
return; return;
...@@ -1343,18 +1489,12 @@ function onTouchmove(evt){ ...@@ -1343,18 +1489,12 @@ function onTouchmove(evt){
if(userScale != 1){ if(userScale != 1){
$('#main').css('cursor', 'pointer'); $('#main').css('cursor', 'pointer');
//cancelClick = true;
var mx; var mx;
var my; var my;
// calc mouse moving distance
if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") {
mx = evt.pageX - px;
my = evt.pageY - py;
} else {
mx = evt.targetTouches[0].pageX - px; mx = evt.targetTouches[0].pageX - px;
my = evt.targetTouches[0].pageY - py; my = evt.targetTouches[0].pageY - py;
}
var sx = 1 / userScale; var sx = 1 / userScale;
var sy = 1 / userScale; var sy = 1 / userScale;
...@@ -1363,14 +1503,8 @@ function onTouchmove(evt){ ...@@ -1363,14 +1503,8 @@ function onTouchmove(evt){
moveX = Math.round(-mx * sx); moveX = Math.round(-mx * sx);
moveY = Math.round(-my * sy); moveY = Math.round(-my * sy);
// store current mouse point
if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") {
px = evt.pageX;
py = evt.pageY;
} else {
px = evt.targetTouches[0].pageX; px = evt.targetTouches[0].pageX;
py = evt.targetTouches[0].pageY; py = evt.targetTouches[0].pageY;
}
// redraw // redraw
flip(); flip();
...@@ -1386,42 +1520,52 @@ function onTouchmove(evt){ ...@@ -1386,42 +1520,52 @@ function onTouchmove(evt){
processZoomPage(touch1, touch2); processZoomPage(touch1, touch2);
} }
} }
}
}; };
function onTouchend(evt){ function onTouchend(evt){
var bContinue = true; var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault();
}
if(isLoadingObject){ if(isLoadingObject){
bContinue = false; bContinue = false;
} }
evt.stopPropagation();
switch (evt.pointerType) { switch (evt.pointerType) {
case evt.MSPOINTER_TYPE_TOUCH: case evt.MSPOINTER_TYPE_TOUCH:
//evt.target.style.backgroundColor = "blue"; // A touchscreen was used _isTouching = true;
//console.log("MSPOINTER_TYPE_TOUCH:::");
break; break;
case evt.MSPOINTER_TYPE_PEN: case evt.MSPOINTER_TYPE_PEN:
//evt.target.style.backgroundColor = "green"; // A pen was used _isTouching = false;
bContinue = false; bContinue = false;
break; break;
case evt.MSPOINTER_TYPE_MOUSE: case evt.MSPOINTER_TYPE_MOUSE:
//evt.target.style.backgroundColor = "yellow"; // A mouse was used _isTouching = false;
bContinue = false; bContinue = false;
break; break;
} }
if(!bContinue) return; if(!bContinue){
return;
}
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault(); evt.preventDefault();
}
_lastScaleDelta = userScale -1; _lastScaleDelta = userScale -1;
if(_bWin8TouchEnabled){ if(_bWin8TouchEnabled){
//console.log("onTouchend :::_bufferPoints.length:" + _bufferPoints.length);
// reset all flag // reset all flag
_startPoints = []; _startPoints = [];
_bufferPoints = []; _bufferPoints = [];
if(_3dAnimate == true){
_3dAnimate = false;
}
} }
//move page if enough condition //move page if enough condition
...@@ -1431,15 +1575,12 @@ function onTouchend(evt){ ...@@ -1431,15 +1575,12 @@ function onTouchend(evt){
//calculate time period from last time of touchstart event //calculate time period from last time of touchstart event
var currDate = new Date(); var currDate = new Date();
var period = currDate - touchStartedTime; var period = currDate - touchStartedTime;
//console.log(period);
//console.log("touchmove == _moveNum:" + _moveNum);
if(period >= _touchMoveTimePeriod && period < _touchMoveTimePeriodInvalid){ if(period >= _touchMoveTimePeriod && period < _touchMoveTimePeriodInvalid){
touchStartedTime= 0; touchStartedTime= 0;
if(_moveNum == 2){ if(_moveNum == 2){
//$('#nextpage').click();
nextPage_click(); nextPage_click();
}else if (_moveNum == -2){ }else if (_moveNum == -2){
//$('#prevpage').click();
prevPage_click(); prevPage_click();
}else { }else {
correctCanvasPosition(); correctCanvasPosition();
...@@ -1447,8 +1588,186 @@ function onTouchend(evt){ ...@@ -1447,8 +1588,186 @@ function onTouchend(evt){
} }
} }
} }
};
//Check if click event on ipad
if(_isClick == true){
if(isLoadingObject){
_isClick = false;
return;
}
else{
cancelClick = false;
}
if (!cancelClick) {
var imagePt = screenToImage(_touchPageX, _touchPageY);
var canvasWidth = $('#offscreen').width();
posXPopupMemo = _touchPageX;
posYPopupMemo = _touchPageY;
if ((_touchPageX - marginX) >= destRect.left && (_touchPageX - marginX) <= destRect.right) {
if (ClientData.IsAddingMemo() == true) {
if (!ClientData.memo_copyText()) {
AddMemo(contentID, changePageIndex(getPageIndex()), $('#divDialogMemo'), _touchPageX, _touchPageY, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
}
else {
if (typeSelectMemo == 1) { /* add new */
AddMemo(contentID, changePageIndex(getPageIndex()), $('#divDialogMemo'), posXPopupMemo, posYPopupMemo, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
} else if (typeSelectMemo == 2) { /* copy */
CopyMemo(ClientData.memo_copyText(), contentID, changePageIndex(getPageIndex()), $('#divDialogMemo'), posXPopupMemo, posYPopupMemo, function () {
//set flag change memo
ClientData.isChangedMemo(true);
ClientData.IsAddingMemo(false);
/* refresh draw memo */
drawMemoOnScreen();
//change image
$('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd');
});
}
}
}
else{
var isClickMemo = false;
if (isOpenPopUpText == true) {
isOpenPopUpText = false;
ClosePopupText();
}
if (isOpenPopUpMemo == true) {
isOpenPopUpMemo = false;
$("#pop_up_memo").hide();
}
/* click memo edit */
if (ClientData.IsDisplayMemo() == true) {
getAllMemoOfPage();
/* check exist object memo in mouse position */
for (var nIndex = 0; nIndex < memoObjects.length; nIndex++) {
var hitPageObjMemo = memoObjects[nIndex];
if (hitPageObjMemo.hitTest(imagePt.x, imagePt.y)) {
//console.log("PageObject Hit!! Id: " + hitPageObjMemo.id);
//hitPageObjMemo.action();
/* save object memo */
objEditMemo = hitPageObjMemo;
var posMemoX = _touchPageX;
var posMemoY = _touchPageY;
if (imagePt.y > heightEachPage - $("#pop_up_memo").height()) {
posMemoY = posMemoY - $("#pop_up_memo").height();
}
if (imagePt.x > widthEachPage - $("#pop_up_memo").width()) {
posMemoX = posMemoX - $("#pop_up_memo").width();
}
/*display pop-up-memo */
$("#pop_up_memo").css('top', posMemoY).css('left', posMemoX);
$("#pop_up_memo").show();
/*set true for flag click memo */
isClickMemo = true;
isOpenPopUpMemo = true;
}
}
}
/* click pageObject */
if (isClickMemo == false) {
var isClickLinkList = false;
/* check exist object in mouse position */
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if(!is3DObject(hitPageObj)){
hitPageObj.action();
}
else{
//event.preventDefault();
}
}
else {
/* check click link list */
for (var nIndex = 0; nIndex < webGetContentType4Objects.length; nIndex++) {
var hitPageObjLinkList = webGetContentType4Objects[nIndex];
if (hitPageObjLinkList.hitTest(imagePt.x, imagePt.y)) {
if(hitPageObjLinkList.pageNo == changePageIndex(getPageIndex())){
hitPageObjLinkList.action();
/*set true for flag click memo */
isClickLinkList = true;
}
}
}
if (isClickLinkList == false && ClientData.IsAddingMarking() == false) {
/* area next and prev page */
var cwMain = $('#main').width();
if (_touchPageX > 0 && _touchPageX < 300) {
prevPage_click();
} else if (_touchPageX > (cwMain - 300) && _touchPageX < cwMain) {
nextPage_click();
}
}
}
}
}
}
else {
if (ClientData.IsAddingMarking() == false && isCopyMemo == false) {
var cwMain = $('#main').width();
if (_touchPageX > 0 && _touchPageX < 300) {
prevPage_click();
} else if (_touchPageX > (cwMain - 300) && _touchPageX < cwMain) {
nextPage_click();
}
}
}
}
cancelClick = false;
_isClick = false;
}
else{
//Do nothing
}
};
var _touchPageX = 0;
var _touchPageY = 0;
function processZoomPage(touch1, touch2){ function processZoomPage(touch1, touch2){
var dist = getDistance({ var dist = getDistance({
...@@ -1472,11 +1791,11 @@ function processZoomPage(touch1, touch2){ ...@@ -1472,11 +1791,11 @@ function processZoomPage(touch1, touch2){
flip(); 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(getPageIndex < totalPage - 1){ if(getPageIndex() < totalPage - 1){
flip(1); flip(1);
} }
if(getPageIndex > 0){ if(getPageIndex() > 0){
flip(2); flip(2);
} }
//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
...@@ -1496,11 +1815,11 @@ function processZoomPage(touch1, touch2){ ...@@ -1496,11 +1815,11 @@ function processZoomPage(touch1, touch2){
changeScale(userScale); changeScale(userScale);
flip(); 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(getPageIndex < totalPage - 1){ if(getPageIndex() < totalPage - 1){
flip(1); flip(1);
} }
if(getPageIndex > 0){ if(getPageIndex() > 0){
flip(2); flip(2);
} }
//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
...@@ -1561,10 +1880,11 @@ function processNaviPage(currPos){ ...@@ -1561,10 +1880,11 @@ function processNaviPage(currPos){
} }
//console.log("_moveNum:" +_moveNum); //console.log("_moveNum:" +_moveNum);
if(animateType == 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");
}
_touchLastPos = {x:currPos.x, y: currPos.y}; _touchLastPos = {x:currPos.x, y: currPos.y};
return true; return true;
...@@ -1578,7 +1898,7 @@ function resetZoomAction(){ ...@@ -1578,7 +1898,7 @@ function resetZoomAction(){
}; };
function getDistance(p1, p2) { function getDistance(p1, p2) {
//return Math.sqrt(Math.pow((p2.x - p1.x), 2) + Math.pow((p2.y - p1.y), 2));
return Math.sqrt(Math.pow((p2.x - p1.x), 2) + Math.pow((p2.y - p1.y), 2)); return Math.sqrt(Math.pow((p2.x - p1.x), 2) + Math.pow((p2.y - p1.y), 2));
}; };
var TransitionObject = function () { var TransitionObject = function () {
...@@ -1624,10 +1944,11 @@ TransitionObject.prototype.processNaviPage = function (currPos) { ...@@ -1624,10 +1944,11 @@ TransitionObject.prototype.processNaviPage = function (currPos) {
} }
//console.log("_moveNum:" +_moveNum); //console.log("_moveNum:" +_moveNum);
if(animateType == 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");
}
_touchLastPos = {x:currPos.x, y: currPos.y}; _touchLastPos = {x:currPos.x, y: currPos.y};
return true; return true;
......
...@@ -112,6 +112,8 @@ var ContentTypeKeys = { ...@@ -112,6 +112,8 @@ var ContentTypeKeys = {
}; };
var contentType; var contentType;
var imageTypeData;
var nextPageImage = ''; var nextPageImage = '';
var nextPageObjects = []; var nextPageObjects = [];
var nextContent = new Content(); var nextContent = new Content();
...@@ -119,11 +121,12 @@ var prevPageObjects = []; ...@@ -119,11 +121,12 @@ var prevPageObjects = [];
var prevPageImage = ''; var prevPageImage = '';
var prevContent = new Content(); var prevContent = new Content();
var animateTypeKeys = { var animateTypeKeys = {
Type_Slide : 'slide', Type_Slide : 0,
Type_FadeIn : 'fade' Type_FadeIn : 1
}; };
var animateType = animateTypeKeys.Type_Slide; var animateType;
var animatePeriod;
function getNextContent(){ function getNextContent(){
return nextContent; return nextContent;
...@@ -361,6 +364,8 @@ function enableAllControl() { ...@@ -361,6 +364,8 @@ function enableAllControl() {
$("#slider_page").slider("option", "disabled", false); $("#slider_page").slider("option", "disabled", false);
enable('#txtSearch', '#txtSlider'); enable('#txtSearch', '#txtSlider');
} }
if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") { if (avwUserEnvObj.os != "ipad" && avwUserEnvObj.os != "android") {
$('#button_next_canvas').css('display', 'block'); $('#button_next_canvas').css('display', 'block');
$('#button_pre_canvas').css('display', 'block'); $('#button_pre_canvas').css('display', 'block');
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
/// <reference path="contentview_CallApi.js" /> /// <reference path="contentview_CallApi.js" />
/* get Json stored content info */ /* get Json stored content info */
function getJsonContentInfo() { function getJsonContentInfo() {
avwGrabContentPageImage(ClientData.userInfo_accountPath(), avwGrabContentPageImage(ClientData.userInfo_accountPath(),
...@@ -44,7 +42,6 @@ function getURLPageImage(apiName) { ...@@ -44,7 +42,6 @@ function getURLPageImage(apiName) {
return url; return url;
}; };
function getPageObjectsByPageIndex(contentData, nIndexPage) { function getPageObjectsByPageIndex(contentData, nIndexPage) {
pageObjects = []; pageObjects = [];
...@@ -52,6 +49,15 @@ function getPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -52,6 +49,15 @@ function getPageObjectsByPageIndex(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 :
if(contentData[nIndex].contentDataSub != null && contentData[nIndex].contentDataSub.length > 0){
//currentPageObjects["contentDataSub"] = contentData[nIndex].contentDataSub;
for(var i = 0; i < currentPageObjects.length; i++){
var tempObj = currentPageObjects[i];
tempObj["contentDataSub"] = contentData[nIndex].contentDataSub;
}
}
//End Function: No.9 - Editor : Long
break; break;
} }
} }
...@@ -61,6 +67,7 @@ function getPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -61,6 +67,7 @@ function getPageObjectsByPageIndex(contentData, nIndexPage) {
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = getMediaType1(currentPageObjects[nIndex]); var pageObject = getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
pageObjects.push(pageObject); pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
...@@ -91,6 +98,14 @@ function getPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -91,6 +98,14 @@ function getPageObjectsByPageIndex(contentData, nIndexPage) {
var pageObject = getMediaType8(currentPageObjects[nIndex]); var pageObject = getMediaType8(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
pageObjects.push(pageObject); pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 9) { /*mediaType = 9*/
var pageObject = getMediaType9(currentPageObjects[nIndex]);
/*add object to page */
pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 11) { /*mediaType = 11*/
var pageObject = getMediaType11(currentPageObjects[nIndex]);
/*add object to page */
pageObjects.push(pageObject);
} }
} }
} }
...@@ -292,6 +307,45 @@ function getMediaType1(iValueObj) { ...@@ -292,6 +307,45 @@ function getMediaType1(iValueObj) {
pageObject['pageNo'] = iValueObj.action.pageNo; pageObject['pageNo'] = iValueObj.action.pageNo;
} }
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
else if(iValueObj.action.actionType == 11){
var resourceId = iValueObj.action.resourceId;
var resourceUrl = "";
for(var i = 0; i < iValueObj.contentDataSub.length; i++){
var tempData = iValueObj.contentDataSub[i];
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
break;
}
}
pageObject["imageUrl"] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
}
else if(iValueObj.action.actionType == 12){
var resourceId = iValueObj.action.resourceId;
var resourceUrl = "";
for(var i = 0; i < iValueObj.contentDataSub.length; i++){
var tempData = iValueObj.contentDataSub[i];
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
break;
}
}
pageObject["imageUrl"] = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl;
pageObject["questionNo"] = iValueObj.action.questionNo;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
}
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
return pageObject; return pageObject;
}; };
...@@ -580,6 +634,85 @@ function getMediaType8(iValueObj) { ...@@ -580,6 +634,85 @@ function getMediaType8(iValueObj) {
return pageObject; return pageObject;
}; };
function getMediaType9(iValueObj) {
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType9_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
if(iValueObj.action.actionType == 11){
var resourceId = iValueObj.mediaInfo.resourceId;
var resourceUrl = "";
for(var i = 0; i < iValueObj.contentDataSub.length; i++){
var tempData = iValueObj.contentDataSub[i];
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
break;
}
}
pageObject["imageUrl"] = 'img/htmltype.png';
pageObject["resourceUrl"] = resourceUrl;
}
return pageObject;
};
function getMediaType11(iValueObj) {
var pageObject = [];
//Get object Info
pageObject['mediaType'] = iValueObj.mediaType;
pageObject['id'] = "MediaType9_" + iValueObj.mediaInfo.resourceId;
pageObject['actionType'] = iValueObj.action.actionType;
//Get object Location
pageObject['x'] = iValueObj.location.x;
pageObject['y'] = iValueObj.location.y;
pageObject['width'] = iValueObj.location.width;
pageObject['height'] = iValueObj.location.height;
pageObject['visible'] = true;
if(iValueObj.action.actionType == 12){
var resourceId = iValueObj.mediaInfo.resourceId;
var resourceUrl = "";
for(var i = 0; i < iValueObj.contentDataSub.length; i++){
var tempData = iValueObj.contentDataSub[i];
if(tempData.resourceId == resourceId){
resourceUrl = tempData.resourceUrl;
break;
}
}
pageObject["imageUrl"] = 'img/anket.jpg';
pageObject["resourceUrl"] = resourceUrl;
pageObject["questionNo"] = iValueObj.action.questionNo;
pageObject["replyLimit"] = iValueObj.action.replyLimit;
pageObject["fullScreen"] = iValueObj.action.fullScreen;
pageObject["saveAs"] = iValueObj.action.saveAs;
}
return pageObject;
};
function convNumTo2Char(num){ function convNumTo2Char(num){
var nRet = ""; var nRet = "";
if(num < 10) if(num < 10)
...@@ -875,11 +1008,13 @@ function getContentInfoTypeImage(){ ...@@ -875,11 +1008,13 @@ function getContentInfoTypeImage(){
getContent().setPageImages(1, resourceUrl).setUpPage(0); getContent().setPageImages(1, resourceUrl).setUpPage(0);
handleSliderBar(); handleSliderBar();
getContentDataForImageType();
$('#lblSlider').text('/ ' + 1); $('#lblSlider').text('/ ' + 1);
/* window resize event */ /* window resize event */
$(window).resize(function () { $(window).resize(function () {
sizingScreen();
resizeScreen(); resizeScreen();
isChangeSizeScreen = false; isChangeSizeScreen = false;
...@@ -895,6 +1030,22 @@ function getContentInfoTypeImage(){ ...@@ -895,6 +1030,22 @@ function getContentInfoTypeImage(){
resourceImage.src = resourceUrl; resourceImage.src = resourceUrl;
}; };
function getContentDataForImageType(){
var params = {
sid: ClientData.userInfo_sid(),
contentId: contentID,
getType: '1',
};
abapi('webGetContent', params, 'GET', function (data) {
imageTypeData = data.contentData;
//Set default page No to image Type
imageTypeData["pageNo"] = 1;
document.title = data.contentData.contentName + ' | ' + i18nText('sysAppTitle');
});
};
/* grab viewer content object */ /* grab viewer content object */
function getContent() { function getContent() {
return content; return content;
...@@ -998,10 +1149,20 @@ function getNextPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -998,10 +1149,20 @@ function getNextPageObjectsByPageIndex(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 :
if(contentData[nIndex].contentDataSub != null && contentData[nIndex].contentDataSub.length > 0){
//currentPageObjects["contentDataSub"] = contentData[nIndex].contentDataSub;
for(var i = 0; i < currentPageObjects.length; i++){
var tempObj = currentPageObjects[i];
tempObj["contentDataSub"] = contentData[nIndex].contentDataSub;
}
}
//End Function: No.9 - Editor : Long
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*/
...@@ -1012,7 +1173,7 @@ function getNextPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -1012,7 +1173,7 @@ function getNextPageObjectsByPageIndex(contentData, nIndexPage) {
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = getMediaType2(currentPageObjects[nIndex]); var pageObject = getMediaType2(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
pageObjects.push(pageObject); nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 3) { /*mediaType = 3*/ } else if (currentPageObjects[nIndex].mediaType == 3) { /*mediaType = 3*/
var pageObject = getMediaType3(currentPageObjects[nIndex]); var pageObject = getMediaType3(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
...@@ -1032,12 +1193,21 @@ function getNextPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -1032,12 +1193,21 @@ function getNextPageObjectsByPageIndex(contentData, nIndexPage) {
} else if (currentPageObjects[nIndex].mediaType == 7) { /*mediaType = 7*/ } else if (currentPageObjects[nIndex].mediaType == 7) { /*mediaType = 7*/
var pageObject = getMediaType7(currentPageObjects[nIndex]); var pageObject = getMediaType7(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
pageObjects.push(pageObject); nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 8) { /*mediaType = 8*/ } else if (currentPageObjects[nIndex].mediaType == 8) { /*mediaType = 8*/
var pageObject = getMediaType8(currentPageObjects[nIndex]); var pageObject = getMediaType8(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
nextPageObjects.push(pageObject); nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 9) { /*mediaType = 9*/
var pageObject = getMediaType9(currentPageObjects[nIndex]);
/*add object to page */
nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 11) { /*mediaType = 11*/
var pageObject = getMediaType11(currentPageObjects[nIndex]);
/*add object to page */
nextPageObjects.push(pageObject);
} }
} }
} }
}; };
...@@ -1050,6 +1220,15 @@ function getPrevPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -1050,6 +1220,15 @@ function getPrevPageObjectsByPageIndex(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 :
if(contentData[nIndex].contentDataSub != null && contentData[nIndex].contentDataSub.length > 0){
//currentPageObjects["contentDataSub"] = contentData[nIndex].contentDataSub;
for(var i = 0; i < currentPageObjects.length; i++){
var tempObj = currentPageObjects[i];
tempObj["contentDataSub"] = contentData[nIndex].contentDataSub;
}
}
//End Function: No.9 - Editor : Long
break; break;
} }
} }
...@@ -1084,11 +1263,19 @@ function getPrevPageObjectsByPageIndex(contentData, nIndexPage) { ...@@ -1084,11 +1263,19 @@ function getPrevPageObjectsByPageIndex(contentData, nIndexPage) {
} else if (currentPageObjects[nIndex].mediaType == 7) { /*mediaType = 7*/ } else if (currentPageObjects[nIndex].mediaType == 7) { /*mediaType = 7*/
var pageObject = getMediaType7(currentPageObjects[nIndex]); var pageObject = getMediaType7(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
pageObjects.push(pageObject); prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 8) { /*mediaType = 8*/ } else if (currentPageObjects[nIndex].mediaType == 8) { /*mediaType = 8*/
var pageObject = getMediaType8(currentPageObjects[nIndex]); var pageObject = getMediaType8(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
prevPageObjects.push(pageObject); prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 9) { /*mediaType = 9*/
var pageObject = getMediaType9(currentPageObjects[nIndex]);
/*add object to page */
prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 11) { /*mediaType = 11*/
var pageObject = getMediaType11(currentPageObjects[nIndex]);
/*add object to page */
prevPageObjects.push(pageObject);
} }
} }
} }
...@@ -1172,6 +1359,8 @@ function correctCanvasPosition(){ ...@@ -1172,6 +1359,8 @@ function correctCanvasPosition(){
$('#main').css("left",'13px'); $('#main').css("left",'13px');
$('#mainNext').css("left", $("#canvasWrapper").width() +'px'); $('#mainNext').css("left", $("#canvasWrapper").width() +'px');
$('#mainPre').css("left", '-' + $("#canvasWrapper").width() +'px'); $('#mainPre').css("left", '-' + $("#canvasWrapper").width() +'px');
$('#mainNext').css("display", 'none');
$('#mainPre').css("display", 'none');
} }
else if(animateType == animateTypeKeys.Type_FadeIn){ else if(animateType == animateTypeKeys.Type_FadeIn){
//$('#main').css("z-index",'2'); //$('#main').css("z-index",'2');
...@@ -1183,5 +1372,9 @@ function correctCanvasPosition(){ ...@@ -1183,5 +1372,9 @@ function correctCanvasPosition(){
}; };
//Get Page Transition configuration
function getPageTransitionConfig(){
animateType = ClientData.userOpt_pageTransition();
animatePeriod = eval(ClientData.userOpt_pageTransitionPeriod()) * 1000;
};
//End Function: No.4 - Editor : Long - Summary : Render Next Page Content //End Function: No.4 - Editor : Long - Summary : Render Next Page Content
\ No newline at end of file
...@@ -127,8 +127,6 @@ function initPage() { ...@@ -127,8 +127,6 @@ function initPage() {
/* init pos bottom toolbar*/ /* init pos bottom toolbar*/
initDisplayToolbarDevice(); initDisplayToolbarDevice();
// Lock screen // Lock screen
LockScreen(); LockScreen();
...@@ -146,6 +144,10 @@ function initPage() { ...@@ -146,6 +144,10 @@ function initPage() {
} }
else{ else{
getJsonContentInfo(); getJsonContentInfo();
//Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig();
//End Function : No.4 - Editor : Long - Date : 08/20/2013
} }
//End Function: No.12 //End Function: No.12
...@@ -277,6 +279,7 @@ function initPage() { ...@@ -277,6 +279,7 @@ function initPage() {
//Render next page //Render next page
renderNextPage(); renderNextPage();
//End Function: No.12 - Editor : Long - Summary : Render next page //End Function: No.12 - Editor : Long - Summary : Render next page
/* set pageTitle*/ /* set pageTitle*/
...@@ -410,6 +413,12 @@ function initPageMediaAndHtmlType(){ ...@@ -410,6 +413,12 @@ function initPageMediaAndHtmlType(){
handleSliderBar(); handleSliderBar();
$('#lblSlider').text('/ ' + 1); $('#lblSlider').text('/ ' + 1);
if (avwUserEnvObj.os != "android") {
$("#slider_page").slider("option", "disabled", true);
}
disable('#txtSearch', '#txtSlider');
}; };
...@@ -443,14 +452,14 @@ function initializeViewerComponent(viewId) { ...@@ -443,14 +452,14 @@ function initializeViewerComponent(viewId) {
{ {
'position': 'absolute', 'position': 'absolute',
'height' : '100%', 'height' : '100%',
'width' : '100%' 'width' : '100%',
'left': '0px'
} }
); );
$('#main').css( $('#main').css(
{ {
'position': 'absolute', 'position': 'absolute',
'top': marginY + 'px', 'top': marginY + 'px',
'left': marginX + 'px', 'left': marginX + 'px',
...@@ -470,7 +479,8 @@ function initializeViewerComponent(viewId) { ...@@ -470,7 +479,8 @@ function initializeViewerComponent(viewId) {
'left': marginX + 'px', 'left': marginX + 'px',
'box-shadow': '3px 3px 14px #333', 'box-shadow': '3px 3px 14px #333',
'background-color': 'rgba(153, 153, 153, 0.7)', 'background-color': 'rgba(153, 153, 153, 0.7)',
'border-radius': '4px' 'border-radius': '4px',
'display': 'none'
} }
); );
$('#mainPre').css( $('#mainPre').css(
...@@ -481,7 +491,8 @@ function initializeViewerComponent(viewId) { ...@@ -481,7 +491,8 @@ function initializeViewerComponent(viewId) {
'left': marginX + 'px', 'left': marginX + 'px',
'box-shadow': '3px 3px 14px #333', 'box-shadow': '3px 3px 14px #333',
'background-color': 'rgba(153, 153, 153, 0.7)', 'background-color': 'rgba(153, 153, 153, 0.7)',
'border-radius': '4px' 'border-radius': '4px',
'display': 'none'
} }
); );
} }
......
...@@ -51,7 +51,6 @@ $(document).ready(function () { ...@@ -51,7 +51,6 @@ $(document).ready(function () {
//openContentDetail(); //openContentDetail();
}); });
// Show content detail // Show content detail
...@@ -214,15 +213,16 @@ function contentdetail_dspRead_Click(e) { ...@@ -214,15 +213,16 @@ function contentdetail_dspRead_Click(e) {
//$('body,html').animate({ scrollTop: 0 }, 0); //$('body,html').animate({ scrollTop: 0 }, 0);
ClientData.IsRefresh(false); ClientData.IsRefresh(false);
var contentType = "1"; //var contentType = "1";
if(contentType == "1"){
if(ClientData.contentInfo_contentType() == ContentTypeKeys.Type_Others){
// Get content detail // Get content detail
avwCmsApi(ClientData.userInfo_accountPath(), "webGetContent", "GET", { contentId: ClientData.contentInfo_contentId(), sid: ClientData.userInfo_sid(), getType: 2 }, avwCmsApi(ClientData.userInfo_accountPath(), "webGetContent", "GET", { contentId: ClientData.contentInfo_contentId(), sid: ClientData.userInfo_sid(), getType: 2 },
function (data) { function (data) {
$.each(data.contentData , function(i, n){ $.each(data.contentData , function(i, n){
if(typeof n == "object"){ if(typeof n == "object"){
resourceIdDetail = n.resourceId; resourceIdDetail = n.resourceId;
window.location.href = getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail; window.open(getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true", "_self");
} }
}); });
......
...@@ -760,6 +760,10 @@ function initPushMessage() ...@@ -760,6 +760,10 @@ function initPushMessage()
$('#list-push-message').click( $('#list-push-message').click(
function (e) { function (e) {
$('#liPushMessage').removeClass('show').addClass('hide');
$('#list-push-message').slideUp();
e.stopPropagation(); e.stopPropagation();
return false; return false;
} }
......
...@@ -711,7 +711,7 @@ function downloadResourceById(contentId){ ...@@ -711,7 +711,7 @@ function downloadResourceById(contentId){
//Download resource //Download resource
function getResourceByIdFromAPI(resourceId){ function getResourceByIdFromAPI(resourceId){
return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId; return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
}; };
/* get url */ /* get url */
......
...@@ -55,7 +55,16 @@ function initialScreen() { ...@@ -55,7 +55,16 @@ function initialScreen() {
//check Save Login Info //check Save Login Info
function saveLoginInfo() { function saveLoginInfo() {
SessionStorageUtils.login();
//clear session of old user
SessionStorageUtils.clear();
avwUserSessionObj = null;
// create new session for anonymous user
avwCreateUserSession();
//SessionStorageUtils.login();
// Set flag コンテンツデータチェックフラグ = true to sync local with server // Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData.common_contentDataChkFlg(true); ClientData.common_contentDataChkFlg(true);
...@@ -600,25 +609,54 @@ function initLoginAnonymousUser() { ...@@ -600,25 +609,54 @@ function initLoginAnonymousUser() {
// clear all local storage data of old anonymous // clear all local storage data of old anonymous
LocalStorageUtils.clear(); LocalStorageUtils.clear();
// set number new push message to 0
ClientData.pushInfo_newMsgNumber(0);
// get service option list
optionList = data.serviceOptionList;
// save service user option
$.each(data.serviceOptionList, function (i, option) {
if (option.serviceName == 'marking') {
ClientData.serviceOpt_marking(option.value);
}
});
// hide splash screen then move to home page // hide splash screen then move to home page
$('#splashscreen').fadeOut('slow', 'swing', function () { $('#splashscreen').fadeOut('slow', 'swing', function () {
avwScreenMove("abvw/" + ScreenIds.Home); avwScreenMove("abvw/" + ScreenIds.Home);
}); });
} }
else { else {
showMessageErrorLoginAnonymous(); if (data.errorMessage != null && data.errorMessage != undefined) {
showMessageErrorLoginAnonymous(format(i18nText('msgAnonymousLoginErr'), data.errorMessage).toString());
}
else {
showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
}
} }
}, function (xhr, statusText, errorThrown) { }, function (xhr, statusText, errorThrown) {
showMessageErrorLoginAnonymous(); if (xhr.responseText && xhr.status != 0) {
var errorMessage = JSON.parse(xhr.responseText).errorMessage;
if (errorMessage) {
showMessageErrorLoginAnonymous(format(i18nText('msgAnonymousLoginErr'), errorMessage).toString());
}
else {
showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
}
} else {
showMessageErrorLoginAnonymous(i18nText('msgAnonymousLoginErr2'));
}
}); });
}; };
function showMessageErrorLoginAnonymous() { function showMessageErrorLoginAnonymous(errorMessage) {
$().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', { $().toastmessage('showToast', {
type: 'error', type: 'error',
sticky: true, sticky: true,
text:i18nText('msgAnonymousLoginErr') text: errorMessage
}); });
$('.toast-position-middle-center').css('width', '400px'); $('.toast-position-middle-center').css('width', '400px');
}; };
\ No newline at end of file
...@@ -676,6 +676,23 @@ function dspSave_Click(e) { ...@@ -676,6 +676,23 @@ function dspSave_Click(e) {
ClientData.userOpt_bkShioriFlag(0); ClientData.userOpt_bkShioriFlag(0);
} }
// save config page transition No.4
ClientData.userOpt_pageTransition($('#cboAnimation').val());
var timeAnimation = $('#txtValueAnimation').val();
if (isNaN(timeAnimation) || timeAnimation < 0.1 || timeAnimation.length == 2 || timeAnimation.length > 3 || timeAnimation.indexOf('.')==0) {
timeAnimation = 0.1;
}
else if (timeAnimation > 9.9) {
timeAnimation = 9.9;
}
ClientData.userOpt_pageTransitionPeriod(timeAnimation);
$('#txtValueAnimation').val(timeAnimation);
/* show messages */ /* show messages */
$().toastmessage({ position: 'middle-center' }); $().toastmessage({ position: 'middle-center' });
$().toastmessage('showToast', { $().toastmessage('showToast', {
...@@ -751,6 +768,11 @@ function dspOptReset_Click(e) { ...@@ -751,6 +768,11 @@ function dspOptReset_Click(e) {
// set default backup bookmark // set default backup bookmark
$('#chkBkShiori').attr('checked', 'checked'); $('#chkBkShiori').attr('checked', 'checked');
// reset page transition no.4
$('#txtValueAnimation').val(1);
$('#cboAnimation').val(0);
$('#slidebar-animation').slider('value', 1);
}; };
// Backup // Backup
...@@ -1142,4 +1164,39 @@ function InitScreen() { ...@@ -1142,4 +1164,39 @@ function InitScreen() {
else { else {
$("#chkBkShiori").attr('checked', 'checked'); $("#chkBkShiori").attr('checked', 'checked');
} }
// load config page transition & page transition period No.4
$('#cboAnimation').val(ClientData.userOpt_pageTransition());
$('#txtValueAnimation').val(ClientData.userOpt_pageTransitionPeriod());
$('#txtValueAnimation').blur(function () {
var value = $(this).val();
if (isNaN(value) || value < 0.1 || value.length == 2 || value.length > 3 || value.indexOf('.') == 0) {
value = 0.1;
}
else if (value > 9.9) {
value = 9.9;
}
$(this).val(value);
$('#slidebar-animation').slider('value', value);
});
$('#slidebar-animation').slider(
{
min: 0.1,
max: 9.9,
step: 0.1,
value: $('#txtValueAnimation').val(),
slide: doChangeAnimationSlidebar
}
);
};
function doChangeAnimationSlidebar(e,obj) {
$('#txtValueAnimation').val(obj.value);
}; };
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=9,10,chrome=1" />
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store"> <meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache">
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<script src="./common/js/jquery-1.8.1.min.js"></script> <script src="./common/js/jquery-1.8.1.min.js"></script>
<script src="./common/js/jquery-ui-1.8.23.custom.min.js"></script> <script src="./common/js/jquery-ui-1.8.23.custom.min.js"></script>
<script src="./common/js/jquery.ui.touch-punch.min.js"></script>
<script src="./common/js/jquery.toastmessage.js"></script> <script src="./common/js/jquery.toastmessage.js"></script>
<script src="./common/js/avweb.js"></script> <script src="./common/js/avweb.js"></script>
<script src="./common/js/i18n.js"></script> <script src="./common/js/i18n.js"></script>
...@@ -32,7 +33,11 @@ ...@@ -32,7 +33,11 @@
<script src="js/header.js" type="text/javascript"></script> <script src="js/header.js" type="text/javascript"></script>
<script src="js/settings.js" type="text/javascript"></script> <script src="js/settings.js" type="text/javascript"></script>
<style>
html{
-ms-touch-action : none;
}
</style>
<!--[if gte IE 9]> <!--[if gte IE 9]>
<style type="text/css"> <style type="text/css">
...@@ -127,6 +132,20 @@ ...@@ -127,6 +132,20 @@
<li><label><input type=checkbox name="repeat" value="repeat" class="chkbx" id="chkOpt002" checked="checked" /><label for="chkOpt002" id="txtOpt002" lang="txtOpt002" class="lang">動画、音楽繰り返し</label></label></li> <li><label><input type=checkbox name="repeat" value="repeat" class="chkbx" id="chkOpt002" checked="checked" /><label for="chkOpt002" id="txtOpt002" lang="txtOpt002" class="lang">動画、音楽繰り返し</label></label></li>
<li><label><input type=checkbox name="marking" value="marking" class="chkbx" id="chkOpt003" checked="checked" /><label id="lblOpt003" for="chkOpt003" lang="txtOpt003" class="lang">マーキング(コンテンツを開いた時に表示する)</label></label><span class="notice lang" lang="txtOpt004" >※コンテンツを開いた時に表示する</span></li> <li><label><input type=checkbox name="marking" value="marking" class="chkbx" id="chkOpt003" checked="checked" /><label id="lblOpt003" for="chkOpt003" lang="txtOpt003" class="lang">マーキング(コンテンツを開いた時に表示する)</label></label><span class="notice lang" lang="txtOpt004" >※コンテンツを開いた時に表示する</span></li>
<li><label><input type=checkbox name="confirmClose" value="confirmClose" class="chkbx" id="chkOpt005" checked="checked" /><label for="chkOpt005" id="txtOpt005" lang="txtOpt005" class="lang">タブ・ブラウザ終了・F5時のアラートが表示する</label></label></li> <li><label><input type=checkbox name="confirmClose" value="confirmClose" class="chkbx" id="chkOpt005" checked="checked" /><label for="chkOpt005" id="txtOpt005" lang="txtOpt005" class="lang">タブ・ブラウザ終了・F5時のアラートが表示する</label></label></li>
<li>
<label lang="txtOptPageTrans" class="lang">ビューのアニメーション種類</label>
<select id="cboAnimation">
<option class="lang" lang="txtOptPageTransSlide" value="0">スライド</option>
<option class="lang" lang="txtOptPageTransFade" value="1">フェード</option>
<!--<option class="lang" lang="txtOptPageTransRev" value="2">リヴェール&ムーブイン</option>-->
</select>
</li>
<li>
<label class="lang lblOptPageTransPeriod" lang="txtOptPageTransPeriod">アニメーション時間(Sec)</label>
<input type="text" id="txtValueAnimation" value="1.0" />
<span id="slidebar-container"><span id="slidebar-from">0.1</span><span id="slidebar-animation"></span><span id="slidebar-to">9.9</span></span>
</li>
</ul> </ul>
<h3 id="txtBkResCap" lang="txtBkResCap" class="lang">サーバにバックアップ/リストア</h3> <h3 id="txtBkResCap" lang="txtBkResCap" class="lang">サーバにバックアップ/リストア</h3>
<p class="logout_backup" id="regionOptionBackup"><label><input type=checkbox name="backup" value="backup" id="chkOptBkCfm" checked="checked"><label id="txtOptBkCfm" for="chkOptBkCfm" lang="txtOptBkCfm" class="lang">毎回ログアウトの時、バックアップするかどうかは必ず確認する</label></label> <p class="logout_backup" id="regionOptionBackup"><label><input type=checkbox name="backup" value="backup" id="chkOptBkCfm" checked="checked"><label id="txtOptBkCfm" for="chkOptBkCfm" lang="txtOptBkCfm" class="lang">毎回ログアウトの時、バックアップするかどうかは必ず確認する</label></label>
...@@ -140,7 +159,7 @@ ...@@ -140,7 +159,7 @@
</p> </p>
<p class="backupbtn"><a class="backup lang" lang="dspOptBk" id="dspOptBk" href="#" style="display:none;" >バックアップ</a><a href="#" id="dspOptRes" lang="dspOptRes" class="lang" style="visibility:hidden;">リストア</a></p> <p class="backupbtn"><a class="backup lang" lang="dspOptBk" id="dspOptBk" href="#" style="display:none;" >バックアップ</a><a href="#" id="dspOptRes" lang="dspOptRes" class="lang" style="visibility:hidden;">リストア</a></p>
<p class="savebtn"><a class="save lang" href="#" id="dspSave" lang="dspSave">保存する</a><a class="default lang" href="#" id="dspOptReset" lang="dspOptReset">初期設定に戻る</a></p> <p class="savebtn"><a class="save lang" href="#" id="dspSave" lang="dspSave">保存する</a><a class="default lang" href="#" id="dspOptReset" lang="dspOptReset">初期設定に戻る</a><div style="clear:both;"></div></p>
</div> </div>
</section> </section>
</article> </article>
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</dl> </dl>
<dl> <dl>
<dt class="lang" lang="txtLoginPwd">パスワード:</dt> <dt class="lang" lang="txtLoginPwd">パスワード:</dt>
<dd><input type="password" id="txtPassword" maxlength="10"/></dd> <dd><input type="password" id="txtPassword"/></dd>
</dl> </dl>
<p class="memory"><input type="checkbox" id="chkRemember"/><label class="lang" lang="txtLoginPwdRbr" for="chkRemember">アカウントパスとログインIDを記憶する</label></p> <p class="memory"><input type="checkbox" id="chkRemember"/><label class="lang" lang="txtLoginPwdRbr" for="chkRemember">アカウントパスとログインIDを記憶する</label></p>
<p class="loginbtn"><a id="btnLogin" class="lang" lang="dspLogin">ログイン</a></p> <p class="loginbtn"><a id="btnLogin" class="lang" lang="dspLogin">ログイン</a></p>
......
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