mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-08 23:58:42 +01:00
Correzioni minori
This commit is contained in:
parent
e202dc8333
commit
1088c91c3a
@ -33,25 +33,26 @@ function getCalendarIcons(){
|
|||||||
function initDateInput(input) {
|
function initDateInput(input) {
|
||||||
let date_format = dateFormatMoment(globals.date_format);
|
let date_format = dateFormatMoment(globals.date_format);
|
||||||
let calendar_icons = getCalendarIcons();
|
let calendar_icons = getCalendarIcons();
|
||||||
|
let $input = $(input);
|
||||||
|
|
||||||
$(input).datetimepicker({
|
$(input).datetimepicker({
|
||||||
format: date_format,
|
format: date_format,
|
||||||
locale: globals.locale,
|
locale: globals.locale,
|
||||||
icons: calendar_icons,
|
icons: calendar_icons,
|
||||||
useCurrent: false,
|
useCurrent: false,
|
||||||
minDate: moment($this.attr('min-date')).isValid() ? $this.attr('min-date') : false,
|
minDate: moment($input.attr('min-date')).isValid() ? $input.attr('min-date') : false,
|
||||||
maxDate: moment($this.attr('max-date')).isValid() ? $this.attr('max-date') : false,
|
maxDate: moment($input.attr('max-date')).isValid() ? $input.attr('max-date') : false,
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function initTimestampInput(input) {
|
function initTimestampInput(input) {
|
||||||
let $this = $(input);
|
let $input = $(input);
|
||||||
let timestamp_format = dateFormatMoment(globals.timestamp_format);
|
let timestamp_format = dateFormatMoment(globals.timestamp_format);
|
||||||
let calendar_icons = getCalendarIcons();
|
let calendar_icons = getCalendarIcons();
|
||||||
|
|
||||||
$this.datetimepicker({
|
$input.datetimepicker({
|
||||||
format: timestamp_format,
|
format: timestamp_format,
|
||||||
locale: globals.locale,
|
locale: globals.locale,
|
||||||
icons: calendar_icons,
|
icons: calendar_icons,
|
||||||
@ -63,16 +64,16 @@ function initTimestampInput(input) {
|
|||||||
horizontal: 'left',
|
horizontal: 'left',
|
||||||
vertical: 'auto'
|
vertical: 'auto'
|
||||||
},
|
},
|
||||||
minDate: moment($this.attr('min-date')).isValid() ? $this.attr('min-date') : false,
|
minDate: moment($input.attr('min-date')).isValid() ? $input.attr('min-date') : false,
|
||||||
maxDate: moment($this.attr('max-date')).isValid() ? $this.attr('max-date') : false,
|
maxDate: moment($input.attr('max-date')).isValid() ? $input.attr('max-date') : false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// fix per timestamp-picker non visibile con la classe table-responsive
|
// fix per timestamp-picker non visibile con la classe table-responsive
|
||||||
$this.on("dp.show", function (e) {
|
$input.on("dp.show", function (e) {
|
||||||
$('#tecnici > div').removeClass('table-responsive');
|
$('#tecnici > div').removeClass('table-responsive');
|
||||||
});
|
});
|
||||||
|
|
||||||
$this.on("dp.hide", function (e) {
|
$input.on("dp.hide", function (e) {
|
||||||
$('#tecnici > div').addClass('table-responsive');
|
$('#tecnici > div').addClass('table-responsive');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -80,17 +81,18 @@ function initTimestampInput(input) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initTimeInput(input) {
|
function initTimeInput(input) {
|
||||||
|
let $input = $(input);
|
||||||
let time_format = dateFormatMoment(globals.time_format);
|
let time_format = dateFormatMoment(globals.time_format);
|
||||||
let calendar_icons = getCalendarIcons();
|
let calendar_icons = getCalendarIcons();
|
||||||
|
|
||||||
$(input).datetimepicker({
|
$input.datetimepicker({
|
||||||
format: time_format,
|
format: time_format,
|
||||||
locale: globals.locale,
|
locale: globals.locale,
|
||||||
icons: calendar_icons,
|
icons: calendar_icons,
|
||||||
useCurrent: false,
|
useCurrent: false,
|
||||||
stepping: 5,
|
stepping: 5,
|
||||||
minDate: moment($this.attr('min-date')).isValid() ? $this.attr('min-date') : false,
|
minDate: moment($input.attr('min-date')).isValid() ? $input.attr('min-date') : false,
|
||||||
maxDate: moment($this.attr('max-date')).isValid() ? $this.attr('max-date') : false,
|
maxDate: moment($input.attr('max-date')).isValid() ? $input.attr('max-date') : false,
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -32,7 +32,7 @@ $prezzo_max = $prezzi['max'];
|
|||||||
$prezzo_medio = $prezzi['media'];
|
$prezzo_medio = $prezzi['media'];
|
||||||
|
|
||||||
$oscillazione = $prezzo_max['prezzo'] - $prezzo_min['prezzo'];
|
$oscillazione = $prezzo_max['prezzo'] - $prezzo_min['prezzo'];
|
||||||
$oscillazione_percentuale = $oscillazione * 100 / $prezzo_medio ?: 0;
|
$oscillazione_percentuale = $prezzo_medio ? $oscillazione * 100 / $prezzo_medio : 0;
|
||||||
|
|
||||||
$data_min = strtotime($prezzo_min['data']);
|
$data_min = strtotime($prezzo_min['data']);
|
||||||
$data_max = strtotime($prezzo_max['data']);
|
$data_max = strtotime($prezzo_max['data']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user