Commit 3853437e by Masaru Abe

パフォーマンス対応

スクリーンロックでログアウト対応
ブラウザ閉じるで閲覧ログ送信対応
parent 46d4e2b7
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
* Copyright (C) Agentec Co, Ltd. All rights reserved. * Copyright (C) Agentec Co, Ltd. All rights reserved.
*/ */
//名前空間用のオブジェクトを用意する
var AVWEB = {};
/* /*
* User Environment Check Class * User Environment Check Class
*/ */
...@@ -625,6 +628,12 @@ function avwGrabContentPageImage(accountPath, params, success, error) { ...@@ -625,6 +628,12 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
*/ */
src = 'data:image/png;base64,' + xmlHttp.responseText; src = 'data:image/png;base64,' + xmlHttp.responseText;
//フィアルシステムが有効であればキャッシュ
if( CONTENTVIEW_FILESYSTEM.fs != null ){
var fileName = "page_" + params.pageNo + ".dat";
CONTENTVIEW_FILESYSTEM.saveFile(params.contentId, fileName, src);
}
if (success) { if (success) {
success(src); success(src);
} }
...@@ -791,7 +800,7 @@ function showSystemError( textId ) { ...@@ -791,7 +800,7 @@ function showSystemError( textId ) {
text: errMes, text: errMes,
close: function() { close: function() {
//ログアウト時と同じ後始末処理をしてログイン画面に戻す //ログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !webLogoutEvent() ){ if( !COMMON.webLogoutEvent() ){
//ログアウト出来なかった //ログアウト出来なかった
SessionStorageUtils.clear(); SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid); avwUserSetting().remove(Keys.userInfo_sid);
...@@ -834,6 +843,13 @@ function avwClearError() { ...@@ -834,6 +843,13 @@ function avwClearError() {
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */ /* ブラウザunload時に警告メッセージの出力設定を行う関数 */
function avwSetLogoutNortice() { function avwSetLogoutNortice() {
window.onbeforeunload = function(event) { window.onbeforeunload = function(event) {
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
if(contentID != null ){
SetEndLog(contentID);
RegisterLog();
}
} else {
// メッセージ表示 // メッセージ表示
// FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない // FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない
var message = i18nText('sysInfoWithoutLogout'); var message = i18nText('sysInfoWithoutLogout');
...@@ -842,6 +858,7 @@ function avwSetLogoutNortice() { ...@@ -842,6 +858,7 @@ function avwSetLogoutNortice() {
e.returnValue = message; e.returnValue = message;
} }
return message; return message;
}
}; };
}; };
/* 警告メッセージを出力しないでページ遷移を行う関数 */ /* 警告メッセージを出力しないでページ遷移を行う関数 */
...@@ -867,3 +884,4 @@ function getApiUrl(accountPath) { ...@@ -867,3 +884,4 @@ function getApiUrl(accountPath) {
return apiUrl; return apiUrl;
}; };
/// <reference path="avweb.js" />
/// <reference path="screenLock.js" /> //名前空間用のオブジェクトを用意する
/// <reference path="common.js" /> var COMMON = {};
/// <reference path="i18n.js" />
/// <reference path="jquery-1.8.1.min.js" />
/// <reference path="jquery-ui-1.8.23.custom.min.js" />
/// <reference path="jquery.toastmessage.js" />
/// <reference path="pageViewer.js" />
/// <reference path="uuid.js" />
// ============================================================================================= // =============================================================================================
// Constants [start] // Constants [start]
...@@ -2922,3 +2916,35 @@ function isIE10() { ...@@ -2922,3 +2916,35 @@ function isIE10() {
*/ */
return false; return false;
}; };
//Web Logout Event
COMMON.webLogoutEvent = function(){
var isExisted = false;
var params = {
sid: ClientData.userInfo_sid()
};
avwCmsApiSync(ClientData.userInfo_accountPath(), "webLogout", "GET", params,
function (data) {
isExisted = true;
SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid);
// Move to login screen
//window.location = ScreenIds.Login;
avwScreenMove(ScreenIds.Login);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.status == 403) {
isExisted = false;
}
else {
// Show system error
isExisted = true;
}
});
return isExisted;
};
...@@ -156,6 +156,26 @@ removeLockState(); ...@@ -156,6 +156,26 @@ removeLockState();
/* show lock screen */ /* show lock screen */
function showLockScreen() { function showLockScreen() {
//DHカスタム
if( ClientData.serviceOpt_daihatsu() == 'Y'){
if( "contentID" in window ){
if( contentID != null ){
SetEndLog(contentID);
RegisterLog();
}
}
//ログアウトさせる
//ログアウト時と同じ後始末処理をしてログイン画面に戻す
if( !COMMON.webLogoutEvent() ){
//ログアウト出来なかった
SessionStorageUtils.clear();
avwUserSetting().remove(Keys.userInfo_sid);
avwScreenMove(ScreenIds.Login);
}
}
// show message overlay // show message overlay
var tags = '<div id="' + elmId + '" class="screenLock">' + var tags = '<div id="' + elmId + '" class="screenLock">' +
'<div style="display:table; width:100%; height:100%;">' + '<div style="display:table; width:100%; height:100%;">' +
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<script type="text/javascript" src="./js/contentview_3d.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/contentview_3d.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/contentview_ContentTypeNone.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/contentview_ContentTypeNone.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/contentview_ImagePreview.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/contentview_ImagePreview.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/contentview_FileSystem.js?__UPDATEID__"></script>
<script type="text/javascript" src="./common/js/zoomDetector.js?#UPDATEID#" ></script> <script type="text/javascript" src="./common/js/zoomDetector.js?#UPDATEID#" ></script>
<link rel="stylesheet" type="text/css" href="css/reset.css?#UPDATEID#" /> <link rel="stylesheet" type="text/css" href="css/reset.css?#UPDATEID#" />
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<script type="text/javascript" src="./common/js/i18n.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/i18n.js?#UPDATEID#"></script>
<script type="text/javascript" src="./common/js/common.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/common.js?#UPDATEID#"></script>
<script type="text/javascript" src="./common/js/uuid.js?#UPDATEID#"></script> <script type="text/javascript" src="./common/js/uuid.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/contentview_FileSystem.js?__UPDATEID__"></script>
<script type="text/javascript" src="./js/Limit_Access_Content.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/Limit_Access_Content.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/home.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/home.js?#UPDATEID#"></script>
<script type="text/javascript" src="./js/header.js?#UPDATEID#"></script> <script type="text/javascript" src="./js/header.js?#UPDATEID#"></script>
......
...@@ -12,7 +12,12 @@ function abapi(name, param, method, callback) { ...@@ -12,7 +12,12 @@ function abapi(name, param, method, callback) {
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content //START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get Json stored content info */ /* get Json stored content info */
function getJsonContentInfo() { function getJsonContentInfo() {
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
//ファイルシステムが有効であればキャッシュ確認
if( CONTENTVIEW_FILESYSTEM.fs == null ){
//通常
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) { function (data) {
pageImages = data; pageImages = data;
...@@ -22,14 +27,59 @@ function getJsonContentInfo() { ...@@ -22,14 +27,59 @@ function getJsonContentInfo() {
getJsonDataType4(); getJsonDataType4();
getJsonDataType5(); getJsonDataType5();
getDataJsonFile(); getDataJsonFile();
//webGetPageImageContentSize();
webGetContentPageSize(); webGetContentPageSize();
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}
);
} else {
// 1ページ目のファイル取得
var fileName = contentID + "/page_1.dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile('/abook/' + fileName, { create: false },
function(fileEntry){
fileEntry.file(function(file){
var reader = new FileReader();
reader.onloadend = function(e) {
console.log("read FileSystem");
pageImages = e.target.result;
webGetContentData();
getSearchDataFromJson();
getJsonDataPageTitle();
getJsonDataType4();
getJsonDataType5();
getDataJsonFile();
webGetContentPageSize();
};
//reader.readAsBinaryString(fileEntry);
reader.readAsText(file);
//reader.readAsArrayBuffer(fileEntry);
}); });
}; },
function(err){
// 失敗時のコールバック関数
console.log("NotRead FileSystem");
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) {
pageImages = data;
webGetContentData();
getSearchDataFromJson();
getJsonDataPageTitle();
getJsonDataType4();
getJsonDataType5();
getDataJsonFile();
webGetContentPageSize();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
CONTENTVIEW.showErrorScreen();
}
);
}
);
}
}
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content //END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
function webGetPageImageContentSize() { function webGetPageImageContentSize() {
......
...@@ -373,22 +373,76 @@ function firstPage_click() { ...@@ -373,22 +373,76 @@ function firstPage_click() {
clearCanvas(document.getElementById("offscreen")); clearCanvas(document.getElementById("offscreen"));
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
//ファイルシステムが有効であればキャッシュ確認
if( CONTENTVIEW_FILESYSTEM.fs == null ){
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) { function (data) {
pageImages = data; pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
//userScale = 1;
//changeScale(userScale);
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
}
);
} else {
// ファイル取得
var fileName = contentID + "/page_1.dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile('/abook/' + fileName, { create: false },
function(fileEntry){
fileEntry.file(
function(file){
var reader = new FileReader();
reader.onloadend = function(e) {
console.log("read FileSystem");
pageImages = e.target.result;
/* get page Objects */ /* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, 0); getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none'); $('#divImageLoading').css('display', 'none');
//START TRB00097
//userScale = 1; //userScale = 1;
//changeScale(userScale);
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(0);
};
reader.readAsText(file);
}
);
},
function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem");
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');
//userScale = 1;
//changeScale(userScale); //changeScale(userScale);
//END TRB00097
checkDisableButtonZoom(); checkDisableButtonZoom();
var tran = new Transition(); var tran = new Transition();
tran.flipToPage(0); tran.flipToPage(0);
...@@ -396,10 +450,13 @@ function firstPage_click() { ...@@ -396,10 +450,13 @@ function firstPage_click() {
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}); }
);
}
);
} }
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process //START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(contentType == ContentTypeKeys.Type_NoFile){ } else if(contentType == ContentTypeKeys.Type_NoFile){
getPageObjectsByPageIndex(pageObjectsData, 0); getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
...@@ -446,11 +503,65 @@ function lastPage_click() { ...@@ -446,11 +503,65 @@ function lastPage_click() {
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1); //pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
//ファイルシステムが有効であればキャッシュ確認
if( CONTENTVIEW_FILESYSTEM.fs == null ){
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
function (data) { function (data) {
pageImages = data; pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(totalPage - 1);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
}
);
} else {
// ファイル取得
var fileName = contentID + "/page_" + totalPage + ".dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile('/abook/' + fileName, { create: false },
function(fileEntry){
fileEntry.file(
function(file){
var reader = new FileReader();
reader.onloadend = function(e) {
console.log("read FileSystem");
pageImages = e.target.result;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(totalPage - 1);
};
reader.readAsText(file);
}
);
},
function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem");
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
function (data) {
pageImages = data;
/* get page Objects */ /* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1); getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
...@@ -464,7 +575,14 @@ function lastPage_click() { ...@@ -464,7 +575,14 @@ function lastPage_click() {
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}); }
);
}
);
}
} }
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process //START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else if(contentType == ContentTypeKeys.Type_NoFile){ else if(contentType == ContentTypeKeys.Type_NoFile){
......
...@@ -9,24 +9,24 @@ ...@@ -9,24 +9,24 @@
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content //START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get Json stored content info */ /* get Json stored content info */
function getJsonContentInfo() { //function getJsonContentInfo() {
avwGrabContentPageImage(ClientData.userInfo_accountPath(), // avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, // { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
function (data) { // function (data) {
pageImages = data; // pageImages = data;
webGetContentData(); // webGetContentData();
getSearchDataFromJson(); // getSearchDataFromJson();
getJsonDataPageTitle(); // getJsonDataPageTitle();
getJsonDataType4(); // getJsonDataType4();
getJsonDataType5(); // getJsonDataType5();
getDataJsonFile(); // getDataJsonFile();
//webGetPageImageContentSize(); // //webGetPageImageContentSize();
webGetContentPageSize(); // webGetContentPageSize();
}, // },
function (xmlHttpRequest, txtStatus, errorThrown) { // function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); // showErrorScreen();
}); // });
}; //};
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content //END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
...@@ -1238,19 +1238,65 @@ function renderNextPage(){ ...@@ -1238,19 +1238,65 @@ function renderNextPage(){
//Get next page background image //Get next page background image
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
//ファイルシステムが有効であればキャッシュ確認
if( CONTENTVIEW_FILESYSTEM.fs == null ){
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) { function (data) {
nextPageImage = data; nextPageImage = data;
nextContent.setPageImages(totalPage, nextPageImage)
.setPageObjects(nextPageObjects)
.nextPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
}
);
} else {
// ファイル取得
var fileName = contentID + "/page_" + pageNo + ".dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile('/abook/' + fileName, { create: false },
function(fileEntry){
fileEntry.file(
function(file){
var reader = new FileReader();
reader.onloadend = function(e) {
console.log("read FileSystem");
nextPageImage = e.target.result;
nextContent.setPageImages(totalPage, nextPageImage) nextContent.setPageImages(totalPage, nextPageImage)
.setPageObjects(nextPageObjects) .setPageObjects(nextPageObjects)
.nextPage(); .nextPage();
};
reader.readAsText(file);
}
);
},
function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem");
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
nextPageImage = data;
nextContent.setPageImages(totalPage, nextPageImage)
.setPageObjects(nextPageObjects)
.nextPage();
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}); }
);
}
);
}
} }
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one //Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){ else if(contentType == ContentTypeKeys.Type_NoFile){
...@@ -1271,19 +1317,62 @@ function renderPrevPage(){ ...@@ -1271,19 +1317,62 @@ function renderPrevPage(){
//Get prev page background image //Get prev page background image
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
//ファイルシステムが有効であればキャッシュ確認
if( CONTENTVIEW_FILESYSTEM.fs == null ){
avwGrabContentPageImage(ClientData.userInfo_accountPath(), avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) { function (data) {
prevPageImage = data; prevPageImage = data;
prevContent.setPageImages(totalPage, prevPageImage)
.setPageObjects(prevPageObjects)
.previousPage();
},
function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen();
});
} else {
// ファイル取得
var fileName = contentID + "/page_" + pageNo + ".dat";
CONTENTVIEW_FILESYSTEM.fs.root.getFile('/abook/' + fileName, { create: false },
function(fileEntry){
fileEntry.file(
function(file){
var reader = new FileReader();
reader.onloadend = function(e) {
console.log("read FileSystem");
prevPageImage = e.target.result;
prevContent.setPageImages(totalPage, prevPageImage) prevContent.setPageImages(totalPage, prevPageImage)
.setPageObjects(prevPageObjects) .setPageObjects(prevPageObjects)
.previousPage(); .previousPage();
};
reader.readAsText(file);
}
);
},
function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem");
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
function (data) {
prevPageImage = data;
prevContent.setPageImages(totalPage, prevPageImage)
.setPageObjects(prevPageObjects)
.previousPage();
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); showErrorScreen();
}); });
}
);
}
} }
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one //Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(contentType == ContentTypeKeys.Type_NoFile){ else if(contentType == ContentTypeKeys.Type_NoFile){
......
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" /> //名前空間用のオブジェクトを用意する
var CONTENTVIEW_INITOBJECTS = {};
/// <reference path="../common/js/common.js" />
/// <reference path="contentview_VarDef.js" />
/// <reference path="contentview_CallApi.js" />
/// <reference path="contentview_GetData.js" />
//CONTENTVIEW_INITOBJECTS.initPage = function
/* init Image memo */ /* init Image memo */
function initImageMemo() { function initImageMemo() {
...@@ -132,6 +126,8 @@ function initPage() { ...@@ -132,6 +126,8 @@ function initPage() {
//abe //abe
//alert("initPage"); //alert("initPage");
console.log("initPage");
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
setLoadingSize(); setLoadingSize();
//END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image //END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
...@@ -168,7 +164,6 @@ function initPage() { ...@@ -168,7 +164,6 @@ function initPage() {
} }
else{ else{
getJsonContentInfo(); getJsonContentInfo();
//Start Function: No.4 - Editor : Long - Date: 08/20/2013 //Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig(); getPageTransitionConfig();
//End Function : No.4 - Editor : Long - Date : 08/20/2013 //End Function : No.4 - Editor : Long - Date : 08/20/2013
...@@ -283,6 +278,7 @@ function initPage() { ...@@ -283,6 +278,7 @@ function initPage() {
/*Init Page */ /*Init Page */
nAjaxLoad++; nAjaxLoad++;
console.log("nAjaxLoad:" + nAjaxLoad);
if (nAjaxLoad == 8) { if (nAjaxLoad == 8) {
/* handle from bookmark page */ /* handle from bookmark page */
......
...@@ -403,18 +403,18 @@ function logoutFunction() { ...@@ -403,18 +403,18 @@ function logoutFunction() {
else if (ClientData.userOpt_logoutMode() == 1) { // Logout without backup else if (ClientData.userOpt_logoutMode() == 1) { // Logout without backup
// Do nothing // Do nothing
//Logout //Logout
webLogoutEvent(); COMMON.webLogoutEvent();
} }
} }
} }
} }
// In case: user_data_backup != "Y" -> No backup, logout // In case: user_data_backup != "Y" -> No backup, logout
else { else {
webLogoutEvent(); COMMON.webLogoutEvent();
} }
} }
else{ else{
webLogoutEvent(); COMMON.webLogoutEvent();
} }
}; };
...@@ -423,6 +423,7 @@ function historyClickFunction(){ ...@@ -423,6 +423,7 @@ function historyClickFunction(){
avwScreenMove(ScreenIds.History); avwScreenMove(ScreenIds.History);
}; };
/*
//Web Logout Event //Web Logout Event
function webLogoutEvent(){ function webLogoutEvent(){
...@@ -453,6 +454,7 @@ function webLogoutEvent(){ ...@@ -453,6 +454,7 @@ function webLogoutEvent(){
return isExisted; return isExisted;
}; };
*/
//Logout Without Backup function //Logout Without Backup function
function confirmWithoutBackupFunction(e) { function confirmWithoutBackupFunction(e) {
...@@ -468,7 +470,7 @@ function confirmWithoutBackupFunction(e) { ...@@ -468,7 +470,7 @@ function confirmWithoutBackupFunction(e) {
ClientData.userOpt_logoutMode(1); // In next time, if choose: [do not show dialog], will not backup and logout ClientData.userOpt_logoutMode(1); // In next time, if choose: [do not show dialog], will not backup and logout
//window.location = ScreenIds.Login; //window.location = ScreenIds.Login;
webLogoutEvent(); COMMON.webLogoutEvent();
}; };
//Logout With Backup function //Logout With Backup function
...@@ -673,7 +675,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC ...@@ -673,7 +675,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
else else
{ {
if (isLogout) { if (isLogout) {
webLogoutEvent(); COMMON.webLogoutEvent();
} }
} }
}; };
......
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" /> //名前空間用のオブジェクトを用意する
/// <reference path="../common/js/common.js" /> var HOME = {};
/// <reference path="../common/js/i18n.js" />
/// <reference path="../common/js/jquery-1.8.1.min.js" />
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
/// <reference path="header.js" />
//Start Declare Variables //Start Declare Variables
//----Constant-----------// //----Constant-----------//
...@@ -53,11 +47,18 @@ var home_isMove = false; ...@@ -53,11 +47,18 @@ var home_isMove = false;
var isShowBookShelf = null; var isShowBookShelf = null;
var showNextRecordClickNumber = 1; var showNextRecordClickNumber = 1;
//名前空間用のオブジェクトを用意する $(document).ready(function () {
var home = {};
HOME.ready();
});
//========================================================== //==========================================================
$(document).ready(function () { //$(document).ready(function () {
HOME.ready = function(){
console.log("HOME.ready!");
if (!avwCheckLogin(ScreenIds.Login)) { if (!avwCheckLogin(ScreenIds.Login)) {
return; return;
...@@ -231,8 +232,8 @@ $(document).ready(function () { ...@@ -231,8 +232,8 @@ $(document).ready(function () {
if (/msie 9.0/.test(ua) && /windows nt 6.1/.test(ua) && !/tablet/.test(ua)) { if (/msie 9.0/.test(ua) && /windows nt 6.1/.test(ua) && !/tablet/.test(ua)) {
$('.tab_bg_color').css({ "overflow-x": "scroll" }); $('.tab_bg_color').css({ "overflow-x": "scroll" });
} }
};
}); //});
//日比谷カスタム ここから //日比谷カスタム ここから
function dspHibiyaClickFunction(){ function dspHibiyaClickFunction(){
...@@ -1216,8 +1217,7 @@ function getDataJsonFileGroup() { ...@@ -1216,8 +1217,7 @@ function getDataJsonFileGroup() {
for (var nIndex = 0; nIndex < tree2.ExpandNodes.length; nIndex++) { for (var nIndex = 0; nIndex < tree2.ExpandNodes.length; nIndex++) {
if ($("#" + tree2.ExpandNodes[nIndex]).parent()) { if ($("#" + tree2.ExpandNodes[nIndex]).parent()) {
console.log("tree2.ExpandNodes"); //console.log("tree2.ExpandNodes");
var objParent = $("#" + tree2.ExpandNodes[nIndex]).parent(); var objParent = $("#" + tree2.ExpandNodes[nIndex]).parent();
var objChild = objParent.children()[0]; var objChild = objParent.children()[0];
if (objChild) { if (objChild) {
...@@ -2290,12 +2290,17 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2290,12 +2290,17 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
var resizeImg = resizeResourceThumbnail(imgThumb, c.width, c.height); var resizeImg = resizeResourceThumbnail(imgThumb, c.width, c.height);
ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]); ctx.drawImage(imgThumb, (c.width / 2) - (resizeImg[0] / 2) + 4, c.height - resizeImg[1] + 4, resizeImg[0], resizeImg[1]);
imgIconNew.onload = function () { imgIconNew.onload = function () {
console.log("imgIconNew.onload..1");
ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]); ctx.drawImage(imgIconNew, c.width / 2 - resizeImg[0] / 2, c.height - resizeImg[1]);
$("#loadingIcon" + contId).fadeOut('slow', function () { $("#loadingIcon" + contId).fadeOut('slow', function () {
$('#content-thumbnail' + contId).fadeIn('slow'); $('#content-thumbnail' + contId).fadeIn('slow');
}); });
}; };
imgIconNew.src = DEFAULT_IMG_CONTENT_NEW; imgIconNew.src = DEFAULT_IMG_CONTENT_NEW;
}; };
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
...@@ -2379,6 +2384,7 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) { ...@@ -2379,6 +2384,7 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
}); });
}; };
imgIconNew.src = DEFAULT_IMG_CONTENT_NEW; imgIconNew.src = DEFAULT_IMG_CONTENT_NEW;
}; };
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail. //Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
......
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