Version 18.2.2

This commit is contained in:
Antonio Cañas Vargas 2018-10-08 14:11:21 +02:00
parent 2ad5395d13
commit f035e55bd6
9 changed files with 48 additions and 71 deletions

View File

@ -66,7 +66,7 @@ CC = gcc
# LIBS when using MariaDB (also valid with MySQL):
LIBS = -lssl -lcrypto -lpthread -lrt -lmysqlclient -lz -L/usr/lib64/mysql -lm -lgsoap
CFLAGS = -Wall -Wextra -mtune=native -O0 -s
CFLAGS = -Wall -Wextra -mtune=native -O2 -s
all: swad_ca swad_de swad_en swad_es swad_fr swad_gn swad_it swad_pl swad_pt

View File

@ -2272,6 +2272,10 @@ a:hover img.CENTRE_PHOTO_SHOW
margin:0;
padding-left:1em;
}
.PRJ_INPUT
{
max-width:500px;
}
/********************************** Tests ************************************/
.TAG_SEL {box-sizing:border-box; width:346px;}
@ -3269,6 +3273,10 @@ a.PAG:hover, .PAG_CUR
font-size:12pt;
font-weight:bold;
}
.INDICATORS_INPUT
{
max-width:500px;
}
/********************* Used to align buttons in account forms ****************/
.FORM_ACCOUNT

View File

@ -355,10 +355,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.2.1 (2018-10-08)"
#define CSS_FILE "swad17.25.4.css"
#define Log_PLATFORM_VERSION "SWAD 18.2.2 (2018-10-08)"
#define CSS_FILE "swad18.2.2.css"
#define JS_FILE "swad17.17.1.js"
/*
Version 18.2.2: Oct 08, 2018 Changes in edition of user's institution, centre, department... (234968 lines)
Version 18.2.1: Oct 08, 2018 Changes in edition of user's institution, centre, department... (234989 lines)
Version 18.2: Oct 08, 2018 Changes in layout of record card. (234980 lines)
Version 18.1.6: Oct 07, 2018 Icon to change user's institution is moved to record card. (234963 lines)

View File

@ -1111,7 +1111,7 @@ unsigned Dpt_GetNumDptsInIns (long InsCod)
/*****************************************************************************/
void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
unsigned SelectorWidth, // In pixels
const char *SelectClass,
long FirstOption,
const char *TextWhenNoDptSelected,
bool SubmitFormOnChange)
@ -1126,9 +1126,9 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
/***** Selector to select department *****/
/* Start selector */
fprintf (Gbl.F.Out,"<select id=\"%s\" name=\"%s\""
" style=\"width:%upx;\"",
" class=\"%s\"",
Dpt_PARAM_DPT_COD_NAME,Dpt_PARAM_DPT_COD_NAME,
SelectorWidth);
SelectClass);
if (SubmitFormOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.Form.Id);

View File

@ -74,7 +74,7 @@ unsigned Dpt_GetTotalNumberOfDepartments (void);
unsigned Dpt_GetNumDptsInIns (long InsCod);
void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
unsigned SelectorWidth, // In pixels
const char *SelectClass,
long FirstOptionSelectable,
const char *TextWhenNoDptSelected,
bool SubmitFormOnChange);

View File

@ -151,7 +151,7 @@ void Ind_ReqIndicatorsCourses (void)
The_ClassForm[Gbl.Prefs.Theme],Txt_Department);
Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod, // Departments in current insitution
Gbl.Stat.DptCod, // Selected department
375, // Width in pixels
"INDICATORS_INPUT", // Selector class
-1L, // First option
Txt_Any_department, // Text when no department selected
true); // Submit on change

View File

