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
5a0faa8a
Commit
5a0faa8a
authored
Nov 17, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix show alert function
parent
f77d8b43
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
28 deletions
+19
-28
abweb/common/js/common.js
+19
-19
abweb/common/json/lang/lang-en.json
+0
-3
abweb/common/json/lang/lang-ja.json
+0
-3
abweb/common/json/lang/lang-ko.json
+0
-3
No files found.
abweb/common/js/common.js
View file @
5a0faa8a
...
@@ -121,7 +121,7 @@ COMMON.showConfirmModal = function (data, confirmCallback) {
...
@@ -121,7 +121,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
, message, confirmYes, confirmNo
}
* @param {Object} options - Object with {title
Code, message, confirmYesCode, confirmNoCode
}
*/
*/
COMMON
.
showConfirm
=
function
(
messageCode
,
confirmCallback
,
options
=
{})
{
COMMON
.
showConfirm
=
function
(
messageCode
,
confirmCallback
,
options
=
{})
{
const
defaultParams
=
{
const
defaultParams
=
{
...
@@ -129,16 +129,28 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
...
@@ -129,16 +129,28 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
confirmYesCode
:
'confirmYes'
,
confirmYesCode
:
'confirmYes'
,
confirmNoCode
:
'confirmNo'
confirmNoCode
:
'confirmNo'
}
}
const
params
=
Object
.
assign
(
options
,
defaultParam
s
);
const
params
=
Object
.
assign
(
defaultParams
,
option
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
:
I18N
.
i18nText
(
params
.
titleCode
)
,
title
:
title
,
confirmYes
:
I18N
.
i18nText
(
params
.
confirmYesCode
),
confirmYes
:
I18N
.
i18nText
(
params
.
confirmYesCode
),
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
},
confirmCallback
);
},
confirmCallback
);
...
@@ -153,23 +165,11 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
...
@@ -153,23 +165,11 @@ 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'
,
confirmNoCode
:
'close'
confirmYesCode
:
null
,
confirmNoCode
:
'close'
,
}
}
const
params
=
Object
.
assign
(
options
,
defaultParams
);
const
params
=
Object
.
assign
(
defaultParams
,
options
);
let
message
=
''
;
COMMON
.
showConfirm
(
messageCode
,
null
,
params
);
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
)
});
};
};
/**
/**
...
...
abweb/common/json/lang/lang-en.json
View file @
5a0faa8a
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
"pdfPrint"
:
"PDF Print"
,
"pdfPrint"
:
"PDF Print"
,
"msgOperationEmpty"
:
"Operation data is Empty."
,
"msgOperationEmpty"
:
"Operation data is Empty."
,
"success"
:
"Success"
,
"success"
:
"Success"
,
"dashboard"
:
"Dashboard"
,
"dashboard"
:
"Dashboard"
,
"dashboardSettings"
:
"Dashboard Settings"
,
"dashboardSettings"
:
"Dashboard Settings"
,
"pickup"
:
"Pick up"
,
"pickup"
:
"Pick up"
,
...
@@ -121,7 +120,6 @@
...
@@ -121,7 +120,6 @@
"error"
:
"Error"
,
"error"
:
"Error"
,
"msgSendPushMessageConfirm"
:
"Do you want to send message?"
,
"msgSendPushMessageConfirm"
:
"Do you want to send message?"
,
"close"
:
"Close"
,
"close"
:
"Close"
,
"success"
:
"Success"
,
"dateError"
:
"Set the start date before the end date."
,
"dateError"
:
"Set the start date before the end date."
,
"onlyRfid"
:
"RFID or barcode is set.
\n
Please scan the code."
"onlyRfid"
:
"RFID or barcode is set.
\n
Please scan the code."
}
}
\ No newline at end of file
abweb/common/json/lang/lang-ja.json
View file @
5a0faa8a
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
"pdfPrint"
:
"PDF出力"
,
"pdfPrint"
:
"PDF出力"
,
"msgOperationEmpty"
:
"作業データがありません。"
,
"msgOperationEmpty"
:
"作業データがありません。"
,
"success"
:
"成功"
,
"success"
:
"成功"
,
"dashboard"
:
"ダッシュボード"
,
"dashboard"
:
"ダッシュボード"
,
"dashboardSettings"
:
"ダッシュボード設定"
,
"dashboardSettings"
:
"ダッシュボード設定"
,
"pickup"
:
"ピックアップ"
,
"pickup"
:
"ピックアップ"
,
...
@@ -119,7 +118,6 @@
...
@@ -119,7 +118,6 @@
"error"
:
"エラー"
,
"error"
:
"エラー"
,
"msgSendPushMessageConfirm"
:
"プッシュメッセージを送信しますか?"
,
"msgSendPushMessageConfirm"
:
"プッシュメッセージを送信しますか?"
,
"close"
:
"閉じる"
,
"close"
:
"閉じる"
,
"success"
:
"成功"
,
"dateError"
:
"開始日は終了日の前に設定してください。"
,
"dateError"
:
"開始日は終了日の前に設定してください。"
,
"onlyRfid"
:
"RFID又はバーコードが設定されています。
\n
該当コードを読み込んでください。"
"onlyRfid"
:
"RFID又はバーコードが設定されています。
\n
該当コードを読み込んでください。"
}
}
\ No newline at end of file
abweb/common/json/lang/lang-ko.json
View file @
5a0faa8a
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
"pdfPrint"
:
"PDF 출력"
,
"pdfPrint"
:
"PDF 출력"
,
"msgOperationEmpty"
:
"작업 데이터가 없습니다."
,
"msgOperationEmpty"
:
"작업 데이터가 없습니다."
,
"success"
:
"성공"
,
"success"
:
"성공"
,
"dashboard"
:
"대시보드"
,
"dashboard"
:
"대시보드"
,
"dashboardSettings"
:
"대시보드 설정"
,
"dashboardSettings"
:
"대시보드 설정"
,
"pickup"
:
"픽업"
,
"pickup"
:
"픽업"
,
...
@@ -118,7 +117,6 @@
...
@@ -118,7 +117,6 @@
"error"
:
"에러"
,
"error"
:
"에러"
,
"msgSendPushMessageConfirm"
:
"Do you want to send message?"
,
"msgSendPushMessageConfirm"
:
"Do you want to send message?"
,
"close"
:
"Close"
,
"close"
:
"Close"
,
"success"
:
"Success"
,
"dateError"
:
"시작일은 종료일 이전에 설정하십시오."
,
"dateError"
:
"시작일은 종료일 이전에 설정하십시오."
,
"onlyRfid"
:
"RFID또는 바코드가 설정되어있습니다.
\n
해당코드를 스캔해주십시오."
"onlyRfid"
:
"RFID또는 바코드가 설정되어있습니다.
\n
해당코드를 스캔해주십시오."
}
}
\ No newline at end of file
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