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
542d8bfe
Commit
542d8bfe
authored
Feb 21, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警告文表示処理修正
parent
69b87573
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
148 additions
and
78 deletions
+148
-78
abvw/common/js/i18n.js
+20
-5
abvw/js/Limit_Access_Content.js
+52
-50
abvw/js/bookmark.js
+8
-1
abvw/js/contentsearch.js
+9
-6
abvw/js/detail.js
+7
-3
abvw/js/history.js
+7
-4
abvw/js/home.js
+13
-7
abvw/js/login.js
+32
-2
No files found.
abvw/common/js/i18n.js
View file @
542d8bfe
...
...
@@ -13,13 +13,26 @@
/**
* 定数:言語ファイル配置場所
*/
var
avwsys_location
=
"
/common/json/lang
"
;
var
avwsys_dir
=
"
/abvw
"
;
var
avwsys_storagekey
=
"
AVWUS_Lang
"
;
var
avwsys_currLang
=
"
AVW_CurrLang
"
;
var
avwsys_location
=
""
;
var
avwsys_dir
=
""
;
var
avwsys_storagekey
=
""
;
var
avwsys_currLang
=
""
;
/* 言語の初期化 */
$
(
function
()
{
initi18n
();
});
/** 言語リソース設定初期化 */
function
initi18n
(){
avwsys_location
=
"/common/json/lang"
;
avwsys_dir
=
"/abvw"
;
avwsys_storagekey
=
"AVWUS_Lang"
;
avwsys_currLang
=
"AVW_CurrLang"
;
// ログイン画面/直接アクセス対策
var
location
=
window
.
location
.
toString
().
toLowerCase
();
if
(
location
.
indexOf
(
avwsys_dir
)
<
0
)
{
...
...
@@ -40,7 +53,9 @@ $(function() {
}
// 言語ファイルを初期化する
loadLanguage
(
lang
);
});
}
/* ブラウザの言語設定を取得する */
function
getNavigatorLanguage
()
{
var
lang
=
(
navigator
.
browserLanguage
||
navigator
.
language
||
navigator
.
userLanguage
);
...
...
abvw/js/Limit_Access_Content.js
View file @
542d8bfe
var
messageLevel
=
{};
function
checkLimitContent
(
contentId
,
func
,
isNotUnlockScreen
)
{
function
checkLimitContent
(
contentId
,
func
Ok
,
funcCancel
,
isNotUnlockScreen
)
{
var
levelContent
=
parseInt
(
messageLevel
[
contentId
].
alertMessageLevel
);
...
...
@@ -19,13 +19,15 @@ function checkLimitContent(contentId, func,isNotUnlockScreen) {
}
$
(
'#limit_level1 .deletebtn .cancel'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
$
(
'#limit_level1'
).
hide
();
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
);
$
(
'#limit_level1'
).
hide
();
//キャンセル
funcCancel
();
}
);
lockLayout
();
...
...
@@ -33,13 +35,11 @@ function checkLimitContent(contentId, func,isNotUnlockScreen) {
$
(
'#limit_level1'
).
show
().
center
();
$
(
'#limit_level1 .deletebtn .ok'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
$
(
'#limit_level1'
).
hide
();
func
();
funcOk
();
}
);
}
...
...
@@ -64,25 +64,25 @@ function checkLimitContent(contentId, func,isNotUnlockScreen) {
// press enter at input password
$
(
'#limit_level2 .message input'
).
keydown
(
function
(
e
)
{
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
if
(
code
==
13
)
{
//Enter keycode
$
(
'#limit_level2 .deletebtn .ok'
).
click
();
}
function
(
e
)
{
var
code
=
(
e
.
keyCode
?
e
.
keyCode
:
e
.
which
);
if
(
code
==
13
)
{
//Enter keycode
$
(
'#limit_level2 .deletebtn .ok'
).
click
();
}
);
}
$
(
'#limit_level2 .deletebtn .cancel'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
$
(
'#limit_level2'
).
hide
();
}
);
}
$
(
'#limit_level2 .deletebtn .cancel'
).
unbind
(
'click'
).
click
(
function
()
{
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
$
(
'#limit_level2'
).
hide
();
//キャンセル
funcCancel
();
}
);
// lock layout
lockLayout
();
...
...
@@ -116,36 +116,37 @@ function checkLimitContent(contentId, func,isNotUnlockScreen) {
var
apiLoginUrl
=
sysSettings
.
apiLoginUrl
;
avwCmsApiSyncWithUrl
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GET'
,
params
,
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
// update sid id
ClientData
.
userInfo_sid
(
data
.
sid
);
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
$
(
'#limit_level2'
).
hide
();
// open content
func
();
}
else
{
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
var
errorCode
=
'E001'
;
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
errorCode
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
}
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
errorCode
).
toString
()).
show
();
});
function
(
data
)
{
if
(
data
.
result
==
'success'
)
{
// update sid id
ClientData
.
userInfo_sid
(
data
.
sid
);
if
(
isNotUnlockScreen
!=
1
)
{
unlockLayout
();
}
$
(
'#limit_level2'
).
hide
();
// open content
funcOk
();
}
else
{
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
data
.
errorMessage
).
toString
()).
show
();
}
},
function
(
xhr
,
statusText
,
errorThrown
)
{
var
errorCode
=
'E001'
;
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
errorCode
=
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
;
}
$
(
'#lblMessageLimitError'
).
html
(
format
(
i18nText
(
'msgLoginErrWrong'
),
errorCode
).
toString
()).
show
();
}
);
}
);
}
else
// content level 0 or null
{
func
();
func
Ok
();
}
};
\ No newline at end of file
abvw/js/bookmark.js
View file @
542d8bfe
...
...
@@ -191,7 +191,14 @@ function dspRead_Click() {
var
jsondata
=
$
(
this
).
attr
(
"value"
);
var
data
=
JSON
.
parse
(
jsondata
);
checkLimitContent
(
data
.
contentid
,
function
()
{
dspRead_Click_callback
(
data
);
});
checkLimitContent
(
data
.
contentid
,
function
(){
dspRead_Click_callback
(
data
);
},
function
(){
}
);
};
//
function
dspRead_Click_callback
(
data
)
{
...
...
abvw/js/contentsearch.js
View file @
542d8bfe
...
...
@@ -962,13 +962,16 @@ function readSubmenuFunction(e){
home_isMove
=
false
;
return
;
}
var
contentId
=
$
(
this
).
attr
(
'contentid'
);
// check limit of content
var
contentId
=
$
(
this
).
attr
(
'contentid'
);
// check limit of content
checkLimitContent
(
contentId
,
function
()
{
readSubmenuFunction_callback
(
contentId
);
});
function
()
{
readSubmenuFunction_callback
(
contentId
);
},
function
(){
}
);
};
...
...
abvw/js/detail.js
View file @
542d8bfe
...
...
@@ -158,9 +158,13 @@ function contentdetail_dspRead_Click(e) {
var
outputId
=
ClientData
.
contentInfo_contentId
();
checkLimitContent
(
outputId
,
function
()
{
contentdetail_dspRead_Click_callback
(
outputId
);
},
1
);
function
()
{
contentdetail_dspRead_Click_callback
(
outputId
);
},
function
(){
},
1
);
};
function
contentdetail_dspRead_Click_callback
(
outputId
)
{
...
...
abvw/js/history.js
View file @
542d8bfe
...
...
@@ -789,10 +789,13 @@ function readSubmenuFunction(e){
// check limit of content
checkLimitContent
(
contentId
,
function
()
{
readSubmenuFunction_callback
(
contentId
);
});
function
()
{
readSubmenuFunction_callback
(
contentId
);
},
function
(){
}
);
};
...
...
abvw/js/home.js
View file @
542d8bfe
...
...
@@ -470,9 +470,12 @@ function canvasClickFunction(e) {
var
contentId
=
$
(
this
).
attr
(
'id'
);
var
outputId
=
contentId
.
substring
(
17
);
checkLimitContent
(
outputId
,
function
(){
canvasClickFunction_callback
(
outputId
);
});
function
(){
canvasClickFunction_callback
(
outputId
);
},
function
(){
}
);
};
...
...
@@ -1413,10 +1416,13 @@ function readSubmenuFunction(e) {
var
contentId
=
$
(
this
).
attr
(
'contentid'
);
// check limit of content
checkLimitContent
(
contentId
,
function
()
{
readSubmenuFunction_callback
(
contentId
);
});
function
()
{
readSubmenuFunction_callback
(
contentId
);
},
function
(){
}
);
};
...
...
abvw/js/login.js
View file @
542d8bfe
...
...
@@ -556,6 +556,8 @@ function initLoginNormalUser() {
// init login for anonymous user
function
initLoginAnonymousUser
()
{
document
.
title
=
i18nText
(
'dspLogin'
)
+
' | '
+
i18nText
(
'sysAppTitle'
);
var
sysSettings
=
avwSysSetting
();
// get info in conf.json
var
params
=
{
...
...
@@ -569,8 +571,10 @@ function initLoginAnonymousUser() {
//clear session of old anonymous user
SessionStorageUtils
.
clear
();
//警告表示を組み込んだら i18nText()の値が未定義になるので言語リソース再読み込み
initi18n
();
avwUserSessionObj
=
null
;
// create new session for anonymous user
avwCreateUserSession
();
...
...
@@ -666,6 +670,7 @@ function showMessageErrorLoginAnonymous(errorMessage) {
$
(
'.toast-position-middle-center'
).
css
(
'width'
,
'400px'
);
};
/* OpenUriで開いた場合の直接コンテンツ表示 */
login
.
showContentViewByOpenUrl
=
function
(
strContentId
)
{
var
contentType
=
''
;
...
...
@@ -689,7 +694,23 @@ login.showContentViewByOpenUrl = function(strContentId) {
//drawEditImage(contentId); 不要
}
else
{
//Go to Conten view page
avwScreenMove
(
"abvw/"
+
ScreenIds
.
ContentView
);
//アラート表示組み込めるか
messageLevel
[
data
.
contentData
.
contentId
]
=
{
alertMessageLevel
:
data
.
contentData
.
alertMessageLevel
,
alertMessage
:
data
.
contentData
.
alertMessage
};
// check limit of content
checkLimitContent
(
data
.
contentData
.
contentId
,
function
()
{
login
.
alertMessageOkFunction_callback
();
},
function
()
{
login
.
alertMessageCancelFunction_callback
();
}
);
//avwScreenMove("abvw/" + ScreenIds.ContentView);
}
},
...
...
@@ -701,6 +722,15 @@ login.showContentViewByOpenUrl = function(strContentId) {
};
//警告表示時のOK処理
login
.
alertMessageOkFunction_callback
=
function
(){
avwScreenMove
(
"abvw/"
+
ScreenIds
.
ContentView
);
}
//警告表示時のキャンセル処理
login
.
alertMessageCancelFunction_callback
=
function
(){
avwScreenMove
(
"abvw/"
+
ScreenIds
.
Home
);
}
//Get param url
login
.
getUrlParams
=
function
(
name
){
name
=
name
.
replace
(
/
[\[]
/
,
"
\\\
["
).
replace
(
/
[\]]
/
,
"
\\\
]"
);
...
...
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