Correzioni JS e stile del codice
Correzioni JS sulla visualizzazione della barra laterale dei plugin e sulla stampa automatica delle tabelle.
This commit is contained in:
parent
5f51c4af16
commit
dfb5734d9b
|
@ -1033,13 +1033,13 @@ div.tip {
|
||||||
margin-right: 230px;
|
margin-right: 230px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-sidebar-shown {
|
.control-sidebar-open {
|
||||||
right: 0;
|
right: 0;
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-sidebar.control-sidebar-shown,
|
.control-sidebar.control-sidebar-open,
|
||||||
.control-sidebar.control-sidebar-shown + .control-sidebar-bg {
|
.control-sidebar.control-sidebar-open + .control-sidebar-bg {
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,11 @@ $(document).ready(function () {
|
||||||
$(this).find('ul').stop().slideUp();
|
$(this).find('ul').stop().slideUp();
|
||||||
});
|
});
|
||||||
|
|
||||||
$menulist = $('.treeview-menu > li.active');
|
const elenco_menu = $('.treeview-menu > li.active');
|
||||||
for (i = 0; i < $menulist.length; i++) {
|
for (i = 0; i < elenco_menu.length; i++) {
|
||||||
$list = $($menulist[i]);
|
const elemento = $(elenco_menu[i]);
|
||||||
$list.parent().show().parent().addClass('active');
|
elemento.parent().show().parent().addClass('active');
|
||||||
$list.parent().parent().find('i.fa-angle-left').removeClass('fa-angle-left').addClass('fa-angle-down');
|
elemento.parent().parent().find('i.fa-angle-left').removeClass('fa-angle-left').addClass('fa-angle-down');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Menu ordinabile
|
// Menu ordinabile
|
||||||
|
@ -46,7 +46,7 @@ $(document).ready(function () {
|
||||||
cursor: "move",
|
cursor: "move",
|
||||||
dropOnEmpty: true,
|
dropOnEmpty: true,
|
||||||
scroll: true,
|
scroll: true,
|
||||||
})[0].addEventListener("sortupdate", function(e) {
|
})[0].addEventListener("sortupdate", function (e) {
|
||||||
let order = $(".sidebar-menu > .treeview[data-id]").toArray().map(a => $(a).data("id"))
|
let order = $(".sidebar-menu > .treeview[data-id]").toArray().map(a => $(a).data("id"))
|
||||||
|
|
||||||
$.post(globals.rootdir + "/actions.php", {
|
$.post(globals.rootdir + "/actions.php", {
|
||||||
|
@ -57,19 +57,52 @@ $(document).ready(function () {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".sidebar-toggle").click(function () {
|
// Mostra/nasconde sidebar del menu principale
|
||||||
setTimeout(function () {
|
|
||||||
window.dispatchEvent(new Event('resize'));
|
|
||||||
}, 350);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Mostra/nasconde sidebar sx
|
|
||||||
$(".sidebar-toggle").on("click", function () {
|
$(".sidebar-toggle").on("click", function () {
|
||||||
if ($("body").hasClass("sidebar-collapse")) {
|
if ($("body").hasClass("sidebar-collapse")) {
|
||||||
session_set("settings,sidebar-collapse", 0, 1, 0);
|
session_set("settings,sidebar-collapse", 0, 1, 0);
|
||||||
} else {
|
} else {
|
||||||
session_set("settings,sidebar-collapse", 1, 0, 0);
|
session_set("settings,sidebar-collapse", 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
window.dispatchEvent(new Event('resize'));
|
||||||
|
}, 350);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Barra plugin laterale
|
||||||
|
const pluginToggle = $(".control-sidebar-toggle");
|
||||||
|
const largeScreen = screen.width > 1200;
|
||||||
|
|
||||||
|
// Gestione click sul pulsante per il toggle
|
||||||
|
pluginToggle.on("click", function () {
|
||||||
|
$("aside.content-wrapper, .main-footer").toggleClass("with-control-sidebar");
|
||||||
|
|
||||||
|
toggleControlSidebar();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Gestione click sulla sidebar per evitare chiusura
|
||||||
|
$(".control-sidebar").on("click", function (e) {
|
||||||
|
if (largeScreen && e.target.tagName !== 'H4' && $(".main-footer").hasClass("with-control-sidebar")) {
|
||||||
|
toggleControlSidebar();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Barra plugin laterale disabilitata per schermi piccoli
|
||||||
|
if (largeScreen && !globals.collapse_plugin_sidebar) {
|
||||||
|
pluginToggle.click();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Funzione dedicata alla gestione del toggle della sidebar.
|
||||||
|
*/
|
||||||
|
function toggleControlSidebar() {
|
||||||
|
const sidebar = $(".control-sidebar");
|
||||||
|
|
||||||
|
sidebar.toggleClass("control-sidebar-open");
|
||||||
|
|
||||||
|
if (sidebar.hasClass("control-sidebar-open")) {
|
||||||
|
sidebar.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ function start_datatables() {
|
||||||
{
|
{
|
||||||
extend: 'print',
|
extend: 'print',
|
||||||
autoPrint: true,
|
autoPrint: true,
|
||||||
|
footer: true,
|
||||||
customize: function (win) {
|
customize: function (win) {
|
||||||
$(win.document.body)
|
$(win.document.body)
|
||||||
.css('font-size', '10pt')
|
.css('font-size', '10pt')
|
||||||
|
|
21
editor.php
21
editor.php
|
@ -119,30 +119,11 @@ if (empty($record) || !$has_access) {
|
||||||
</a>
|
</a>
|
||||||
</li>';
|
</li>';
|
||||||
|
|
||||||
$hide_left_sidebar = Auth::check() && (setting('Nascondere la barra dei plugin di default'));
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
|
|
||||||
<li class="control-sidebar-toggle">
|
<li class="control-sidebar-toggle">
|
||||||
<a data-toggle="control-sidebar" style="cursor: pointer">'.tr('Plugin').'</a>
|
<a style="cursor: pointer">'.tr('Plugin').'</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<script>
|
|
||||||
$( document ).ready(function() {';
|
|
||||||
|
|
||||||
if (!empty($hide_left_sidebar)) {
|
|
||||||
echo ' $(".control-sidebar").removeClass("control-sidebar-shown"); $("aside.content-wrapper, .main-footer").toggleClass("with-control-sidebar");';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '
|
|
||||||
$(".control-sidebar-toggle").bind("click", function() {
|
|
||||||
$("aside.content-wrapper, .main-footer").toggleClass("with-control-sidebar");
|
|
||||||
$(".control-sidebar").toggleClass("control-sidebar-shown");
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
|
@ -26,7 +26,7 @@ if (Auth::check()) {
|
||||||
</section><!-- /.content -->
|
</section><!-- /.content -->
|
||||||
</aside><!-- /.content-wrapper -->
|
</aside><!-- /.content-wrapper -->
|
||||||
|
|
||||||
<footer class="main-footer '.(string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php') ? 'with-control-sidebar' : '').'">
|
<footer class="main-footer">
|
||||||
<a class="hidden-xs" href="'.tr('https://www.openstamanager.com').'" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'." target="_blank"><strong>'.tr('OpenSTAManager').'</strong></a>
|
<a class="hidden-xs" href="'.tr('https://www.openstamanager.com').'" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'." target="_blank"><strong>'.tr('OpenSTAManager').'</strong></a>
|
||||||
<span class="pull-right hidden-xs">
|
<span class="pull-right hidden-xs">
|
||||||
<strong>'.tr('Versione').'</strong> '.$version.'
|
<strong>'.tr('Versione').'</strong> '.$version.'
|
||||||
|
|
|
@ -115,7 +115,7 @@ if (Auth::check()) {
|
||||||
'hookSingle' => tr('Hai 1 notifica'),
|
'hookSingle' => tr('Hai 1 notifica'),
|
||||||
'hookNone' => tr('Nessuna notifica'),
|
'hookNone' => tr('Nessuna notifica'),
|
||||||
'singleCalendar' => tr("E' presente un solo periodo!"),
|
'singleCalendar' => tr("E' presente un solo periodo!"),
|
||||||
'noResults' => tr("Nessun elemento trovato"),
|
'noResults' => tr('Nessun elemento trovato'),
|
||||||
];
|
];
|
||||||
foreach ($translations as $key => $value) {
|
foreach ($translations as $key => $value) {
|
||||||
echo '
|
echo '
|
||||||
|
@ -123,7 +123,7 @@ if (Auth::check()) {
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
allegati: {
|
allegati: {
|
||||||
messaggio: "'.tr("Clicca o trascina qui per caricare uno o più file").'",
|
messaggio: "'.tr('Clicca o trascina qui per caricare uno o più file').'",
|
||||||
maxFilesize: "'.tr('Max upload: _SIZE_ MB').'",
|
maxFilesize: "'.tr('Max upload: _SIZE_ MB').'",
|
||||||
errore: "'.tr('Errore').'",
|
errore: "'.tr('Errore').'",
|
||||||
modifica: "'.tr('Modifica allegato').'",
|
modifica: "'.tr('Modifica allegato').'",
|
||||||
|
@ -206,6 +206,8 @@ if (Auth::check()) {
|
||||||
end_date: "'.$_SESSION['period_end'].'",
|
end_date: "'.$_SESSION['period_end'].'",
|
||||||
end_date_formatted: "'.Translator::dateToLocale($_SESSION['period_end']).'",
|
end_date_formatted: "'.Translator::dateToLocale($_SESSION['period_end']).'",
|
||||||
|
|
||||||
|
collapse_plugin_sidebar: '.intval(setting('Nascondere la barra dei plugin di default')).',
|
||||||
|
|
||||||
ckeditorToolbar: [
|
ckeditorToolbar: [
|
||||||
["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor" ],
|
["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","SpellChecker", "Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor" ],
|
||||||
],
|
],
|
||||||
|
@ -405,23 +407,23 @@ if (Auth::check()) {
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li><a href="#" onclick="window.print()" class="tip nav-button" title="'.tr('Stampa').'">
|
<li class="nav-button"><a href="#" onclick="window.print()" class="tip nav-button" title="'.tr('Stampa').'">
|
||||||
<i class="fa fa-print"></i>
|
<i class="fa fa-print"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
|
||||||
<li><a href="'.base_path().'/bug.php" class="tip nav-button" title="'.tr('Segnalazione bug').'">
|
<li class="nav-button"><a href="'.base_path().'/bug.php" class="tip nav-button" title="'.tr('Segnalazione bug').'">
|
||||||
<i class="fa fa-bug"></i>
|
<i class="fa fa-bug"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
|
||||||
<li><a href="'.base_path().'/log.php" class="tip nav-button" title="'.tr('Log accessi').'">
|
<li class="nav-button"><a href="'.base_path().'/log.php" class="tip nav-button" title="'.tr('Log accessi').'">
|
||||||
<i class="fa fa-book"></i>
|
<i class="fa fa-book"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
|
||||||
<li><a href="'.base_path().'/info.php" class="tip nav-button" title="'.tr('Informazioni').'">
|
<li class="nav-button"><a href="'.base_path().'/info.php" class="tip nav-button" title="'.tr('Informazioni').'">
|
||||||
<i class="fa fa-info"></i>
|
<i class="fa fa-info"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
|
|
||||||
<li><a href="'.base_path().'/index.php?op=logout" onclick="sessionStorage.clear()" class="bg-red tip" title="'.tr('Esci').'">
|
<li class="nav-button"><a href="'.base_path().'/index.php?op=logout" onclick="sessionStorage.clear()" class="bg-red tip" title="'.tr('Esci').'">
|
||||||
<i class="fa fa-power-off"></i>
|
<i class="fa fa-power-off"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -482,7 +484,7 @@ if (Auth::check()) {
|
||||||
if (string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php')) {
|
if (string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php')) {
|
||||||
// Menu laterale per la visualizzazione dei plugin
|
// Menu laterale per la visualizzazione dei plugin
|
||||||
echo '
|
echo '
|
||||||
<aside class="control-sidebar control-sidebar-light control-sidebar-shown">
|
<aside class="control-sidebar control-sidebar-light">
|
||||||
<h4 class="text-center">'.tr('Plugin disponibili').'</h4>
|
<h4 class="text-center">'.tr('Plugin disponibili').'</h4>
|
||||||
<ul class="nav nav-tabs nav-pills nav-stacked">
|
<ul class="nav nav-tabs nav-pills nav-stacked">
|
||||||
<li data-toggle="control-sidebar" class="active">
|
<li data-toggle="control-sidebar" class="active">
|
||||||
|
@ -542,7 +544,7 @@ if (Auth::check()) {
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<!-- Right side column. Contains the navbar and content of the page -->
|
<!-- Right side column. Contains the navbar and content of the page -->
|
||||||
<aside class="content-wrapper '.(string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php') ? 'with-control-sidebar' : '').'">
|
<aside class="content-wrapper">
|
||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
|
2
mail.php
2
mail.php
|
@ -159,7 +159,7 @@ echo '
|
||||||
<script>
|
<script>
|
||||||
var emails = [];
|
var emails = [];
|
||||||
var id_anagrafica = "'.$id_anagrafica.'";
|
var id_anagrafica = "'.$id_anagrafica.'";
|
||||||
var pec = "'.$smtp['pec']. '";
|
var pec = "'.$smtp['pec'].'";
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Auto-completamento destinatario
|
// Auto-completamento destinatario
|
||||||
|
|
|
@ -138,7 +138,7 @@ if ($dir == 'entrata') {
|
||||||
array_push($campi_mancanti, 'Partita IVA');
|
array_push($campi_mancanti, 'Partita IVA');
|
||||||
array_push($campi_mancanti, 'Codice fiscale');
|
array_push($campi_mancanti, 'Codice fiscale');
|
||||||
}
|
}
|
||||||
|
|
||||||
$nazione = Nazione::find($rs2[0]['id_nazione']);
|
$nazione = Nazione::find($rs2[0]['id_nazione']);
|
||||||
//se è un privato o un ente pubblico controllo il codice fiscale
|
//se è un privato o un ente pubblico controllo il codice fiscale
|
||||||
if ((($rs2[0]['tipo'] == 'Privato' && $nazione->iso2 == 'IT') or $rs2[0]['tipo'] == 'Ente pubblico') and empty($rs2[0]['codice_fiscale'])) {
|
if ((($rs2[0]['tipo'] == 'Privato' && $nazione->iso2 == 'IT') or $rs2[0]['tipo'] == 'Ente pubblico') and empty($rs2[0]['codice_fiscale'])) {
|
||||||
|
|
|
@ -141,7 +141,7 @@ class FileManager implements ManagerInterface
|
||||||
<i class="fa fa-external-link"></i> '.$r['name'].'
|
<i class="fa fa-external-link"></i> '.$r['name'].'
|
||||||
</a>
|
</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') == $r['filename']) || (setting('Filigrana stampe') == $r['filename'])) ? '<i class="fa fa-file-text-o"></i>' : '').'</small>'.'
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>'.timestampFormat($r['created_at']).'</td>
|
<td>'.timestampFormat($r['created_at']).'</td>
|
||||||
|
|
|
@ -167,7 +167,7 @@ class Query
|
||||||
$search_filters = [];
|
$search_filters = [];
|
||||||
foreach ($search as $field => $original_value) {
|
foreach ($search as $field => $original_value) {
|
||||||
$pos = array_search($field, $total['fields']);
|
$pos = array_search($field, $total['fields']);
|
||||||
$value = trim($original_value);
|
$value = is_array($original_value) ? $original_value : trim($original_value);
|
||||||
|
|
||||||
if (isset($value) && $pos !== false) {
|
if (isset($value) && $pos !== false) {
|
||||||
$search_query = $total['search_inside'][$pos];
|
$search_query = $total['search_inside'][$pos];
|
||||||
|
|
|
@ -55,4 +55,3 @@ if (!empty($documento->idsede)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,16 +71,16 @@ $default_header$
|
||||||
<p>$c_telefono$ $c_cellulare$</p>
|
<p>$c_telefono$ $c_cellulare$</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
if (!empty($destinazione)) {
|
if (!empty($destinazione)) {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td class="border-full" style="height:16mm;">
|
<td class="border-full" style="height:16mm;">
|
||||||
<p class="small-bold">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
|
<p class="small-bold">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
|
||||||
'.$destinazione.'
|
'.$destinazione.'
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue