Commit 7ca6b4aa by Vo Duc Thang

リリース

・3D、HTMLオブジェクト
・アノニマスログイン
・コンテンツコンテナ(Noneタイプ)
parent 489ea73a
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a> <a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language"> <div class="menu_language">
<ul> <ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li> <li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span> <li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message"> <div id="list-push-message">
......
...@@ -64,7 +64,7 @@ var ContentTypeKeys = { ...@@ -64,7 +64,7 @@ var ContentTypeKeys = {
Type_Video : 'movie', Type_Video : 'movie',
Type_Music : 'music', Type_Music : 'music',
Type_Others : 'other', Type_Others : 'other',
Type_NoFile : 'no', Type_NoFile : 'none',
Type_Html: 'html', Type_Html: 'html',
Type_Enquete : 'enquete' Type_Enquete : 'enquete'
}; };
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20130827)User:", "txtLoginUser":"(Ver.20130828)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20130827)ログイン中:", "txtLoginUser":"(Ver.20130828)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20130827)로그인 중:", "txtLoginUser":"(Ver.20130828)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a> <a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language"> <div class="menu_language">
<ul> <ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li> <li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span> <li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message"> <div id="list-push-message">
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<script src="./js/contentview_Paint.js"></script> <script src="./js/contentview_Paint.js"></script>
<script src="./js/contentview_Anket.js"></script> <script src="./js/contentview_Anket.js"></script>
<script src="./js/contentview_3d.js"></script> <script src="./js/contentview_3d.js"></script>
<script src="./js/contentview_ContentTypeNone.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" />
......
...@@ -42,14 +42,14 @@ ...@@ -42,14 +42,14 @@
line-height:60px; line-height:60px;
margin:0; margin:0;
padding:0; padding:0;
background-color:#fff; /*background-color:#fff;*/
} }
.anket-dialog .anket-commands input[type='button'] .anket-dialog .anket-commands input[type='button']
{ {
border-radius:10px; border-radius:10px;
padding:0 10px; padding:0 10px;
border:solid 1px #333; border:solid 1px #333;
background-color:#eee; background-color:#ccc;
cursor:pointer; cursor:pointer;
margin-right:5px; margin-right:5px;
width:100px; width:100px;
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a> <a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language"> <div class="menu_language">
<ul> <ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li> <li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span> <li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message"> <div id="list-push-message">
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a> <a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language"> <div class="menu_language">
<ul> <ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li> <li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span> <li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message"> <div id="list-push-message">
......
...@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -308,7 +308,7 @@ function handleAPIWebContentPage(dataJson, pos) {
//Start Function : No.4 - Editor : Long - Date : 08/20/2013 //Start Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){ 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;
...@@ -353,7 +353,8 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -353,7 +353,8 @@ function handleAPIWebContentPage(dataJson, pos) {
imgTemp.src = formatStringBase64(dataStored[nStored].pageThumbnail); imgTemp.src = formatStringBase64(dataStored[nStored].pageThumbnail);
} else { /* data not loaded*/ }
else { /* data not loaded*/
$('#divListBookmark').append( $('#divListBookmark').append(
' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' + ' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' +
' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' + ' <img id="img_bookmark_' + bmList[nIndex].pageNo + '" class="imgbox" src="img/view_loading.gif" />' +
...@@ -388,7 +389,8 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -388,7 +389,8 @@ function handleAPIWebContentPage(dataJson, pos) {
} }
} else { /* page deleted */ }
else { /* page deleted */
$('#divListBookmark').append( $('#divListBookmark').append(
' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' + ' <li id="' + changePageNo(bmList[nIndex].pageNo) + '">' +
' <span class="mdltext">' + ' <span class="mdltext">' +
...@@ -405,7 +407,7 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -405,7 +407,7 @@ function handleAPIWebContentPage(dataJson, pos) {
} }
} }
} }
else if(contentType == ContentTypeKeys.Type_Image){ else if(contentType == ContentTypeKeys.Type_Image ){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) { for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1; nIndexBookMark = -1;
...@@ -475,10 +477,83 @@ function handleAPIWebContentPage(dataJson, pos) { ...@@ -475,10 +477,83 @@ function handleAPIWebContentPage(dataJson, pos) {
} }
} }
} }
else if(contentType == ContentTypeKeys.Type_NoFile ){
for (var nIndex = 0; nIndex < bmList.length; nIndex++) {
nIndexBookMark = -1;
var contentPage = dataJson.pages;
for (var nIndexJson = 0; nIndexJson < contentPage.length; nIndexJson++) {
if (contentPage[nIndexJson].pageNo == bmList[nIndex].pageNo) {
nIndexBookMark = nIndexJson;
break;
}
}
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') + (changePageNo(bmList[nIndex].pageNo) + 1) + '<br /> ' +
truncate(htmlEncode(contentPage[nIndexBookMark].pageText), 20) +
' </span>' +
' </li>'
);
//Resize Image
var imgTemp = new Image();
var imageContent = new Image();
var imageUrl = pageImages;
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
imageContent.onload = function(){
$("img.imgbox").attr('src', imageUrl);
};
imageContent.src = imageUrl;
};
imgTemp.src = "img/view_loading.gif";
lstPageNoBookMark.push(bmList[nIndex].pageNo);
} else { /* page deleted */
$('#divListBookmark').append(
' <li id="' + 0 + '">' +
' <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>'
);
}
}
}
//End Function : No.4 - Editor : Long - Date : 08/20/2013 //End Function : No.4 - Editor : Long - Date : 08/20/2013
if(contentType == ContentTypeKeys.Type_PDF || contentType == ContentTypeKeys.Type_NoFile){ if(contentType == ContentTypeKeys.Type_PDF){
if (lstPageNoBookMark.length > 0) { if (lstPageNoBookMark.length > 0) {
isSendingData = true; isSendingData = true;
loadDataBookmark(lstPageNoBookMark); loadDataBookmark(lstPageNoBookMark);
...@@ -3092,6 +3167,14 @@ function setDefaultEvent() { ...@@ -3092,6 +3167,14 @@ function setDefaultEvent() {
document.getElementById('main').addEventListener('touchstart', onTouchstart, false); document.getElementById('main').addEventListener('touchstart', onTouchstart, false);
document.getElementById('main').addEventListener('touchmove', onTouchmove, false); document.getElementById('main').addEventListener('touchmove', onTouchmove, false);
document.getElementById('main').addEventListener('touchend', onTouchend, false); document.getElementById('main').addEventListener('touchend', onTouchend, false);
document.getElementById('canvasWrapper').addEventListener('touchstart', function(event){event.preventDefault();}, false);
document.getElementById('canvasWrapper').addEventListener('touchmove', function(event){event.preventDefault();}, false);
document.getElementById('canvasWrapper').addEventListener('touchend', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchstart', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchmove', function(event){event.preventDefault();}, false);
//document.getElementById('wrapper').addEventListener('touchend', function(event){event.preventDefault();}, false);
} }
$('#main').mouseout(function (event) { $('#main').mouseout(function (event) {
...@@ -3225,11 +3308,15 @@ function enableControlsCopyMemo() { ...@@ -3225,11 +3308,15 @@ function enableControlsCopyMemo() {
$('#imgbookmark').bind('click', bookmarkPage); $('#imgbookmark').bind('click', bookmarkPage);
$('#imgbookmark').removeClass(); $('#imgbookmark').removeClass();
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
if(contentType == ContentTypeKeys.Type_PDF){
$('#listindex').bind('click', showListPageIndex); $('#listindex').bind('click', showListPageIndex);
$('#listindex').removeClass(); $('#listindex').removeClass();
$('#copytext').bind('click', showCopyText); $('#copytext').bind('click', showCopyText);
$('#copytext').removeClass(); $('#copytext').removeClass();
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary :
/* image memo */ /* image memo */
$('#imgmemo').bind('click', handleMemo); $('#imgmemo').bind('click', handleMemo);
...@@ -3247,16 +3334,15 @@ function enableControlsCopyMemo() { ...@@ -3247,16 +3334,15 @@ function enableControlsCopyMemo() {
$('#imgmarkingtoolbar').removeClass(); $('#imgmarkingtoolbar').removeClass();
} }
/*$('#firstpage').bind('click',firstPage_click); if(contentType == ContentTypeKeys.Type_PDF){
$('#firstpage').removeClass();
$('#prevpage').bind('click',prevPage_click);
$('#prevpage').removeClass();
$('#nextpage').bind('click',nextPage_click);
$('#nextpage').removeClass();
$('#lastpage').bind('click',lastPage_click);
$('#lastpage').removeClass();*/
$("#slider_page").slider("option", "disabled", false); $("#slider_page").slider("option", "disabled", false);
enable('#txtSearch', '#txtSlider'); enable('#txtSearch', '#txtSlider');
}
else if(contentType == ContentTypeKeys.Type_NoFile){
$("#slider_page").slider("option", "disabled", false);
enable('#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');
...@@ -4450,11 +4536,14 @@ function changeScaleDrawCanvas(scale) { ...@@ -4450,11 +4536,14 @@ function changeScaleDrawCanvas(scale) {
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary : //Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
function is3DObject(pageContent){ function is3DObject(pageContent){
var result = false; var result = false;
if(pageContent == null || pageContent == undefined){
result = false;
}
else{
if(pageContent.actionType == 9 && pageContent.mediaType == 8){ if(pageContent.actionType == 9 && pageContent.mediaType == 8){
result = true; result = true;
} }
}
return result; return result;
}; };
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary : //End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function showAnket(url, fullscreen) { function showAnket(url, fullscreen) {
var $container = $('#dialog'); var $container = $('#dialog');
url = url + "?sid=" + ClientData.userInfo_sid(); //url = url + "?sid=" + ClientData.userInfo_sid();
$container.html(''); $container.html('');
$container.addClass('anket-dialog'); $container.addClass('anket-dialog');
...@@ -57,7 +57,7 @@ function showAnket(url, fullscreen) { ...@@ -57,7 +57,7 @@ function showAnket(url, fullscreen) {
{ {
opacity = 0.7; opacity = 0.7;
} }
$('#dialog').css('opacity', opacity); $('#dialog,#dialog iframe,#dialog .anket-commands,#dialog .anket-commands input').css('opacity', opacity);
} }
); );
// resize anket // resize anket
......
...@@ -145,6 +145,19 @@ function getDataJsonFile() { ...@@ -145,6 +145,19 @@ function getDataJsonFile() {
} }
} }
} }
//Get Data Of page to draw page
if(contentType == ContentTypeKeys.Type_NoFile){
var pageDataInfo = [];
pageDataInfo["height"] = JsonFile.content.height;
pageDataInfo["width"] = JsonFile.content.width;
pageDataInfo["alpha"] = JsonFile.content.backgroundAlpha;
pageDataInfo["color"] = JsonFile.content.backgroundColor;
pageImages = returnImageString(pageDataInfo);
}
//End : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none //End : Function : No.12 - Editor : Long - Date: 08/27/2013 - Summary : Get Page Object for content type none
getPageObjectsByPageIndex(pageObjectsData, 0); getPageObjectsByPageIndex(pageObjectsData, 0);
......
function getJsonContentInfoTyeNone() {
webGetContentData();
getSearchDataFromJson();
getJsonDataPageTitle();
getJsonDataType4();
getJsonDataType5();
getDataJsonFile();
webGetPageImageContentSize();
};
//Return a string base 64 image has drawn with specify data
function returnImageString(data){
if(data){
var height = data.height;
var width = data.width;
var color = data.color;
var alpha = data.alpha;
}
var imageUrl = '';
var typeNoneCanvas = document.createElement('canvas');
var typeNoneContext = typeNoneCanvas.getContext('2d');
typeNoneCanvas.height = height;
typeNoneCanvas.width = width;
typeNoneContext.clearRect(0, 0, width, height)
typeNoneContext.fillStyle= color;
typeNoneContext.globalAlpha = alpha;
typeNoneContext.fillRect(0,0,width,height);
imageUrl = typeNoneCanvas.toDataURL();
return imageUrl;
};
...@@ -519,6 +519,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h, ...@@ -519,6 +519,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h,
stopAllAudio(); stopAllAudio();
if (resourceUrl != "") { if (resourceUrl != "") {
showHtml(resourceUrl); showHtml(resourceUrl);
showDialog(true); showDialog(true);
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
/* add memo click */ /* add memo click */
function handleAddMemo(event) { function handleAddMemo(event) {
if (ClientData.IsAddingMemo() == true) { if (ClientData.IsAddingMemo() == true) {
ClientData.IsAddingMemo(false); ClientData.IsAddingMemo(false);
isCopyMemo = false; isCopyMemo = false;
...@@ -44,7 +45,8 @@ function handleAddMemo(event) { ...@@ -44,7 +45,8 @@ function handleAddMemo(event) {
$('#imgaddmemo').removeClass(); $('#imgaddmemo').removeClass();
$('#imgaddmemo').addClass('memoAdd'); $('#imgaddmemo').addClass('memoAdd');
} else { }
else {
ClientData.IsDisplayMemo(true); ClientData.IsDisplayMemo(true);
ClientData.IsAddingMemo(true); ClientData.IsAddingMemo(true);
...@@ -680,17 +682,23 @@ function onClick_CanvasMain(event) { ...@@ -680,17 +682,23 @@ function onClick_CanvasMain(event) {
if (isClickLinkList == false && ClientData.IsAddingMarking() == false) { if (isClickLinkList == false && ClientData.IsAddingMarking() == false) {
/* area next and prev page */ /* area next and prev page */
var cwMain = $('#main').width(); var cwMain = $('#main').width();
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
if (event.pageX > 0 && event.pageX < 300) { if (event.pageX > 0 && event.pageX < 300) {
if(!isPreventClick){
prevPage_click(); prevPage_click();
}
else{
isPreventClick = false;
}
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) { } else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!isPreventClick){
nextPage_click(); nextPage_click();
} }
else{
isPreventClick = false;
}
}
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
} }
} }
} }
...@@ -699,16 +707,26 @@ function onClick_CanvasMain(event) { ...@@ -699,16 +707,26 @@ 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();
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
if (event.pageX > 0 && event.pageX < 300) { if (event.pageX > 0 && event.pageX < 300) {
if(!isPreventClick){
prevPage_click(); prevPage_click();
//isPreventClick = true;
}
else{
isPreventClick = false;
}
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
} else if (event.pageX > (cwMain - 300) && event.pageX < cwMain) {
if(!isPreventClick){
nextPage_click(); nextPage_click();
} }
else{
isPreventClick = false;
}
}
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
} }
} }
} }
...@@ -777,6 +795,13 @@ function mouseMove_canvasMain(event) { ...@@ -777,6 +795,13 @@ function mouseMove_canvasMain(event) {
//Start Function : No.20 //Start Function : No.20
else if(moveFlag && userScale == 1){ else if(moveFlag && userScale == 1){
//Prevent 3d animate when moving
isPageTransition = true;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013 - Summary : Prevent click when transit
var x = event.pageX; var x = event.pageX;
var y = event.pageY; var y = event.pageY;
var deltaX = x - px; var deltaX = x - px;
...@@ -884,8 +909,6 @@ function mouseMove_canvasMain(event) { ...@@ -884,8 +909,6 @@ function mouseMove_canvasMain(event) {
} }
}; };
var _3dAnimate = false;
var cntTime = 0;
function mouseDown_CanvasMain(event) { function mouseDown_CanvasMain(event) {
...@@ -933,31 +956,29 @@ function mouseDown_CanvasMain(event) { ...@@ -933,31 +956,29 @@ function mouseDown_CanvasMain(event) {
var imagePt = screenToImage(px, py); var imagePt = screenToImage(px, py);
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if (hitPageObj) {
if(userScale != 1){
moveFlag = true; moveFlag = true;
}
else{
moveFlag = false;
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
moveFlag = true;
clearTimeout(this.downTimer); clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() { this.downTimer = setTimeout(function() {
if(!isPageTransition){
_3dAnimate = true; _3dAnimate = true;
_3dAction = _3dActionType.TouchStart_MouseDown; _3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj; _curr3dObject = hitPageObj;
hitPageObj.action(imagePt); hitPageObj.action(imagePt);
moveFlag = false; moveFlag = false;
}, _3dTimeToDetect);
} }
else{ else{
_3dAnimate = false; _3dAnimate = false;
moveFlag = true;
} }
}, _3dTimeToDetect);
} }
}
else{ else{
moveFlag = true; _3dAnimate = false;
} }
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary: //End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary:
...@@ -994,6 +1015,7 @@ function mouseUp_CanvasMain(event) { ...@@ -994,6 +1015,7 @@ function mouseUp_CanvasMain(event) {
//Check if mouse move is fired to prevent click next/ prev page //Check if mouse move is fired to prevent click next/ prev page
//isInMouseMove = false; //isInMouseMove = false;
} }
if(_3dAnimate == true){ if(_3dAnimate == true){
...@@ -1003,6 +1025,11 @@ function mouseUp_CanvasMain(event) { ...@@ -1003,6 +1025,11 @@ function mouseUp_CanvasMain(event) {
_curr3dObject.action(); _curr3dObject.action();
} }
if(isPageTransition){
isPageTransition = false;
}
//End Function : No.20 //End Function : No.20
}; };
...@@ -1113,8 +1140,7 @@ function resetNaviAction(){ ...@@ -1113,8 +1140,7 @@ function resetNaviAction(){
correctCanvasPosition(); correctCanvasPosition();
}; };
var _isTouching = false;
var _isClick = false;
function onTouchstart(evt){ function onTouchstart(evt){
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
...@@ -1144,6 +1170,7 @@ function onTouchstart(evt){ ...@@ -1144,6 +1170,7 @@ function onTouchstart(evt){
break; break;
} }
if(!bContinue){ if(!bContinue){
return; return;
} }
...@@ -1167,6 +1194,9 @@ function onTouchstart(evt){ ...@@ -1167,6 +1194,9 @@ function onTouchstart(evt){
py = evt.pageY; py = evt.pageY;
} }
else{ else{
touchDownFirstPosX = evt.clientX;
touchDownFirstPosY = evt.clientY;
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary : //Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
var imagePt = screenToImage(evt.pageX, evt.pageY); var imagePt = screenToImage(evt.pageX, evt.pageY);
var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitPageObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
...@@ -1176,10 +1206,17 @@ function onTouchstart(evt){ ...@@ -1176,10 +1206,17 @@ function onTouchstart(evt){
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
clearTimeout(this.downTimer); clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() { this.downTimer = setTimeout(function() {
if(isPageTransition){
_3dAnimate = false;
}
else{
_3dAction = _3dActionType.TouchStart_MouseDown; _3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj; _curr3dObject = hitPageObj;
hitPageObj.action(imagePt); hitPageObj.action(imagePt);
_3dAnimate = true; _3dAnimate = true;
}
}, _3dTimeToDetect); }, _3dTimeToDetect);
} }
else{ else{
...@@ -1262,13 +1299,19 @@ function onTouchstart(evt){ ...@@ -1262,13 +1299,19 @@ function onTouchstart(evt){
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
clearTimeout(this.downTimer); clearTimeout(this.downTimer);
this.downTimer = setTimeout(function() { this.downTimer = setTimeout(function() {
var arr3DInfo = []; if(isPageTransition){
_3dAnimate = false;
_isClick = true;
}
else{
_3dAction = _3dActionType.TouchStart_MouseDown; _3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj; _curr3dObject = hitPageObj;
hitPageObj.action(imagePt); hitPageObj.action(imagePt);
_3dAnimate = true; _3dAnimate = true;
_isClick = false; _isClick = false;
}
}, _3dTimeToDetect); }, _3dTimeToDetect);
} }
...@@ -1305,12 +1348,32 @@ function onTouchstart(evt){ ...@@ -1305,12 +1348,32 @@ function onTouchstart(evt){
}); });
px = touch1.clientX+touch2.clientX/2; px = touch1.clientX+touch2.clientX/2;
py = touch1.clientY+touch1.clientY/2; py = touch1.clientY+touch1.clientY/2;
//console.log("_lastDist:" + _lastDist);
_isPageNaviTouch = false; _isPageNaviTouch = false;
} }
} }
}; };
//limit area to detech if it is click(on win8)
var clickLimitArea = 20;
//touch position
var touchDownFirstPosX = 0;
var touchDownFirstPosY = 0;
//position for click event on touch device
var _touchPageX = 0;
var _touchPageY = 0;
//Detect touch
var _isTouching = false;
//Detect click on touch device
var _isClick = false;
//Detech if page is being transition
var isPageTransition = false;
//Is 3d animating
var _3dAnimate = false;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
//is prevent click event
var isPreventClick = false;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
function onTouchmove(evt){ function onTouchmove(evt){
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
...@@ -1339,8 +1402,6 @@ function onTouchmove(evt){ ...@@ -1339,8 +1402,6 @@ function onTouchmove(evt){
return; return;
} }
//console.log("pointerId: " + evt.pointerId);
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault(); evt.preventDefault();
} }
...@@ -1351,9 +1412,9 @@ function onTouchmove(evt){ ...@@ -1351,9 +1412,9 @@ function onTouchmove(evt){
if(_startPoints.length == 1){ if(_startPoints.length == 1){
//move page case //move page case
//when change from zoom mode //when change from zoom mode
if(userScale != 1){ if(userScale != 1){
_isPageNaviTouch = false;
$('#main').css('cursor', 'pointer'); $('#main').css('cursor', 'pointer');
...@@ -1394,7 +1455,7 @@ function onTouchmove(evt){ ...@@ -1394,7 +1455,7 @@ function onTouchmove(evt){
} }
else{ else{
if(_3dAnimate){ if(_3dAnimate){
_isPageNaviTouch = false;
var imagePt = screenToImage(evt.pageX, evt.pageY); var imagePt = screenToImage(evt.pageX, evt.pageY);
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
...@@ -1407,11 +1468,28 @@ function onTouchmove(evt){ ...@@ -1407,11 +1468,28 @@ function onTouchmove(evt){
} }
} }
else{ else{
_isPageNaviTouch = true; _isPageNaviTouch = true;
//Detect is page transition to prevent 3d object animate
var posDiffX = evt.clientX - touchDownFirstPosX ;
var posDiffY = evt.clientY - touchDownFirstPosY ;
if(Math.abs(posDiffX) < clickLimitArea && Math.abs(posDiffY) < clickLimitArea){
isPageTransition = false;
isPreventClick = false;
}
else{
isPageTransition = true;
//Start : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
//Prevent CLick when page is being transit
isPreventClick = true;
//End : TRB00005, TRB00006 - Editor : Long - Date: 08/28/2013
}
touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId}; touch1 = {clientX: evt.clientX, clientY: evt.clientY, pointerId: evt.pointerId};
_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
//console.log("move page case");
if(animateType == animateTypeKeys.Type_Slide){ if(animateType == animateTypeKeys.Type_Slide){
$('#mainPre').css("display",'block'); $('#mainPre').css("display",'block');
...@@ -1520,6 +1598,7 @@ function onTouchmove(evt){ ...@@ -1520,6 +1598,7 @@ function onTouchmove(evt){
else{ else{
//update last touch position //update last touch position
if(touch2 == null && _isPageNaviTouch){ if(touch2 == null && _isPageNaviTouch){
isPageTransition = true;
currPos = {x:touch1.clientX, y: touch1.clientY}; currPos = {x:touch1.clientX, y: touch1.clientY};
if(! _transitionObject.processNaviPage(currPos)){ if(! _transitionObject.processNaviPage(currPos)){
...@@ -1612,6 +1691,13 @@ function onTouchend(evt){ ...@@ -1612,6 +1691,13 @@ function onTouchend(evt){
_3dAction = _3dActionType.TouchEnd_MouseUp; _3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action(); _curr3dObject.action();
} }
if(isPageTransition){
isPageTransition = false;
touchDownFirstPosX = 0;
touchDownFirstPosY = 0;
}
} }
//move page if enough condition //move page if enough condition
...@@ -1815,10 +1901,13 @@ function onTouchend(evt){ ...@@ -1815,10 +1901,13 @@ function onTouchend(evt){
_3dAction = _3dActionType.TouchEnd_MouseUp; _3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action(); _curr3dObject.action();
} }
if(isPageTransition){
isPageTransition = false;
}
} }
}; };
var _touchPageX = 0;
var _touchPageY = 0;
function processZoomPage(touch1, touch2){ function processZoomPage(touch1, touch2){
var dist = getDistance({ var dist = getDistance({
......
...@@ -1106,6 +1106,7 @@ function renderNextPage(){ ...@@ -1106,6 +1106,7 @@ function renderNextPage(){
var pageNo = parseInt(changePageIndex(getPageIndex())) + 1; var pageNo = parseInt(changePageIndex(getPageIndex())) + 1;
//Get next page background image //Get next page background image
if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(), avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) { function (data) {
...@@ -1119,15 +1120,25 @@ function renderNextPage(){ ...@@ -1119,15 +1120,25 @@ function renderNextPage(){
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}); });
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){
nextContent.setPageImages(totalPage, pageImages)
.setPageObjects(nextPageObjects)
.nextPage();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
}; };
//Render prev Page Content //Render prev Page Content
function renderPrevPage(){ function renderPrevPage(){
//Get next page Number //Get prev page Number
var pageNo = parseInt(changePageIndex(getPageIndex())) - 1; var pageNo = parseInt(changePageIndex(getPageIndex())) - 1;
//Get next page background image //Get prev page background image
if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(), avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) { function (data) {
...@@ -1141,6 +1152,14 @@ function renderPrevPage(){ ...@@ -1141,6 +1152,14 @@ function renderPrevPage(){
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}); });
}
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){
prevContent.setPageImages(totalPage, pageImages)
.setPageObjects(prevPageObjects)
.previousPage();
}
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
}; };
//Get next page objects by page index //Get next page objects by page index
......
...@@ -114,9 +114,7 @@ function initDisplayToolbarDevice() { ...@@ -114,9 +114,7 @@ function initDisplayToolbarDevice() {
function initPage() { function initPage() {
//$('body,html').animate({ scrollTop: 0 }, 350);
//animateType = animateTypeKeys.Type_FadeIn;
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
...@@ -142,6 +140,15 @@ function initPage() { ...@@ -142,6 +140,15 @@ function initPage() {
if(contentType == ContentTypeKeys.Type_Image){ if(contentType == ContentTypeKeys.Type_Image){
getContentInfoTypeImage(); getContentInfoTypeImage();
} }
else if(contentType == ContentTypeKeys.Type_NoFile){
//Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig();
//End Function : No.4 - Editor : Long - Date : 08/20/2013
//Start Function: No.12 - Editor : Long - Date: 08/28/2013
getJsonContentInfoTyeNone();
//Start Function: No.12 - Editor : Long - Date: 08/28/2013
}
else{ else{
getJsonContentInfo(); getJsonContentInfo();
...@@ -275,10 +282,14 @@ function initPage() { ...@@ -275,10 +282,14 @@ function initPage() {
//Start Function: No.12 - Editor : Long - Summary : Render next page //Start Function: No.12 - Editor : Long - Summary : Render next page
//Get next //Get next
if(totalPage > 1){
getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1); getNextPageObjectsByPageIndex(pageObjectsData, getPageIndex() + 1);
//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
...@@ -376,7 +387,6 @@ function initPage() { ...@@ -376,7 +387,6 @@ function initPage() {
}); });
}; };
function initPageMediaAndHtmlType(){ function initPageMediaAndHtmlType(){
//$('#divImageLoading').css('display', 'block'); //$('#divImageLoading').css('display', 'block');
...@@ -421,7 +431,6 @@ function initPageMediaAndHtmlType(){ ...@@ -421,7 +431,6 @@ function initPageMediaAndHtmlType(){
disable('#txtSearch', '#txtSlider'); disable('#txtSearch', '#txtSlider');
}; };
//Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas //Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas
/* Initialize PageViewer Component */ /* Initialize PageViewer Component */
function initializeViewerComponent(viewId) { function initializeViewerComponent(viewId) {
......
...@@ -62,9 +62,15 @@ $(document).ready(function () { ...@@ -62,9 +62,15 @@ $(document).ready(function () {
//Hide search panel until click on text field //Hide search panel until click on text field
$('div#header-searchbox').css('display', 'none'); $('div#header-searchbox').css('display', 'none');
if (isAnonymousLogin()) {
$('#li-login-username').hide();
}
else {
//li-login-username
$('#li-login-username').show();
//Display user name //Display user name
$('#login-username').text(ClientData.userInfo_userName()); $('#login-username').text(ClientData.userInfo_userName());
}
$('#dlgConfirmBackup-backup').click(confirmWithBackupFunction); $('#dlgConfirmBackup-backup').click(confirmWithBackupFunction);
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a> <a class="logo" href="javascript:void(0);" onclick="avwScreenMove(ScreenIds.Home)"> </a>
<div class="menu_language"> <div class="menu_language">
<ul> <ul>
<li><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li> <li id="li-login-username" style="display:none;"><label class="lang" lang="txtLoginUser">こんにちは</label><label id="login-username"> </label></li>
<li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span> <li class="pushmessage hide" id="liPushMessage"><label class="lang" lang="txtPushAlert">新着 : </label><label id="numbermessage"></label><span></span>
<div id="list-push-message"> <div id="list-push-message">
......
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