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
c04bd4b9
Commit
c04bd4b9
authored
Nov 11, 2022
by
Takumi Imai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不要関数削除
parent
5ad90a0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
81 deletions
+0
-81
abweb/common/js/common.js
+0
-77
abweb/js/topPage/topPage.js
+0
-4
No files found.
abweb/common/js/common.js
View file @
c04bd4b9
...
...
@@ -15,83 +15,6 @@ var COMMON = {};
COMMON
.
hasErrorKey
=
'AVW_HASERR'
;
COMMON
.
lang
;
/**
* get lang code in local storage
* web gets lang form local storage
* but app gets lnag from session storage
*/
COMMON
.
setLangCodeWeb
=
function
()
{
let
lang
=
COMMON
.
getLangWeb
();
if
(
lang
.
split
(
'-'
)[
0
]
==
CONSTANT
.
LANG
.
English
)
{
lang
=
CONSTANT
.
LANG
.
ENGLISH
;
}
else
if
(
lang
.
split
(
'-'
)[
0
]
==
CONSTANT
.
LANG
.
KOREA
)
{
lang
=
CONSTANT
.
LANG
.
KOREA
;
}
else
{
lang
=
CONSTANT
.
LANG
.
JAPAN
;
}
COMMON
.
lang
=
lang
;
};
/**
* get lang in local storage
*
* @returns String pageLang
*/
COMMON
.
getLangWeb
=
function
()
{
if
(
!
COMMON
.
lang
)
{
let
pageLang
;
if
(
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
])
{
pageLang
=
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
];
}
else
{
pageLang
=
(
window
.
navigator
.
languages
&&
window
.
navigator
.
languages
[
0
])
||
window
.
navigator
.
language
||
window
.
navigator
.
userLanguage
||
window
.
navigator
.
browserLanguage
;
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
]
=
pageLang
;
}
return
pageLang
;
}
else
{
return
COMMON
.
lang
;
}
return
pageLang
;
};
/**
* change lang of html
*/
COMMON
.
updateLang
=
function
()
{
$
(
'.multi-lang'
).
each
(
function
()
{
const
key
=
$
(
this
).
attr
(
'data-msg'
);
if
(
key
)
{
if
(
$
(
this
).
prop
(
'tagName'
).
toLowerCase
()
==
'input'
&&
(
$
(
this
).
attr
(
'type'
)
==
'text'
||
$
(
this
).
attr
(
'type'
)
==
'search'
))
{
const
attr
=
$
(
this
).
attr
(
'placeholder'
);
if
(
typeof
attr
!==
'undefined'
&&
attr
!==
false
)
{
$
(
this
).
attr
(
'placeholder'
,
COMMON
.
getMsg
(
key
));
}
else
{
$
(
this
).
val
(
COMMON
.
getMsg
(
key
));
}
}
else
{
$
(
this
).
html
(
COMMON
.
getMsg
(
key
));
}
}
});
};
/**
* get any lang msg from COMMON.msgMap
*
* @param String key
* @returns String msg
*/
COMMON
.
getMsg
=
function
(
key
)
{
const
msg
=
CONSTANT
.
MSG_MAP
[
key
];
if
(
!
msg
)
{
return
''
;
}
return
msg
[
COMMON
.
lang
];
};
/* page transition without outputting a warning message */
COMMON
.
avwScreenMove
=
function
(
url
)
{
COMMON
.
showLoading
();
...
...
abweb/js/topPage/topPage.js
View file @
c04bd4b9
...
...
@@ -8,14 +8,10 @@
var
TOP
=
{};
$
(
document
).
ready
(
function
()
{
//setting lang info
COMMON
.
setLangCodeWeb
();
//Check if user is logged in
COMMON
.
checkAuth
(
false
);
//setting msg of html
COMMON
.
updateLang
();
TOP
.
init
();
});
...
...
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