Commit b28ed1f5 by abe

#21820 URLリンクを別タブで開く対応

parent 4572291a
......@@ -5,7 +5,7 @@ var CONTENTVIEW_CREATEOBJECT = {};
CONTENTVIEW_CREATEOBJECT.alertMessageLevel = {
ShowAlert : '1',
RequirePassword : '2',
None : '0'
None : '0'
};
/* ----------------------------------- Create memo --------------------------------*/
......@@ -71,7 +71,7 @@ CONTENTVIEW_CREATEOBJECT.MemoObject.prototype.drawMemo = function (context, opt)
if( tempRatioHeight < 1 ){
tempRatioHeight = 1;
}
var posX = this.x * tempRatioWidth;
var posY = this.y * tempRatioHeight;
var objWidth = this.width * tempRatioWidth;
......@@ -165,7 +165,7 @@ CONTENTVIEW_CREATEOBJECT.WebGetContentTyp4Object.prototype.hitTest = function (p
/* draw Memo */
CONTENTVIEW_CREATEOBJECT.WebGetContentTyp4Object.prototype.drawObject = function (context, opt) {
//#11478
var canvasWidth = $('#offscreen').width();
var canvasHeight = $('#offscreen').height();
......@@ -177,7 +177,7 @@ CONTENTVIEW_CREATEOBJECT.WebGetContentTyp4Object.prototype.drawObject = function
if( tempRatioHeight < 1 ){
tempRatioHeight = 1;
}
var posX = this.x * tempRatioWidth;
var posY = this.y * tempRatioHeight;
var objWidth = this.width * tempRatioWidth;
......@@ -187,10 +187,10 @@ CONTENTVIEW_CREATEOBJECT.WebGetContentTyp4Object.prototype.drawObject = function
context.globalAlpha = 0.4;
context.drawImage(imageObj, posX, posY, objWidth, objHeigth);
//Start Function : No.4 - Editor: Long - Date : 08/14/2013 - Summary : handle lazy loading
CONTENTVIEW.flip(opt);
//Start Function : No.4 - Editor: Long - Date : 08/14/2013 - Summary : handle lazy loading
//Start Function : No.4 - Editor: Long - Date : 08/14/2013 - Summary : handle lazy loading
context.globalAlpha = 1;
};
imageObj.src = this.imageUrl;
......@@ -211,7 +211,7 @@ CONTENTVIEW_CREATEOBJECT.webContentType4 = function (id, x, y, w, h, imageUrl, l
setTimeout(function(){COMMON.ToogleLogoutNortice();}, 200);
//END TRB00070
}
}
}
else if (linkKind == "0") {
CONTENTVIEW.changePage(CONTENTVIEW.changePageNo(destPageNumber));
}
......@@ -222,7 +222,7 @@ CONTENTVIEW_CREATEOBJECT.webContentType4.prototype = new CONTENTVIEW_CREATEOBJEC
/* ----------------------------------- End create webGetContentType4 -----------------------------*/
/**
* PageObject Class Definition
* PageObject Class Definition
*/
/* constructor */
......@@ -246,9 +246,9 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.setup = function (mediaType, actio
if( this.imageUrl != null ){
this.image.src = this.imageUrl;
}
this.objectId = objectId;
};
/* prototype hitTest */
......@@ -269,7 +269,7 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.hitTest = function (px, py) {
var tmpY = this.y * tempRatioHeight;
var tmpW = this.width * tempRatioWidth;
var tmpH = this.height * tempRatioHeight;
if ( tmpX <= px && px <= (tmpX + tmpW)) {
if (tmpY <= py && py <= (tmpY + tmpH)) {
return true;
......@@ -285,23 +285,23 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.hitTest = function (px, py) {
/* draw page Object */
//Start Function: No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function to draw object on next page
CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context, opt) {
if(opt == undefined || opt == null){
opt = 0;
}
var nObjectCnt = 0;
//#11478
var tempRatioWidth = 1;
var tempRatioHeight = 1;
var canvasWidth = 0;
var canvasHeight = 0;
//Check which pageObject to be count
if(opt == 0){
nObjectCnt = CONTENTVIEW_GENERAL.pageObjects.length;
//#11478
canvasWidth = $('#offscreen').width();
canvasHeight = $('#offscreen').height();
......@@ -313,11 +313,11 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
if( tempRatioHeight < 1 ){
tempRatioHeight = 1;
}
}
else if(opt == 1){
nObjectCnt = CONTENTVIEW_GENERAL.nextPageObjects.length;
//#11478
canvasWidth = $('#offscreenNext').width();
canvasHeight = $('#offscreenNext').height();
......@@ -329,11 +329,11 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
if( tempRatioHeight < 1 ){
tempRatioHeight = 1;
}
}
else if(opt == 2){
nObjectCnt = CONTENTVIEW_GENERAL.prevPageObjects.length;
//#11478
canvasWidth = $('#offscreenPre').width();
canvasHeight = $('#offscreenPre').height();
......@@ -345,43 +345,43 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
if( tempRatioHeight < 1 ){
tempRatioHeight = 1;
}
}
if (this.visible) {
/* init data */
var mediaType = this.mediaType;
var displayBorder = this.displayBorder;
//#11478
var x = this.x * tempRatioWidth;
var y = this.y * tempRatioHeight;
var w = this.width * tempRatioWidth;
var h = this.height * tempRatioHeight;
var tempUrl = this.imageUrl;
var isUsedTempImg = false;
//START TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
if(mediaType == '6' && tempUrl == 'img/iPad_video.png'){
isUsedTempImg = true;
}
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
if (mediaType == '5') {
CONTENTVIEW_GENERAL.nCountObjectLoad[opt]++;
context.strokeStyle = "black";
context.lineWidth = "1";
context.strokeRect(x, y, w, h);
CONTENTVIEW.flip(opt);
}
if (this.imageUrl != '') {
/* init image */
var img = new Image();
......@@ -418,35 +418,35 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
}
}
}
else if (mediaType == '3') {/* audio */
img.width = 50;
img.height = 50;
//START TRB00035 - Editor : Long - Date: 09/17/2013 - Summary : Fix for draw audio object at center
context.drawImage(img, x + (w/2 - img.width/2), y + (h/2 - img.height/ 2), img.width, img.height);
//END TRB00035 - Editor : Long - Date: 09/17/2013 - Summary : Fix for draw audio object at center
context.drawImage(img, x + (w/2 - img.width/2), y + (h/2 - img.height/ 2), img.width, img.height);
//END TRB00035 - Editor : Long - Date: 09/17/2013 - Summary : Fix for draw audio object at center
}
else if(mediaType == '6' && isUsedTempImg){
img.width = 50;
img.height = 50;
//START TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
context.drawImage(img, x + (w/2 - img.width/2), y + (h/2 - img.height/ 2), img.width, img.height);
isUsedTempImg = false;
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
context.drawImage(img, x + (w/2 - img.width/2), y + (h/2 - img.height/ 2), img.width, img.height);
isUsedTempImg = false;
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
}
else {
context.drawImage(img, x, y, w, h);
}
CONTENTVIEW.flip(opt);
//console.log("CONTENTVIEW_GENERAL.nCountObjectLoad:" + opt + " "+ CONTENTVIEW_GENERAL.nCountObjectLoad[opt] + " nObjectCnt:" + nObjectCnt);
if (CONTENTVIEW_GENERAL.nCountObjectLoad[opt] >= nObjectCnt) {
if (CONTENTVIEW_GENERAL.nCountObjectLoad[opt] >= nObjectCnt) {
/* draw marking */
CONTENTVIEW.drawMarkingOnScreen(opt);
......@@ -461,7 +461,7 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
else{
CONTENTVIEW_GENERAL.isLoadingObject = false;
}
}
}
else{
CONTENTVIEW_GENERAL.isLoadingObject = false;
......@@ -476,17 +476,17 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
if(CONTENTVIEW_GENERAL.totalPage > 1){
if(opt != 0 && opt != null){
CONTENTVIEW_MARKING.enableButtonMarking();
}
}
}
else{
CONTENTVIEW_MARKING.enableButtonMarking();
}
}
}
else{
CONTENTVIEW_MARKING.enableButtonMarking();
}
//End Function : No.4 - Summary : make sure all page is loaded
}
//End Function : No.4 - Summary : make sure all page is loaded
}
else {
//Start Function : No.4 - Summary : make sure all page is loaded
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
......@@ -497,12 +497,12 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
else{
CONTENTVIEW_GENERAL.enableAllControl();
}
}
}
else{
CONTENTVIEW_GENERAL.enableAllControl();
}
//End Function : No.4 - Summary : make sure all page is loaded
//End Function : No.4 - Summary : make sure all page is loaded
}
/*finish loading */
......@@ -515,7 +515,7 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
else{
$('#divImageLoading').css('display', 'none');
}
}
}
else{
$('#divImageLoading').css('display', 'none');
......@@ -527,9 +527,9 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
};
img.src = this.imageUrl;
}
}
else {
//console.log("mediaType:" + mediaType);
//console.log("tempUrl:" + tempUrl);
if (CONTENTVIEW_GENERAL.nCountObjectLoad[opt] >= nObjectCnt) {
......@@ -550,23 +550,23 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
else{
CONTENTVIEW_MARKING.enableButtonMarking();
}
}
}
else{
CONTENTVIEW_MARKING.enableButtonMarking();
}
//End Function : No.4 - Summary : make sure all page is loaded
//End Function : No.4 - Summary : make sure all page is loaded
} else {
//Start Function : No.4 - Summary : make sure all page is loaded
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(CONTENTVIEW_GENERAL.totalPage > 1){
if(opt != 0 && opt != null){
CONTENTVIEW_GENERAL.enableAllControl();
}
}
}
else{
CONTENTVIEW_GENERAL.enableAllControl();
}
CONTENTVIEW_GENERAL.enableAllControl();
}
}
else{
CONTENTVIEW_GENERAL.enableAllControl();
......@@ -574,17 +574,17 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
//End Function : No.4 - Summary : mak
}
/*finish loading */
/*finish loading */
//Start Function : No.4 - Summary : make sure all page is loaded
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
if(CONTENTVIEW_GENERAL.totalPage > 1){
if(opt != 0 && opt != null){
$('#divImageLoading').css('display', 'none');
}
}
}
else{
$('#divImageLoading').css('display', 'none');
}
}
}
else{
$('#divImageLoading').css('display', 'none');
......@@ -602,13 +602,13 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
/*mediaType = 8 3d object*/
CONTENTVIEW_CREATEOBJECT.object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt, vCnt, visible, imageObjects, objectId){
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function (imagePt){
this.action = function (imagePt){
//abe
//alert("object3d");
//#11478
var canvasWidth = $('#offscreen').width();
var canvasHeight = $('#offscreen').height();
......@@ -620,7 +620,7 @@ CONTENTVIEW_CREATEOBJECT.object3d = function (mediaType, actionType, id, imageUr
if( tempRatioHeight < 1 ){
tempRatioHeight = 1;
}
//#11478 操作側のイベント判定には逆に縮める対応が必要
var tempRatioWidth2 = CONTENTVIEW_GENERAL.widthEachPageApi / canvasWidth;
if( tempRatioWidth2 > 1 ){
......@@ -630,26 +630,26 @@ CONTENTVIEW_CREATEOBJECT.object3d = function (mediaType, actionType, id, imageUr
if( tempRatioHeight2 > 1 ){
tempRatioHeight2 = 1;
}
//console.log("tempRatioWidth:" + tempRatioWidth + " tempRatioHeight:" + tempRatioHeight);
//console.log("tempRatioWidth2:" + tempRatioWidth2 + " tempRatioHeight2:" + tempRatioHeight2);
var tmpX = x * tempRatioWidth;
var tmpY = y * tempRatioHeight;
var tmpW = w * tempRatioWidth;
var tmpH = h * tempRatioHeight;
if(CONTENTVIEW_3D._3dAction == CONTENTVIEW_3D._3dActionType.TouchStart_MouseDown){
CONTENTVIEW_3D.OnMouseDown3D(id, imagePt, tmpX, tmpY, tempRatioWidth2, tempRatioHeight2);
}
else if(CONTENTVIEW_3D._3dAction == CONTENTVIEW_3D._3dActionType.TouchMove_MouseMove){
CONTENTVIEW_3D.OnMouseMove3D(id, imagePt, tmpX, tmpY, tmpW, tmpH, hCnt, vCnt, tempRatioWidth2, tempRatioHeight2);
}
else if(CONTENTVIEW_3D._3dAction == CONTENTVIEW_3D._3dActionType.TouchEnd_MouseUp){
CONTENTVIEW_3D.OnMouseEnd3D(id, hCnt, vCnt);
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -666,8 +666,8 @@ CONTENTVIEW_CREATEOBJECT.object3d = function (mediaType, actionType, id, imageUr
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
}
}
};
};
CONTENTVIEW_CREATEOBJECT.object3d.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
......@@ -688,12 +688,12 @@ CONTENTVIEW_CREATEOBJECT.text.prototype = new CONTENTVIEW_CREATEOBJECT.PageObjec
CONTENTVIEW_CREATEOBJECT.listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObjects, triggerType, objectId) {
this.setup(mediaType, null, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
if (triggerType == '1') {
//abe
//alert("listImage triggerType=1");
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -710,7 +710,7 @@ CONTENTVIEW_CREATEOBJECT.listImage = function (mediaType, id, imageUrl, x, y, w,
objectLog.locationWidth = w;
//COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_GENERAL.mediaType4_changeImage++;
/* check index bigger than length object */
......@@ -727,7 +727,7 @@ CONTENTVIEW_CREATEOBJECT.listImage = function (mediaType, id, imageUrl, x, y, w,
imageObj.onload = function () {
var canvasObject = document.getElementById("offscreen");
var contextObject = canvasObject.getContext("2d");
//#11478
var canvasWidth = $('#offscreen').width();
var canvasHeight = $('#offscreen').height();
......@@ -743,12 +743,12 @@ CONTENTVIEW_CREATEOBJECT.listImage = function (mediaType, id, imageUrl, x, y, w,
var tmpY = y * tempRatioHeight;
var tmpW = w * tempRatioWidth;
var tmpH = h * tempRatioHeight;
contextObject.drawImage(imageObj, tmpX, tmpY, tmpW, tmpH);
CONTENTVIEW.flip();
};
imageObj.src = imageObjects[CONTENTVIEW_GENERAL.mediaType4_changeImage].fileName;
}
};
};
......@@ -758,7 +758,7 @@ CONTENTVIEW_CREATEOBJECT.listImage.prototype = new CONTENTVIEW_CREATEOBJECT.Page
CONTENTVIEW_CREATEOBJECT.listVideo = function (mediaType, id, imageUrl, x, y, w, h, visible, videoObjects, objectId) {
this.setup(mediaType, null, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//abe
//alert("listVideo");
};
};
......@@ -768,7 +768,7 @@ CONTENTVIEW_CREATEOBJECT.listVideo.prototype = new CONTENTVIEW_CREATEOBJECT.Page
CONTENTVIEW_CREATEOBJECT.trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index, target, visible, actionFunction, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, actionFunction, null, objectId);
this.action = function () {
// draw object
// draw object
//abe
//alert("trigger:" + CONTENTVIEW_GETDATA.getPageIndex() + " id:" + id);
......@@ -802,51 +802,51 @@ CONTENTVIEW_CREATEOBJECT.trigger = function (mediaType, actionType, id, imageUrl
CONTENTVIEW.stopAllAudio();
CONTENTVIEW_FILESYSTEM.showVideoObjectCache(CONTENTVIEW.objType4_5[nIndex].x, CONTENTVIEW.objType4_5[nIndex].y, CONTENTVIEW.objType4_5[nIndex].width, CONTENTVIEW.objType4_5[nIndex].height, CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].fileName, false, CONTENTVIEW_GENERAL.contentID, CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].resourceId);
//CONTENTVIEW.showVideoObject(CONTENTVIEW.objType4_5[nIndex].x, CONTENTVIEW.objType4_5[nIndex].y, CONTENTVIEW.objType4_5[nIndex].width, CONTENTVIEW.objType4_5[nIndex].height, CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].fileName, false);
if(ClientData.isStreamingMode()){
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPage");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPage");
if (myVideo.paused)
{
myVideo.play();
}
}
}
//詳細ログ用 動画なのでダミーで1以上
objectLog.actionTime = "1";
//リソースID
objectLog.resourceId = CONTENTVIEW.objType4_5[nIndex].dataObjects[nIndex1].resourceId;
}
break;
}
}
}
//詳細ログ格納
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
};
};
CONTENTVIEW_CREATEOBJECT.trigger.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
//Start Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
CONTENTVIEW_CREATEOBJECT.htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, resourceUrl, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//alert("htmlLinkButton");
//CONTENTVIEW_STREAMING.debugLog("htmlLinkButton:" + resourceUrl + ":" + objectId);
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
if (resourceUrl != "") {
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -863,10 +863,10 @@ CONTENTVIEW_CREATEOBJECT.htmlLinkButton = function (mediaType, actionType, id, i
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_CREATEOBJECT.showHtml(resourceUrl, objectId );
CONTENTVIEW_GENERAL.showDialog(true);
}
}
};
};
CONTENTVIEW_CREATEOBJECT.htmlLinkButton.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
......@@ -875,49 +875,49 @@ CONTENTVIEW_CREATEOBJECT.showHtml = function(url, objectId ){
//abe
//alert("showHtml");
var $container = $('#dialog');
$container.html('');
$container.attr('style', 'background-color: white; width:100%; left:0% !important');
$container.attr('style', 'background-color: white; width:100%; left:0% !important');
//START TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
if(CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()){
$container.html(
'<h1>'
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
'<h1>'
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
+ '</h1>'
+ '<div id="html-wrap" style="height: 95%; position: absolute; width: 100%;">'
+ '<iframe src="'+ url +'" style="position: absolute; width: 100%; height: 100%; ">'
+ '</iframe>'
+ '</div>'
);
$('#html-wrap').css('overflow', 'scroll');
$('#html-wrap').css('-webkit-overflow-scrolling', 'touch');
}
else{
$container.html(
'<h1>'
+ '<img src="img/viewer/x.png" style="margin:3px 3px 0px 21px" id="btnClose" class="align_right" ></img>'
'<h1>'
+ '<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>'
);
}
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
//END TRB00076 - EDITOR : Long - Date : 09/24/2013 - Summary : Fix for scrolling on ipad
/*
$('#dialog h1 img').click(function(){
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog();
});
*/
$("#dialog h1 img").on({
......@@ -926,7 +926,7 @@ CONTENTVIEW_CREATEOBJECT.showHtml = function(url, objectId ){
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog();
},
......@@ -935,16 +935,16 @@ CONTENTVIEW_CREATEOBJECT.showHtml = function(url, objectId ){
return false;
}
});
var dateStart = new Date();
};
CONTENTVIEW_CREATEOBJECT.anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, questionNo, replyLimit, fullscreen, saveAs, resourceId, enquete, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -961,29 +961,29 @@ CONTENTVIEW_CREATEOBJECT.anket = function (mediaType, actionType, id, imageUrl,
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
var url = CONTENTVIEW_GETDATA.getURLPageImage("webEnqueteReply/init") + "/?abObjectId="+objectId + "&sid=" + ClientData.userInfo_sid();
if(ClientData.isStreamingMode()){
//ストリーミング
url = url + "&isStreaming=true";
}
var isFullScreen = false;
if(parseInt(fullscreen) == 1){
isFullScreen = true;
}
CONTENTVIEW_ANKET.showAnket(url, isFullScreen, objectId);
CONTENTVIEW_GENERAL.showDialog(true);
};
};
CONTENTVIEW_CREATEOBJECT.anket.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
//End Function : No.9 - Editor : Long - Date: 08/16/2013 - Summary :
/* mediaType=3 Audio object : extends PageObject */
CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, audioFile, audioResourceId, playType, objectId) {
......@@ -991,10 +991,10 @@ CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, image
if (playType == "0") {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//alert("audioType3_0");
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1011,7 +1011,7 @@ CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, image
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, playType);
};
}
......@@ -1021,10 +1021,10 @@ CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, image
//
}
else{
//abe
//alert("audioType3_x");
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1041,7 +1041,7 @@ CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, image
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, playType);
}
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
......@@ -1057,10 +1057,10 @@ CONTENTVIEW_CREATEOBJECT.audioType3.prototype = new CONTENTVIEW_CREATEOBJECT.Pag
CONTENTVIEW_CREATEOBJECT.jumpPage = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, jumpPage, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//alert("jumpPage");
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1077,7 +1077,7 @@ CONTENTVIEW_CREATEOBJECT.jumpPage = function (mediaType, actionType, id, imageUr
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
if ((Number(jumpPage) - 1) != CONTENTVIEW_GETDATA.getPageIndex()) {
CONTENTVIEW_EVENTS.createLockLayout(true);
CONTENTVIEW.changePage(Number(jumpPage) - 1);
......@@ -1090,12 +1090,12 @@ CONTENTVIEW_CREATEOBJECT.jumpPage.prototype = new CONTENTVIEW_CREATEOBJECT.PageO
CONTENTVIEW_CREATEOBJECT.sendMail = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, emailSubject, emailAddress, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//ストリーミングなら反応しない
if(ClientData.isStreamingMode()){
return;
}
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1112,7 +1112,7 @@ CONTENTVIEW_CREATEOBJECT.sendMail = function (mediaType, actionType, id, imageUr
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_POPUPTEXT.MailTo(emailAddress, emailSubject);
};
};
......@@ -1122,10 +1122,10 @@ CONTENTVIEW_CREATEOBJECT.sendMail.prototype = new CONTENTVIEW_CREATEOBJECT.PageO
CONTENTVIEW_CREATEOBJECT.openPopUp = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, content, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//alert("openPopUp:" + CONTENTVIEW_GETDATA.getPageIndex() + " id:" + objectId);
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1142,7 +1142,7 @@ CONTENTVIEW_CREATEOBJECT.openPopUp = function (mediaType, actionType, id, imageU
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_GENERAL.isOpenPopUpText = true;
var pt1 = CONTENTVIEW.imageToScreen(x, y + h / 2);
......@@ -1161,7 +1161,7 @@ CONTENTVIEW_CREATEOBJECT.openPopUp.prototype = new CONTENTVIEW_CREATEOBJECT.Page
CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, contentId, pageNo, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1178,12 +1178,12 @@ CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, im
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
///* set end log */
//COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
//COMMON.RegisterLog();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
var params = {
//contentId: CONTENTVIEW_GENERAL.contentID,
contentId: contentId,
......@@ -1192,62 +1192,62 @@ CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, im
isStreaming: ClientData.isStreamingMode(),
authCode: ClientData.authCode()
};
AVWEB.avwCmsApi(ClientData.userInfo_accountPath(),
"webGetContent",
"GET",
params,
function (data) {
/* set end log */
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog();
if(data.contentData.alertMessageLevel){
if(data.contentData.alertMessageLevel){
if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.ShowAlert){
if(data.contentData.alertMessage){
if(data.contentData.alertMessage){
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GETDATA.getPageIndex() };
CONTENTVIEW_CREATEOBJECT.moveContentParam = {};
CONTENTVIEW_CREATEOBJECT.moveContentParam = {};
CONTENTVIEW_CREATEOBJECT.moveContentParam = {
'preContentId' : contentId,
'prePageNo' : pageNo,
'oldContent' : oldContent
};
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog(data.contentData.alertMessageLevel, data.contentData.alertMessage);
};
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog(data.contentData.alertMessageLevel, data.contentData.alertMessage);
}
}
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.RequirePassword){
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GETDATA.getPageIndex() };
CONTENTVIEW_CREATEOBJECT.moveContentParam = {};
CONTENTVIEW_CREATEOBJECT.moveContentParam = {
'preContentId' : contentId,
'prePageNo' : pageNo,
'oldContent' : oldContent
};
};
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog(data.contentData.alertMessageLevel);
}
else if(data.contentData.alertMessageLevel == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.None){
ClientData.common_preContentId(contentId);
ClientData.common_prePageNo(pageNo);
/* store old page */
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GETDATA.getPageIndex() };
var dataJump = ClientData.JumpQueue();
/* store old page */
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GETDATA.getPageIndex() };
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
if(ClientData.isStreamingMode()){
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewStreaming);
} else {
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
CONTENTVIEW.screenMove();
}
}
......@@ -1256,13 +1256,13 @@ CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, im
else{
ClientData.common_preContentId(contentId);
ClientData.common_prePageNo(pageNo);
/* store old page */
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GETDATA.getPageIndex() };
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
/* store old page */
var oldContent = { oldContentID: CONTENTVIEW_GENERAL.contentID, oldPageIndex: CONTENTVIEW_GETDATA.getPageIndex() };
var dataJump = ClientData.JumpQueue();
dataJump.push(oldContent);
ClientData.JumpQueue(dataJump);
if(ClientData.isStreamingMode()){
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewStreaming);
......@@ -1271,7 +1271,7 @@ CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, im
CONTENTVIEW.screenMove();
}
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 404) {
......@@ -1283,15 +1283,15 @@ CONTENTVIEW_CREATEOBJECT.moveToContent = function (mediaType, actionType, id, im
}
}
);
//END TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
//END TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
};
};
CONTENTVIEW_CREATEOBJECT.moveToContent.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog = function(type, msg) {
CONTENTVIEW_CREATEOBJECT.showContentConfirmDialog = function(type, msg) {
if(type == CONTENTVIEW_CREATEOBJECT.alertMessageLevel.ShowAlert){
CONTENTVIEW_CREATEOBJECT.createAlertTypeDialog(msg);
CONTENTVIEW_GENERAL.showDialog(true);
......@@ -1311,31 +1311,31 @@ CONTENTVIEW_CREATEOBJECT.createAlertTypeDialog = function(msg){
$container.html(
' <h1 class="lang" lang="txtContentWarning">'+ I18N.i18nText("txtContentWarning") +'</h1>'
+' <p class="message">'
+ msg
+ msg
+' </p>'
+' <p class="deletebtn">'
+' <a lang="dspOK" class="ok lang" id="contentAlertOk">OK</a>'
+' <a lang="dspCancel" class="cancel lang" id="contentAlertCancel">キャンセル</a>'
+' </p>'
);
$container.center();
);
$container.center();
$('#dialog a#contentAlertCancel').click(function(){
CONTENTVIEW_GENERAL.hideDialog();
CONTENTVIEW_GENERAL.hideDialog();
var removeTimeOut = setTimeout(function(){
$container.removeClass('sectionLimitAccess');
}, 200);
}, 200);
});
$('#dialog a#contentAlertOk').click(function(){
ClientData.common_preContentId(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
ClientData.common_prePageNo(CONTENTVIEW_CREATEOBJECT.moveContentParam.prePageNo);
/* store old page */
var dataJump = ClientData.JumpQueue();
dataJump.push(CONTENTVIEW_CREATEOBJECT.moveContentParam.oldContent);
/* store old page */
var dataJump = ClientData.JumpQueue();
dataJump.push(CONTENTVIEW_CREATEOBJECT.moveContentParam.oldContent);
ClientData.JumpQueue(dataJump);
if(ClientData.isStreamingMode()){
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewStreaming);
......@@ -1343,7 +1343,7 @@ CONTENTVIEW_CREATEOBJECT.createAlertTypeDialog = function(msg){
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
CONTENTVIEW.screenMove();
}
});
};
......@@ -1357,24 +1357,24 @@ CONTENTVIEW_CREATEOBJECT.createPwdRequiredTypeDialog = function(){
+' <p class="message">'
+' <label class="text lang" lang="txtContentPWMsg">'+ I18N.i18nText("txtContentPWMsg") +'</label>'
+' <input type="password" />'
+' <label class="error" id="lblMessageLimitError"></label> '
+' <label class="error" id="lblMessageLimitError"></label> '
+' </p>'
+' <p class="deletebtn">'
+' <a lang="dspOK" class="ok lang" id="contentAlertOk">OK</a>'
+' <a lang="dspCancel" class="cancel lang" id="contentAlertCancel">キャンセル</a>'
+' </p>'
);
$container.center();
);
$container.center();
$('#dialog a#contentAlertCancel').click(function(){
CONTENTVIEW_GENERAL.hideDialog();
CONTENTVIEW_GENERAL.hideDialog();
var removeTimeOut = setTimeout(function(){
$container.removeClass('sectionLimitAccess');
}, 200);
});
$('#dialog a#contentAlertOk').click(
function () {
var password = $('.sectionLimitAccess .message input').val();
......@@ -1396,18 +1396,18 @@ CONTENTVIEW_CREATEOBJECT.createPwdRequiredTypeDialog = function(){
AVWEB.avwCmsApiSyncWithUrl(apiLoginUrl, null, 'webClientLogin', 'GET', params,
function (data) {
if (data.result == 'success') {
if (data.result == 'success') {
ClientData.common_preContentId(CONTENTVIEW_CREATEOBJECT.moveContentParam.preContentId);
ClientData.common_prePageNo(CONTENTVIEW_CREATEOBJECT.moveContentParam.prePageNo);
/* store old page */
var dataJump = ClientData.JumpQueue();
dataJump.push(CONTENTVIEW_CREATEOBJECT.moveContentParam.oldContent);
ClientData.JumpQueue(dataJump);
/* store old page */
var dataJump = ClientData.JumpQueue();
dataJump.push(CONTENTVIEW_CREATEOBJECT.moveContentParam.oldContent);
ClientData.JumpQueue(dataJump);
// update sid id
ClientData.userInfo_sid(data.sid);
ClientData.userInfo_sid(data.sid);
if(ClientData.isStreamingMode()){
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove(COMMON.ScreenIds.ContentViewStreaming);
......@@ -1438,10 +1438,10 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, embed, objectId);
this.action = function () {
//abe
//alert("videoType2:" + CONTENTVIEW_GETDATA.getPageIndex());
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1458,25 +1458,25 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
/*stop audio on page */
CONTENTVIEW.stopAllAudio();
if (embed == "1") {
CONTENTVIEW_FILESYSTEM.showVideoObjectCache(x, y, w, h, mediaFile, false, CONTENTVIEW_GENERAL.contentID, media );
//CONTENTVIEW.showVideoObject(x, y, w, h, mediaFile, false);
if(ClientData.isStreamingMode()){
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPage");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPage");
if (myVideo.paused)
{
myVideo.play();
}
}
}
}
}
else {
if (media != '') {
$('#playvideo').children().remove();
......@@ -1499,7 +1499,7 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
return false;
}
});
//必要か ここから
CONTENTVIEW_GENERAL.canvas_draw.removeEventListener('touchstart', function(){},false);
CONTENTVIEW_GENERAL.canvas_draw.removeEventListener('touchmove', function(){},false);
......@@ -1507,12 +1507,12 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
CONTENTVIEW_GENERAL.canvas_draw.addEventListener('touchstart', function(){return false;}, false);
CONTENTVIEW_GENERAL.canvas_draw.addEventListener('touchmove', function(){return false;}, false);
CONTENTVIEW_GENERAL.canvas_draw.addEventListener('touchend', function(){return false;}, false);
$("#canvasWrapper").unbind('click');
$("#canvasWrapper").unbind('touchstart');
$("#canvasWrapper").unbind('touchmove');
$("#canvasWrapper").unbind('touchend');
document.getElementById('main').addEventListener('click', function(){return false;}, false);
document.getElementById('main').addEventListener('touchstart', function(){return false;}, false);
document.getElementById('main').addEventListener('touchmove', function(){return false;}, false);
......@@ -1520,14 +1520,14 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
document.getElementById('canvasWrapper').addEventListener('click', function(){return false;}, false);
document.getElementById('canvasWrapper').addEventListener('touchstart', function(){return false;}, false);
document.getElementById('canvasWrapper').addEventListener('touchmove', function(){return false;}, false);
document.getElementById('canvasWrapper').addEventListener('touchend', function(){return false;}, false);
document.getElementById('canvasWrapper').addEventListener('touchend', function(){return false;}, false);
//必要か ここまで
CONTENTVIEW_GENERAL.showDialog(true);
if(ClientData.isStreamingMode()){
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPopUp");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myVideo=document.getElementById("videoOnPopUp");
if (myVideo.paused)
{
myVideo.play();
......@@ -1535,7 +1535,7 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
}
}
} else {
//キャッシュが存在するか確認
var fileName = '/abook/' +CONTENTVIEW_GENERAL.contentID + "/res_" + media + ".dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile(fileName, { create: false },
......@@ -1545,7 +1545,7 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
var url = window.URL || window.webkitURL;
var resSrc = url.createObjectURL(file);
AVWEB.avwLog("read cache: createObjectURL " + resSrc);
CONTENTVIEW_CREATEOBJECT.createVideoFulScreen(resSrc, id);
$("#btnCloseVideo").on({
'click touchend': function(ev){
......@@ -1560,31 +1560,31 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
return false;
}
});
CONTENTVIEW_GENERAL.showDialog(true);
}
);
},
function(err){ // 失敗時のコールバック関数
AVWEB.avwLog("NotRead FileSystem");
CONTENTVIEW_FILESYSTEM.createMovieCache(mediaFile,fileName);
/*
//キャッシュ化
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200){
CONTENTVIEW_FILESYSTEM.isXhrBusy = false;
$('#divImageLoading').css('display', 'none');
//this.response is what you're looking for
AVWEB.avwLog(this.response, typeof this.response);
CONTENTVIEW_FILESYSTEM.fs.root.getFile(
'/abook/' + fileName,
{create: true},
{create: true},
function(fileEntry){
fileEntry.createWriter(
function(fileWriter) {
......@@ -1594,18 +1594,18 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
fileWriter.onerror = function(e) {
AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
};
var blobData = new Blob([xhr.response], {type:"application/octet-stream"});
fileWriter.write(blobData);
}
);
},
CONTENTVIEW_FILESYSTEM.errorHandler
);
} else {
if( this.readyState == 2 ){
if( this.readyState == 2 ){
AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
$('#divImageLoading').css('z-index', '99999');
......@@ -1613,7 +1613,7 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
}
}
};
if( !CONTENTVIEW_FILESYSTEM.isXhrBusy ){
xhr.open('GET', mediaFile);
xhr.responseType = 'blob';
......@@ -1622,7 +1622,7 @@ CONTENTVIEW_CREATEOBJECT.videoType2 = function (mediaType, actionType, id, image
AVWEB.avwLog("xhr is busy.");
}
*/
//タグは書き出し
CONTENTVIEW_CREATEOBJECT.createVideoFulScreen(mediaFile, id);
$("#btnCloseVideo").on({
......@@ -1661,9 +1661,9 @@ CONTENTVIEW_CREATEOBJECT.imageNoAction.prototype = new CONTENTVIEW_CREATEOBJECT.
CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, mediaFile, media, mediaResourceId, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
if (media != '') {
//abe
//alert("videoType1:" + CONTENTVIEW_GETDATA.getPageIndex());
//詳細ログ作成
......@@ -1682,7 +1682,7 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
/* stop all audio on page */
CONTENTVIEW.stopAllAudio();
......@@ -1708,9 +1708,9 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
}
});
CONTENTVIEW_GENERAL.showDialog(true);
} else {
//キャッシュが存在するか確認
var fileName = '/abook/' +CONTENTVIEW_GENERAL.contentID + "/res_" + mediaResourceId + ".dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile(fileName, { create: false },
......@@ -1720,7 +1720,7 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
var url = window.URL || window.webkitURL;
var resSrc = url.createObjectURL(file);
AVWEB.avwLog("read cache: createObjectURL " + resSrc);
//タグは書き出し
CONTENTVIEW_CREATEOBJECT.createVideoFulScreen(resSrc, id);
$("#btnCloseVideo").on({
......@@ -1746,23 +1746,23 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
},
function(err){ // 失敗時のコールバック関数
AVWEB.avwLog("NotRead FileSystem");
CONTENTVIEW_FILESYSTEM.createMovieCache(mediaFile,fileName);
/*
//キャッシュ化
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200){
CONTENTVIEW_FILESYSTEM.isXhrBusy = false;
$('#divImageLoading').css('display', 'none');
//this.response is what you're looking for
AVWEB.avwLog(this.response, typeof this.response);
CONTENTVIEW_FILESYSTEM.fs.root.getFile(
'/abook/' + fileName,
{create: true},
{create: true},
function(fileEntry){
fileEntry.createWriter(
function(fileWriter) {
......@@ -1772,19 +1772,19 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
fileWriter.onerror = function(e) {
AVWEB.avwLog('RES書き込みエラー: ' + e.toString());
};
var blobData = new Blob([xhr.response], {type:"application/octet-stream"});
//var blobData = new Blob([this.response], {type:"video/mp4"});
fileWriter.write(blobData);
}
);
},
CONTENTVIEW_FILESYSTEM.errorHandler
);
} else {
if( this.readyState == 2 ){
if( this.readyState == 2 ){
AVWEB.avwLog("onreadystatechange:" + this.readyState + " " + this.status);
CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
$('#divImageLoading').css('z-index', '99999');
......@@ -1792,7 +1792,7 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
}
}
};
if( !CONTENTVIEW_FILESYSTEM.isXhrBusy ){
xhr.open('GET', mediaFile);
xhr.responseType = 'blob';
......@@ -1801,7 +1801,7 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
AVWEB.avwLog("xhr is busy.");
}
*/
//タグは書き出し
CONTENTVIEW_CREATEOBJECT.createVideoFulScreen(mediaFile, id);
$("#btnCloseVideo").on({
......@@ -1826,10 +1826,10 @@ CONTENTVIEW_CREATEOBJECT.videoType1 = function (mediaType, actionType, id, image
);
}
}
//時間記録
var dateStart = new Date();
};
};
CONTENTVIEW_CREATEOBJECT.videoType1.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
......@@ -1838,7 +1838,7 @@ CONTENTVIEW_CREATEOBJECT.videoType1.prototype = new CONTENTVIEW_CREATEOBJECT.Pag
CONTENTVIEW_CREATEOBJECT.audioType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, audioFile, audio, audioResourceId, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//alert("audioType1");
//詳細ログ作成
......@@ -1857,7 +1857,7 @@ CONTENTVIEW_CREATEOBJECT.audioType1 = function (mediaType, actionType, id, image
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, "0")
};
};
......@@ -1867,15 +1867,15 @@ CONTENTVIEW_CREATEOBJECT.audioType1.prototype = new CONTENTVIEW_CREATEOBJECT.Pag
CONTENTVIEW_CREATEOBJECT.linkURL = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, actionFunction, linkUrl, browserType, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, actionFunction, null, objectId);
this.action = function () {
//abe
//alert("linkURL");
//デフォルトでストリーミングなら表示しない
if( browserType == 1 && ClientData.isStreamingMode()){
return;
}
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
......@@ -1892,25 +1892,26 @@ CONTENTVIEW_CREATEOBJECT.linkURL = function (mediaType, actionType, id, imageUrl
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
var linkUrlTmp = linkUrl;
if(CONTENTVIEW_CREATEOBJECT.isSsoUrl(linkUrlTmp)){
CONTENTVIEW_CREATEOBJECT.makeSsoParam(linkUrlTmp, browserType, objectId);
} else {
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
linkUrlTmp = linkUrlTmp + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ;
}
//if( ClientData.serviceOpt_daihatsu() == 'Y'){
// var apiUrl = AVWEB.getApiUrl(ClientData.userInfo_accountPath());
// linkUrlTmp = linkUrlTmp + "?sid=" + ClientData.userInfo_sid() + "&apiurl=" + apiUrl ;
//}
if( browserType == 0 ){
CONTENTVIEW_CREATEOBJECT.showHtml(linkUrlTmp, objectId );
CONTENTVIEW_GENERAL.showDialog(true);
} else {
window.open(linkUrlTmp, "_blank", "new window, scrollbars=yes");
//#21820
//window.open(linkUrlTmp, "_blank", "new window, scrollbars=yes");
window.open(linkUrlTmp);
}
}
};
};
CONTENTVIEW_CREATEOBJECT.linkURL.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
......@@ -1936,7 +1937,7 @@ CONTENTVIEW_CREATEOBJECT.imagePreview = function (mediaType, actionType, id, ima
objectLog.locationY = y;
objectLog.locationHeight = h;
objectLog.locationWidth = w;
//プレビュー画像のリソースIDカンマ区切りでセット
var actionVal = "";
if(imagePreviewResourceIds){
......@@ -1948,7 +1949,7 @@ CONTENTVIEW_CREATEOBJECT.imagePreview = function (mediaType, actionType, id, ima
}
}
objectLog.actionValue = actionVal;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
......@@ -1958,14 +1959,14 @@ CONTENTVIEW_CREATEOBJECT.imagePreview = function (mediaType, actionType, id, ima
$("#btnClose").on({
'click touchend': function(ev){
//時間記録
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
CONTENTVIEW_GENERAL.hideDialog();
return false;
},
'touchstart touchmove': function(){
......@@ -1973,12 +1974,12 @@ CONTENTVIEW_CREATEOBJECT.imagePreview = function (mediaType, actionType, id, ima
return false;
}
});
CONTENTVIEW_GENERAL.showDialog(true);
//時間記録
var dateStart = new Date();
};
};
CONTENTVIEW_CREATEOBJECT.imagePreview.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
......@@ -2007,7 +2008,7 @@ CONTENTVIEW_CREATEOBJECT.Rect.prototype.center = function () {
};
/**
* Content Class Definition
* Content Class Definition
*/
CONTENTVIEW_CREATEOBJECT.Content = function () {
......@@ -2058,7 +2059,7 @@ CONTENTVIEW_CREATEOBJECT.Content.prototype.hasNextPage = function () {
CONTENTVIEW_CREATEOBJECT.Content.prototype.nextPage = function () {
this.pageIndex++;
if (this.pageIndex > (this.pageCount - 1)) {
this.pageIndex = this.pageCount - 1;
}
this.setUpPage(this.pageIndex, 1);
......@@ -2090,7 +2091,7 @@ CONTENTVIEW_CREATEOBJECT.Content.prototype.toPage = function (index) {
this.pageIndex = 0;
}
this.setUpPage(this.pageIndex);
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
CONTENTVIEW_CREATEOBJECT.createPageBGM();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
......@@ -2098,17 +2099,17 @@ CONTENTVIEW_CREATEOBJECT.Content.prototype.toPage = function (index) {
};
/**
* Transition Class Definition
* Transition Class Definition
*/
CONTENTVIEW_CREATEOBJECT.Transition = function(){ };
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
/* Flip Next Page Transition */
CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
//#12373
var tmpScale = 1;
var w = $('#canvasWrapper').width();
CONTENTVIEW.removeObject();
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_FadeIn){
......@@ -2119,61 +2120,61 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
else{
$('#mainNext').css('display', 'block');
}
if (CONTENTVIEW_GETDATA.getContent().hasNextPage()) {
tmpScale = CONTENTVIEW.userScale;
CONTENTVIEW.userScale = 1;
CONTENTVIEW.flip(1);
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#canvasWrapper').stop(true).animate(
{ left: '-' + w + 'px' },
{
duration: CONTENTVIEW_GENERAL.animatePeriod,
complete: function () {
complete: function () {
CONTENTVIEW_GETDATA.assignCurrentContentPage(1);
//Change id of canvas
CONTENTVIEW_GETDATA.switchCanvas(1);
//restore canvas event
CONTENTVIEW.setDefaultEvent();
//init image bookmark
//init image bookmark
CONTENTVIEW_INITOBJECT.initImageBookmark();
//Change slider
CONTENTVIEW.changeSlider(CONTENTVIEW_GETDATA.getContent().pageIndex);
//Draw marking on current screen
//CONTENTVIEW.drawMarkingOnScreen();
//CONTENTVIEW.drawMarkingOnScreen();
//Correct position of canvas for next flipping
CONTENTVIEW_GETDATA.correctCanvasPosition();
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
CONTENTVIEW_CREATEOBJECT.createPageBGM();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if(CONTENTVIEW_GETDATA.getPageIndex() < CONTENTVIEW_GENERAL.totalPage - 1){
//Get Next Page Object
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
//Load Next
CONTENTVIEW_GETDATA.renderNextPage();
CONTENTVIEW_GETDATA.renderNextPage();
}else{
//Enable all control
CONTENTVIEW_GENERAL.enableAllControl();
CONTENTVIEW_GENERAL.enableAllControl();
$('#divImageLoading').css('display', 'none');
CONTENTVIEW_GENERAL.isLoadingObject = false;
}
}
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2188,7 +2189,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_EVENTS.createLockLayout(false);
CONTENTVIEW_INITOBJECT.initImageCheckMarking();
//#12373
//console.log("tmpScale:" + tmpScale);
//if (tmpScale != 1) {
......@@ -2197,56 +2198,56 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
// CONTENTVIEW.flip();
// CONTENTVIEW.checkDisableButtonZoom();
//}
}
});
}
else if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_FadeIn){
$('#main').stop(true).fadeOut(
{
{
duration: CONTENTVIEW_GENERAL.animatePeriod,
complete: function () {
complete: function () {
CONTENTVIEW_GETDATA.assignCurrentContentPage(1);
//Change id of canvas
CONTENTVIEW_GETDATA.switchCanvas(1);
//restore canvas event
CONTENTVIEW.setDefaultEvent();
//init image bookmark
//init image bookmark
CONTENTVIEW_INITOBJECT.initImageBookmark();
//Change slider
CONTENTVIEW.changeSlider(CONTENTVIEW_GETDATA.getContent().pageIndex);
//Draw marking on current screen
//CONTENTVIEW.drawMarkingOnScreen();
//CONTENTVIEW.drawMarkingOnScreen();
//Correct position of canvas for next flipping
CONTENTVIEW_GETDATA.correctCanvasPosition();
if(CONTENTVIEW_GETDATA.getPageIndex() < CONTENTVIEW_GENERAL.totalPage - 1){
//Get Next Page Object
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
//Load Next
CONTENTVIEW_GETDATA.renderNextPage();
}
else{
//Enable all control
CONTENTVIEW_GENERAL.enableAllControl();
CONTENTVIEW_GENERAL.enableAllControl();
$('#divImageLoading').css('display', 'none');
CONTENTVIEW_GENERAL.isLoadingObject = false;
}
}
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2264,7 +2265,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipNextPage = function () {
}
});
}
CONTENTVIEW_INITOBJECT.initImageCheckMarking();
CONTENTVIEW_INITOBJECT.initImageCheckMarking();
}
};
/* Flip Previous Page Transition */
......@@ -2284,39 +2285,39 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
$('#mainPre').css('display', 'block');
}
if (CONTENTVIEW_GETDATA.getContent().hasPreviousPage()) {
tmpScale = CONTENTVIEW.userScale;
CONTENTVIEW.userScale = 1;
CONTENTVIEW.flip(2);
if(CONTENTVIEW_GENERAL.animateType == CONTENTVIEW_GENERAL.animateTypeKeys.Type_Slide){
$('#canvasWrapper').stop(true).animate(
{ left: w + 'px' },
{
duration: CONTENTVIEW_GENERAL.animatePeriod,
complete: function () {
complete: function () {
CONTENTVIEW_GETDATA.assignCurrentContentPage(2);
//Change id of canvas
CONTENTVIEW_GETDATA.switchCanvas(2);
//restore canvas event
CONTENTVIEW.setDefaultEvent();
//init image bookmark
//init image bookmark
CONTENTVIEW_INITOBJECT.initImageBookmark();
//Change slider
CONTENTVIEW.changeSlider(CONTENTVIEW_GETDATA.getContent().pageIndex);
//Draw marking on current screen
//CONTENTVIEW.drawMarkingOnScreen();
//CONTENTVIEW.drawMarkingOnScreen();
//Correct position of canvas for next flipping
CONTENTVIEW_GETDATA.correctCanvasPosition();
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
CONTENTVIEW_CREATEOBJECT.createPageBGM();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
......@@ -2326,14 +2327,14 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
CONTENTVIEW_GETDATA.renderPrevPage();
}else{
//Enable all control
CONTENTVIEW_GENERAL.enableAllControl();
CONTENTVIEW_GENERAL.enableAllControl();
$('#divImageLoading').css('display', 'none');
CONTENTVIEW_GENERAL.isLoadingObject = false;
}
}
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2344,12 +2345,12 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
} else {
document.title = CONTENTVIEW_GENERAL.contentName + ' | ' + I18N.i18nText('sysAppTitle');
}
/* set end log */
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_EVENTS.createLockLayout(false);
CONTENTVIEW_INITOBJECT.initImageCheckMarking();
//#12373
//console.log("tmpScale:" + tmpScale);
//if (tmpScale != 1) {
......@@ -2358,7 +2359,7 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
// CONTENTVIEW.flip();
// CONTENTVIEW.checkDisableButtonZoom();
//}
}
});
}
......@@ -2366,46 +2367,46 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
$('#main').stop(true).fadeOut(
{
duration: CONTENTVIEW_GENERAL.animatePeriod,
complete: function () {
complete: function () {
CONTENTVIEW_GETDATA.assignCurrentContentPage(2);
//Change id of canvas
CONTENTVIEW_GETDATA.switchCanvas(2);
//restore canvas event
CONTENTVIEW.setDefaultEvent();
//init image bookmark
//init image bookmark
CONTENTVIEW_INITOBJECT.initImageBookmark();
//Change slider
CONTENTVIEW.changeSlider(CONTENTVIEW_GETDATA.getContent().pageIndex);
//Draw marking on current screen
//CONTENTVIEW.drawMarkingOnScreen();
//CONTENTVIEW.drawMarkingOnScreen();
//Correct position of canvas for next flipping
CONTENTVIEW_GETDATA.correctCanvasPosition();
if(CONTENTVIEW_GETDATA.getPageIndex() > 0){
//Get Next Page Object
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() - 1);
//Load Next
CONTENTVIEW_GETDATA.renderPrevPage();
}else{
//Enable all control
CONTENTVIEW_GENERAL.enableAllControl();
CONTENTVIEW_GENERAL.enableAllControl();
$('#divImageLoading').css('display', 'none');
CONTENTVIEW_GENERAL.isLoadingObject = false;
}
}
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[CONTENTVIEW_GETDATA.getContent().pageIndex] != '') {
......@@ -2423,10 +2424,10 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipPreviousPage = function () {
}
});
}
}
};
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
//Start Functon : No.4 - Editor : Long - Date : 08/09/2013 - Summary :
/* Flip Page Transition */
CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
......@@ -2434,10 +2435,10 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
var tmpScale = CONTENTVIEW.userScale;
var w = $('#main').attr('width');
if (index == CONTENTVIEW_GETDATA.getContent().pageIndex) {
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
CONTENTVIEW_INITOBJECT.initDisplayMarking();
} else if (index < CONTENTVIEW_GETDATA.getContent().pageIndex) {
CONTENTVIEW_GENERAL.context_main.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_main.width, CONTENTVIEW_GENERAL.canvas_main.height);
CONTENTVIEW.removeObject();
......@@ -2459,39 +2460,39 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
CONTENTVIEW.userScale = 1;
CONTENTVIEW.userScaleNow = 1;
//START TRB00097
//CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
//CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.srcRect = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.srcRectNext = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.srcRectPrev = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.destRect = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.destRectNext = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.destRectPrev = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
//END TRB00097
//END TRB00097
CONTENTVIEW.checkDisableButtonZoom();
CONTENTVIEW_GETDATA.getContent().toPage(index);
CONTENTVIEW_GETDATA.getContent().toPage(index);
if(index > 0){
CONTENTVIEW_GENERAL.prevContent.pageIndex = CONTENTVIEW_GETDATA.getPageIndex();
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, index - 1);
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, index - 1);
CONTENTVIEW_GETDATA.renderPrevPage();
}
if(index < CONTENTVIEW_GENERAL.totalPage - 1){
CONTENTVIEW_GENERAL.nextContent.pageIndex = CONTENTVIEW_GETDATA.getPageIndex();
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, index + 1);
CONTENTVIEW_GETDATA.renderNextPage();
}
CONTENTVIEW_INITOBJECT.initImageBookmark();
CONTENTVIEW.checkExistNextPrePage();
CONTENTVIEW.changeSlider(index);
/* init image had draw */
CONTENTVIEW_INITOBJECT.initDisplayMarking();
/* change title of page */
if (CONTENTVIEW_GENERAL.dataPageTitle[index]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[index]) {
if (CONTENTVIEW_GENERAL.dataPageTitle[index] != '') {
document.title = CONTENTVIEW_GENERAL.contentName + '_' + CONTENTVIEW_GENERAL.dataPageTitle[index] + ' | ' + I18N.i18nText('sysAppTitle');
} else {
......@@ -2503,9 +2504,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
/* set end log */
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_INITOBJECT.initImageCheckMarking();
CONTENTVIEW_EVENTS.createLockLayout(false);
//#12373
//console.log("tmpScale:" + tmpScale);
//if (tmpScale != 1) {
......@@ -2513,11 +2514,11 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
// CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
// CONTENTVIEW.flip();
//}
}
}
);
}
}
else {
CONTENTVIEW_GENERAL.context_main.clearRect(0, 0, CONTENTVIEW_GENERAL.canvas_main.width, CONTENTVIEW_GENERAL.canvas_main.height);
CONTENTVIEW.removeObject();
......@@ -2538,26 +2539,26 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
//change pageIndex and image bookmark
CONTENTVIEW.userScale = 1;
//START TRB00097
//CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
//CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
CONTENTVIEW.srcRect = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.srcRectNext = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.srcRectPrev = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.destRect = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.destRectNext = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW.destRectPrev = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
//END TRB00097
//END TRB00097
CONTENTVIEW.checkDisableButtonZoom();
CONTENTVIEW_GETDATA.getContent().toPage(index);
CONTENTVIEW_GETDATA.getContent().toPage(index);
if(index > 0){
CONTENTVIEW_GENERAL.prevContent.pageIndex = CONTENTVIEW_GETDATA.getPageIndex();
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, index - 1);
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, index - 1);
CONTENTVIEW_GETDATA.renderPrevPage();
}
if(index < CONTENTVIEW_GENERAL.totalPage - 1){
CONTENTVIEW_GENERAL.nextContent.pageIndex = CONTENTVIEW_GETDATA.getPageIndex();
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, index + 1);
......@@ -2582,9 +2583,9 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
/* set end log */
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
CONTENTVIEW_INITOBJECT.initImageCheckMarking();
CONTENTVIEW_EVENTS.createLockLayout(false);
//#12373
//console.log("tmpScale:" + tmpScale);
//if (tmpScale != 1) {
......@@ -2592,11 +2593,11 @@ CONTENTVIEW_CREATEOBJECT.Transition.prototype.flipToPage = function (index) {
// CONTENTVIEW.changeScale(CONTENTVIEW.userScale);
// CONTENTVIEW.flip();
//}
}
});
}
}
};
CONTENTVIEW_CREATEOBJECT.createTextConfirmAudio = function() {
......@@ -2611,7 +2612,7 @@ CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObject
//abe 次のページを作成している
//console.log("CreateObj_createPage:" + pageNumber)
var page = new CONTENTVIEW.ContentPage(pageNumber, pageImage);
/* add page Object */
//Start Function: No.12
......@@ -2621,7 +2622,7 @@ CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObject
//End Function: No.12
/* load page */
page.load(onCompleteFunc);
return page;
};
......@@ -2644,7 +2645,7 @@ CONTENTVIEW_CREATEOBJECT.createVideoFulScreen = function(video, id) {
$('#dialog').css('box-shadow', '0px 0px 3px 1px #666');
$('#dialog').css('border', 'solid 1px #666');
$('#dialog').draggable({ handle: "h1" });
$('#dialog').children().remove();
if (ClientData.userOpt_videoMode() == "1") {/* loop video */
$('#dialog').html(
......@@ -2678,7 +2679,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
// if(CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox'){
// audio = audio.replace("webResourceDownload/", "webResourceDownload");
// }
if (audio != '') {
if (type == "0") { /* play when click */
CONTENTVIEW.stopAllAudio();
......@@ -2732,18 +2733,18 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
document.getElementById("play_audio_0").load();
document.getElementById("play_audio_0").play();
}
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myAudio=document.getElementById("play_audio_0");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var myAudio=document.getElementById("play_audio_0");
if (myAudio.paused)
{
myAudio.play();
}
}
}
else if (type == "1") { /* play all page */
}
else if (type == "1") { /* play all page */
if (document.getElementById("play_audio_1") != undefined) {
if (ClientData.userOpt_musicMode() == "1") {
......@@ -2752,12 +2753,12 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
$('#playaudioallpage').html(
' <embed id="play_audio_1" src="' + audio + '&key=' + (new Date()).toIdString() + '" autostart="true" loop="true" hidden="true"> </embed>'
);*/
}
}
else {
if(!CONTENTVIEW.isPendingContentBGM){
document.getElementById("play_audio_1").play();
}
}
}
}
else {
......@@ -2773,27 +2774,27 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
}
}
}
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// var myAudio=document.getElementById("play_audio_1");
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
// var myAudio=document.getElementById("play_audio_1");
// if (myAudio.paused)
// {
// myAudio.play();
// }
//}
}
}
else {
CONTENTVIEW.TypeAudio1 = type;
CONTENTVIEW.srcAudioType1 = audio;
if (ClientData.userOpt_musicMode() == "1") {
if (ClientData.userOpt_musicMode() == "1") {
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.browser == 'firefox') {
// $('#playaudioallpage').html(
// ' <embed id="play_audio_1" src="' + audio + '&key=' + (new Date()).toIdString() + '" autostart="true" loop="true" hidden="true"> </embed>'
// );
//
//}
//}
//else if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
$('#playaudioallpage').html(
......@@ -2802,7 +2803,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
' </audio>'
);
}
else {
else {
if(CONTENTVIEW.isPendingContentBGM){
$('#playaudioallpage').html(
' <audio id="play_audio_1" loop="loop" >' +
......@@ -2811,7 +2812,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
);
document.getElementById('play_audio_1').load();
CONTENTVIEW.isPendingContentBGM = false;
}
else{
$('#playaudioallpage').html(
......@@ -2843,7 +2844,7 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
);
document.getElementById('play_audio_1').load();
CONTENTVIEW.isPendingContentBGM = false;
}
else{
$('#playaudioallpage').html(
......@@ -2882,11 +2883,11 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
}
//END TRB00069
}
}
}
else if (type == "2") { /* play on page */
else if (type == "2") { /* play on page */
if (document.getElementById("play_audio_2") == undefined) {
CONTENTVIEW.stopAllAudio();
......@@ -2948,11 +2949,11 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
document.getElementById('play_audio_2').play();
$("#bgmConfirm_page").hide();
});
$("#bgmConfirm_page").show();
$("#bgmConfirm_page").center();
}
}
}
}
......@@ -2964,50 +2965,50 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
CONTENTVIEW_CREATEOBJECT.createPageBGM = function(){
var currentPageObject = CONTENTVIEW_GETDATA.getContent().pageObjects;
var audioFile = '';
var playType = '';
$('#playaudiopage').html('');
for(var i = 0; i < currentPageObject.length; i++){
var BGMObject = currentPageObject[i];
if(BGMObject.mediaType == '3' && BGMObject.actionType=='2' && BGMObject.playType == '2'){
if(BGMObject.mediaType == '3' && BGMObject.actionType=='2' && BGMObject.playType == '2'){
audioFile = BGMObject.audioFile;
playType = BGMObject.playType;
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, playType);
break;
}
}
}
};
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
//SSO対応
CONTENTVIEW_CREATEOBJECT.isSsoUrl = function(resourceUrl){
var chkUrl = "http://dlpro.daihatsu.goo-net.com/";
var chkUrlDev = "http://dlprodev.daihatsu.goo-net.com/";
if(chkUrl === resourceUrl || chkUrlDev === resourceUrl){
return true;
} else {
return false;
}
};
CONTENTVIEW_CREATEOBJECT.makeSsoParam = function(linkUrlTmp, browserType, objectId){
var param = "";
//システム時間取得
var params = {
sid: ClientData.userInfo_sid()
};
AVWEB.avwCmsApiSync(
ClientData.userInfo_accountPath(),
"webSso",
......@@ -3015,44 +3016,44 @@ CONTENTVIEW_CREATEOBJECT.makeSsoParam = function(linkUrlTmp, browserType, object
params,
function (data) {
if( data.result == "success" ){
var loginId = ClientData.userInfo_loginId_session();
var aesKey = data.aesKey;
var iv = CONTENTVIEW_CREATEOBJECT.makeRandom(16);
var val = data.sysDateTime;
//val = "2015-03-06T10:00:00";
var enc = CONTENTVIEW_CREATEOBJECT.aesEncrypt(val, aesKey, iv);
//console.log("aesKey:" + aesKey);
//console.log("val:" + val);
//console.log("enc:" + enc);
param ="?lid=" + encodeURIComponent(loginId) + "&p=" + encodeURIComponent(enc) + "&v=" + iv;
//param ="?lid=" + encodeURIComponent(loginId) + "&p=" + enc + "&v=" + iv;
}
linkUrlTmp = linkUrlTmp + param;
if( browserType == 0 ){
CONTENTVIEW_CREATEOBJECT.showHtml(linkUrlTmp, objectId );
CONTENTVIEW_GENERAL.showDialog(true);
} else {
window.open(linkUrlTmp, "_blank", "new window, scrollbars=yes");
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if( browserType == 0 ){
CONTENTVIEW_CREATEOBJECT.showHtml(linkUrlTmp, objectId );
CONTENTVIEW_GENERAL.showDialog(true);
} else {
window.open(linkUrlTmp, "_blank", "new window, scrollbars=yes");
}
}
);
};
CONTENTVIEW_CREATEOBJECT.aesEncrypt = function(data, keyStr, ivStr) {
......@@ -3068,7 +3069,7 @@ CONTENTVIEW_CREATEOBJECT.makeRandom = function(length){
var n = 62; //ランダム調整
var RandomString = '';
var BaseString ='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
//文字列生成
for(var i=0; i<length; i++) {
RandomString += BaseString.charAt( Math.floor( Math.random() * n));
......
......@@ -111,10 +111,10 @@ $(document).ready(function () {
} else {
$('#authGroupBox').hide();
}
//chromeキャッシュ対応
CONTENTVIEW_FILESYSTEM.initFS(null);
});
//グループ認証 戻る
......@@ -123,7 +123,7 @@ HEADER.authCodeClear = function(){
ClientData.authCode("");
ClientData.authGroupName("");
ClientData.authGroupId("");
if( $('#bookshelf').length || $('#list').length ){
AVWEB.avwScreenMove(COMMON.ScreenIds.Home);
} else if( $('#bookmark').length ){
......@@ -169,9 +169,9 @@ HEADER.setDisabledButton = function(selector, buttonid) {
HEADER.bodyClickFunction = function(event) {
if (COMMON.isTouchDevice()) {
// Check mouse is in rectangle of searching panel
if ($('#header-searchbox').is(":visible")) //if ($('#header-searchbox').css('display') != "none")
if ($('#header-searchbox').is(":visible")) //if ($('#header-searchbox').css('display') != "none")
{
var currPosX, currPosY;
......@@ -210,7 +210,7 @@ HEADER.bodyClickFunction = function(event) {
};
HEADER.headerSearchBodyClickFunction = function() {
$('#searchbox-body').attr('checked','checked');
$('#searchbox-tag').removeAttr('checked');
$('#searchbox-content').removeAttr('checked');
......@@ -218,7 +218,7 @@ HEADER.headerSearchBodyClickFunction = function() {
};
HEADER.headerSearchTagClickFunction = function() {
$('#searchbox-tag').attr('checked','checked');
$('#searchbox-body').removeAttr('checked');
$('#searchbox-content').removeAttr('checked');
......@@ -226,7 +226,7 @@ HEADER.headerSearchTagClickFunction = function() {
};
HEADER.headerSearchContentClickFunction = function() {
$('#searchbox-content').attr('checked','checked');
$('#searchbox-tag').removeAttr('checked');
$('#searchbox-body').removeAttr('checked');
......@@ -258,7 +258,7 @@ HEADER.toggleSearchPanel = function(){
} else {
$('div#header-searchbox').hide();
}
}
};
//Button Search Event function
......@@ -266,7 +266,7 @@ HEADER.searchHeaderButtonFunction = function(){
var content = $('#searchbox-content').attr('checked');
var tag = $('#searchbox-tag').attr('checked');
var body = $('#searchbox-body').attr('checked');
var searchDivision;
var searchText = $('#searchbox-key').val();
if(content == 'checked')
......@@ -280,7 +280,7 @@ HEADER.searchHeaderButtonFunction = function(){
if(body == 'checked')
{
searchDivision = $('#searchbox-body').val();
}
}
ClientData.searchCond_searchText(searchText);
ClientData.searchCond_searchDivision(searchDivision);
......@@ -295,7 +295,7 @@ HEADER.homeClickFunction = function(){
//Change Language Japanese function
HEADER.changeLanguageJa = function(){
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ja);
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ja);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja);
//$('#control-sort-titlekana').css('display','inline-block');
//$('#separate').css('display','inline-block');
......@@ -308,7 +308,7 @@ HEADER.changeLanguageJa = function(){
//Change Language English functions
HEADER.changeLanguageEn = function(){
I18N.changeLanguage(COMMON.Consts.ConstLanguage_En);
I18N.changeLanguage(COMMON.Consts.ConstLanguage_En);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
//$('#control-sort-titlekana').css('display','none');
//$('#separate').css('display','none');
......@@ -321,7 +321,7 @@ HEADER.changeLanguageEn = function(){
//Change Language English function
HEADER.changeLanguageKo = function(){
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ko);
I18N.changeLanguage(COMMON.Consts.ConstLanguage_Ko);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
//$('#control-sort-titlekana').css('display','none');
//$('#separate').css('display','none');
......@@ -349,14 +349,14 @@ HEADER.logoutFunction = function() {
// check content is changed, update status option backup
if (ClientData.isChangedBookmark())
if (ClientData.isChangedBookmark())
{
if (ClientData.userOpt_bkShioriFlag() == 0) {
$("#chkBkAllShiori").removeAttr('checked');
}
else {
$("#chkBkAllShiori").attr('checked', 'checked');
}
}
}
else {
$('#chkBkAllShiori').attr('disabled', 'disabled').removeAttr('checked');
......@@ -369,21 +369,21 @@ HEADER.logoutFunction = function() {
}
else {
$("#chkBkAllMemo").attr('checked', 'checked');
}
}
}
else
else
{
$('#chkBkAllMemo').attr('disabled', 'disabled').removeAttr('checked');
}
if (ClientData.isChangedMarkingData())
if (ClientData.isChangedMarkingData())
{
if (ClientData.userOpt_bkMakingFlag() == 0) {
$("#chkBkAllMarking").removeAttr('checked');
}
else {
$("#chkBkAllMarking").attr('checked', 'checked');
}
}
}
else {
$('#chkBkAllMarking').attr('disabled', 'disabled').removeAttr('checked');
......@@ -394,7 +394,7 @@ HEADER.logoutFunction = function() {
// In case: user_data_backup = "Y" -> backup
if (ClientData.serviceOpt_user_data_backup() == "Y") {
if (ClientData.userOpt_bkConfirmFlg() == 1) { // Show confirming dialog
if (ClientData.userOpt_bkConfirmFlg() == 1) { // Show confirming dialog
//$('#dlgConfirmBackup1').dialog({ width: 600, height: 200, modal: true });
COMMON.lockLayout();
$('#dlgConfirmBackup1').show();
......@@ -411,8 +411,8 @@ HEADER.logoutFunction = function() {
$('#dlgConfirmBackup1').center();
}
else {
if (ClientData.userOpt_logoutMode() == 0) { // Logout with backup
if (ClientData.userOpt_logoutMode() == 0) { // Logout with backup
var isBackupMarking=ClientData.userOpt_bkMakingFlag() == 1;
var isBackupMemo=ClientData.userOpt_bkMemoFlag() == 1;
var isBackupBookmark = ClientData.userOpt_bkShioriFlag() == 1;
......@@ -428,7 +428,7 @@ HEADER.logoutFunction = function() {
}
}
// In case: user_data_backup != "Y" -> No backup, logout
else {
else {
HEADER.webLogoutEvent();
}
}
......@@ -469,7 +469,7 @@ HEADER.webLogoutEvent = function(){
isExisted = true;
}
});
return isExisted;
};
......@@ -477,7 +477,7 @@ HEADER.webLogoutEvent = function(){
HEADER.confirmWithoutBackupFunction = function(e) {
e.preventDefault();
var remember = $('#chkRememberBackup').attr('checked');
if(remember == 'checked'){
ClientData.userOpt_bkConfirmFlg(0); // Do not show dialog in next time
}
......@@ -503,7 +503,7 @@ HEADER.confirmWithBackupFunction = function(e) {
var isBackupMarking=$("#chkBkAllMarking").attr('checked') == 'checked';
var isBackupMemo = $("#chkBkAllMemo").attr('checked') == 'checked';
var isBackupBookmark = $("#chkBkAllShiori").attr('checked') == 'checked';
var remember = $('#chkRememberBackup').attr('checked');
COMMON.unlockLayout();
$('#dlgConfirmBackup1').css('z-index', '99');
......@@ -524,7 +524,7 @@ HEADER.confirmWithBackupFunction = function(e) {
ClientData.userOpt_bkConfirmFlg(1); // Show dialog in next time
HEADER.DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark, true);
}
ClientData.userOpt_logoutMode(0); // In next time, if choose: [do not show dialog], will backup and logout
//HEADER.webLogoutEvent();
};
......@@ -548,17 +548,17 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark,isLog
// ClientData.isChangedMarkingData(false);
// ClientData.isChangedMemo(false);
// //alert(I18N.i18nText('msgBackupSuccess'));
//
//
// // Show message: msgBackupSuccess
// $().toastmessage({ position: 'middle-center' });
// $().toastmessage('showToast', {
// type: 'success',
// sticky: true,
// text: I18N.i18nText('msgBackupSuccess'),
// text: I18N.i18nText('msgBackupSuccess'),
// });
// $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', HEADER.webLogoutEvent);
// $('.toast-item-close').live('click', HEADER.webLogoutEvent);
// }
// else {
// //alert(I18N.i18nText('msgBackupFailed'));
......@@ -588,7 +588,7 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark,isLog
// $('.toast-item-close').live('click', HEADER.webLogoutEvent);
// });
// Backup for No.17
// Backup for No.17
// if (!isBackupMarking && !isBackupMemo && !isBackupBookmark)
// return;
......@@ -689,7 +689,7 @@ HEADER.DoBackup = function(isBackupMarking, isBackupMemo, isBackupBookmark,isLog
}, 1000);
}
else
else
{
if (isLogout) {
HEADER.webLogoutEvent();
......@@ -708,7 +708,7 @@ HEADER.backupFile = function(data, file,type) {
AVWEB.avwUploadBackupFile(ClientData.userInfo_accountPath(), params, false,
function (data)
{
if (JSON.parse(data).result == "success")
if (JSON.parse(data).result == "success")
{
result = true;
}
......@@ -722,7 +722,7 @@ HEADER.sendSignalBackupStart = function(typeBackup)
var result = false;
var params = { "sid": ClientData.userInfo_sid(), "fileType": typeBackup };
AVWEB.avwCmsApiSync(ClientData.userInfo_accountPath(), "notifyBackupStart", "post", params,
function (data) {
function (data) {
if (data.result == "success") {
result = true;
}
......@@ -759,13 +759,13 @@ HEADER.checkForceChangePassword = function(){
HEADER.showErrorScreenForceChangePassword = function(){
var tags = '<div id="avw-auth-error">' +
'<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table; width:100%; height:100%;">' +
'<div style="display:table-cell; text-align:center; vertical-align:middle;">' +
'<p>'+I18N.i18nText('msgPWDNeedChange')+'</p>' +
'<p>'+I18N.i18nText('msgPWDNeedChange')+'</p>' +
'<div><button id="avw-unauth-ok">OK</button></div>' +
'</div></div></div>';
$('body').prepend(tags);
$('#avw-auth-error').css( {
$('#avw-auth-error').css( {
'opacity': 1,
'position': 'fixed',
'top': '0',
......@@ -774,18 +774,18 @@ HEADER.showErrorScreenForceChangePassword = function(){
'height': $(window).height(),
'zIndex': '10000'
});
// resize error page
// resize error page
$(window).resize(function() {
$('#avw-auth-error').css( {
'width': $(window).width(),
'height': $(window).height()
});
});
});
$('#avw-unauth-ok').click(function() {
ClientData.BookmarkScreen(COMMON.ScreenIds.Setting);
AVWEB.avwScreenMove(COMMON.ScreenIds.Setting);
});
AVWEB.avwScreenMove(COMMON.ScreenIds.Setting);
});
};
/* region for Push message */
......@@ -849,8 +849,8 @@ HEADER.initPushMessage = function()
};
// get time wait check new push message
HEADER.getTimeWaitCheckNewPushMessage = function()
{
HEADER.getTimeWaitCheckNewPushMessage = function()
{
return AVWEB.avwSysSetting().pushTimePeriod * 1000;// time unit is seconds
};
......@@ -881,7 +881,7 @@ HEADER.getPushMessageNew = function()
// callback get number new message success
HEADER.callbackGetPushMessageNewSuccess = function(data) {
if (data) {
if (data) {
// get current number message in session
var currentMessage = parseInt(ClientData.pushInfo_newMsgNumber());
if (isNaN(currentMessage)) {
......@@ -960,7 +960,7 @@ HEADER.getDateCreatePushMessage = function(data) {
HEADER.showListPushMessage = function(data)
{
$('#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++)
{
var titleMessage = COMMON.truncate(data.messageList[i].messageDetail, 30).replace(/</g, '&lt;').replace(/>/g, '&gt;');
var detailMessage = data.messageList[i].messageDetail.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br/>');
......@@ -991,8 +991,8 @@ HEADER.showListPushMessage = function(data)
$('#next-page-message').hide();
}
// check show previous button
if (HEADER.currentPagePushMessage > 1) {
// check show previous button
if (HEADER.currentPagePushMessage > 1) {
$('#prev-page-message').css({ "visibility": "visible" });
}
else {
......@@ -1030,11 +1030,11 @@ HEADER.previousPushMessageClick = function() {
HEADER.setStatusSort = function(currentid, isAsc) {
$('#menu_sort li a').removeClass('descending_sort').removeClass('ascending_sort');
if($('#menu_sort li a#off-default').size()){
$('#menu_sort li a#off-default').addClass('descending_sort');
}
}
$('#menu_sort li').removeClass('current');
$(currentid).addClass(isAsc ? 'ascending_sort' : 'descending_sort').parent().addClass("current");
};
......@@ -1155,30 +1155,11 @@ HEADER.viewLinkContentById = function(contentId){
if( !linkUrl ){
return;
}
window.open(linkUrl, "_blank", "new window, scrollbars=yes");
/*
//httpで始まる場合は別ウィンドウで開く
if (linkUrl.toLowerCase().indexOf('http') === 0) {
window.open(linkUrl, "_blank", "new window, scrollbars=yes");
}
else if( linkUrl.toLowerCase().indexOf('mailto') === 0 ){
//window.open(linkUrl, "_self");
location.href=linkUrl;
}
else {
// open url to download file
if (HEADER.isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(linkUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { COMMON.ToogleLogoutNortice() }, 200);
}
else {
window.open(linkUrl); //open url to download file on orther browser
}
}
*/
//#21820
//window.open(linkUrl, "_blank", "new window, scrollbars=yes");
window.open(linkUrl);
},
function (xhr, b, c) { });
};
......@@ -1208,7 +1189,7 @@ HEADER.getThumbnailForOtherType = function(contentType){
else if(contentType == COMMON.ContentTypeKeys.Type_Link){
src = COMMON.ThumbnailForOtherType.Thumbnail_LinkType;
}
return src;
};
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