mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Add medias link to mms into received + sended + scheduled + discussion
This commit is contained in:
parent
70d01be041
commit
f330312b55
8 changed files with 122 additions and 10 deletions
|
@ -76,7 +76,7 @@
|
|||
<?php if ($_SESSION['user']['settings']['detect_url']) { ?>
|
||||
//On ajoute la detection de lien dans le texte du message
|
||||
message.text = Autolinker.link(message.text, {newWindow:true});
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
switch (message.type)
|
||||
{
|
||||
|
@ -85,7 +85,10 @@
|
|||
'<div class="clearfix message-container">' +
|
||||
'<div class="discussion-message message-received">' +
|
||||
'<div class="discussion-message-text">' + message.text + '</div>' +
|
||||
'<div class="discussion-message-date">' + message.date + '</div>' +
|
||||
'<div class="discussion-message-medias">' + message.medias.map((mediaUrl, index) => {
|
||||
return '<a href="' + mediaUrl + '" target="_blank">Voir le fichier ' + (index + 1) + '</a>';
|
||||
}).join(' - ') + '</div>' +
|
||||
'<div class="discussion-message-date">' + message.date + '</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
|
@ -101,6 +104,9 @@
|
|||
'<div class="clearfix message-container">' +
|
||||
'<div class="discussion-message message-sended">' +
|
||||
'<div class="discussion-message-text">' + message.text + '</div>' +
|
||||
'<div class="discussion-message-medias">' + message.medias.map((mediaUrl, index) => {
|
||||
return '<a href="' + mediaUrl + '" target="_blank">Voir le fichier ' + (index + 1) + '</a>';
|
||||
}).join(' - ') + '</div>' +
|
||||
'<div class="discussion-message-date">' + message.date + ' ' + (message.status == 'delivered' ? '<span class="fa fa-check-circle fa-fw text-success"></span>' : (message.status == 'failed' ? '<span class="fa fa-times-circle fa-fw text-danger"></span>' : '<span class="fa fa-clock-o fa-fw text-info"></span>' )) + '</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
@ -111,6 +117,9 @@
|
|||
'<div class="discussion-message message-sended">' +
|
||||
'<div class="message-in-progress-hover"><i class="fa fa-spinner fa-spin"></i></div>' +
|
||||
'<div class="discussion-message-text">' + message.text + '</div>' +
|
||||
'<div class="discussion-message-medias">' + message.medias.map((mediaUrl, index) => {
|
||||
return '<a href="' + mediaUrl + '" target="_blank">Voir le fichier ' + (index + 1) + '</a>';
|
||||
}).join(' - ') + '</div>' +
|
||||
'<div class="discussion-message-date">' + message.date + '</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
<table class="table table-bordered table-hover table-striped datatable" id="table-receiveds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>De</th>
|
||||
<th>À</th>
|
||||
<th>Expéditeur</th>
|
||||
<th>Destinataire</th>
|
||||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
|
@ -104,7 +104,21 @@ jQuery(document).ready(function ()
|
|||
},
|
||||
},
|
||||
{data: 'phone_name', render: jQuery.fn.dataTable.render.text()},
|
||||
{data: 'text', render: jQuery.fn.dataTable.render.text()},
|
||||
{
|
||||
data: 'text',
|
||||
render: function (data, type, row, meta) {
|
||||
if (row.mms == 1) {
|
||||
var medias = [];
|
||||
for (i = 0; i < row.medias.length; i++) {
|
||||
medias.push('<a href="' + HTTP_PWD + '/data/' + jQuery.fn.dataTable.render.text().display(row.medias[i].path) + '" target="_blank">Fichier ' + (i + 1) + '</a>');
|
||||
}
|
||||
html = data + '<br/>' + medias.join(' - ');
|
||||
return html;
|
||||
}
|
||||
|
||||
return data;
|
||||
},
|
||||
},
|
||||
{data: 'at', render: jQuery.fn.dataTable.render.text()},
|
||||
{
|
||||
data: 'status',
|
||||
|
|
|
@ -87,7 +87,21 @@ jQuery(document).ready(function ()
|
|||
},
|
||||
"columns" : [
|
||||
{data: 'at', render: jQuery.fn.dataTable.render.text()},
|
||||
{data: 'text', render: jQuery.fn.dataTable.render.text()},
|
||||
{
|
||||
data: 'text',
|
||||
render: function (data, type, row, meta) {
|
||||
if (row.mms == 1) {
|
||||
var medias = [];
|
||||
for (i = 0; i < row.medias.length; i++) {
|
||||
medias.push('<a href="' + HTTP_PWD + '/data/' + jQuery.fn.dataTable.render.text().display(row.medias[i].path) + '" target="_blank">Fichier ' + (i + 1) + '</a>');
|
||||
}
|
||||
html = data + '<br/>' + medias.join(' - ');
|
||||
return html;
|
||||
}
|
||||
|
||||
return data;
|
||||
},
|
||||
},
|
||||
{
|
||||
data: 'id',
|
||||
render: function (data, type, row, meta) {
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<table class="table table-bordered table-hover table-striped datatable" id="table-sendeds">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>De</th>
|
||||
<th>À</th>
|
||||
<th>Expéditeur</th>
|
||||
<th>Destinataire</th>
|
||||
<th>Message</th>
|
||||
<th>Date</th>
|
||||
<th>Statut</th>
|
||||
|
@ -94,7 +94,21 @@ jQuery(document).ready(function ()
|
|||
return row.destination_formatted;
|
||||
},
|
||||
},
|
||||
{data: 'text', render: jQuery.fn.dataTable.render.text()},
|
||||
{
|
||||
data: 'text',
|
||||
render: function (data, type, row, meta) {
|
||||
if (row.mms == 1) {
|
||||
var medias = [];
|
||||
for (i = 0; i < row.medias.length; i++) {
|
||||
medias.push('<a href="' + HTTP_PWD + '/data/' + jQuery.fn.dataTable.render.text().display(row.medias[i].path) + '" target="_blank">Fichier ' + (i + 1) + '</a>');
|
||||
}
|
||||
html = data + '<br/>' + medias.join(' - ');
|
||||
return html;
|
||||
}
|
||||
|
||||
return data;
|
||||
},
|
||||
},
|
||||
{data: 'at', render: jQuery.fn.dataTable.render.text()},
|
||||
{
|
||||
data: 'status',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue