Commit 3b637887 by Vo Duc Thang

No.4 ページめくり効果: コンテンツ閲覧画面(タッチ・タブレット版)

No.1 汎用プッシュメッセージ (更新)
parent d87075ce
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</ul> </ul>
<p class="button"> <p class="button">
<a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a> <a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a>
<a class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a> <a style="display:none;" class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a>
<a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a> <a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a>
<a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a> <a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a> <a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
...@@ -53,6 +53,20 @@ var Consts = { ...@@ -53,6 +53,20 @@ var Consts = {
// Lock screen timer // Lock screen timer
ConstLockScreenTime: 1800000 ConstLockScreenTime: 1800000
};
/*Content Type Keys*/
var ContentTypeKeys = {
Type_PDF : 'pdf',
Type_Image : 'image',
Type_Video : 'movie',
Type_Music : 'music',
Type_Others : 'other',
Type_NoFile : 'no',
Type_Html: 'html',
Type_Enquete : 'enquete'
}; };
/* /*
...@@ -2555,6 +2569,9 @@ function truncateByBytes(value, byteCount) { ...@@ -2555,6 +2569,9 @@ function truncateByBytes(value, byteCount) {
}; };
function ToogleLogoutNortice() { function ToogleLogoutNortice() {
if (isAnonymousLogin()) {
return;
}
var isShow = false; var isShow = false;
if (ClientData.userOpt_closeOrRefreshAlert() == 1) { // Checked if (ClientData.userOpt_closeOrRefreshAlert() == 1) { // Checked
isShow = true; isShow = true;
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"Logout", "dspBkCancel":"Logout",
"txtSearchResult":"Result", "txtSearchResult":"Result",
"dspHome":"Home", "dspHome":"Home",
"txtLoginUser":"(Ver.20130823)User:", "txtLoginUser":"(Ver.20130826)User:",
"txtAll":"All", "txtAll":"All",
"txtMkgSize":"Size", "txtMkgSize":"Size",
"txtMkgS":"S", "txtMkgS":"S",
...@@ -139,5 +139,9 @@ ...@@ -139,5 +139,9 @@
"txtNext":"EN_次>", "txtNext":"EN_次>",
"txtPrevious":"EN_<前", "txtPrevious":"EN_<前",
"msgAnonymousLoginErr":"EN_ログインできません。(エラーコード:{0})", "msgAnonymousLoginErr":"EN_ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"EN_ログインできません。" "msgAnonymousLoginErr2":"EN_ログインできません。",
"txtEnqueteTitle":"EN_アンケート",
"txtTransparent":"EN_透明",
"txtSemiTransparent":"EN_半透明",
"txtNoTransparent":"EN_不透明"
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト", "dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果", "txtSearchResult":"検索結果",
"dspHome":"ホーム", "dspHome":"ホーム",
"txtLoginUser":"(Ver.20130823)ログイン中:", "txtLoginUser":"(Ver.20130826)ログイン中:",
"txtAll":"すべて", "txtAll":"すべて",
"txtMkgSize":"太さ", "txtMkgSize":"太さ",
"txtMkgS":"小", "txtMkgS":"小",
...@@ -139,5 +139,9 @@ ...@@ -139,5 +139,9 @@
"txtNext":"次>", "txtNext":"次>",
"txtPrevious":"<前", "txtPrevious":"<前",
"msgAnonymousLoginErr":"ログインできません。(エラーコード:{0})", "msgAnonymousLoginErr":"ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"ログインできません。" "msgAnonymousLoginErr2":"ログインできません。",
"txtEnqueteTitle":"アンケート",
"txtTransparent":"透明",
"txtSemiTransparent":"半透明",
"txtNoTransparent":"不透明"
} }
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃", "dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과", "txtSearchResult":"검색 결과",
"dspHome":"홈", "dspHome":"홈",
"txtLoginUser":"(Ver.20130823)로그인 중:", "txtLoginUser":"(Ver.20130826)로그인 중:",
"txtAll":"전체", "txtAll":"전체",
"txtMkgSize":"두께", "txtMkgSize":"두께",
"txtMkgS":"소", "txtMkgS":"소",
...@@ -139,5 +139,9 @@ ...@@ -139,5 +139,9 @@
"txtNext":"KO_次>", "txtNext":"KO_次>",
"txtPrevious":"KO_<前", "txtPrevious":"KO_<前",
"msgAnonymousLoginErr":"KO_ログインできません。(エラーコード:{0})", "msgAnonymousLoginErr":"KO_ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"KO_ログインできません。" "msgAnonymousLoginErr2":"KO_ログインできません。",
"txtEnqueteTitle":"KO_アンケート",
"txtTransparent":"KO_透明",
"txtSemiTransparent":"KO_半透明",
"txtNoTransparent":"KO_不透明"
} }
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</ul> </ul>
<p class="button"> <p class="button">
<a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a> <a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a>
<a class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a> <a style="display:none;" class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a>
<a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a> <a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a>
<a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a> <a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a> <a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
...@@ -50,12 +50,14 @@ ...@@ -50,12 +50,14 @@
<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="./js/contentview_Anket.js"></script>
<script src="./js/contentview_3d.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" />
<link type="text/css" rel="stylesheet" href="css/viewer.css" /> <link type="text/css" rel="stylesheet" href="css/viewer.css" />
<link type="text/css" rel="stylesheet" href="./common/css/jquery.treeview.css" /> <link type="text/css" rel="stylesheet" href="./common/css/jquery.treeview.css" />
<link type="text/css" rel="stylesheet" href="./common/css/jquery.powertip.css" /> <link type="text/css" rel="stylesheet" href="./common/css/jquery.powertip.css" />
<link type="text/css" rel="stylesheet" href="css/Anket.css" />
<script type="text/javascript" src="common/js/jquery.powertip.js"></script> <script type="text/javascript" src="common/js/jquery.powertip.js"></script>
<script type="text/javascript" src="common/js/script.js"></script> <script type="text/javascript" src="common/js/script.js"></script>
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
</head> </head>
<body id="viewer"> <body id="viewer">
<div id="wrapper"> <div id="wrapper" style="overflow: hidden">
<!--Viewer component is added here --> <!--Viewer component is added here -->
<div id="overlay" class="web_dialog_overlay"> </div> <div id="overlay" class="web_dialog_overlay"> </div>
...@@ -349,6 +351,5 @@ ...@@ -349,6 +351,5 @@
<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
.anket-dialog
{
position: absolute;
border:solid 1px #333;
background-color:#fff;
z-index:1000;
/*
width: 340px;
top:60px;
bottom:60px;
height:540px;*/
}
.anket-dialog h1
{
text-align:left;
height:25px;
line-height:25px;
color:#fff;
background:url(../img/viewer/pophdbg.png) 0 0 repeat;
margin:0;
padding:0 0 0 5px;
/*height:5%;
line-height:100%;*/
}
.anket-dialog .anket-container
{
height:85%;
/*overflow:auto;*/
}
.anket-dialog .anket-container iframe
{
-webkit-overflow-scrolling: touch !important;
overflow: scroll !important;
}
.anket-dialog p
{
text-align:center;
border-top:solid 1px #333;
height:40px;
margin:0;
padding:10px 0;
}
.anket-dialog p input[type='button']
{
border-radius:10px;
padding:5px 10px;
border:solid 1px #333;
background-color:#eee;
cursor:pointer;
margin-right:5px;
width:100px;
}
.anket-dialog p input[type='button']:hover
{
background-color:#fff;
}
\ No newline at end of file
...@@ -110,8 +110,7 @@ ...@@ -110,8 +110,7 @@
{ {
color:#000; color:#000;
font-size:12px; font-size:12px;
padding:3px 0; padding:3px 0;
white-space:nowrap;
line-height:150%; line-height:150%;
} }
#list-push-message p #list-push-message p
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</ul> </ul>
<p class="button"> <p class="button">
<a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a> <a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a>
<a class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a> <a style="display:none;" class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a>
<a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a> <a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a>
<a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a> <a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a> <a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</ul> </ul>
<p class="button"> <p class="button">
<a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a> <a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a>
<a class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a> <a style="display:none;" class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a>
<a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a> <a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a>
<a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a> <a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a> <a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
...@@ -36,17 +36,6 @@ var thumbnailArr = []; ...@@ -36,17 +36,6 @@ var thumbnailArr = [];
//Content type array. //Content type array.
var contentTypeArr = []; var contentTypeArr = [];
//Content's types
var ContentTypeKeys = {
Type_PDF : 'pdfFile',
Type_Image : 'imageFile',
Type_Video : 'movieFile',
Type_Music : 'soundFile',
Type_Others : 'otherFile',
Type_NoFile : 'noFile',
Type_Html: 'htmlFile'
};
var ThumbnailForOtherType = { var ThumbnailForOtherType = {
Thumbnail_ImageType : 'img/image_type.png', Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png', Thumbnail_VideoType : 'img/iPad_video.png',
......
...@@ -2430,6 +2430,7 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2430,6 +2430,7 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.resourceUrl obj.resourceUrl
); );
}else if(obj.actionType == 12){ }else if(obj.actionType == 12){
pageObj = new anket( pageObj = new anket(
obj.mediaType, obj.mediaType,
obj.actionType, obj.actionType,
...@@ -2440,7 +2441,11 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2440,7 +2441,11 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.width, obj.width,
obj.height, obj.height,
obj.visible, obj.visible,
obj.resourceUrl obj.resourceUrl,
obj.questionNo,
obj.replyLimit,
obj.fullScreen,
obj.saveAs
); );
} }
//End Function : No.9 - Editor : Long - Summary : //End Function : No.9 - Editor : Long - Summary :
...@@ -2542,12 +2547,12 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2542,12 +2547,12 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
//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
case 8: case 8:
//mediaType = 9 //mediaType = 9
obj["_3dLastId"] = convNumTo2Char(Math.round(obj.horizonCount/2)) +"-"+ convNumTo2Char(Math.round(obj.horizonCount/2)); //obj["_3dLastId"] = convNumTo2Char(Math.round(obj.verticalCount/2)) +"-"+ convNumTo2Char(Math.round(obj.horizonCount/2));
obj["_3dFirstPointX"] = 0; obj["_currFrameX"] = Math.round(obj.horizonCount/2);
obj["_3dFirstPointY"] = 0; obj["_currFrameY"] = Math.round(obj.verticalCount/2);
obj["_3dV"] = obj.verticalCount; obj["_lastSelectedFrame"] = Object();
obj["_3dH"] = obj.horizonCount; obj["arrFrame"] = createMatrixPoints(obj.width, obj.height, obj.verticalCount,
obj.horizonCount, Math.round(obj.horizonCount/2), Math.round(obj.verticalCount/2));
_object3DImageArr.push(obj); _object3DImageArr.push(obj);
pageObj = new object3d( pageObj = new object3d(
...@@ -2585,6 +2590,7 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2585,6 +2590,7 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
case 11: case 11:
//mediaType = 11 //mediaType = 11
if(obj.actionType == 12){ if(obj.actionType == 12){
pageObj = new anket( pageObj = new anket(
obj.mediaType, obj.mediaType,
obj.actionType, obj.actionType,
...@@ -2595,7 +2601,11 @@ ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2595,7 +2601,11 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.width, obj.width,
obj.height, obj.height,
obj.visible, obj.visible,
obj.resourceUrl obj.resourceUrl,
obj.questionNo,
obj.replyLimit,
obj.fullScreen,
obj.saveAs
); );
} }
break; break;
......
var _3dMoveFlag = false;
var _3dAction = '';
var _curr3dObject;
var _3dActionType = {
'TouchStart_MouseDown' : 0,
'TouchMove_MouseMove' : 1,
'TouchEnd_MouseUp' : 2
};
function createMatrixPoints(width, height, _v, _h, imgCurrX, imgCurrY){
var deltaX = width/ _v;
var deltaY = height/ _h;
var _arrFrame = [];
for (var countH = 1; countH<= _h; countH++){
var temp = [];
for(var countV=1;countV<=_v;countV++){
var frame = {
x1: deltaX*(countV-1),
y1: deltaY*(countH-1),
x2: deltaX*countV,
y2: deltaY*countH,
matrixY: countH,
matrixX: countV
};
temp[countV]=frame;
}
_arrFrame[countH]=temp;
}
_arrFrame = setImageIndexToMatrix(imgCurrX, imgCurrY, _arrFrame, _h, _v);
return _arrFrame;
};
function setImageIndexToMatrix(imgCurrX, imgCurrY, _arrFrame, _h, _v){
var deltaH = (_h - 1)/2;
var deltaV = (_v - 1)/2;
for(var countY=1;countY<=_h;countY++){
var currY = reCalcMatrixY(imgCurrY - deltaH + (countY - 1), _h);
for(var countX=1;countX<=_v;countX++){
var currFrame = _arrFrame[countY][countX];
currFrame.imgY = currY;
var currX = imgCurrX - deltaV + (countX-1);
currFrame.imgX = reCalcMatrixX(currX, _v);
//set value back
_arrFrame[countY][countX] = currFrame;
}
}
return _arrFrame;
};
function showCurrImg(id, x, y, w, h, _currFrameX, _currFrameY){
var strCountH = convNumTo2Char(_currFrameY);
var strCountV = convNumTo2Char(_currFrameX);
var canvas = document.getElementById('offscreen');
var context = canvas.getContext('2d');
var imageId = strCountH + "-" + strCountV;
var imageUrl = "";
for(var i = 0 ; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == id){
var Obj1 = obj["3dview"];
imageUrl = Obj1[imageId];
break;
}
}
var imgCurr = new Image();
imgCurr.onload= function() {
context.drawImage(imgCurr, x,y,w,h);
context.save();
if (ClientData.IsAddingMarking() == false && ClientData.IsDisplayMarking() == true) {
drawMarkingOnScreen();
if(!isExistDrawing){
flip();
}
}
else{
flip();
}
};
imgCurr.src = imageUrl;
};
function reCalcMatrixX(x, _v){
if(x <= 0)
x = x + _v;
if(x >_v)
x = x - _v;
return x;
};
function reCalcMatrixY(y, _h){
if(y <= 0)
y = y + _h;
if(y >_h)
y = y - _h;
return y;
};
function getArrFrame(id){
var arrResult = [];
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == id){
arrResult = obj.arrFrame;
return arrResult;
}
}
};
function get3dLastSeclectedFrame(id){
var arrResult = Object();
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == id){
arrResult = obj._lastSelectedFrame;
return arrResult;
}
}
};
function set3dLastSeclectedFrame(id, lastFrame){
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == id){
_object3DImageArr[i]._lastSelectedFrame = lastFrame;
}
}
};
function getMatrixIndexByPosition(id, position, left, top){
//compate with matrix to check went to another frame or not
var posX = position.x;
var posY = position.y;
posX = posX - left;
posY = posY - top;
var _arrFrame = getArrFrame(id);
for(var countY=1;countY<_arrFrame.length;countY++){
for(var countX=1;countX<_arrFrame[countY].length;countX++){
// get curr frame image object
var objFrame = _arrFrame[countY][countX];
if(posX >= objFrame.x1 && posX < objFrame.x2 && posY >= objFrame.y1 && posY < objFrame.y2 ){
var nRet = objFrame;
return nRet;
}
}
}
return false;
};
function get3dCurrentFramePos(id){
var currFrame = [];
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == id){
currFrame['_currFrameX'] = obj['_currFrameX'];
currFrame['_currFrameY'] = obj['_currFrameY'];
return currFrame;
}
}
};
function set3dCurrentFramePos(id, currFramePos){
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == id){
_object3DImageArr[i]._currFrameX = currFramePos._currFrameX;
_object3DImageArr[i]._currFrameY = currFramePos._currFrameY;
}
}
};
function OnMouseDown3D(id, position, left, top) {
if(!_3dMoveFlag ){
_3dMoveFlag = true;
//compate with matrix to check went to another frame or not
//and set to last selected frame to compare on move event later
var _lastSelectedFrame = getMatrixIndexByPosition(id, position, left, top);
set3dLastSeclectedFrame(id, _lastSelectedFrame);
}
};
function OnMouseMove3D(id, position, left, top, width, height, _v, _h) {
if(!_3dMoveFlag){
return;
}
//compate with matrix to check went to another frame or not
var selectedFrame = getMatrixIndexByPosition(id, position, left, top);
var _lastSeclectedFrame = get3dLastSeclectedFrame(id);
var _currFramePos = get3dCurrentFramePos(id);
var _currFrameX = _currFramePos._currFrameX;
var _currFrameY = _currFramePos._currFrameY;
var strCountH = convNumTo2Char(selectedFrame.matrixY);
var strCountV = convNumTo2Char(selectedFrame.matrixX);
//get what action did occur
var action = get3DAction(_lastSeclectedFrame, selectedFrame);
if(action!=0){
if(action==1)
//_currFrameX--;
_currFrameX++;
else if(action==2)
//_currFrameX++;
_currFrameX--;
else if(action==3)
//_currFrameY--;
_currFrameY++;
else if(action==4)
//_currFrameY++;
_currFrameY--;
_currFrameX = reCalcMatrixX(_currFrameX, _v);
_currFrameY = reCalcMatrixY(_currFrameY, _h);
// show current img
showCurrImg(id, left, top, width, height, _currFrameX, _currFrameY);
_lastSeclectedFrame = selectedFrame;
//recalculate X, Y value
_currFramePos._currFrameX = _currFrameX;
_currFramePos._currFrameY = _currFrameY;
set3dCurrentFramePos(id, _currFramePos);
set3dLastSeclectedFrame(id, _lastSeclectedFrame);
}
};
function OnMouseEnd3D(id, _h, _v) {
if(_3dMoveFlag) {
_3dMoveFlag = false;
var currFramePos = get3dCurrentFramePos(id);
var _currFrameX = currFramePos._currFrameX;
var _currFrameY = currFramePos._currFrameY;
var _arrFrame = getArrFrame(id);
setImageIndexToMatrix(_currFrameX, _currFrameY, _arrFrame, _h, _v);
}
};
//compare 2 frame to get action
function get3DAction(lastFrame, currFrame){
var nRet = 0;
if(lastFrame.x1<currFrame.x1)
nRet=1; // move right
else if(lastFrame.x1>currFrame.x1)
nRet=2; // move left
else if(lastFrame.y1<currFrame.y1)
nRet=3; // move down
else if(lastFrame.y1>currFrame.y1)
nRet=4; // move up
return nRet;
};
function showAnket(url){ 
function showAnket(url, fullscreen) {
var $container = $('#dialog'); var $container = $('#dialog');
url = url + "?sid=" + ClientData.userInfo_sid();
$container.html(''); $container.html('');
$container.attr('style', 'background-color: white; position: absolute; top: 0% !important; height: 100% !important;width: 25% !important; opacity: 0.85'); $container.addClass('anket-dialog');
var width = '100%';
if (fullscreen) {
$container.attr('style', 'width:100%; left:0% !important;');
}
else {
$container.attr('style', 'width:340px; right:0% !important;left:auto;');
width = '340';
}
$container.draggable({ handle: "h1" }); $container.draggable({ handle: "h1" });
$container.html( $container.html(
'<h1 style="height:25px;background:url(./img/viewer/pophdbg.png) 0 0 repeat; ">' '<h1>'+i18nText('txtEnqueteTitle')
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>' + '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>' + '</h1>'
+ '<iframe src="'+ url +'" style="position: absolute; width: 100%; height: 95%; ">' + '<div class="anket-container"><iframe width="' + width + '" height="100%" frameborder="0" scrolling="auto" src="' + url + '">'// style="position: absolute; width: 100%; height: 480px; "
+ '</iframe>' + '</iframe></div>'
+ '<p><input type="button" value="'+i18nText('txtTransparent')+'" id="btnFullOpacity"/> <input type="button" value="'+i18nText('txtSemiTransparent')+'" id="btnApartOpacity"/> <input type="button" value="'+i18nText('txtNoTransparent')+'" id="btnNoOpacity"/></p>'
); );
$('#dialog h1 img').click(function(){ $('#dialog h1 img').click(function(){
$container.removeAttr('style'); $container.removeAttr('style');
hideDialog(); hideDialog();
}); });
var avwUserEnvObj = new UserEnvironment();
if (avwUserEnvObj.isIpad()) {
$('#dialog .anket-container').css('overflow', 'auto');
}
$('#dialog p input').click(
function () {
var opacity = 1;
if ($(this).index() == 0) {
opacity = 0.2;
}
else if($(this).index()==1)
{
opacity = 0.7;
}
$('#dialog').css('opacity', opacity);
}
);
}; };
\ No newline at end of file
...@@ -390,293 +390,21 @@ var _isEnableRotate = false; ...@@ -390,293 +390,21 @@ var _isEnableRotate = false;
var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, vCnt, visible, imageObjects){ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, vCnt, visible, imageObjects){
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null); this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null);
this.action = function (event){ this.action = function (imagePt){
var object3DInfoArr = get3dObjectInfoById(id); if(_3dAction == _3dActionType.TouchStart_MouseDown){
OnMouseDown3D(id, imagePt, x, y);
var object3DPageX; }
var object3DPageY; else if(_3dAction == _3dActionType.TouchMove_MouseMove){
OnMouseMove3D(id, imagePt, x, y, w, h, hCnt, vCnt);
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") { }
object3DPageX = event.targetTouches[0].pageX; else if(_3dAction == _3dActionType.TouchEnd_MouseUp){
object3DPageY = event.targetTouches[0].pageY; OnMouseEnd3D(id, hCnt, vCnt);
} }
else{
object3DPageX = event.pageX;
object3DPageY = event.pageY;
}
if(object3DInfoArr._3dLastId == ''){
object3DInfoArr._3dH = Math.round(hCnt/2);
object3DInfoArr._3dV = Math.round(vCnt/2);
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
}
else{
if(object3DPageX < object3DInfoArr._3dFirstPointX){
if(object3DPageY < object3DInfoArr._3dFirstPointY){
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dH--;
object3DInfoArr._3dV--;
if(object3DInfoArr._3dH < 1){
object3DInfoArr._3dH = hCnt;
}
if(object3DInfoArr._3dV < 1){
object3DInfoArr._3dV = vCnt;
}
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
cntTime = 0;
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
else if(object3DPageY > object3DInfoArr._3dFirstPointY){
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dH--;
object3DInfoArr._3dV++;
if(object3DInfoArr._3dH < 1){
object3DInfoArr._3dH = hCnt;
}
if(object3DInfoArr._3dV > vCnt){
object3DInfoArr._3dV = 1;
}
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
cntTime = 0;
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
else{
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dH--;
if(object3DInfoArr._3dH < 1){
object3DInfoArr._3dH = hCnt;
}
cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
}
else if(object3DPageX > object3DInfoArr._3dFirstPointX){
if(object3DPageY < object3DInfoArr._3dFirstPointY){
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dH++;
object3DInfoArr._3dV--;
if(object3DInfoArr._3dH > hCnt){
object3DInfoArr._3dH = 1;
}
if(object3DInfoArr._3dV < 1){
object3DInfoArr._3dV = vCnt;
}
cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
else if(object3DPageY > object3DInfoArr._3dFirstPointY){
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dH++;
object3DInfoArr._3dV++;
if(object3DInfoArr._3dH > hCnt){
object3DInfoArr._3dH = 1;
}
if(object3DInfoArr._3dV > vCnt){
object3DInfoArr._3dV = 1;
}
cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
else{
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dH++;
if(object3DInfoArr._3dH > hCnt){
object3DInfoArr._3dH = 1;
}
cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
}
else{
if(object3DPageY < object3DInfoArr._3dFirstPointY){
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dV--;
if(object3DInfoArr._3dV < 1){
object3DInfoArr._3dV = vCnt;
}
cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
else if(object3DPageY > object3DInfoArr._3dFirstPointY){
if(cntTime == 35){
if(_isEnableRotate){
object3DInfoArr._3dV++;
if(object3DInfoArr._3dV > vCnt){
object3DInfoArr._3dV = 1;
}
cntTime = 0;
_3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
else{
if(cntTime == 35){
if(_isEnableRotate){
cntTime = 0;
object3DInfoArr._3dLastId = convNumTo2Char(object3DInfoArr._3dV) + '-' + convNumTo2Char(object3DInfoArr._3dH);
change3DImage(id, object3DInfoArr._3dLastId, x, y, w, h);
}
}
}
}
set3dObjectInfoById(id, object3DInfoArr);
}
}; };
}; };
object3d.prototype = new PageObject(); object3d.prototype = new PageObject();
function change3DImage(objectId, imageId, x, y, w, h){
if(_isEnableRotate){
_isEnableRotate = false;
}
var imageUrl;
for(var i = 0 ; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == objectId){
var Obj1 = obj["3dview"];
imageUrl = Obj1[imageId];
break;
}
}
var imageObj = new Image();
imageObj.onload = function () {
var canvasObject = document.getElementById("offscreen");
var contextObject = canvasObject.getContext("2d");
contextObject.drawImage(imageObj, x, y, w, h);
if (ClientData.IsAddingMarking() == false && ClientData.IsDisplayMarking() == true) {
drawMarkingOnScreen();
if(!isExistDrawing){
flip();
}
}
else{
flip();
}
_isEnableRotate = true;
};
imageObj.src = imageUrl;
};
function get3dObjectInfoById(objectId){
var arrResult = [];
if(_isEnableRotate){
_isEnableRotate = false;
}
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == objectId){
arrResult["_3dLastId"] = obj._3dLastId;
arrResult["_3dFirstPointX"] = obj._3dFirstPointX;
arrResult["_3dFirstPointY"] = obj._3dFirstPointY;
arrResult["_3dV"] = obj._3dV;
arrResult["_3dH"] = obj._3dH;
_isEnableRotate = true;
return arrResult;
}
}
};
function set3dObjectInfoById(objectId, arrInfo){
if(_isEnableRotate){
_isEnableRotate = false;
}
for(var i = 0; i < _object3DImageArr.length; i++){
var obj = _object3DImageArr[i];
if(obj.id == objectId){
if(arrInfo._3dLastId != null && arrInfo._3dLastId != ''){
obj["_3dLastId"] = arrInfo._3dLastId;
}
if(arrInfo._3dFirstPointX != null && arrInfo._3dFirstPointX !=''){
obj["_3dFirstPointX"] = arrInfo._3dFirstPointX;
}
if(arrInfo._3dFirstPointY != null && arrInfo._3dFirstPointY !=''){
obj["_3dFirstPointY"] = arrInfo._3dFirstPointY;
}
if(arrInfo._3dV != null && arrInfo._3dV !=''){
obj["_3dV"] = arrInfo._3dV;
}
if(arrInfo._3dH != null && arrInfo._3dH !=''){
obj["_3dH"] = arrInfo._3dH;
}
_isEnableRotate = true;
break;
}
}
};
//End Function : No.9 //End Function : No.9
/* mediaType = 7 write text object*/ /* mediaType = 7 write text object*/
...@@ -789,7 +517,7 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, ...@@ -789,7 +517,7 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible,
stopAllAudio(); stopAllAudio();
if (resourceUrl != "") { if (resourceUrl != "") {
showAnket(resourceUrl); showAnket(resourceUrl, fullscreen);
showDialog(true); showDialog(true);
} }
}; };
......
...@@ -334,74 +334,86 @@ function prevPage_click() { ...@@ -334,74 +334,86 @@ function prevPage_click() {
/* event first page */ /* event first page */
function firstPage_click() { function firstPage_click() {
if (getContent().pageIndex != 0) { if (getContent().pageIndex != 0) {
playBGMOfContent();
playBGMOfPage(0); if(getContent().pageIndex == 1){
prevPage_click();
disableAllControl(); }
else{
$('#divImageLoading').css('display', 'block'); playBGMOfContent();
playBGMOfPage(0);
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen")); disableAllControl();
avwGrabContentPageImage(ClientData.userInfo_accountPath(), $('#divImageLoading').css('display', 'block');
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) { // Clear canvas offscreen
pageImages = data; clearCanvas(document.getElementById("offscreen"));
/* get page Objects */ avwGrabContentPageImage(ClientData.userInfo_accountPath(),
getPageObjectsByPageIndex(pageObjectsData, 0); { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); function (data) {
pageImages = data;
$('#divImageLoading').css('display', 'none');
/* get page Objects */
changeScale(userScale); getPageObjectsByPageIndex(pageObjectsData, 0);
checkDisableButtonZoom(); getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
var tran = new Transition();
tran.flipToPage(0); $('#divImageLoading').css('display', 'none');
}, changeScale(userScale);
function (xmlHttpRequest, txtStatus, errorThrown) { checkDisableButtonZoom();
showErrorScreen(); var tran = new Transition();
}); tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
} }
}; };
/* event last page */ /* event last page */
function lastPage_click() { function lastPage_click() {
if (getContent().pageIndex != (totalPage - 1)) { if (getContent().pageIndex != (totalPage - 1)) {
playBGMOfContent();
playBGMOfPage(totalPage - 1); if(getContent().pageIndex == totalPage - 2){
nextPage_click();
disableAllControl(); }
else{
$('#divImageLoading').css('display', 'block'); playBGMOfContent();
playBGMOfPage(totalPage - 1);
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen")); disableAllControl();
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1); $('#divImageLoading').css('display', 'block');
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage }, // Clear canvas offscreen
function (data) { clearCanvas(document.getElementById("offscreen"));
pageImages = data;
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
/* get page Objects */ avwGrabContentPageImage(ClientData.userInfo_accountPath(),
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1); { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); function (data) {
pageImages = data;
$('#divImageLoading').css('display', 'none');
/* get page Objects */
$('#divImageLoading').css('display', 'none'); getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
checkDisableButtonZoom();
var tran = new Transition(); $('#divImageLoading').css('display', 'none');
tran.flipToPage(totalPage - 1);
$('#divImageLoading').css('display', 'none');
},
function (xmlHttpRequest, txtStatus, errorThrown) { checkDisableButtonZoom();
showErrorScreen(); var tran = new Transition();
}); tran.flipToPage(totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
} }
}; };
...@@ -704,14 +716,17 @@ function onClick_CanvasMain(event) { ...@@ -704,14 +716,17 @@ function onClick_CanvasMain(event) {
}; };
function mouseMove_canvasMain(event) { function mouseMove_canvasMain(event) {
//Start Function : No.20 - Editor : Long //Start Function : No.20 - Editor : Long
if(_isTouching){ if(_isTouching){
//_isTouching = false; //_isTouching = false;
return; return;
} }
if(ClientData.IsAddingMarking() == true){
return;
}
if(isLoadingObject){ if(isLoadingObject){
moveFlag = false; moveFlag = false;
} }
...@@ -817,9 +832,8 @@ function mouseMove_canvasMain(event) { ...@@ -817,9 +832,8 @@ function mouseMove_canvasMain(event) {
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y); var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){ if(hitObj){
cntTime++; _3dAction = _3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
hitObj.action(event);
} }
else{ else{
_3dAnimate = false; _3dAnimate = false;
...@@ -880,6 +894,11 @@ function mouseDown_CanvasMain(event) { ...@@ -880,6 +894,11 @@ function mouseDown_CanvasMain(event) {
//_isTouching = false; //_isTouching = false;
return; return;
} }
if(ClientData.IsAddingMarking() == true){
return;
}
//End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary : //End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(!isLoadingObject){ if(!isLoadingObject){
...@@ -919,13 +938,10 @@ function mouseDown_CanvasMain(event) { ...@@ -919,13 +938,10 @@ function mouseDown_CanvasMain(event) {
else{ else{
moveFlag = false; moveFlag = false;
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
var arr3DInfo = [];
arr3DInfo["_3dFirstPointX"] = px;
arr3DInfo["_3dFirstPointY"] = py;
set3dObjectInfoById(hitPageObj.id, arr3DInfo);
_3dAnimate = true; _3dAnimate = true;
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
} }
else{ else{
_3dAnimate = false; _3dAnimate = false;
...@@ -952,6 +968,10 @@ function mouseUp_CanvasMain(event) { ...@@ -952,6 +968,10 @@ function mouseUp_CanvasMain(event) {
event.preventDefault(); event.preventDefault();
if(ClientData.IsAddingMarking() == true){
return;
}
if(moveFlag) { if(moveFlag) {
moveFlag = false; moveFlag = false;
$('#main').css('cursor', 'default'); $('#main').css('cursor', 'default');
...@@ -970,9 +990,10 @@ function mouseUp_CanvasMain(event) { ...@@ -970,9 +990,10 @@ function mouseUp_CanvasMain(event) {
if(_3dAnimate == true){ if(_3dAnimate == true){
_3dAnimate = false; _3dAnimate = false;
_3dFirstPointX = event.pageX;
_3dFirstPointY = event.pageY; _3dAction = _3dActionType.TouchEnd_MouseUp;
cntTime = 0;
_curr3dObject.action();
} }
//End Function : No.20 //End Function : No.20
}; };
...@@ -1087,12 +1108,16 @@ function resetNaviAction(){ ...@@ -1087,12 +1108,16 @@ function resetNaviAction(){
var _isTouching = false; var _isTouching = false;
var _isClick = false; var _isClick = false;
function onTouchstart(evt){ function onTouchstart(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
var bContinue = true; var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault(); evt.preventDefault();
} }
if(isLoadingObject){ if(isLoadingObject){
bContinue = false; bContinue = false;
...@@ -1141,12 +1166,10 @@ function onTouchstart(evt){ ...@@ -1141,12 +1166,10 @@ function onTouchstart(evt){
if (hitPageObj) { if (hitPageObj) {
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
var arr3DInfo = [];
arr3DInfo["_3dFirstPointX"] = evt.pageX;
arr3DInfo["_3dFirstPointY"] = evt.pageY;
set3dObjectInfoById(hitPageObj.id, arr3DInfo); _3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
_3dAnimate = true; _3dAnimate = true;
} }
else{ else{
...@@ -1225,10 +1248,9 @@ function onTouchstart(evt){ ...@@ -1225,10 +1248,9 @@ function onTouchstart(evt){
if(is3DObject(hitPageObj)){ if(is3DObject(hitPageObj)){
var arr3DInfo = []; var arr3DInfo = [];
arr3DInfo["_3dFirstPointX"] = touch1.pageX; _3dAction = _3dActionType.TouchStart_MouseDown;
arr3DInfo["_3dFirstPointY"] = touch1.pageY; _curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
set3dObjectInfoById(hitPageObj.id, arr3DInfo);
_3dAnimate = true; _3dAnimate = true;
_isClick = false; _isClick = false;
...@@ -1274,6 +1296,10 @@ function onTouchstart(evt){ ...@@ -1274,6 +1296,10 @@ function onTouchstart(evt){
function onTouchmove(evt){ function onTouchmove(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
var bContinue = true; var bContinue = true;
if(isLoadingObject){ if(isLoadingObject){
bContinue = false; bContinue = false;
...@@ -1355,14 +1381,12 @@ function onTouchmove(evt){ ...@@ -1355,14 +1381,12 @@ function onTouchmove(evt){
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);
if(hitObj){ if(hitObj){
_3dAction = _3dActionType.TouchMove_MouseMove;
cntTime++; hitObj.action(imagePt);
hitObj.action(evt);
} }
else{ else{
_3dAnimate = false; _3dAnimate = false;
//_isClick = true;
} }
} }
else{ else{
...@@ -1466,8 +1490,8 @@ function onTouchmove(evt){ ...@@ -1466,8 +1490,8 @@ function onTouchmove(evt){
if(hitObj){ if(hitObj){
cntTime++; _3dAction = _3dActionType.TouchMove_MouseMove;
hitObj.action(evt); hitObj.action(imagePt);
} }
else{ else{
...@@ -1524,6 +1548,11 @@ function onTouchmove(evt){ ...@@ -1524,6 +1548,11 @@ function onTouchmove(evt){
}; };
function onTouchend(evt){ function onTouchend(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
var bContinue = true; var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") { if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
...@@ -1565,6 +1594,8 @@ function onTouchend(evt){ ...@@ -1565,6 +1594,8 @@ function onTouchend(evt){
if(_3dAnimate == true){ if(_3dAnimate == true){
_3dAnimate = false; _3dAnimate = false;
_3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action();
} }
} }
...@@ -1764,6 +1795,11 @@ function onTouchend(evt){ ...@@ -1764,6 +1795,11 @@ function onTouchend(evt){
} }
else{ else{
//Do nothing //Do nothing
if(_3dAnimate == true){
_3dAnimate = false;
_3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action();
}
} }
}; };
var _touchPageX = 0; var _touchPageX = 0;
......
...@@ -101,15 +101,7 @@ var videoScale; ...@@ -101,15 +101,7 @@ var videoScale;
//Start Function: No.12 //Start Function: No.12
//Content's types //Content's types
var ContentTypeKeys = {
Type_PDF : 'pdfFile',
Type_Image : 'imageFile',
Type_Video : 'movieFile',
Type_Music : 'soundFile',
Type_Others : 'otherFile',
Type_NoFile : 'noFile',
Type_Html: 'htmlFile'
};
var contentType; var contentType;
var imageTypeData; var imageTypeData;
......
...@@ -31,17 +31,6 @@ var displayData = { ...@@ -31,17 +31,6 @@ var displayData = {
pages: [] pages: []
}; };
//Content's types
var ContentTypeKeys = {
Type_PDF : 'pdfFile',
Type_Image : 'imageFile',
Type_Video : 'movieFile',
Type_Music : 'soundFile',
Type_Others : 'otherFile',
Type_NoFile : 'noFile',
Type_Html: 'htmlFile'
};
// Init function of page // Init function of page
$(document).ready(function () { $(document).ready(function () {
...@@ -221,8 +210,8 @@ function contentdetail_dspRead_Click(e) { ...@@ -221,8 +210,8 @@ function contentdetail_dspRead_Click(e) {
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.open(getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true", "_self"); window.open(getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true", "_blank");
} }
}); });
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" /> /// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" /> /// <reference path="../common/js/jquery.toastmessage.js" />
var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push message 5 seconds
var currentPagePushMessage = 1; var currentPagePushMessage = 1;
var isHoverOn = false; var isHoverOn = false;
...@@ -44,11 +46,13 @@ $(document).ready(function () { ...@@ -44,11 +46,13 @@ $(document).ready(function () {
// hide logout button with anonymous user // hide logout button with anonymous user
if (isAnonymousLogin()) { if (isAnonymousLogin()) {
$('#dspLogout').hide(); $('#dspLogout').hide();
$('#dspSetting').hide();
} }
else { else {
//Go To Login Page //Go To Login Page
$('#dspLogout').click(logoutFunction); $('#dspLogout').click(logoutFunction);
$('#dspLogout').show(); $('#dspLogout').show();
$('#dspSetting').show();
} }
$('#dspViewHistory').click(historyClickFunction); $('#dspViewHistory').click(historyClickFunction);
...@@ -822,6 +826,12 @@ function callbackGetPushMessageNewSuccess(data) { ...@@ -822,6 +826,12 @@ function callbackGetPushMessageNewSuccess(data) {
if (data.count > 0) if (data.count > 0)
{ {
$('.notification-pushmessage').html(i18nText("msgPushAlert")).slideDown(); $('.notification-pushmessage').html(i18nText("msgPushAlert")).slideDown();
// auto off notification push message after timeWaitCloseNewInfoPushMessage
setTimeout(function () {
$('.notification-pushmessage').slideUp();
}, timeWaitCloseNewInfoPushMessage);
} }
} }
...@@ -863,7 +873,7 @@ function showListPushMessage(data) ...@@ -863,7 +873,7 @@ function showListPushMessage(data)
$('#show-push-message').html(''); $('#show-push-message').html('');
for (var i = 0; i < data.messageList.length && i <= (data.recordTo - data.recordFrom); i++) { for (var i = 0; i < data.messageList.length && i <= (data.recordTo - data.recordFrom); i++) {
$('#show-push-message').append('<div>' + (data.recordFrom + i) + ") " + data.messageList[i].messageDetail + '</div>'); $('#show-push-message').append('<div>' + (data.recordFrom + i) + ") " + data.messageList[i].messageDetail.replace(/\n/g, '<br/>') + '</div>');
} }
if (currentPagePushMessage > 1) { if (currentPagePushMessage > 1) {
$('#prev-page-message').show(); $('#prev-page-message').show();
......
...@@ -37,17 +37,6 @@ var thumbnailArr = []; ...@@ -37,17 +37,6 @@ var thumbnailArr = [];
//Content type array. //Content type array.
var contentTypeArr = []; var contentTypeArr = [];
//Content's types
var ContentTypeKeys = {
Type_PDF : 'pdfFile',
Type_Image : 'imageFile',
Type_Video : 'movieFile',
Type_Music : 'soundFile',
Type_Others : 'otherFile',
Type_NoFile : 'noFile',
Type_Html: 'htmlFile'
};
var ThumbnailForOtherType = { var ThumbnailForOtherType = {
Thumbnail_ImageType : 'img/image_type.png', Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png', Thumbnail_VideoType : 'img/iPad_video.png',
......
...@@ -37,17 +37,6 @@ var thumbnailArr = []; ...@@ -37,17 +37,6 @@ var thumbnailArr = [];
//Content type array. //Content type array.
var contentTypeArr = []; var contentTypeArr = [];
//Content's types
var ContentTypeKeys = {
Type_PDF : 'pdfFile',
Type_Image : 'imageFile',
Type_Video : 'movieFile',
Type_Music : 'soundFile',
Type_Others : 'otherFile',
Type_NoFile : 'noFile',
Type_Html: 'htmlFile'
};
var ThumbnailForOtherType = { var ThumbnailForOtherType = {
Thumbnail_ImageType : 'img/image_type.png', Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png', Thumbnail_VideoType : 'img/iPad_video.png',
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</ul> </ul>
<p class="button"> <p class="button">
<a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a> <a style="margin-right:0;display:none;" class="blue lang" href="#" id="dspLogout" lang="dspLogout">ログアウト</a>
<a class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a> <a style="display:none;" class="blue lang" href="#" lang="dspSetting" id="dspSetting">設定変更</a>
<a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a> <a class="blue lang" href="#" lang="dspViewHistory" id="dspViewHistory">閲覧履歴</a>
<a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a> <a class="blue lang" href="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a> <a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
...@@ -78,15 +78,15 @@ ...@@ -78,15 +78,15 @@
<dl> <dl>
<dt class="lang" lang="txtPwdCurr">現在パスワード:</dt> <dt class="lang" lang="txtPwdCurr">現在パスワード:</dt>
<dd><input type="password" id="txtCurrentPass" maxlength="10" /></dd> <dd><input type="password" id="txtCurrentPass"/></dd>
</dl> </dl>
<dl> <dl>
<dt class="lang" lang="txtPwdNew">変更パスワード:</dt> <dt class="lang" lang="txtPwdNew">変更パスワード:</dt>
<dd><input type="password" id="txtNewPass" maxlength="10"/></dd> <dd><input type="password" id="txtNewPass"/></dd>
</dl> </dl>
<dl> <dl>
<dt class="lang" lang="txtPwdNewRe">新パスワード(確認):</dt> <dt class="lang" lang="txtPwdNewRe">新パスワード(確認):</dt>
<dd><input type="password" id="txtConfirmNew" maxlength="10"/></dd> <dd><input type="password" id="txtConfirmNew"/></dd>
</dl> </dl>
<p class="lang memory" lang="txtPwdRemind" id="txtPwdRemind" >※スキップを選択すると、30日間このメッセージは表示されません</p> <p class="lang memory" lang="txtPwdRemind" id="txtPwdRemind" >※スキップを選択すると、30日間このメッセージは表示されません</p>
<p class="loginbtn"><a class="skip lang" id="btnSkip" lang="dspSkip">スキップ</a><a class="change lang" id="btnChange" lang="dspChange">変更</a></p> <p class="loginbtn"><a class="skip lang" id="btnSkip" lang="dspSkip">スキップ</a><a class="change lang" id="btnChange" lang="dspChange">変更</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