Version 21.78.2: Dec 30, 2021 Working on design of dark theme.

This commit is contained in:
acanas 2021-12-30 21:08:57 +01:00
parent c65a03029b
commit 182d70b00e
5 changed files with 138 additions and 93 deletions

View File

@ -1478,83 +1478,103 @@ a:hover img.CENTER_PHOTO_SHOW
} }
.MONTH .MONTH
{ {
color:#4d88a1;
font-size:9pt; font-size:9pt;
white-space:nowrap; white-space:nowrap;
text-transform:uppercase; text-transform:uppercase;
} }
.DAY_WRK_HEAD
{ .DAY_WRK_HEAD_WHITE {color:#4d88a1;}
color:#4d88a1; .DAY_WRK_HEAD_GREY {color:#4d88a1;}
font-size:9pt; .DAY_WRK_HEAD_PURPLE {color:#4d88a1;}
text-align:center; .DAY_WRK_HEAD_BLUE {color:#4d88a1;}
} .DAY_WRK_HEAD_YELLOW {color:#4d88a1;}
.DAY_NO_WRK_HEAD .DAY_WRK_HEAD_PINK {color:#4d88a1;}
{ .DAY_WRK_HEAD_DARK {color:#8cbcce;}
color:red;
font-size:9pt; .DAY_NO_WRK_HEAD_WHITE {color:red;}
text-align:center; .DAY_NO_WRK_HEAD_GREY {color:red;}
} .DAY_NO_WRK_HEAD_PURPLE {color:red;}
.DAY_WRK .DAY_NO_WRK_HEAD_BLUE {color:red;}
{ .DAY_NO_WRK_HEAD_YELLOW {color:red;}
color:#202020; .DAY_NO_WRK_HEAD_PINK {color:red;}
font-size:9pt; .DAY_NO_WRK_HEAD_DARK {color:#ff8080;}
text-align:center;
} .DAY_WRK_WHITE {color:#202020;}
.DAY_NO_WORK .DAY_WRK_GREY {color:#202020;}
{ .DAY_WRK_PURPLE {color:#202020;}
color:#c04080; .DAY_WRK_BLUE {color:#202020;}
font-size:9pt; .DAY_WRK_YELLOW {color:#202020;}
text-align:center; .DAY_WRK_PINK {color:#202020;}
} .DAY_WRK_DARK {color:white;}
.DAY_HLD
{ .DAY_NO_WORK_WHITE {color:#c04080;}
color:red; .DAY_NO_WORK_GREY {color:#c04080;}
font-size:9pt; .DAY_NO_WORK_PURPLE {color:#c04080;}
text-align:center; .DAY_NO_WORK_BLUE {color:#c04080;}
} .DAY_NO_WORK_YELLOW {color:#c04080;}
.DAY_WRK_LIGHT .DAY_NO_WORK_PINK {color:#c04080;}
{ .DAY_NO_WORK_DARK {color:#e0a0c0;}
color:#e0e0e0;
font-size:9pt; .DAY_HLD_WHITE {color:red;}
text-align:center; .DAY_HLD_GREY {color:red;}
} .DAY_HLD_PURPLE {color:red;}
.DAY_NO_WORK_LIGHT .DAY_HLD_BLUE {color:red;}
{ .DAY_HLD_YELLOW {color:red;}
color:#ffe0ff; .DAY_HLD_PINK {color:red;}
font-size:9pt; .DAY_HLD_DARK {color:#ff8080;}
text-align:center;
} .DAY_WRK_LIGHT_WHITE {color:#e0e0e0;}
.DAY_HLD_LIGHT .DAY_WRK_LIGHT_GREY {color:#e0e0e0;}
{ .DAY_WRK_LIGHT_PURPLE {color:#e0e0e0;}
color:#ffe0e0; .DAY_WRK_LIGHT_BLUE {color:#e0e0e0;}
font-size:9pt; .DAY_WRK_LIGHT_YELLOW {color:#e0e0e0;}
text-align:center; .DAY_WRK_LIGHT_PINK {color:#e0e0e0;}
} .DAY_WRK_LIGHT_DARK {color:#606060;}
.DAY_NO_WORK_LIGHT_WHITE {color:#ffe0ff;}
.DAY_NO_WORK_LIGHT_GREY {color:#ffe0ff;}
.DAY_NO_WORK_LIGHT_PURPLE {color:#ffe0ff;}
.DAY_NO_WORK_LIGHT_BLUE {color:#ffe0ff;}
.DAY_NO_WORK_LIGHT_YELLOW {color:#ffe0ff;}
.DAY_NO_WORK_LIGHT_PINK {color:#ffe0ff;}
.DAY_NO_WORK_LIGHT_DARK {color:#807080;}
.DAY_HLD_LIGHT_WHITE {color:#ffe0e0;}
.DAY_HLD_LIGHT_GREY {color:#ffe0e0;}
.DAY_HLD_LIGHT_PURPLE {color:#ffe0e0;}
.DAY_HLD_LIGHT_BLUE {color:#ffe0e0;}
.DAY_HLD_LIGHT_YELLOW {color:#ffe0e0;}
.DAY_HLD_LIGHT_PINK {color:#ffe0e0;}
.DAY_HLD_LIGHT_DARK {color:#807070;}
.DAY .DAY
{ {
border:solid 1px; border:solid 1px;
border-color:transparent; border-color:transparent;
font-size:9pt;
text-align:center; text-align:center;
} }
.TODAY .TODAY
{ {
border:solid 1px; border:solid 1px;
border-color:#50b800; border-color:#50b800;
font-size:9pt;
text-align:center; text-align:center;
} }
.DAY_EVENT .DAY_EVENT
{ {
border:solid 1px; border:solid 1px;
border-color:white; border-color:rgba(255,255,255,0.5);
background-color:#fff080; background-color:rgba(255,240,128,0.5);
font-size:9pt;
text-align:center; text-align:center;
} }
.TODAY_EVENT .TODAY_EVENT
{ {
border:solid 1px; border:solid 1px;
border-color:#50b800; border-color:#50b800;
background-color:#fff080; background-color:rgba(255,240,128,0.5);
font-size:9pt;
text-align:center; text-align:center;
} }
@ -1995,7 +2015,7 @@ a:hover img.CENTER_PHOTO_SHOW
.FRAME_BLUE {background-color:white;} .FRAME_BLUE {background-color:white;}
.FRAME_YELLOW {background-color:white;} .FRAME_YELLOW {background-color:white;}
.FRAME_PINK {background-color:white;} .FRAME_PINK {background-color:white;}
.FRAME_DARK {background-color:#484848;} .FRAME_DARK {background-color:#444444;}
.FRAME_SHADOW .FRAME_SHADOW
{ {
@ -2373,7 +2393,7 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.COLOR0_BLUE {background-color:#f4f2ea;} .COLOR0_BLUE {background-color:#f4f2ea;}
.COLOR0_YELLOW {background-color:#f4f2ea;} .COLOR0_YELLOW {background-color:#f4f2ea;}
.COLOR0_PINK {background-color:#f4f2ea;} .COLOR0_PINK {background-color:#f4f2ea;}
.COLOR0_DARK {background-color:#444444;} .COLOR0_DARK {background-color:#404040;}
.COLOR1_WHITE {background-color:#fbfaf7;} .COLOR1_WHITE {background-color:#fbfaf7;}
.COLOR1_GREY {background-color:#fbfaf7;} .COLOR1_GREY {background-color:#fbfaf7;}
@ -2381,7 +2401,7 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.COLOR1_BLUE {background-color:#fbfaf7;} .COLOR1_BLUE {background-color:#fbfaf7;}
.COLOR1_YELLOW {background-color:#fbfaf7;} .COLOR1_YELLOW {background-color:#fbfaf7;}
.COLOR1_PINK {background-color:#fbfaf7;} .COLOR1_PINK {background-color:#fbfaf7;}
.COLOR1_DARK {background-color:#4c4c4c;} .COLOR1_DARK {background-color:#484848;}
.LIGHT_GREEN {background-color:#C0FF40;} .LIGHT_GREEN {background-color:#C0FF40;}
@ -2714,13 +2734,13 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.CLASSPHOTO_DARK {color:#d0d0d0;} .CLASSPHOTO_DARK {color:#d0d0d0;}
/************************** Left column menu *********************************/ /************************** Left column menu *********************************/
.INS_LNK_WHITE, .MFU_WHITE {color:#4d88a1;} .INS_LNK_WHITE, .MFU_WHITE, .MONTH_WHITE {color:#4d88a1;}
.INS_LNK_GREY, .MFU_GREY {color:#4d88a1;} .INS_LNK_GREY, .MFU_GREY, .MONTH_GREY {color:#4d88a1;}
.INS_LNK_PURPLE, .MFU_PURPLE {color:#4d88a1;} .INS_LNK_PURPLE, .MFU_PURPLE, .MONTH_PURPLE {color:#4d88a1;}
.INS_LNK_BLUE, .MFU_BLUE {color:#4d88a1;} .INS_LNK_BLUE, .MFU_BLUE, .MONTH_BLUE {color:#4d88a1;}
.INS_LNK_YELLOW, .MFU_YELLOW {color:#4d88a1;} .INS_LNK_YELLOW, .MFU_YELLOW, .MONTH_YELLOW {color:#4d88a1;}
.INS_LNK_PINK, .MFU_PINK {color:#4d88a1;} .INS_LNK_PINK, .MFU_PINK, .MONTH_PINK {color:#4d88a1;}
.INS_LNK_DARK, .MFU_DARK {color:#8cbcce;} .INS_LNK_DARK, .MFU_DARK, .MONTH_DARK {color:#8cbcce;}
/*****************************************************************************/ /*****************************************************************************/
.MSJ_AVISO {color:#632921; font-size:12pt;} .MSJ_AVISO {color:#632921; font-size:12pt;}

View File

@ -1729,8 +1729,9 @@ function disableDetailedClicks () {
/************************* Draw an academic calendar *************************/ /************************* Draw an academic calendar *************************/
/*****************************************************************************/ /*****************************************************************************/
function Cal_DrawCalendar (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,PrintView, function Cal_DrawCalendar (id,FirstDayOfWeek,
CGI,FormGoToCalendarParams,FormEventParams) { TimeUTC,CurrentPlcCod,PrintView,Theme,
CGI,FormGoToCalendarParams,FormEventParams) {
var StartingMonth = [ // Calendar starts one row before current month var StartingMonth = [ // Calendar starts one row before current month
10, // January --> October 10, // January --> October
10, // February --> October 10, // February --> October
@ -1772,9 +1773,11 @@ function Cal_DrawCalendar (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,PrintView,
MonthId = id + '_month_' + MonthIdNum; MonthId = id + '_month_' + MonthIdNum;
Gbl_HTMLContent += '<td class="CT" style="width:150px;">'; Gbl_HTMLContent += '<td class="CT" style="width:150px;">';
DrawMonth (MonthId,FirstDayOfWeek,Year,Month,CurrentMonth,CurrentDay, DrawMonth (MonthId,FirstDayOfWeek,
CurrentPlcCod,true,PrintView,CGI, Year,Month,
FormGoToCalendarParams,FormEventParams); CurrentMonth,CurrentDay,
CurrentPlcCod,true,PrintView,Theme,
CGI,FormGoToCalendarParams,FormEventParams);
Gbl_HTMLContent += '</td>'; Gbl_HTMLContent += '</td>';
if (++Month == 13) { if (++Month == 13) {
Month = 1; Month = 1;
@ -1792,7 +1795,7 @@ function Cal_DrawCalendar (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,PrintView,
/***************************** Draw current month ****************************/ /***************************** Draw current month ****************************/
/*****************************************************************************/ /*****************************************************************************/
function DrawCurrentMonth (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod, function DrawCurrentMonth (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,Theme,
CGI,FormGoToCalendarParams,FormEventParams) { CGI,FormGoToCalendarParams,FormEventParams) {
var d = new Date(); var d = new Date();
d.setTime(TimeUTC * 1000); d.setTime(TimeUTC * 1000);
@ -1800,8 +1803,10 @@ function DrawCurrentMonth (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,
var Month = d.getMonth() + 1; var Month = d.getMonth() + 1;
var CurrentDay = d.getDate(); var CurrentDay = d.getDate();
DrawMonth (id,FirstDayOfWeek,Year,Month,Month,CurrentDay, DrawMonth (id,FirstDayOfWeek,
CurrentPlcCod,false,false, Year,Month,
Month,CurrentDay,
CurrentPlcCod,false,false,Theme,
CGI,FormGoToCalendarParams,FormEventParams); CGI,FormGoToCalendarParams,FormEventParams);
document.getElementById(id).innerHTML = Gbl_HTMLContent; document.getElementById(id).innerHTML = Gbl_HTMLContent;
} }
@ -1812,8 +1817,10 @@ function DrawCurrentMonth (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,
// FirstDayOfWeek == 0 ==> Weeks from Monday to Sunday // FirstDayOfWeek == 0 ==> Weeks from Monday to Sunday
// FirstDayOfWeek == 6 ==> Weeks from Sunday to Saturday // FirstDayOfWeek == 6 ==> Weeks from Sunday to Saturday
function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,CurrentDay, function DrawMonth (id,FirstDayOfWeek,
CurrentPlcCod,DrawingCalendar,PrintView, YearToDraw,MonthToDraw,
CurrentMonth,CurrentDay,
CurrentPlcCod,DrawingCalendar,PrintView,Theme,
CGI,FormGoToCalendarParams,FormEventParams) { CGI,FormGoToCalendarParams,FormEventParams) {
var Hld_HOLIDAY = 0; var Hld_HOLIDAY = 0;
var Hld_NON_SCHOOL_PERIOD = 1; var Hld_NON_SCHOOL_PERIOD = 1;
@ -1866,13 +1873,14 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
/***** Month name *****/ /***** Month name *****/
if (DrawingCalendar) if (DrawingCalendar)
Gbl_HTMLContent += '<div class="MONTH">'; Gbl_HTMLContent += '<div class="MONTH MONTH_' + Colors[Theme] + '">';
else { else {
FormId = id + '_show_calendar'; FormId = id + '_show_calendar';
Gbl_HTMLContent += '<form method="post" action="' + CGI + '" id="' + FormId + '">' + Gbl_HTMLContent += '<form method="post" action="' + CGI + '" id="' + FormId + '">' +
FormGoToCalendarParams + FormGoToCalendarParams +
'<div class="MONTH">' + '<div class="MONTH">' +
'<a href="" class="MONTH" onclick="document.getElementById(\'' + FormId + '<a href="" class="MONTH_' + Colors[Theme] +
'" onclick="document.getElementById(\'' + FormId +
'\').submit();return false;">'; '\').submit();return false;">';
} }
Gbl_HTMLContent += Months[MonthToDraw - 1] + ' ' + YearToDraw; Gbl_HTMLContent += Months[MonthToDraw - 1] + ' ' + YearToDraw;
@ -1885,8 +1893,8 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
Gbl_HTMLContent += '<table class="MONTH_TABLE_DAYS">' + '<tr>'; Gbl_HTMLContent += '<table class="MONTH_TABLE_DAYS">' + '<tr>';
for (DayOfWeek = 0; DayOfWeek < 7; DayOfWeek++) for (DayOfWeek = 0; DayOfWeek < 7; DayOfWeek++)
Gbl_HTMLContent += '<td class="' + Gbl_HTMLContent += '<td class="' +
((DayOfWeek == 6 - FirstDayOfWeek) ? 'DAY_NO_WRK_HEAD' : ((DayOfWeek == 6 - FirstDayOfWeek) ? 'DAY DAY_NO_WRK_HEAD_' + Colors[Theme] :
'DAY_WRK_HEAD') + 'DAY DAY_WRK_HEAD_' + Colors[Theme]) +
'">' + '">' +
DAYS_CAPS[(DayOfWeek + FirstDayOfWeek) % 7] + DAYS_CAPS[(DayOfWeek + FirstDayOfWeek) % 7] +
'</td>'; '</td>';
@ -1903,8 +1911,8 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
DayOfWeek < 7; DayOfWeek < 7;
DayOfWeek++) { DayOfWeek++) {
/***** Set class for day being drawn *****/ /***** Set class for day being drawn *****/
ClassForDay = ((Mon == MonthToDraw) ? 'DAY_WRK' : ClassForDay = ((Mon == MonthToDraw) ? 'DAY_WRK_' + Colors[Theme] :
'DAY_WRK_LIGHT'); 'DAY_WRK_LIGHT_' + Colors[Theme]);
TextForDay = ''; TextForDay = '';
/* Check if day is a holiday or a school day */ /* Check if day is a holiday or a school day */
@ -1921,16 +1929,16 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
switch (Hlds[NumHld].HldTyp) { switch (Hlds[NumHld].HldTyp) {
case Hld_HOLIDAY: case Hld_HOLIDAY:
if (Hlds[NumHld].StartDate == YYYYMMDD) { // If start date == date being drawn if (Hlds[NumHld].StartDate == YYYYMMDD) { // If start date == date being drawn
ClassForDay = ((Mon == MonthToDraw) ? 'DAY_HLD' : ClassForDay = ((Mon == MonthToDraw) ? 'DAY_HLD_' + Colors[Theme] :
'DAY_HLD_LIGHT'); 'DAY_HLD_LIGHT_' + Colors[Theme]);
TextForDay = Hlds[NumHld].Name; TextForDay = Hlds[NumHld].Name;
ContinueSearching = false; ContinueSearching = false;
} }
break; break;
case Hld_NON_SCHOOL_PERIOD: case Hld_NON_SCHOOL_PERIOD:
if (Hlds[NumHld].EndDate >= YYYYMMDD) { // If start date <= date being drawn <= end date if (Hlds[NumHld].EndDate >= YYYYMMDD) { // If start date <= date being drawn <= end date
ClassForDay = ((Mon == MonthToDraw) ? 'DAY_NO_WORK' : ClassForDay = ((Mon == MonthToDraw) ? 'DAY_NO_WORK_' + Colors[Theme] :
'DAY_NO_WORK_LIGHT'); 'DAY_NO_WORK_LIGHT_' + Colors[Theme]);
TextForDay = Hlds[NumHld].Name; TextForDay = Hlds[NumHld].Name;
} }
break; break;
@ -1939,8 +1947,8 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
/* Day being drawn is sunday? */ /* Day being drawn is sunday? */
if (DayOfWeek == 6 - FirstDayOfWeek) // All the sundays are holidays if (DayOfWeek == 6 - FirstDayOfWeek) // All the sundays are holidays
ClassForDay = (Mon == MonthToDraw) ? 'DAY_HLD' : ClassForDay = (Mon == MonthToDraw) ? 'DAY_HLD_' + Colors[Theme] :
'DAY_HLD_LIGHT'; 'DAY_HLD_LIGHT_' + Colors[Theme];
/* Date being drawn is today? */ /* Date being drawn is today? */
IsToday = (Yea == YearToDraw && IsToday = (Yea == YearToDraw &&

View File

@ -217,12 +217,12 @@ void Cal_DrawCurrentMonth (void)
/* Write script to draw the month */ /* Write script to draw the month */
HTM_SCRIPT_Begin (NULL,NULL); HTM_SCRIPT_Begin (NULL,NULL);
HTM_Txt ("\tGbl_HTMLContent = '';"); HTM_Txt ("\tGbl_HTMLContent = '';");
HTM_TxtF ("\tDrawCurrentMonth ('CurrentMonth',%u,%ld,%ld,'%s/%s',", HTM_TxtF ("\tDrawCurrentMonth ('CurrentMonth',%u,%ld,%ld,%u,'%s/%s',",
Gbl.Prefs.FirstDayOfWeek, Gbl.Prefs.FirstDayOfWeek,
(long) Gbl.StartExecutionTimeUTC, (long) Gbl.StartExecutionTimeUTC,
Gbl.Hierarchy.Ctr.PlcCod, Gbl.Hierarchy.Ctr.PlcCod,
Cfg_URL_SWAD_CGI, Gbl.Prefs.Theme,
Lan_STR_LANG_ID[Gbl.Prefs.Language]); Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language]);
Frm_SetParamsForm (ParamsStr,ActSeeCal,true); Frm_SetParamsForm (ParamsStr,ActSeeCal,true);
HTM_TxtF ("'%s',",ParamsStr); HTM_TxtF ("'%s',",ParamsStr);
Frm_SetParamsForm (ParamsStr,ActSeeDatCfe,true); Frm_SetParamsForm (ParamsStr,ActSeeDatCfe,true);
@ -286,14 +286,14 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
/* Write script to draw the month */ /* Write script to draw the month */
HTM_SCRIPT_Begin (NULL,NULL); HTM_SCRIPT_Begin (NULL,NULL);
HTM_Txt ("\tGbl_HTMLContent = '';"); HTM_Txt ("\tGbl_HTMLContent = '';");
HTM_TxtF ("\tCal_DrawCalendar('calendar',%u,%ld,%ld,%s,'%s/%s',", HTM_TxtF ("\tCal_DrawCalendar('calendar',%u,%ld,%ld,%s,%u,'%s/%s',",
Gbl.Prefs.FirstDayOfWeek, Gbl.Prefs.FirstDayOfWeek,
(long) Gbl.StartExecutionTimeUTC, (long) Gbl.StartExecutionTimeUTC,
Gbl.Hierarchy.Ctr.PlcCod, Gbl.Hierarchy.Ctr.PlcCod,
PrintView ? "true" : PrintView ? "true" :
"false", "false",
Cfg_URL_SWAD_CGI, Gbl.Prefs.Theme,
Lan_STR_LANG_ID[Gbl.Prefs.Language]); Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language]);
Frm_SetParamsForm (ParamsStr,ActionSeeCalendar,true); Frm_SetParamsForm (ParamsStr,ActionSeeCalendar,true);
HTM_TxtF ("'%s',",ParamsStr); HTM_TxtF ("'%s',",ParamsStr);
Frm_SetParamsForm (ParamsStr,ActSeeDatCfe,true); Frm_SetParamsForm (ParamsStr,ActSeeDatCfe,true);

View File

@ -602,10 +602,11 @@ TODO: FIX BUG, URGENT! En las fechas como par
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo. TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
*/ */
#define Log_PLATFORM_VERSION "SWAD 21.78.1 (2021-12-30)" #define Log_PLATFORM_VERSION "SWAD 21.78.2 (2021-12-30)"
#define CSS_FILE "swad21.77.1.css" #define CSS_FILE "swad21.78.2.css"
#define JS_FILE "swad21.67.4.js" #define JS_FILE "swad21.78.2.js"
/* /*
Version 21.78.2: Dec 30, 2021 Working on design of dark theme. (322393 lines)
Version 21.78.1: Dec 30, 2021 Working on design of dark theme. (322358 lines) Version 21.78.1: Dec 30, 2021 Working on design of dark theme. (322358 lines)
Version 21.78: Dec 30, 2021 Changing Str_BuildString for asprintf. (322358 lines) Version 21.78: Dec 30, 2021 Changing Str_BuildString for asprintf. (322358 lines)
Version 21.77.3: Dec 29, 2021 Changing Str_BuildString for asprintf. (322287 lines) Version 21.77.3: Dec 29, 2021 Changing Str_BuildString for asprintf. (322287 lines)

View File

@ -1630,10 +1630,13 @@ void Dat_AssignDate (struct Dat_Date *DateDst,struct Dat_Date *DateSrc)
void Dat_WriteScriptMonths (void) void Dat_WriteScriptMonths (void)
{ {
extern const char *The_Colors[The_NUM_THEMES];
extern const char *Txt_MONTHS_SMALL[12]; extern const char *Txt_MONTHS_SMALL[12];
extern const char *Txt_MONTHS_SMALL_SHORT[12]; extern const char *Txt_MONTHS_SMALL_SHORT[12];
unsigned NumMonth; unsigned NumMonth;
The_Theme_t Theme;
/***** Month names (full) *****/
HTM_Txt ("\tvar Months = ["); HTM_Txt ("\tvar Months = [");
for (NumMonth = 0; for (NumMonth = 0;
NumMonth < 12; NumMonth < 12;
@ -1645,6 +1648,7 @@ void Dat_WriteScriptMonths (void)
} }
HTM_Txt ("];\n"); HTM_Txt ("];\n");
/***** Month names (short) *****/
HTM_Txt ("\tvar MonthsShort = ["); HTM_Txt ("\tvar MonthsShort = [");
for (NumMonth = 0; for (NumMonth = 0;
NumMonth < 12; NumMonth < 12;
@ -1655,6 +1659,18 @@ void Dat_WriteScriptMonths (void)
HTM_TxtF ("'%s'",Txt_MONTHS_SMALL_SHORT[NumMonth]); HTM_TxtF ("'%s'",Txt_MONTHS_SMALL_SHORT[NumMonth]);
} }
HTM_Txt ("];\n"); HTM_Txt ("];\n");
/***** Colors for each theme *****/
HTM_Txt ("\tvar Colors = [");
for (Theme = (The_Theme_t) 0;
Theme <= (The_Theme_t) (The_NUM_THEMES - 1);
Theme++)
{
if (Theme)
HTM_Comma ();
HTM_TxtF ("'%s'",The_Colors[Theme]);
}
HTM_Txt ("];\n");
} }
/*****************************************************************************/ /*****************************************************************************/