@ -498,7 +498,7 @@ static void Prj_ShowFormToFilterByDpt (void)
/***** Write selector with departments *****/
Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod, // Departments in current insitution
Gbl.Prjs.Filter.DptCod, // Selected department
275, // Width in pixels
"PRJ_INPUT", // Selector class
-1L, // First option
Txt_Any_department, // Text when no department selected
true); // Submit on change
@ -3043,7 +3043,7 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
The_ClassForm[Gbl.Prefs.Theme],Txt_Department);
Dpt_WriteSelectorDepartment (Gbl.CurrentIns.Ins.InsCod, // Departments in current institution
Prj->DptCod, // Selected department
375, // Width in pixels
"PRJ_INPUT", // Selector class
0, // First option
Txt_Another_department, // Text when no department selected
false); // Don't submit on change

View File

@ -3965,8 +3965,6 @@ void Rec_ShowMySharedRecordAndMyInsCtrDpt (void)
/********* Show form to edit my institution, centre and department ***********/
/*****************************************************************************/
#define COL2_WIDTH 600
static void Rec_ShowFormMyInsCtrDpt (void)
{
extern const char *Hlp_PROFILE_Institution;
@ -3989,6 +3987,7 @@ static void Rec_ShowFormMyInsCtrDpt (void)
unsigned NumIns;
unsigned NumCtr;
bool IAmATeacher;
char StrRecordWidth[10 + 1];
/***** Start section *****/
Lay_StartSection (Rec_MY_INS_CTR_DPT_ID);
@ -4014,19 +4013,20 @@ static void Rec_ShowFormMyInsCtrDpt (void)
}
/***** Start box and table *****/
Box_StartBoxTable ("800px",IAmATeacher ? Txt_Institution_centre_and_department :
Txt_Institution,
sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH);
Box_StartBoxTable (StrRecordWidth,
IAmATeacher ? Txt_Institution_centre_and_department :
Txt_Institution,
NULL,
Hlp_PROFILE_Institution,Box_NOT_CLOSABLE,2);
/***** Country *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">"
"<label for=\"OthCtyCod\" class=\"%s\">%s:</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
ClassForm,Txt_Country_of_your_institution,
COL2_WIDTH);
"<td class=\"REC_C2_BOT LEFT_MIDDLE\">",
ClassForm,Txt_Country_of_your_institution);
/* If list of countries is empty, try to get it */
if (!Gbl.Ctys.Num)
@ -4036,10 +4036,9 @@ static void Rec_ShowFormMyInsCtrDpt (void)
}
/* Start form to select the country of my institution */
// Act_FormGoToStart (ActChgCtyMyIns);
Act_FormStartAnchor (ActChgCtyMyIns,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\""
" style=\"width:500px;\""
" class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"",
Gbl.Form.Id);
@ -4064,12 +4063,11 @@ static void Rec_ShowFormMyInsCtrDpt (void)
/***** Institution *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">"
"<label for=\"OthInsCod\" class=\"%s\">%s:</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
ClassForm,Txt_Institution,
COL2_WIDTH);
"<td class=\"REC_C2_BOT LEFT_MIDDLE\">",
ClassForm,Txt_Institution);
/* Get list of institutions in this country */
Ins_FreeListInstitutions ();
@ -4077,10 +4075,9 @@ static void Rec_ShowFormMyInsCtrDpt (void)
Ins_GetListInstitutions (Gbl.Usrs.Me.UsrDat.InsCtyCod,Ins_GET_BASIC_DATA);
/* Start form to select institution */
// Act_FormGoToStart (ActChgMyIns);
Act_FormStartAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<select id=\"OthInsCod\" name=\"OthInsCod\""
" style=\"width:500px;\""
" class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"",
Gbl.Form.Id);
@ -4112,12 +4109,11 @@ static void Rec_ShowFormMyInsCtrDpt (void)
{
/***** Centre *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">"
"<label for=\"OthCtrCod\" class=\"%s\">%s:</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
ClassForm,Txt_Centre,
COL2_WIDTH);
"<td class=\"REC_C2_BOT LEFT_MIDDLE\">",
ClassForm,Txt_Centre);
/* Get list of centres in this institution */
Ctr_FreeListCentres ();
@ -4125,10 +4121,9 @@ static void Rec_ShowFormMyInsCtrDpt (void)
Ctr_GetListCentres (Gbl.Usrs.Me.UsrDat.InsCod);
/* Start form to select centre */
// Act_FormGoToStart (ActChgMyCtr);
Act_FormStartAnchor (ActChgMyCtr,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<select id=\"OthCtrCod\" name=\"OthCtrCod\""
" style=\"width:500px;\""
" class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"",
Gbl.Form.Id);
@ -4158,17 +4153,15 @@ static void Rec_ShowFormMyInsCtrDpt (void)
/***** Department *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">"
"<label for=\"%s\" class=\"%s\">%s:</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
Dpt_PARAM_DPT_COD_NAME,ClassForm,Txt_Department,
COL2_WIDTH);
// Act_FormGoToStart (ActChgMyDpt);
"<td class=\"REC_C2_BOT LEFT_MIDDLE\">",
Dpt_PARAM_DPT_COD_NAME,ClassForm,Txt_Department);
Act_FormStartAnchor (ActChgMyDpt,Rec_MY_INS_CTR_DPT_ID);
Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution
Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department
500, // Width in pixels
"REC_C2_BOT_INPUT", // Selector class
-1L, // First option
"", // Text when no department selected
true); // Submit on change
@ -4178,19 +4171,17 @@ static void Rec_ShowFormMyInsCtrDpt (void)
/***** Office *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">"
"<label for=\"Office\" class=\"%s\">"
"%s:"
"</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
ClassForm,Txt_Office,
COL2_WIDTH);
// Act_FormGoToStart (ActChgMyOff);
"<td class=\"REC_C2_BOT LEFT_MIDDLE\">",
ClassForm,Txt_Office);
Act_FormStartAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Office\" name=\"Office\""
" maxlength=\"%u\" value=\"%s\""
" style=\"width:500px;\""
" class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();\" />",
Usr_MAX_CHARS_ADDRESS,
Gbl.Usrs.Me.UsrDat.Tch.Office,
@ -4201,20 +4192,18 @@ static void Rec_ShowFormMyInsCtrDpt (void)
/***** Phone *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"RIGHT_MIDDLE\">"
"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">"
"<label for=\"OfficePhone\" class=\"%s\">"
"%s:"
"</label>"
"</td>"
"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
ClassForm,Txt_Phone,
COL2_WIDTH);
// Act_FormGoToStart (ActChgMyOffPho);
"<td class=\"REC_C2_BOT LEFT_MIDDLE\">",
ClassForm,Txt_Phone);
Act_FormStartAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<input type=\"tel\""
" id=\"OfficePhone\" name=\"OfficePhone\""
" maxlength=\"%u\" value=\"%s\""
" style=\"width:500px;\""
" class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();\" />",
Usr_MAX_CHARS_PHONE,
Gbl.Usrs.Me.UsrDat.Tch.OfficePhone,

View File

@ -10526,27 +10526,6 @@ const char *Txt_Edit_game =
"Editar jogo";
#endif
const char *Txt_Edit_my_institution =
#if L==1
"Edita la meva instituci&oacute;";
#elif L==2
"Bearbeiten meine Hochschule";
#elif L==3
"Edit my institution";
#elif L==4
"Editar mi instituci&oacute;n";
#elif L==5
"&Eacute;diter mon &eacute;tablissement";
#elif L==6
"Editar mi instituci&oacute;n"; // Okoteve traducción
#elif L==7
"Editare la mia istituzione";
#elif L==8
"Edycja moich instytucji";
#elif L==9
"Editar minha institu&ccedil;&atilde;o";
#endif
const char *Txt_Edit_my_personal_data =
#if L==1
"Edita meves dades personals";