Stile del codice
This commit is contained in:
parent
d8609a9ead
commit
0480497128
|
@ -75,10 +75,10 @@ if (setting('Attiva aggiornamenti')) {
|
||||||
},
|
},
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if (data == "none") {
|
if (data == "none") {
|
||||||
$("#update-search").html("'.tr("Nessun aggiornamento presente").'.");
|
$("#update-search").html("'.tr('Nessun aggiornamento presente').'.");
|
||||||
} else {
|
} else {
|
||||||
$("#update-search").html("'.tr("E' stato individuato un nuovo aggiornamento").': " + data + ".<br>'.tr('Scaricalo ora: _LINK_', [
|
$("#update-search").html("'.tr("E' stato individuato un nuovo aggiornamento").': " + data + ".<br>'.tr('Scaricalo ora: _LINK_', [
|
||||||
'_LINK_' => "<a href='https://github.com/devcode-it/openstamanager/releases'>https://github.com/devcode-it/openstamanager/releases</a>"
|
'_LINK_' => "<a href='https://github.com/devcode-it/openstamanager/releases'>https://github.com/devcode-it/openstamanager/releases</a>",
|
||||||
]).'");
|
]).'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ foreach ($rs as $r) {
|
||||||
|
|
||||||
$result['link'] = ROOTDIR.'/editor.php?id_module='.$id_module.'&id_record='.$r['id'];
|
$result['link'] = ROOTDIR.'/editor.php?id_module='.$id_module.'&id_record='.$r['id'];
|
||||||
$result['title'] = $r['ragione_sociale'];
|
$result['title'] = $r['ragione_sociale'];
|
||||||
$result['title'] .= !empty($r['deleted_at']) ? ' <small class="text-danger"><em>('.tr('Eliminato').')</em></small>': '';
|
$result['title'] .= !empty($r['deleted_at']) ? ' <small class="text-danger"><em>('.tr('Eliminato').')</em></small>' : '';
|
||||||
$result['category'] = 'Anagrafiche';
|
$result['category'] = 'Anagrafiche';
|
||||||
|
|
||||||
// Campi da evidenziare
|
// Campi da evidenziare
|
||||||
|
|
|
@ -255,7 +255,7 @@ if (!$cliente) {
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{[ "type": "text", "label": "<?php echo tr('Codice R.E.A.').'<small>('.tr('provincia/C.C.I.A.A.').')</small>'; ?>", "name": "codicerea", "value": "$codicerea$", "help": "<?php echo tr('Formato: _PATTERN_', [
|
{[ "type": "text", "label": "<?php echo tr('Codice R.E.A.').'<small>('.tr('provincia/C.C.I.A.A.').')</small>'; ?>", "name": "codicerea", "value": "$codicerea$", "help": "<?php echo tr('Formato: _PATTERN_', [
|
||||||
'_PATTERN_' => 'RM-123456'
|
'_PATTERN_' => 'RM-123456',
|
||||||
]); ?>" ]}
|
]); ?>" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -365,7 +365,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -394,7 +394,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -6,5 +6,4 @@ if (isset($id_record)) {
|
||||||
$records = $dbo->fetchArray('SELECT * FROM zz_fields WHERE id='.prepare($id_record));
|
$records = $dbo->fetchArray('SELECT * FROM zz_fields WHERE id='.prepare($id_record));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: prevedere un utilizzo pratico del campo options
|
// TODO: prevedere un utilizzo pratico del campo options
|
||||||
|
|
|
@ -238,7 +238,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -441,56 +441,42 @@ if (!empty($operations)) {
|
||||||
echo '
|
echo '
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$( ".btn-sm[data-toggle=\"tooltip\"]" ).each(function() {
|
$(".btn-sm[data-toggle=\"tooltip\"]").each(function() {
|
||||||
|
|
||||||
$(this).on("click", function(){
|
$(this).on("click", function(){
|
||||||
form = $("#edit-form");
|
form = $("#edit-form");
|
||||||
btn = $(this);
|
btn = $(this);
|
||||||
|
|
||||||
prev_html = btn.html();
|
var restore = buttonLoading(btn);
|
||||||
prev_class = btn.attr("class");
|
|
||||||
|
|
||||||
btn.html("<i class=\"fa fa-spinner fa-pulse fa-fw\"></i> Attendere...");
|
|
||||||
btn.addClass("btn-warning");
|
|
||||||
btn.prop("disabled", true);
|
|
||||||
|
|
||||||
function restore_btn(btn, prev_html, prev_class){
|
|
||||||
btn.attr("class", "");
|
|
||||||
btn.addClass(prev_class);
|
|
||||||
btn.html(prev_html);
|
|
||||||
btn.prop("disabled", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Procedo al salvataggio solo se tutti i campi obbligatori sono compilati, altimenti mostro avviso
|
// Procedo al salvataggio solo se tutti i campi obbligatori sono compilati, altimenti mostro avviso
|
||||||
if (form.parsley().isValid()){
|
if (form.parsley().isValid()) {
|
||||||
|
content_was_modified = false;
|
||||||
|
|
||||||
content_was_modified = false;
|
form.find("input:disabled, select:disabled").removeAttr("disabled");
|
||||||
|
|
||||||
form.find("input:disabled, select:disabled").removeAttr("disabled");
|
$.ajax({
|
||||||
|
url: globals.rootdir + "/modules/fatture/actions.php?id_module=" + globals.id_module ,
|
||||||
|
cache: false,
|
||||||
|
type: "POST",
|
||||||
|
processData: false,
|
||||||
|
dataType : "html",
|
||||||
|
data: form.serialize(),
|
||||||
|
success: function(data) {
|
||||||
|
$("#main_loading").fadeOut();
|
||||||
|
|
||||||
$.ajax({
|
buttonRestore(btn, restore);
|
||||||
url: "'.ROOTDIR.'/modules/fatture/actions.php?id_module=" + globals.id_module ,
|
},
|
||||||
cache: false,
|
error: function(data) {
|
||||||
type: "POST",
|
$("#main_loading").fadeOut();
|
||||||
processData: false,
|
|
||||||
dataType : "html",
|
|
||||||
data: form.serialize(),
|
|
||||||
success: function(data) {
|
|
||||||
$("#main_loading").fadeOut();
|
|
||||||
|
|
||||||
restore_btn(btn, prev_html, prev_class);
|
swal("'.tr('Errore').'", "'.tr('Errore durante il salvataggio').'", "error");
|
||||||
},
|
|
||||||
error: function(data) {
|
|
||||||
$("#main_loading").fadeOut();
|
|
||||||
|
|
||||||
swal("'.tr('Errore').'", "'.tr('Errore durante il salvataggio').'", "error");
|
buttonRestore(btn, restore);
|
||||||
session_set ("errors,0", 0, 1);
|
}
|
||||||
|
});
|
||||||
|
|
||||||
restore_btn(btn, prev_html, prev_class);
|
} else {
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
swal({
|
swal({
|
||||||
type: "error",
|
type: "error",
|
||||||
text: "'.tr('Alcuni campi obbligatori non sono stati compilati correttamente.').'",
|
text: "'.tr('Alcuni campi obbligatori non sono stati compilati correttamente.').'",
|
||||||
|
@ -501,11 +487,10 @@ $( ".btn-sm[data-toggle=\"tooltip\"]" ).each(function() {
|
||||||
function hide_popup(){
|
function hide_popup(){
|
||||||
$("#bs-popup").modal("hide");
|
$("#bs-popup").modal("hide");
|
||||||
|
|
||||||
session_set ("errors,0", 0, 1);
|
|
||||||
form.parsley().validate();
|
form.parsley().validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_btn(btn, prev_html, prev_class);
|
buttonRestore(btn, restore);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -335,7 +335,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -150,7 +150,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -171,7 +171,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -83,7 +83,7 @@ if (!empty($elementi)) {
|
||||||
<div class="box box-warning collapsable collapsed-box">
|
<div class="box box-warning collapsable collapsed-box">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Template email collegati: _NUM_', [
|
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Template email collegati: _NUM_', [
|
||||||
'_NUM_' => count($elementi)
|
'_NUM_' => count($elementi),
|
||||||
]).'</h3>
|
]).'</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||||
|
|
|
@ -463,7 +463,6 @@ function testQuery(){
|
||||||
$("#main_loading").fadeOut();
|
$("#main_loading").fadeOut();
|
||||||
|
|
||||||
swal("'.tr('Errore').'", "'.tr('Errore durante il test della query!').'", "error");
|
swal("'.tr('Errore').'", "'.tr('Errore durante il test della query!').'", "error");
|
||||||
session_set ("errors,0", 0, 1);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,9 +206,7 @@ echo '
|
||||||
}
|
}
|
||||||
}).then(
|
}).then(
|
||||||
function (result) {
|
function (result) {
|
||||||
prev_html = $("#add_promemoria").html();
|
var restore = buttonLoading("#add_promemoria");
|
||||||
$("#add_promemoria").html("<i class=\'fa fa-spinner fa-pulse fa-fw\'></i> '.tr('Attendere...').'");
|
|
||||||
$("#add_promemoria").prop("disabled", true);
|
|
||||||
|
|
||||||
$.post(globals.rootdir + "/actions.php?id_plugin='.$plugin['id'].'&id_parent='.$id_record.'", {
|
$.post(globals.rootdir + "/actions.php?id_plugin='.$plugin['id'].'&id_parent='.$id_record.'", {
|
||||||
op: "add-promemoria",
|
op: "add-promemoria",
|
||||||
|
@ -217,8 +215,7 @@ echo '
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
launch_modal("Nuovo promemoria", globals.rootdir + "/plugins/'.$plugin['directory'].'/pianficazione.php?id_plugin='.$plugin['id'].'&id_parent='.$id_record.'&id_record=" + data + "&add=1");
|
launch_modal("Nuovo promemoria", globals.rootdir + "/plugins/'.$plugin['directory'].'/pianficazione.php?id_plugin='.$plugin['id'].'&id_parent='.$id_record.'&id_record=" + data + "&add=1");
|
||||||
|
|
||||||
$("#add_promemoria").html(prev_html);
|
buttonRestore("#add_promemoria", restore);
|
||||||
$("#add_promemoria").prop("disabled", false);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function (dismiss) {}
|
function (dismiss) {}
|
||||||
|
|
|
@ -43,7 +43,6 @@ class App
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restituisce la configurazione di default del progetto.
|
* Restituisce la configurazione di default del progetto.
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,4 +25,3 @@ class CKEditorHandler implements HandlerInterface
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,8 @@ class Settings
|
||||||
* Genera l'input HTML per la modifica dell'impostazione.
|
* Genera l'input HTML per la modifica dell'impostazione.
|
||||||
*
|
*
|
||||||
* @param string|int $setting
|
* @param string|int $setting
|
||||||
* @param boolean $required
|
* @param bool $required
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function input($setting, $required = false)
|
public static function input($setting, $required = false)
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Update
|
||||||
/** @var array Percorsi da controllare per gli aggiornamenti */
|
/** @var array Percorsi da controllare per gli aggiornamenti */
|
||||||
protected static $directories = [
|
protected static $directories = [
|
||||||
'modules',
|
'modules',
|
||||||
'plugins'
|
'plugins',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -630,18 +630,18 @@ foreach ($movimenti as $movimento) {
|
||||||
$documento = null;
|
$documento = null;
|
||||||
|
|
||||||
if (!empty($movimento['idintervento'])) {
|
if (!empty($movimento['idintervento'])) {
|
||||||
$documento = $dbo->fetchOne("SELECT IFNULL(MAX(orario_fine), data_richiesta) AS data FROM in_interventi LEFT JOIN in_interventi_tecnici ON in_interventi.id=in_interventi_tecnici.idintervento WHERE in_interventi.id=".prepare($movimento['idintervento']));
|
$documento = $dbo->fetchOne('SELECT IFNULL(MAX(orario_fine), data_richiesta) AS data FROM in_interventi LEFT JOIN in_interventi_tecnici ON in_interventi.id=in_interventi_tecnici.idintervento WHERE in_interventi.id='.prepare($movimento['idintervento']));
|
||||||
} elseif (!empty($movimento['idddt'])) {
|
} elseif (!empty($movimento['idddt'])) {
|
||||||
$documento = $dbo->fetchOne("SELECT data FROM dt_ddt WHERE id=".prepare($movimento['idddt']));
|
$documento = $dbo->fetchOne('SELECT data FROM dt_ddt WHERE id='.prepare($movimento['idddt']));
|
||||||
} elseif (!empty($movimento['iddocumento'])) {
|
} elseif (!empty($movimento['iddocumento'])) {
|
||||||
$documento = $dbo->fetchOne("SELECT data FROM co_documenti WHERE id=".prepare($movimento['iddocumento']));
|
$documento = $dbo->fetchOne('SELECT data FROM co_documenti WHERE id='.prepare($movimento['iddocumento']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($documento['data'])) {
|
if (!empty($documento['data'])) {
|
||||||
$dbo->update('mg_movimenti', [
|
$dbo->update('mg_movimenti', [
|
||||||
'data' => $documento['data'],
|
'data' => $documento['data'],
|
||||||
], [
|
], [
|
||||||
'id' => $movimento['id']
|
'id' => $movimento['id'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -651,7 +651,7 @@ $dbo->query("UPDATE mg_movimenti SET data = created_at WHERE data = '0000-00-00'
|
||||||
// File e cartelle deprecate
|
// File e cartelle deprecate
|
||||||
$files = [
|
$files = [
|
||||||
'docs',
|
'docs',
|
||||||
'couscous.yml'
|
'couscous.yml',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($files as $key => $value) {
|
foreach ($files as $key => $value) {
|
||||||
|
|
Loading…
Reference in New Issue