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
a355c43b
Commit
a355c43b
authored
Oct 31, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement lang, send event js
parent
c6d89c17
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
33 deletions
+65
-33
abvw/common/json/lang/lang-en.json
+9
-2
abvw/common/json/lang/lang-ja.json
+9
-1
abvw/common/json/lang/lang-ko.json
+9
-1
abvw/html/send-message.html
+12
-13
abvw/js/sendMessage/send-message.js
+26
-16
No files found.
abvw/common/json/lang/lang-en.json
View file @
a355c43b
...
...
@@ -61,6 +61,12 @@
"msgNotFound"
:
"There is no applicable work."
,
"confirmation"
:
"confirmation"
,
"confirmYes"
:
"Yes"
,
"confirmNo"
:
"No"
"confirmNo"
:
"No"
,
"buttonOperationSelect"
:
"Operation"
,
"labelSendTypeTitle"
:
"Type"
,
"labelSendTypeGroup"
:
"Group"
,
"labelSendTypeAll"
:
"All"
,
"txtMessageContent"
:
"Message"
,
"buttonTemplateSelection"
:
"Template"
,
"buttonSend"
:
"Send"
}
\ No newline at end of file
abvw/common/json/lang/lang-ja.json
View file @
a355c43b
...
...
@@ -61,6 +61,13 @@
"msgNotFound"
:
"該当する作業がありません。"
,
"confirmation"
:
"確認"
,
"confirmYes"
:
"はい"
,
"confirmNo"
:
"いいえ"
"confirmNo"
:
"いいえ"
,
"buttonOperationSelect"
:
"作業名"
,
"labelSendTypeTitle"
:
"送信先"
,
"labelSendTypeGroup"
:
"グループ内"
,
"labelSendTypeAll"
:
"作業全体"
,
"txtMessageContent"
:
"メッセージ"
,
"buttonTemplateSelection"
:
"テンプレート選択"
,
"buttonSend"
:
"送信"
}
\ No newline at end of file
abvw/common/json/lang/lang-ko.json
View file @
a355c43b
...
...
@@ -61,5 +61,12 @@
"msgNotFound"
:
"There is no applicable work."
,
"confirmation"
:
"confirmation"
,
"confirmYes"
:
"Yes"
,
"confirmNo"
:
"No"
"confirmNo"
:
"No"
,
"buttonOperationSelect"
:
"Operation"
,
"labelSendTypeTitle"
:
"Type"
,
"labelSendTypeGroup"
:
"Group"
,
"labelSendTypeAll"
:
"All"
,
"txtMessageContent"
:
"Message"
,
"buttonTemplateSelection"
:
"Template"
,
"buttonSend"
:
"Send"
}
\ No newline at end of file
abvw/html/send-message.html
View file @
a355c43b
...
...
@@ -24,6 +24,7 @@
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/sendMessage/send-message.js"
></script>
</head>
...
...
@@ -53,37 +54,35 @@
<form
action=
"#"
>
<div
class=
"form-group form-row"
>
<div
class=
"col-lg-1 col-md-2 col-3 control-label"
>
<button
type=
"button"
class=
"btn btn-sm btn-tertiary
"
data-toggle=
"modal"
data-target=
"#task-list-modal"
>
作業名
</button>
<button
type=
"button"
class=
"btn btn-sm btn-tertiary
lang"
lang=
"buttonOperationSelect"
data-toggle=
"modal"
data-target=
"#task-list-modal"
>
</button>
</div>
<div
class=
"col-lg-11 col-md-10 col-9"
>
<div
>
作業を選択してください。
</div>
<div
id=
"operationName"
>
</div>
</div>
</div>
<div
class=
"form-group form-row"
>
<label
for=
"address"
class=
"col-lg-1 col-md-2 col-3 control-label
"
>
送信先
</label>
<label
for=
"address"
class=
"col-lg-1 col-md-2 col-3 control-label
lang"
lang=
"labelSendTypeTitle"
>
</label>
<div
class=
"col-lg-11 col-md-10 col-9"
>
<div
class=
"btn-group btn-group-toggle"
data-toggle=
"buttons"
>
<label
class=
"btn btn-sm btn-primary custom active"
>
<input
type=
"radio"
name=
"options"
id=
"option1"
autocomplete=
"off"
checked
>
グループ内
</label>
<label
class=
"btn btn-sm btn-primary custom"
>
<input
type=
"radio"
name=
"options"
id=
"option2"
autocomplete=
"off"
>
作業全体
</label>
<label
class=
"btn btn-sm btn-primary custom active lang"
lang=
"labelSendTypeGroup"
>
<input
type=
"radio"
name=
"options"
id=
"option1"
autocomplete=
"off"
checked
></label>
<label
class=
"btn btn-sm btn-primary custom lang"
lang=
"labelSendTypeAll"
>
<input
type=
"radio"
name=
"options"
id=
"option2"
autocomplete=
"off"
></label>
</div>
</div>
</div>
<div
class=
"form-group mb-4"
>
<div
class=
"d-flex justify-content-between"
>
<label
for=
"message-content"
>
メッセージ
</label>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#select-template-modal"
>
テンプレート選択
</a>
<label
for=
"message-content"
class=
"lang"
lang=
"txtMessageContent"
>
</label>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#select-template-modal"
class=
"lang"
lang=
"buttonTemplateSelection"
>
</a>
</div>
<textarea
name=
"message-content"
class=
"form-control"
id=
"message
-c
ontent"
cols=
"30"
rows=
"10"
></textarea>
<textarea
name=
"message-content"
class=
"form-control"
id=
"message
C
ontent"
cols=
"30"
rows=
"10"
></textarea>
</div>
</form>
</div>
</div>
<button
type=
"submit"
class=
"btn btn-primary
"
>
送信
</button>
<button
type=
"submit"
class=
"btn btn-primary
lang"
lang=
"buttonSend"
onclick=
"SendMessage.onClickSend();"
>
</button>
</div>
</div>
...
...
abvw/js/sendMessage/send-message.js
View file @
a355c43b
...
...
@@ -5,7 +5,7 @@
*/
var
SendMessage
=
{};
SendMessage
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'sendMessage/'
;
SendMessage
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'send
Push
Message/'
;
/**
* default JSON
...
...
@@ -15,23 +15,34 @@ SendMessage.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath
}
/**
* get data from cms
* @param {function} callback
* handle click event of send button
*/
SendMessage
.
getData
=
function
(
callback
)
{
SendMessage
.
onClickSend
=
function
()
{
const
message
=
$
(
'#messageContent'
).
val
();
const
operationId
=
1
;
const
sendType
=
0
;
SendMessage
.
postMessage
(
message
,
operationId
,
sendType
);
};
/**
* post message data to cms
* @param {string} message
* @param {long} operationId
* @param {int} sendType - 0: Group, 1: All
*/
SendMessage
.
postMessage
=
function
(
message
,
operationId
,
sendType
)
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
message
:
message
,
operationId
:
operationId
,
sendType
:
sendType
};
const
url
=
SendMessage
.
baseApiUrl
;
COMMON
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
if
(
callback
)
{
callback
(
json
);
}
console
.
log
(
param
);
COMMON
.
cmsAjax
(
SendMessage
.
baseApiUrl
,
param
,
false
,
function
(
json
)
{
},
function
()
{
console
.
log
(
'SendMessage.getData error'
);
if
(
callback
)
{
callback
(
SendMessage
.
dummyJson
);
}
console
.
log
(
'SendMessage.postMessage error'
);
});
};
...
...
@@ -39,7 +50,5 @@ SendMessage.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath
* init data, action when screen onload
*/
SendMessage
.
init
=
function
()
{
$
(
"#includedHeader"
).
load
(
"../common/header.html"
,
function
()
{
I18N
.
initi18n
();
});
TEMPLATE
.
loadHearder
();
};
\ 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