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
c6de9971
Commit
c6de9971
authored
Nov 16, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade showAlert function
parent
5a8177d7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
8 deletions
+18
-8
abweb/common/js/common.js
+6
-2
abweb/common/json/lang/lang-en.json
+3
-1
abweb/common/json/lang/lang-ja.json
+3
-1
abweb/common/json/lang/lang-ko.json
+3
-1
abweb/js/sendMessage/sendMessage.js
+1
-1
abweb/js/setting/settings.js
+2
-2
No files found.
abweb/common/js/common.js
View file @
c6de9971
...
...
@@ -146,17 +146,21 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
/**
* show alert message by confirm modal html
* @param {String} messageCode
* @param {string} titleCode
* @param {Object} options - Data Options {message, titleCode, confirmNoCode}
*/
COMMON
.
showAlert
=
function
(
messageCode
,
options
=
{})
{
COMMON
.
showAlert
=
function
(
messageCode
,
titleCode
=
'error'
,
options
=
{})
{
const
defaultParams
=
{
titleCode
:
'error'
,
titleCode
:
titleCode
?
titleCode
:
'error'
,
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
;
}
...
...
abweb/common/json/lang/lang-en.json
View file @
c6de9971
...
...
@@ -119,5 +119,6 @@
"msgSendPushMessageSuccess"
:
"we sent a push message"
,
"error"
:
"Error"
,
"msgSendPushMessageConfirm"
:
"Do you want to send message?"
,
"close"
:
"Close"
"close"
:
"Close"
,
"success"
:
"Success"
}
\ No newline at end of file
abweb/common/json/lang/lang-ja.json
View file @
c6de9971
...
...
@@ -117,5 +117,6 @@
"msgSendPushMessageSuccess"
:
"プッシュメッセージ送信しました。"
,
"error"
:
"エラー"
,
"msgSendPushMessageConfirm"
:
"プッシュメッセージを送信しますか?"
,
"close"
:
"閉じる"
"close"
:
"閉じる"
,
"success"
:
"成功"
}
\ No newline at end of file
abweb/common/json/lang/lang-ko.json
View file @
c6de9971
...
...
@@ -116,5 +116,6 @@
"msgSendPushMessageSuccess"
:
"푸시메시지를 보냈습니다."
,
"error"
:
"에러"
,
"msgSendPushMessageConfirm"
:
"Do you want to send message?"
,
"close"
:
"Close"
"close"
:
"Close"
,
"success"
:
"Success"
}
\ No newline at end of file
abweb/js/sendMessage/sendMessage.js
View file @
c6de9971
...
...
@@ -94,7 +94,7 @@ SendMessage.postMessage = function (message, operationId, sendType) {
false
,
function
(
json
)
{
COMMON
.
closeLoading
();
COMMON
.
showAlert
(
'msgSendPushMessageSuccess'
);
COMMON
.
showAlert
(
'msgSendPushMessageSuccess'
,
'success'
);
},
function
()
{
console
.
log
(
'SendMessage.postMessage error'
);
...
...
abweb/js/setting/settings.js
View file @
c6de9971
...
...
@@ -28,7 +28,7 @@ SETTINGS.getToken = function () {
if
(
data
.
token
)
{
$
(
'#getToken'
).
val
(
data
.
token
);
}
else
{
COMMON
.
showAlert
(
"token error.."
,
true
);
COMMON
.
showAlert
(
"token error.."
);
}
},
function
(
data
)
{
...
...
@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) {
$
(
'#txtPwdNew'
).
val
(
''
);
$
(
'#txtPwdNewRe'
).
val
(
''
);
/* show messages */
COMMON
.
showAlert
(
'msgPwdChangeOK'
);
COMMON
.
showAlert
(
'msgPwdChangeOK'
,
'success'
);
}
};
...
...
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