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
11bba304
Commit
11bba304
authored
Nov 17, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test log
parent
69b41b43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
abweb/common/js/common.js
+22
-20
No files found.
abweb/common/js/common.js
View file @
11bba304
...
@@ -46,6 +46,7 @@ $(document).ready(function() {
...
@@ -46,6 +46,7 @@ $(document).ready(function() {
* @param {*} url
* @param {*} url
*/
*/
COMMON
.
avwScreenMove
=
function
(
url
)
{
COMMON
.
avwScreenMove
=
function
(
url
)
{
console
.
log
(
"kdh check avwScreenMove url : "
+
url
);
COMMON
.
showLoading
();
COMMON
.
showLoading
();
window
.
onbeforeunload
=
null
;
window
.
onbeforeunload
=
null
;
window
.
location
=
url
;
window
.
location
=
url
;
...
@@ -59,7 +60,7 @@ COMMON.avwScreenMove = function (url) {
...
@@ -59,7 +60,7 @@ COMMON.avwScreenMove = function (url) {
*/
*/
COMMON
.
showLoading
=
function
()
{
COMMON
.
showLoading
=
function
()
{
console
.
log
(
"kdh check showLoading"
);
console
.
log
(
"kdh check showLoading"
);
$
(
'#loader'
).
css
(
{
$
(
'#loader'
).
css
({
'width'
:
$
(
window
).
width
(),
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
()
'height'
:
$
(
window
).
height
()
});
});
...
@@ -70,6 +71,7 @@ COMMON.showLoading = function () {
...
@@ -70,6 +71,7 @@ COMMON.showLoading = function () {
* close loading
* close loading
*/
*/
COMMON
.
closeLoading
=
function
()
{
COMMON
.
closeLoading
=
function
()
{
console
.
log
(
"kdh check closeLoading"
);
setTimeout
(
function
(){
setTimeout
(
function
(){
document
.
getElementById
(
'loader'
).
style
.
display
=
'none'
;
document
.
getElementById
(
'loader'
).
style
.
display
=
'none'
;
},
1000
);
},
1000
);
...
@@ -122,7 +124,7 @@ COMMON.showConfirmModal = function (data, confirmCallback) {
...
@@ -122,7 +124,7 @@ COMMON.showConfirmModal = function (data, confirmCallback) {
* Show confirm modal with defaults: title, yes, no
* Show confirm modal with defaults: title, yes, no
* @param {string} messageCode
* @param {string} messageCode
* @param {callback} confirmCallback - The callback that handles the confirm button clicked
* @param {callback} confirmCallback - The callback that handles the confirm button clicked
* @param {Object} options - Object with {title
Code, message, confirmYesCode, confirmNoCode
}
* @param {Object} options - Object with {title
, message, confirmYes, confirmNo
}
*/
*/
COMMON
.
showConfirm
=
function
(
messageCode
,
confirmCallback
,
options
=
{})
{
COMMON
.
showConfirm
=
function
(
messageCode
,
confirmCallback
,
options
=
{})
{
const
defaultParams
=
{
const
defaultParams
=
{
...
@@ -130,28 +132,16 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
...
@@ -130,28 +132,16 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
confirmYesCode
:
'confirmYes'
,
confirmYesCode
:
'confirmYes'
,
confirmNoCode
:
'confirmNo'
confirmNoCode
:
'confirmNo'
}
}
const
params
=
Object
.
assign
(
defaultParams
,
option
s
);
const
params
=
Object
.
assign
(
options
,
defaultParam
s
);
let
message
=
''
;
let
message
=
''
;
if
(
messageCode
)
{
if
(
messageCode
)
{
message
=
I18N
.
i18nText
(
messageCode
);
message
=
I18N
.
i18nText
(
messageCode
);
if
(
typeof
message
===
'undefined'
)
{
//lang of messageCode undefined, use message or messageCode
if
(
params
.
message
)
{
message
=
params
.
message
;
}
else
{
message
=
messageCode
;
}
}
}
else
if
(
params
.
message
)
{
}
else
if
(
params
.
message
)
{
message
=
params
.
message
;
message
=
params
.
message
;
}
}
let
title
=
I18N
.
i18nText
(
params
.
titleCode
);
if
(
params
.
title
)
{
title
=
params
.
title
;
}
COMMON
.
showConfirmModal
({
COMMON
.
showConfirmModal
({
message
:
message
,
message
:
message
,
title
:
title
,
title
:
I18N
.
i18nText
(
params
.
titleCode
)
,
confirmYes
:
I18N
.
i18nText
(
params
.
confirmYesCode
),
confirmYes
:
I18N
.
i18nText
(
params
.
confirmYesCode
),
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
},
confirmCallback
);
},
confirmCallback
);
...
@@ -166,11 +156,23 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
...
@@ -166,11 +156,23 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
COMMON
.
showAlert
=
function
(
messageCode
,
titleCode
=
'error'
,
options
=
{})
{
COMMON
.
showAlert
=
function
(
messageCode
,
titleCode
=
'error'
,
options
=
{})
{
const
defaultParams
=
{
const
defaultParams
=
{
titleCode
:
titleCode
?
titleCode
:
'error'
,
titleCode
:
titleCode
?
titleCode
:
'error'
,
confirmYesCode
:
null
,
confirmNoCode
:
'close'
confirmNoCode
:
'close'
,
}
}
const
params
=
Object
.
assign
(
defaultParams
,
options
);
const
params
=
Object
.
assign
(
options
,
defaultParams
);
COMMON
.
showConfirm
(
messageCode
,
null
,
params
);
let
message
=
''
;
if
(
messageCode
)
{
message
=
I18N
.
i18nText
(
messageCode
);
if
(
typeof
message
===
'undefined'
)
{
message
=
messageCode
;
}
}
else
if
(
params
.
message
)
{
message
=
params
.
message
;
}
COMMON
.
showConfirmModal
({
message
:
message
,
title
:
I18N
.
i18nText
(
params
.
titleCode
),
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
});
};
};
/**
/**
...
...
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