- Messages GUI multilingual

- Tabulator refresh fixed
This commit is contained in:
Paolo
2019-11-14 13:49:31 +01:00
parent ece06bc462
commit 565cf93f5d
8 changed files with 27 additions and 19 deletions
@@ -13,6 +13,7 @@
'ajaxlib' => true,
'dialoglib' => true,
'tinymce' => true,
'phrases' => array('global', 'ui'),
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/read.js')
)
@@ -11,6 +11,7 @@
'ajaxlib' => true,
'dialoglib' => true,
'tinymce' => true,
'phrases' => array('global', 'ui'),
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/write.js')
)
@@ -22,13 +23,13 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Send message</h3>
<h3 class="page-header"><?php echo $this->p->t('ui', 'sendMessage'); ?></h3>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-lg-1 msgfieldcol-left">
<label>Receiver:</label>
<label><?php echo $this->p->t('ui', 'receiver'); ?>:</label>
</div>
<div class="col-lg-11 msgfieldcol-right">
<select id="organisationUnit">
@@ -42,7 +43,7 @@
<div class="row">
<div class="form-group">
<div class="col-lg-1 msgfield msgfieldcol-left">
<label>Subject:</label>
<label><?php echo $this->p->t('ui', 'subject'); ?>:</label>
</div>
&nbsp;
<div class="col-lg-7">
@@ -53,14 +54,16 @@
<br>
<div class="row">
<div class="col-lg-12">
<label>Message:</label>
<label><?php echo $this->p->t('ui', 'message'); ?>:</label>
<textarea id="body"></textarea>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-12 text-right">
<button id="sendButton" class="btn btn-default" type="button">Send</button>
<button id="sendButton" class="btn btn-default" type="button">
<?php echo $this->p->t('ui', 'send'); ?>
</button>
</div>
</div>
</div>
@@ -11,6 +11,7 @@
'ajaxlib' => true,
'dialoglib' => true,
'tinymce' => true,
'phrases' => array('global', 'ui'),
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/writeReply.js')
)
@@ -22,13 +23,13 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Reply to a message</h3>
<h3 class="page-header"><?php echo $this->p->t('ui', 'sendMessage'); ?></h3>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-lg-1 msgfieldcol-left">
<label>Receiver:</label>
<label><?php echo $this->p->t('ui', 'receiver'); ?>:</label>
</div>
<div class="col-lg-11 msgfieldcol-right">
@@ -40,7 +41,7 @@
<div class="row">
<div class="form-group">
<div class="col-lg-1 msgfield msgfieldcol-left">
<label>Subject:</label>
<label><?php echo $this->p->t('ui', 'subject'); ?>:</label>
</div>
&nbsp;
<div id="subject" class="col-lg-7">
@@ -53,7 +54,7 @@
<br>
<div class="row">
<div class="col-lg-12">
<label>Message:</label>
<label><?php echo $this->p->t('ui', 'message'); ?>:</label>
<textarea id="body">
<?php echo $body; ?>
@@ -69,7 +70,7 @@
<input id="relationmessage_id" type="hidden" value="<?php echo $relationmessage_id; ?>">
<input id="token" type="hidden" value="<?php echo $token; ?>">
<button id="sendButton" class="btn btn-default" type="button">Send</button>
<button id="sendButton" class="btn btn-default" type="button"><?php echo $this->p->t('ui', 'send'); ?></button>
</div>
</div>
</div>
@@ -10,6 +10,7 @@
'fontawesome' => true,
'tinymce' => true,
'sbadmintemplate' => true,
'dialoglib' => true,
'widgets' => true,
'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'),
'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWrite.js')
+2 -2
View File
@@ -34,7 +34,7 @@ function parseMessageText(receiver_id, text)
}
else if (FHC_AjaxClient.isError(data))
{
alert(data.retval);
FHC_DialogLib.alertError(data.retval);
}
}
}
@@ -97,7 +97,7 @@ $(document).ready(function ()
}
else
{
alert("Subject and text are required fields!");
FHC_DialogLib.alertInfo("Subject and text are required fields!");
}
});
}
+1 -1
View File
@@ -23,7 +23,7 @@ $(document).ready(function ()
}
else
{
alert("Subject and text are required fields!");
FHC_DialogLib.alertInfo("Subject and text are required fields!");
}
});
}
+4 -2
View File
@@ -11,7 +11,7 @@ var selectedToggleMessage = "received";
*/
function readMessagesGenericError()
{
FHC_DialogLib.alertError("An error occurred while retrieving message, contact the website administrator");
FHC_DialogLib.alertError(FHC_PhrasesLib.t("global", "genericError"));
}
/**
@@ -137,6 +137,8 @@ function rowFormatter(row, fontWeight = 700)
*/
function _getMessages(getMessagesURL)
{
tableMessageLst.replaceData(Array());
FHC_AjaxClient.ajaxCallGet(
getMessagesURL,
null,
@@ -195,7 +197,7 @@ function replyMessage()
}
else //
{
FHC_DialogLib.alertInfo("Please select a message");
FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "pleaseSelectMessage"));
}
}
+4 -4
View File
@@ -9,7 +9,7 @@ function sendMessageToOU()
{
if ($('#organisationUnit').val() == 0)
{
FHC_DialogLib.alertWarning("Not valid organisation unit");
FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("global", "notValidOE"));
}
else
{
@@ -25,15 +25,15 @@ function sendMessageToOU()
if (FHC_AjaxClient.isSuccess(data))
{
FHC_DialogLib.alertSuccess("Message sent succesfully");
FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("global", "messageSent"));
}
else
{
FHC_DialogLib.alertError("Error");
FHC_DialogLib.alertError(FHC_PhrasesLib.t("global", "genericError"));
}
},
errorCallback: function() {
FHC_DialogLib.alertError("Error");
FHC_DialogLib.alertError(FHC_PhrasesLib.t("global", "genericError"));
},
veilTimeout: 300
}