Avanzamento grafica AdminLTE3

This commit is contained in:
loviuz 2024-05-17 00:32:46 +02:00
parent 648fb32987
commit 448a47b5a3
10 changed files with 299 additions and 403 deletions

View File

@ -143,8 +143,8 @@ input[type=file] {
margin: auto;
}
.content {
padding: 20px 15px;
.content-wrapper {
padding-top: 10px;
}
.navbar a:hover,
@ -193,31 +193,6 @@ a:focus {
cursor: pointer;
}
#main_loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #555;
z-index: 9999;
text-align: center;
opacity: 0.9;
-moz-opacity: 0.9;
filter: alpha(opacity=90);
}
#main_loading>div {
position: relative;
top: 50%;
color: #333;
}
#main_loading>div>i {
font-size: 300px;
margin-top: -150px;
color: #e24e1e;
}
#mini-loader {
position: fixed;
@ -231,8 +206,8 @@ a:focus {
#mini-loader>div {
position: absolute;
bottom: 50%;
left: 50%;
bottom: 10%;
right: 10%;
width: 100px;
height: 100px;
margin-top: -50px;
@ -331,49 +306,6 @@ span.form-control {
}
/* Aggiustamenti per i widget */
.widget li {
margin-left: 0;
padding-top:10px;
list-style-type: none;
height: 106px;
}
.widget {
padding: 0;
margin-bottom: 0;
}
.widget.bordered {
border: 6px dashed #aaa;
margin: 10px;
min-height: 200px;
padding: 4px;
}
.close {
padding-right: 5px;
position: relative;
z-index: 1;
opacity: 0.4;
}
.close:focus,
.close:hover {
opacity: 0.8;
}
.li-widget button.close:hover,
.li-widget button.close:focus {
opacity: 0.3;
}
.li-widget button.close {
padding-right: 5px;
opacity: 0.1;
}
/* Tooltip dark */
@ -900,11 +832,6 @@ input.small-width {
max-height: 20px;
}
.brand-link {
max-width: 150px;
max-height: 100px;
}
.has-feedback .form-control {
padding-right: 6px;
}
@ -1100,11 +1027,6 @@ table.dataTable {
margin: 2px 0px;
}
.widget-user .widget-user-image>img {
-webkit-box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
box-shadow: -10px 0px 13px -7px #000000, 10px 0px 13px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
}
/*
* Colore eventi fullcalendar
*/
@ -1161,13 +1083,6 @@ kbd{
box-shadow: 0px 0px 1px black;
}
@media (max-width: 480px) {
#main_loading>div>i {
font-size: 160px;
margin-top: -80px;
}
}
@media screen and (max-width: 767px) {
.navbar-left {
display: inline-block;

View File

@ -16,16 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Aggiunta dell'ingranaggio all'unload della pagina
$(window).on("beforeunload", function () {
$("#main_loading").show();
});
// Rimozione dell'ingranaggio al caricamento completo della pagina
$(window).on("load", function () {
$("#main_loading").fadeOut();
});
// Fix multi-modal
$(document).on('hidden.bs.modal', '.modal', function () {
$(this).remove();

View File

@ -58,13 +58,13 @@ function openModal(title, href) {
const content = '<div class="modal-dialog modal-lg">\
<div class="modal-content">\
<div class="modal-header bg-light-blue">\
<button type="button" class="close" data-dismiss="modal">\
<span aria-hidden="true">&times;</span><span class="sr-only">' + globals.translations.close + '</span>\
</button>\
<div class="modal-header">\
<h4 class="modal-title">\
<i class="fa fa-pencil"></i> ' + title + '\
</h4>\
<button type="button" class="close" data-dismiss="modal">\
<span aria-hidden="true">&times;</span><span class="sr-only">' + globals.translations.close + '</span>\
</button>\
</div>\
<div class="modal-body">|data|</div>\
</div>\

View File

@ -228,7 +228,7 @@ function renderHook(hook, result) {
// Inizializzazione
var element = $("#" + element_id);
if (element.length == 0) {
$("#hooks").append('<li class="hook-element" id="' + element_id + '"></li>');
$("#hooks").append('<div class="dropdown-item hook-element" id="' + element_id + '"></div>');
element = $("#" + element_id);
}
@ -241,7 +241,16 @@ function renderHook(hook, result) {
}
// Contenuto
var content = '<a href="' + (result.link ? result.link : "#") + '"><i class="' + result.icon + '"></i><span class="small"> ' + result.message + '</span>';
var content = '';
if (result.link) {
content += '<a href="' + result.link + '">';
} else {
content += '<div class="hooks-header">';
}
content += '<i class="' + result.icon + '"></i> <span class="small"> ' + result.message + '</span>';
if (result.progress) {
var current = result.progress.current;
@ -254,7 +263,11 @@ function renderHook(hook, result) {
content += '<div class="progress" style="margin-bottom: 0px;"><div class="progress-bar" role="progressbar" aria-valuenow="' + percentage + '" aria-valuemin="0" aria-valuemax="100" style="width:' + percentage + '%">' + percentage + '% (' + current + '/' + total + ')</div></div>';
}
if (result.link) {
content += '</a>';
} else {
content += '</div>';
}
element.html(content);
}

View File

@ -17,8 +17,6 @@
*/
function init() {
// Inizializzazzione dei box AdminLTE
$('.box').boxWidget();
// Modal di default
$('[data-href]').not('.ask, .bound').click(function () {
launch_modal($(this).data('title'), $(this).data('href'), 1);

View File

@ -491,15 +491,10 @@ if ($read_only || !empty($block_edit)) {
if(content_was_modified) {
var dialogText = "Uscire senza salvare?";
e.returnValue = dialogText;
$("#main_loading").fadeOut();
return dialogText;
}
});
window.addEventListener("unload", function(e) {
$("#main_loading").show();
});
<?php
if (!empty($advanced_sessions)) {

View File

@ -21,10 +21,8 @@ include_once __DIR__.'/../core.php';
if (Auth::check()) {
echo '
</div>
</div><!-- /.row -->
</section><!-- /.content -->
</aside><!-- /.content-wrapper -->
</div><!-- /.content-wrapper -->
<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>

View File

@ -144,7 +144,7 @@ if (filter('action') == 'do_update') {
echo '
<div class="card card-warning card-center-large text-center">
<div class="card-header">
<h3 class="card-title">'.(!$dbo->isInstalled() ? tr('Installazione') : tr('Aggiornamento')).'</h3>
<h3 class="card-title"><i class="fa fa-refresh"></i> '.(!$dbo->isInstalled() ? tr('Installazione') : tr('Aggiornamento')).'</h3>
</div>
<div class="card-body">';
if (!$dbo->isInstalled()) {
@ -217,7 +217,7 @@ if (filter('action') == 'do_update') {
echo '
<script>
$(document).ready(function(){
$(".login-card").fadeOut();
$(".login-box").fadeOut();
count = '.count($updates).';
current = 0;

View File

@ -350,18 +350,17 @@ $hide_sidebar = Auth::check() && (setting('Nascondere la barra sinistra di defau
echo '
</head>
<body class="sidebar-mini skin-'.$theme.(!empty($hide_sidebar) ? ' sidebar-collapse' : '').(!Auth::check() ? ' hold-transition login-page' : '').'">
<body class="sidebar-mini layout-fixed skin-' . $theme . (!empty($hide_sidebar) ? ' sidebar-collapse' : '') . (!Auth::check() ? ' hold-transition login-page' : '') . '">
<div class="' . (!Auth::check() ? '' : 'wrapper') . '">';
if (Auth::check()) {
$calendar_color_label = ($_SESSION['period_start'] != date('Y').'-01-01' || $_SESSION['period_end'] != date('Y').'-12-31') ? 'danger' : 'default';
$calendar_color_label = ($_SESSION['period_start'] != date('Y') . '-01-01' || $_SESSION['period_end'] != date('Y') . '-12-31') ? 'danger' : 'secondary';
echo '
<!-- Loader principale -->
<div id="main_loading">
<div>
<i class="fa fa-cog fa-spin text-danger"></i>
</div>
<!-- Preloader -->
<div id="main_loading" class="preloader flex-column justify-content-center align-items-center">
<img class="animation__shake" src="'.$rootdir.'/assets/dist/img/logo.png" alt="OSM" height="60" width="60">
</div>
<!-- Loader secondario -->
@ -372,40 +371,32 @@ if (Auth::check()) {
<!-- Loader senza overlay -->
<div id="tiny-loader" style="display:none;"></div>
<nav class="main-header navbar navbar-expand">
<a href="'.tr('https://www.openstamanager.com').'" class="navbar-brand brand-link" title="'.tr("Il gestionale open source per l'assistenza tecnica e la fatturazione").'" target="_blank">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="brand-link-mini">'.tr('OSM').'</span>
<!-- logo for regular state and mobile devices -->
<span class="brand-link-lg">'.tr('OpenSTAManager').'</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<!-- Navbar -->
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fa fa-bars"></i></a>
</li>
<!-- Sidebar toggle button-->
<ul class="navbar-nav"><li class="nav-item"><a class="nav-link" data-widget="pushmenu" href="#"><i class="fa fa-bars"></i></a></li></ul>
<!-- Navbar Left Menu -->
<div class="navbar-left">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" id="daterange" class="nav-link" role="button">
<i class="fa fa-calendar" style="color:inherit"></i> <i class="fa fa-caret-down" style="color:inherit"></i>
<i class="fa fa-calendar"></i> <i class="fa fa-caret-down"></i>
</a>
</li>
<li class="nav-item">
<a style="cursor:default;padding:0px;padding-right:5px;padding-left:5px;margin-top:15px;" class="badge bg-'.$calendar_color_label.'">
<'.Translator::dateToLocale($_SESSION['period_start']) . ' - ' . Translator::dateToLocale($_SESSION['period_end']).'>
<li class="nav-item d-none d-sm-inline-block">
<a class="nav-link text-' . $calendar_color_label . '">
' . Translator::dateToLocale($_SESSION['period_start']) . ' - ' . Translator::dateToLocale($_SESSION['period_end']) . '
</a>
</li>
</ul>
</div>
<!-- Navbar Right Menu -->
<ul class="navbar-nav ml-auto">';
// Visualizzo gli hooks solo se non sono stati disabilitati
if (!$config['disable_hooks']) {
echo '
<li class="nav-item dropdown">
<div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span id="hooks-badge" class="badge badge-warning">
@ -415,18 +406,13 @@ if (Auth::check()) {
<span id="hooks-number" class="d-none">0</span>
</span>
</a>
<ul class="dropdown-menu">
<li class="nav-item">
<ul class="menu" id="hooks">
<li class="nav-item">
<a href="#" class="nav-link">
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<a href="#" class="dropdown-item">
<span class="small" id="hooks-header"></span>
</a>
</li>
</ul>
</li>
</ul>
</li>';
<div id="hooks"></div>
</div>
</div>';
}
echo '
@ -460,49 +446,56 @@ if (Auth::check()) {
</a>
</li>
</ul>
</div>
</nav>
</header>
<!-- /.navbar -->
<aside class="main-sidebar sidebar-dark-primary">
<div class="sidebar os-host os-theme-light os-host-overflow os-host-overflow-y os-host-resize-disabled os-host-transition os-host-scrollbar-horizontal-hidden">
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<a href="' . tr('https://www.openstamanager.com') . '" class="brand-link" title="' . tr("Il gestionale open source per l'assistenza tecnica e la fatturazione") . '" target="_blank">
<img src="' . $rootdir . '/assets/dist/img/logo_completo.png" alt="' . tr("Il gestionale open source per l'assistenza tecnica e la fatturazione") . '" class="img-fluid">
<span class="brand-text font-weight-light">&nbsp;</span>
</a>
<!-- Sidebar user panel -->
<div class="user-panel mt-3 pb-3 mb-3 text-center info">
<div class="info">
<p><a href="'.base_path().'/modules/utenti/info.php">
'.$user['username'].'
</a></p>
<p id="datetime"></p>
</div>
<a class="image" href="'.base_path().'/modules/utenti/info.php">';
<!-- Sidebar -->
<div class="sidebar">
<!-- Sidebar user panel (optional) -->
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="image">';
$user_photo = $user->photo;
if ($user_photo) {
echo '
<img src="'.$user_photo.'" class="img-circle pull-left" alt="'.$user['username'].'" />';
<img src="' . $user_photo . '" class="img-circle elevation-2" alt="' . $user['username'] . '" />';
} else {
echo '
<i class="fa fa-user-circle-o fa-3x pull-left" alt="'.tr('OpenSTAManager').'"></i>';
<i class="fa fa-user-circle-o fa-2x text-light" alt="' . tr('Utente') . '"></i>';
}
echo '
</a>
</div>
<!-- search form -->
<div class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" id="supersearch" placeholder="'.tr('Cerca').'"/>
<div class="info">
<a href="' . base_path() . '/modules/utenti/info.php" class="d-block">
' . $user['username'] . '
</a>
</div>
</div>
<!-- SidebarSearch Form -->
<div class="form-inline">
<div class="input-group" data-widget="sidebar-search">
<input class="form-control form-control-sidebar" id="supersearch" type="search" placeholder="' . tr('Cerca') . '" aria-label="' . tr('Cerca') . '">
<div class="input-group-append">
<button class="btn btn-flat" id="search-btn" name="search" type="submit">
<i class="fa fa-search"></i>
<button class="btn btn-sidebar">
<i class="fa fa-search fa-fw"></i>
</button>
</div>
</div>
</div>
<!-- /.search form -->
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">';
echo Modules::getMainMenu();
echo '
@ -595,12 +588,9 @@ if (Auth::check()) {
}
echo '
<!-- Right side column. Contains the navbar and content of the page -->
<aside class="content-wrapper">
<!-- Main content -->
<section class="content">
<div class="row">';
<div class="content-wrapper">
<section class="content">';
if (string_contains($_SERVER['SCRIPT_FILENAME'], 'editor.php')) {
$location = 'editor_right';
@ -608,9 +598,6 @@ if (Auth::check()) {
$location = 'controller_right';
}
echo '
<div class="col-md-12">';
// Eventuale messaggio personalizzato per l'installazione corrente
$extra_file = App::filepath('include/custom/extra', 'extra.php');
if ($extra_file) {

View File

@ -241,16 +241,16 @@ class WidgetManager implements ManagerInterface
// Generazione del codice HTML
if (!empty($widgets)) {
$result = '
<ul class="row widget" id="widget-'.$options['position'].'" data-class="">';
<div class="row widget" id="widget-'.$options['position'].'" data-class="">';
// Aggiungo ad uno ad uno tutti i widget
foreach ($widgets as $widget) {
if ($widget['id_module'] == $database->fetchOne('SELECT `id_record` FROM `zz_modules_lang` WHERE `title` = "Stato dei servizi" AND `id_lang` = '.prepare(\Models\Locale::getDefault()->id).'')['id']) {
$result .= '
<li class="col-sm-6 col-md-4 li-widget" id="widget_'.$widget['id'].'" style="height:100% !important;" data-id="'.$widget['id'].'">';
<div class="col-md-3 col-sm-6 col-12 li-widget" id="widget_'.$widget['id'].'" data-id="'.$widget['id'].'">';
} else {
$result .= '
<li class="col-sm-6 '.($widget['class'] ?: setting('Dimensione widget predefinita')).' li-widget" id="widget_'.$widget['id'].'" data-id="'.$widget['id'].'">';
<div class="col-sm-6 '.($widget['class'] ?: setting('Dimensione widget predefinita')).' li-widget" id="widget_'.$widget['id'].'" data-id="'.$widget['id'].'">';
}
$info = array_merge($options, [
'id' => $widget['id'],
@ -258,11 +258,11 @@ class WidgetManager implements ManagerInterface
$result .= $this->widget($info);
$result .= '
</li>';
</div>';
}
$result .= '
</ul>';
</div>';
}
return $result;