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
822c73cc
Commit
822c73cc
authored
Jul 22, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#12996 getits対応
parent
271dff71
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1065 additions
and
930 deletions
+1065
-930
abvw/common/js/avweb.js
+73
-58
abvw/common/js/common.js
+189
-161
abvw/common/js/screenLock.js
+1
-1
abvw/home.html
+1
-1
abvw/js/Limit_Access_Content.js
+6
-6
abvw/js/bookmark.js
+34
-34
abvw/js/contentsearch.js
+34
-34
abvw/js/contentview.js
+64
-64
abvw/js/contentview_Anket.js
+1
-1
abvw/js/contentview_CreateObjects.js
+34
-34
abvw/js/contentview_Events.js
+13
-13
abvw/js/contentview_General.js
+4
-4
abvw/js/contentview_GetData.js
+44
-44
abvw/js/contentview_Gomu.js
+2
-2
abvw/js/contentview_ImagePreview.js
+4
-4
abvw/js/contentview_InitObjects.js
+9
-9
abvw/js/contentview_Marking.js
+1
-1
abvw/js/contentview_Memo.js
+1
-1
abvw/js/detail.js
+24
-24
abvw/js/header.js
+142
-152
abvw/js/history.js
+38
-38
abvw/js/home.js
+52
-51
abvw/js/login.js
+280
-179
abvw/js/settings.js
+14
-14
No files found.
abvw/common/js/avweb.js
View file @
822c73cc
...
...
@@ -7,6 +7,12 @@
/*
* User Environment Check Class
*/
//グローバルの名前空間用のオブジェクトを用意する
var
AVWEB
=
{};
AVWEB
.
hasErrorKey
=
'AVW_HASERR'
;
var
UserEnvironment
=
function
()
{
this
.
appName
=
navigator
.
appName
;
...
...
@@ -139,7 +145,7 @@ UserSetting.prototype.show = function(elmid) {
if
(
value
)
{
var
js
=
JSON
.
parse
(
value
);
$
.
each
(
js
,
function
(
k
,
v
)
{
tags
=
tags
+
"<b>"
+
k
+
"</b>:"
+
v
+
"<br />"
;
tags
=
tags
+
"<b>"
+
k
+
"</b>:"
+
v
+
"<br />"
;
});
}
tags
=
tags
+
"</p>"
;
...
...
@@ -217,7 +223,7 @@ UserSession.prototype.set = function(key, value) {
if
(
storage
)
{
if
(
this
.
available
==
false
)
{
if
(
key
==
"init"
)
{
storage
.
setItem
(
"AVWS_"
+
key
,
value
);
storage
.
setItem
(
"AVWS_"
+
key
,
value
);
}
else
{
throw
new
Error
(
"Session destoryed."
);
}
...
...
@@ -230,9 +236,9 @@ UserSession.prototype.set = function(key, value) {
UserSession
.
prototype
.
get
=
function
(
key
)
{
var
value
=
null
;
if
(
this
.
available
)
{
value
=
this
.
_get
(
key
);
value
=
this
.
_get
(
key
);
}
else
{
throw
new
Error
(
"Session Destroyed."
);
throw
new
Error
(
"Session Destroyed."
);
}
return
value
;
};
...
...
@@ -241,9 +247,9 @@ UserSession.prototype._get = function(key) {
var
storage
=
window
.
sessionStorage
;
var
value
=
null
;
if
(
storage
)
{
value
=
storage
.
getItem
(
"AVWS_"
+
key
);
value
=
storage
.
getItem
(
"AVWS_"
+
key
);
}
return
value
;
return
value
;
};
/* destroy user session */
UserSession
.
prototype
.
destroy
=
function
()
{
...
...
@@ -338,7 +344,7 @@ function avwCreateUserSession() {
if
(
avwUserSessionObj
)
{
avwUserSessionObj
.
destroy
();
}
else
{
avwUserSessionObj
=
new
UserSession
();
avwUserSessionObj
=
new
UserSession
();
avwUserSessionObj
.
init
();
}
return
avwUserSessionObj
;
...
...
@@ -382,13 +388,13 @@ function avwCheckLogin(option) {
}
/* ログイン画面に戻る */
$
(
'#avw-unauth-ok'
).
click
(
function
()
{
window
.
location
=
returnPage
;
});
window
.
location
=
returnPage
;
});
return
false
;
}
return
true
;
};
/*
get user setting object */
/*
get user setting object */
function
avwUserSetting
()
{
if
(
avwUserSettingObj
==
null
)
{
avwUserSettingObj
=
new
UserSetting
();
...
...
@@ -396,24 +402,15 @@ function avwUserSetting() {
return
avwUserSettingObj
;
};
/* String.format function def. */
function
format
(
fmt
)
{
for
(
var
i
=
1
;
i
<
arguments
.
length
;
i
++
)
{
var
reg
=
new
RegExp
(
"
\\
{"
+
(
i
-
1
)
+
"
\\
}"
,
"g"
);
fmt
=
fmt
.
replace
(
reg
,
arguments
[
i
]);
}
return
fmt
;
};
/* CMS API Call(async. call) */
function
avwCmsApi
(
accountPath
,
apiName
,
type
,
params
,
success
,
error
)
{
var
sysSettings
=
avwSysSetting
();
_callCmsApi
(
sysSettings
.
apiUrl
,
accountPath
,
apiName
,
type
,
params
,
true
,
success
,
error
);
//
var sysSettings = avwSysSetting();
_callCmsApi
(
ClientData
.
conf_apiUrl
()
,
accountPath
,
apiName
,
type
,
params
,
true
,
success
,
error
);
};
/* CMS API Call(sync. call) */
function
avwCmsApiSync
(
accountPath
,
apiName
,
type
,
params
,
success
,
error
)
{
var
sysSettings
=
avwSysSetting
();
_callCmsApi
(
sysSettings
.
apiUrl
,
accountPath
,
apiName
,
type
,
params
,
false
,
success
,
error
);
//
var sysSettings = avwSysSetting();
_callCmsApi
(
ClientData
.
conf_apiUrl
()
,
accountPath
,
apiName
,
type
,
params
,
false
,
success
,
error
);
};
/* CMS API Call(async. call) */
function
avwCmsApiWithUrl
(
url
,
accountPath
,
apiName
,
type
,
params
,
success
,
error
)
{
...
...
@@ -433,12 +430,12 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
// url 構築
var
apiUrl
;
if
(
!
url
)
{
apiUrl
=
sysSettings
.
apiUrl
;
apiUrl
=
ClientData
.
conf_apiUrl
();
//
sysSettings.apiUrl;
}
else
{
apiUrl
=
url
;
}
if
(
accountPath
)
{
apiUrl
=
format
(
apiUrl
,
accountPath
)
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
)
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
...
...
@@ -467,7 +464,7 @@ function _callCmsApi(url, accountPath, apiName, type, params, async, success, er
},
success
:
function
(
data
)
{
if
(
success
)
{
success
(
data
);
success
(
data
);
}
},
error
:
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
...
...
@@ -565,9 +562,9 @@ function avwGrabContentPageImage(accountPath, params, success, error) {
//url 構築
var
apiUrl
;
apiUrl
=
sysSettings
.
apiUrl
;
apiUrl
=
ClientData
.
conf_apiUrl
();
//
sysSettings.apiUrl;
if
(
accountPath
)
{
apiUrl
=
format
(
apiUrl
,
accountPath
)
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
)
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
...
...
@@ -669,9 +666,9 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
//url 構築
var
apiUrl
;
apiUrl
=
sysSettings
.
apiUrl
;
apiUrl
=
ClientData
.
conf_apiUrl
();
//
sysSettings.apiUrl;
if
(
accountPath
)
{
apiUrl
=
format
(
apiUrl
,
accountPath
)
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
)
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
...
...
@@ -726,11 +723,11 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
* uploadBackupFileは multipart/form-data でPOST送信する
*/
xhr
.
setRequestHeader
(
'Content-Type'
,
'multipart/form-data; boundary='
+
boundary
);
//xhr.setRequestHeader('Content-Length', getByte(body));
//xhr.setRequestHeader('Content-Length',
AVWEB.
getByte(body));
},
success
:
function
(
data
)
{
if
(
success
)
{
success
(
data
);
success
(
data
);
}
},
error
:
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
...
...
@@ -743,22 +740,7 @@ function avwUploadBackupFile(accountPath, params, async, success, error) {
}
});
};
/* get bytes of text */
function
getByte
(
text
)
{
count
=
0
;
for
(
i
=
0
;
i
<
text
.
length
;
i
++
)
{
n
=
escape
(
text
.
charAt
(
i
));
if
(
n
.
length
<
4
)
{
count
++
;
}
else
{
count
+=
2
;
}
}
return
count
;
};
/* show system error message */
var
hasErrorKey
=
'AVW_HASERR'
;
function
showSystemError
()
{
if
(
avwHasError
())
{
...
...
@@ -799,7 +781,7 @@ function showSystemError() {
text
:
errMes
,
close
:
function
()
{
//ログアウト時と同じ後始末処理をしてログイン画面に戻す
if
(
!
webLogoutEvent
()
){
if
(
!
HEADER
.
webLogoutEvent
()
){
//ログアウト出来なかった
SessionStorageUtils
.
clear
();
avwUserSetting
().
remove
(
Keys
.
userInfo_sid
);
...
...
@@ -821,7 +803,7 @@ function avwHasError() {
var
session
=
window
.
sessionStorage
;
var
isError
=
false
;
if
(
session
)
{
isError
=
session
.
getItem
(
hasErrorKey
);
isError
=
session
.
getItem
(
AVWEB
.
hasErrorKey
);
}
return
(
isError
==
'true'
);
};
...
...
@@ -829,14 +811,14 @@ function avwHasError() {
function
avwSetErrorState
()
{
var
session
=
window
.
sessionStorage
;
if
(
session
)
{
session
.
setItem
(
hasErrorKey
,
true
);
session
.
setItem
(
AVWEB
.
hasErrorKey
,
true
);
}
};
/* エラー状態をクリア */
function
avwClearError
()
{
var
session
=
window
.
sessionStorage
;
if
(
session
)
{
session
.
setItem
(
hasErrorKey
,
false
);
session
.
setItem
(
AVWEB
.
hasErrorKey
,
false
);
}
};
/* ブラウザunload時に警告メッセージの出力設定を行う関数 */
...
...
@@ -860,18 +842,52 @@ function avwScreenMove(url) {
/* Debug Log */
function
avwLog
(
msg
)
{
if
(
avwSysSetting
().
debug
)
{
console
.
log
(
msg
);
console
.
log
(
msg
);
}
};
function
getApiUrl
(
accountPath
)
{
/* get bytes of text */
AVWEB
.
getByte
=
function
(
text
)
{
var
count
=
0
;
var
n
;
for
(
var
i
=
0
;
i
<
text
.
length
;
i
++
)
{
n
=
escape
(
text
.
charAt
(
i
));
if
(
n
.
length
<
4
)
{
count
++
;
}
else
{
count
+=
2
;
}
}
return
count
;
};
AVWEB
.
getApiUrl
=
function
(
accountPath
)
{
// url 構築
var
sysSettings
=
avwSysSetting
();
var
apiUrl
=
sysSettings
.
apiUrl
;
//
var sysSettings = avwSysSetting();
var
apiUrl
=
ClientData
.
conf_apiUrl
();
//
sysSettings.apiUrl;
if
(
accountPath
)
{
apiUrl
=
format
(
apiUrl
,
accountPath
);
apiUrl
=
AVWEB
.
format
(
apiUrl
,
accountPath
);
}
return
apiUrl
;
};
\ No newline at end of file
};
/* get url */
AVWEB
.
getURL
=
function
(
apiName
)
{
//var sysSettings = avwSysSetting();
var
url
=
ClientData
.
conf_apiResourceDlUrl
();
//sysSettings.apiResourceDlUrl;
url
=
AVWEB
.
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
/* String.format function def. */
AVWEB
.
format
=
function
(
fmt
)
{
for
(
var
i
=
1
;
i
<
arguments
.
length
;
i
++
)
{
var
reg
=
new
RegExp
(
"
\\
{"
+
(
i
-
1
)
+
"
\\
}"
,
"g"
);
fmt
=
fmt
.
replace
(
reg
,
arguments
[
i
]);
}
return
fmt
;
};
abvw/common/js/common.js
View file @
822c73cc
...
...
@@ -8,6 +8,9 @@
/// <reference path="pageViewer.js" />
/// <reference path="uuid.js" />
//グローバルの名前空間用のオブジェクトを用意する
var
COMMON
=
{};
// =============================================================================================
// Constants [start]
// =============================================================================================
...
...
@@ -322,7 +325,12 @@ var Keys = {
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition
:
'userOpt_pageTransition'
,
// Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod
:
'userOpt_pageTransitionPeriod'
userOpt_pageTransitionPeriod
:
'userOpt_pageTransitionPeriod'
,
isGetitsMode
:
'isGetitsMode'
,
conf_apiUrl
:
'conf_apiUrl'
,
conf_apiLoginUrl
:
'conf_apiLoginUrl'
,
conf_apiResourceDlUrl
:
'conf_apiResourceDlUrl'
/* -------------------------------------------------------------------------------- */
...
...
@@ -404,7 +412,7 @@ function ObjectLogEntity(){
/*
* Extract memo data from result of API and merge with local memo
*/
function
getDataMemo
(
jsonString
)
{
COMMON
.
getDataMemo
=
function
(
jsonString
)
{
var
memoDataFromServer
=
jsonString
.
data
;
var
arrLocalMemo
=
ClientData
.
MemoData
();
...
...
@@ -457,7 +465,7 @@ function getDataMemo(jsonString) {
/*
* Extract marking data from result of API and replace to local marking
*/
function
getDataMarking
(
jsonString
)
{
COMMON
.
getDataMarking
=
function
(
jsonString
)
{
var
data
=
jsonString
.
data
;
var
arr
=
ClientData
.
MarkingData
();
arr
.
clear
();
...
...
@@ -483,7 +491,7 @@ function getDataMarking(jsonString) {
/*
* Extract bookmark data from result of API and replace to local bookmark
*/
function
getDataBookmark
(
jsonString
)
{
COMMON
.
getDataBookmark
=
function
(
jsonString
)
{
var
data
=
jsonString
.
data
;
var
arr
=
ClientData
.
BookMarkData
();
arr
.
clear
();
...
...
@@ -518,7 +526,7 @@ If has not param (args.length = 0) -> getter
otherwise, return default result.
*/
function
operateData
(
args
,
strKey
,
returnDefaultData
)
{
COMMON
.
operateData
=
function
(
args
,
strKey
,
returnDefaultData
)
{
if
(
args
.
length
>
0
)
{
var
data
=
args
[
0
];
...
...
@@ -605,456 +613,456 @@ var ClientData = {
// Local
JumpQueue
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
JumpQueue
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
JumpQueue
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
JumpQueue
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
JumpQueue
,
[]);
}
},
// Local
ResourceVersion
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
ResourceVersion
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
ResourceVersion
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
ResourceVersion
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
ResourceVersion
,
[]);
}
},
// Local
ContentViewDetail
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
ContentViewDetail
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
ContentViewDetail
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
ContentViewDetail
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
ContentViewDetail
,
[]);
}
},
// Local
MetaVersion
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
MetaVersion
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
MetaVersion
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
MetaVersion
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
MetaVersion
,
[]);
}
},
// Local
ReadingContentIds
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
ReadingContentIds
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
ReadingContentIds
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
ReadingContentIds
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
ReadingContentIds
,
[]);
}
},
// Local: Bookmark collection
BookMarkData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
BookMarkData
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
BookMarkData
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
BookMarkData
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
BookMarkData
,
[]);
}
},
// Local: Marking collection
MarkingData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
MarkingData
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
MarkingData
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
MarkingData
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
MarkingData
,
[]);
}
},
// Local: content log collection
ContentLogData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
ContentLogData
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
ContentLogData
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
ContentLogData
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
ContentLogData
,
[]);
}
},
// Local: Memo collection
MemoData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
MemoData
,
[]);
COMMON
.
operateData
(
arguments
,
Keys
.
MemoData
,
[]);
}
else
{
return
operateData
(
arguments
,
Keys
.
MemoData
,
[]);
return
COMMON
.
operateData
(
arguments
,
Keys
.
MemoData
,
[]);
}
},
// Local
IsJumpBack
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
IsJumpBack
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
IsJumpBack
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
IsJumpBack
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
IsJumpBack
,
undefined
);
}
},
// Local
IsHideToolbar
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
IsHideToolbar
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
IsHideToolbar
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
IsHideToolbar
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
IsHideToolbar
,
undefined
);
}
},
// Local
IsAddingMarking
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
IsAddingMarking
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
IsAddingMarking
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
IsAddingMarking
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
IsAddingMarking
,
undefined
);
}
},
// Local
IsAddingMemo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
IsAddingMemo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
IsAddingMemo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
IsAddingMemo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
IsAddingMemo
,
undefined
);
}
},
// Local
IsDisplayMarking
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
IsDisplayMarking
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
IsDisplayMarking
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
IsDisplayMarking
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
IsDisplayMarking
,
undefined
);
}
},
// Local
IsDisplayMemo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
IsDisplayMemo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
IsDisplayMemo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
IsDisplayMemo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
IsDisplayMemo
,
undefined
);
}
},
// Local
MarkingType
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
MarkingType
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
MarkingType
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
MarkingType
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
MarkingType
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_ログアウトモード: Interger(0:logout with backup, 1:logout without backup)
userOpt_logoutMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_logoutMode
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_logoutMode
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_logoutMode
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_logoutMode
,
undefined
);
}
},
// Local
BookmarkScreen
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
BookmarkScreen
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
BookmarkScreen
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
BookmarkScreen
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
BookmarkScreen
,
undefined
);
}
},
// Local: isChangedMemo: boolean (true: changed, false: not change)
isChangedMemo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
isChangedMemo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
isChangedMemo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
isChangedMemo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
isChangedMemo
,
undefined
);
}
},
// Local: isChangedMakingData: boolean (true: changed, false: not change)
isChangedMarkingData
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
isChangedMarkingData
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
isChangedMarkingData
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
isChangedMarkingData
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
isChangedMarkingData
,
undefined
);
}
},
// Local: isChangedBookmark: boolean (true: changed, false: not change)
isChangedBookmark
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
isChangedBookmark
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
isChangedBookmark
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
isChangedBookmark
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
isChangedBookmark
,
undefined
);
}
},
// Local :共通(common)_コンテンツID:Integer
common_preContentId
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
common_preContentId
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
common_preContentId
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
common_preContentId
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
common_preContentId
,
undefined
);
}
},
// Local :ページ情報データ(common)_ページNo:Integer
common_prePageNo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
common_prePageNo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
common_prePageNo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
common_prePageNo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
common_prePageNo
,
undefined
);
}
},
// Local :ペン書式設定(penOpt)_色:String
penOpt_color
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
penOpt_color
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
penOpt_color
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
penOpt_color
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
penOpt_color
,
undefined
);
}
},
// Local :ペン書式設定(penOpt)_サイズ:Interger
penOpt_size
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
penOpt_size
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
penOpt_size
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
penOpt_size
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
penOpt_size
,
undefined
);
}
},
// Local :マーカ書式設定(maker)_色:String
maker_color
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
maker_color
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
maker_color
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
maker_color
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
maker_color
,
undefined
);
}
},
// Local :マーカ書式設定(maker)_サイズ:Interger
maker_size
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
maker_size
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
maker_size
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
maker_size
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
maker_size
,
undefined
);
}
},
// Local :消しゴム書式設定(erase)_色:String
erase_color
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
erase_color
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
erase_color
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
erase_color
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
erase_color
,
undefined
);
}
},
// Local :消しゴム書式設定(erase)_サイズ:Interger
erase_size
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
erase_size
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
erase_size
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
erase_size
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
erase_size
,
undefined
);
}
},
// Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime
userInfo_lastLoginTime
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userInfo_lastLoginTime
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userInfo_lastLoginTime
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userInfo_lastLoginTime
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userInfo_lastLoginTime
,
undefined
);
}
},
// Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime
userInfo_pwdSkipDt
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userInfo_pwdSkipDt
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userInfo_pwdSkipDt
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userInfo_pwdSkipDt
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userInfo_pwdSkipDt
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_videoMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_videoMode
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_videoMode
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_videoMode
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_videoMode
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_音楽繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
userOpt_musicMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_musicMode
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_musicMode
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_musicMode
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_musicMode
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_マーキング表示設定:Interger(0:表示しない, 1:表示する)
userOpt_makingDsp
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_makingDsp
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_makingDsp
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_makingDsp
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_makingDsp
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_アラート表示設定:Interger(0:表示しない, 1:表示する)
userOpt_closeOrRefreshAlert
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_closeOrRefreshAlert
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_closeOrRefreshAlert
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_closeOrRefreshAlert
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_closeOrRefreshAlert
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップ確認フラグ:Interger(0:する, 1:しない)
userOpt_bkConfirmFlg
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_bkConfirmFlg
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkConfirmFlg
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_bkConfirmFlg
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkConfirmFlg
,
undefined
);
}
},
// Local :並び順(sortOpt)_表示モード:Interger(0:本棚, 1:リスト)
sortOpt_viewMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
sortOpt_viewMode
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_viewMode
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
sortOpt_viewMode
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_viewMode
,
undefined
);
}
},
// Local :並び順(sortOpt)_表示区分:Interger(0:ジャンル, 1:グループ)
sortOpt_viewType
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
sortOpt_viewType
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_viewType
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
sortOpt_viewType
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_viewType
,
undefined
);
}
},
// Local :並び順(sortOpt)_ソート基準:Interger(1:コンテンツ検索, 2:タグ検索, 3:全文検索)
sortOpt_searchDivision
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
sortOpt_searchDivision
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_searchDivision
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
sortOpt_searchDivision
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_searchDivision
,
undefined
);
}
},
// Local: 並び順(sortOpt)_ソート方法:Interger(1:タイトル名, 2:タイトル名(かな), 3:公開順)
sortOpt_sortType
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
sortOpt_sortType
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_sortType
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
sortOpt_sortType
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
sortOpt_sortType
,
undefined
);
}
},
// Local :しおりデータ(bookmark)_ページNo:Interger
bookmark_pageNo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
bookmark_pageNo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
bookmark_pageNo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
bookmark_pageNo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
bookmark_pageNo
,
undefined
);
}
},
// Local :メモデータ(memo)_コンテンツID:Interger
memo_contentNo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
memo_contentNo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
memo_contentNo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
memo_contentNo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
memo_contentNo
,
undefined
);
}
},
// Local :メモデータ(memo)_ページNo:Interger
memo_pageNo
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
memo_pageNo
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
memo_pageNo
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
memo_pageNo
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
memo_pageNo
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_マーキング:Interger
userOpt_bkMakingFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_bkMakingFlag
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkMakingFlag
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_bkMakingFlag
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkMakingFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_メモ:Interger
userOpt_bkMemoFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_bkMemoFlag
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkMemoFlag
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_bkMemoFlag
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkMemoFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_バックアップデフォルト_しおり:Interger
userOpt_bkShioriFlag
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_bkShioriFlag
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkShioriFlag
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_bkShioriFlag
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_bkShioriFlag
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_ビューのアニメーション種類:Interger
userOpt_pageTransition
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_pageTransition
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_pageTransition
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_pageTransition
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_pageTransition
,
undefined
);
}
},
// Local :ユーザオプション(userOpt)_アニメーション時間:Float
userOpt_pageTransitionPeriod
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
operateData
(
arguments
,
Keys
.
userOpt_pageTransitionPeriod
,
undefined
);
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_pageTransitionPeriod
,
undefined
);
}
else
{
return
operateData
(
arguments
,
Keys
.
userOpt_pageTransitionPeriod
,
undefined
);
return
COMMON
.
operateData
(
arguments
,
Keys
.
userOpt_pageTransitionPeriod
,
undefined
);
}
},
...
...
@@ -1560,7 +1568,38 @@ var ClientData = {
}
else
{
return
SessionStorageUtils
.
get
(
Keys
.
serviceOpt_web_screen_lock_wait
);
}
},
isGetitsMode
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
Keys
.
isGetitsMode
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
Keys
.
isGetitsMode
);
}
},
conf_apiUrl
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
Keys
.
conf_apiUrl
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
Keys
.
conf_apiUrl
);
}
},
conf_apiLoginUrl
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
Keys
.
conf_apiLoginUrl
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
Keys
.
conf_apiLoginUrl
);
}
},
conf_apiResourceDlUrl
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
Keys
.
conf_apiResourceDlUrl
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
Keys
.
conf_apiResourceDlUrl
);
}
}
};
// -------------------------------------------------
...
...
@@ -1843,7 +1882,7 @@ Array.prototype.clear = function () {
Remove extension of specified name
Ex: aaaa.mp3 -> aaa
*/
function
removeExt
(
strName
)
{
COMMON
.
removeExt
=
function
(
strName
)
{
if
(
strName
)
{
var
arrString
=
strName
.
split
(
'.'
);
var
strResult
=
""
;
...
...
@@ -1983,12 +2022,12 @@ var ValidationUtil = {
};
// Get format based64 string to show inline
function
getBase64Image
(
imgSource
)
{
COMMON
.
getBase64Image
=
function
(
imgSource
)
{
return
imgSource
.
replace
(
/^data:image
\/(
png|jpg
)
;base64,/
,
""
);
};
// get time wait lockscreen
function
getTimeWaitLockScree
n
()
{
COMMON
.
getTimeWaitLockScreen
=
functio
n
()
{
var
timeWaitLockScreen
=
-
1
;
if
(
ClientData
.
serviceOpt_web_screen_lock
()
==
"Y"
)
{
...
...
@@ -2012,34 +2051,24 @@ function getTimeWaitLockScreen() {
};
// Do locking screen after idle time
function
LockScreen
()
{
COMMON
.
LockScreen
=
function
()
{
if
(
avwUserSession
())
{
// no lockscreen for user anonymous
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
return
;
}
var
timeWaitLockScreen
=
getTimeWaitLockScreen
();
var
timeWaitLockScreen
=
COMMON
.
getTimeWaitLockScreen
();
if
(
timeWaitLockScreen
>
0
)
{
//var message = i18nText("sysInfoScrLock01");
screenLock
({
timeout
:
timeWaitLockScreen
,
html
:
'<img src="img/1222.png" alt="Screen Lock" /><br />'
,
//+ message,
unlockFunc
:
unlockFunction
,
unlockFunc
:
COMMON
.
unlockFunction
,
errorMessage
:
i18nText
(
'msgLoginErrWrong'
)
});
}
// if (ClientData.serviceOpt_force_login_periodically() == "Y") {
// //var message = i18nText("sysInfoScrLock01");
// screenLock({
// timeout: Consts.ConstLockScreenTime,
// html: '<img src="img/1222.png" alt="Screen Lock" /><br />', //+ message,
// unlockFunc: unlockFunction,
// errorMessage: i18nText('msgLoginErrWrong')
// });
// }
}
};
...
...
@@ -2109,7 +2138,7 @@ $(function () {
});
// Unlock the locked screen by inputing password on screen to check authentication
function
unlockF
unction
(
inputPass
)
{
COMMON
.
unlockFunction
=
f
unction
(
inputPass
)
{
var
forceUnlockFunc
=
arguments
[
1
];
// added secret arguments : forceUnlockFunction
var
result
=
false
;
var
params
=
{
...
...
@@ -2120,8 +2149,8 @@ function unlockFunction(inputPass) {
};
// Get url to login
var
sysSettings
=
avwSysSetting
();
var
apiLoginUrl
=
sysSettings
.
apiLoginUrl
;
//
var sysSettings = avwSysSetting();
var
apiLoginUrl
=
ClientData
.
conf_apiLoginUrl
();
//
sysSettings.apiLoginUrl;
var
errorCode
=
''
;
avwCmsApiSyncWithUrl
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GET'
,
params
,
function
(
data
)
{
...
...
@@ -2159,7 +2188,7 @@ function unlockFunction(inputPass) {
onUnlock
();
}
}
return
{
'result'
:
result
,
'errorCode'
:
errorCode
,
'newTimeout'
:
getTimeWaitLockScreen
()
};
return
{
'result'
:
result
,
'errorCode'
:
errorCode
,
'newTimeout'
:
COMMON
.
getTimeWaitLockScreen
()
};
};
...
...
@@ -2167,7 +2196,7 @@ function unlockFunction(inputPass) {
/*
Set starting log for reading content
*/
function
SetStartLog
(
strContentId
)
{
COMMON
.
SetStartLog
=
function
(
strContentId
)
{
//abe pageLogもセット
...
...
@@ -2213,7 +2242,7 @@ function SetStartLog(strContentId) {
};
// Set ending log for reading content
function
SetEndLog
(
strContentId
)
{
COMMON
.
SetEndLog
=
function
(
strContentId
)
{
//abe pageLogもセット
...
...
@@ -2236,7 +2265,7 @@ function SetEndLog(strContentId) {
};
// 1ページ分のページ閲覧ログを作成
function
SetPageLog
(
strContentId
,
strPageNo
){
COMMON
.
SetPageLog
=
function
(
strContentId
,
strPageNo
){
var
arrContentLogs
=
ClientData
.
ContentLogData
();
...
...
@@ -2256,7 +2285,7 @@ function SetPageLog( strContentId, strPageNo ){
}
// 1アクションのオブジェクトログを作成
function
SetObjectLog
(
strContentId
,
objectLog
){
COMMON
.
SetObjectLog
=
function
(
strContentId
,
objectLog
){
var
arrContentLogs
=
ClientData
.
ContentLogData
();
...
...
@@ -2272,7 +2301,7 @@ function SetObjectLog( strContentId, objectLog ){
}
// 前回の1アクションのオブジェクトログの利用時間を設定
function
SetObjectLogActionTime
(
strContentId
,
objectId
,
actionTime
){
COMMON
.
SetObjectLogActionTime
=
function
(
strContentId
,
objectId
,
actionTime
){
var
arrContentLogs
=
ClientData
.
ContentLogData
();
...
...
@@ -2293,7 +2322,7 @@ function SetObjectLogActionTime( strContentId, objectId, actionTime ){
/*
Register reading log of content to server by calling api
*/
function
RegisterLog
()
{
COMMON
.
RegisterLog
=
function
()
{
var
arrContentLogs
=
ClientData
.
ContentLogData
();
var
isError
=
false
;
...
...
@@ -2463,8 +2492,7 @@ function RegisterLog() {
// Disable specified objects
function
disable
()
{
COMMON
.
disable
=
function
()
{
for
(
var
nIndex
=
0
;
nIndex
<
arguments
.
length
;
nIndex
++
)
{
if
(
$
(
arguments
[
nIndex
]))
{
$
(
arguments
[
nIndex
]).
attr
(
'disabled'
,
'disabled'
);
...
...
@@ -2472,8 +2500,7 @@ function disable() {
}
};
// Enable specified objects
function
enable
()
{
COMMON
.
enable
=
function
()
{
for
(
var
nIndex
=
0
;
nIndex
<
arguments
.
length
;
nIndex
++
)
{
if
(
$
(
arguments
[
nIndex
]))
{
$
(
arguments
[
nIndex
]).
removeAttr
(
'disabled'
);
...
...
@@ -2482,12 +2509,12 @@ function enable() {
};
// Stop waiting screen
function
StopWaitProcess
()
{
COMMON
.
StopWaitProcess
=
function
()
{
$
(
'#avw-sys-modal-wait'
).
hide
();
};
// Show waiting screen
function
WaitProcess
()
{
COMMON
.
WaitProcess
=
function
()
{
if
(
document
.
getElementById
(
'avw-sys-modal-wait'
))
{
$
(
'#avw-sys-modal-wait'
).
show
();
}
...
...
@@ -2519,12 +2546,12 @@ function WaitProcess() {
};
// Hide the locking layout
function
unlockLayout
()
{
COMMON
.
unlockLayout
=
function
()
{
$
(
'#avw-sys-modal'
).
hide
();
};
// Show the locking layout
function
lockLayout
()
{
COMMON
.
lockLayout
=
function
()
{
if
(
document
.
getElementById
(
'avw-sys-modal'
))
{
$
(
'#avw-sys-modal'
).
show
();
}
...
...
@@ -2593,7 +2620,7 @@ String.prototype.replaceAll = function (oldText, newText) {
/*
Get string by number of lines
*/
function
getLines
(
source
,
number
)
{
COMMON
.
getLines
=
function
(
source
,
number
)
{
var
result
=
""
;
var
arrSource
=
new
Array
();
arrSource
=
source
.
split
(
'
\
n'
);
...
...
@@ -2613,7 +2640,7 @@ function getLines(source, number) {
/*
Convert yyyy-MM-dd hh:mm:ss.f to Date
*/
function
convertToDate
(
input
)
{
COMMON
.
convertToDate
=
function
(
input
)
{
var
dateResult
;
var
nYear
=
0
;
var
nMonth
=
0
;
...
...
@@ -2661,14 +2688,14 @@ function convertToDate(input) {
/*
Escape html
*/
function
htmlEncode
(
value
)
{
COMMON
.
htmlEncode
=
function
(
value
)
{
return
jQuery
(
'<div/>'
).
text
(
value
||
''
).
html
();
};
/*
Check if browser is on touch device
*/
function
isTouchDevice
()
{
COMMON
.
isTouchDevice
=
function
()
{
var
is_touch_device
=
'ontouchstart'
in
document
.
documentElement
;
if
(
is_touch_device
)
{
return
true
;
...
...
@@ -2679,7 +2706,7 @@ function isTouchDevice() {
/*
Get total bytes of jp chars
*/
function
getBytes
(
value
)
{
COMMON
.
getBytes
=
function
(
value
)
{
var
escapedStr
=
encodeURI
(
value
);
if
(
escapedStr
.
indexOf
(
"%"
)
!=
-
1
)
{
...
...
@@ -2697,10 +2724,10 @@ function getBytes(value) {
/*
Truncate by bytes
*/
function
truncateByBytes
(
value
,
byteCount
)
{
COMMON
.
truncateByBytes
=
function
(
value
,
byteCount
)
{
var
strResult
=
""
;
for
(
var
nIndex
=
0
;
nIndex
<
value
.
length
;
nIndex
++
)
{
if
(
getBytes
(
strResult
+
value
[
nIndex
])
<=
byteCount
)
{
if
(
COMMON
.
getBytes
(
strResult
+
value
[
nIndex
])
<=
byteCount
)
{
strResult
+=
value
[
nIndex
];
}
else
{
...
...
@@ -2710,8 +2737,19 @@ function truncateByBytes(value, byteCount) {
return
strResult
;
};
function
ToogleLogoutNortice
()
{
if
(
isAnonymousLogin
())
{
COMMON
.
truncate
=
function
(
strInput
,
length
){
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
COMMON
.
ToogleLogoutNortice
=
function
()
{
if
(
COMMON
.
isAnonymousLogin
())
{
return
;
}
var
isShow
=
false
;
...
...
@@ -2730,7 +2768,7 @@ function ToogleLogoutNortice() {
/*
Get UTC Time ( GMT + 0 )
*/
function
getUtcTime
()
{
COMMON
.
getUtcTime
=
function
()
{
var
curTime
=
new
Date
();
/* get time zone */
...
...
@@ -2743,24 +2781,24 @@ function getUtcTime() {
};
// Convert UTC time to Date object
function
convertUtcToDate
(
utcTime
)
{
COMMON
.
convertUtcToDate
=
function
(
utcTime
)
{
return
new
Date
(
Number
(
utcTime
));
};
// Get UUID version 4
function
getUUID
()
{
COMMON
.
getUUID
=
function
()
{
return
uuid
.
v4
();
};
/*
Check is anonymous user login
*/
function
isAnonymousLogi
n
()
{
COMMON
.
isAnonymousLogin
=
functio
n
()
{
return
avwSysSetting
().
anonymousLoginFlg
;
}
/* Check if current browser is IE9 */
function
isIE9
()
{
COMMON
.
isIE9
=
function
()
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
/msie 9.0/
.
test
(
ua
))
{
...
...
@@ -2770,20 +2808,10 @@ function isIE9() {
};
/* Check if current browser is IE10 */
function
isIE10
()
{
COMMON
.
isIE10
=
function
()
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
/msie 10.0/
.
test
(
ua
))
{
return
true
;
}
/*
if (window.navigator.msPointerEnabled) {
return true;
} else {
var ua = window.navigator.userAgent.toLowerCase();
if (/msie 10.0/.test(ua)) {
return true;
}
}
*/
return
false
;
};
abvw/common/js/screenLock.js
View file @
822c73cc
...
...
@@ -219,7 +219,7 @@ removeLockState();
if
(
unlockFunc
)
{
var
val
=
unlockFunc
(
$
(
'#passwd-txt'
).
val
(),
forceUnlockFunc
);
if
(
!
val
.
result
)
{
$
(
'#screenLockErrMsg'
).
text
(
format
(
errorMessage
,
val
.
errorCode
.
errorMessage
));
$
(
'#screenLockErrMsg'
).
text
(
AVWEB
.
format
(
errorMessage
,
val
.
errorCode
.
errorMessage
));
$
(
'#screenLockErrMsg'
).
fadeIn
();
$
(
'#passwd-txt'
).
focus
();
...
...
abvw/home.html
View file @
822c73cc
...
...
@@ -46,8 +46,8 @@
<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/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>
<script
type=
"text/javascript"
src=
"./js/home.js?#UPDATEID#"
></script>
<script
type=
"text/javascript"
src=
"./common/js/scrolltopcontrol.js?#UPDATEID#"
></script>
<script
type=
"text/javascript"
src=
"./common/js/tab.js?#UPDATEID#"
></script>
<script
type=
"text/javascript"
src=
"./common/js/jquery.cookie.js?#UPDATEID#"
></script>
...
...
abvw/js/Limit_Access_Content.js
View file @
822c73cc
...
...
@@ -21,7 +21,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$
(
'#limit_level1 .deletebtn .cancel'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
COMMON
.
unlockLayout
();
}
$
(
'#limit_level1'
).
hide
();
//キャンセル
...
...
@@ -36,7 +36,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$
(
'#limit_level1 .deletebtn .ok'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
COMMON
.
unlockLayout
();
}
$
(
'#limit_level1'
).
hide
();
funcOk
();
...
...
@@ -76,7 +76,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
$
(
'#limit_level2 .deletebtn .cancel'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
COMMON
.
unlockLayout
();
}
$
(
'#limit_level2'
).
hide
();
//キャンセル
...
...
@@ -123,14 +123,14 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
ClientData
.
userInfo_sid
(
data
.
sid
);
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
COMMON
.
unlockLayout
();
}
$
(
'#limit_level2'
).
hide
();
// open content
funcOk
();
}
else
{
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
$
(
'#lblMessageLimitError'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
...
...
@@ -138,7 +138,7 @@ function checkLimitContent(contentId, funcOk, funcCancel, isNotUnlockScreen) {
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
errorCode
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
}
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
errorCode
).
toString
()).
show
();
$
(
'#lblMessageLimitError'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
errorCode
).
toString
()).
show
();
}
);
...
...
abvw/js/bookmark.js
View file @
822c73cc
...
...
@@ -29,7 +29,7 @@ $(document).ready(function () {
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
))
return
;
LockScreen
();
COMMON
.
LockScreen
();
document
.
title
=
i18nText
(
'dspShiori'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
...
...
@@ -79,10 +79,10 @@ $(document).ready(function () {
dspTitleNm_Click
();
}
else
{
checkForceChangePassword
();
HEADER
.
checkForceChangePassword
();
}
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
//プッシュメッセージ隠す
$
(
'#dspPushMessage'
).
hide
();
}
...
...
@@ -127,7 +127,7 @@ function dspTitleNm_Click() {
// $("#dspPubDt").removeClass("active_tops");
//changeStatusSort(this, isAsc);
setStatusSort
(
'#dspTitleNm'
,
isAsc
);
HEADER
.
setStatusSort
(
'#dspTitleNm'
,
isAsc
);
};
function
dspTitleNmKn_Click
()
{
...
...
@@ -155,7 +155,7 @@ function dspTitleNmKn_Click() {
// $("#dspPubDt").removeClass("active_tops");
//changeStatusSort(this, isAsc);
setStatusSort
(
'#dspTitleNmKn'
,
isAsc
);
HEADER
.
setStatusSort
(
'#dspTitleNmKn'
,
isAsc
);
};
function
dspPubDt_Click
()
{
...
...
@@ -183,7 +183,7 @@ function dspPubDt_Click() {
// $("#dspPubDt").addClass("active_tops");
//changeStatusSort(this, isAsc);
setStatusSort
(
'#dspPubDt'
,
isAsc
);
HEADER
.
setStatusSort
(
'#dspPubDt'
,
isAsc
);
};
// Event of each button [読む]
...
...
@@ -216,7 +216,7 @@ function dspCancel_Click() {
// Close dialog
//$('#dlgConfirm').dialog('close');
$
(
"#delete_shiori"
).
hide
();
unlockLayout
();
COMMON
.
unlockLayout
();
};
// Process deleting
function
dspConfirmOK_Click
()
{
...
...
@@ -258,7 +258,7 @@ function dspConfirmOK_Click() {
// --------------------------------
$
(
"#delete_shiori"
).
hide
();
unlockLayout
();
COMMON
.
unlockLayout
();
};
function
dspDelete1_Click
()
{
...
...
@@ -267,7 +267,7 @@ function dspDelete1_Click() {
function
dspDelete_Click
()
{
if
(
$
(
"input[name='chkDelete']:checked"
).
length
>
0
)
{
lockLayout
();
COMMON
.
lockLayout
();
$
(
"#delete_shiori"
).
show
();
$
(
"#delete_shiori"
).
center
();
}
...
...
@@ -342,12 +342,12 @@ function ShowBookmark() {
var
pageThumbnail
=
(
pageDetail
.
pageThumbnail
!=
pathImgContentNone
)
?
(
"data:image/jpeg;base64,"
+
pageDetail
.
pageThumbnail
)
:
pathImgContentNone
;
insertRow
(
contentid
,
pageThumbnail
,
htmlEncode
(
contentTitle
),
insertRow
(
contentid
,
pageThumbnail
,
COMMON
.
htmlEncode
(
contentTitle
),
pageDetail
.
pageText
,
pageDetail
.
pageNo
,
hasMemo
,
hasMarking
,
nIndex
,
contentType
);
}
else
{
// Not existed -> Show error
insertRowError
(
contentid
,
htmlEncode
(
contentTitle
),
pageDetail
.
pageNo
);
insertRowError
(
contentid
,
COMMON
.
htmlEncode
(
contentTitle
),
pageDetail
.
pageNo
);
}
}
...
...
@@ -379,7 +379,7 @@ function SortTitleName(isAsc) {
// $("#txtTitleNmDesc").show();
// }
setStatusSort
(
'#dspTitleNm'
,
isAsc
);
HEADER
.
setStatusSort
(
'#dspTitleNm'
,
isAsc
);
var
arrSource
=
ClientData
.
BookMarkData
();
var
arrTarget
=
[];
...
...
@@ -451,7 +451,7 @@ function SortTitleNameKana(isAsc) {
// $("#txtTitleNmKnDesc").show();
// }
setStatusSort
(
'#dspTitleNmKn'
,
isAsc
);
HEADER
.
setStatusSort
(
'#dspTitleNmKn'
,
isAsc
);
var
arrSource
=
ClientData
.
BookMarkData
();
var
arrTarget
=
[];
...
...
@@ -507,7 +507,7 @@ function SortPubDate(isAsc) {
// $("#txtPubDtDesc").show();
// }
setStatusSort
(
'#dspPubDt'
,
isAsc
);
HEADER
.
setStatusSort
(
'#dspPubDt'
,
isAsc
);
var
arrSource
=
ClientData
.
BookMarkData
();
var
arrTarget
=
[];
...
...
@@ -592,7 +592,7 @@ function insertRowError(contentid, pageTitle, pageNo) {
newRow
+=
'</span>'
;
newRow
+=
" <div class='text'>"
;
newRow
+=
' <label class="name">'
+
truncate
(
pageTitle
,
20
)
+
'</label>'
;
newRow
+=
' <label class="name">'
+
COMMON
.
truncate
(
pageTitle
,
20
)
+
'</label>'
;
newRow
+=
' <div class="info">'
;
newRow
+=
" <label class='lang name' lang='msgShioriDeleted'>"
+
i18nText
(
'msgShioriDeleted'
)
+
"</label>"
;
...
...
@@ -620,15 +620,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow += '<img id="loadingIcon' + contentid + "_" + pageNo + '" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 46px; "/>';
newRow += "</a>";
newRow += "<div class='text'>";
//newRow += '<label id="Label1" class="name" style="color: #2D83DA;">' + truncate(pageTitle, 20) + '</label>';
newRow += '<a class="name" href="#" id="Label1">' + truncate(pageTitle, 20) + '</a>'; //<img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">
//newRow += '<label id="Label1" class="name" style="color: #2D83DA;">' +
COMMON.
truncate(pageTitle, 20) + '</label>';
newRow += '<a class="name" href="#" id="Label1">' +
COMMON.
truncate(pageTitle, 20) + '</a>'; //<img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">
newRow += '<div class="info">';
newRow += '<ul class="date">';
newRow += '<li><label id="Label2" class="lang" lang="txtPage">' + i18nText('txtPage') + '</label><label id="Label3">' + pageNo + '</label></li>';
var contentText =
htmlEncode(
getLines(pageText, 3));
var contentText =
COMMON.htmlEncode(COMMON.
getLines(pageText, 3));
newRow += '<li><label id="Label1">' + truncate(contentText, 80) + '</label></li>';
newRow += '<li><label id="Label1">' +
COMMON.
truncate(contentText, 80) + '</label></li>';
newRow += "</ul>";
newRow += '<ul class="pic" style="align:right">';
...
...
@@ -698,15 +698,15 @@ function insertRow(contentid, pageThumbnail, pageTitle, pageText, pageNo, hasMem
newRow
+=
'</a>'
;
newRow
+=
'<div class="text">'
;
//newRow += '<a class="name" href="#"><img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">' + truncate(pageTitle, 20) + '</a>';
newRow
+=
'<a class="name" href="#">'
+
truncate
(
pageTitle
,
20
)
+
'</a>'
;
//newRow += '<a class="name" href="#"><img src="img/bookshelf/icon_01.jpg" width="20" height="20" class="listIcon">' +
COMMON.
truncate(pageTitle, 20) + '</a>';
newRow
+=
'<a class="name" href="#">'
+
COMMON
.
truncate
(
pageTitle
,
20
)
+
'</a>'
;
newRow
+=
'<div class="info">'
;
newRow
+=
'<ul class="date">'
;
var
contentText
=
htmlEncode
(
getLines
(
pageText
,
3
));
var
contentText
=
COMMON
.
htmlEncode
(
COMMON
.
getLines
(
pageText
,
3
));
newRow
+=
'<li><label id="Label1">'
+
truncate
(
contentText
,
60
)
+
'</label></li>'
;
newRow
+=
'<li><label id="Label1">'
+
COMMON
.
truncate
(
contentText
,
60
)
+
'</label></li>'
;
// newRow +='<li>公開日:2012/09/14</li>';
// newRow += '<li>閲覧日:2012/09/18</li>';
...
...
@@ -964,7 +964,7 @@ function changeLanguageCallBackFunction() {
// else {
// $("#txtTitleNmKnDesc").show();
// }
setStatusSort
(
'#dspTitleNmKn'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#dspTitleNmKn'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
}
document
.
title
=
i18nText
(
'dspShiori'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
...
...
@@ -1078,13 +1078,13 @@ Setting dialog [ end ]
----------------------------------------------------------------------------
*/
function
truncate
(
strInput
,
length
){
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
//
function truncate(strInput, length){
//
if (strInput.length <= length)
//
{
//
return strInput;
//
}
//
else
//
{
//
return strInput.substring(0, length) + "...";
//
}
//
};
abvw/js/contentsearch.js
View file @
822c73cc
...
...
@@ -60,7 +60,7 @@ $(document).ready(function(){
return
;
}
LockScreen
();
COMMON
.
LockScreen
();
document
.
title
=
i18nText
(
'txtSearchResult'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
...
...
@@ -134,10 +134,10 @@ $(document).ready(function(){
});
}
else
{
//Check if Force Change password
checkForceChangePassword
();
HEADER
.
checkForceChangePassword
();
}
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
//プッシュメッセージ隠す
$
(
'#dspPushMessage'
).
hide
();
}
...
...
@@ -237,7 +237,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' </a>'
+' <div class="text">'
+' <a id="title'+post.contentId+'" class="dialog name" contentid="'+post.contentId+'">'+
truncate(
htmlEncode(post.contentTitle), 25)+'</a>'
+' <a id="title'+post.contentId+'" class="dialog name" contentid="'+post.contentId+'">'+
COMMON.truncate(COMMON.
htmlEncode(post.contentTitle), 25)+'</a>'
+' <div class="info">'
+' <ul class="date">'
+' <li><span class="lang" lang="txtPubDt"> </span> : '+outputDate+'</li>'
...
...
@@ -265,8 +265,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' </a>'
+
' <div class="text">'
+
' <a id="title'
+
post
.
contentId
+
'" class="name dialog" contentid="'
+
post
.
contentId
+
'">'
+
' <img class="listIcon" src="'
+
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
' <img class="listIcon" src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
+
' <div class="info">'
+
' <ul class="date">'
...
...
@@ -398,7 +398,7 @@ function handleLanguage(){
// $('#titlekana-sorttype').css('width', '12px');
// }
// }
setStatusSort
(
'#'
+
$
(
'#menu_sort li.current a'
).
attr
(
'id'
),
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#'
+
$
(
'#menu_sort li.current a'
).
attr
(
'id'
),
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
if
(
noRecordFlg
){
$
(
'#control-sort-titlekana'
).
css
(
'display'
,
'block'
);
...
...
@@ -641,7 +641,7 @@ function sortByTitleFunction(){
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-title'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-title'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
...
...
@@ -713,7 +713,7 @@ function sortByTitleKanaFunction(){
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-titlekana'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-titlekana'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
...
...
@@ -786,7 +786,7 @@ function sortByReleaseDateFunction(){
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-releasedate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-releasedate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
){
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
...
...
@@ -879,13 +879,13 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//};
/* get url */
function
getURL
(
apiName
)
{
var
sysSettings
=
avwSysSetting
();
var
url
=
sysSettings
.
apiResourceDlUrl
;
url
=
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
/
//
* get url */
//
function getURL(apiName) {
//
var sysSettings = avwSysSetting();
//
var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.
format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
//
return url;
//
};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content.
...
...
@@ -976,13 +976,13 @@ function readSubmenuFunction_callback(contentId)
//For testing without other Type.
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
HEADER
.
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
contentId
);
HEADER
.
viewLinkContentById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
...
...
@@ -1587,7 +1587,7 @@ function handleSortDisp(){
//
// $('#control-sort-title').addClass('active_tops');
setStatusSort
(
'#control-sort-title'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-title'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
if
(
typeSort
==
2
){
...
...
@@ -1609,7 +1609,7 @@ function handleSortDisp(){
//
// $('#control-sort-titlekana').addClass('active_tops');
setStatusSort
(
'#control-sort-titlekana'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-titlekana'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
if
(
typeSort
==
3
){
...
...
@@ -1630,7 +1630,7 @@ function handleSortDisp(){
//
// $('#control-sort-releasedate').addClass('active_tops');
setStatusSort
(
'#control-sort-releasedate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-releasedate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
}
}
...
...
@@ -1761,7 +1761,7 @@ function refreshGrid(){
function
formatDisplayMoreRecord
(){
i18nReplaceText
();
//changeLanguage(ClientData.userInfo_language());
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
$
(
'#control-nextrecord'
).
html
(
AVWEB
.
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
};
...
...
@@ -1811,16 +1811,16 @@ function enableSort(){
}
};
function
truncate
(
strInput
,
length
){
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
//
function truncate(strInput, length){
//
if (strInput.length <= length)
//
{
//
return strInput;
//
}
//
else
//
{
//
return strInput.substring(0, length) + "...";
//
}
//
};
function
resizeResourceThumbnail
(
mg
,
width
,
height
)
{
var
newWidth
;
...
...
@@ -1846,7 +1846,7 @@ function resizeResourceThumbnail(mg, width, height) {
function
removeHoverCss
(){
if
(
isTouchDevice
()){
if
(
COMMON
.
isTouchDevice
()){
$
(
'#control-sort-title'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'nottouchdevice'
);
...
...
abvw/js/contentview.js
View file @
822c73cc
...
...
@@ -13,7 +13,7 @@ function sizingScreen() {
w
=
$
(
window
).
width
();
h
=
$
(
window
).
height
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
var
tempRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
if
(
tempRatio
<=
1
)
{
...
...
@@ -58,7 +58,7 @@ function handleMemo() {
//change class
$
(
'#imgmemo'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#imgmemo'
).
addClass
(
'memoDisplay_device'
);
}
else
{
$
(
'#imgmemo'
).
addClass
(
'memoDisplay'
);
...
...
@@ -69,7 +69,7 @@ function handleMemo() {
//change class
$
(
'#imgaddmemo'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#imgaddmemo'
).
addClass
(
'memoAdd_device'
);
}
else
{
$
(
'#imgaddmemo'
).
addClass
(
'memoAdd'
);
...
...
@@ -201,7 +201,7 @@ function bookmarkPage() {
}
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark.
enBookmark
.
bookmarkid
=
getUUID
();
enBookmark
.
bookmarkid
=
COMMON
.
getUUID
();
enBookmark
.
registerDate
=
new
Date
();
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new bookmark.
var
listBM
=
[];
...
...
@@ -225,7 +225,7 @@ function bookmarkPage() {
//change class
$
(
'#imgbookmark'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#imgbookmark'
).
addClass
(
'bmAdd_device'
);
}
else
{
$
(
'#imgbookmark'
).
addClass
(
'bmAdd'
);
...
...
@@ -333,7 +333,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_'
+
bmList
[
nIndex
].
pageNo
+
'" class="imgbox" src="'
+
formatStringBase64
(
dataStored
[
nStored
].
pageThumbnail
)
+
'"/>'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
1
)
+
'<br /> '
+
truncate
(
htmlEncode
(
contentPage
[
nIndexBookMark
].
pageText
),
20
)
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
contentPage
[
nIndexBookMark
].
pageText
),
20
)
+
' </span>'
+
' </li>'
);
...
...
@@ -365,7 +365,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_'
+
bmList
[
nIndex
].
pageNo
+
'" class="imgbox" src="img/view_loading.gif" />'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
bmList
[
nIndex
].
pageNo
)
+
1
)
+
'<br /> '
+
truncate
(
htmlEncode
(
contentPage
[
nIndexBookMark
].
pageText
),
20
)
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
contentPage
[
nIndexBookMark
].
pageText
),
20
)
+
' </span>'
+
' </li>'
);
...
...
@@ -430,7 +430,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_'
+
bmList
[
nIndex
].
pageNo
+
'" class="imgbox" src="img/view_loading.gif" />'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
1
+
'<br /> '
+
truncate
(
htmlEncode
(
contentPage
.
contentName
),
20
)
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
contentPage
.
contentName
),
20
)
+
' </span>'
+
' </li>'
);
...
...
@@ -491,7 +491,7 @@ function handleAPIWebContentPage(dataJson, pos) {
' <img id="img_bookmark_'
+
bmList
[
nIndex
].
pageNo
+
'" class="imgbox" src="img/view_loading.gif" />'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
bmList
[
nIndex
].
pageNo
+
'<br /> '
+
//
truncate(
htmlEncode(contentPage.contentName), 20) +
//
COMMON.truncate(COMMON.
htmlEncode(contentPage.contentName), 20) +
' </span>'
+
' </li>'
);
...
...
@@ -575,12 +575,12 @@ function AddChidrenNode(nodeParent, data) {
//add child node
var
item
=
new
TreeNode
();
item
.
IsCategory
=
false
;
//item.Text =
htmlEncode(
truncateByBytes(dataChild[i].title,30));
//item.Text =
COMMON.htmlEncode(COMMON.
truncateByBytes(dataChild[i].title,30));
/* check data text */
if
(
getBytes
(
dataChild
[
i
].
title
)
>
30
)
{
item
.
Text
=
htmlEncode
(
truncateByBytes
(
dataChild
[
i
].
title
,
30
))
+
'...'
;
if
(
COMMON
.
getBytes
(
dataChild
[
i
].
title
)
>
30
)
{
item
.
Text
=
COMMON
.
htmlEncode
(
COMMON
.
truncateByBytes
(
dataChild
[
i
].
title
,
30
))
+
'...'
;
}
else
{
item
.
Text
=
htmlEncode
(
dataChild
[
i
].
title
);
item
.
Text
=
COMMON
.
htmlEncode
(
dataChild
[
i
].
title
);
}
item
.
id
=
dataChild
[
i
].
ID
;
item
.
Value
=
dataChild
[
i
].
destPageNumber
;
...
...
@@ -612,7 +612,7 @@ function handleCopyTextData(data, pos) {
for
(
var
nIndex
=
0
;
nIndex
<
data
.
length
;
nIndex
++
)
{
/* get text of current page */
if
(
data
[
nIndex
].
pageNo
==
changePageIndex
(
getPageIndex
()))
{
sPageText
=
htmlEncode
(
data
[
nIndex
].
pageText
);
sPageText
=
COMMON
.
htmlEncode
(
data
[
nIndex
].
pageText
);
break
;
}
}
...
...
@@ -638,7 +638,7 @@ function handleCopyTextData(data, pos) {
$
(
'#bookmarkBoxHdCT'
).
append
(
i18nText
(
'txtTextCopy'
));
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxCopyText'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxCopyText'
).
css
(
'display'
,
'block'
);
$
(
'#boxCopyText'
).
draggable
({
handle
:
"h1"
});
...
...
@@ -677,7 +677,7 @@ function handleCopyTextData(data, pos) {
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxCopyText'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxCopyText'
).
css
(
'display'
,
'block'
);
//$('#boxCopyText').draggable({ handle: "h1" });
...
...
@@ -693,7 +693,7 @@ function handleCopyTextData(data, pos) {
$('#boxCopyText').unbind('draggable');
});*/
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
document
.
getElementById
(
'bookmarkBoxHdCT'
).
addEventListener
(
'touchstart'
,
eventStart_CopyText
,
false
);
document
.
getElementById
(
'bookmarkBoxHdCT'
).
addEventListener
(
'touchend'
,
eventEnd_CopyText
,
false
);
}
else
{
...
...
@@ -729,15 +729,15 @@ function formatStringBase64(imgStr) {
return
outputString
;
};
/* cut string */
function
truncate
(
strInput
,
length
)
{
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
/
//
* cut string */
//
function truncate(strInput, length) {
//
if (strInput.length <= length) {
//
return strInput;
//
}
//
else {
//
return strInput.substring(0, length) + "...";
//
}
//
};
/* search content */
function
searchHandle
()
{
...
...
@@ -767,7 +767,7 @@ function searchHandle() {
$
(
'#bookmarkBoxHdSearching'
).
append
(
i18nText
(
'txtSearchResult'
));
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxSearching'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxSearching'
).
css
(
'display'
,
'block'
);
$
(
'#boxSearching'
).
draggable
({
handle
:
"h1"
});
...
...
@@ -785,7 +785,7 @@ function searchHandle() {
' <img id="img_search_'
+
sPageNo
[
i
].
pageNo
+
'" class="imgbox" src="'
+
formatStringBase64
(
dataStored
[
nStored
].
pageThumbnail
)
+
'"/>'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
sPageNo
[
i
].
pageNo
)
+
1
)
+
'<br /> '
+
htmlEncode
(
truncate
(
sPageNo
[
i
].
pageText
,
20
))
+
COMMON
.
htmlEncode
(
COMMON
.
truncate
(
sPageNo
[
i
].
pageText
,
20
))
+
' </span>'
+
' </li>'
);
...
...
@@ -815,7 +815,7 @@ function searchHandle() {
' <img id="img_search_'
+
sPageNo
[
i
].
pageNo
+
'" class="imgbox" src="img/view_loading.gif"/>'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
sPageNo
[
i
].
pageNo
)
+
1
)
+
'<br /> '
+
htmlEncode
(
truncate
(
sPageNo
[
i
].
pageText
,
20
))
+
COMMON
.
htmlEncode
(
COMMON
.
truncate
(
sPageNo
[
i
].
pageText
,
20
))
+
' </span>'
+
' </li>'
);
...
...
@@ -859,7 +859,7 @@ function searchHandle() {
$
(
'#bookmarkBoxHdSearching'
).
append
(
i18nText
(
'txtSearchResult'
));
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxSearching'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxSearching'
).
css
(
'display'
,
'block'
);
$
(
'#boxSearching'
).
draggable
({
handle
:
"h1"
});
...
...
@@ -899,7 +899,7 @@ function loadDataToDialogSearch(searchResultTemp) {
' <img class="imgbox" src="'
+
formatStringBase64
(
searchResult
[
nIndex
].
pageThumbnail
)
+
'"/>'
+
' <span class="mdltext">'
+
i18nText
(
'txtPage'
)
+
(
changePageNo
(
searchResult
[
nIndex
].
pageNo
)
+
1
)
+
'<br /> '
+
htmlEncode
(
truncate
(
searchResult
[
nIndex
].
pageText
,
20
))
+
COMMON
.
htmlEncode
(
COMMON
.
truncate
(
searchResult
[
nIndex
].
pageText
,
20
))
+
' </span>'
+
' </li>'
);
...
...
@@ -1001,7 +1001,7 @@ function showErrorScreen() {
// errMes = i18nText('msgPageImgErr');
//}
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
lockLayout
();
COMMON
.
lockLayout
();
/* show error messages */
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
(
'showToast'
,
{
...
...
@@ -1023,7 +1023,7 @@ function showAlertScreen(errMes) {
errMes
=
"message."
;
//i18nText('msgPageImgErr');
}
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
lockLayout
();
COMMON
.
lockLayout
();
/* show error messages */
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
(
'showToast'
,
{
...
...
@@ -1036,7 +1036,7 @@ function showAlertScreen(errMes) {
$
(
'.toast-type-error > p'
).
css
(
'padding-top'
,
'35px'
);
$
(
'.toast-item-close'
).
live
(
'click'
,
function
()
{
unlockLayout
();
COMMON
.
unlockLayout
();
}
);
};
...
...
@@ -1071,7 +1071,7 @@ function changePage(page_index) {
else
{
//ページ閲覧ログセット
SetPageLog
(
contentID
,
page_index
);
COMMON
.
SetPageLog
(
contentID
,
page_index
);
// Clear canvas offscreen
clearCanvas
(
document
.
getElementById
(
"offscreen"
));
...
...
@@ -1127,7 +1127,7 @@ function changePage(page_index) {
/* add event draw on canvas */
function
drawOnCanvas
()
{
tool
=
new
tool_drawing
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
initializeCanvas
(
document
.
getElementById
(
'draw_canvas'
));
initializeCanvas
(
document
.
getElementById
(
'marker_canvas'
));
...
...
@@ -1909,7 +1909,7 @@ function handleTooltip() {
function
StartTimerUpdateLog
()
{
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
setTimeout
(
"StartTimerUpdateLog();"
,
1000
);
};
...
...
@@ -1970,7 +1970,7 @@ function changePageWithoutSlide(pageMove) {
//abe コンテンツリンクで移動時
//alert("changePageWithoutSlide:" + pageMove);
//ページ閲覧ログセット
SetPageLog
(
contentID
,
pageMove
);
COMMON
.
SetPageLog
(
contentID
,
pageMove
);
disableAllControl
();
var
isExistBGMPageContent
=
false
;
...
...
@@ -2186,13 +2186,13 @@ function displayOverlayForSpecifyContentType(){
var
linkUrlTmp
=
resourceUrl
;
//DHカスタム
if
(
ClientData
.
serviceOpt_daihatsu
()
==
'Y'
){
var
apiUrl
=
getApiUrl
(
ClientData
.
userInfo_accountPath
());
var
apiUrl
=
AVWEB
.
getApiUrl
(
ClientData
.
userInfo_accountPath
());
linkUrlTmp
=
linkUrlTmp
+
"?sid="
+
ClientData
.
userInfo_sid
()
+
"&apiurl="
+
apiUrl
;
}
handleForContentTypeHTML
(
linkUrlTmp
);
}
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
standardRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
startDetectZoom
({
time
:
500
,
...
...
@@ -2228,7 +2228,7 @@ function displayOverlayForSpecifyContentType(){
//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
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
var
tempRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
if
(
tempRatio
<=
1
)
{
...
...
@@ -2455,7 +2455,7 @@ function enableControlForMediaAndHtmlType(){
$
(
"#control_screen"
).
bind
(
'click'
,
fullScreenForNotPdfType
);
$
(
"#control_screen_2"
).
bind
(
'click'
,
originalScreenForNotPdfType
);
if
(
isTouchDevice
()
==
true
)
{
/* set css for device */
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
/* set css for device */
$
(
'#imgHome'
).
addClass
(
'home_device'
);
$
(
'#imgBack'
).
addClass
(
'back_device'
);
...
...
@@ -2490,7 +2490,7 @@ function enableControlForImageAndNoneType(){
$
(
"#control_screen"
).
bind
(
'click'
,
fullScreenForNotPdfType
);
$
(
"#control_screen_2"
).
bind
(
'click'
,
originalScreenForNotPdfType
);
if
(
isTouchDevice
()
==
true
)
{
/* set css for device */
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
/* set css for device */
$
(
'#imgHome'
).
addClass
(
'home_device'
);
$
(
'#imgBack'
).
addClass
(
'back_device'
);
...
...
@@ -2643,7 +2643,7 @@ function setViewportForWin8(){
//Start : TRB00022 - Editor : Long - Date : 08/28/2013 - Summary : For ipad rotate handling.
function
setViewportForTouchDevice
(
maximumScale
){
if
(
isTouchDevice
())
{
if
(
COMMON
.
isTouchDevice
())
{
if
(
avwUserEnvObj
.
os
==
'ipad'
){
var
viewportmeta
=
document
.
querySelector
(
'meta[name="viewport"]'
);
if
(
viewportmeta
)
{
...
...
@@ -2659,7 +2659,7 @@ $("document").ready(function () {
/* check login */
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
))
return
;
// Set event to prevent leave
ToogleLogoutNortice
();
COMMON
.
ToogleLogoutNortice
();
//START TRB00048 - EDITOR : Long - Date : 09/18/2013 - Summary : Fix Jumpcontent
getContentID
();
...
...
@@ -3452,14 +3452,14 @@ function checkExistNextPrePage() {
if
(
getContent
().
hasNextPage
())
{
//$('#nextpage').show();
//enable('#nextpage');
//
COMMON.
enable('#nextpage');
$
(
'#nextpage'
).
unbind
(
'click'
);
$
(
'#nextpage'
).
bind
(
'click'
,
nextPage_click
);
$
(
'#lastpage'
).
unbind
(
'click'
);
$
(
'#lastpage'
).
bind
(
'click'
,
lastPage_click
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#nextpage'
).
removeClass
();
$
(
'#nextpage'
).
addClass
(
'next_device'
);
...
...
@@ -3474,11 +3474,11 @@ function checkExistNextPrePage() {
}
}
else
{
//$('#nextpage').hide();
//disable('#nextpage');
//
COMMON.
disable('#nextpage');
$
(
'#nextpage'
).
unbind
(
'click'
);
$
(
'#lastpage'
).
unbind
(
'click'
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#nextpage'
).
removeClass
();
$
(
'#nextpage'
).
addClass
(
'next_off'
);
...
...
@@ -3497,14 +3497,14 @@ function checkExistNextPrePage() {
//check prev page
if
(
getContent
().
hasPreviousPage
())
{
//$('#prevpage').show();
//enable('#prevpage');
//
COMMON.
enable('#prevpage');
$
(
'#prevpage'
).
unbind
(
'click'
);
$
(
'#prevpage'
).
bind
(
'click'
,
prevPage_click
);
$
(
'#firstpage'
).
unbind
(
'click'
);
$
(
'#firstpage'
).
bind
(
'click'
,
firstPage_click
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#prevpage'
).
removeClass
();
$
(
'#prevpage'
).
addClass
(
'prev_device'
);
...
...
@@ -3519,11 +3519,11 @@ function checkExistNextPrePage() {
}
}
else
{
//$('#prevpage').hide();
//disable('#prevpage');
//
COMMON.
disable('#prevpage');
$
(
'#prevpage'
).
unbind
(
'click'
);
$
(
'#firstpage'
).
unbind
(
'click'
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#prevpage'
).
removeClass
();
$
(
'#prevpage'
).
addClass
(
'prev_off'
);
...
...
@@ -3651,7 +3651,7 @@ function removeObject() {
/* View Component setDefaultEvent */
function
setDefaultEvent
()
{
_bTouchDeviceEnabled
=
isTouchDevice
();
_bTouchDeviceEnabled
=
COMMON
.
isTouchDevice
();
var
canvasPre
=
document
.
getElementById
(
'mainPre'
);
var
canvasNext
=
document
.
getElementById
(
'mainNext'
);
...
...
@@ -3838,7 +3838,7 @@ function disableControlsCopyMemo() {
if
(
avwUserEnvObj
.
os
!=
"android"
)
{
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
true
);
}
disable
(
'#txtSearch'
,
'#txtSlider'
);
COMMON
.
disable
(
'#txtSearch'
,
'#txtSlider'
);
$
(
'#button_next_canvas'
).
css
(
'display'
,
'none'
);
$
(
'#button_pre_canvas'
).
css
(
'display'
,
'none'
);
...
...
@@ -3908,11 +3908,11 @@ function enableControlsCopyMemo() {
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
false
);
enable
(
'#txtSearch'
,
'#txtSlider'
);
COMMON
.
enable
(
'#txtSearch'
,
'#txtSlider'
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
false
);
enable
(
'#txtSlider'
);
COMMON
.
enable
(
'#txtSlider'
);
}
...
...
@@ -3921,7 +3921,7 @@ function enableControlsCopyMemo() {
$
(
'#button_pre_canvas'
).
css
(
'display'
,
'block'
);
}
if
(
isTouchDevice
()
==
true
)
{
/* set css for device */
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
/* set css for device */
$
(
'#imgHome'
).
addClass
(
'home_device'
);
$
(
'#imgBack'
).
addClass
(
'back_device'
);
/*$('#firstpage').addClass('begin_device');
...
...
@@ -4970,7 +4970,7 @@ function sizingNotFull(width, height) {
//END TRB
else
{
//adjust size of canvas using for draw
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
"#main"
).
css
(
'top'
,
marginY
);
$
(
"#main"
).
attr
(
'height'
,
height
-
(
marginY
*
2
))
.
attr
(
'width'
,
width
-
(
marginX
*
2
));
...
...
@@ -5039,7 +5039,7 @@ function sizingFullSize(width, height) {
}
//END TRB
else
{
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
"#main"
).
css
(
'top'
,
'0px'
);
$
(
"#main"
).
attr
(
'height'
,
height
)
.
attr
(
'width'
,
width
-
(
marginX
*
2
));
...
...
@@ -5240,7 +5240,7 @@ function checkDisableButtonZoom() {
$
(
'#zoomin'
).
bind
(
'click'
,
zoomIn
);
$
(
'#zoomin'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#zoomin'
).
addClass
(
'expansion_device'
);
}
else
{
$
(
'#zoomin'
).
addClass
(
'expansion'
);
...
...
@@ -5257,7 +5257,7 @@ function checkDisableButtonZoom() {
$
(
'#zoomout'
).
bind
(
'click'
,
zoomOut
);
$
(
'#zoomout'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#zoomout'
).
addClass
(
'reduction_device'
);
}
else
{
$
(
'#zoomout'
).
addClass
(
'reduction'
);
...
...
@@ -5274,7 +5274,7 @@ function checkDisableButtonZoom() {
$
(
'#zoomfit'
).
bind
(
'click'
,
screenFit
);
$
(
'#zoomfit'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#zoomfit'
).
addClass
(
'fit_device'
);
}
else
{
$
(
'#zoomfit'
).
addClass
(
'fit'
);
...
...
@@ -5486,7 +5486,7 @@ function changeScale(scale) {
objectLog
.
locationHeight
=
""
;
objectLog
.
locationWidth
=
""
;
objectLog
.
eventType
=
"5"
;
//暫定でピンチアウト
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
}
...
...
abvw/js/contentview_Anket.js
View file @
822c73cc
...
...
@@ -33,7 +33,7 @@ function showAnket(url, fullscreen, objectId) {
var
dateEnd
=
new
Date
();
var
actionTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
//alert("actionTime:" + actionTime);
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
COMMON
.
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
$container
.
removeAttr
(
'style'
);
hideDialog
();
...
...
abvw/js/contentview_CreateObjects.js
View file @
822c73cc
...
...
@@ -211,7 +211,7 @@ var webContentType4 = function (id, x, y, w, h, imageUrl, linkKind, destURI, des
//window.open(destURI, "_blank", "new window");
window
.
open
(
destURI
,
"_self"
);
setTimeout
(
function
(){
ToogleLogoutNortice
();},
200
);
setTimeout
(
function
(){
COMMON
.
ToogleLogoutNortice
();},
200
);
//END TRB00070
...
...
@@ -639,7 +639,7 @@ var object3d = function (mediaType, actionType, id, imageUrl, x, y, w, h, hCnt,
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
}
...
...
@@ -683,7 +683,7 @@ var listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObj
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
//SetObjectLog(contentID, objectLog);
//
COMMON.
SetObjectLog(contentID, objectLog);
//---
mediaType4_changeImage
++
;
...
...
@@ -695,7 +695,7 @@ var listImage = function (mediaType, id, imageUrl, x, y, w, h, visible, imageObj
//リソースIDセット
objectLog
.
resourceId
=
imageObjects
[
mediaType4_changeImage
].
resourceId
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
/* draw image */
var
imageObj
=
new
Image
();
...
...
@@ -787,7 +787,7 @@ var trigger = function (mediaType, actionType, id, imageUrl, x, y, w, h, index,
}
//詳細ログ格納
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
};
...
...
@@ -822,7 +822,7 @@ var htmlLinkButton = function (mediaType, actionType, id, imageUrl, x, y, w, h,
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
showHtml
(
resourceUrl
,
objectId
);
...
...
@@ -872,7 +872,7 @@ function showHtml(url, objectId ){
var
dateEnd
=
new
Date
();
var
actionTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
//alert("actionTime:" + actionTime);
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
COMMON
.
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
$container
.
removeAttr
(
'style'
);
hideDialog
();
...
...
@@ -905,7 +905,7 @@ var anket = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible,
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
/*stop audio on page */
...
...
@@ -951,7 +951,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
createAudio
(
audioFile
,
playType
);
...
...
@@ -981,7 +981,7 @@ var audioType3 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
createAudio
(
audioFile
,
playType
);
...
...
@@ -1017,7 +1017,7 @@ var jumpPage = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
if
((
Number
(
jumpPage
)
-
1
)
!=
getPageIndex
())
{
...
...
@@ -1048,7 +1048,7 @@ var sendMail = function (mediaType, actionType, id, imageUrl, x, y, w, h, visibl
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
MailTo
(
emailAddress
,
emailSubject
);
...
...
@@ -1078,7 +1078,7 @@ var openPopUp = function (mediaType, actionType, id, imageUrl, x, y, w, h, visib
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
isOpenPopUpText
=
true
;
...
...
@@ -1116,12 +1116,12 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
///* set end log */
//SetEndLog(contentID);
//RegisterLog();
//
COMMON.
SetEndLog(contentID);
//
COMMON.
RegisterLog();
//START TRB00033 - EDITOR: Long - Date : 09/12/2013 - Summary : limit content
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
...
...
@@ -1130,8 +1130,8 @@ var moveToContent = function (mediaType, actionType, id, imageUrl, x, y, w, h, v
function
(
data
)
{
/* set end log */
SetEndLog
(
contentID
);
RegisterLog
();
COMMON
.
SetEndLog
(
contentID
);
COMMON
.
RegisterLog
();
if
(
data
.
contentData
.
alertMessageLevel
){
...
...
@@ -1324,7 +1324,7 @@ function createPwdRequiredTypeDialog(){
avwScreenMove
(
ScreenIds
.
ContentView
);
}
else
{
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
$
(
'#lblMessageLimitError'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
...
...
@@ -1332,7 +1332,7 @@ function createPwdRequiredTypeDialog(){
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
errorCode
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
}
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
errorCode
).
toString
()).
show
();
$
(
'#lblMessageLimitError'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
errorCode
).
toString
()).
show
();
});
}
...
...
@@ -1363,7 +1363,7 @@ var videoType2 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
/*stop audio on page */
...
...
@@ -1427,7 +1427,7 @@ var videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
/* stop all audio on page */
...
...
@@ -1441,7 +1441,7 @@ var videoType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
var
dateEnd
=
new
Date
();
var
actionTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
//alert("actionTime:" + actionTime);
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
COMMON
.
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
hideDialog
();
/* play audio */
...
...
@@ -1480,7 +1480,7 @@ var audioType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visi
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
createAudio
(
audioFile
,
"0"
)
...
...
@@ -1510,13 +1510,13 @@ var linkURL = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible
objectLog
.
locationY
=
y
;
objectLog
.
locationHeight
=
h
;
objectLog
.
locationWidth
=
w
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
var
linkUrlTmp
=
linkUrl
;
//DHカスタム
if
(
ClientData
.
serviceOpt_daihatsu
()
==
'Y'
){
var
apiUrl
=
getApiUrl
(
ClientData
.
userInfo_accountPath
());
var
apiUrl
=
AVWEB
.
getApiUrl
(
ClientData
.
userInfo_accountPath
());
linkUrlTmp
=
linkUrlTmp
+
"?sid="
+
ClientData
.
userInfo_sid
()
+
"&apiurl="
+
apiUrl
;
}
...
...
@@ -1565,7 +1565,7 @@ var imagePreview = function (mediaType, actionType, id, imageUrl, x, y, w, h, vi
}
objectLog
.
actionValue
=
actionVal
;
SetObjectLog
(
contentID
,
objectLog
);
COMMON
.
SetObjectLog
(
contentID
,
objectLog
);
//---
createImagePreview
();
...
...
@@ -1578,7 +1578,7 @@ var imagePreview = function (mediaType, actionType, id, imageUrl, x, y, w, h, vi
var
dateEnd
=
new
Date
();
var
actionTime
=
dateEnd
.
subtractBySeconds
(
dateStart
);
//alert("actionTime:" + actionTime);
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
COMMON
.
SetObjectLogActionTime
(
contentID
,
objectId
,
actionTime
);
hideDialog
();
});
...
...
@@ -1794,7 +1794,7 @@ Transition.prototype.flipNextPage = function () {
document
.
title
=
contentName
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
createLockLayout
(
false
);
initImageCheckMarking
();
...
...
@@ -1867,7 +1867,7 @@ Transition.prototype.flipNextPage = function () {
document
.
title
=
contentName
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
createLockLayout
(
false
);
initImageCheckMarking
();
}
...
...
@@ -1955,7 +1955,7 @@ Transition.prototype.flipPreviousPage = function () {
document
.
title
=
contentName
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
createLockLayout
(
false
);
initImageCheckMarking
();
...
...
@@ -2027,7 +2027,7 @@ Transition.prototype.flipPreviousPage = function () {
document
.
title
=
contentName
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
createLockLayout
(
false
);
initImageCheckMarking
();
}
...
...
@@ -2111,7 +2111,7 @@ Transition.prototype.flipToPage = function (index) {
document
.
title
=
contentName
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
initImageCheckMarking
();
createLockLayout
(
false
);
...
...
@@ -2190,7 +2190,7 @@ Transition.prototype.flipToPage = function (index) {
document
.
title
=
contentName
+
' | '
+
i18nText
(
'sysAppTitle'
);
}
/* set end log */
SetEndLog
(
contentID
);
COMMON
.
SetEndLog
(
contentID
);
initImageCheckMarking
();
createLockLayout
(
false
);
...
...
abvw/js/contentview_Events.js
View file @
822c73cc
...
...
@@ -156,7 +156,7 @@ function closeBookmarkBox() {
//change class
$
(
'#listbookmark'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#listbookmark'
).
addClass
(
'bmList_device'
);
}
else
{
$
(
'#listbookmark'
).
addClass
(
'bmList'
);
...
...
@@ -202,7 +202,7 @@ function closeIndexBox() {
//change class
$
(
'#listindex'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#listindex'
).
addClass
(
'index_device'
);
}
else
{
$
(
'#listindex'
).
addClass
(
'index'
);
...
...
@@ -248,7 +248,7 @@ function closeCopyTextBox() {
//change class
$
(
'#copytext'
).
removeClass
();
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#copytext'
).
addClass
(
'copy_device'
);
}
else
{
$
(
'#copytext'
).
addClass
(
'copy'
);
...
...
@@ -298,7 +298,7 @@ function nextPage_click() {
//abe
//alert("nextPage_click:" + contentID );
SetPageLog
(
contentID
,
getPageIndex
()
+
1
);
COMMON
.
SetPageLog
(
contentID
,
getPageIndex
()
+
1
);
playBGMOfContent
();
playBGMOfPage
(
getPageIndex
()
+
1
);
...
...
@@ -324,7 +324,7 @@ function prevPage_click() {
//abe
//alert("prevPage_click:" + contentID);
SetPageLog
(
contentID
,
getPageIndex
()
-
1
);
COMMON
.
SetPageLog
(
contentID
,
getPageIndex
()
-
1
);
playBGMOfContent
();
playBGMOfPage
(
getPageIndex
()
-
1
);
...
...
@@ -353,7 +353,7 @@ function firstPage_click() {
//abe
//alert("firstPage_click:" + contentID );
SetPageLog
(
contentID
,
0
);
COMMON
.
SetPageLog
(
contentID
,
0
);
playBGMOfContent
();
playBGMOfPage
(
0
);
...
...
@@ -424,7 +424,7 @@ function lastPage_click() {
//abe
//alert("lastPage_click:" + contentID );
SetPageLog
(
contentID
,
totalPage
-
1
);
COMMON
.
SetPageLog
(
contentID
,
totalPage
-
1
);
playBGMOfContent
();
playBGMOfPage
(
totalPage
-
1
);
...
...
@@ -659,11 +659,11 @@ function update3DImagesArr(){
var
tempX
=
object3d
[
"x"
];
var
tempY
=
object3d
[
"y"
];
tempInitImage
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
getUrlParams
(
tempInitImage
,
'resourceId'
);
tempInitImage
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
getUrlParams
(
tempInitImage
,
'resourceId'
);
for
(
var
j
=
0
;
j
<
temp3dview
.
length
;
j
++
){
var
url
=
temp3dview
[
j
];
var
id
=
getUrlParamByUrl
(
url
,
'resourceId'
);
temp3dview
[
j
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
id
;
temp3dview
[
j
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
id
;
}
var
arr3D
=
[];
...
...
@@ -1298,8 +1298,8 @@ function mouseUp_CanvasMain(event) {
function
imgBack_click
()
{
/* set end log */
SetEndLog
(
contentID
);
RegisterLog
();
COMMON
.
SetEndLog
(
contentID
);
COMMON
.
RegisterLog
();
window
.
onbeforeunload
=
null
;
...
...
@@ -1331,8 +1331,8 @@ function imgHome_click(e) {
e
.
preventDefault
();
/* set end log */
SetEndLog
(
contentID
);
RegisterLog
();
COMMON
.
SetEndLog
(
contentID
);
COMMON
.
RegisterLog
();
//window.location.href = ScreenIds.Home;
avwScreenMove
(
ScreenIds
.
Home
);
...
...
abvw/js/contentview_General.js
View file @
822c73cc
...
...
@@ -278,7 +278,7 @@ function disableAllControl() {
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
true
);
}
disable
(
'#txtSearch'
,
'#txtSlider'
);
COMMON
.
disable
(
'#txtSearch'
,
'#txtSlider'
);
$
(
'#button_next_canvas'
).
css
(
'display'
,
'none'
);
$
(
'#button_pre_canvas'
).
css
(
'display'
,
'none'
);
...
...
@@ -376,10 +376,10 @@ function enableAllControl() {
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
false
);
if
(
contentType
==
ContentTypeKeys
.
Type_PDF
){
enable
(
'#txtSearch'
,
'#txtSlider'
);
COMMON
.
enable
(
'#txtSearch'
,
'#txtSlider'
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_NoFile
){
enable
(
'#txtSlider'
);
COMMON
.
enable
(
'#txtSlider'
);
}
}
...
...
@@ -389,7 +389,7 @@ function enableAllControl() {
$
(
'#button_pre_canvas'
).
css
(
'display'
,
'block'
);
}
if
(
isTouchDevice
()
==
true
)
{
/* set css for device */
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
/* set css for device */
$
(
'#imgHome'
).
addClass
(
'home_device'
);
$
(
'#imgBack'
).
addClass
(
'back_device'
);
...
...
abvw/js/contentview_GetData.js
View file @
822c73cc
...
...
@@ -30,19 +30,19 @@ function getJsonContentInfo() {
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
/* get url */
function
getURL
(
apiName
)
{
var
sysSettings
=
avwSysSetting
();
var
url
=
sysSettings
.
apiResourceDlUrl
;
url
=
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
/
//
* get url */
//
function getURL(apiName) {
//
var sysSettings = avwSysSetting();
//
var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.
format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
//
return url;
//
};
/* get url */
function
getURLPageImage
(
apiName
)
{
var
sysSettings
=
avwSysSetting
();
var
url
=
sysSettings
.
apiUrl
;
url
=
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
url
=
AVWEB
.
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
...
...
@@ -155,7 +155,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -163,14 +163,14 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
/*get video file */
if
(
iValueObj
.
action
.
video
)
{
pageObject
[
'mediaFile'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
removeExt
(
iValueObj
.
action
.
video
);
pageObject
[
'mediaFile'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
COMMON
.
removeExt
(
iValueObj
.
action
.
video
);
pageObject
[
'media'
]
=
iValueObj
.
action
.
video
;
pageObject
[
'mediaResourceId'
]
=
iValueObj
.
action
.
resourceId
;
}
else
{
...
...
@@ -183,7 +183,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -191,9 +191,9 @@ function getMediaType1(iValueObj) {
/*get video file */
if
(
iValueObj
.
action
.
music
)
{
if
(
avwUserEnvObj
.
browser
==
'msie'
)
{
pageObject
[
'audioFile'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
removeExt
(
iValueObj
.
action
.
music
)
+
"&isIE=true"
;
pageObject
[
'audioFile'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
COMMON
.
removeExt
(
iValueObj
.
action
.
music
)
+
"&isIE=true"
;
}
else
{
pageObject
[
'audioFile'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
removeExt
(
iValueObj
.
action
.
music
);
pageObject
[
'audioFile'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
COMMON
.
removeExt
(
iValueObj
.
action
.
music
);
}
pageObject
[
'audio'
]
=
iValueObj
.
action
.
music
;
pageObject
[
'audioResourceId'
]
=
iValueObj
.
action
.
resourceId
;
...
...
@@ -228,7 +228,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -240,7 +240,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -252,7 +252,7 @@ function getMediaType1(iValueObj) {
//START TRB00077 - Editor : Long - Date: 09/24/2013- Summary : Display image preview no image
if
(
dataResourceImage
){
for
(
var
nIndex
=
0
;
nIndex
<
dataResourceImage
.
length
;
nIndex
++
)
{
dataImageFromResource
.
push
(
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
removeExt
(
dataResourceImage
[
nIndex
]));
dataImageFromResource
.
push
(
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceName="
+
COMMON
.
removeExt
(
dataResourceImage
[
nIndex
]));
}
pageObject
[
'imagePreviewResourceIds'
]
=
iValueObj
.
action
.
resourceIds
;
}
...
...
@@ -263,7 +263,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -280,7 +280,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -304,7 +304,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -316,7 +316,7 @@ function getMediaType1(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
null
;
}
...
...
@@ -344,7 +344,7 @@ function getMediaType1(iValueObj) {
resourceUrl
=
tempData
.
resourceUrl
;
//DHカスタム
if
(
ClientData
.
serviceOpt_daihatsu
()
==
'Y'
){
var
apiUrl
=
getApiUrl
(
ClientData
.
userInfo_accountPath
());
var
apiUrl
=
AVWEB
.
getApiUrl
(
ClientData
.
userInfo_accountPath
());
resourceUrl
=
resourceUrl
+
"?sid="
+
ClientData
.
userInfo_sid
()
+
"&apiurl="
+
apiUrl
;
}
break
;
...
...
@@ -353,12 +353,12 @@ function getMediaType1(iValueObj) {
}
//END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
pageObject
[
"imageUrl"
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
"imageUrl"
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
"resourceUrl"
]
=
resourceUrl
;
}
else
if
(
iValueObj
.
action
.
actionType
==
12
){
pageObject
[
"imageUrl"
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
"imageUrl"
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
"resourceUrl"
]
=
resourceUrl
;
pageObject
[
"questionNo"
]
=
iValueObj
.
action
.
questionNo
;
...
...
@@ -389,7 +389,7 @@ function getMediaType2(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
pageObject
[
'mediaFile'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'mediaFile'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'media'
]
=
iValueObj
.
mediaInfo
.
resourceId
;
//video1のほうはリソース名で取得している。IDのほうが良いのでは。
}
else
{
pageObject
[
'mediaFile'
]
=
''
;
...
...
@@ -439,9 +439,9 @@ function getMediaType3(iValueObj) {
/*get mediaInfo */
if
(
iValueObj
.
mediaInfo
.
resourceId
)
{
if
(
avwUserEnvObj
.
browser
==
'msie'
)
{
pageObject
[
'audioFile'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
+
"&isIE=true"
;
pageObject
[
'audioFile'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
+
"&isIE=true"
;
}
else
{
pageObject
[
'audioFile'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'audioFile'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
pageObject
[
'audioResourceId'
]
=
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
...
...
@@ -483,7 +483,7 @@ function getMediaType4(iValueObj) {
for
(
var
nIndex
=
0
;
nIndex
<
imageObjects
.
length
;
nIndex
++
)
{
/* get image from Json */
imageObjects
[
nIndex
].
fileName
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
imageObjects
[
nIndex
].
resourceId
;
imageObjects
[
nIndex
].
fileName
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
imageObjects
[
nIndex
].
resourceId
;
}
pageObject
[
'dataObjects'
]
=
imageObjects
;
...
...
@@ -530,7 +530,7 @@ function getMediaType5(iValueObj) {
var
videoObjects
=
iValueObj
.
mediaInfo
.
media
;
for
(
var
nIndex
=
0
;
nIndex
<
videoObjects
.
length
;
nIndex
++
)
{
/* get image from Json */
videoObjects
[
nIndex
].
fileName
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
videoObjects
[
nIndex
].
resourceId
;
videoObjects
[
nIndex
].
fileName
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
videoObjects
[
nIndex
].
resourceId
;
}
pageObject
[
'dataObjects'
]
=
videoObjects
;
...
...
@@ -580,7 +580,7 @@ function getMediaType6(iValueObj) {
if
(
iValueObj
.
mediaInfo
.
resourceId
){
/* get image from Json */
pageObject
[
'imageUrl'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'imageUrl'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
}
else
{
pageObject
[
'imageUrl'
]
=
'img/iPad_video.png'
;
...
...
@@ -686,7 +686,7 @@ function getMediaType8(iValueObj) {
pageObject
[
'horizonCount'
]
=
iValueObj
.
mediaInfo
.
horizonCount
;
pageObject
[
'verticalCount'
]
=
iValueObj
.
mediaInfo
.
verticalCount
;
pageObject
[
'initImage'
]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
pageObject
[
'initImage'
]
=
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
iValueObj
.
mediaInfo
.
resourceId
;
var
_3dViewObject
=
[];
var
data3d
=
iValueObj
.
action
[
"3dview"
];
...
...
@@ -706,7 +706,7 @@ function getMediaType8(iValueObj) {
}
_3dViewObject
[
convNumTo2Char
(
verticalCnt
)
+
"-"
+
convNumTo2Char
(
horizonCnt
)]
=
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
data3d
[
convNumTo2Char
(
verticalCnt
)
+
"-"
+
convNumTo2Char
(
horizonCnt
)].
resourceId
;
}
...
...
@@ -758,7 +758,7 @@ function getMediaType9(iValueObj) {
resourceUrl
=
tempData
.
resourceUrl
;
//DHカスタム
if
(
ClientData
.
serviceOpt_daihatsu
()
==
'Y'
){
var
apiUrl
=
getApiUrl
(
ClientData
.
userInfo_accountPath
());
var
apiUrl
=
AVWEB
.
getApiUrl
(
ClientData
.
userInfo_accountPath
());
resourceUrl
=
resourceUrl
+
"?sid="
+
ClientData
.
userInfo_sid
()
+
"&apiurl="
+
apiUrl
;
}
break
;
...
...
@@ -930,7 +930,7 @@ function getBookmarklist(pos) {
$
(
"#bookmarkClosing"
).
click
(
closeBookmarkBox
);
$
(
'#bookmarkBoxHdBM'
).
append
(
i18nText
(
'txtShioriCtnLs'
));
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxBookMark'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxBookMark'
).
css
(
'display'
,
'block'
);
$
(
'#boxBookMark'
).
draggable
({
handle
:
"h1"
});
...
...
@@ -964,7 +964,7 @@ function getPageIndexJson(pos) {
$
(
"#indexClosing"
).
click
(
closeIndexBox
);
$
(
'#indexBoxHdIndex'
).
append
(
i18nText
(
'txtIndex'
));
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxIndex'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxIndex'
).
css
(
'display'
,
'block'
);
$
(
'#boxIndex'
).
draggable
({
handle
:
"h1"
});
...
...
@@ -980,12 +980,12 @@ function getPageIndexJson(pos) {
//add parent node
var
node
=
new
TreeNode
();
node
.
IsCategory
=
true
;
//node.Text =
htmlEncode(
truncateByBytes(dataContent[i].title, 30));
//node.Text =
COMMON.htmlEncode(COMMON.
truncateByBytes(dataContent[i].title, 30));
/* check data text */
if
(
getBytes
(
dataContent
[
i
].
title
)
>
30
)
{
node
.
Text
=
htmlEncode
(
truncateByBytes
(
dataContent
[
i
].
title
,
30
))
+
'...'
;
if
(
COMMON
.
getBytes
(
dataContent
[
i
].
title
)
>
30
)
{
node
.
Text
=
COMMON
.
htmlEncode
(
COMMON
.
truncateByBytes
(
dataContent
[
i
].
title
,
30
))
+
'...'
;
}
else
{
node
.
Text
=
htmlEncode
(
dataContent
[
i
].
title
);
node
.
Text
=
COMMON
.
htmlEncode
(
dataContent
[
i
].
title
);
}
node
.
id
=
dataContent
[
i
].
ID
;
node
.
Value
=
dataContent
[
i
].
destPageNumber
;
...
...
@@ -1020,7 +1020,7 @@ function getPageIndexJson(pos) {
$
(
"#indexClosing"
).
click
(
closeIndexBox
);
$
(
'#indexBoxHdIndex'
).
append
(
i18nText
(
'txtIndex'
));
//title end
//lockLayout();
//
COMMON.
lockLayout();
$
(
'#boxIndex'
).
css
(
'z-index'
,
'101'
);
$
(
'#boxIndex'
).
css
(
'display'
,
'block'
);
$
(
'#boxIndex'
).
draggable
({
handle
:
"h1"
});
...
...
@@ -1041,7 +1041,7 @@ function getText() {
for
(
var
nIndex
=
0
;
nIndex
<
data
.
length
;
nIndex
++
)
{
/* get text of current page */
if
(
data
[
nIndex
].
pageNo
==
changePageIndex
(
getPageIndex
()))
{
sPageText
=
htmlEncode
(
data
[
nIndex
].
pageText
);
sPageText
=
COMMON
.
htmlEncode
(
data
[
nIndex
].
pageText
);
break
;
}
}
...
...
@@ -1074,7 +1074,7 @@ function getContentID() {
//Download resource
function
getResourceByIdFromAPI
(
resourceId
){
return
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
;
return
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
;
};
//Get content info type Image
...
...
@@ -1097,7 +1097,7 @@ function getContentInfoTypeImage(){
/* window resize event */
$
(
window
).
resize
(
function
()
{
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
var
tempRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
if
(
tempRatio
<=
1
)
{
...
...
@@ -1140,7 +1140,7 @@ function getContentInfoTypeImage(){
trackTransforms
(
context_main
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
standardRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
startDetectZoom
({
time
:
500
,
...
...
abvw/js/contentview_Gomu.js
View file @
822c73cc
...
...
@@ -124,7 +124,7 @@ function dlgGomu_dspOK_click() {
// Close dialog
//$("#dlgGomu").dialog('close');
/*$("#dlgGomu").fadeOut('medium', function(){
//unlockLayout();
//
COMMON.
unlockLayout();
});*/
$
(
"#dlgGomu"
).
hide
();
...
...
@@ -222,7 +222,7 @@ $(function () {
// ---------------------------------
// Setup for easer [start]
// ---------------------------------
if
(
isTouchDevice
()
==
true
){
if
(
COMMON
.
isTouchDevice
()
==
true
){
document
.
getElementById
(
'dlgGomu_dspOK'
).
addEventListener
(
'touchstart'
,
touchStart_BtnOk_Gomu
,
false
);
document
.
getElementById
(
'dlgGomu_dspCancel'
).
addEventListener
(
'touchstart'
,
touchStart_BtnCancel_Gomu
,
false
);
}
...
...
abvw/js/contentview_ImagePreview.js
View file @
822c73cc
...
...
@@ -177,7 +177,7 @@ function handleImagePreviewEvent(){
$
(
'#main-control-prev'
).
mouseleave
(
mainControlPrevMouseLeaveFunction
);
if
(
isTouchDevice
()
==
false
)
{
if
(
COMMON
.
isTouchDevice
()
==
false
)
{
//$('.main-control').mouseenter(mainControlMouseEnterFunction);
$
(
'#main-control-next'
).
mouseenter
(
mainControlNextMouseEnterFunction
);
$
(
'#main-control-prev'
).
mouseenter
(
mainControlPrevMouseEnterFunction
);
...
...
@@ -242,7 +242,7 @@ var slideshow_isTransaction = false;
//Main Image next icon function
function
imageMainSelectNextFunction
()
{
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#main-control-next'
).
css
(
'opacity'
,
'0.5'
);
}
...
...
@@ -276,7 +276,7 @@ function imageMainSelectNextFunction() {
//Main Image prev icon function
function
imageMainSelectPrevFunction
()
{
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#main-control-prev'
).
css
(
'opacity'
,
'0.5'
);
}
...
...
@@ -374,7 +374,7 @@ function renderMainImage(i) {
mainImg
.
css
(
'background-image'
,
'url('
+
slideshowImageCollection
[
i
].
thumbnail
+
')'
);
slideshow_isTransaction
=
false
;
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
$
(
'#main-control-next'
).
css
(
'opacity'
,
'0'
);
$
(
'#main-control-prev'
).
css
(
'opacity'
,
'0'
);
}
...
...
abvw/js/contentview_InitObjects.js
View file @
822c73cc
...
...
@@ -145,12 +145,12 @@ function initPage() {
initDisplayToolbarDevice
();
// Lock screen
LockScreen
();
COMMON
.
LockScreen
();
StartTimerUpdateLog
();
/* set start log */
SetStartLog
(
contentID
);
COMMON
.
SetStartLog
(
contentID
);
/* get info of content */
//Start Function: No.12
...
...
@@ -346,7 +346,7 @@ function 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
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
var
tempRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
if
(
tempRatio
<=
1
)
{
...
...
@@ -399,7 +399,7 @@ function initPage() {
//nAjaxLoad = 0;
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
standardRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
startDetectZoom
({
time
:
500
,
...
...
@@ -486,7 +486,7 @@ function initPage() {
/* window resize event */
$
(
window
).
resize
(
function
()
{
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
var
tempRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
if
(
tempRatio
<=
1
)
{
...
...
@@ -539,7 +539,7 @@ function initPage() {
//nAjaxLoad = 0;
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
if
(
avwUserEnvObj
.
os
==
"android"
)
{
standardRatio
=
document
.
documentElement
.
clientWidth
/
window
.
innerWidth
;
startDetectZoom
({
time
:
500
,
...
...
@@ -595,13 +595,13 @@ function initPageMediaAndHtmlType(){
initDisplayToolbarDevice
();
// Lock screen
LockScreen
();
COMMON
.
LockScreen
();
//START TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
StartTimerUpdateLog
();
/* set start log */
SetStartLog
(
contentID
);
COMMON
.
SetStartLog
(
contentID
);
//END TRB00094 - Editor : Long - Date : 09/26/2013 - Summary : Setting log
//enable SpecifyControl
...
...
@@ -631,7 +631,7 @@ function initPageMediaAndHtmlType(){
$
(
"#slider_page"
).
slider
(
"option"
,
"disabled"
,
true
);
}
disable
(
'#txtSearch'
,
'#txtSlider'
);
COMMON
.
disable
(
'#txtSearch'
,
'#txtSlider'
);
};
//Start: Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary : Create next and previous canvas
...
...
abvw/js/contentview_Marking.js
View file @
822c73cc
...
...
@@ -65,7 +65,7 @@ function dlgMarking_dspSave_click() {
marking
.
content
=
saveCanvas
.
toDataURL
(
"image/png"
);
//END TRB00098
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker.
marking
.
markingid
=
getUUID
();
marking
.
markingid
=
COMMON
.
getUUID
();
marking
.
registerDate
=
new
Date
();
//=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new marking/maker.
/* insert marking */
...
...
abvw/js/contentview_Memo.js
View file @
822c73cc
...
...
@@ -66,7 +66,7 @@ function memoSaveFunction(){
//memoObj.posY = imagePt.y;
//=== Start Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo.
memoObj
.
memoid
=
getUUID
();
memoObj
.
memoid
=
COMMON
.
getUUID
();
memoObj
.
registerDate
=
new
Date
();
//=== End Function : No.17 Editor : Long Date: 07/30/2013 Summary : Set UTC time and UUID when create new memo.
tempArr
=
ClientData
.
MemoData
();
...
...
abvw/js/detail.js
View file @
822c73cc
...
...
@@ -109,7 +109,7 @@ function openContentDetail() {
// Get content detail
displayData
.
contentTitle
=
data
.
contentData
.
contentName
;
displayData
.
contentDetail
=
data
.
contentData
.
contentDetail
;
displayData
.
deliveryDate
=
convertToDate
(
data
.
contentData
.
deliveryStartDate
);
displayData
.
deliveryDate
=
COMMON
.
convertToDate
(
data
.
contentData
.
deliveryStartDate
);
//Start Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content.
...
...
@@ -126,7 +126,7 @@ function openContentDetail() {
}
}
// Show to screen
ShowContent
(
displayData
.
contentID
,
truncate
(
displayData
.
contentTitle
,
20
),
displayData
.
contentDetail
,
ClientData
.
contentInfo_contentThumbnail
(),
displayData
.
deliveryDate
,
displayData
.
pages
);
ShowContent
(
displayData
.
contentID
,
COMMON
.
truncate
(
displayData
.
contentTitle
,
20
),
displayData
.
contentDetail
,
ClientData
.
contentInfo_contentThumbnail
(),
displayData
.
deliveryDate
,
displayData
.
pages
);
},
null
);
...
...
@@ -143,7 +143,7 @@ function openContentDetail() {
// Close content detail
function
contentDetailClose_Click
(
e
)
{
e
.
preventDefault
();
unlockLayout
();
COMMON
.
unlockLayout
();
$
(
"#contentDetail"
).
hide
();
$
(
"#sectionContentDetail"
).
hide
();
};
...
...
@@ -221,11 +221,11 @@ function contentdetail_dspRead_Click_callback(outputId) {
if
(
ClientData
.
contentInfo_contentType
()
==
ContentTypeKeys
.
Type_Others
)
{
// Get content detail
downloadResourceById
(
ClientData
.
contentInfo_contentId
());
HEADER
.
downloadResourceById
(
ClientData
.
contentInfo_contentId
());
}
else
if
(
ClientData
.
contentInfo_contentType
()
==
ContentTypeKeys
.
Type_Link
){
// Get content detail
viewLinkContentById
(
ClientData
.
contentInfo_contentId
());
HEADER
.
viewLinkContentById
(
ClientData
.
contentInfo_contentId
());
}
else
{
avwScreenMove
(
ScreenIds
.
ContentView
);
...
...
@@ -234,13 +234,13 @@ function contentdetail_dspRead_Click_callback(outputId) {
//Start Function : No.12 -- Editor : Viet Nguyen -- Date : 08/01/2013 -- Summary : Create new function to return content type of content.
/* get url */
function
getURL
(
apiName
)
{
var
sysSettings
=
avwSysSetting
();
var
url
=
sysSettings
.
apiResourceDlUrl
;
url
=
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
/
//
* get url */
//
function getURL(apiName) {
//
var sysSettings = avwSysSetting();
//
var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.
format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
//
return url;
//
};
//Check content type is pdf content
function
isPdfContent
(
contentType
){
...
...
@@ -358,7 +358,7 @@ function ShowContent(contentID, contentTitle, contentDetail, contentThumbnail, d
// Show pages
for
(
var
nIndex
=
0
;
nIndex
<
pages
.
length
;
nIndex
++
)
{
//insertRow(imgSample, pages[nIndex].pageText, pages[nIndex].pageNo);
insertRow
(
pages
[
nIndex
].
pageThumbnail
,
truncate
(
getLines
(
pages
[
nIndex
].
pageText
,
3
),
45
),
pages
[
nIndex
].
pageNo
);
//55
insertRow
(
pages
[
nIndex
].
pageThumbnail
,
COMMON
.
truncate
(
COMMON
.
getLines
(
pages
[
nIndex
].
pageText
,
3
),
45
),
pages
[
nIndex
].
pageNo
);
//55
}
};
...
...
@@ -367,7 +367,7 @@ function insertRow(pageThumbnail, pageText, pageNo) {
var
newRow
=
""
;
newRow
+=
"<ul>"
;
newRow
+=
'<li class="list_img"><img src="'
+
pageThumbnail
+
'" alt="" width="90" /></li>'
;
newRow
+=
'<li class="list_title"><a href="#">'
+
htmlEncode
(
pageText
)
+
'</a></li>'
;
newRow
+=
'<li class="list_title"><a href="#">'
+
COMMON
.
htmlEncode
(
pageText
)
+
'</a></li>'
;
newRow
+=
'<li class="page"><label id="Label2" class="lang" lang="txtPage">'
+
i18nText
(
'txtPage'
)
+
'</label>'
+
pageNo
+
'</li>'
;
newRow
+=
"</ul>"
;
...
...
@@ -539,16 +539,16 @@ $(function () {
Setting dialog [ end ]
----------------------------------------------------------------------------
*/
function
truncate
(
strInput
,
length
){
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
//
function truncate(strInput, length){
//
if (strInput.length <= length)
//
{
//
return strInput;
//
}
//
else
//
{
//
return strInput.substring(0, length) + "...";
//
}
//
};
function
resetLoadingImageSize
(){
$
(
"#imgContentThumbnail"
).
attr
(
'height'
,
'25px'
);
...
...
abvw/js/header.js
View file @
822c73cc
...
...
@@ -5,13 +5,12 @@
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/jquery.toastmessage.js" />
var
timeWaitCloseNewInfoPushMessage
=
5000
;
// time wait close info new push message 5 seconds
var
currentPagePushMessage
=
1
;
var
isHoverOn
=
false
;
//名前空間用のオブジェクトを用意する
var
header
=
{};
var
HEADER
=
{};
HEADER
.
timeWaitCloseNewInfoPushMessage
=
5000
;
// time wait close info new push message 5 seconds
HEADER
.
currentPagePushMessage
=
1
;
HEADER
.
isHoverOn
=
false
;
$
(
document
).
ready
(
function
()
{
...
...
@@ -20,52 +19,52 @@ $(document).ready(function () {
// Set event to prevent leave
//avwSetLogoutNortice();
if
(
ClientData
.
requirePasswordChange
()
!=
1
)
{
ToogleLogoutNortice
();
COMMON
.
ToogleLogoutNortice
();
}
//Toggle Searchbox
$
(
'input#searchbox-key'
).
click
(
toggleSearchPanel
);
$
(
'input#searchbox-key'
).
click
(
HEADER
.
toggleSearchPanel
);
$
(
"#searchbox-key"
).
attr
(
'placeholder'
,
i18nText
(
'msgPlaceHolder'
));
//Go to Search Page
$
(
'#searchbox-search'
).
click
(
searchHeaderButtonFunction
);
$
(
'#searchbox-search'
).
click
(
HEADER
.
searchHeaderButtonFunction
);
//Change Language JP
$
(
'#language-jp'
).
click
(
changeLanguageJa
);
$
(
'#language-jp'
).
click
(
HEADER
.
changeLanguageJa
);
//Change Language KR
$
(
'#language-kr'
).
click
(
changeLanguageKo
);
$
(
'#language-kr'
).
click
(
HEADER
.
changeLanguageKo
);
//Change Language EN
$
(
'#language-en'
).
click
(
changeLanguageEn
);
$
(
'#language-en'
).
click
(
HEADER
.
changeLanguageEn
);
//Go To Bookmark Page
$
(
'#dspShiori'
).
click
(
bookmarkFunction
);
$
(
'#dspShiori'
).
click
(
HEADER
.
bookmarkFunction
);
//Go To update configuration
$
(
'#dspSetting'
).
click
(
updateConfigFunction
);
$
(
'#dspSetting'
).
click
(
HEADER
.
updateConfigFunction
);
// hide logout button with anonymous user
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
$
(
'#dspLogout'
).
hide
();
$
(
'#dspSetting'
).
hide
();
}
else
{
//Go To Login Page
$
(
'#dspLogout'
).
click
(
logoutFunction
);
$
(
'#dspLogout'
).
click
(
HEADER
.
logoutFunction
);
$
(
'#dspLogout'
).
show
();
$
(
'#dspSetting'
).
show
();
}
$
(
'#dspViewHistory'
).
click
(
historyClickFunction
);
$
(
'#dspViewHistory'
).
click
(
HEADER
.
historyClickFunction
);
$
(
'#dspHome'
).
click
(
homeClickFunction
);
$
(
'#dspHome'
).
click
(
HEADER
.
homeClickFunction
);
//Hide search panel until click on text field
$
(
'div#header-searchbox'
).
css
(
'display'
,
'none'
);
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
$
(
'#li-login-username'
).
hide
();
}
else
{
...
...
@@ -76,59 +75,59 @@ $(document).ready(function () {
$
(
'#login-username'
).
attr
(
"title"
,
ClientData
.
userInfo_userName
());
}
$
(
'#dlgConfirmBackup-backup'
).
click
(
confirmWithBackupFunction
);
$
(
'#dlgConfirmBackup-backup'
).
click
(
HEADER
.
confirmWithBackupFunction
);
$
(
'#dlgConfirmBackup-withoutbackup'
).
click
(
confirmWithoutBackupFunction
);
$
(
'#dlgConfirmBackup1'
).
hide
();
$
(
'#searchbox-key'
).
keydown
(
headerSearchKeyDownEventFunction
);
$
(
'#searchbox-key'
).
keydown
(
HEADER
.
headerSearchKeyDownEventFunction
);
$
(
'#searchbox-content-header'
).
click
(
headerSearchContentClickFunction
);
$
(
'#searchbox-content-header'
).
click
(
HEADER
.
headerSearchContentClickFunction
);
$
(
'#searchbox-tag-header'
).
click
(
headerSearchTagClickFunction
);
$
(
'#searchbox-tag-header'
).
click
(
HEADER
.
headerSearchTagClickFunction
);
$
(
'#searchbox-body-header'
).
click
(
headerSearchBodyClickFunction
);
$
(
'#searchbox-body-header'
).
click
(
HEADER
.
headerSearchBodyClickFunction
);
//init push message
initPushMessage
();
HEADER
.
initPushMessage
();
//$('*').click(handleHeaderSearchBoxEvent);
if
(
isTouchDevice
()
==
false
)
{
$
(
'#searchbox-key'
).
hover
(
searchBoxHoverFunction
,
searchBoxHoverOffFunction
);
if
(
COMMON
.
isTouchDevice
()
==
false
)
{
$
(
'#searchbox-key'
).
hover
(
HEADER
.
searchBoxHoverFunction
,
HEADER
.
searchBoxHoverOffFunction
);
$
(
'#header-searchbox'
).
hover
(
searchBoxHoverFunction
,
searchBoxHoverOffFunction
);
$
(
'#header-searchbox'
).
hover
(
HEADER
.
searchBoxHoverFunction
,
HEADER
.
searchBoxHoverOffFunction
);
}
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
var
bodyTag
=
document
.
getElementsByTagName
(
'body'
)[
0
];
bodyTag
.
addEventListener
(
'touchstart'
,
bodyClickFunction
,
false
);
bodyTag
.
addEventListener
(
'touchstart'
,
HEADER
.
bodyClickFunction
,
false
);
}
else
{
$
(
'body'
).
click
(
bodyClickFunction
);
$
(
'body'
).
click
(
HEADER
.
bodyClickFunction
);
}
});
function
searchBoxHoverF
unction
(){
isHoverOn
=
true
;
HEADER
.
searchBoxHoverFunction
=
f
unction
(){
HEADER
.
isHoverOn
=
true
;
};
function
searchBoxHoverOffF
unction
()
{
isHoverOn
=
false
;
HEADER
.
searchBoxHoverOffFunction
=
f
unction
()
{
HEADER
.
isHoverOn
=
false
;
};
// check disabled button
function
checkDisabledButt
on
(
selector
,
buttonid
)
{
HEADER
.
checkDisabledButton
=
functi
on
(
selector
,
buttonid
)
{
$
(
selector
).
click
(
function
()
{
setDisabledButton
(
selector
,
buttonid
);
HEADER
.
setDisabledButton
(
selector
,
buttonid
);
});
setDisabledButton
(
selector
,
buttonid
);
HEADER
.
setDisabledButton
(
selector
,
buttonid
);
};
function
setDisabledButt
on
(
selector
,
buttonid
)
{
HEADER
.
setDisabledButton
=
functi
on
(
selector
,
buttonid
)
{
var
isDisabled
=
$
(
selector
+
':checked'
).
length
==
0
;
if
(
isDisabled
)
{
$
(
buttonid
).
addClass
(
'disabled'
);
...
...
@@ -139,8 +138,8 @@ function setDisabledButton(selector, buttonid) {
};
function
bodyClickF
unction
(
event
)
{
if
(
isTouchDevice
())
{
HEADER
.
bodyClickFunction
=
f
unction
(
event
)
{
if
(
COMMON
.
isTouchDevice
())
{
// Check mouse is in rectangle of searching panel
if
(
$
(
'#header-searchbox'
).
is
(
":visible"
))
//if ($('#header-searchbox').css('display') != "none")
...
...
@@ -166,10 +165,10 @@ function bodyClickFunction(event) {
// check mouse position in search region
if
(
currPosX
>=
leftsearch
&&
currPosX
<=
rightsearch
&&
currPosY
>=
topsearch
&&
currPosY
<=
bottomsearch
)
{
isHoverOn
=
true
;
HEADER
.
isHoverOn
=
true
;
}
else
{
isHoverOn
=
false
;
HEADER
.
isHoverOn
=
false
;
$
(
'#header-searchbox'
).
hide
();
}
...
...
@@ -179,56 +178,56 @@ function bodyClickFunction(event) {
// && currPosY >= $('#header-searchbox').position().top
// && currPosY <= ($('#header-searchbox').position().top + $('#header-searchbox').height())) {
// isHoverOn = true;
//
HEADER.
isHoverOn = true;
// }
// else {
// isHoverOn = false;
//
HEADER.
isHoverOn = false;
// }
}
}
else
{
if
(
!
isHoverOn
)
{
if
(
!
HEADER
.
isHoverOn
)
{
$
(
'#header-searchbox'
).
hide
();
}
}
};
function
headerSearchBodyClickF
unction
()
{
HEADER
.
headerSearchBodyClickFunction
=
f
unction
()
{
$
(
'#searchbox-body'
).
attr
(
'checked'
,
'checked'
);
$
(
'#searchbox-tag'
).
removeAttr
(
'checked'
);
$
(
'#searchbox-content'
).
removeAttr
(
'checked'
);
isHoverOn
=
true
;
HEADER
.
isHoverOn
=
true
;
};
function
headerSearchTagClickF
unction
()
{
HEADER
.
headerSearchTagClickFunction
=
f
unction
()
{
$
(
'#searchbox-tag'
).
attr
(
'checked'
,
'checked'
);
$
(
'#searchbox-body'
).
removeAttr
(
'checked'
);
$
(
'#searchbox-content'
).
removeAttr
(
'checked'
);
isHoverOn
=
true
;
HEADER
.
isHoverOn
=
true
;
};
function
headerSearchContentClickF
unction
()
{
HEADER
.
headerSearchContentClickFunction
=
f
unction
()
{
$
(
'#searchbox-content'
).
attr
(
'checked'
,
'checked'
);
$
(
'#searchbox-tag'
).
removeAttr
(
'checked'
);
$
(
'#searchbox-body'
).
removeAttr
(
'checked'
);
isHoverOn
=
true
;
HEADER
.
isHoverOn
=
true
;
};
//function header search box key down function
function
headerSearchKeyDownEventF
unction
(
e
){
HEADER
.
headerSearchKeyDownEventFunction
=
f
unction
(
e
){
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
if
(
code
==
13
)
{
//Enter keycode
$
(
'#searchbox-search'
).
click
();
}
isHoverOn
=
true
;
HEADER
.
isHoverOn
=
true
;
};
//Toggle Search Panel Click function
function
toggleSearchPanel
(){
HEADER
.
toggleSearchPanel
=
function
(){
if
(
$
(
"div#header-searchbox"
).
is
(
":hidden"
))
{
// show radio options
...
...
@@ -246,7 +245,7 @@ function toggleSearchPanel(){
};
//Button Search Event function
function
searchHeaderButtonF
unction
(){
HEADER
.
searchHeaderButtonFunction
=
f
unction
(){
var
content
=
$
(
'#searchbox-content'
).
attr
(
'checked'
);
var
tag
=
$
(
'#searchbox-tag'
).
attr
(
'checked'
);
var
body
=
$
(
'#searchbox-body'
).
attr
(
'checked'
);
...
...
@@ -272,13 +271,13 @@ function searchHeaderButtonFunction(){
avwScreenMove
(
ScreenIds
.
ContentSearch
);
};
function
homeClickF
unction
(){
HEADER
.
homeClickFunction
=
f
unction
(){
//window.location = ScreenIds.Home;
avwScreenMove
(
ScreenIds
.
Home
);
};
//Change Language Japanese function
function
changeLanguageJa
(){
HEADER
.
changeLanguageJa
=
function
(){
changeLanguage
(
Consts
.
ConstLanguage_Ja
);
//ClientData.userInfo_language(Consts.ConstLanguage_Ja);
//$('#control-sort-titlekana').css('display','inline-block');
...
...
@@ -291,7 +290,7 @@ function changeLanguageJa(){
};
//Change Language English functions
function
changeLanguageE
n
(){
HEADER
.
changeLanguageEn
=
functio
n
(){
changeLanguage
(
Consts
.
ConstLanguage_En
);
//ClientData.userInfo_language(Consts.ConstLanguage_En);
//$('#control-sort-titlekana').css('display','none');
...
...
@@ -304,7 +303,7 @@ function changeLanguageEn(){
};
//Change Language English function
function
changeLanguageKo
(){
HEADER
.
changeLanguageKo
=
function
(){
changeLanguage
(
Consts
.
ConstLanguage_Ko
);
//ClientData.userInfo_language(Consts.ConstLanguage_Ko);
//$('#control-sort-titlekana').css('display','none');
...
...
@@ -317,19 +316,19 @@ function changeLanguageKo(){
};
//Shiori function
function
bookmarkF
unction
(){
HEADER
.
bookmarkFunction
=
f
unction
(){
//window.location = ScreenIds.BookmarkList;
avwScreenMove
(
ScreenIds
.
BookmarkList
);
};
//Update Config function
function
updateConfigF
unction
(){
HEADER
.
updateConfigFunction
=
f
unction
(){
//window.location = ScreenIds.Setting;
avwScreenMove
(
ScreenIds
.
Setting
);
};
//Logout function
function
logoutF
unction
()
{
HEADER
.
logoutFunction
=
f
unction
()
{
// check content is changed, update status option backup
...
...
@@ -385,7 +384,7 @@ function logoutFunction() {
$
(
'#dlgConfirmBackup1'
).
center
();
// check disabled button backup
checkDisabledButton
(
'#dlgConfirmBackup1 .option_backup input'
,
'#dlgConfirmBackup-backup'
);
HEADER
.
checkDisabledButton
(
'#dlgConfirmBackup1 .option_backup input'
,
'#dlgConfirmBackup-backup'
);
}
else
{
// Do not show confirming dialog
if
(
ClientData
.
userOpt_logoutMode
()
==
null
||
ClientData
.
userOpt_logoutMode
()
==
undefined
)
{
...
...
@@ -401,33 +400,33 @@ function logoutFunction() {
var
isBackupMemo
=
ClientData
.
userOpt_bkMemoFlag
()
==
1
;
var
isBackupBookmark
=
ClientData
.
userOpt_bkShioriFlag
()
==
1
;
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
true
);
HEADER
.
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
true
);
}
else
if
(
ClientData
.
userOpt_logoutMode
()
==
1
)
{
// Logout without backup
// Do nothing
//Logout
webLogoutEvent
();
HEADER
.
webLogoutEvent
();
}
}
}
}
// In case: user_data_backup != "Y" -> No backup, logout
else
{
webLogoutEvent
();
HEADER
.
webLogoutEvent
();
}
}
else
{
webLogoutEvent
();
HEADER
.
webLogoutEvent
();
}
};
function
historyClickF
unction
(){
HEADER
.
historyClickFunction
=
f
unction
(){
//window.location = ScreenIds.History;
avwScreenMove
(
ScreenIds
.
History
);
};
//Web Logout Event
function
webLogoutEvent
(){
HEADER
.
webLogoutEvent
=
function
(){
var
isExisted
=
false
;
...
...
@@ -471,11 +470,11 @@ 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
();
HEADER
.
webLogoutEvent
();
};
//Logout With Backup function
function
confirmWithBackupF
unction
(
e
)
{
HEADER
.
confirmWithBackupFunction
=
f
unction
(
e
)
{
e
.
preventDefault
();
// check button is disabled
...
...
@@ -489,7 +488,7 @@ function confirmWithBackupFunction(e) {
var
isBackupBookmark
=
$
(
"#chkBkAllShiori"
).
attr
(
'checked'
)
==
'checked'
;
var
remember
=
$
(
'#chkRememberBackup'
).
attr
(
'checked'
);
unlockLayout
();
COMMON
.
unlockLayout
();
$
(
'#dlgConfirmBackup1'
).
css
(
'z-index'
,
'99'
);
lockLayout
();
...
...
@@ -502,18 +501,18 @@ function confirmWithBackupFunction(e) {
ClientData
.
userOpt_bkMemoFlag
(
isBackupMemo
);
ClientData
.
userOpt_bkShioriFlag
(
isBackupBookmark
);
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
true
);
HEADER
.
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
true
);
}
else
{
ClientData
.
userOpt_bkConfirmFlg
(
1
);
// Show dialog in next time
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
true
);
HEADER
.
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
true
);
}
ClientData
.
userOpt_logoutMode
(
0
);
// In next time, if choose: [do not show dialog], will backup and logout
//webLogoutEvent();
//
HEADER.
webLogoutEvent();
};
//Confirm Back Up Ok
function
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
isLogout
,
funcCallback
)
{
HEADER
.
DoBackup
=
function
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
isLogout
,
funcCallback
)
{
// ----------------------------
// Process backup here
// ----------------------------
...
...
@@ -542,7 +541,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// });
// $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', webLogoutEvent);
// $('.toast-item-close').live('click',
HEADER.
webLogoutEvent);
// }
// else {
// //alert(i18nText('msgBackupFailed'));
...
...
@@ -555,7 +554,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// });
// $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', webLogoutEvent);
// $('.toast-item-close').live('click',
HEADER.
webLogoutEvent);
// }
// },
// function (a, b, c) {
...
...
@@ -569,7 +568,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// });
// $('.toast-position-middle-center').css('width', '500px');
// $('.toast-position-middle-center').css('margin-left', '-250px');
// $('.toast-item-close').live('click', webLogoutEvent);
// $('.toast-item-close').live('click',
HEADER.
webLogoutEvent);
// });
// Backup for No.17
...
...
@@ -603,15 +602,15 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
var
isBackupBookmarkOK
=
true
;
if
(
isBackupMarking
&&
ClientData
.
isChangedMarkingData
()
==
true
)
{
isBackupMarkingOK
=
sendSignalBackupStart
(
2
);
// start backup type marking
isBackupMarkingOK
=
HEADER
.
sendSignalBackupStart
(
2
);
// start backup type marking
if
(
isBackupMarkingOK
)
{
isBackupMarkingOK
=
backupFile
(
JSON
.
stringify
({
"type"
:
2
,
"data"
:
ClientData
.
MarkingData
()
}),
'Marking.json'
,
2
);
isBackupMarkingOK
=
HEADER
.
backupFile
(
JSON
.
stringify
({
"type"
:
2
,
"data"
:
ClientData
.
MarkingData
()
}),
'Marking.json'
,
2
);
if
(
isBackupMarkingOK
)
{
ClientData
.
isChangedMarkingData
(
false
);
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-success toast-item-message'>"
+
i18nText
(
'txtBkMarking'
)
+
" "
+
i18nText
(
'msgBackupSuccess'
)
+
"</div>"
);
}
// finish backup marking if start backup marking success
sendSignalBackupFinish
(
2
);
HEADER
.
sendSignalBackupFinish
(
2
);
}
if
(
!
isBackupMarkingOK
)
{
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-error toast-item-message'>"
+
i18nText
(
'txtBkMarking'
)
+
" "
+
i18nText
(
'msgBackupFailed'
)
+
"</div>"
);
...
...
@@ -620,16 +619,16 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// Backup bookmark
if
(
isBackupBookmark
&&
ClientData
.
isChangedBookmark
()
==
true
)
{
isBackupBookmarkOK
=
sendSignalBackupStart
(
4
);
// start backup type bookmark
isBackupBookmarkOK
=
HEADER
.
sendSignalBackupStart
(
4
);
// start backup type bookmark
if
(
isBackupBookmarkOK
)
{
isBackupBookmarkOK
=
backupFile
(
JSON
.
stringify
({
"type"
:
3
,
"data"
:
ClientData
.
BookMarkData
()
}),
'Bookmark.json'
,
4
);
isBackupBookmarkOK
=
HEADER
.
backupFile
(
JSON
.
stringify
({
"type"
:
3
,
"data"
:
ClientData
.
BookMarkData
()
}),
'Bookmark.json'
,
4
);
if
(
isBackupBookmarkOK
)
{
ClientData
.
isChangedBookmark
(
false
);
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-success toast-item-message'>"
+
i18nText
(
'txtBkShiori'
)
+
" "
+
i18nText
(
'msgBackupSuccess'
)
+
"</div>"
);
}
// finish backup bookmark if start backup bookmark ok
sendSignalBackupFinish
(
4
);
HEADER
.
sendSignalBackupFinish
(
4
);
}
if
(
!
isBackupBookmarkOK
)
{
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-error toast-item-message'>"
+
i18nText
(
'txtBkShiori'
)
+
" "
+
i18nText
(
'msgBackupFailed'
)
+
"</div>"
);
...
...
@@ -639,15 +638,15 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
// Backup Memo
if
(
isBackupMemo
&&
ClientData
.
isChangedMemo
()
==
true
)
{
isBackupMemoOK
=
sendSignalBackupStart
(
1
);
// start backup type memo
isBackupMemoOK
=
HEADER
.
sendSignalBackupStart
(
1
);
// start backup type memo
if
(
isBackupMemoOK
)
{
isBackupMemoOK
=
backupFile
(
JSON
.
stringify
({
"type"
:
1
,
"data"
:
ClientData
.
MemoData
()
}),
'ContentMemo.json'
,
1
);
isBackupMemoOK
=
HEADER
.
backupFile
(
JSON
.
stringify
({
"type"
:
1
,
"data"
:
ClientData
.
MemoData
()
}),
'ContentMemo.json'
,
1
);
if
(
isBackupMemoOK
)
{
ClientData
.
isChangedMemo
(
false
);
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-success toast-item-message'>"
+
i18nText
(
'txtBkMemo'
)
+
" "
+
i18nText
(
'msgBackupSuccess'
)
+
"</div>"
);
}
// finish backup memo if start backup memo ok
sendSignalBackupFinish
(
1
);
HEADER
.
sendSignalBackupFinish
(
1
);
}
if
(
!
isBackupMemoOK
)
{
$
(
'#divResultMessage'
).
append
(
"<div class='toast-item-image-error toast-item-message'>"
+
i18nText
(
'txtBkMemo'
)
+
" "
+
i18nText
(
'msgBackupFailed'
)
+
"</div>"
);
...
...
@@ -663,7 +662,7 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
if
(
isLogout
)
{
$
(
'.toast-position-middle-center'
).
css
(
'width'
,
'500px'
);
$
(
'.toast-position-middle-center'
).
css
(
'margin-left'
,
'-250px'
);
$
(
'.toast-item-close'
).
live
(
'click'
,
webLogoutEvent
);
$
(
'.toast-item-close'
).
live
(
'click'
,
HEADER
.
webLogoutEvent
);
}
// check call back function
...
...
@@ -676,16 +675,16 @@ function DoBackup(isBackupMarking, isBackupMemo, isBackupBookmark,isLogout,funcC
else
{
if
(
isLogout
)
{
webLogoutEvent
();
HEADER
.
webLogoutEvent
();
}
}
};
function
backupFile
(
data
,
file
,
type
)
{
HEADER
.
backupFile
=
function
(
data
,
file
,
type
)
{
var
result
=
false
;
var
params
=
[
{
name
:
'sid'
,
content
:
ClientData
.
userInfo_sid
()
},
//{ name: 'deviceType', content: '4' },
//{ name: 'deviceType', content: '4' },
//{name: 'fileType', content: type },
{
name
:
'formFile'
,
content
:
data
,
fileName
:
file
,
contentType
:
'text-plain'
}
];
...
...
@@ -701,7 +700,7 @@ function backupFile(data, file,type) {
};
// send signal backup start
function
sendSignalBackupStart
(
typeBackup
)
HEADER
.
sendSignalBackupStart
=
function
(
typeBackup
)
{
var
result
=
false
;
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
(),
"fileType"
:
typeBackup
};
...
...
@@ -716,7 +715,7 @@ function sendSignalBackupStart(typeBackup)
};
// send signal backup finish
function
sendSignalBackupFinish
(
typeBackup
)
HEADER
.
sendSignalBackupFinish
=
function
(
typeBackup
)
{
var
result
=
false
;
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
(),
"fileType"
:
typeBackup
};
...
...
@@ -732,16 +731,16 @@ function sendSignalBackupFinish(typeBackup)
/* ------ */
function
checkForceChangePassword
(){
HEADER
.
checkForceChangePassword
=
function
(){
if
(
ClientData
.
BookmarkScreen
()
!=
ScreenIds
.
Setting
){
if
(
ClientData
.
requirePasswordChange
()
==
1
){
//alert(i18nText('msgPWDNeedChange'));
showErrorScreenForceChangePassword
();
HEADER
.
showErrorScreenForceChangePassword
();
}
}
};
function
showErrorScreenForceChangePassword
(){
HEADER
.
showErrorScreenForceChangePassword
=
function
(){
var
tags
=
'<div id="avw-auth-error">'
+
'<div style="display:table; width:100%; height:100%;">'
+
'<div style="display:table-cell; text-align:center; vertical-align:middle;">'
+
...
...
@@ -775,7 +774,7 @@ function showErrorScreenForceChangePassword(){
/* region for Push message */
// init for push message
function
initPushMessage
()
HEADER
.
initPushMessage
=
function
()
{
$
(
'#liPushMessage'
).
click
(
function
()
{
...
...
@@ -789,8 +788,8 @@ function initPushMessage()
$
(
'.notification-pushmessage'
).
hide
();
// hide notification
$
(
this
).
removeClass
(
'hide'
).
addClass
(
'show'
);
currentPagePushMessage
=
1
;
getPushMessageList
();
HEADER
.
currentPagePushMessage
=
1
;
HEADER
.
getPushMessageList
();
}
}
);
...
...
@@ -799,12 +798,12 @@ function initPushMessage()
$
(
'#liPushMessage'
).
removeClass
(
'show'
).
addClass
(
'hide'
);
$
(
'#prev-page-message'
).
click
(
function
(
e
)
{
previousPushMessageClick
();
HEADER
.
previousPushMessageClick
();
e
.
stopPropagation
();
return
false
;
});
$
(
'#next-page-message'
).
click
(
function
(
e
)
{
nextPushMessageClick
();
HEADER
.
nextPushMessageClick
();
e
.
stopPropagation
();
return
false
;
});
...
...
@@ -827,29 +826,29 @@ function initPushMessage()
);
// check new push message
if
(
isAnonymousLogin
()
==
false
)
{
getPushMessageNew
();
if
(
COMMON
.
isAnonymousLogin
()
==
false
)
{
HEADER
.
getPushMessageNew
();
}
};
// get time wait check new push message
function
getTimeWaitCheckNewPushMessage
()
HEADER
.
getTimeWaitCheckNewPushMessage
=
function
()
{
return
avwSysSetting
().
pushTimePeriod
*
1000
;
// time unit is seconds
}
// get message new
function
getPushMessageNew
()
HEADER
.
getPushMessageNew
=
function
()
{
//$('.notification-pushmessage').hide();
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
()};
avwCmsApi
(
ClientData
.
userInfo_accountPath
(),
"webPushMessageNew"
,
"post"
,
params
,
callbackGetPushMessageNewSuccess
,
HEADER
.
callbackGetPushMessageNewSuccess
,
function
(
xhr
,
b
,
c
)
{
});
};
// callback get number new message success
function
callbackGetPushMessageNewSuccess
(
data
)
{
HEADER
.
callbackGetPushMessageNewSuccess
=
function
(
data
)
{
if
(
data
)
{
// get current number message in session
var
currentMessage
=
parseInt
(
ClientData
.
pushInfo_newMsgNumber
());
...
...
@@ -878,23 +877,23 @@ function callbackGetPushMessageNewSuccess(data) {
setTimeout
(
function
()
{
$
(
'.notification-pushmessage'
).
slideUp
();
},
timeWaitCloseNewInfoPushMessage
);
},
HEADER
.
timeWaitCloseNewInfoPushMessage
);
}
}
// continue check new push message
setTimeout
(
getPushMessageNew
,
getTimeWaitCheckNewPushMessage
());
setTimeout
(
HEADER
.
getPushMessageNew
,
HEADER
.
getTimeWaitCheckNewPushMessage
());
};
// get message
function
getPushMessageList
()
{
HEADER
.
getPushMessageList
=
function
()
{
var
sysSettings
=
avwSysSetting
();
var
pushPageCount
=
sysSettings
.
pushPageCount
;
var
from
=
(
currentPagePushMessage
-
1
)
*
pushPageCount
+
1
;
var
to
=
currentPagePushMessage
*
pushPageCount
;
var
from
=
(
HEADER
.
currentPagePushMessage
-
1
)
*
pushPageCount
+
1
;
var
to
=
HEADER
.
currentPagePushMessage
*
pushPageCount
;
var
params
=
{
"sid"
:
ClientData
.
userInfo_sid
(),
"recordFrom"
:
from
,
"recordTo"
:
to
};
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webPushMessageList"
,
"post"
,
params
,
...
...
@@ -906,7 +905,7 @@ function getPushMessageList() {
// hide number new message
$
(
'#numbermessage'
).
html
(
''
);
showListPushMessage
(
data
);
HEADER
.
showListPushMessage
(
data
);
},
function
(
xhr
,
b
,
c
)
{
showSystemError
();
...
...
@@ -915,20 +914,20 @@ function getPushMessageList() {
// get string from date crate pushmessage
function
getDateCreatePushMessage
(
data
)
{
HEADER
.
getDateCreatePushMessage
=
function
(
data
)
{
return
(
data
.
year
+
1900
)
+
"/"
+
(
data
.
month
+
1
)
+
"/"
+
data
.
date
+
" "
+
data
.
hours
+
":"
+
data
.
minutes
;
}
// show push message list
function
showListPushMessage
(
data
)
HEADER
.
showListPushMessage
=
function
(
data
)
{
$
(
'#show-push-message'
).
html
(
''
);
for
(
var
i
=
0
;
i
<
data
.
messageList
.
length
&&
i
<=
(
data
.
recordTo
-
data
.
recordFrom
);
i
++
)
{
var
titleMessage
=
truncate
(
data
.
messageList
[
i
].
messageDetail
,
30
).
replace
(
/</g
,
'<'
).
replace
(
/>/g
,
'>'
);
var
titleMessage
=
COMMON
.
truncate
(
data
.
messageList
[
i
].
messageDetail
,
30
).
replace
(
/</g
,
'<'
).
replace
(
/>/g
,
'>'
);
var
detailMessage
=
data
.
messageList
[
i
].
messageDetail
.
replace
(
/</g
,
'<'
).
replace
(
/>/g
,
'>'
).
replace
(
/
\n
/g
,
'<br/>'
);
var
message
=
'<div class="newmsg">'
;
message
+=
'<h5 class="postItem"><a href="#">'
+
titleMessage
+
'</a></h5>'
;
message
+=
'<p>'
+
detailMessage
+
'<span class="date">'
+
getDateCreatePushMessage
(
data
.
messageList
[
i
].
messageSendDate
)
+
'</span></p></div>'
;
message
+=
'<p>'
+
detailMessage
+
'<span class="date">'
+
HEADER
.
getDateCreatePushMessage
(
data
.
messageList
[
i
].
messageSendDate
)
+
'</span></p></div>'
;
$
(
'#show-push-message'
).
append
(
message
);
}
...
...
@@ -938,7 +937,7 @@ function showListPushMessage(data)
// show list title message
$
(
'#accordion'
).
slideDown
();
if
(
currentPagePushMessage
>
1
||
data
.
recordTo
<
data
.
totalRecord
)
{
if
(
HEADER
.
currentPagePushMessage
>
1
||
data
.
recordTo
<
data
.
totalRecord
)
{
$
(
'#accordion .pagechange'
).
show
();
}
else
{
...
...
@@ -954,7 +953,7 @@ function showListPushMessage(data)
}
// check show previous button
if
(
currentPagePushMessage
>
1
)
{
if
(
HEADER
.
currentPagePushMessage
>
1
)
{
$
(
'#prev-page-message'
).
css
({
"visibility"
:
"visible"
});
}
else
{
...
...
@@ -975,31 +974,22 @@ function showListPushMessage(data)
};
// load next page message
function
nextPushMessageClick
()
{
currentPagePushMessage
++
;
getPushMessageList
();
HEADER
.
nextPushMessageClick
=
function
()
{
HEADER
.
currentPagePushMessage
++
;
HEADER
.
getPushMessageList
();
};
// load previous page message
function
previousPushMessageClick
()
{
if
(
currentPagePushMessage
>
1
)
currentPagePushMessage
--
;
else
currentPagePushMessage
=
1
;
getPushMessageList
();
};
function
truncate
(
strInput
,
length
){
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
HEADER
.
previousPushMessageClick
=
function
()
{
if
(
HEADER
.
currentPagePushMessage
>
1
){
HEADER
.
currentPagePushMessage
--
;
}
else
{
HEADER
.
currentPagePushMessage
=
1
;
}
HEADER
.
getPushMessageList
();
};
function
setStatusSort
(
currentid
,
isAsc
)
{
HEADER
.
setStatusSort
=
function
(
currentid
,
isAsc
)
{
$
(
'#menu_sort li a'
).
removeClass
(
'descending_sort'
).
removeClass
(
'ascending_sort'
);
if
(
$
(
'#menu_sort li a#off-default'
).
size
()){
...
...
@@ -1011,7 +1001,7 @@ function setStatusSort(currentid, isAsc) {
};
// get icon of content type
function
getIconTypeContent
(
contentType
)
{
HEADER
.
getIconTypeContent
=
function
(
contentType
)
{
var
src
=
''
;
switch
(
contentType
)
{
...
...
@@ -1066,7 +1056,7 @@ function getIconTypeContent(contentType) {
};
// download resouce content id
function
downloadResourceById
(
contentId
){
HEADER
.
downloadResourceById
=
function
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
...
...
@@ -1075,13 +1065,13 @@ function downloadResourceById(contentId){
avwCmsApiSync
(
ClientData
.
userInfo_accountPath
(),
"webGetContent"
,
"get"
,
params
,
function
(
data
)
{
//Get resourceurl
var
resourceUrl
=
getResourceByIdFromAPI
(
data
.
contentData
.
content
.
resourceId
);
var
resourceUrl
=
HEADER
.
getResourceByIdFromAPI
(
data
.
contentData
.
content
.
resourceId
);
// open url to download file
if
(
isSafariNotOnIpad
())
{
if
(
HEADER
.
isSafariNotOnIpad
())
{
window
.
onbeforeunload
=
null
;
window
.
open
(
resourceUrl
,
"_self"
);
// open url to download file on safari not for ipad
var
toogleTime
=
setTimeout
(
function
()
{
ToogleLogoutNortice
()
},
200
);
var
toogleTime
=
setTimeout
(
function
()
{
COMMON
.
ToogleLogoutNortice
()
},
200
);
}
else
{
window
.
open
(
resourceUrl
);
//open url to download file on orther browser
...
...
@@ -1091,12 +1081,12 @@ function downloadResourceById(contentId){
};
//Download resource
function
getResourceByIdFromAPI
(
resourceId
){
return
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
+
"&isDownload=true"
;
HEADER
.
getResourceByIdFromAPI
=
function
(
resourceId
){
return
AVWEB
.
getURL
(
"webResourceDownload"
)
+
"/?sid="
+
ClientData
.
userInfo_sid
()
+
"&resourceId="
+
resourceId
+
"&isDownload=true"
;
};
// check is browser safari on Mac and Window devide ( not Ipad )
function
isSafariNotOnIpad
()
{
HEADER
.
isSafariNotOnIpad
=
function
()
{
if
(
!
window
.
chrome
)
{
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
if
(
!
/ipad/
.
test
(
ua
)
&&
/safari/
.
test
(
ua
))
{
...
...
@@ -1107,7 +1097,7 @@ function isSafariNotOnIpad() {
};
//link content
function
viewLinkContentById
(
contentId
){
HEADER
.
viewLinkContentById
=
function
(
contentId
){
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
contentId
:
contentId
,
...
...
@@ -1134,10 +1124,10 @@ function viewLinkContentById(contentId){
}
else {
// open url to download file
if (isSafariNotOnIpad()) {
if (
HEADER.
isSafariNotOnIpad()) {
window.onbeforeunload = null;
window.open(linkUrl, "_self"); // open url to download file on safari not for ipad
var toogleTime = setTimeout(function () { ToogleLogoutNortice() }, 200);
var toogleTime = setTimeout(function () {
COMMON.
ToogleLogoutNortice() }, 200);
}
else {
window.open(linkUrl); //open url to download file on orther browser
...
...
@@ -1149,7 +1139,7 @@ function viewLinkContentById(contentId){
};
// get ThumbnailForOtherType
header
.
getThumbnailForOtherType
=
function
(
contentType
){
HEADER
.
getThumbnailForOtherType
=
function
(
contentType
){
var
src
=
''
;
if
(
contentType
==
ContentTypeKeys
.
Type_Image
){
...
...
abvw/js/history.js
View file @
822c73cc
...
...
@@ -63,7 +63,7 @@ $(document).ready(function(){
return
;
}
LockScreen
();
COMMON
.
LockScreen
();
document
.
title
=
i18nText
(
'dspViewHistory'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
...
...
@@ -123,10 +123,10 @@ $(document).ready(function(){
}
else
{
//Check if Force Change password
checkForceChangePassword
();
HEADER
.
checkForceChangePassword
();
}
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
//プッシュメッセージ隠す
$
(
'#dspPushMessage'
).
hide
();
}
...
...
@@ -176,7 +176,7 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+ ' <img id="imgloading'+ post.contentId +'" class="home_canvas" src="./img/data_loading.gif" height="25px" width="25px" style=""/>'
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentId + '" class="dialog name" contentid="' + post.contentId + '">' +
truncate(
htmlEncode(post.contentTitle), 25) + '</a>'
+ ' <a id="title' + post.contentId + '" class="dialog name" contentid="' + post.contentId + '">' +
COMMON.truncate(COMMON.
htmlEncode(post.contentTitle), 25) + '</a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDate + '</li>'
...
...
@@ -202,8 +202,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' </a>'
+
' <div class="text">'
+
' <a id="title'
+
post
.
contentId
+
'" class="name dialog" contentid="'
+
post
.
contentId
+
'">'
+
' <img class="listIcon" src="'
+
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
' <img class="listIcon" src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
+
' <div class="info">'
+
' <ul class="date">'
...
...
@@ -298,7 +298,7 @@ function handleLanguage(){
var
typeSort
=
ClientData
.
searchCond_sortType
();
var
orderSort
=
ClientData
.
searchCond_sortOrder
();
setStatusSort
(
'#'
+
$
(
'#menu_sort li.current a'
).
attr
(
'id'
),
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#'
+
$
(
'#menu_sort li.current a'
).
attr
(
'id'
),
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
// if (typeSort == 2) {
// if (orderSort == Consts.ConstOrderSetting_Asc) {
...
...
@@ -513,7 +513,7 @@ function sortByTitleFunction(){
sortByTitleAsc
();
}
setStatusSort
(
'#control-sort-title'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-title'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
sortType
=
'1'
;
ClientData
.
searchCond_sortType
(
sortType
);
...
...
@@ -577,7 +577,7 @@ function sortByTitleKanaFunction(){
sortByTitleKanaAsc
();
}
setStatusSort
(
'#control-sort-titlekana'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-titlekana'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
sortType
=
'2'
;
//refresh gridview
...
...
@@ -641,7 +641,7 @@ function sortByReleaseDateFunction(){
sortByPublishDateAsc
();
}
setStatusSort
(
'#control-sort-releasedate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-releasedate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
sortType
=
'3'
;
ClientData
.
searchCond_sortType
(
sortType
);
...
...
@@ -699,7 +699,7 @@ function sortByViewDateFunction(){
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-viewdate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-viewdate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
sortType
=
'4'
;
...
...
@@ -775,13 +775,13 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//};
/* get url */
function
getURL
(
apiName
)
{
var
sysSettings
=
avwSysSetting
();
var
url
=
sysSettings
.
apiResourceDlUrl
;
url
=
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
/
//
* get url */
//
function getURL(apiName) {
//
var sysSettings = avwSysSetting();
//
var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.
format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
//
return url;
//
};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content.
...
...
@@ -875,13 +875,13 @@ function readSubmenuFunction_callback(contentId)
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
HEADER
.
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
contentId
);
HEADER
.
viewLinkContentById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
...
...
@@ -1338,7 +1338,7 @@ function handleSortDisp(){
// }
//$('#control-sort-title').addClass('active_tops');
setStatusSort
(
'#control-sort-title'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-title'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
if
(
typeSort
==
2
){
// if(orderSort == Consts.ConstOrderSetting_Asc){
...
...
@@ -1359,7 +1359,7 @@ function handleSortDisp(){
// }
//$('#control-sort-titlekana').addClass('active_tops');
setStatusSort
(
'#control-sort-titlekana'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-titlekana'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
if
(
typeSort
==
3
){
// if(orderSort == Consts.ConstOrderSetting_Asc){
...
...
@@ -1380,7 +1380,7 @@ function handleSortDisp(){
// }
//$('#control-sort-releasedate').addClass('active_tops');
setStatusSort
(
'#control-sort-releasedate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-releasedate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
{
// if(orderSort == Consts.ConstOrderSetting_Asc){
...
...
@@ -1402,7 +1402,7 @@ function handleSortDisp(){
// }
//$('#control-sort-viewdate').addClass('active_tops');
setStatusSort
(
'#control-sort-viewdate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-viewdate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
}
}
...
...
@@ -1677,16 +1677,16 @@ function enableSort(){
$
(
'.control_sort_off'
).
hide
();
};
function
truncate
(
strInput
,
length
){
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
//
function truncate(strInput, length){
//
if (strInput.length <= length)
//
{
//
return strInput;
//
}
//
else
//
{
//
return strInput.substring(0, length) + "...";
//
}
//
};
function
sortByTitleAsc
(){
...
...
@@ -1808,7 +1808,7 @@ function renderContentAfterSort(contentSortArr){
+ ' <img id="imgloading'+ post.contentid +'" src="./img/data_loading.gif" height="25px" class="home_canvas" width="25px"/>'
+ ' </a>'
+ ' <div class="text">'
+ ' <a id="title' + post.contentid + '" class="dialog name" contentid="' + post.contentid + '">' +
truncate(
htmlEncode(post.contenttitle), 25) + '</a>'
+ ' <a id="title' + post.contentid + '" class="dialog name" contentid="' + post.contentid + '">' +
COMMON.truncate(COMMON.
htmlEncode(post.contenttitle), 25) + '</a>'
+ ' <div class="info">'
+ ' <ul class="date">'
+ ' <li><span class="lang" lang="txtPubDt">' + i18nText("txtPubDt") + '</span> : ' + outputDeliveryDate + '</li>'
...
...
@@ -1833,8 +1833,8 @@ function renderContentAfterSort(contentSortArr){
+
' </a>'
+
' <div class="text">'
+
' <a id="title'
+
post
.
contentid
+
'" class="name dialog" contentid="'
+
post
.
contentid
+
'">'
+
' <img class="listIcon" src="'
+
getIconTypeContent
(
post
.
contenttype
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contenttitle
),
20
)
+
' <img class="listIcon" src="'
+
HEADER
.
getIconTypeContent
(
post
.
contenttype
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contenttitle
),
20
)
+
' </a>'
+
' <div class="info">'
+
' <ul class="date">'
...
...
@@ -1938,7 +1938,7 @@ function resizeResourceThumbnail(mg, width, height) {
function
removeHoverCss
(){
if
(
isTouchDevice
()){
if
(
COMMON
.
isTouchDevice
()){
$
(
'#control-sort-title'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'nottouchdevice'
);
...
...
abvw/js/home.js
View file @
822c73cc
...
...
@@ -71,7 +71,7 @@ $(document).ready(function () {
//Check if Force Change password
if
(
ClientData
.
requirePasswordChange
()
!=
1
)
{
// Register log
RegisterLog
();
COMMON
.
RegisterLog
();
//Sync Data
if
(
ClientData
.
ReadingContentIds
()
==
null
||
ClientData
.
ReadingContentIds
()
==
'undefined'
||
ClientData
.
ReadingContentIds
().
length
==
0
)
{
...
...
@@ -100,7 +100,7 @@ $(document).ready(function () {
getDataJsonFileGroup
();
// Lock screen is here, because of in getDataJsonFileGroup() called click to expand speified nodes of treeview
LockScreen
();
COMMON
.
LockScreen
();
//Change display type to bookshelf type
$
(
'#control-bookshelf-type'
).
click
(
changeDispBookShelfFunction
);
...
...
@@ -152,7 +152,7 @@ $(document).ready(function () {
$
(
'#dlgSubMenu'
).
hover
(
subMenuHoverFunction
,
subMenuHoverOffFunction
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
var
avwUserEnvObj
=
new
UserEnvironment
();
if
(
avwUserEnvObj
.
os
==
'ipad'
)
{
$
(
'#dlgSubMenu'
).
click
(
function
()
{
...
...
@@ -162,7 +162,7 @@ $(document).ready(function () {
}
$
(
'body'
).
click
(
bodyHomeClickFunction
);
if
(
isTouchDevice
()
==
true
)
{
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
var
avwUserEnvObj
=
new
UserEnvironment
();
if
(
avwUserEnvObj
.
os
==
'ipad'
)
{
$
(
'body'
).
bind
(
'touchstart'
,
function
()
{
...
...
@@ -187,7 +187,7 @@ $(document).ready(function () {
}
});
}
else
{
checkForceChangePassword
();
HEADER
.
checkForceChangePassword
();
}
//日比谷用設定ボタン隠す
...
...
@@ -203,7 +203,7 @@ $(document).ready(function () {
}
// hide tab group with user anonymous
if
(
isAnonymousLogin
())
{
if
(
COMMON
.
isAnonymousLogin
())
{
//グループ選択隠す
$
(
'.switchingTab .colright'
).
hide
();
...
...
@@ -591,13 +591,13 @@ function canvasClickFunction_callback(outputId)
//Start Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : check for download content type other.
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
outputId
);
HEADER
.
downloadResourceById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
outputId
);
HEADER
.
viewLinkContentById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
...
...
@@ -703,13 +703,13 @@ function canvasClickFunction_callback(outputId)
//For testing without other Type.
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
outputId
);
HEADER
.
downloadResourceById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
outputId
);
HEADER
.
viewLinkContentById
(
outputId
);
// redraw content remove new icon
drawEditImage
(
outputId
);
}
...
...
@@ -1015,7 +1015,7 @@ function getDataJsonFileGenre() {
if
(
dataGenre
[
i
].
parentCategoryId
==
0
)
{
var
node
=
new
TreeNode
();
//node.IsCategory = true;
node
.
Text
=
htmlEncode
(
dataGenre
[
i
].
categoryName
);
node
.
Text
=
COMMON
.
htmlEncode
(
dataGenre
[
i
].
categoryName
);
node
.
id
=
dataGenre
[
i
].
categoryId
;
node
.
Value
=
dataGenre
[
i
].
categoryId
;
node
.
ContentCount
=
dataGenre
[
i
].
contentCount
;
...
...
@@ -1065,7 +1065,7 @@ function AddChidrenNodeGenre(node1) {
$
.
each
(
dataChild
,
function
(
i
,
value
)
{
var
item
=
new
TreeNode
();
//item.IsCategory = true;
item
.
Text
=
htmlEncode
(
dataChild
[
i
].
categoryName
);
item
.
Text
=
COMMON
.
htmlEncode
(
dataChild
[
i
].
categoryName
);
item
.
id
=
dataChild
[
i
].
categoryId
;
item
.
Value
=
dataChild
[
i
].
categoryId
;
item
.
ContentCount
=
dataChild
[
i
].
contentCount
;
...
...
@@ -1169,7 +1169,7 @@ function getDataJsonFileGroup() {
if
(
dataGroup
[
i
].
parentGroupId
==
0
||
dataGroup
[
i
].
groupLevel
==
"0"
)
{
var
node
=
new
TreeNode
();
node
.
IsCategory
=
true
;
node
.
Text
=
htmlEncode
(
dataGroup
[
i
].
groupName
);
node
.
Text
=
COMMON
.
htmlEncode
(
dataGroup
[
i
].
groupName
);
node
.
id
=
dataGroup
[
i
].
groupId
;
node
.
Value
=
dataGroup
[
i
].
groupId
;
node
.
ContentCount
=
dataGroup
[
i
].
contentCount
;
...
...
@@ -1240,7 +1240,7 @@ function AddChidrenNodeGroup(node1) {
$
.
each
(
dataChild
,
function
(
i
,
value
)
{
var
item
=
new
TreeNode
();
//item.IsCategory = true;
item
.
Text
=
htmlEncode
(
dataChild
[
i
].
groupName
);
item
.
Text
=
COMMON
.
htmlEncode
(
dataChild
[
i
].
groupName
);
item
.
id
=
dataChild
[
i
].
groupId
;
item
.
Value
=
dataChild
[
i
].
groupId
;
item
.
ContentCount
=
dataChild
[
i
].
contentCount
;
...
...
@@ -1510,13 +1510,13 @@ function readSubmenuFunction_callback(contentId)
//For testing without other Type.
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
contentId
);
HEADER
.
downloadResourceById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
else
if
(
contentType
==
ContentTypeKeys
.
Type_Link
){
//link content
viewLinkContentById
(
contentId
);
HEADER
.
viewLinkContentById
(
contentId
);
// redraw content remove new icon
drawEditImage
(
contentId
);
}
...
...
@@ -1644,7 +1644,7 @@ function sortByTitleFunction() {
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-title'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-title'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
)
{
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
...
...
@@ -1720,7 +1720,7 @@ function sortByTitleKanaFunction() {
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-titlekana'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-titlekana'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
)
{
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
...
...
@@ -1797,7 +1797,7 @@ function sortByReleaseDateFunction() {
// $('#rDate-sorttype').css('width', '12px');
ClientData
.
searchCond_sortOrder
(
sortOrder
);
}
setStatusSort
(
'#control-sort-releasedate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-releasedate'
,
sortOrder
==
Consts
.
ConstOrderSetting_Asc
);
if
(
recordFrom
==
null
||
recordFrom
==
'undefined'
)
{
recordFrom
=
DEFAULT_DISP_NUMBER_RECORD_FROM
;
...
...
@@ -1842,7 +1842,7 @@ function handleLanguage() {
var
typeSort
=
ClientData
.
searchCond_sortType
();
var
orderSort
=
ClientData
.
searchCond_sortOrder
();
setStatusSort
(
'#'
+
$
(
'#menu_sort li.current a'
).
attr
(
'id'
),
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#'
+
$
(
'#menu_sort li.current a'
).
attr
(
'id'
),
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
if
(
typeSort
==
2
)
{
if
(
orderSort
==
Consts
.
ConstOrderSetting_Asc
)
{
...
...
@@ -1894,8 +1894,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' <img id="loadingIcon'
+
post
.
contentId
+
'" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+
' </div>'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name lang" lang="lblTitle" contentid="'
+
post
.
contentId
+
'">'
+
' <img src="'
+
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
' <img src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
+
'</section>'
);
...
...
@@ -1917,8 +1917,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' </a>'
+
' <div class="text">'
+
' <a id="title'
+
post
.
contentId
+
'" class="name dialog" contentid="'
+
post
.
contentId
+
'">'
+
' <img class="listIcon" src="'
+
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
' <img class="listIcon" src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
+
' <div class="info">'
+
' <ul class="date">'
...
...
@@ -1954,8 +1954,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' <img id="loadingIcon'
+
post
.
contentId
+
'" src="./img/data_loading.gif" height="25px" width="25px" style="padding: 86px; "/>'
+
' </div>'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name lang" lang="lblTitle" contentid="'
+
post
.
contentId
+
'">'
+
' <img src="'
+
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
' <img src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
+
'</section>'
);
...
...
@@ -1977,8 +1977,8 @@ function renderContent(id, text, division, type, order, from, to, cateid, grpid)
+
' </a>'
+
' <div class="text">'
+
' <a id="title'
+
post
.
contentId
+
'" class="dialog name lang" lang="lblTitle" contentid="'
+
post
.
contentId
+
'">'
+
' <img class="listIcon" src="'
+
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
truncate
(
htmlEncode
(
post
.
contentTitle
),
20
)
+
' <img class="listIcon" src="'
+
HEADER
.
getIconTypeContent
(
post
.
contentType
)
+
'" width="20" height="20">'
+
COMMON
.
truncate
(
COMMON
.
htmlEncode
(
post
.
contentTitle
),
20
)
+
' </a>'
+
' <div class="info">'
+
' <ul class="date">'
...
...
@@ -2190,16 +2190,15 @@ function isPdfContent(contentType){
// return getURL("webResourceDownload") + "/?sid=" + ClientData.userInfo_sid() + "&resourceId=" + resourceId + "&isDownload=true";
//};
/* get url */
function
getURL
(
apiName
)
{
var
sysSettings
=
avwSysSetting
();
var
url
=
sysSettings
.
apiResourceDlUrl
;
url
=
format
(
url
,
ClientData
.
userInfo_accountPath
())
+
'/'
+
apiName
;
return
url
;
};
/
//
* get url */
//
function getURL(apiName) {
//
var sysSettings = avwSysSetting();
//
var url = sysSettings.apiResourceDlUrl;
// url = AVWEB.
format(url, ClientData.userInfo_accountPath()) + '/' + apiName;
//
return url;
//
};
function
createIframeForDownload
(
url
){
};
//End Function : No.12 -- Editor : Le Long -- Date : 07/31/2013 -- Summary : Create new function to return content type of content.
...
...
@@ -2740,7 +2739,7 @@ function handleSortDisp() {
// }
// $('#control-sort-title').addClass('active_tops');
setStatusSort
(
'#control-sort-title'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-title'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
if
(
typeSort
==
2
)
{
...
...
@@ -2760,7 +2759,7 @@ function handleSortDisp() {
// }
// $('#control-sort-titlekana').addClass('active_tops');
setStatusSort
(
'#control-sort-titlekana'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-titlekana'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
else
if
(
typeSort
==
3
)
{
// if (orderSort == Consts.ConstOrderSetting_Asc) {
...
...
@@ -2779,7 +2778,7 @@ function handleSortDisp() {
// }
// $('#control-sort-releasedate').addClass('active_tops');
setStatusSort
(
'#control-sort-releasedate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
HEADER
.
setStatusSort
(
'#control-sort-releasedate'
,
orderSort
==
Consts
.
ConstOrderSetting_Asc
);
}
}
}
...
...
@@ -2855,18 +2854,20 @@ function refreshGrid() {
//format text display more record
function
formatDisplayMoreRecord
()
{
//changeLanguage(ClientData.userInfo_language());
i18nReplaceText
();
if
(
isShowBookShelf
)
{
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForBookShelf
()).
toString
());
$
(
'#control-nextrecord'
).
html
(
AVWEB
.
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForBookShelf
()).
toString
());
}
else
if
(
!
isShowBookShelf
)
{
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
$
(
'#control-nextrecord'
).
html
(
AVWEB
.
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForList
()));
}
else
{
$
(
'#control-nextrecord'
).
html
(
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForBookShelf
()));
$
(
'#control-nextrecord'
).
html
(
AVWEB
.
format
(
i18nText
(
'dspViewMore'
),
returnNumberDispRecordForBookShelf
()));
}
};
/*
...
...
@@ -3169,14 +3170,14 @@ function changeLanguageCallBackFunction() {
document
.
title
=
i18nText
(
'dspHome'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
};
function
truncate
(
strInput
,
length
)
{
if
(
strInput
.
length
<=
length
)
{
return
strInput
;
}
else
{
return
strInput
.
substring
(
0
,
length
)
+
"..."
;
}
};
//
function truncate(strInput, length) {
//
if (strInput.length <= length) {
//
return strInput;
//
}
//
else {
//
return strInput.substring(0, length) + "...";
//
}
//
};
function
resizeResourceThumbnail
(
mg
,
width
,
height
)
{
...
...
@@ -3246,7 +3247,7 @@ function setDefaultViewMode() {
function
removeHoverCss
()
{
if
(
isTouchDevice
())
{
if
(
COMMON
.
isTouchDevice
())
{
$
(
'#control-sort-title'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-titlekana'
).
removeClass
(
'nottouchdevice'
);
$
(
'#control-sort-releasedate'
).
removeClass
(
'nottouchdevice'
);
...
...
abvw/js/login.js
View file @
822c73cc
...
...
@@ -7,27 +7,25 @@
/// <reference path="../common/js/jquery.toastmessage.js" />
/// <reference path="../common/js/pageViewer.js" />
var
requirePasswordChange
;
var
userinfo_sid
;
var
userInfo_userName
;
var
optionList
=
[];
//グローバルの名前空間用のオブジェクトを用意する
var
LOGIN
=
{};
var
force_pw_change_on_login
;
var
force_pw_change_periodically
;
var
user_data_backup
;
var
marking
;
var
force_login_periodically
;
//var requirePasswordChange;
LOGIN
.
userinfo_sid
;
LOGIN
.
userInfo_userName
;
LOGIN
.
optionList
=
[];
var
login_errorMessage
=
""
;
LOGIN
.
force_pw_change_on_login
;
LOGIN
.
force_pw_change_periodically
;
LOGIN
.
user_data_backup
;
LOGIN
.
marking
;
LOGIN
.
force_login_periodically
;
LOGIN
.
login_errorMessage
=
""
;
var
timeWaitSplashScreen
=
2000
;
// wait splash screen 2 second
//名前空間用のオブジェクトを用意する
var
login
=
{};
LOGIN
.
timeWaitSplashScreen
=
2000
;
// wait splash screen 2 second
//Load login Info
function
loadLoginInfo
()
{
LOGIN
.
loadLoginInfo
=
function
()
{
$
(
'#chkRemember'
).
attr
(
'checked'
,
'checked'
);
if
(
ClientData
.
userInfo_accountPath
()
!=
null
)
{
$
(
'#txtAccPath'
).
val
(
ClientData
.
userInfo_accountPath
());
...
...
@@ -39,32 +37,27 @@ function loadLoginInfo() {
};
//Initial Screen
function
initialScreen
()
{
LOGIN
.
initialScreen
=
function
()
{
//Check Last time display language
//ClientData.userInfo_language(localStorage.getItem(avwsys_storagekey));
if
(
ClientData
.
userInfo_rememberLogin
())
{
loadLoginInfo
();
LOGIN
.
loadLoginInfo
();
}
};
//check Save Login Info
function
saveLoginInfo
()
{
LOGIN
.
saveLoginInfo
=
function
()
{
var
lang
=
getCurrentLanguage
();
//clear session of old user
SessionStorageUtils
.
clear
();
avwUserSessionObj
=
null
;
//SessionStorageUtils.clear();
//avwUserSessionObj = null;
// create new session for anonymous user
avwCreateUserSession
();
//
avwCreateUserSession();
// load language
changeLanguage
(
lang
);
//SessionStorageUtils.login();
// Set flag コンテンツデータチェックフラグ = true to sync local with server
ClientData
.
common_contentDataChkFlg
(
true
);
...
...
@@ -78,7 +71,7 @@ function saveLoginInfo() {
ClientData
.
userInfo_loginId
(
loginId
);
ClientData
.
userInfo_accountPath_session
(
accountPath
);
ClientData
.
userInfo_loginId_session
(
loginId
);
ClientData
.
userInfo_userName
(
userInfo_userName
);
ClientData
.
userInfo_userName
(
LOGIN
.
userInfo_userName
);
if
(
chkRemember
==
'checked'
)
{
...
...
@@ -90,33 +83,33 @@ function saveLoginInfo() {
}
ClientData
.
userInfo_lastLoginTime
(
date
.
jpDateTimeString
());
ClientData
.
userInfo_sid_local
(
userinfo_sid
);
saveServiceUserOption
();
ClientData
.
userInfo_sid_local
(
LOGIN
.
userinfo_sid
);
LOGIN
.
saveServiceUserOption
();
};
//Check validation
function
checkValidation
()
{
LOGIN
.
checkValidation
=
function
()
{
var
accountPath
=
$
(
'#txtAccPath'
).
val
();
var
loginId
=
$
(
'#txtAccId'
).
val
();
var
password
=
$
(
'#txtPassword'
).
val
();
var
msgError
=
$
(
'#main-error-message'
);
if
(
!
ValidationUtil
.
CheckRequiredForText
(
accountPath
))
{
login_errorMessage
=
""
;
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
i18nText
(
'msgLoginEmpty'
));
msgError
.
attr
(
'lang'
,
'msgLoginEmpty'
);
msgError
.
show
();
return
false
;
}
else
if
(
!
ValidationUtil
.
CheckRequiredForText
(
loginId
))
{
login_errorMessage
=
""
;
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
i18nText
(
'msgLoginEmpty'
));
msgError
.
attr
(
'lang'
,
'msgLoginEmpty'
);
msgError
.
show
();
return
false
;
}
else
if
(
!
ValidationUtil
.
CheckRequiredForText
(
password
))
{
login_errorMessage
=
""
;
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
i18nText
(
'msgLoginEmpty'
));
msgError
.
attr
(
'lang'
,
'msgLoginEmpty'
);
msgError
.
show
();
...
...
@@ -128,21 +121,21 @@ function checkValidation() {
};
//Check Dialog validation
function
checkDialogValidation
()
{
LOGIN
.
checkDialogValidation
=
function
()
{
var
currentPass
=
$
(
'#txtCurrentPass'
).
val
();
var
newPass
=
$
(
'#txtNewPass'
).
val
();
var
confirmPass
=
$
(
'#txtConfirmNew'
).
val
();
var
msgError
=
$
(
'#dialog-error-message'
);
if
(
!
ValidationUtil
.
CheckRequiredForText
(
currentPass
))
{
login_errorMessage
=
""
;
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
i18nText
(
'msgPwdEmpty'
));
msgError
.
attr
(
'lang'
,
'msgPwdEmpty'
);
msgError
.
show
();
return
false
;
}
else
if
(
!
ValidationUtil
.
CheckRequiredForText
(
newPass
))
{
login_errorMessage
=
""
;
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
i18nText
(
'msgPwdEmpty'
));
msgError
.
attr
(
'lang'
,
'msgPwdEmpty'
);
msgError
.
show
();
...
...
@@ -151,7 +144,7 @@ function checkDialogValidation() {
else
{
if
(
newPass
!=
confirmPass
){
login_errorMessage
=
""
;
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
i18nText
(
'msgPwdNotMatch'
));
msgError
.
attr
(
'lang'
,
'msgPwdNotMatch'
);
msgError
.
show
();
...
...
@@ -164,7 +157,7 @@ function checkDialogValidation() {
};
//Login Process
function
processLogin
()
{
LOGIN
.
processLogin
=
function
()
{
var
accountPath
=
$
(
'#txtAccPath'
).
val
();
var
loginId
=
$
(
'#txtAccId'
).
val
();
var
password
=
$
(
'#txtPassword'
).
val
();
...
...
@@ -184,24 +177,24 @@ function processLogin() {
}
// Get url to login
var
sysSettings
=
avwSysSetting
();
var
apiLoginUrl
=
sysSettings
.
apiLoginUrl
;
//
var sysSettings = avwSysSetting();
var
apiLoginUrl
=
ClientData
.
conf_apiLoginUrl
();
//
sysSettings.apiLoginUrl;
//引数パラメータがあれば取得
var
paramContentID
=
login
.
getUrlParams
(
'cid'
);
var
paramContentID
=
LOGIN
.
getUrlParams
(
'cid'
);
avwCmsApiWithUrl
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GET'
,
params
,
function
(
data
)
{
requirePasswordChange
=
data
.
requirePasswordChange
;
userinfo_sid
=
data
.
sid
;
userInfo_userName
=
data
.
userName
;
optionList
=
data
.
serviceOptionList
;
//
requirePasswordChange = data.requirePasswordChange;
LOGIN
.
userinfo_sid
=
data
.
sid
;
LOGIN
.
userInfo_userName
=
data
.
userName
;
LOGIN
.
optionList
=
data
.
serviceOptionList
;
getServiceOptionList
();
LOGIN
.
getServiceOptionList
();
if
(
data
.
result
==
'success'
)
{
// Save retrieved info
saveLoginInfo
();
LOGIN
.
saveLoginInfo
();
// set number new push message to 0
ClientData
.
pushInfo_newMsgNumber
(
0
);
...
...
@@ -212,7 +205,7 @@ function processLogin() {
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
...
...
@@ -221,20 +214,20 @@ function processLogin() {
}
else
if
(
data
.
requirePasswordChange
==
1
)
{
if
(
force_pw_change_on_login
==
2
)
{
// force to change password
OpenChangePasswordDialog
();
if
(
LOGIN
.
force_pw_change_on_login
==
2
)
{
// force to change password
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
$
(
'#btnSkip'
).
hide
();
$
(
"#txtPwdRemind"
).
css
(
'visibility'
,
'hidden'
);
}
else
if
(
force_pw_change_on_login
==
1
)
{
// recommend to change password
else
if
(
LOGIN
.
force_pw_change_on_login
==
1
)
{
// recommend to change password
// Check 30 days
skipPwdDate
=
ClientData
.
userInfo_pwdSkipDt
();
if
(
skipPwdDate
==
null
||
skipPwdDate
==
'undefined'
)
{
OpenChangePasswordDialog
();
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
show
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
...
...
@@ -247,7 +240,7 @@ function processLogin() {
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
...
...
@@ -255,7 +248,7 @@ function processLogin() {
}
else
if
(
numDay
>
30
)
{
OpenChangePasswordDialog
();
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
show
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
...
...
@@ -266,7 +259,7 @@ function processLogin() {
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
...
...
@@ -276,12 +269,12 @@ function processLogin() {
}
else
if
(
data
.
requirePasswordChange
==
2
)
{
if
(
force_pw_change_periodically
==
1
)
{
// recommend to change password
if
(
LOGIN
.
force_pw_change_periodically
==
1
)
{
// recommend to change password
$
(
'#btnSkip'
).
show
();
skipPwdDate
=
ClientData
.
userInfo_pwdSkipDt
();
if
(
skipPwdDate
==
null
||
skipPwdDate
==
'undefined'
)
{
OpenChangePasswordDialog
();
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
else
{
...
...
@@ -295,7 +288,7 @@ function processLogin() {
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
...
...
@@ -303,12 +296,12 @@ function processLogin() {
}
else
if
(
numDay
>
30
)
{
OpenChangePasswordDialog
();
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
}
}
else
if
(
force_pw_change_periodically
==
2
)
{
// Force to change password
OpenChangePasswordDialog
();
}
else
if
(
LOGIN
.
force_pw_change_periodically
==
2
)
{
// Force to change password
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
hide
();
$
(
".ui-dialog-titlebar"
).
hide
();
$
(
"#txtPwdRemind"
).
css
(
'visibility'
,
'hidden'
);
...
...
@@ -317,7 +310,7 @@ function processLogin() {
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
...
...
@@ -327,28 +320,27 @@ function processLogin() {
}
}
else
{
login_errorMessage
=
data
.
errorMessage
;
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
());
LOGIN
.
login_errorMessage
=
data
.
errorMessage
;
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
());
$
(
'#main-error-message'
).
show
();
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
LOGIN
.
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
).
toString
());
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
).
toString
());
}
else
{
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
'E001'
));
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
'E001'
));
}
$
(
'#main-error-message'
).
show
();
});
};
//Change Password Process
function
changePasswordProcess
(){
LOGIN
.
changePasswordProcess
=
function
(){
var
accountPath
=
$
(
'#txtAccPath'
).
val
();
//var sid = ClientData.userInfo_sid();
var
sid
=
ClientData
.
userInfo_sid_local
();
var
loginId
=
$
(
'#txtAccId'
).
val
();
var
password
=
$
(
'#txtCurrentPass'
).
val
();
...
...
@@ -366,7 +358,7 @@ function changePasswordProcess(){
var
result
=
data
.
result
;
if
(
result
==
'success'
)
{
$
(
'#dialog-error-message'
).
css
(
'display'
,
'none'
);
CloseChangePasswordDialog
();
LOGIN
.
CloseChangePasswordDialog
();
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
...
...
@@ -388,79 +380,76 @@ function changePasswordProcess(){
};
//Change Language Japanese
function
changeLanguageJa
(){
LOGIN
.
changeLanguageJa
=
function
(){
changeLanguage
(
Consts
.
ConstLanguage_Ja
);
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
//ClientData.userInfo_language(Consts.ConstLanguage_Ja);
if
(
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
login_errorMessage
).
toString
());
//ClientData.userInfo_language(Consts.ConstLanguage_Ja);
if
(
LOGIN
.
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
LOGIN
.
login_errorMessage
).
toString
());
}
};
//Change Language Korean
function
changeLanguageKo
(){
LOGIN
.
changeLanguageKo
=
function
(){
changeLanguage
(
Consts
.
ConstLanguage_Ko
);
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
//ClientData.userInfo_language(Consts.ConstLanguage_Ko);
if
(
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
login_errorMessage
).
toString
());
//ClientData.userInfo_language(Consts.ConstLanguage_Ko);
if
(
LOGIN
.
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
LOGIN
.
login_errorMessage
).
toString
());
}
};
//Change Language English
function
changeLanguageE
n
(){
LOGIN
.
changeLanguageEn
=
functio
n
(){
changeLanguage
(
Consts
.
ConstLanguage_En
);
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
//ClientData.userInfo_language(Consts.ConstLanguage_En);
if
(
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
login_errorMessage
).
toString
());
if
(
LOGIN
.
login_errorMessage
!=
""
){
$
(
'#main-error-message'
).
html
(
AVWEB
.
format
(
i18nText
(
'msgLoginErrWrong'
),
LOGIN
.
login_errorMessage
).
toString
());
}
};
//Login click function
function
loginFunction
()
{
if
(
checkValidation
())
{
processLogin
();
LOGIN
.
loginFunction
=
function
()
{
if
(
LOGIN
.
checkValidation
())
{
LOGIN
.
processLogin
();
}
};
//Change Password function
function
changePassF
unction
(){
if
(
checkDialogValidation
()){
changePasswordProcess
();
LOGIN
.
changePassFunction
=
f
unction
(){
if
(
LOGIN
.
checkDialogValidation
()){
LOGIN
.
changePasswordProcess
();
}
};
//Skip Password function
function
skipPassF
unction
(){
LOGIN
.
skipPassFunction
=
f
unction
(){
var
date
=
new
Date
();
ClientData
.
userInfo_pwdSkipDt
(
date
);
//window.location = "abvw/" + ScreenIds.Home;
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
};
//Open Change Password Dialog
function
OpenChangePasswordDialog
(){
LOGIN
.
OpenChangePasswordDialog
=
function
(){
// Clear all input values
$
(
"#main-password-change"
).
show
();
$
(
"#main-password-change"
).
center
();
lockLayout
();
};
//Close Chnage Password Dialog
function
CloseChangePasswordDialog
(){
LOGIN
.
CloseChangePasswordDialog
=
function
(){
$
(
"#main-password-change"
).
dialog
(
'close'
);
};
//Save Service Option
function
saveServiceUserOp
tion
(){
LOGIN
.
saveServiceUserOption
=
func
tion
(){
$
.
each
(
optionList
,
function
(
i
,
option
)
{
$
.
each
(
LOGIN
.
optionList
,
function
(
i
,
option
)
{
if
(
option
.
serviceName
==
'force_pw_change_periodically'
)
{
ClientData
.
serviceOpt_force_pw_change_periodically
(
option
.
value
);
...
...
@@ -484,7 +473,6 @@ function saveServiceUserOption(){
}
else
if
(
option
.
serviceName
==
'web_screen_lock_wait'
)
{
ClientData
.
serviceOpt_web_screen_lock_wait
(
option
.
value
);
}
else
if
(
option
.
serviceName
==
'catalog_edition'
)
{
...
...
@@ -506,104 +494,145 @@ function saveServiceUserOption(){
};
//Get Service Option
function
getServiceOptionList
(){
LOGIN
.
getServiceOptionList
=
function
(){
$
.
each
(
optionList
,
function
(
i
,
option
){
$
.
each
(
LOGIN
.
optionList
,
function
(
i
,
option
){
if
(
option
.
serviceName
==
'force_pw_change_periodically'
){
force_pw_change_periodically
=
option
.
value
;
LOGIN
.
force_pw_change_periodically
=
option
.
value
;
}
else
if
(
option
.
serviceName
==
'force_pw_change_on_login'
){
force_pw_change_on_login
=
option
.
value
;
LOGIN
.
force_pw_change_on_login
=
option
.
value
;
}
else
if
(
option
.
serviceName
==
'force_login_periodically'
){
force_login_periodically
=
option
.
value
;
LOGIN
.
force_login_periodically
=
option
.
value
;
}
else
if
(
option
.
serviceName
==
'marking'
){
marking
=
option
.
value
;
LOGIN
.
marking
=
option
.
value
;
}
else
if
(
option
.
serviceName
==
'user_data_backup'
){
user_data_backup
=
option
.
value
;
LOGIN
.
user_data_backup
=
option
.
value
;
}
});
};
function
OpenChangePassword
()
{
//$("#dlgChangePassword").dialog("open");
//$(".ui-dialog-titlebar").hide();
};
//
function OpenChangePassword() {
//
//$("#dlgChangePassword").dialog("open");
//
//$(".ui-dialog-titlebar").hide();
//
};
function
loginWhenClickEnter
(
e
){
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
if
(
code
==
13
)
{
//Enter keycode
$
(
'#btnLogin'
).
click
();
}
LOGIN
.
loginWhenClickEnter
=
function
(
e
){
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
if
(
code
==
13
)
{
//Enter keycode
$
(
'#btnLogin'
).
click
();
}
};
$
(
document
).
ready
(
function
(
e
)
{
if
(
isAnonymousLogin
())
{
//セッションストレージクリア
//SessionStorageUtils.clear();
//avwUserSessionObj = null;
// create new session
avwCreateUserSession
();
initi18n
();
var
sysSettings
=
avwSysSetting
();
// get info in conf.json
//getitsサーバー設定確認
//getitsモード初期化
ClientData
.
isGetitsMode
(
false
);
if
(
sysSettings
.
apiUrl
==
""
){
//引数パラメータを取得
var
siteUrl
=
LOGIN
.
getUrlParams
(
'siteUrl'
);
var
urlPath
=
LOGIN
.
getUrlParams
(
'urlPath'
);
if
(
siteUrl
!=
""
&&
urlPath
!=
""
){
//getitsモード有効
ClientData
.
isGetitsMode
(
true
);
//api接続先設定
ClientData
.
conf_apiUrl
(
siteUrl
+
"{0}/abvapi"
);
ClientData
.
conf_apiLoginUrl
(
siteUrl
+
"nuabvapi"
);
ClientData
.
conf_apiResourceDlUrl
(
siteUrl
+
"{0}/dl"
);
//アカウント関連
ClientData
.
userInfo_accountPath
(
urlPath
);
ClientData
.
userInfo_accountPath_session
(
urlPath
);
ClientData
.
userInfo_loginId
(
""
);
ClientData
.
userInfo_loginId_session
(
""
);
}
}
else
{
//confのパラメータセット
ClientData
.
conf_apiUrl
(
sysSettings
.
apiUrl
);
ClientData
.
conf_apiLoginUrl
(
sysSettings
.
apiLoginUrl
);
ClientData
.
conf_apiResourceDlUrl
(
sysSettings
.
apiResourceDlUrl
);
}
if
(
ClientData
.
isGetitsMode
()
==
true
){
$
(
'#anonymous'
).
show
();
setTimeout
(
function
()
{
LOGIN
.
initLoginGetitsUser
();
},
LOGIN
.
timeWaitSplashScreen
);
}
else
if
(
COMMON
.
isAnonymousLogin
())
{
console
.
log
(
"COMMON.isAnonymousLogin"
);
$
(
'#anonymous'
).
show
();
setTimeout
(
function
()
{
initLoginAnonymousUser
();
},
timeWaitSplashScreen
);
LOGIN
.
initLoginAnonymousUser
();
},
LOGIN
.
timeWaitSplashScreen
);
}
else
{
$
(
'#normalUser'
).
show
();
$
(
'#formlogin'
).
hide
();
$
(
'#logologin'
).
animate
({
"margin-top"
:
0
},
timeWaitSplashScreen
,
$
(
'#logologin'
).
animate
({
"margin-top"
:
0
},
LOGIN
.
timeWaitSplashScreen
,
function
()
{
$
(
'#formlogin'
).
show
();
$
(
'#menu-language'
).
animate
({
opacity
:
1
},
timeWaitSplashScreen
);
$
(
'#formlogin'
).
animate
({
opacity
:
1
},
timeWaitSplashScreen
);
$
(
'.cnt_footer'
).
animate
({
opacity
:
1
},
timeWaitSplashScreen
);
$
(
'#menu-language'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
$
(
'#formlogin'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
$
(
'.cnt_footer'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
}
);
initLoginNormalUser
();
LOGIN
.
initLoginNormalUser
();
}
// setTimeout(function () {
// if (isAnonymousLogin()) {
// initLoginAnonymousUser();
// }
// else {
// $('#splashscreen').fadeOut(timeWaitSplashScreen, 'swing', function () {
// $('#login-screen').fadeIn(1000, 'swing');
// });
// initLoginNormalUser();
// }
// }, timeWaitSplashScreen);
});
// init login for normal user
function
initLoginNormalUser
()
{
LOGIN
.
initLoginNormalUser
=
function
()
{
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
//Initial Screen
initialScreen
();
LOGIN
.
initialScreen
();
//Change language japanese
$
(
'#language-ja'
).
click
(
changeLanguageJa
);
$
(
'#language-ja'
).
click
(
LOGIN
.
changeLanguageJa
);
//Change language korean
$
(
'#language-ko'
).
click
(
changeLanguageKo
);
$
(
'#language-ko'
).
click
(
LOGIN
.
changeLanguageKo
);
//Change laguage english
$
(
'#language-en'
).
click
(
changeLanguageEn
);
$
(
'#language-en'
).
click
(
LOGIN
.
changeLanguageEn
);
//Button login click event
$
(
'#btnLogin'
).
click
(
loginFunction
);
$
(
'#btnLogin'
).
click
(
LOGIN
.
loginFunction
);
//Button Change click event
$
(
'#btnChange'
).
click
(
changePassFunction
);
$
(
'#btnChange'
).
click
(
LOGIN
.
changePassFunction
);
//Button Skip click event
$
(
'#btnSkip'
).
click
(
skipPassFunction
);
$
(
'#btnSkip'
).
click
(
LOGIN
.
skipPassFunction
);
$
(
'#txtPassword'
).
keydown
(
loginWhenClickEnter
);
$
(
'#txtPassword'
).
keydown
(
LOGIN
.
loginWhenClickEnter
);
};
// init login for anonymous user
function
initLoginAnonymousUser
()
{
LOGIN
.
initLoginAnonymousUser
=
function
()
{
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
...
...
@@ -615,18 +644,18 @@ function initLoginAnonymousUser() {
urlpath
:
sysSettings
.
anonymousLoginPath
};
avwCmsApiWithUrl
(
sysSettings
.
apiLoginUrl
,
null
,
'webClientAnonymousLogin'
,
'post'
,
params
,
function
(
data
)
{
avwCmsApiWithUrl
(
ClientData
.
conf_apiLoginUrl
()
,
null
,
'webClientAnonymousLogin'
,
'post'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
//clear session of old anonymous user
SessionStorageUtils
.
clear
();
//
SessionStorageUtils.clear();
//警告表示を組み込んだら i18nText()の値が未定義になるので言語リソース再読み込み
initi18n
();
avwUserSessionObj
=
null
;
//
avwUserSessionObj = null;
// create new session for anonymous user
avwCreateUserSession
();
//
avwCreateUserSession();
// set info user anonymous login
ClientData
.
userInfo_accountPath
(
sysSettings
.
anonymousLoginPath
);
...
...
@@ -647,36 +676,21 @@ function initLoginAnonymousUser() {
ClientData
.
pushInfo_newMsgNumber
(
0
);
// get service option list
optionList
=
data
.
serviceOptionList
;
LOGIN
.
optionList
=
data
.
serviceOptionList
;
// save service user option
saveServiceUserOption
();
//$.each(data.serviceOptionList, function (i, option) {
// if (option.serviceName == 'marking') {
// ClientData.serviceOpt_marking(option.value);
// } else if( option.serviceName == 'catalog_edition' ) {
// ClientData.serviceOpt_catalog_edition(option.value);
// } else if( option.serviceName == 'hibiyakadan_catalog' ) {
// ClientData.serviceOpt_hibiyakadan_catalog(option.value);
// } else if( option.serviceName == 'usable_readinglog_gps' ) {
// ClientData.serviceOpt_usable_readinglog_gps(option.value);
// } else if( option.serviceName == 'usable_readinglog_object' ) {
// ClientData.serviceOpt_usable_readinglog_object(option.value);
// }
//});
LOGIN
.
saveServiceUserOption
();
// hide splash screen then move to home page
$
(
'#anonymous'
).
fadeOut
(
'slow'
,
'swing'
,
function
()
{
//avwScreenMove("abvw/" + ScreenIds.Home);
//カタログエディション対応判定
if
(
ClientData
.
serviceOpt_catalog_edition
()
==
'Y'
){
//引数パラメータがあれば取得
var
paramContentID
=
login
.
getUrlParams
(
'cid'
);
var
paramContentID
=
LOGIN
.
getUrlParams
(
'cid'
);
//カタログ対応
if
(
paramContentID
!=
''
){
//OpenUrlでコンテンツ開く
login
.
showContentViewByOpenUrl
(
paramContentID
);
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
...
...
@@ -690,28 +704,115 @@ function initLoginAnonymousUser() {
}
else
{
if
(
data
.
errorMessage
!=
null
&&
data
.
errorMessage
!=
undefined
)
{
showMessageErrorLoginAnonymous
(
format
(
i18nText
(
'msgAnonymousLoginErr'
),
data
.
errorMessage
).
toString
());
LOGIN
.
showMessageErrorLoginAnonymous
(
AVWEB
.
format
(
i18nText
(
'msgAnonymousLoginErr'
),
data
.
errorMessage
).
toString
());
}
else
{
LOGIN
.
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
}
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
var
errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
if
(
errorMessage
)
{
LOGIN
.
showMessageErrorLoginAnonymous
(
AVWEB
.
format
(
i18nText
(
'msgAnonymousLoginErr'
),
errorMessage
).
toString
());
}
else
{
LOGIN
.
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
}
}
else
{
LOGIN
.
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
}
});
};
// init login for getits user
LOGIN
.
initLoginGetitsUser
=
function
()
{
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
//var sysSettings = avwSysSetting(); // get info in conf.json
var
params
=
{
urlpath
:
ClientData
.
userInfo_accountPath
()
};
initi18n
();
avwCmsApiWithUrl
(
ClientData
.
conf_apiLoginUrl
(),
ClientData
.
userInfo_accountPath
(),
'webClientGetitsLogin'
,
'post'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
//clear session of old anonymous user
//SessionStorageUtils.clear();
//警告表示を組み込んだら i18nText()の値が未定義になるので言語リソース再読み込み
//initi18n();
//avwUserSessionObj = null;
// create new session for getits user
//avwCreateUserSession();
// set info user anonymous login
//ClientData.userInfo_accountPath(sysSettings.anonymousLoginPath);
//ClientData.userInfo_accountPath_session(sysSettings.anonymousLoginPath);
//ClientData.userInfo_loginId(sysSettings.anonymousLoginId);
//ClientData.userInfo_loginId_session(sysSettings.anonymousLoginId);
ClientData
.
userInfo_userName
(
data
.
userName
);
ClientData
.
userInfo_sid
(
data
.
sid
);
ClientData
.
userInfo_sid_local
(
data
.
sid
);
// clear all local storage data of old anonymous
LocalStorageUtils
.
clear
();
// set number new push message to 0
ClientData
.
pushInfo_newMsgNumber
(
0
);
// get service option list
LOGIN
.
optionList
=
data
.
serviceOptionList
;
// save service user option
LOGIN
.
saveServiceUserOption
();
// hide splash screen then move to home page
$
(
'#anonymous'
).
fadeOut
(
'slow'
,
'swing'
,
function
()
{
//引数パラメータがあれば取得
var
paramContentID
=
LOGIN
.
getUrlParams
(
'cid'
);
//カタログ対応
if
(
paramContentID
!=
''
){
//OpenUrlでコンテンツ開く
LOGIN
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
});
}
else
{
if
(
data
.
errorMessage
!=
null
&&
data
.
errorMessage
!=
undefined
)
{
LOGIN
.
showMessageErrorLoginAnonymous
(
AVWEB
.
format
(
i18nText
(
'msgAnonymousLoginErr'
),
data
.
errorMessage
).
toString
());
}
else
{
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
LOGIN
.
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
}
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
var
errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
if
(
errorMessage
)
{
showMessageErrorLoginAnonymous
(
format
(
i18nText
(
'msgAnonymousLoginErr'
),
errorMessage
).
toString
());
LOGIN
.
showMessageErrorLoginAnonymous
(
AVWEB
.
format
(
i18nText
(
'msgAnonymousLoginErr'
),
errorMessage
).
toString
());
}
else
{
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
LOGIN
.
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
}
}
else
{
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
LOGIN
.
showMessageErrorLoginAnonymous
(
i18nText
(
'msgAnonymousLoginErr2'
));
}
});
};
function
showMessageErrorLoginAnonymous
(
errorMessage
)
{
LOGIN
.
showMessageErrorLoginAnonymous
=
function
(
errorMessage
)
{
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
(
'showToast'
,
{
type
:
'error'
,
...
...
@@ -722,7 +823,7 @@ function showMessageErrorLoginAnonymous(errorMessage) {
};
// OpenUriで開いた場合の直接コンテンツ表示
login
.
showContentViewByOpenUrl
=
function
(
strContentId
)
{
LOGIN
.
showContentViewByOpenUrl
=
function
(
strContentId
)
{
var
contentType
=
''
;
var
result
=
[];
...
...
@@ -740,7 +841,7 @@ login.showContentViewByOpenUrl = function(strContentId) {
contentType
=
data
.
contentData
.
contentType
;
if
(
contentType
==
ContentTypeKeys
.
Type_Others
){
//Download content
downloadResourceById
(
strContentId
);
HEADER
.
downloadResourceById
(
strContentId
);
// redraw content remove new icon
//drawEditImage(contentId); 不要
}
else
{
...
...
@@ -754,11 +855,11 @@ login.showContentViewByOpenUrl = function(strContentId) {
data
.
contentData
.
contentId
,
function
()
{
login
.
alertMessageOkFunction_callback
();
LOGIN
.
alertMessageOkFunction_callback
();
},
function
()
{
login
.
alertMessageCancelFunction_callback
();
LOGIN
.
alertMessageCancelFunction_callback
();
}
);
//avwScreenMove("abvw/" + ScreenIds.ContentView);
...
...
@@ -774,16 +875,16 @@ login.showContentViewByOpenUrl = function(strContentId) {
};
//警告表示時のOK処理
login
.
alertMessageOkFunction_callback
=
function
(){
LOGIN
.
alertMessageOkFunction_callback
=
function
(){
avwScreenMove
(
"abvw/"
+
ScreenIds
.
ContentView
);
};
//警告表示時のキャンセル処理
login
.
alertMessageCancelFunction_callback
=
function
(){
LOGIN
.
alertMessageCancelFunction_callback
=
function
(){
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
};
//Get param url
login
.
getUrlParams
=
function
(
name
){
LOGIN
.
getUrlParams
=
function
(
name
){
name
=
name
.
replace
(
/
[\[]
/
,
"
\\\
["
).
replace
(
/
[\]]
/
,
"
\\\
]"
);
var
regexS
=
"[
\\
?&]"
+
name
+
"=([^&#]*)"
;
var
regex
=
new
RegExp
(
regexS
);
...
...
abvw/js/settings.js
View file @
822c73cc
...
...
@@ -19,8 +19,8 @@
$
(
document
).
ready
(
function
()
{
if
(
!
avwCheckLogin
(
ScreenIds
.
Login
))
return
;
ToogleLogoutNortice
();
LockScreen
();
COMMON
.
ToogleLogoutNortice
();
COMMON
.
LockScreen
();
document
.
title
=
i18nText
(
'dspSetting'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
...
...
@@ -56,7 +56,7 @@ $(document).ready(function () {
$
(
"#dspOptBk"
).
show
();
// check disabled button backup
checkDisabledButton
(
'#dlgConfirmBackup .option_backup input'
,
'#dspOptBk_OK'
);
HEADER
.
checkDisabledButton
(
'#dlgConfirmBackup .option_backup input'
,
'#dspOptBk_OK'
);
}
else
{
$
(
"#dspOptBk"
).
hide
();
...
...
@@ -119,7 +119,7 @@ $(document).ready(function () {
}
// check disabled button restore
checkDisabledButton
(
'#dlgConfirmRestore .option_backup input'
,
'#dspOptRes_OK'
);
HEADER
.
checkDisabledButton
(
'#dlgConfirmRestore .option_backup input'
,
'#dspOptRes_OK'
);
}
else
{
...
...
@@ -333,7 +333,7 @@ function dspOptBk_OK_Click(e) {
}
// call backup file at header
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
false
,
HEADER
.
DoBackup
(
isBackupMarking
,
isBackupMemo
,
isBackupBookmark
,
false
,
function
()
{
// Check to hide/show backup button
...
...
@@ -539,7 +539,7 @@ function restoreBookmarkData()
{
sid
:
ClientData
.
userInfo_sid
(),
filename
:
"Bookmark.json"
},
// deviceType: '4',
function
(
data
)
{
if
(
data
)
{
getDataBookmark
(
data
);
COMMON
.
getDataBookmark
(
data
);
ClientData
.
isChangedBookmark
(
false
);
result
=
true
;
}
...
...
@@ -560,7 +560,7 @@ function restoreMemoData() {
{
sid
:
ClientData
.
userInfo_sid
(),
filename
:
"ContentMemo.json"
},
//deviceType: '4',
function
(
data
)
{
if
(
data
)
{
getDataMemo
(
data
);
COMMON
.
getDataMemo
(
data
);
//ClientData.isChangedMemo(true);
result
=
true
;
}
...
...
@@ -582,7 +582,7 @@ function restoreMarkingData()
{
sid
:
ClientData
.
userInfo_sid
(),
filename
:
"Marking.json"
},
// deviceType: '4',
function
(
data
)
{
if
(
data
)
{
getDataMarking
(
data
);
COMMON
.
getDataMarking
(
data
);
ClientData
.
isChangedMarkingData
(
false
);
result
=
true
;
}
...
...
@@ -639,11 +639,11 @@ function dspSave_Click(e) {
// Show/not show alert when press F5.close tab.broswer.
if
(
$
(
"#chkOpt005"
).
attr
(
'checked'
)
==
'checked'
)
{
ClientData
.
userOpt_closeOrRefreshAlert
(
1
);
ToogleLogoutNortice
();
COMMON
.
ToogleLogoutNortice
();
}
else
{
ClientData
.
userOpt_closeOrRefreshAlert
(
0
);
ToogleLogoutNortice
();
COMMON
.
ToogleLogoutNortice
();
}
// 毎回ログアウトの時、バックアップするかどうかは必ず確認する
if
(
$
(
"#chkOptBkCfm"
).
attr
(
'checked'
)
==
'checked'
)
{
...
...
@@ -731,7 +731,7 @@ function OpenChangePassword() {
function
closeChangePassword
(
skip
)
{
//$("#dlgChangePassword").dialog("close");
$
(
"#dlgChangePassword"
).
hide
();
unlockLayout
();
COMMON
.
unlockLayout
();
};
// Want to change password
...
...
@@ -826,7 +826,7 @@ function dspOptBk_Click(e) {
$
(
'#chkopBkMarking'
).
removeAttr
(
'disabled'
);
}
setDisabledButton
(
'#dlgConfirmBackup .option_backup input'
,
'#dspOptBk_OK'
);
HEADER
.
setDisabledButton
(
'#dlgConfirmBackup .option_backup input'
,
'#dspOptBk_OK'
);
openBackup
();
};
...
...
@@ -1049,7 +1049,7 @@ function closeBackup(cancel) {
}
//$("#dlgConfirmBackup").dialog("close");
$
(
"#dlgConfirmBackup"
).
hide
();
unlockLayout
();
COMMON
.
unlockLayout
();
};
function
openRestore
()
{
...
...
@@ -1070,7 +1070,7 @@ function closeRestore(cancel) {
}
//$("#dlgConfirmRestore").dialog("close");
$
(
"#dlgConfirmRestore"
).
hide
();
unlockLayout
();
COMMON
.
unlockLayout
();
};
// Get input current password
...
...
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