Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
3853437e
Commit
3853437e
authored
Dec 10, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
パフォーマンス対応
スクリーンロックでログアウト対応 ブラウザ閉じるで閲覧ログ送信対応
parent
46d4e2b7
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
608 additions
and
125 deletions
+608
-125
abvw/common/js/avweb.js
+19
-1
abvw/common/js/common.js
+35
-9
abvw/common/js/screenLock.js
+20
-0
abvw/contentview.html
+1
-0
abvw/home.html
+1
-0
abvw/js/contentview.js
+209
-53
abvw/js/contentview_CallApi.js
+54
-4
abvw/js/contentview_Events.js
+125
-7
abvw/js/contentview_GetData.js
+109
-20
abvw/js/contentview_InitObjects.js
+6
-10
abvw/js/header.js
+7
-5
abvw/js/home.js
+22
-16
No files found.
abvw/common/js/avweb.js
View file @
3853437e
...
...
@@ -4,6 +4,9 @@
* Copyright (C) Agentec Co, Ltd. All rights reserved.
*/
//名前空間用のオブジェクトを用意する
var
AVWEB
=
{};
/*
* User Environment Check Class
*/
...
...
@@ -625,6 +628,12 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
*/
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
)
{
success
(
src
);
}
...
...
@@ -791,7 +800,7 @@ function showSystemError( textId ) {
text
:
errMes
,
close
:
function
()
{
//ログアウト時と同じ後始末処理をしてログイン画面に戻す
if
(
!
webLogoutEvent
()
){
if
(
!
COMMON
.
webLogoutEvent
()
){
//ログアウト出来なかった
SessionStorageUtils
.
clear
();
avwUserSetting
().
remove
(
Keys
.
userInfo_sid
);
...
...
@@ -834,6 +843,13 @@ function avwClearError() {
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */
function
avwSetLogoutNortice
()
{
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 によりメッセージが出力されない
var
message
=
i18nText
(
'sysInfoWithoutLogout'
);
...
...
@@ -842,6 +858,7 @@ function avwSetLogoutNortice() {
e
.
returnValue
=
message
;
}
return
message
;
}
};
};
/* 警告メッセージを出力しないでページ遷移を行う関数 */
...
...
@@ -867,3 +884,4 @@ function getApiUrl(accountPath) {
return
apiUrl
;
};
abvw/common/js/common.js
View file @
3853437e
/// <reference path="avweb.js" />
/// <reference path="screenLock.js" />
/// <reference path="common.js" />
/// <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" />
//名前空間用のオブジェクトを用意する
var
COMMON
=
{};
// =============================================================================================
// Constants [start]
...
...
@@ -2922,3 +2916,35 @@ function isIE10() {
*/
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
;
};
abvw/common/js/screenLock.js
View file @
3853437e
...
...
@@ -156,6 +156,26 @@ removeLockState();
/* show lock screen */
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
var
tags
=
'<div id="'
+
elmId
+
'" class="screenLock">'
+
'<div style="display:table; width:100%; height:100%;">'
+
...
...
abvw/contentview.html
View file @
3853437e
...
...
@@ -49,6 +49,7 @@
<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_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>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/reset.css?#UPDATEID#"
/>
...
...
abvw/home.html
View file @
3853437e
...
...
@@ -45,6 +45,7 @@
<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/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/home.js?#UPDATEID#"
></script>
<script
type=
"text/javascript"
src=
"./js/header.js?#UPDATEID#"
></script>
...
...
abvw/js/contentview.js
View file @
3853437e
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <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" />
//名前空間用のオブジェクトを用意する
var
CONTENTVIEW
=
{};
/* change size */
function
sizingScreen
()
{
...
...
@@ -1088,18 +1075,66 @@ function changePage(page_index) {
clearCanvas
(
document
.
getElementById
(
"offscreen"
));
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
:
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
();
});
}
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
);
//$('#divImageLoading').css('display', 'none');
};
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
);
...
...
@@ -1108,6 +1143,11 @@ function changePage(page_index) {
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
}
);
}
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
...
...
@@ -2020,11 +2060,15 @@ function changePageWithoutSlide(pageMove) {
clearCanvas
(
document
.
getElementById
(
"offscreen"
));
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
:
pageMove
+
1
},
function
(
data
)
{
pageImages
=
data
;
/* get page Objects */
getPageObjectsByPageIndex
(
pageObjectsData
,
pageMove
);
getContent
().
setPageImages
(
totalPage
,
pageImages
).
setPageObjects
(
pageObjects
);
...
...
@@ -2032,34 +2076,121 @@ function changePageWithoutSlide(pageMove) {
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
isFirstLoad
=
true
;
// screenFit();
getContent
().
toPage
(
pageMove
);
//START : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
createPageBGM
();
//END : TRB00028 - Editor: Long - Date: 09/10/2013 - Summary : Fix For Page BGM
//Start FUnciton: No.4 - Editor : Long - Date : 08/12/2013 - Summary : Handle jump from bookmark page
if
(
pageMove
>
0
){
//START TRB00056 - Editor: Long - Date: 09/19/2013 - Summary :
prevContent
.
pageIndex
=
getPageIndex
();
//END TRB00056 - Editor: Long - Date: 09/19/2013 - Summary :
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
();
}
);
}
else
{
// ファイル取得
var
pageNoTmp
=
pageMove
+
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
,
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
){
//START TRB00056
nextContent
.
pageIndex
=
getPageIndex
();
//END TRB00056
getNextPageObjectsByPageIndex
(
pageObjectsData
,
pageMove
+
1
);
renderNextPage
();
}
//End Function : No.4 - Editor : Long - Date: 08/12/2013 - Summary : Handle jump form bookmark page
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
();
}
/* handle slider bar */
handleSliderBar
();
if
(
dataPageTitle
[
pageMove
])
{
...
...
@@ -2075,7 +2206,15 @@ function changePageWithoutSlide(pageMove) {
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
}
);
}
);
}
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
...
...
@@ -2667,6 +2806,12 @@ function setViewportForTouchDevice(maximumScale){
$
(
"document"
).
ready
(
function
()
{
CONTENTVIEW_FILESYSTEM
.
initFS
(
CONTENTVIEW
.
ready
);
});
CONTENTVIEW
.
ready
=
function
(){
/* check login */
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
))
return
;
// Set event to prevent leave
...
...
@@ -2680,6 +2825,35 @@ $("document").ready(function () {
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
getType
:
1
},
function
(
data
)
{
//console.log("json.txt:" + window.JSON.stringify(data) );
CONTENTVIEW_FILESYSTEM
.
checkUpdate
(
contentID
,
data
,
CONTENTVIEW
.
webGetContentApi_funcOk
);
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
//ページジャンプ設定をクリア
ClientData
.
JumpQueue
([]);
ClientData
.
IsJumpBack
(
false
);
if
(
xmlHttpRequest
.
status
==
404
)
{
showAlertScreen
(
i18nText
(
'msgContentNotExist'
),
ScreenIds
.
Home
);
}
else
if
(
xmlHttpRequest
.
status
==
403
)
{
//認証エラー
showAlertScreen
(
i18nText
(
'sysErrorCallApi02'
),
ScreenIds
.
Home
);
}
else
{
// Show system error
showSystemError
();
}
}
);
};
CONTENTVIEW
.
webGetContentApi_funcOk
=
function
(
data
){
console
.
log
(
"CONTENTVIEW.webGetContentApi_funcOk:"
+
data
.
contentData
.
contentType
);
contentType
=
data
.
contentData
.
contentType
;
if
(
avwUserEnvObj
.
os
==
'ipad'
)
{
...
...
@@ -2716,32 +2890,14 @@ $("document").ready(function () {
//END TRB00059 - EDITOR: Long - Date : 09/19/2013 - Summary : Add title for media and html type
}
else
{
initPage
();
}
}
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
//ページジャンプ設定をクリア
ClientData
.
JumpQueue
([]);
ClientData
.
IsJumpBack
(
false
);
console
.
log
(
"CONTENTVIEW.webGetContentApi_funcOk:initPage"
);
if
(
xmlHttpRequest
.
status
==
404
)
{
showAlertScreen
(
i18nText
(
'msgContentNotExist'
),
ScreenIds
.
Home
);
}
else
if
(
xmlHttpRequest
.
status
==
403
)
{
//認証エラー
showAlertScreen
(
i18nText
(
'sysErrorCallApi02'
),
ScreenIds
.
Home
);
}
else
{
// Show system error
showSystemError
();
initPage
();
}
}
);
//END TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
//End Function : No.12
});
};
/* ========================================================================================================== */
...
...
abvw/js/contentview_CallApi.js
View file @
3853437e
...
...
@@ -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
/* get Json stored content info */
function
getJsonContentInfo
()
{
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
//ファイルシステムが有効であればキャッシュ確認
if
(
CONTENTVIEW_FILESYSTEM
.
fs
==
null
){
//通常
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
1
},
function
(
data
)
{
pageImages
=
data
;
...
...
@@ -22,14 +27,59 @@ function getJsonContentInfo() {
getJsonDataType4
();
getJsonDataType5
();
getDataJsonFile
();
//webGetPageImageContentSize();
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
function
webGetPageImageContentSize
()
{
...
...
abvw/js/contentview_Events.js
View file @
3853437e
...
...
@@ -373,22 +373,76 @@ function firstPage_click() {
clearCanvas
(
document
.
getElementById
(
"offscreen"
));
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
},
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
();
}
);
}
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'
);
//START TRB00097
//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);
//END TRB00097
checkDisableButtonZoom
();
var
tran
=
new
Transition
();
tran
.
flipToPage
(
0
);
...
...
@@ -396,10 +450,13 @@ function firstPage_click() {
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
}
);
}
);
}
//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
);
getContent
().
setPageImages
(
totalPage
,
pageImages
).
setPageObjects
(
pageObjects
);
...
...
@@ -446,11 +503,65 @@ function lastPage_click() {
//pageImages = getURLPageImage("webContentPageImage") + "?contentId=" + contentID + "&sid=" + ClientData.userInfo_sid() + "&pageNo=" + (totalPage - 1);
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
},
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
();
}
);
}
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
);
...
...
@@ -464,7 +575,14 @@ function lastPage_click() {
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
}
);
}
);
}
}
//START : TRB00032 - Editor : Long - Date: 09/10/2013 - Summary : type none process
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
...
...
abvw/js/contentview_GetData.js
View file @
3853437e
...
...
@@ -9,24 +9,24 @@
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get Json stored content info */
function
getJsonContentInfo
()
{
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
1
},
function
(
data
)
{
pageImages
=
data
;
webGetContentData
();
getSearchDataFromJson
();
getJsonDataPageTitle
();
getJsonDataType4
();
getJsonDataType5
();
getDataJsonFile
();
//webGetPageImageContentSize();
webGetContentPageSize
();
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
showErrorScreen
();
});
};
//
function getJsonContentInfo() {
//
avwGrabContentPageImage(ClientData.userInfo_accountPath(),
//
{ contentId: contentID, sid: ClientData.userInfo_sid(), pageNo: 1 },
//
function (data) {
//
pageImages = data;
//
webGetContentData();
//
getSearchDataFromJson();
//
getJsonDataPageTitle();
//
getJsonDataType4();
//
getJsonDataType5();
//
getDataJsonFile();
//
//webGetPageImageContentSize();
//
webGetContentPageSize();
//
},
//
function (xmlHttpRequest, txtStatus, errorThrown) {
//
showErrorScreen();
//
});
//
};
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
...
...
@@ -1238,19 +1238,65 @@ function renderNextPage(){
//Get next page background image
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
},
function
(
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
)
.
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
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
...
...
@@ -1271,19 +1317,62 @@ function renderPrevPage(){
//Get prev page background image
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
//ファイルシステムが有効であればキャッシュ確認
if
(
CONTENTVIEW_FILESYSTEM
.
fs
==
null
){
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
();
});
}
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
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
...
...
abvw/js/contentview_InitObjects.js
View file @
3853437e
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="contentview_VarDef.js" />
/// <reference path="contentview_CallApi.js" />
/// <reference path="contentview_GetData.js" />
//名前空間用のオブジェクトを用意する
var
CONTENTVIEW_INITOBJECTS
=
{};
//CONTENTVIEW_INITOBJECTS.initPage = function
/* init Image memo */
function
initImageMemo
()
{
...
...
@@ -132,6 +126,8 @@ function initPage() {
//abe
//alert("initPage");
console
.
log
(
"initPage"
);
//START : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
setLoadingSize
();
//END : TRB00034 - DATE : 09/11/2013 - Editor : Long - Summary : Fix for center loading image
...
...
@@ -168,7 +164,6 @@ function initPage() {
}
else
{
getJsonContentInfo
();
//Start Function: No.4 - Editor : Long - Date: 08/20/2013
getPageTransitionConfig
();
//End Function : No.4 - Editor : Long - Date : 08/20/2013
...
...
@@ -283,6 +278,7 @@ function initPage() {
/*Init Page */
nAjaxLoad
++
;
console
.
log
(
"nAjaxLoad:"
+
nAjaxLoad
);
if
(
nAjaxLoad
==
8
)
{
/* handle from bookmark page */
...
...
abvw/js/header.js
View file @
3853437e
...
...
@@ -403,18 +403,18 @@ function logoutFunction() {
else
if
(
ClientData
.
userOpt_logoutMode
()
==
1
)
{
// Logout without backup
// Do nothing
//Logout
webLogoutEvent
();
COMMON
.
webLogoutEvent
();
}
}
}
}
// In case: user_data_backup != "Y" -> No backup, logout
else
{
webLogoutEvent
();
COMMON
.
webLogoutEvent
();
}
}
else
{
webLogoutEvent
();
COMMON
.
webLogoutEvent
();
}
};
...
...
@@ -423,6 +423,7 @@ function historyClickFunction(){
avwScreenMove
(
ScreenIds
.
History
);
};
/*
//Web Logout Event
function webLogoutEvent(){
...
...
@@ -453,6 +454,7 @@ function webLogoutEvent(){
return isExisted;
};
*/
//Logout Without Backup function
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
//window.location = ScreenIds.Login;
webLogoutEvent
();
COMMON
.
webLogoutEvent
();
};
//Logout With Backup function
...
...
@@ -673,7 +675,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
else
{
if
(
isLogout
)
{
webLogoutEvent
();
COMMON
.
webLogoutEvent
();
}
}
};
...
...
abvw/js/home.js
View file @
3853437e
/// <reference path="../common/js/avweb.js" />
/// <reference path="../common/js/screenLock.js" />
/// <reference path="../common/js/common.js" />
/// <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" />
//名前空間用のオブジェクトを用意する
var
HOME
=
{};
//Start Declare Variables
//----Constant-----------//
...
...
@@ -53,11 +47,18 @@ var home_isMove = false;
var
isShowBookShelf
=
null
;
var
showNextRecordClickNumber
=
1
;
//名前空間用のオブジェクトを用意する
var
home
=
{};
$
(
document
).
ready
(
function
()
{
HOME
.
ready
();
});
//==========================================================
$
(
document
).
ready
(
function
()
{
//$(document).ready(function () {
HOME
.
ready
=
function
(){
console
.
log
(
"HOME.ready!"
);
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
))
{
return
;
...
...
@@ -231,8 +232,8 @@ $(document).ready(function () {
if
(
/msie 9.0/
.
test
(
ua
)
&&
/windows nt 6.1/
.
test
(
ua
)
&&
!
/tablet/
.
test
(
ua
))
{
$
(
'.tab_bg_color'
).
css
({
"overflow-x"
:
"scroll"
});
}
});
};
//
});
//日比谷カスタム ここから
function
dspHibiyaClickFunction
(){
...
...
@@ -1216,8 +1217,7 @@ function getDataJsonFileGroup() {
for
(
var
nIndex
=
0
;
nIndex
<
tree2
.
ExpandNodes
.
length
;
nIndex
++
)
{
if
(
$
(
"#"
+
tree2
.
ExpandNodes
[
nIndex
]).
parent
())
{
console
.
log
(
"tree2.ExpandNodes"
);
//console.log("tree2.ExpandNodes");
var
objParent
=
$
(
"#"
+
tree2
.
ExpandNodes
[
nIndex
]).
parent
();
var
objChild
=
objParent
.
children
()[
0
];
if
(
objChild
)
{
...
...
@@ -2290,12 +2290,17 @@ function checkUserHasReadContent(contId, resourceVer, metaVer) {
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
]);
imgIconNew
.
onload
=
function
()
{
console
.
log
(
"imgIconNew.onload..1"
);
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconNew
.
src
=
DEFAULT_IMG_CONTENT_NEW
;
};
//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) {
});
};
imgIconNew
.
src
=
DEFAULT_IMG_CONTENT_NEW
;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment