mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Correzioni JS in allegati
Correzione JS per mostrare correttamente il nome dell'allegato alla visualizzazione anteprima. Aggiunti header custom per gestire meglio la notifica di lettura.
This commit is contained in:
parent
3dae3ab81f
commit
884da4fdae
@ -41,20 +41,24 @@ $(document).ready(function () {
|
||||
|
||||
// Menu ordinabile
|
||||
if (!globals.is_mobile) {
|
||||
sortable(".sidebar-menu", {
|
||||
const menu = sortable(".sidebar-menu", {
|
||||
axis: "y",
|
||||
cursor: "move",
|
||||
dropOnEmpty: true,
|
||||
scroll: true,
|
||||
})[0].addEventListener("sortupdate", function (e) {
|
||||
let order = $(".sidebar-menu > .treeview[data-id]").toArray().map(a => $(a).data("id"))
|
||||
})[0];
|
||||
|
||||
$.post(globals.rootdir + "/actions.php", {
|
||||
id_module: globals.order_manager_id,
|
||||
op: "sort_modules",
|
||||
order: order.join(","),
|
||||
if (menu) {
|
||||
menu.addEventListener("sortupdate", function (e) {
|
||||
let order = $(".sidebar-menu > .treeview[data-id]").toArray().map(a => $(a).data("id"))
|
||||
|
||||
$.post(globals.rootdir + "/actions.php", {
|
||||
id_module: globals.order_manager_id,
|
||||
op: "sort_modules",
|
||||
order: order.join(","),
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Mostra/nasconde sidebar del menu principale
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
const searchInput = $('#supersearch');
|
||||
if (searchInput.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const searchButton = searchInput.parent().find('i');
|
||||
const searches = [];
|
||||
|
||||
|
@ -211,7 +211,7 @@ function modificaAllegato(button) {
|
||||
* Funzione per gestire il download di un allegato.
|
||||
* @param button
|
||||
*/
|
||||
function saggiungiAllegato(button) {
|
||||
function aggiungiAllegato(button) {
|
||||
const gestione = $(button).closest(".gestione-allegati");
|
||||
const allegato = $(button).closest("tr").data();
|
||||
|
||||
|
@ -123,7 +123,7 @@ class FileManager implements ManagerInterface
|
||||
$file = Upload::find($r['id']);
|
||||
|
||||
$result .= '
|
||||
<tr id="row_'.$r['id'].'" data-id="'.$r['id'].'" data-filename="'.$r['filename'].'">
|
||||
<tr id="row_'.$file->id.'" data-id="'.$file->id.'" data-filename="'.$file->filename.'" data-nome="'.$file->name.'">
|
||||
<td align="left">';
|
||||
|
||||
if ($file->user && $file->user->photo) {
|
||||
@ -137,17 +137,17 @@ class FileManager implements ManagerInterface
|
||||
|
||||
$result .= '
|
||||
|
||||
<a href="'.base_path().'/view.php?file_id='.$r['id'].'" target="_blank">
|
||||
<i class="fa fa-external-link"></i> '.$r['name'].'
|
||||
<a href="'.base_path().'/view.php?file_id='.$file->id.'" target="_blank">
|
||||
<i class="fa fa-external-link"></i> '.$file->name.'
|
||||
</a>
|
||||
|
||||
<small> ('.$file->extension.')'.((!empty($file->size)) ? ' ('.FileSystem::formatBytes($file->size).')' : '').' '.(((setting('Logo stampe') == $r['filename']) || (setting('Filigrana stampe') == $r['filename'])) ? '<i class="fa fa-file-text-o"></i>' : '').'</small>'.'
|
||||
<small> ('.$file->extension.')'.((!empty($file->size)) ? ' ('.FileSystem::formatBytes($file->size).')' : '').' '.(((setting('Logo stampe') == $file->filename) || (setting('Filigrana stampe') == $file->filename)) ? '<i class="fa fa-file-text-o"></i>' : '').'</small>'.'
|
||||
</td>
|
||||
|
||||
<td>'.timestampFormat($r['created_at']).'</td>
|
||||
<td>'.timestampFormat($file['created_at']).'</td>
|
||||
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="saggiungiAllegato(this)">
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="aggiungiAllegato(this)">
|
||||
<i class="fa fa-download"></i>
|
||||
</button>';
|
||||
|
||||
|
@ -150,6 +150,9 @@ class EmailNotification extends PHPMailer implements NotificationInterface
|
||||
// Conferma di lettura
|
||||
if (!empty($mail->read_notify)) {
|
||||
$this->ConfirmReadingTo = $mail->From;
|
||||
$this->AddCustomHeader('X-Confirm-Reading-To: '.$mail->From);
|
||||
$this->AddCustomHeader('Return-Receipt-To: '.$mail->From);
|
||||
$this->AddCustomHeader('Disposition-Notification-To: '.$mail->From);
|
||||
}
|
||||
|
||||
// Reply To
|
||||
|
Loading…
x
Reference in New Issue
Block a user