Commit 3232b92a by NGUYEN HOANG SON

#50293 load operation select, template select modal

parent f162edb3
......@@ -25,6 +25,8 @@
<script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/operationSelect/operation-select.js"></script>
<script type="text/javascript" src="../js/notification-content/notification-content.js"></script>
<script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/sendMessage/send-message.js"></script>
</head>
......
......@@ -8,24 +8,33 @@ var SendMessage = {};
SendMessage.baseApiUrl = CONSTANT.URL.CMS.BASE + ClientData.userInfo_accountPath() + CONSTANT.URL.CMS.API.BASE + 'sendPushMessage/';
/**
* default JSON
* Get input content
* @returns string
*/
SendMessage.dummyJson = {
}
SendMessage.getCurrentMessageContent = function() {
return $('#messageContent').val();
}
/**
* Get operation id selected
* @returns string
*/
SendMessage.getCurrentOperationId = function() {
return $('#operationSelected').attr('data-operation-id');
}
/**
* Get send type selected
* @returns string
*/
SendMessage.getCurrentSendType = function() {
return $('input[name="sendType"]:checked').val();
}
/**
* Check data required when send message request to cms
* @returns boolean
*/
SendMessage.checkValidation = function() {
const message = SendMessage.getCurrentMessageContent();
if (!ValidationUtil.CheckRequiredForText(message)) {
......@@ -83,9 +92,11 @@ SendMessage.postMessage = function(message, operationId, sendType) {
* init data, action when screen onload
*/
SendMessage.init = function () {
I18N.initi18n();
TEMPLATE.loadHearder();
TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadOperationSelect('#includeOperationSelect');
TEMPLATE.loadNotificationSelect('#includeTemplateModal');
//load lang for elements none class lang
I18N.initi18n();
document.title = I18N.i18nText('sendMessageTitle');
$("label[for='sendTypeGroup']").append(I18N.i18nText('labelSendTypeGroup'));
$("label[for='sendTypeAll']").append(I18N.i18nText('labelSendTypeAll'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment