Version 16.167.4

This commit is contained in:
Antonio Cañas Vargas 2017-03-26 00:20:34 +01:00
parent 2ddb854187
commit 59ae205953
4 changed files with 24 additions and 12 deletions

View File

@ -1645,7 +1645,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActSeeHld */{ 707,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x1FF, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_SeeHolidays ,NULL}, /* ActSeeHld */{ 707,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x1FF, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_SeeHolidays ,NULL},
/* ActEdiHld */{ 713,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_EditHolidays ,NULL}, /* ActEdiHld */{ 713,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_EditHolidays ,NULL},
/* ActNewHld */{ 714,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_RecFormNewHoliday ,NULL}, /* ActNewHld */{ 714,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_RecFormNewHoliday1 ,Hld_RecFormNewHoliday2 ,NULL},
/* ActRemHld */{ 716,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_RemoveHoliday ,NULL}, /* ActRemHld */{ 716,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_RemoveHoliday ,NULL},
/* ActChgHldPlc */{ 896,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_ChangeHolidayPlace ,NULL}, /* ActChgHldPlc */{ 896,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_ChangeHolidayPlace ,NULL},
/* ActChgHldTyp */{ 715,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_ChangeHolidayType ,NULL}, /* ActChgHldTyp */{ 715,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_ChangeHolidayType ,NULL},

View File

@ -209,13 +209,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.167.3 (2017-03-24)" #define Log_PLATFORM_VERSION "SWAD 16.167.4 (2017-03-26)"
#define CSS_FILE "swad16.166.css" #define CSS_FILE "swad16.166.css"
#define JS_FILE "swad16.144.js" #define JS_FILE "swad16.144.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // 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 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.167.4: Mar 26, 2017 Changes in edition of holidays. (217643 lines)
Version 16.167.3: Mar 25, 2017 Changes in edition of holidays. (217632 lines) Version 16.167.3: Mar 25, 2017 Changes in edition of holidays. (217632 lines)
Version 16.167.2: Mar 25, 2017 Contextual link to holidays is changed to a left-top contextual icon. (217577 lines) Version 16.167.2: Mar 25, 2017 Contextual link to holidays is changed to a left-top contextual icon. (217577 lines)
Version 16.167.1: Mar 25, 2017 Changes in icons related to calendar and holidays. (217595 lines) Version 16.167.1: Mar 25, 2017 Changes in icons related to calendar and holidays. (217595 lines)

View File

@ -1073,8 +1073,9 @@ static void Hld_PutHeadHolidays (void)
/******************* Receive form to create a new holiday ********************/ /******************* Receive form to create a new holiday ********************/
/*****************************************************************************/ /*****************************************************************************/
void Hld_RecFormNewHoliday (void) void Hld_RecFormNewHoliday1 (void)
{ {
extern const char *Txt_Created_new_holiday_X;
extern const char *Txt_You_must_specify_the_name_of_the_new_holiday; extern const char *Txt_You_must_specify_the_name_of_the_new_holiday;
struct Holiday *Hld; struct Holiday *Hld;
@ -1115,14 +1116,29 @@ void Hld_RecFormNewHoliday (void)
/***** Get holiday name *****/ /***** Get holiday name *****/
Par_GetParToText ("Name",Hld->Name,Hld_MAX_BYTES_HOLIDAY_NAME); Par_GetParToText ("Name",Hld->Name,Hld_MAX_BYTES_HOLIDAY_NAME);
/***** Create the new holiday or write warning message *****/ /***** Create the new holiday or set warning message *****/
if (Hld->Name[0]) // If there's a holiday name if (Hld->Name[0]) // If there's a holiday name
{
/* Create the new holiday */
Hld_CreateHoliday (Hld); Hld_CreateHoliday (Hld);
/* Success message */
sprintf (Gbl.Message,Txt_Created_new_holiday_X,Hld->Name);
}
else // If there is not a holiday name else // If there is not a holiday name
{ {
/* Error message */
Gbl.Error = true;
sprintf (Gbl.Message,"%s",Txt_You_must_specify_the_name_of_the_new_holiday); sprintf (Gbl.Message,"%s",Txt_You_must_specify_the_name_of_the_new_holiday);
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
} }
}
void Hld_RecFormNewHoliday2 (void)
{
/***** Write error/success message *****/
Lay_ShowAlert (Gbl.Error ? Lay_WARNING :
Lay_SUCCESS,
Gbl.Message);
/***** Show the form again *****/ /***** Show the form again *****/
Hld_EditHolidays (); Hld_EditHolidays ();
@ -1134,7 +1150,6 @@ void Hld_RecFormNewHoliday (void)
static void Hld_CreateHoliday (struct Holiday *Hld) static void Hld_CreateHoliday (struct Holiday *Hld)
{ {
extern const char *Txt_Created_new_holiday_X;
char Query[256 + Hld_MAX_BYTES_HOLIDAY_NAME]; char Query[256 + Hld_MAX_BYTES_HOLIDAY_NAME];
/***** Create a new holiday or no school period *****/ /***** Create a new holiday or no school period *****/
@ -1151,9 +1166,4 @@ static void Hld_CreateHoliday (struct Holiday *Hld)
Hld->EndDate.Day, Hld->EndDate.Day,
Hld->Name); Hld->Name);
DB_QueryINSERT (Query,"can not create holiday"); DB_QueryINSERT (Query,"can not create holiday");
/***** Write success message *****/
sprintf (Gbl.Message,Txt_Created_new_holiday_X,
Hld->Name);
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
} }

View File

@ -86,6 +86,7 @@ void Hld_ChangeHolidayType (void);
void Hld_ChangeStartDate (void); void Hld_ChangeStartDate (void);
void Hld_ChangeEndDate (void); void Hld_ChangeEndDate (void);
void Hld_RenameHoliday (void); void Hld_RenameHoliday (void);
void Hld_RecFormNewHoliday (void); void Hld_RecFormNewHoliday1 (void);
void Hld_RecFormNewHoliday2 (void);
#endif #endif