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,14 +843,22 @@ function avwClearError() { ...@@ -834,14 +843,22 @@ function avwClearError() {
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */ /* ブラウザunload時に警告メッセージの出力設定を行う関数 */
function avwSetLogoutNortice() { function avwSetLogoutNortice() {
window.onbeforeunload = function(event) { window.onbeforeunload = function(event) {
// メッセージ表示 //DHカスタム
// FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない if( ClientData.serviceOpt_daihatsu() == 'Y'){
var message = i18nText('sysInfoWithoutLogout'); if(contentID != null ){
var e = event || window.event; SetEndLog(contentID);
if(e) { RegisterLog();
e.returnValue = message; }
} } else {
return message; // メッセージ表示
// FFでは、https://bugzilla.mozilla.org/show_bug.cgi?id=588292 によりメッセージが出力されない
var message = i18nText('sysInfoWithoutLogout');
var e = event || window.event;
if(e) {
e.returnValue = message;
}
return message;
}
}; };
}; };
/* 警告メッセージを出力しないでページ遷移を行う関数 */ /* 警告メッセージを出力しないでページ遷移を行う関数 */
...@@ -866,4 +883,5 @@ function getApiUrl(accountPath) { ...@@ -866,4 +883,5 @@ function getApiUrl(accountPath) {
} }
return apiUrl; return apiUrl;
}; };
\ No newline at end of file
/// <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%;">' +
...@@ -198,7 +218,7 @@ removeLockState(); ...@@ -198,7 +218,7 @@ removeLockState();
.keydown(function(event) { .keydown(function(event) {
// パスワード入力タイマーを解除 // パスワード入力タイマーを解除
if(pwInputTimer) { if(pwInputTimer) {
clearTimeout(pwInputTimer); clearTimeout(pwInputTimer);
} }
pwInputTimer = null; pwInputTimer = null;
// エンターキーで解除実行 // エンターキーで解除実行
......
...@@ -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>
......
//名前空間用のオブジェクトを用意する
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" /> var CONTENTVIEW = {};
/// <reference path="../common/js/common.js" />
/// <reference path="contentview_VarDef.js" />
/// <reference path="contentview_CallApi.js" />
/// <reference path="contentview_GetData.js" />
/// <reference path="contentview_InitObjects.js" />
/// <reference path="contentview_Events.js" />
/* change size */ /* change size */
function sizingScreen() { function sizingScreen() {
...@@ -1088,26 +1075,79 @@ function changePage(page_index) { ...@@ -1088,26 +1075,79 @@ function changePage(page_index) {
clearCanvas(document.getElementById("offscreen")); clearCanvas(document.getElementById("offscreen"));
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: page_index + 1 }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
pageImages = data;
avwGrabContentPageImage(
/* get page Objects */ ClientData.userInfo_accountPath(),
getPageObjectsByPageIndex(pageObjectsData, page_index); { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: page_index + 1 },
getContent().setPageImages(totalPage, pageImages) function (data) {
.setPageObjects(pageObjects); pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, page_index);
//$('#divImageLoading').css('display', 'none'); getContent().setPageImages(totalPage, pageImages)
.setPageObjects(pageObjects);
var tran = new Transition();
tran.flipToPage(page_index); var tran = new Transition();
tran.flipToPage(page_index);
},
function (xmlHttpRequest, txtStatus, errorThrown) { },
showErrorScreen(); function (xmlHttpRequest, txtStatus, errorThrown) {
}); showErrorScreen();
});
} else {
// ファイル取得
var pageNoTmp = page_index + 1;
var fileName = contentID + "/page_" + pageNoTmp + ".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, page_index);
getContent().setPageImages(totalPage, pageImages)
.setPageObjects(pageObjects);
var tran = new Transition();
tran.flipToPage(page_index);
};
reader.readAsText(file);
}
);
},
function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem");
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: page_index + 1 },
function (data) {
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, page_index);
getContent().setPageImages(totalPage, pageImages)
.setPageObjects(pageObjects);
var tran = new Transition();
tran.flipToPage(page_index);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
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){
...@@ -2020,62 +2060,161 @@ function changePageWithoutSlide(pageMove) { ...@@ -2020,62 +2060,161 @@ function changePageWithoutSlide(pageMove) {
clearCanvas(document.getElementById("offscreen")); clearCanvas(document.getElementById("offscreen"));
if(contentType == ContentTypeKeys.Type_PDF){ if(contentType == ContentTypeKeys.Type_PDF){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageMove + 1 }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
pageImages = data;
avwGrabContentPageImage(
/* get page Objects */ ClientData.userInfo_accountPath(),
getPageObjectsByPageIndex(pageObjectsData, pageMove); { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageMove + 1 },
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); function (data) {
pageImages = data;
$('#divImageLoading').css('display', 'none'); /* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, pageMove);
isFirstLoad = true; getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
// screenFit();
$('#divImageLoading').css('display', 'none');
getContent().toPage(pageMove);
isFirstLoad = true;
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
createPageBGM(); getContent().toPage(pageMove);
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM createPageBGM();
//Start FUnciton: No.4 - Editor : Long - Date : 08/12/2013 - Summary : Handle jump from bookmark page if(pageMove > 0){
if(pageMove > 0){ prevContent.pageIndex = getPageIndex();
//START TRB00056 - Editor: Long - Date: 09/19/2013 - Summary : getPrevPageObjectsByPageIndex(pageObjectsData, pageMove - 1);
prevContent.pageIndex = getPageIndex(); renderPrevPage();
//END TRB00056 - Editor: Long - Date: 09/19/2013 - Summary : }
getPrevPageObjectsByPageIndex(pageObjectsData, pageMove - 1); if(pageMove < totalPage - 1){
renderPrevPage(); nextContent.pageIndex = getPageIndex();
} getNextPageObjectsByPageIndex(pageObjectsData, pageMove + 1);
renderNextPage();
if(pageMove < totalPage - 1){ }
//START TRB00056
nextContent.pageIndex = getPageIndex(); handleSliderBar();
//END TRB00056
getNextPageObjectsByPageIndex(pageObjectsData, pageMove + 1); if (dataPageTitle[pageMove]) {
renderNextPage(); if (dataPageTitle[pageMove] != '') {
} document.title = contentName + '_' + dataPageTitle[pageMove] + ' | ' + i18nText('sysAppTitle');
} else {
//End Function : No.4 - Editor : Long - Date: 08/12/2013 - Summary : Handle jump form bookmark page document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
/* handle slider bar */ } else {
handleSliderBar(); document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
if (dataPageTitle[pageMove]) {
if (dataPageTitle[pageMove] != '') { },
document.title = contentName + '_' + dataPageTitle[pageMove] + ' | ' + i18nText('sysAppTitle'); function (xmlHttpRequest, txtStatus, errorThrown) {
} else { showErrorScreen();
document.title = contentName + ' | ' + i18nText('sysAppTitle'); }
} );
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle'); } else {
}
// ファイル取得
}, var pageNoTmp = pageMove + 1;
function (xmlHttpRequest, txtStatus, errorThrown) { var fileName = contentID + "/page_" + pageNoTmp + ".dat";
showErrorScreen(); 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, pageMove);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
isFirstLoad = true;
getContent().toPage(pageMove);
createPageBGM();
if(pageMove > 0){
prevContent.pageIndex = getPageIndex();
getPrevPageObjectsByPageIndex(pageObjectsData, pageMove - 1);
renderPrevPage();
}
if(pageMove < totalPage - 1){
nextContent.pageIndex = getPageIndex();
getNextPageObjectsByPageIndex(pageObjectsData, pageMove + 1);
renderNextPage();
}
handleSliderBar();
if (dataPageTitle[pageMove]) {
if (dataPageTitle[pageMove] != '') {
document.title = contentName + '_' + dataPageTitle[pageMove] + ' | ' + i18nText('sysAppTitle');
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
};
reader.readAsText(file);
}
);
},
function(err){ // 失敗時のコールバック関数
console.log("NotRead FileSystem");
avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageMove + 1 },
function (data) {
pageImages = data;
/* get page Objects */
getPageObjectsByPageIndex(pageObjectsData, pageMove);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
$('#divImageLoading').css('display', 'none');
isFirstLoad = true;
getContent().toPage(pageMove);
createPageBGM();
if(pageMove > 0){
prevContent.pageIndex = getPageIndex();
getPrevPageObjectsByPageIndex(pageObjectsData, pageMove - 1);
renderPrevPage();
}
if(pageMove < totalPage - 1){
nextContent.pageIndex = getPageIndex();
getNextPageObjectsByPageIndex(pageObjectsData, pageMove + 1);
renderNextPage();
}
handleSliderBar();
if (dataPageTitle[pageMove]) {
if (dataPageTitle[pageMove] != '') {
document.title = contentName + '_' + dataPageTitle[pageMove] + ' | ' + i18nText('sysAppTitle');
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
} else {
document.title = contentName + ' | ' + i18nText('sysAppTitle');
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
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){
...@@ -2665,8 +2804,14 @@ function setViewportForTouchDevice(maximumScale){ ...@@ -2665,8 +2804,14 @@ function setViewportForTouchDevice(maximumScale){
}; };
//End : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling. //End : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
$("document").ready(function () { $("document").ready(function () {
CONTENTVIEW_FILESYSTEM.initFS(CONTENTVIEW.ready);
});
CONTENTVIEW.ready = function(){
/* check login */ /* check login */
if (!avwCheckLogin(ScreenIds.Login)) return; if (!avwCheckLogin(ScreenIds.Login)) return;
// Set event to prevent leave // Set event to prevent leave
...@@ -2680,45 +2825,9 @@ $("document").ready(function () { ...@@ -2680,45 +2825,9 @@ $("document").ready(function () {
{ contentId: contentID, sid: ClientData.userInfo_sid(), getType: 1 }, { contentId: contentID, sid: ClientData.userInfo_sid(), getType: 1 },
function (data) { function (data) {
contentType = data.contentData.contentType; //console.log("json.txt:" + window.JSON.stringify(data) );
CONTENTVIEW_FILESYSTEM.checkUpdate(contentID, data, CONTENTVIEW.webGetContentApi_funcOk);
if (avwUserEnvObj.os == 'ipad') {
//Start : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
setViewportForTouchDevice();
//End : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
if (ClientData.IsRefresh() == true) {
//Check if is pdf content
if(isMediaAndHTMLContent()){
initPageMediaAndHtmlType();
//START TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
document.title = data.contentData.contentName + ' | ' + i18nText('sysAppTitle');
//END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
}
else{
initPage();
}
} else {
$('body, html').hide();
ClientData.IsRefresh(true);
location.reload();
}
}
else {
//Check if is pdf content
if(isMediaAndHTMLContent()){
initPageMediaAndHtmlType();
//START TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
document.title = data.contentData.contentName + ' | ' + i18nText('sysAppTitle');
//END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
}
else{
initPage();
}
}
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
...@@ -2739,9 +2848,56 @@ $("document").ready(function () { ...@@ -2739,9 +2848,56 @@ $("document").ready(function () {
} }
} }
); );
//END TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent };
//End Function : No.12
}); CONTENTVIEW.webGetContentApi_funcOk = function(data){
console.log("CONTENTVIEW.webGetContentApi_funcOk:" + data.contentData.contentType);
contentType = data.contentData.contentType;
if (avwUserEnvObj.os == 'ipad') {
//Start : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
setViewportForTouchDevice();
//End : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
if (ClientData.IsRefresh() == true) {
//Check if is pdf content
if(isMediaAndHTMLContent()){
initPageMediaAndHtmlType();
//START TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
document.title = data.contentData.contentName + ' | ' + i18nText('sysAppTitle');
//END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
}
else{
initPage();
}
} else {
$('body, html').hide();
ClientData.IsRefresh(true);
location.reload();
}
}
else {
//Check if is pdf content
if(isMediaAndHTMLContent()){
initPageMediaAndHtmlType();
//START TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
document.title = data.contentData.contentName + ' | ' + i18nText('sysAppTitle');
//END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
}
else{
console.log("CONTENTVIEW.webGetContentApi_funcOk:initPage");
initPage();
}
}
};
/* ========================================================================================================== */ /* ========================================================================================================== */
......
...@@ -12,24 +12,74 @@ function abapi(name, param, method, callback) { ...@@ -12,24 +12,74 @@ 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(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
pageImages = data; //通常
webGetContentData(); avwGrabContentPageImage(
getSearchDataFromJson(); ClientData.userInfo_accountPath(),
getJsonDataPageTitle(); { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
getJsonDataType4(); function (data) {
getJsonDataType5(); pageImages = data;
getDataJsonFile(); webGetContentData();
//webGetPageImageContentSize(); getSearchDataFromJson();
webGetContentPageSize(); getJsonDataPageTitle();
getJsonDataType4();
}, getJsonDataType5();
function (xmlHttpRequest, txtStatus, errorThrown) { getDataJsonFile();
showErrorScreen(); webGetContentPageSize();
}); },
}; function (xmlHttpRequest, txtStatus, errorThrown) {
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,33 +373,90 @@ function firstPage_click() { ...@@ -373,33 +373,90 @@ 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(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
pageImages = data; avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
/* get page Objects */ { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
getPageObjectsByPageIndex(pageObjectsData, 0); function (data) {
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); pageImages = data;
/* get page Objects */
$('#divImageLoading').css('display', 'none'); getPageObjectsByPageIndex(pageObjectsData, 0);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
//START TRB00097
//userScale = 1; $('#divImageLoading').css('display', 'none');
//changeScale(userScale); //userScale = 1;
//END TRB00097 //changeScale(userScale);
checkDisableButtonZoom(); checkDisableButtonZoom();
var tran = new Transition(); var tran = new Transition();
tran.flipToPage(0); tran.flipToPage(0);
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
showErrorScreen(); 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 */
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);
};
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);
checkDisableButtonZoom();
var tran = new Transition();
tran.flipToPage(0);
},
function (xmlHttpRequest, txtStatus, errorThrown) {
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,25 +503,86 @@ function lastPage_click() { ...@@ -446,25 +503,86 @@ 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(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
pageImages = data; avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
/* get page Objects */ { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: totalPage },
getPageObjectsByPageIndex(pageObjectsData, totalPage - 1); function (data) {
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects); pageImages = data;
/* get page Objects */
$('#divImageLoading').css('display', 'none'); getPageObjectsByPageIndex(pageObjectsData, totalPage - 1);
getContent().setPageImages(totalPage, pageImages).setPageObjects(pageObjects);
checkDisableButtonZoom();
var tran = new Transition(); $('#divImageLoading').css('display', 'none');
tran.flipToPage(totalPage - 1);
checkDisableButtonZoom();
}, var tran = new Transition();
function (xmlHttpRequest, txtStatus, errorThrown) { tran.flipToPage(totalPage - 1);
showErrorScreen();
}); },
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 */
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();
}
);
}
);
}
} }
//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(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
nextPageImage = data; avwGrabContentPageImage(
ClientData.userInfo_accountPath(),
nextContent.setPageImages(totalPage, nextPageImage) { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
.setPageObjects(nextPageObjects) function (data) {
.nextPage(); nextPageImage = data;
nextContent.setPageImages(totalPage, nextPageImage)
}, .setPageObjects(nextPageObjects)
function (xmlHttpRequest, txtStatus, errorThrown) { .nextPage();
showErrorScreen(); },
}); 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)
.setPageObjects(nextPageObjects)
.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) {
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){
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo }, //ファイルシステムが有効であればキャッシュ確認
function (data) { if( CONTENTVIEW_FILESYSTEM.fs == null ){
prevPageImage = data;
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
prevContent.setPageImages(totalPage, prevPageImage) { contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: pageNo },
.setPageObjects(prevPageObjects) function (data) {
.previousPage(); prevPageImage = data;
prevContent.setPageImages(totalPage, prevPageImage)
}, .setPageObjects(prevPageObjects)
function (xmlHttpRequest, txtStatus, errorThrown) { .previousPage();
showErrorScreen(); },
}); 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)
.setPageObjects(prevPageObjects)
.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) {
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,12 +47,19 @@ var home_isMove = false; ...@@ -53,12 +47,19 @@ var home_isMove = false;
var isShowBookShelf = null; var isShowBookShelf = null;
var showNextRecordClickNumber = 1; var showNextRecordClickNumber = 1;
//名前空間用のオブジェクトを用意する
var home = {};
//==========================================================
$(document).ready(function () { $(document).ready(function () {
HOME.ready();
});
//==========================================================
//$(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