Commit 3b637887 by Vo Duc Thang

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

No.1 汎用プッシュメッセージ (更新)
parent d87075ce
......@@ -70,7 +70,7 @@
</ul>
<p class="button">
<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="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
......@@ -53,6 +53,20 @@ var Consts = {
// Lock screen timer
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) {
};
function ToogleLogoutNortice() {
if (isAnonymousLogin()) {
return;
}
var isShow = false;
if (ClientData.userOpt_closeOrRefreshAlert() == 1) { // Checked
isShow = true;
......
......@@ -64,7 +64,7 @@
"dspBkCancel":"Logout",
"txtSearchResult":"Result",
"dspHome":"Home",
"txtLoginUser":"(Ver.20130823)User:",
"txtLoginUser":"(Ver.20130826)User:",
"txtAll":"All",
"txtMkgSize":"Size",
"txtMkgS":"S",
......@@ -139,5 +139,9 @@
"txtNext":"EN_次>",
"txtPrevious":"EN_<前",
"msgAnonymousLoginErr":"EN_ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"EN_ログインできません。"
"msgAnonymousLoginErr2":"EN_ログインできません。",
"txtEnqueteTitle":"EN_アンケート",
"txtTransparent":"EN_透明",
"txtSemiTransparent":"EN_半透明",
"txtNoTransparent":"EN_不透明"
}
......@@ -64,7 +64,7 @@
"dspBkCancel":"バックアップせずにログアウト",
"txtSearchResult":"検索結果",
"dspHome":"ホーム",
"txtLoginUser":"(Ver.20130823)ログイン中:",
"txtLoginUser":"(Ver.20130826)ログイン中:",
"txtAll":"すべて",
"txtMkgSize":"太さ",
"txtMkgS":"小",
......@@ -139,5 +139,9 @@
"txtNext":"次>",
"txtPrevious":"<前",
"msgAnonymousLoginErr":"ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"ログインできません。"
"msgAnonymousLoginErr2":"ログインできません。",
"txtEnqueteTitle":"アンケート",
"txtTransparent":"透明",
"txtSemiTransparent":"半透明",
"txtNoTransparent":"不透明"
}
......@@ -64,7 +64,7 @@
"dspBkCancel":"로그아웃",
"txtSearchResult":"검색 결과",
"dspHome":"홈",
"txtLoginUser":"(Ver.20130823)로그인 중:",
"txtLoginUser":"(Ver.20130826)로그인 중:",
"txtAll":"전체",
"txtMkgSize":"두께",
"txtMkgS":"소",
......@@ -139,5 +139,9 @@
"txtNext":"KO_次>",
"txtPrevious":"KO_<前",
"msgAnonymousLoginErr":"KO_ログインできません。(エラーコード:{0})",
"msgAnonymousLoginErr2":"KO_ログインできません。"
"msgAnonymousLoginErr2":"KO_ログインできません。",
"txtEnqueteTitle":"KO_アンケート",
"txtTransparent":"KO_透明",
"txtSemiTransparent":"KO_半透明",
"txtNoTransparent":"KO_不透明"
}
......@@ -71,7 +71,7 @@
</ul>
<p class="button">
<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="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
......@@ -50,12 +50,14 @@
<script src="./js/contentview_PopupText.js"></script>
<script src="./js/contentview_Paint.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>
<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="./common/css/jquery.treeview.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/script.js"></script>
......@@ -69,7 +71,7 @@
</head>
<body id="viewer">
<div id="wrapper">
<div id="wrapper" style="overflow: hidden">
<!--Viewer component is added here -->
<div id="overlay" class="web_dialog_overlay"> </div>
......@@ -349,6 +351,5 @@
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
this frame prevents back forward cache
</iframe>
</body>
</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 @@
{
color:#000;
font-size:12px;
padding:3px 0;
white-space:nowrap;
padding:3px 0;
line-height:150%;
}
#list-push-message p
......
......@@ -71,7 +71,7 @@
</ul>
<p class="button">
<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="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
......@@ -81,7 +81,7 @@
</ul>
<p class="button">
<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="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
......@@ -36,17 +36,6 @@ var thumbnailArr = [];
//Content type array.
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 = {
Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png',
......
......@@ -2430,6 +2430,7 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.resourceUrl
);
}else if(obj.actionType == 12){
pageObj = new anket(
obj.mediaType,
obj.actionType,
......@@ -2440,7 +2441,11 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.width,
obj.height,
obj.visible,
obj.resourceUrl
obj.resourceUrl,
obj.questionNo,
obj.replyLimit,
obj.fullScreen,
obj.saveAs
);
}
//End Function : No.9 - Editor : Long - Summary :
......@@ -2542,12 +2547,12 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
//Start Function : No.9 - Editor : Long - Date : 08/15/2013 - Summary : 3d object
case 8:
//mediaType = 9
obj["_3dLastId"] = convNumTo2Char(Math.round(obj.horizonCount/2)) +"-"+ convNumTo2Char(Math.round(obj.horizonCount/2));
obj["_3dFirstPointX"] = 0;
obj["_3dFirstPointY"] = 0;
obj["_3dV"] = obj.verticalCount;
obj["_3dH"] = obj.horizonCount;
//obj["_3dLastId"] = convNumTo2Char(Math.round(obj.verticalCount/2)) +"-"+ convNumTo2Char(Math.round(obj.horizonCount/2));
obj["_currFrameX"] = Math.round(obj.horizonCount/2);
obj["_currFrameY"] = Math.round(obj.verticalCount/2);
obj["_lastSelectedFrame"] = Object();
obj["arrFrame"] = createMatrixPoints(obj.width, obj.height, obj.verticalCount,
obj.horizonCount, Math.round(obj.horizonCount/2), Math.round(obj.verticalCount/2));
_object3DImageArr.push(obj);
pageObj = new object3d(
......@@ -2585,6 +2590,7 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
case 11:
//mediaType = 11
if(obj.actionType == 12){
pageObj = new anket(
obj.mediaType,
obj.actionType,
......@@ -2595,7 +2601,11 @@ ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.width,
obj.height,
obj.visible,
obj.resourceUrl
obj.resourceUrl,
obj.questionNo,
obj.replyLimit,
obj.fullScreen,
obj.saveAs
);
}
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');
url = url + "?sid=" + ClientData.userInfo_sid();
$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.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>'+i18nText('txtEnqueteTitle')
+ '<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>'
+ '<div class="anket-container"><iframe width="' + width + '" height="100%" frameborder="0" scrolling="auto" src="' + url + '">'// style="position: absolute; width: 100%; height: 480px; "
+ '</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(){
$container.removeAttr('style');
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;
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.action = function (event){
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 == ''){
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);
}
this.action = function (imagePt){
if(_3dAction == _3dActionType.TouchStart_MouseDown){
OnMouseDown3D(id, imagePt, x, y);
}
else if(_3dAction == _3dActionType.TouchMove_MouseMove){
OnMouseMove3D(id, imagePt, x, y, w, h, hCnt, vCnt);
}
else if(_3dAction == _3dActionType.TouchEnd_MouseUp){
OnMouseEnd3D(id, hCnt, vCnt);
}
};
};
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
/* mediaType = 7 write text object*/
......@@ -789,7 +517,7 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible,
stopAllAudio();
if (resourceUrl != "") {
showAnket(resourceUrl);
showAnket(resourceUrl, fullscreen);
showDialog(true);
}
};
......
......@@ -334,74 +334,86 @@ function prevPage_click() {
/* event first page */
function firstPage_click() {
if (getContent().pageIndex != 0) {
playBGMOfContent();
playBGMOfPage(0);
disableAllControl();
$('#divImageLoading').css('display', 'block');
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen"));
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
changeScale(userScale);
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
if(getContent().pageIndex == 1){
prevPage_click();
}
else{
playBGMOfContent();
playBGMOfPage(0);
disableAllControl();
$('#divImageLoading').css('display', 'block');
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen"));
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
changeScale(userScale);
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
}
};
/* event last page */
function lastPage_click() {
if (getContent().pageIndex != (totalPage - 1)) {
playBGMOfContent();
playBGMOfPage(totalPage - 1);
disableAllControl();
$('#divImageLoading').css('display', 'block');
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen"));
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
function (data) {
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
$('#divImageLoading').css('display', 'none');
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
if(getContent().pageIndex == totalPage - 2){
nextPage_click();
}
else{
playBGMOfContent();
playBGMOfPage(totalPage - 1);
disableAllControl();
$('#divImageLoading').css('display', 'block');
// Clear canvas offscreen
clearCanvas(document.getElementById("offscreen"));
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
function (data) {
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
$('#divImageLoading').css('display', 'none');
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
}
}
};
......@@ -704,14 +716,17 @@ function onClick_CanvasMain(event) {
};
function mouseMove_canvasMain(event) {
//Start Function : No.20 - Editor : Long
if(_isTouching){
//_isTouching = false;
return;
}
if(ClientData.IsAddingMarking() == true){
return;
}
if(isLoadingObject){
moveFlag = false;
}
......@@ -817,9 +832,8 @@ function mouseMove_canvasMain(event) {
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
cntTime++;
hitObj.action(event);
_3dAction = _3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
else{
_3dAnimate = false;
......@@ -880,6 +894,11 @@ function mouseDown_CanvasMain(event) {
//_isTouching = false;
return;
}
if(ClientData.IsAddingMarking() == true){
return;
}
//End Function : No.20 - Editor : Long - Date: 08/17/2013 - Summary :
if(!isLoadingObject){
......@@ -919,13 +938,10 @@ function mouseDown_CanvasMain(event) {
else{
moveFlag = false;
if(is3DObject(hitPageObj)){
var arr3DInfo = [];
arr3DInfo["_3dFirstPointX"] = px;
arr3DInfo["_3dFirstPointY"] = py;
set3dObjectInfoById(hitPageObj.id, arr3DInfo);
_3dAnimate = true;
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
}
else{
_3dAnimate = false;
......@@ -952,6 +968,10 @@ function mouseUp_CanvasMain(event) {
event.preventDefault();
if(ClientData.IsAddingMarking() == true){
return;
}
if(moveFlag) {
moveFlag = false;
$('#main').css('cursor', 'default');
......@@ -970,9 +990,10 @@ function mouseUp_CanvasMain(event) {
if(_3dAnimate == true){
_3dAnimate = false;
_3dFirstPointX = event.pageX;
_3dFirstPointY = event.pageY;
cntTime = 0;
_3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action();
}
//End Function : No.20
};
......@@ -1087,12 +1108,16 @@ function resetNaviAction(){
var _isTouching = false;
var _isClick = false;
function onTouchstart(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
evt.preventDefault();
}
}
if(isLoadingObject){
bContinue = false;
......@@ -1141,12 +1166,10 @@ function onTouchstart(evt){
if (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;
}
else{
......@@ -1225,10 +1248,9 @@ function onTouchstart(evt){
if(is3DObject(hitPageObj)){
var arr3DInfo = [];
arr3DInfo["_3dFirstPointX"] = touch1.pageX;
arr3DInfo["_3dFirstPointY"] = touch1.pageY;
set3dObjectInfoById(hitPageObj.id, arr3DInfo);
_3dAction = _3dActionType.TouchStart_MouseDown;
_curr3dObject = hitPageObj;
hitPageObj.action(imagePt);
_3dAnimate = true;
_isClick = false;
......@@ -1274,6 +1296,10 @@ function onTouchstart(evt){
function onTouchmove(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
var bContinue = true;
if(isLoadingObject){
bContinue = false;
......@@ -1355,14 +1381,12 @@ function onTouchmove(evt){
var imagePt = screenToImage(evt.pageX, evt.pageY);
var hitObj = getContent().currentPage.hitTest(imagePt.x, imagePt.y);
if(hitObj){
cntTime++;
hitObj.action(evt);
if(hitObj){
_3dAction = _3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
else{
_3dAnimate = false;
//_isClick = true;
}
}
else{
......@@ -1466,8 +1490,8 @@ function onTouchmove(evt){
if(hitObj){
cntTime++;
hitObj.action(evt);
_3dAction = _3dActionType.TouchMove_MouseMove;
hitObj.action(imagePt);
}
else{
......@@ -1524,6 +1548,11 @@ function onTouchmove(evt){
};
function onTouchend(evt){
if(ClientData.IsAddingMarking() == true){
return;
}
var bContinue = true;
if (avwUserEnvObj.os == "ipad" || avwUserEnvObj.os == "android") {
......@@ -1565,6 +1594,8 @@ function onTouchend(evt){
if(_3dAnimate == true){
_3dAnimate = false;
_3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action();
}
}
......@@ -1764,6 +1795,11 @@ function onTouchend(evt){
}
else{
//Do nothing
if(_3dAnimate == true){
_3dAnimate = false;
_3dAction = _3dActionType.TouchEnd_MouseUp;
_curr3dObject.action();
}
}
};
var _touchPageX = 0;
......
......@@ -101,15 +101,7 @@ var videoScale;
//Start Function: No.12
//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 imageTypeData;
......
......@@ -31,17 +31,6 @@ var displayData = {
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
$(document).ready(function () {
......@@ -221,8 +210,8 @@ function contentdetail_dspRead_Click(e) {
function (data) {
$.each(data.contentData , function(i, n){
if(typeof n == "object"){
resourceIdDetail = n.resourceId;
window.open(getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true", "_self");
resourceIdDetail = n.resourceId;
window.open(getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceIdDetail + "&isDownload=true", "_blank");
}
});
......
......@@ -5,6 +5,8 @@
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
var timeWaitCloseNewInfoPushMessage = 5000; // time wait close info new push message 5 seconds
var currentPagePushMessage = 1;
var isHoverOn = false;
......@@ -44,11 +46,13 @@ $(document).ready(function () {
// hide logout button with anonymous user
if (isAnonymousLogin()) {
$('#dspLogout').hide();
$('#dspSetting').hide();
}
else {
//Go To Login Page
$('#dspLogout').click(logoutFunction);
$('#dspLogout').show();
$('#dspSetting').show();
}
$('#dspViewHistory').click(historyClickFunction);
......@@ -822,6 +826,12 @@ function callbackGetPushMessageNewSuccess(data) {
if (data.count > 0)
{
$('.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)
$('#show-push-message').html('');
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) {
$('#prev-page-message').show();
......
......@@ -37,17 +37,6 @@ var thumbnailArr = [];
//Content type array.
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 = {
Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png',
......
......@@ -37,17 +37,6 @@ var thumbnailArr = [];
//Content type array.
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 = {
Thumbnail_ImageType : 'img/image_type.png',
Thumbnail_VideoType : 'img/iPad_video.png',
......
......@@ -79,7 +79,7 @@
</ul>
<p class="button">
<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="#" id="dspShiori" lang="dspShiori">しおり</a>
<a class="blue lang" id="dspHome" lang="dspHome" href="#">ホーム</a>
......
......@@ -78,15 +78,15 @@
<dl>
<dt class="lang" lang="txtPwdCurr">現在パスワード:</dt>
<dd><input type="password" id="txtCurrentPass" maxlength="10" /></dd>
<dd><input type="password" id="txtCurrentPass"/></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNew">変更パスワード:</dt>
<dd><input type="password" id="txtNewPass" maxlength="10"/></dd>
<dd><input type="password" id="txtNewPass"/></dd>
</dl>
<dl>
<dt class="lang" lang="txtPwdNewRe">新パスワード(確認):</dt>
<dd><input type="password" id="txtConfirmNew" maxlength="10"/></dd>
<dd><input type="password" id="txtConfirmNew"/></dd>
</dl>
<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>
......
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