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
cbb8b243
Commit
cbb8b243
authored
Feb 21, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ログイン有りでのOpenUrl対応
parent
290f3c6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
65 deletions
+111
-65
abvw/js/home.js
+31
-34
abvw/js/login.js
+80
-31
No files found.
abvw/js/home.js
View file @
cbb8b243
...
@@ -190,50 +190,47 @@ $(document).ready(function () {
...
@@ -190,50 +190,47 @@ $(document).ready(function () {
checkForceChangePassword
();
checkForceChangePassword
();
}
}
//日比谷用設定ボタン隠す
$
(
'#dspHibiya'
).
hide
();
//カタログエディション対応判定
if
(
ClientData
.
serviceOpt_catalog_edition
()
==
'Y'
){
$
(
'.tabUnit'
).
hide
();
//センタリングするようサイズ調整
$
(
'#main'
).
width
(
660
);
}
else
{
$
(
'.tabUnit'
).
show
();
}
// hide tab group with user anonymous
// hide tab group with user anonymous
if
(
isAnonymousLogin
())
{
if
(
isAnonymousLogin
())
{
//カタログエディション対応判定
if
(
ClientData
.
serviceOpt_catalog_edition
()
==
'Y'
){
//グループ選択隠す
$
(
'.tabUnit'
).
hide
();
$
(
'.switchingTab .colright'
).
hide
();
//センタリングするようサイズ調整
//プッシュメッセージ隠す
$
(
'#main'
).
width
(
660
);
$
(
'#dspPushMessage'
).
hide
();
}
else
{
//日比谷対応判定
$
(
'.tabUnit'
).
show
();
if
(
ClientData
.
serviceOpt_hibiyakadan_catalog
()
==
'Y'
){
$
(
'.switchingTab .colright'
).
hide
();
$
(
'#dspHibiya'
).
show
();
}
jQuery
(
'#dlgAddMemberGroup'
).
dialog
(
{
//日比谷対応判定
autoOpen
:
false
,
if
(
ClientData
.
serviceOpt_hibiyakadan_catalog
()
==
'Y'
){
modal
:
true
,
$
(
'#dspHibiya'
).
show
();
width
:
350
});
jQuery
(
'#dlgAddMemberGroup'
).
dialog
(
{
$
(
'#dspHibiya'
).
click
(
dspHibiyaClickFunction
);
autoOpen
:
false
,
$
(
'#btnAddMemberGroupSearch'
).
click
(
btnAddMemberGroupSearchClickFunction
);
modal
:
true
,
}
width
:
350
});
$
(
'#dspHibiya'
).
click
(
dspHibiyaClickFunction
);
$
(
'#btnAddMemberGroupSearch'
).
click
(
btnAddMemberGroupSearchClickFunction
);
}
else
{
$
(
'#dspHibiya'
).
hide
();
}
//プッシュメッセージ隠す
$
(
'#dspPushMessage'
).
hide
();
}
else
{
}
else
{
$
(
'.tabUnit'
).
show
();
//
$('.tabUnit').show();
$
(
'.switchingTab .colright'
).
show
();
$
(
'.switchingTab .colright'
).
show
();
}
}
// set scroll for tree view with IE9 on win7
// set scroll for tree view with IE9 on win7
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
/msie 9.0/
.
test
(
ua
)
&&
/windows nt 6.1/
.
test
(
ua
)
&&
!
/tablet/
.
test
(
ua
))
{
if
(
/msie 9.0/
.
test
(
ua
)
&&
/windows nt 6.1/
.
test
(
ua
)
&&
!
/tablet/
.
test
(
ua
))
{
$
(
'.tab_bg_color'
).
css
({
"overflow-x"
:
"scroll"
});
$
(
'.tab_bg_color'
).
css
({
"overflow-x"
:
"scroll"
});
}
}
//if (isIE9()) {
// $('.tab_bg_color').css({ "overflow-x": "scroll" });
//}
});
});
...
...
abvw/js/login.js
View file @
cbb8b243
...
@@ -187,6 +187,9 @@ function processLogin() {
...
@@ -187,6 +187,9 @@ function processLogin() {
var
sysSettings
=
avwSysSetting
();
var
sysSettings
=
avwSysSetting
();
var
apiLoginUrl
=
sysSettings
.
apiLoginUrl
;
var
apiLoginUrl
=
sysSettings
.
apiLoginUrl
;
//引数パラメータがあれば取得
var
paramContentID
=
login
.
getUrlParams
(
'cid'
);
avwCmsApiWithUrl
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GET'
,
params
,
function
(
data
)
{
avwCmsApiWithUrl
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GET'
,
params
,
function
(
data
)
{
requirePasswordChange
=
data
.
requirePasswordChange
;
requirePasswordChange
=
data
.
requirePasswordChange
;
userinfo_sid
=
data
.
sid
;
userinfo_sid
=
data
.
sid
;
...
@@ -206,7 +209,15 @@ function processLogin() {
...
@@ -206,7 +209,15 @@ function processLogin() {
if
(
data
.
requirePasswordChange
==
0
)
{
if
(
data
.
requirePasswordChange
==
0
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
}
}
else
if
(
data
.
requirePasswordChange
==
1
)
{
else
if
(
data
.
requirePasswordChange
==
1
)
{
...
@@ -232,8 +243,16 @@ function processLogin() {
...
@@ -232,8 +243,16 @@ function processLogin() {
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
if
(
numDay
<=
30
)
{
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
}
}
else
if
(
numDay
>
30
)
{
else
if
(
numDay
>
30
)
{
OpenChangePasswordDialog
();
OpenChangePasswordDialog
();
...
@@ -244,7 +263,15 @@ function processLogin() {
...
@@ -244,7 +263,15 @@ function processLogin() {
}
}
else
{
// no need to change password
else
{
// no need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
}
}
}
}
else
if
(
data
.
requirePasswordChange
==
2
)
{
else
if
(
data
.
requirePasswordChange
==
2
)
{
...
@@ -265,7 +292,15 @@ function processLogin() {
...
@@ -265,7 +292,15 @@ function processLogin() {
if
(
numDay
<=
30
)
{
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
}
}
else
if
(
numDay
>
30
)
{
else
if
(
numDay
>
30
)
{
OpenChangePasswordDialog
();
OpenChangePasswordDialog
();
...
@@ -280,7 +315,14 @@ function processLogin() {
...
@@ -280,7 +315,14 @@ function processLogin() {
}
}
else
{
// No need to change password
else
{
// No need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
//OpenUrlでコンテンツ開く場合
if
(
paramContentID
!=
''
){
login
.
showContentViewByOpenUrl
(
paramContentID
);
}
else
{
//ホームへ移動
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
}
}
}
}
}
}
...
@@ -289,19 +331,8 @@ function processLogin() {
...
@@ -289,19 +331,8 @@ function processLogin() {
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
());
$
(
'#main-error-message'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
());
$
(
'#main-error-message'
).
show
();
$
(
'#main-error-message'
).
show
();
// $('#main-error-message').attr('lang', 'msgLoginErrWrong');
// //$('#main-error-message').html(i18nText('msgLoginErrWrong'));
// //alert($('#main-error-message').html());
// $('#main-error-message').css('display', 'block');
// if (ClientData.userInfo_language() != null) {
// changeLanguage(ClientData.userInfo_language());
// }
// else {
// changeLanguage(Consts.ConstLanguage_Ja);
// }
}
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
},
function
(
xhr
,
statusText
,
errorThrown
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
login_errorMessage
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
...
@@ -453,7 +484,22 @@ function saveServiceUserOption(){
...
@@ -453,7 +484,22 @@ function saveServiceUserOption(){
}
}
else
if
(
option
.
serviceName
==
'web_screen_lock_wait'
)
{
else
if
(
option
.
serviceName
==
'web_screen_lock_wait'
)
{
ClientData
.
serviceOpt_web_screen_lock_wait
(
option
.
value
);
ClientData
.
serviceOpt_web_screen_lock_wait
(
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
);
}
}
});
});
};
};
...
@@ -476,7 +522,8 @@ function getServiceOptionList(){
...
@@ -476,7 +522,8 @@ function getServiceOptionList(){
}
}
else
if
(
option
.
serviceName
==
'user_data_backup'
){
else
if
(
option
.
serviceName
==
'user_data_backup'
){
user_data_backup
=
option
.
value
;
user_data_backup
=
option
.
value
;
}
}
});
});
};
};
...
@@ -567,6 +614,7 @@ function initLoginAnonymousUser() {
...
@@ -567,6 +614,7 @@ function initLoginAnonymousUser() {
};
};
avwCmsApiWithUrl
(
sysSettings
.
apiLoginUrl
,
null
,
'webClientAnonymousLogin'
,
'post'
,
params
,
function
(
data
)
{
avwCmsApiWithUrl
(
sysSettings
.
apiLoginUrl
,
null
,
'webClientAnonymousLogin'
,
'post'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
if
(
data
.
result
==
'success'
)
{
//clear session of old anonymous user
//clear session of old anonymous user
...
@@ -600,19 +648,20 @@ function initLoginAnonymousUser() {
...
@@ -600,19 +648,20 @@ function initLoginAnonymousUser() {
optionList
=
data
.
serviceOptionList
;
optionList
=
data
.
serviceOptionList
;
// save service user option
// save service user option
$
.
each
(
data
.
serviceOptionList
,
function
(
i
,
option
)
{
saveServiceUserOption
();
if
(
option
.
serviceName
==
'marking'
)
{
//$.each(data.serviceOptionList, function (i, option) {
ClientData
.
serviceOpt_marking
(
option
.
value
);
// if (option.serviceName == 'marking') {
}
else
if
(
option
.
serviceName
==
'catalog_edition'
)
{
// ClientData.serviceOpt_marking(option.value);
ClientData
.
serviceOpt_catalog_edition
(
option
.
value
);
// } else if( option.serviceName == 'catalog_edition' ) {
}
else
if
(
option
.
serviceName
==
'hibiyakadan_catalog'
)
{
// ClientData.serviceOpt_catalog_edition(option.value);
ClientData
.
serviceOpt_hibiyakadan_catalog
(
option
.
value
);
// } else if( option.serviceName == 'hibiyakadan_catalog' ) {
}
else
if
(
option
.
serviceName
==
'usable_readinglog_gps'
)
{
// ClientData.serviceOpt_hibiyakadan_catalog(option.value);
ClientData
.
serviceOpt_usable_readinglog_gps
(
option
.
value
);
// } else if( option.serviceName == 'usable_readinglog_gps' ) {
}
else
if
(
option
.
serviceName
==
'usable_readinglog_object'
)
{
// ClientData.serviceOpt_usable_readinglog_gps(option.value);
ClientData
.
serviceOpt_usable_readinglog_object
(
option
.
value
);
// } else if( option.serviceName == 'usable_readinglog_object' ) {
}
// ClientData.serviceOpt_usable_readinglog_object(option.value);
});
// }
//});
// hide splash screen then move to home page
// hide splash screen then move to home page
$
(
'#anonymous'
).
fadeOut
(
'slow'
,
'swing'
,
function
()
{
$
(
'#anonymous'
).
fadeOut
(
'slow'
,
'swing'
,
function
()
{
//avwScreenMove("abvw/" + ScreenIds.Home);
//avwScreenMove("abvw/" + ScreenIds.Home);
...
...
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