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
84369192
Commit
84369192
authored
Apr 03, 2015
by
vietdo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#15763 プッシュ通知が無効ならヘッダの「通知」ボタンを非表示にする
parent
0587e6fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
296 additions
and
261 deletions
+296
-261
abvw/common/js/common.js
+116
-96
abvw/js/home.js
+106
-97
abvw/js/login.js
+74
-68
No files found.
abvw/common/js/common.js
View file @
84369192
...
...
@@ -63,7 +63,7 @@ COMMON.Consts = {
// Lock screen timer
ConstLockScreenTime
:
1800000
};
/*Content Type Keys*/
...
...
@@ -217,7 +217,10 @@ COMMON.Keys = {
serviceOpt_reader_readinglog_object
:
'reader_readinglog_object'
,
// Session :事業者オプション(serviceOpt)_コンテンツ共有モード:Interger(0:なし , 1:ABook, 2:getits)
serviceOpt_content_share
:
'content_share'
,
// Session :事業者オプション(serviceOpt)_公開時プッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_apns
:
'apns'
,
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_usable_push_message
:
'usable_push_message'
,
// Session :共通(common)_コンテンツID:Integer
common_contentId
:
'common_contentId'
,
// Local :共通(common)_コンテンツID:Integer
...
...
@@ -350,22 +353,22 @@ COMMON.Keys = {
userOpt_pageTransition
:
'userOpt_pageTransition'
,
// Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod
:
'userOpt_pageTransitionPeriod'
,
isGetitsMode
:
'isGetitsMode'
,
isStreamingMode
:
'isStreamingMode'
,
conf_apiUrl
:
'conf_apiUrl'
,
conf_apiLoginUrl
:
'conf_apiLoginUrl'
,
conf_apiResourceDlUrl
:
'conf_apiResourceDlUrl'
,
storeUrl
:
'storeUrl'
,
latitude
:
'latitude'
,
longitude
:
'longitude'
,
// Local:セッションID:String
userInfo_sid_bak
:
'sid_bak'
/* -------------------------------------------------------------------------------- */
};
// Entity for Bookmark
...
...
@@ -376,7 +379,7 @@ function BookMarkEntity() {
this
.
contentTitle
=
""
;
this
.
contentTitleKana
=
""
;
this
.
registerDate
=
new
Date
();
//Add for phase2
this
.
bookmarkid
=
""
;
};
...
...
@@ -388,7 +391,7 @@ function MemoEntity() {
this
.
posX
=
-
1
;
this
.
posY
=
-
1
;
this
.
Text
=
""
;
//Add for phase2
this
.
memoid
=
""
;
this
.
registerDate
=
new
Date
();
...
...
@@ -399,7 +402,7 @@ function MarkingEntity() {
this
.
contentid
=
""
;
this
.
pageNo
=
-
1
;
this
.
content
=
""
;
//Add for phase2
this
.
markingid
=
""
;
this
.
registerDate
=
new
Date
();
...
...
@@ -451,7 +454,7 @@ COMMON.getDataMemo = function(jsonString) {
var
memoDataFromServer
=
jsonString
.
data
;
var
arrLocalMemo
=
ClientData
.
MemoData
();
for
(
var
i
=
0
;
i
<
memoDataFromServer
.
length
;
i
++
)
{
var
objServerMemo
=
new
MemoEntity
();
objServerMemo
.
contentid
=
memoDataFromServer
[
i
].
contentid
;
...
...
@@ -554,8 +557,8 @@ If has any param (args.length > 0) -> setter
If has not param (args.length = 0) -> getter
. Get from session:
+ if it existed and key existed in localstorage -> return result
+ else:
* set value from local to sessionstorage -> return value of sessionstorage if value is not empty,
+ else:
* set value from local to sessionstorage -> return value of sessionstorage if value is not empty,
otherwise, return default result.
*/
...
...
@@ -635,7 +638,7 @@ var ClientData = {
}
},
// Local
// Local
JumpQueue
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
JumpQueue
,
[]);
...
...
@@ -1040,7 +1043,7 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
memo_pageNo
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_マーキング:Interger
userOpt_bkMakingFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1050,7 +1053,7 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_bkMakingFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_メモ:Interger
userOpt_bkMemoFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1060,7 +1063,7 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_bkMemoFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_しおり:Interger
userOpt_bkShioriFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1070,7 +1073,7 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_bkShioriFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1080,7 +1083,7 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_pageTransition
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1090,7 +1093,7 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
COMMON
.
Keys
.
userOpt_pageTransitionPeriod
,
undefined
);
}
},
// Session
memo_copyText
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1223,7 +1226,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
serviceOpt_usable_readinglog_object
);
}
},
// Session :事業者オプション(serviceOpt)_getits_GPS使用可:Char(Y:可能, N:不可)
serviceOpt_reader_usable_readinglog_gps
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1240,7 +1243,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
serviceOpt_reader_readinglog_object
);
}
},
// Session :事業者オプション(serviceOpt)_コンテンツ共有モード:Interger(0:なし , 1:ABook, 2:getits)
serviceOpt_content_share
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1249,8 +1252,25 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
serviceOpt_content_share
);
}
},
// Session :事業者オプション(serviceOpt)_公開時プッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_apns
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
serviceOpt_apns
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
serviceOpt_apns
);
}
},
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
serviceOpt_usable_push_message
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
serviceOpt_usable_push_message
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
serviceOpt_usable_push_message
);
}
},
// Session :事業者オプション(serviceOpt)_カタログエディション:Char(Y:可能, N:不可)
serviceOpt_catalog_edition
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1622,7 +1642,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
serviceOpt_web_screen_lock_wait
);
}
},
isGetitsMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
isGetitsMode
,
JSON
.
stringify
(
data
));
...
...
@@ -1637,7 +1657,7 @@ var ClientData = {
return
false
;
}
},
isStreamingMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
isStreamingMode
,
JSON
.
stringify
(
data
));
...
...
@@ -1652,7 +1672,7 @@ var ClientData = {
return
false
;
}
},
conf_apiUrl
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
conf_apiUrl
,
data
);
...
...
@@ -1674,7 +1694,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
conf_apiResourceDlUrl
);
}
},
storeUrl
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
storeUrl
,
data
);
...
...
@@ -1682,7 +1702,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
storeUrl
);
}
},
latitude
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
latitude
,
data
);
...
...
@@ -1690,7 +1710,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
latitude
);
}
},
longitude
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
COMMON
.
Keys
.
longitude
,
data
);
...
...
@@ -1698,7 +1718,7 @@ var ClientData = {
return
SessionStorageUtils
.
get
(
COMMON
.
Keys
.
longitude
);
}
},
// Local: セッションIDのバックアップ
userInfo_sid_local_bak
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -1707,8 +1727,8 @@ var ClientData = {
return
AVWEB
.
avwUserSetting
().
get
(
COMMON
.
Keys
.
userInfo_sid_bak
);
}
}
};
// -------------------------------------------------
...
...
@@ -2138,13 +2158,13 @@ COMMON.getBase64Image = function(imgSource) {
// get time wait lockscreen
COMMON
.
getTimeWaitLockScreen
=
function
()
{
var
timeWaitLockScreen
=
-
1
;
if
(
ClientData
.
serviceOpt_web_screen_lock
()
==
"Y"
)
if
(
ClientData
.
serviceOpt_web_screen_lock
()
==
"Y"
)
{
var
sysSettings
=
AVWEB
.
avwSysSetting
();
if
(
isNaN
(
ClientData
.
serviceOpt_web_screen_lock_wait
()))
{
timeWaitLockScreen
=
sysSettings
.
screenlockTimeDefault
*
60000
;
}
else
else
{
var
temp
=
ClientData
.
serviceOpt_web_screen_lock_wait
();
timeWaitLockScreen
=
temp
*
60000
;
// time unit is minute
...
...
@@ -2155,7 +2175,7 @@ COMMON.getTimeWaitLockScreen = function() {
timeWaitLockScreen
=
-
1
;
}
}
}
}
return
timeWaitLockScreen
;
};
...
...
@@ -2175,8 +2195,8 @@ COMMON.LockScreen = function() {
if
(
ClientData
.
isStreamingMode
()
==
true
){
return
;
}
var
timeWaitLockScreen
=
COMMON
.
getTimeWaitLockScreen
();
var
timeWaitLockScreen
=
COMMON
.
getTimeWaitLockScreen
();
if
(
timeWaitLockScreen
>
0
)
{
//var message = I18N.i18nText("sysInfoScrLock01");
SCREENLOCK
.
screenLock
({
...
...
@@ -2194,7 +2214,7 @@ COMMON.LockScreen = function() {
// The function will be called at the time: loading
$
(
function
()
{
// Init setting values
// Init setting values
if
(
AVWEB
.
avwUserSession
())
{
// Logged
// View mode default
...
...
@@ -2260,7 +2280,7 @@ $(function () {
});
// Unlock the locked screen by inputing password on screen to check authentication
COMMON
.
unlockFunction
=
function
(
inputPass
)
{
COMMON
.
unlockFunction
=
function
(
inputPass
)
{
var
forceUnlockFunc
=
arguments
[
1
];
// added secret arguments : forceUnlockFunction
var
result
=
false
;
var
params
=
{
...
...
@@ -2281,7 +2301,7 @@ COMMON.unlockFunction = function(inputPass) {
ClientData
.
userInfo_sid_local
(
data
.
sid
);
//バックアップにも保持
ClientData
.
userInfo_sid_local_bak
(
data
.
sid
);
result
=
true
;
//forceUnlockFunc();
...
...
@@ -2309,7 +2329,7 @@ COMMON.unlockFunction = function(inputPass) {
}
);
if
(
result
==
true
)
{
//ビューア画面ならイベントのアンロック
if
(
$
(
"#viewer"
).
length
)
{
...
...
@@ -2336,7 +2356,7 @@ COMMON.SetStartLog = function(strContentId) {
for
(
var
nIndex
=
0
;
nIndex
<
arrContentLogs
.
length
;
nIndex
++
)
{
if
(
arrContentLogs
[
nIndex
].
contentid
==
strContentId
)
{
if
(
!
ClientData
.
isStreamingMode
()){
arrContentLogs
[
nIndex
].
readingStartDate
=
new
Date
();
arrContentLogs
[
nIndex
].
readingEndDate
=
(
new
Date
()).
addSeconds
(
1
);
...
...
@@ -2353,13 +2373,13 @@ COMMON.SetStartLog = function(strContentId) {
var
log
=
new
LogEntity
();
log
.
readingStartDate
=
curr
;
log
.
contentid
=
strContentId
;
// Set 1 second
curr1
.
setSeconds
(
curr
.
getSeconds
()
+
1
);
log
.
readingEndDate
=
curr1
;
// Reading time
log
.
readingTime
=
log
.
readingEndDate
.
subtractBySeconds
(
log
.
readingStartDate
);
//デバイスタイプ判定
var
deviceType
=
4
;
if
(
ClientData
.
isStreamingMode
()){
...
...
@@ -2372,20 +2392,20 @@ COMMON.SetStartLog = function(strContentId) {
}
}
log
.
deviceTypeId
=
deviceType
;
//GPS
log
.
latitude
=
ClientData
.
latitude
();
log
.
longitude
=
ClientData
.
longitude
();
//PageLog 1ページ目セット(1レコードは必須)
var
pageLog
=
new
PageLogEntity
();
pageLog
.
contentid
=
strContentId
;
log
.
pageLogArray
.
push
(
pageLog
);
// Add to storage
arrContentLogs
.
push
(
log
);
}
// Set back to storage
ClientData
.
ContentLogData
(
arrContentLogs
);
};
...
...
@@ -2407,7 +2427,7 @@ COMMON.SetGpsLog = function(strContentId) {
}
// Set back to storage
ClientData
.
ContentLogData
(
arrContentLogs
);
};
...
...
@@ -2416,17 +2436,17 @@ COMMON.SetEndLog = function(strContentId) {
//var log = new LogEntity(); //無駄なのでコメント
var
arrContentLogs
=
ClientData
.
ContentLogData
();
for
(
var
nIndex
=
0
;
nIndex
<
arrContentLogs
.
length
;
nIndex
++
)
{
if
(
arrContentLogs
[
nIndex
].
contentid
==
strContentId
)
{
// Found content -> set ending date
var
dateEnd
=
new
Date
();
var
dateStart
=
new
Date
(
arrContentLogs
[
nIndex
].
readingStartDate
);
arrContentLogs
[
nIndex
].
readingEndDate
=
dateEnd
;
// Calculate to seconds
arrContentLogs
[
nIndex
].
readingTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
}
}
ClientData
.
ContentLogData
(
arrContentLogs
);
...
...
@@ -2434,18 +2454,18 @@ COMMON.SetEndLog = function(strContentId) {
// 1ページ分のページ閲覧ログを作成
COMMON
.
SetPageLog
=
function
(
strContentId
,
strPageNo
){
var
arrContentLogs
=
ClientData
.
ContentLogData
();
for
(
var
nIndex
=
0
;
nIndex
<
arrContentLogs
.
length
;
nIndex
++
)
{
if
(
arrContentLogs
[
nIndex
].
contentid
==
strContentId
)
{
//PageLog追加
var
pageLog
=
new
PageLogEntity
();
pageLog
.
contentid
=
strContentId
;
pageLog
.
pageNo
=
strPageNo
+
1
;
//0始まりのページ番号
arrContentLogs
[
nIndex
].
pageLogArray
.
push
(
pageLog
);
}
}
ClientData
.
ContentLogData
(
arrContentLogs
);
...
...
@@ -2454,19 +2474,19 @@ COMMON.SetPageLog = function(strContentId, strPageNo){
if
(
ClientData
.
isStreamingMode
()){
CONTENTVIEW_STREAMING
.
movePage
(
strPageNo
+
1
);
}
};
// 1アクションのオブジェクトログを作成
COMMON
.
SetObjectLog
=
function
(
strContentId
,
objectLog
){
var
arrContentLogs
=
ClientData
.
ContentLogData
();
for
(
var
nIndex
=
0
;
nIndex
<
arrContentLogs
.
length
;
nIndex
++
)
{
if
(
arrContentLogs
[
nIndex
].
contentid
==
strContentId
)
{
//ObjectLog追加
arrContentLogs
[
nIndex
].
objectLogArray
.
push
(
objectLog
);
}
}
ClientData
.
ContentLogData
(
arrContentLogs
);
...
...
@@ -2475,9 +2495,9 @@ COMMON.SetObjectLog = function(strContentId, objectLog){
// 前回の1アクションのオブジェクトログの利用時間を設定
COMMON
.
SetObjectLogActionTime
=
function
(
strContentId
,
objectId
,
actionTime
){
var
arrContentLogs
=
ClientData
.
ContentLogData
();
for
(
var
nIndex
=
0
;
nIndex
<
arrContentLogs
.
length
;
nIndex
++
)
{
if
(
arrContentLogs
[
nIndex
].
contentid
==
strContentId
)
{
if
(
arrContentLogs
[
nIndex
].
objectLogArray
.
length
>
0
){
...
...
@@ -2506,13 +2526,13 @@ COMMON.RegisterLog = function(is) {
//ページログJSONデータの作成
var
pageLogJson
=
""
;
var
objectLogJson
=
""
;
//biz/adモードで詳細ログY か getitsでgetits詳細ログY の場合
if
((
ClientData
.
isGetitsMode
()
==
false
&&
ClientData
.
serviceOpt_usable_readinglog_object
()
==
'Y'
)
||
(
ClientData
.
isGetitsMode
()
==
true
&&
ClientData
.
serviceOpt_reader_readinglog_object
()
==
'Y'
)){
var
pageLogArray
=
arrContentLogs
[
nIndex
].
pageLogArray
;
//詳細ログオプションが有効ならページ閲覧ログデータ作成
if
(
pageLogArray
!=
null
&&
pageLogArray
.
length
>
0
){
var
lines
=
[];
//終了時間と閲覧時間の設定
var
pageLogStart
;
...
...
@@ -2527,7 +2547,7 @@ COMMON.RegisterLog = function(is) {
pageLogEnd
=
new
Date
(
pageLogArray
[
nIndex2
-
1
].
readingEndDate
);
//時間差から閲覧秒セット
pageLogArray
[
nIndex2
-
1
].
readingTime
=
pageLogEnd
.
subtractBySeconds
(
pageLogStart
);
}
//最終レコードの処理
if
(
pageLogArray
[
pageLogArray
.
length
-
1
].
readingEndDate
==
null
){
...
...
@@ -2537,7 +2557,7 @@ COMMON.RegisterLog = function(is) {
pageLogEnd
=
new
Date
(
pageLogArray
[
pageLogArray
.
length
-
1
].
readingEndDate
);
//時間差から閲覧秒セット
pageLogArray
[
pageLogArray
.
length
-
1
].
readingTime
=
pageLogEnd
.
subtractBySeconds
(
pageLogStart
);
//JSONデータ作成
for
(
var
nIndex2
=
0
;
nIndex2
<
pageLogArray
.
length
;
nIndex2
++
)
{
pageLogStart
=
new
Date
(
pageLogArray
[
nIndex2
].
readingStartDate
);
...
...
@@ -2554,7 +2574,7 @@ COMMON.RegisterLog = function(is) {
}
}
//alert("PageLog Lines:" + JSON.stringify( lines ) );
if
(
lines
.
length
>
0
){
pageLogJson
=
"{ header:[
\"
pageNo
\"
,
\"
readingStartDate
\"
,
\"
readingEndDate
\"
,
\"
readingTime
\"
],lines:"
;
pageLogJson
=
pageLogJson
+
JSON
.
stringify
(
lines
);
...
...
@@ -2562,19 +2582,19 @@ COMMON.RegisterLog = function(is) {
//console.log("JSON:" + pageLogJson);
}
}
var
objectLogArray
=
arrContentLogs
[
nIndex
].
objectLogArray
;
//詳細ログオプションが有効ならページ閲覧ログデータ作成
if
(
objectLogArray
!=
null
&&
objectLogArray
.
length
>
0
){
var
lines
=
[];
var
actionDate
;
//JSONデータ作成
for
(
var
nIndex2
=
0
;
nIndex2
<
objectLogArray
.
length
;
nIndex2
++
)
{
actionDate
=
new
Date
(
objectLogArray
[
nIndex2
].
actionDate
);
var
line
=
[];
if
(
objectLogArray
[
nIndex2
].
objectId
!=
null
){
line
.
push
(
actionDate
.
jpDateTimeString1
());
line
.
push
(
objectLogArray
[
nIndex2
].
pageNo
);
...
...
@@ -2593,14 +2613,14 @@ COMMON.RegisterLog = function(is) {
}
else
{
line
.
push
(
""
);
}
lines
.
push
(
line
);
//console.log("ObjectLog Line:" + JSON.stringify( line ) );
}
}
//console.log("ObjectLog Lines:" + JSON.stringify( lines ) );
if
(
lines
.
length
>
0
){
objectLogJson
=
"{ header:[
\"
actionDate
\"
,
\"
pageNo
\"
,
\"
objectId
\"
,
\"
resourceId
\"
,
\"
mediaType
\"
,
\"
actionType
\"
,
\"
actionValue
\"
,
\"
actionTime
\"
,
\"
locationX
\"
,
\"
locationY
\"
,
\"
locationHeight
\"
,
\"
locationWidth
\"
,
\"
eventType
\"
],"
;
objectLogJson
=
objectLogJson
+
"lines:"
;
...
...
@@ -2608,11 +2628,11 @@ COMMON.RegisterLog = function(is) {
objectLogJson
=
objectLogJson
+
"}"
;
//console.log("JSON:" + objectLogJson);
}
}
}
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
arrContentLogs
[
nIndex
].
contentid
,
...
...
@@ -2711,8 +2731,8 @@ COMMON.WaitProcess = function() {
});
$
(
"#avw-sys-modal-wait-img"
).
center
();
// resize error page
// resize error page
$
(
window
).
resize
(
function
()
{
$
(
'#avw-sys-modal-wait'
).
css
({
'width'
:
$
(
window
).
width
(),
...
...
@@ -2746,7 +2766,7 @@ COMMON.lockLayout = function() {
'background'
:
'#999'
,
'z-index'
:
100
});
// resize error page
// resize error page
$
(
window
).
resize
(
function
()
{
$
(
'#avw-sys-modal'
).
css
({
'width'
:
$
(
window
).
width
(),
...
...
@@ -2828,10 +2848,10 @@ COMMON.convertToDate = function(input) {
var
nSecond
=
0
;
var
strTemp
=
input
;
var
nIndex
;
dateResult
=
new
Date
();
try
{
// Get year
nIndex
=
strTemp
.
indexOf
(
"-"
);
nYear
=
Number
(
strTemp
.
substr
(
0
,
nIndex
));
...
...
@@ -2855,20 +2875,20 @@ COMMON.convertToDate = function(input) {
strTemp
=
strTemp
.
substr
(
nIndex
+
1
);
nIndex
=
strTemp
.
indexOf
(
"."
);
nSecond
=
Number
(
strTemp
.
substr
(
0
,
nIndex
));
dateResult
.
setYear
(
nYear
);
dateResult
.
setMonth
(
nMonth
-
1
);
dateResult
.
setDate
(
nDay
);
dateResult
.
setHours
(
nHour
);
dateResult
.
setMinutes
(
nMinute
);
dateResult
.
setSeconds
(
nSecond
);
}
catch
(
e
)
{
//
}
return
dateResult
;
};
/*
...
...
@@ -2987,7 +3007,7 @@ COMMON.isAnonymousLogin = function() {
/* Check if current browser is IE9 */
COMMON
.
isIE9
=
function
()
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
/msie 9.0/
.
test
(
ua
))
{
return
true
;
}
...
...
@@ -3006,7 +3026,7 @@ COMMON.isIE10 = function() {
//Check content type is pdf content
COMMON
.
isPdfContent
=
function
(
contentType
){
if
(
!
(
contentType
==
COMMON
.
ContentTypeKeys
.
Type_PDF
)){
return
false
;
return
false
;
}
else
{
return
true
;
...
...
@@ -3131,18 +3151,18 @@ COMMON.formatStringBase64 = function(imgStr) {
//Get param url
COMMON
.
getUrlParam
=
function
(
name
,
url
){
if
(
!
url
){
url
=
window
.
location
.
href
;
}
name
=
name
.
replace
(
/
[\[]
/
,
"
\\\
["
).
replace
(
/
[\]]
/
,
"
\\\
]"
);
var
regexS
=
"[
\\
?&]"
+
name
+
"=([^&#]*)"
;
var
regex
=
new
RegExp
(
regexS
);
var
results
=
regex
.
exec
(
url
);
name
=
name
.
replace
(
/
[\[]
/
,
"
\\\
["
).
replace
(
/
[\]]
/
,
"
\\\
]"
);
var
regexS
=
"[
\\
?&]"
+
name
+
"=([^&#]*)"
;
var
regex
=
new
RegExp
(
regexS
);
var
results
=
regex
.
exec
(
url
);
if
(
results
==
null
){
return
""
;
}
}
else
{
//alert("results[0]:" + results[0]);
//alert("results[1]:" + results[1]);
...
...
abvw/js/home.js
View file @
84369192
...
...
@@ -81,7 +81,7 @@ $(document).ready(function () {
//Render Grid
HOME
.
renderGridView
();
//Render Genre
//Render Genre
HOME
.
getDataJsonFileGenre
();
HOME
.
getDataJsonFileGroup
();
...
...
@@ -114,7 +114,7 @@ $(document).ready(function () {
//Button details on dialog click event
$
(
'#dialog-detail'
).
click
(
HOME
.
detailsSubmenuFunction
);
//Button Read on dialog click event
//Button Read on dialog click event
$
(
'#dialog-read'
).
click
(
HOME
.
readSubmenuFunction
);
//Show Next Record
...
...
@@ -139,7 +139,7 @@ $(document).ready(function () {
$
(
'.button-share'
).
live
(
'click'
,
HOME
.
showContentShareDlgFunction
);
$
(
'.button-share'
).
live
(
'touchend'
,
HOME
.
showContentShareDlgFunction
);
$
(
'.button-share'
).
live
(
'touchmove'
,
function
()
{
HOME
.
home_isMove
=
true
;
});
$
(
'#dlgSubMenu'
).
hover
(
HOME
.
subMenuHoverFunction
,
HOME
.
subMenuHoverOffFunction
);
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
...
...
@@ -150,6 +150,11 @@ $(document).ready(function () {
});
}
}
console
.
log
(
ClientData
.
serviceOpt_apns
());
console
.
log
(
ClientData
.
serviceOpt_usable_push_message
());
if
((
ClientData
.
serviceOpt_apns
()
==
'Y'
)
&&
(
ClientData
.
serviceOpt_usable_push_message
()
==
'Y'
))
{
$
(
'#dspPushMessage'
).
show
();
}
$
(
'body'
).
click
(
HOME
.
bodyHomeClickFunction
);
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
...
...
@@ -180,6 +185,10 @@ $(document).ready(function () {
HEADER
.
checkForceChangePassword
();
}
//日比谷用設定ボタン隠す
$
(
'#dspHibiya'
).
hide
();
...
...
@@ -194,12 +203,12 @@ $(document).ready(function () {
// hide tab group with user anonymous
if
(
COMMON
.
isAnonymousLogin
())
{
//グループ選択隠す
$
(
'.switchingTab .colright'
).
hide
();
//プッシュメッセージ隠す
$
(
'#dspPushMessage'
).
hide
();
//日比谷対応判定
if
(
ClientData
.
serviceOpt_hibiyakadan_catalog
()
==
'Y'
){
$
(
'#dspHibiya'
).
show
();
...
...
@@ -215,7 +224,7 @@ $(document).ready(function () {
//$('.tabUnit').show();
$
(
'.switchingTab .colright'
).
show
();
}
// set scroll for tree view with IE9 on win7
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
/msie 9.0/
.
test
(
ua
)
&&
/windows nt 6.1/
.
test
(
ua
)
&&
!
/tablet/
.
test
(
ua
))
{
...
...
@@ -230,13 +239,13 @@ $(document).ready(function () {
format
:
'yyyy-mm-dd'
});
});
//ビューア、共有表示パーツ読み込み
$
(
"#viewer"
).
load
(
"./inc_contentview.html?__UPDATEID__"
,
function
(
myData
,
myStatus
,
xhr
){
//読み込み完了時の処理
I18N
.
i18nReplaceText
();
});
});
//日比谷カスタム ここから
...
...
@@ -244,21 +253,21 @@ HOME.dspHibiyaClickFunction = function(){
$
(
'#dlgAddMemberGroup'
).
dialog
(
'open'
);
};
HOME
.
btnAddMemberGroupSearchClickFunction
=
function
(){
var
addGroupName
=
$
(
'#txtAddMemberGroupName'
).
val
();
if
(
addGroupName
==
""
){
return
;
}
var
groupIds
=
HOME
.
getAddMemberGroupId
(
addGroupName
);
if
(
groupIds
==
""
){
alert
(
"コードが不正です"
);
return
;
}
$
(
'#dlgAddMemberGroup'
).
dialog
(
'close'
);
ClientData
.
searchCond_groupId
(
groupIds
);
//画面再描画開始
var
recordFrom
=
0
;
var
recordTo
=
0
;
...
...
@@ -294,7 +303,7 @@ HOME.btnAddMemberGroupSearchClickFunction = function(){
HOME
.
handleSortDisp
();
HOME
.
renderContent
(
id
,
searchText
,
searchDivision
,
sortType
,
sortOrder
,
recordFrom
,
recordTo
,
genreId
,
groupId
);
};
HOME
.
getAddMemberGroupId
=
function
(
strGroupName
)
{
...
...
@@ -362,14 +371,14 @@ HOME.changeDispBookShelfFunction = function() {
//Start : Apply new css - Editor: Long - Date : 09/03/2013 - Summary : For handle view mode icon
$
(
'body'
).
attr
(
'id'
,
'bookshelf'
);
$
(
'#control-bookshelf-type'
).
parent
().
removeClass
(
"thumbnail"
);
$
(
'#control-bookshelf-type'
).
parent
().
addClass
(
"thumbnail_select"
);
$
(
'#control-list-type'
).
parent
().
removeClass
(
"list_select"
);
$
(
'#control-list-type'
).
parent
().
addClass
(
"list"
);
//End : Apply new css - Editor: Long - Date : 09/03/2013 - Summary : For handle view mode icon
// if(ClientData.sortOpt_viewMode() == COMMON.Consts.ConstDisplayMode_BookShelf){
// if(ClientData.sortOpt_viewMode() == COMMON.Consts.ConstDisplayMode_BookShelf){
if
(
HOME
.
isShowBookShelf
)
{
recordFrom
=
HOME
.
DEFAULT_DISP_NUMBER_RECORD_FROM
;
recordTo
=
HOME
.
returnNumberDispRecordForBookShelf
()
*
HOME
.
showNextRecordClickNumber
;
...
...
@@ -412,7 +421,7 @@ HOME.changeDispListFunction = function() {
//Start : Apply new css - Editor: Long - Date : 09/03/2013 - Summary : For handle view mode icon
$
(
'body'
).
attr
(
'id'
,
'list'
);
$
(
'#control-list-type'
).
parent
().
removeClass
(
"list"
);
$
(
'#control-list-type'
).
parent
().
addClass
(
"list_select"
);
$
(
'#control-bookshelf-type'
).
parent
().
removeClass
(
"thumbnail_select"
);
...
...
@@ -454,7 +463,7 @@ HOME.changeDispListFunction = function() {
};
//Canvas Click function
//Canvas Click function
HOME
.
canvasClickFunction
=
function
(
e
)
{
if
(
e
)
{
e
.
preventDefault
();
...
...
@@ -467,7 +476,7 @@ HOME.canvasClickFunction = function(e) {
var
contentId
=
$
(
this
).
attr
(
'id'
);
var
outputId
=
contentId
.
substring
(
17
);
if
(
HOME
.
isShowBookShelf
)
{
LIMIT_ACCESS_CONTENT
.
checkLimitContent
(
outputId
,
function
(){
...
...
@@ -482,7 +491,7 @@ HOME.canvasClickFunction = function(e) {
};
HOME
.
canvasClickFunction_callback
=
function
(
outputId
)
{
{
var
date
=
new
Date
();
var
month
=
date
.
getMonth
()
+
1
;
var
day
=
date
.
getDate
();
...
...
@@ -494,12 +503,12 @@ HOME.canvasClickFunction_callback = function(outputId)
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
// Get image of selected image
ClientData
.
contentInfo_contentId
(
outputId
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
var
contentType
=
HOME
.
returnContentType
(
outputId
);
ClientData
.
contentInfo_contentType
(
contentType
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//Check Display mode to handle action
if
(
!
HOME
.
isShowBookShelf
)
{
...
...
@@ -591,9 +600,9 @@ HOME.canvasClickFunction_callback = function(outputId)
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData
.
IsRefresh
(
false
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
if
(
contentType
==
COMMON
.
ContentTypeKeys
.
Type_Others
){
if
(
contentType
==
COMMON
.
ContentTypeKeys
.
Type_Others
){
//Download content
HEADER
.
downloadResourceById
(
outputId
);
// redraw content remove new icon
...
...
@@ -608,14 +617,14 @@ HOME.canvasClickFunction_callback = function(outputId)
else
{
//Go to Conten view page
//AVWEB.avwScreenMove(COMMON.ScreenIds.ContentView);
HOME
.
drawEditImage
(
outputId
);
//ビュアーに切り替え
HOME
.
showContentView
();
}
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
}
};
...
...
@@ -638,12 +647,12 @@ HOME.openSubMenuDialogFunction = function(e) {
var
base64String
=
HOME
.
returnThumbnail
(
contentid
);
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
ClientData
.
contentInfo_contentId
(
contentid
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
var
contentType
=
HOME
.
returnContentType
(
contentid
);
ClientData
.
contentInfo_contentType
(
contentType
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//Store Content id that user has read
if
(
ClientData
.
ReadingContentIds
().
length
>
0
)
{
HOME
.
contentIdArray
=
ClientData
.
ReadingContentIds
();
...
...
@@ -829,7 +838,7 @@ HOME.getDataJsonFileGenre = function() {
HOME
.
AddChidrenNodeGenre
(
node
);
//node.IsClosed = false; //#13200 カテゴリツリーの階層プラス・マイナスのアイコンが逆
node
.
ExpandAfterBuild
=
true
;
//#14287 第一階層を開くようにする
node
.
IsCategory
=
node
.
ChildNodes
.
length
>
0
;
// Has child node
arrData
.
push
(
node
);
...
...
@@ -846,9 +855,9 @@ HOME.getDataJsonFileGenre = function() {
$
(
'#all'
).
css
(
'font-weight'
,
'bold'
);
$
(
'#all'
).
css
(
'text-decoration'
,
'underline'
);
$
(
'.treeview > li'
).
addClass
(
'tabCategory'
);
// Expand nodes(#14287 第1階層を開くようにする)
for
(
var
nIndex
=
0
;
nIndex
<
tree1
.
ExpandNodes
.
length
;
nIndex
++
)
{
if
(
$
(
"#"
+
tree1
.
ExpandNodes
[
nIndex
]).
parent
())
{
...
...
@@ -868,7 +877,7 @@ HOME.getDataJsonFileGenre = function() {
}
}
}
});
};
...
...
@@ -980,7 +989,7 @@ HOME.AddGenre_Callback = function(selectedNode) {
HOME
.
handleSortDisp
();
};
//Get Data from Group Json
//Get Data from Group Json
HOME
.
getDataJsonFileGroup
=
function
()
{
var
params
=
{
sid
:
ClientData
.
userInfo_sid
()
...
...
@@ -1188,7 +1197,7 @@ HOME.detailsSubmenuFunction = function(e) {
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Set contentType of content to local storage for display details.
ClientData
.
contentInfo_contentId
(
contentId
);
ClientData
.
contentInfo_contentThumbnail
(
base64String
);
//Store Content id that user has read
if
(
ClientData
.
ReadingContentIds
().
length
>
0
)
{
HOME
.
contentIdArray
=
ClientData
.
ReadingContentIds
();
...
...
@@ -1253,7 +1262,7 @@ HOME.readSubmenuFunction = function(e) {
// check limit of content
LIMIT_ACCESS_CONTENT
.
checkLimitContent
(
contentId
,
function
()
{
{
HOME
.
readSubmenuFunction_callback
(
contentId
);
},
function
(){
...
...
@@ -1266,7 +1275,7 @@ HOME.readSubmenuFunction = function(e) {
HOME
.
readSubmenuFunction_callback
=
function
(
contentId
)
{
var
contentThumbnail
=
HOME
.
returnThumbnail
(
contentId
);
var
date
=
new
Date
();
var
month
=
date
.
getMonth
()
+
1
;
var
day
=
date
.
getDate
();
...
...
@@ -1275,12 +1284,12 @@ HOME.readSubmenuFunction_callback = function(contentId)
ClientData
.
contentInfo_contentId
(
contentId
);
ClientData
.
contentInfo_contentThumbnail
(
contentThumbnail
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
var
contentType
=
HOME
.
returnContentType
(
contentId
);
ClientData
.
contentInfo_contentType
(
contentType
);
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
var
checkflag
=
false
;
//Store Content id that user has read
...
...
@@ -1327,8 +1336,8 @@ HOME.readSubmenuFunction_callback = function(contentId)
//$('body,html').animate({ scrollTop: 0 }, 0);
ClientData
.
IsRefresh
(
false
);
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Add ContentType to Storage.
//For testing without other Type.
if
(
contentType
==
COMMON
.
ContentTypeKeys
.
Type_Others
){
//Download content
...
...
@@ -1431,7 +1440,7 @@ HOME.sortByTitleFunction = function() {
var
recordFrom
=
HOME
.
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
groupId
=
ClientData
.
searchCond_groupId
();
var
groupId
=
ClientData
.
searchCond_groupId
();
if
(
sortOrder
==
COMMON
.
Consts
.
ConstOrderSetting_Asc
)
{
if
(
sortType
==
1
)
{
...
...
@@ -1488,7 +1497,7 @@ HOME.sortByTitleKanaFunction = function() {
var
recordFrom
=
HOME
.
DEFAULT_DISP_NUMBER_RECORD_FROM
;
var
recordTo
=
ClientData
.
searchCond_recordTo
();
var
genreId
=
ClientData
.
searchCond_genreId
();
var
groupId
=
ClientData
.
searchCond_groupId
();
var
groupId
=
ClientData
.
searchCond_groupId
();
if
(
sortOrder
==
COMMON
.
Consts
.
ConstOrderSetting_Asc
)
{
if
(
sortType
==
2
)
{
...
...
@@ -1554,7 +1563,7 @@ HOME.sortByReleaseDateFunction = function() {
else
{
sortOrder
=
COMMON
.
Consts
.
ConstOrderSetting_Asc
;
}
ClientData
.
searchCond_sortOrder
(
sortOrder
);
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
else
{
sortOrder
=
COMMON
.
Consts
.
ConstOrderSetting_Asc
;
...
...
@@ -1616,7 +1625,7 @@ HOME.handleLanguage = function() {
}
};
///Render Content
///Render Content
HOME
.
renderContent
=
function
(
id
,
text
,
division
,
type
,
order
,
from
,
to
,
cateid
,
grpid
)
{
var
params
=
{
sid
:
id
,
...
...
@@ -1633,7 +1642,7 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
HOME
.
abapi
(
'webContentList'
,
params
,
'POST'
,
function
(
data
)
{
var
countCnt
=
0
;
$
.
each
(
data
.
contentList
,
function
(
i
,
post
)
{
var
outputDate
=
COMMON
.
formatDeliveryDate
(
post
.
contentDeliveryDate
);
...
...
@@ -1655,7 +1664,7 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
+
' </a>'
+
'</section>'
);
if
((
HOME
.
home_realTotalRecord
+
i
+
1
)
%
3
==
0
)
{
$
(
'#bookshelf'
+
post
.
contentId
).
addClass
(
'no_m_right'
);
}
...
...
@@ -1689,15 +1698,15 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
+
' </div>'
+
' </div>'
+
'</section>'
;
var
shareHtml
=
""
;
if
(
post
.
readerShare
==
'1'
){
shareHtml
=
'<li><a class="read lang button-share" contentid="'
+
post
.
contentId
+
'" lang="txtShare">共有</a></li>'
;
}
gridHtml
=
gridHtml
.
replace
(
/
\{
share
\}
/g
,
shareHtml
);
$
(
'#content-grid'
).
append
(
gridHtml
);
HOME
.
getNextRecordNumForList
();
}
...
...
@@ -1706,14 +1715,14 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
if
((
formatThumbnail
!=
null
)
&&
(
formatThumbnail
!=
'undefined'
)
&&
(
formatThumbnail
!=
''
)){
formatThumbnail
=
COMMON
.
formatStringBase64
(
formatThumbnail
);
}
HOME
.
thumbnailArr
.
push
({
contentId
:
post
.
contentId
,
thumbnail
:
formatThumbnail
});
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage.
//assign content type to array
//assign content type to array
HOME
.
contentTypeArr
.
push
({
contentId
:
post
.
contentId
,
contentType
:
post
.
contentType
});
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Assign content type to array to manage.
// save alert message level
LIMIT_ACCESS_CONTENT
.
messageLevel
[
post
.
contentId
]
=
{
alertMessageLevel
:
post
.
alertMessageLevel
,
alertMessage
:
post
.
alertMessage
};
...
...
@@ -1728,7 +1737,7 @@ HOME.renderContent = function(id, text, division, type, order, from, to, cateid,
//Check if content has marking or memo
HOME
.
checkContentMarkingMemoOption
(
post
.
contentId
);
//renderViewDate
//renderViewDate
var
viewdate
=
HOME
.
renderViewDate
(
post
.
contentId
);
if
(
viewdate
!=
null
||
viewdate
!=
'undefined'
)
{
$
(
'#lblVdate'
+
post
.
contentId
).
html
(
viewdate
);
...
...
@@ -1807,7 +1816,7 @@ HOME.renderGridView = function() {
//Language Handle
HOME
.
handleLanguage
();
//handle
//handle
HOME
.
handleSortDisp
();
//Refresh GridView
...
...
@@ -1823,7 +1832,7 @@ HOME.renderGridView = function() {
HOME
.
returnThumbnail
=
function
(
contentid
)
{
var
iArrCnt
=
HOME
.
thumbnailArr
.
length
;
for
(
var
i
=
0
;
i
<
iArrCnt
;
i
++
)
{
if
(
HOME
.
thumbnailArr
[
i
].
contentId
==
contentid
)
{
if
(
HOME
.
thumbnailArr
[
i
].
contentId
==
contentid
)
{
return
HOME
.
thumbnailArr
[
i
].
thumbnail
;
}
}
...
...
@@ -1834,7 +1843,7 @@ HOME.returnThumbnail = function(contentid) {
HOME
.
returnContentType
=
function
(
contentid
){
//Array Length
var
iArrCnt
=
HOME
.
contentTypeArr
.
length
;
//Get contentType in array by contentId
for
(
var
i
=
0
;
i
<
iArrCnt
;
i
++
){
if
(
HOME
.
contentTypeArr
[
i
].
contentId
==
contentid
)
{
...
...
@@ -1851,7 +1860,7 @@ HOME.returnContentType = function(contentid){
HOME
.
checkContentMarkingMemoOption
=
function
(
contentId
)
{
if
(
!
HOME
.
isShowBookShelf
)
{
//Check if contentid has marking
//Check if contentid has marking
if
(
ClientData
.
MarkingData
().
length
==
0
)
{
$
(
'#imgBookMark'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
}
...
...
@@ -1871,7 +1880,7 @@ HOME.checkContentMarkingMemoOption = function(contentId) {
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'hidden'
);
}
else
{
// Check if contentid has memo
// Check if contentid has memo
for
(
var
nIndex1
=
0
;
nIndex1
<
ClientData
.
MemoData
().
length
;
nIndex1
++
)
{
if
(
ClientData
.
MemoData
()[
nIndex1
].
contentid
==
contentId
)
{
$
(
'#imgMemo'
+
contentId
).
css
(
'visibility'
,
'visible'
);
...
...
@@ -1905,7 +1914,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
var
versionArr
=
ClientData
.
ResourceVersion
();
var
metaArr
=
ClientData
.
MetaVersion
();
var
readArr
=
ClientData
.
ReadingContentIds
();
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Declare variable handle contentType and Thumbnail of content.
var
contentThumbnail
=
HOME
.
returnThumbnail
(
contId
);
var
contentType
=
HOME
.
returnContentType
(
contId
);
...
...
@@ -1919,12 +1928,12 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
imgIconNew
.
onload
=
function
()
{
ctx
.
drawImage
(
imgIconNew
,
c
.
width
/
2
-
resizeImg
[
0
]
/
2
,
c
.
height
-
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
contId
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
$
(
'#content-thumbnail'
+
contId
).
fadeIn
(
'slow'
);
});
};
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
};
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
...
...
@@ -1936,7 +1945,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
else
{
...
...
@@ -1951,7 +1960,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
});
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
...
...
@@ -1962,7 +1971,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
readFlg
=
true
;
break
;
...
...
@@ -1980,7 +1989,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
imgIconNew
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_NEW
;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
...
...
@@ -1991,7 +2000,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
}
}
...
...
@@ -2018,7 +2027,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
...
...
@@ -2029,7 +2038,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
break
;
}
...
...
@@ -2055,7 +2064,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
imgIconEdit
.
src
=
COMMON
.
DEFAULT_IMG_CONTENT_EDIT
;
};
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
if
(
contentThumbnail
==
''
||
contentThumbnail
==
null
){
if
(
!
COMMON
.
isPdfContent
(
contentType
)){
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
...
...
@@ -2066,7 +2075,7 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
}
else
{
imgThumb
.
src
=
contentThumbnail
;
}
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Check contentType to set thumbnail.
break
;
}
...
...
@@ -2081,21 +2090,21 @@ HOME.checkUserHasReadContent = function(contId, resourceVer, metaVer) {
HOME
.
drawEditImage
=
function
(
id
)
{
var
img
=
new
Image
();
var
imgSrc
=
HOME
.
returnThumbnail
(
id
);
if
(
imgSrc
!=
null
){
}
else
{
var
contentType
=
HOME
.
returnContentType
(
id
);
var
src
=
HEADER
.
getThumbnailForOtherType
(
contentType
);
if
(
src
!=
''
){
imgSrc
=
src
;
}
}
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
id
);
var
c
=
document
.
getElementById
(
'content-thumbnail'
+
id
);
//use getContext to use the canvas for drawing
var
ctx
=
c
.
getContext
(
'2d'
);
ctx
.
clearRect
(
0
,
0
,
c
.
width
,
c
.
height
);
...
...
@@ -2104,9 +2113,9 @@ HOME.drawEditImage = function(id) {
ctx
.
drawImage
(
img
,
(
c
.
width
/
2
)
-
(
resizeImg
[
0
]
/
2
)
+
4
,
c
.
height
-
resizeImg
[
1
]
+
4
,
resizeImg
[
0
],
resizeImg
[
1
]);
$
(
"#loadingIcon"
+
id
).
fadeOut
(
'slow'
,
function
()
{
$
(
'#content-thumbnail'
+
id
).
fadeIn
(
'slow'
);
});
});
};
img
.
src
=
imgSrc
;
};
...
...
@@ -2209,7 +2218,7 @@ HOME.formatDisplayMoreRecord = function() {
else
{
$
(
'#control-nextrecord'
).
html
(
AVWEB
.
format
(
I18N
.
i18nText
(
'dspViewMore'
),
HOME
.
returnNumberDispRecordForBookShelf
()));
}
};
/*
...
...
@@ -2516,7 +2525,7 @@ HOME.resizeResourceThumbnail = function(mg, width, height) {
var
newHeight
;
/*if (mg.width > mg.height) {
newWidth = width;
newHeight = (mg.height * width) / mg.width;
newHeight = (mg.height * width) / mg.width;
}
else {
newHeight = height;
...
...
@@ -2539,10 +2548,10 @@ HOME.resetShowNextRecordCount = function() {
HOME
.
setDefaultViewMode
=
function
()
{
if
(
ClientData
.
sortOpt_viewMode
()
==
COMMON
.
Consts
.
ConstDisplayMode_BookShelf
)
{
HOME
.
isShowBookShelf
=
true
;
//Start : Apply new css - Editor: Long - Date : 09/03/2013 - Summary : For handle view mode icon
$
(
'body'
).
attr
(
'id'
,
'bookshelf'
);
$
(
'#control-bookshelf-type'
).
parent
().
removeClass
(
"thumbnail"
);
$
(
'#control-bookshelf-type'
).
parent
().
addClass
(
"thumbnail_select"
);
$
(
'#control-list-type'
).
parent
().
removeClass
(
"list_select"
);
...
...
@@ -2551,10 +2560,10 @@ HOME.setDefaultViewMode = function() {
}
else
if
(
ClientData
.
sortOpt_viewMode
()
==
COMMON
.
Consts
.
ConstDisplayMode_List
)
{
HOME
.
isShowBookShelf
=
false
;
//Start : Apply new css - Editor: Long - Date : 09/03/2013 - Summary : For handle view mode icon
$
(
'body'
).
attr
(
'id'
,
'list'
);
$
(
'#control-list-type'
).
parent
().
removeClass
(
"list"
);
$
(
'#control-list-type'
).
parent
().
addClass
(
"list_select"
);
$
(
'#control-bookshelf-type'
).
parent
().
removeClass
(
"thumbnail_select"
);
...
...
@@ -2563,10 +2572,10 @@ HOME.setDefaultViewMode = function() {
}
else
{
HOME
.
isShowBookShelf
=
true
;
//Start : Apply new css - Editor: Long - Date : 09/03/2013 - Summary : For handle view mode icon
$
(
'body'
).
attr
(
'id'
,
'bookshelf'
);
$
(
'#control-bookshelf-type'
).
parent
().
removeClass
(
"thumbnail"
);
$
(
'#control-bookshelf-type'
).
parent
().
addClass
(
"thumbnail_select"
);
$
(
'#control-list-type'
).
parent
().
removeClass
(
"list_select"
);
...
...
@@ -2586,7 +2595,7 @@ HOME.removeHoverCss = function() {
//Dialog Read Button CLick
HOME
.
showContentShareDlgFunction
=
function
(
e
)
{
if
(
e
)
{
e
.
preventDefault
();
}
...
...
@@ -2600,11 +2609,11 @@ HOME.showContentShareDlgFunction = function(e) {
// check limit of content
LIMIT_ACCESS_CONTENT
.
checkLimitContent
(
contentId
,
function
()
{
{
SHARE
.
contentId
=
contentId
;
SHARE
.
contentTitle
=
""
;
SHARE
.
openContentShare
();
},
function
(){
//console.log("checkLimitContent_bbb");
...
...
@@ -2639,7 +2648,7 @@ HOME.cssInit = function(){
};
HOME
.
showContentView
=
function
(){
var
y
=
0
;
if
(
document
.
documentElement
.
scrollTop
){
y
=
document
.
documentElement
.
scrollTop
;
...
...
@@ -2654,19 +2663,19 @@ HOME.showContentView = function(){
}
HOME
.
scrollTop
=
y
;
window
.
scrollTo
(
0
,
0
);
//試験
$
(
"#header-ws"
).
hide
();
$
(
"#ws-body"
).
hide
();
$
(
"#topcontrol"
).
hide
();
CONTENTVIEW_INITOBJECT
.
clearViewerComponent
();
CONTENTVIEW
.
cssInit
();
$
(
"#viewer"
).
show
();
//CONTENTVIEW_FILESYSTEM.initFS(CONTENTVIEW.ready);
CONTENTVIEW
.
ready
();
};
//Dialog Read Button CLick
...
...
@@ -2688,7 +2697,7 @@ HOME.downloadSubmenuFunction = function(e) {
//Download content
HEADER
.
downloadResourceById
(
contentId
);
};
...
...
abvw/js/login.js
View file @
84369192
...
...
@@ -26,7 +26,7 @@ LOGIN.loadLoginInfo = function() {
if
(
ClientData
.
userInfo_loginId
()
!=
null
)
{
$
(
'#txtAccId'
).
val
(
ClientData
.
userInfo_loginId
());
}
}
};
//Initial Screen
...
...
@@ -42,7 +42,7 @@ LOGIN.saveLoginInfo = function() {
var
lang
=
I18N
.
getCurrentLanguage
();
// load language
I18N
.
changeLanguage
(
lang
);
// Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData
.
common_contentDataChkFlg
(
true
);
...
...
@@ -56,7 +56,7 @@ LOGIN.saveLoginInfo = function() {
ClientData
.
userInfo_accountPath_session
(
accountPath
);
ClientData
.
userInfo_loginId_session
(
loginId
);
ClientData
.
userInfo_userName
(
LOGIN
.
userInfo_userName
);
if
(
chkRemember
==
'checked'
)
{
ClientData
.
userInfo_rememberLogin
(
true
);
...
...
@@ -70,13 +70,13 @@ LOGIN.saveLoginInfo = function() {
ClientData
.
userInfo_sid_local
(
LOGIN
.
userinfo_sid
);
//バックアップにも保持
ClientData
.
userInfo_sid_local_bak
(
LOGIN
.
userinfo_sid
);
LOGIN
.
saveServiceUserOption
();
//ページジャンプ設定をクリア
ClientData
.
JumpQueue
([]);
ClientData
.
IsJumpBack
(
false
);
};
//Check validation
...
...
@@ -84,12 +84,12 @@ LOGIN.checkValidation = function() {
var
accountPath
=
$
(
'#txtAccPath'
).
val
();
var
loginId
=
$
(
'#txtAccId'
).
val
();
var
password
=
$
(
'#txtPassword'
).
val
();
var
msgError
=
$
(
'#main-error-message'
);
var
msgError
=
$
(
'#main-error-message'
);
if
(
!
ValidationUtil
.
CheckRequiredForText
(
accountPath
))
{
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
I18N
.
i18nText
(
'msgLoginEmpty'
));
msgError
.
attr
(
'lang'
,
'msgLoginEmpty'
);
msgError
.
show
();
msgError
.
show
();
return
false
;
}
else
if
(
!
ValidationUtil
.
CheckRequiredForText
(
loginId
))
{
...
...
@@ -144,7 +144,7 @@ LOGIN.checkDialogValidation = function() {
else
{
return
true
;
}
}
}
};
//Login Process
...
...
@@ -161,10 +161,10 @@ LOGIN.processLogin = function() {
password
:
password
,
urlpath
:
accountPath
};
//引数パラメータがあれば取得
var
paramContentID
=
COMMON
.
getUrlParam
(
'cid'
,
''
);
// Set sid for login, this will be checked authoring 2 sessions
if
(
ClientData
.
userInfo_sid_local
())
{
params
.
previousSid
=
ClientData
.
userInfo_sid_local
();
...
...
@@ -176,7 +176,7 @@ LOGIN.processLogin = function() {
}
}
}
// Get url to login
var
apiLoginUrl
=
ClientData
.
conf_apiLoginUrl
();
//sysSettings.apiLoginUrl;
...
...
@@ -188,7 +188,7 @@ LOGIN.processLogin = function() {
LOGIN
.
getServiceOptionList
();
if
(
data
.
result
==
'success'
)
{
// Save retrieved info
LOGIN
.
saveLoginInfo
();
// set number new push message to 0
...
...
@@ -198,7 +198,7 @@ LOGIN.processLogin = function() {
if
(
data
.
requirePasswordChange
==
0
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
...
...
@@ -206,7 +206,7 @@ LOGIN.processLogin = function() {
//ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
}
}
else
if
(
data
.
requirePasswordChange
==
1
)
{
...
...
@@ -231,7 +231,7 @@ LOGIN.processLogin = function() {
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
...
...
@@ -240,7 +240,7 @@ LOGIN.processLogin = function() {
//ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
}
}
else
if
(
numDay
>
30
)
{
LOGIN
.
OpenChangePasswordDialog
();
...
...
@@ -251,7 +251,7 @@ LOGIN.processLogin = function() {
}
else
{
// no need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
...
...
@@ -259,7 +259,7 @@ LOGIN.processLogin = function() {
//ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
}
}
}
else
if
(
data
.
requirePasswordChange
==
2
)
{
...
...
@@ -280,7 +280,7 @@ LOGIN.processLogin = function() {
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
...
...
@@ -288,7 +288,7 @@ LOGIN.processLogin = function() {
//ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
}
}
else
if
(
numDay
>
30
)
{
LOGIN
.
OpenChangePasswordDialog
();
...
...
@@ -310,7 +310,7 @@ LOGIN.processLogin = function() {
//ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
}
}
}
}
...
...
@@ -320,7 +320,7 @@ LOGIN.processLogin = function() {
$
(
'#main-error-message'
).
show
();
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
LOGIN
.
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
...
...
@@ -330,7 +330,7 @@ LOGIN.processLogin = function() {
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
I18N
.
i18nText
(
'msgLoginErrWrong'
),
'E001'
));
}
$
(
'#main-error-message'
).
show
();
});
});
};
//Change Password Process
...
...
@@ -371,7 +371,7 @@ LOGIN.changePasswordProcess = function(){
// Show systemerror
AVWEB
.
showSystemError
();
}
});
});
};
//Change Language Japanese
...
...
@@ -391,15 +391,15 @@ LOGIN.changeLanguageKo = function(){
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
if
(
LOGIN
.
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
I18N
.
i18nText
(
'msgLoginErrWrong'
),
LOGIN
.
login_errorMessage
).
toString
());
}
}
};
//Change Language English
LOGIN
.
changeLanguageEn
=
function
(){
I18N
.
changeLanguage
(
COMMON
.
Consts
.
ConstLanguage_En
);
document
.
title
=
I18N
.
i18nText
(
'dspLogin'
)
+
' | '
+
I18N
.
i18nText
(
'sysAppTitle'
);
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
if
(
LOGIN
.
login_errorMessage
!=
""
){
//ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
if
(
LOGIN
.
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
I18N
.
i18nText
(
'msgLoginErrWrong'
),
LOGIN
.
login_errorMessage
).
toString
());
}
};
...
...
@@ -421,11 +421,11 @@ LOGIN.changePassFunction = function(){
//Skip Password function
LOGIN
.
skipPassFunction
=
function
(){
var
date
=
new
Date
();
ClientData
.
userInfo_pwdSkipDt
(
date
);
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
};
//Open Change Password Dialog
...
...
@@ -464,7 +464,7 @@ LOGIN.saveServiceUserOption = function(){
else
if
(
option
.
serviceOptionId
==
61
)
{
ClientData
.
serviceOpt_web_screen_lock_wait
(
option
.
value
);
}
else
if
(
option
.
serviceOptionId
==
70
)
{
ClientData
.
serviceOpt_catalog_edition
(
option
.
value
);
}
...
...
@@ -489,14 +489,20 @@ LOGIN.saveServiceUserOption = function(){
else
if
(
option
.
serviceOptionId
==
78
)
{
ClientData
.
serviceOpt_content_share
(
option
.
value
);
}
else
if
(
option
.
serviceOptionId
==
12
)
{
ClientData
.
serviceOpt_apns
(
option
.
value
);
}
else
if
(
option
.
serviceOptionId
==
49
)
{
ClientData
.
serviceOpt_usable_push_message
(
option
.
value
);
}
});
};
//Get Service Option
LOGIN
.
getServiceOptionList
=
function
(){
$
.
each
(
LOGIN
.
optionList
,
function
(
i
,
option
){
if
(
option
.
serviceOptionId
==
22
){
LOGIN
.
force_pw_change_periodically
=
option
.
value
;
}
...
...
@@ -512,7 +518,7 @@ LOGIN.getServiceOptionList = function(){
else
if
(
option
.
serviceOptionId
==
28
){
LOGIN
.
user_data_backup
=
option
.
value
;
}
});
};
...
...
@@ -548,17 +554,17 @@ LOGIN.initLoginNormalUser = function() {
// init login for anonymous user
LOGIN
.
initLoginAnonymousUser
=
function
()
{
document
.
title
=
I18N
.
i18nText
(
'dspLogin'
)
+
' | '
+
I18N
.
i18nText
(
'sysAppTitle'
);
var
sysSettings
=
AVWEB
.
avwSysSetting
();
// get info in conf.json
var
loginId
=
sysSettings
.
anonymousLoginId
;
var
urlPath
=
sysSettings
.
anonymousLoginPath
;
if
(
loginId
==
""
){
loginId
=
"nologin"
;
}
if
(
urlPath
==
""
){
//URLからパース
urlPath
=
LOGIN
.
getUrlPath
();
...
...
@@ -574,12 +580,12 @@ LOGIN.initLoginAnonymousUser = function() {
};
AVWEB
.
avwCmsApiWithUrl
(
ClientData
.
conf_apiLoginUrl
(),
null
,
'webClientAnonymousLogin'
,
'post'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
//clear session of old anonymous user
//SessionStorageUtils.clear();
//警告表示を組み込んだら I18N.i18nText()の値が未定義になるので言語リソース再読み込み
//警告表示を組み込んだら I18N.i18nText()の値が未定義になるので言語リソース再読み込み
I18N
.
initi18n
();
// set info user anonymous login
...
...
@@ -609,7 +615,7 @@ LOGIN.initLoginAnonymousUser = function() {
$
(
'#anonymous'
).
fadeOut
(
'slow'
,
'swing'
,
function
()
{
//カタログエディション対応判定
if
(
ClientData
.
serviceOpt_catalog_edition
()
==
'Y'
){
//引数パラメータがあれば取得
var
paramContentID
=
COMMON
.
getUrlParam
(
'cid'
,
''
);
//カタログ対応
...
...
@@ -624,7 +630,7 @@ LOGIN.initLoginAnonymousUser = function() {
//ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Home
);
}
});
}
else
{
...
...
@@ -654,7 +660,7 @@ LOGIN.initLoginAnonymousUser = function() {
LOGIN
.
initLoginGetitsUser
=
function
()
{
//console.log("LOGIN.initLoginGetitsUser");
document
.
title
=
I18N
.
i18nText
(
'dspLogin'
)
+
' | '
+
I18N
.
i18nText
(
'sysAppTitle'
);
var
params
=
{
...
...
@@ -664,12 +670,12 @@ LOGIN.initLoginGetitsUser = function() {
I18N
.
initi18n
();
AVWEB
.
avwCmsApiWithUrl
(
ClientData
.
conf_apiLoginUrl
(),
ClientData
.
userInfo_accountPath
(),
'webClientGetitsLogin'
,
'post'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
//clear session of old anonymous user
//SessionStorageUtils.clear();
//警告表示を組み込んだら I18N.i18nText()の値が未定義になるので言語リソース再読み込み
//警告表示を組み込んだら I18N.i18nText()の値が未定義になるので言語リソース再読み込み
//I18N.initi18n();
ClientData
.
userInfo_userName
(
data
.
userName
);
...
...
@@ -690,7 +696,7 @@ LOGIN.initLoginGetitsUser = function() {
LOGIN
.
saveServiceUserOption
();
// hide splash screen then move to home page
$
(
'#anonymous'
).
fadeOut
(
'slow'
,
'swing'
,
function
()
{
//引数パラメータがあれば取得
var
paramContentID
=
COMMON
.
getUrlParam
(
'cid'
,
''
);
//カタログ対応
...
...
@@ -702,7 +708,7 @@ LOGIN.initLoginGetitsUser = function() {
//AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
Login
);
}
});
}
else
{
...
...
@@ -750,7 +756,7 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
};
AVWEB
.
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
'GET'
,
params
,
function
(
data
)
{
//コンテンツIDセット
ClientData
.
contentInfo_contentId
(
strContentId
);
//コンテツタイプ判定
...
...
@@ -760,24 +766,24 @@ LOGIN.showContentViewByOpenUrl = function(strContentId) {
HEADER
.
downloadResourceById
(
strContentId
);
}
else
{
//Go to Conten view page
//アラート表示組み込めるか
LIMIT_ACCESS_CONTENT
.
messageLevel
[
data
.
contentData
.
contentId
]
=
{
alertMessageLevel
:
data
.
contentData
.
alertMessageLevel
,
alertMessage
:
data
.
contentData
.
alertMessage
};
// check limit of content
LIMIT_ACCESS_CONTENT
.
checkLimitContent
(
data
.
contentData
.
contentId
,
function
()
{
{
LOGIN
.
alertMessageOkFunction_callback
();
},
function
()
{
{
LOGIN
.
alertMessageCancelFunction_callback
();
}
);
}
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
//見つからないかエラーなのでホームに移動
...
...
@@ -812,8 +818,8 @@ LOGIN.alertMessageCancelFunction_callback = function(){
//Get urlPath String
LOGIN
.
getUrlPath
=
function
(){
//URL文字列から事業者ID部分を抽出
var
regex
=
new
RegExp
(
"/webad/([^&#]*)/"
);
var
results
=
regex
.
exec
(
window
.
location
.
href
);
var
regex
=
new
RegExp
(
"/webad/([^&#]*)/"
);
var
results
=
regex
.
exec
(
window
.
location
.
href
);
if
(
results
==
null
){
return
""
;
}
...
...
@@ -830,7 +836,7 @@ LOGIN.showAlertScreen = function(errMes, scrMove) {
if
(
errMes
==
undefined
||
errMes
==
""
){
errMes
=
"message."
;
//I18N.i18nText('msgPageImgErr');
}
COMMON
.
lockLayout
();
/* show error messages */
$
().
toastmessage
({
position
:
'middle-center'
});
...
...
@@ -856,7 +862,7 @@ LOGIN.showAlertScreen = function(errMes, scrMove) {
//$(document).ready(function (e) {
LOGIN
.
ready
=
function
(){
//セッションストレージクリア
SessionStorageUtils
.
clear
();
AVWEB
.
avwUserSessionObj
=
null
;
...
...
@@ -865,21 +871,21 @@ LOGIN.ready = function(){
I18N
.
initi18n
();
var
sysSettings
=
AVWEB
.
avwSysSetting
();
// get info in conf.json
//モード初期化
ClientData
.
isGetitsMode
(
false
);
ClientData
.
isStreamingMode
(
false
);
ClientData
.
storeUrl
(
""
);
//getitsサーバー設定確認
if
(
sysSettings
.
apiUrl
==
""
){
//引数パラメータを取得
var
siteUrl
=
COMMON
.
getUrlParam
(
'siteUrl'
,
''
);
var
urlPath
=
COMMON
.
getUrlParam
(
'urlPath'
,
''
);
var
storeUrl
=
COMMON
.
getUrlParam
(
'storeUrl'
,
''
);
if
(
siteUrl
!=
""
&&
urlPath
!=
""
){
//getitsモード有効
ClientData
.
isGetitsMode
(
true
);
//api接続先設定
...
...
@@ -893,9 +899,9 @@ LOGIN.ready = function(){
ClientData
.
userInfo_loginId_session
(
""
);
//ストア遷移用のURL
ClientData
.
storeUrl
(
storeUrl
);
}
}
else
{
//confのパラメータセット
ClientData
.
conf_apiUrl
(
sysSettings
.
apiUrl
);
...
...
@@ -904,20 +910,20 @@ LOGIN.ready = function(){
}
if
(
ClientData
.
isGetitsMode
()
==
true
){
//念のため前回までの閲覧ログは削除
ClientData
.
ContentLogData
([]);
$
(
'#anonymous'
).
show
();
setTimeout
(
function
()
{
LOGIN
.
initLoginGetitsUser
();
},
},
LOGIN
.
timeWaitSplashScreen
);
}
else
if
(
COMMON
.
isAnonymousLogin
())
{
$
(
'#anonymous'
).
show
();
setTimeout
(
function
()
{
...
...
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