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
Show 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() {
* @param {*} url
*/
COMMON
.
avwScreenMove
=
function
(
url
)
{
console
.
log
(
"kdh check avwScreenMove url : "
+
url
);
COMMON
.
showLoading
();
window
.
onbeforeunload
=
null
;
window
.
location
=
url
;
...
...
@@ -59,7 +60,7 @@ COMMON.avwScreenMove = function (url) {
*/
COMMON
.
showLoading
=
function
()
{
console
.
log
(
"kdh check showLoading"
);
$
(
'#loader'
).
css
(
{
$
(
'#loader'
).
css
({
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
()
});
...
...
@@ -70,6 +71,7 @@ COMMON.showLoading = function () {
* close loading
*/
COMMON
.
closeLoading
=
function
()
{
console
.
log
(
"kdh check closeLoading"
);
setTimeout
(
function
(){
document
.
getElementById
(
'loader'
).
style
.
display
=
'none'
;
},
1000
);
...
...
@@ -122,7 +124,7 @@ COMMON.showConfirmModal = function (data, confirmCallback) {
* Show confirm modal with defaults: title, yes, no
* @param {string} messageCode
* @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
=
{})
{
const
defaultParams
=
{
...
...
@@ -130,28 +132,16 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
confirmYesCode
:
'confirmYes'
,
confirmNoCode
:
'confirmNo'
}
const
params
=
Object
.
assign
(
defaultParams
,
option
s
);
const
params
=
Object
.
assign
(
options
,
defaultParam
s
);
let
message
=
''
;
if
(
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
)
{
message
=
params
.
message
;
}
let
title
=
I18N
.
i18nText
(
params
.
titleCode
);
if
(
params
.
title
)
{
title
=
params
.
title
;
}
COMMON
.
showConfirmModal
({
message
:
message
,
title
:
title
,
title
:
I18N
.
i18nText
(
params
.
titleCode
)
,
confirmYes
:
I18N
.
i18nText
(
params
.
confirmYesCode
),
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
},
confirmCallback
);
...
...
@@ -166,11 +156,23 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
COMMON
.
showAlert
=
function
(
messageCode
,
titleCode
=
'error'
,
options
=
{})
{
const
defaultParams
=
{
titleCode
:
titleCode
?
titleCode
:
'error'
,
confirmYesCode
:
null
,
confirmNoCode
:
'close'
,
confirmNoCode
:
'close'
}
const
params
=
Object
.
assign
(
options
,
defaultParams
);
let
message
=
''
;
if
(
messageCode
)
{
message
=
I18N
.
i18nText
(
messageCode
);
if
(
typeof
message
===
'undefined'
)
{
message
=
messageCode
;
}
}
else
if
(
params
.
message
)
{
message
=
params
.
message
;
}
const
params
=
Object
.
assign
(
defaultParams
,
options
);
COMMON
.
showConfirm
(
messageCode
,
null
,
params
);
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