mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-18 06:25:42 +02:00
Version 15.27
This commit is contained in:
parent
ca0d71a5cf
commit
4af7c60b7f
50
js/swad.js
50
js/swad.js
|
@ -239,24 +239,52 @@ function adjustDateForm (id) {
|
|||
}
|
||||
}
|
||||
|
||||
// Set a date-time form to a specified date-time
|
||||
function setDateTo (Yea,Mon,Day) {
|
||||
document.getElementById('StartYear' ).options[Yea].selected = true;
|
||||
// Set a date range form to yesterday
|
||||
function setDateToYesterday() {
|
||||
var d = new (Date);
|
||||
|
||||
d.setTime(d.getTime() - 24*60*60*1000); // Today - 1 day
|
||||
setDate(d);
|
||||
}
|
||||
|
||||
// Set a date range form to today
|
||||
function setDateToToday() {
|
||||
var d = new (Date);
|
||||
|
||||
setDate(d);
|
||||
}
|
||||
|
||||
// Set a date range form to a specific day
|
||||
function setDate(d) {
|
||||
var FormYea;
|
||||
var Yea = d.getFullYear();
|
||||
var Mon = d.getMonth()+1;
|
||||
var Day = d.getDate();
|
||||
|
||||
FormYea = document.getElementById('StartYear');
|
||||
for (var i=0; i<FormYea.options.length; i++)
|
||||
if (FormYea.options[i].value == Yea) {
|
||||
FormYea.options[i].selected = true;
|
||||
break;
|
||||
}
|
||||
document.getElementById('StartMonth' ).options[Mon].selected = true;
|
||||
adjustDateForm ('Start')
|
||||
document.getElementById('StartDay' ).options[Day].selected = true;
|
||||
document.getElementById('StartHour' ).options[0 ].selected = true;
|
||||
document.getElementById('StartMinute').options[0 ].selected = true;
|
||||
document.getElementById('StartSecond').options[0 ].selected = true;
|
||||
setUTCFromLocalDateTimeForm('Start');
|
||||
|
||||
document.getElementById('EndYear' ).options[Yea].selected = true;
|
||||
document.getElementById('EndMonth' ).options[Mon].selected = true;
|
||||
adjustDateForm ('End')
|
||||
document.getElementById('EndDay' ).options[Day].selected = true;
|
||||
document.getElementById('EndHour' ).options[23 ].selected = true;
|
||||
document.getElementById('EndMinute' ).options[59 ].selected = true;
|
||||
document.getElementById('EndSecond' ).options[59 ].selected = true;
|
||||
FormYea = document.getElementById('EndYear');
|
||||
for (var i=0; i<FormYea.options.length; i++)
|
||||
if (FormYea.options[i].value == Yea) {
|
||||
FormYea.options[i].selected = true;
|
||||
break;
|
||||
}
|
||||
document.getElementById('EndMonth' ).options[Mon].selected = true;
|
||||
document.getElementById('EndDay' ).options[Day].selected = true;
|
||||
document.getElementById('EndHour' ).options[23 ].selected = true;
|
||||
document.getElementById('EndMinute').options[59 ].selected = true;
|
||||
document.getElementById('EndSecond').options[59 ].selected = true;
|
||||
setUTCFromLocalDateTimeForm('End');
|
||||
}
|
||||
|
||||
|
|
|
@ -108,11 +108,12 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.26.1 (2015/10/27)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.27 (2015/10/28)"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 15.27: Oct 28, 2015 Fized bug in dates. (186300 lines)
|
||||
Version 15.26.1: Oct 27, 2015 Fized bug in statistics. (186282 lines)
|
||||
Version 15.26: Oct 27, 2015 Statistics are computed properly for clients with time-zones different to that of the server. (186278 lines)
|
||||
Version 15.25.4: Oct 27, 2015 Day and month are displayed in clock. (186251 lines)
|
||||
|
|
12
swad_date.c
12
swad_date.c
|
@ -221,19 +221,13 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (void)
|
|||
fprintf (Gbl.F.Out,"</td>"
|
||||
"<td rowspan=\"2\" class=\"LEFT_MIDDLE\">"
|
||||
"<input type=\"button\" name=\"Yesterday\" value=\"%s\""
|
||||
" onclick=\"setDateTo(%u,%u,%u);\" />"
|
||||
" onclick=\"setDateToYesterday();\" />"
|
||||
"<input type=\"button\" name=\"Today\" value=\"%s\""
|
||||
" onclick=\"setDateTo(%u,%u,%u);\" />"
|
||||
" onclick=\"setDateToToday();\" />"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Txt_Yesterday,
|
||||
Gbl.Yesterday.Year - Cfg_LOG_START_YEAR + 1,
|
||||
Gbl.Yesterday.Month,
|
||||
Gbl.Yesterday.Day,
|
||||
Txt_Today,
|
||||
Gbl.Now.Date.Year - Cfg_LOG_START_YEAR + 1,
|
||||
Gbl.Now.Date.Month,
|
||||
Gbl.Now.Date.Day);
|
||||
Txt_Today);
|
||||
|
||||
/***** End date-time *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
|
Loading…
Reference in New Issue
Block a user