Version 21.77: Dec 29, 2021 Animated recycle icon is changed by static icon.

This commit is contained in:
acanas 2021-12-29 17:26:48 +01:00
parent 31aa54ea1b
commit d8a1e91cf9
18 changed files with 84 additions and 164 deletions

View File

@ -2765,6 +2765,14 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
.BIG_INDEX {color:#808080; font-size:20pt; font-weight:bold;}
.BIG_INDEX_RED {color:#660000; font-size:20pt; font-weight:bold;}
/******************************** Update links *******************************/
.UPD
{
padding-top:12px;
text-align:center;
vertical-align:middle;
}
/******************************** Projects ***********************************/
.PRJ_LST_USR
{

View File

@ -1453,24 +1453,6 @@ void HTM_BUTTON_OnClick_Begin (const char *Title,const char *Class,const char *O
HTM_BUTTON_NestingLevel++;
}
void HTM_BUTTON_Animated_Begin (const char *Title,const char *Class,const char *OnClick)
{
HTM_Txt ("<button type=\"submit\"");
if (Title)
if (Title[0])
HTM_TxtF (" title=\"%s\"",Title);
if (Class)
if (Class[0])
HTM_TxtF (" class=\"%s\"",Class);
HTM_Txt (" onclick=\"");
if (OnClick) // JavaScript function to be called before when clicking the button
if (OnClick[0])
HTM_TxtF ("%s",OnClick);
HTM_TxtF ("AnimateIcon(%d);\">",Gbl.Form.Num);
HTM_BUTTON_NestingLevel++;
}
void HTM_BUTTON_End (void)
{
if (HTM_BUTTON_NestingLevel == 0) // No BUTTON open

View File

@ -151,7 +151,6 @@ void HTM_INPUT_CHECKBOX (const char *Name,HTM_SubmitOnChange_t SubmitOnChange,
void HTM_BUTTON_OnMouseDown_Begin (const char *Title,const char *Class);
void HTM_BUTTON_OnSubmit_Begin (const char *Title,const char *Class,const char *OnSubmit);
void HTM_BUTTON_OnClick_Begin (const char *Title,const char *Class,const char *OnClick);
void HTM_BUTTON_Animated_Begin (const char *Title,const char *Class,const char *OnClick);
void HTM_BUTTON_End (void);
void HTM_TEXTAREA_Begin (const char *fmt,...);

View File

@ -2758,25 +2758,21 @@ static void Att_ListEventsToSelect (const struct Att_Events *Events,
HTM_TR_End ();
}
/***** Put button to refresh *****/
if (NormalView)
{
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"5\" class=\"CM\"");
HTM_BUTTON_Animated_Begin (Txt_Update_attendance,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Update_attendance);
HTM_BUTTON_End ();
HTM_TD_End ();
HTM_TR_End ();
}
/***** End table *****/
HTM_TABLE_End ();
/***** Put button to refresh *****/
if (NormalView)
{
HTM_DIV_Begin ("class=\"UPD\"");
HTM_BUTTON_OnSubmit_Begin (Txt_Update_attendance,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Update_attendance);
HTM_BUTTON_End ();
HTM_DIV_End ();
}
/***** End form *****/
if (NormalView)
Frm_EndForm ();

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.
*/
#define Log_PLATFORM_VERSION "SWAD 21.76.5 (2021-12-29)"
#define Log_PLATFORM_VERSION "SWAD 21.77 (2021-12-29)"
#define CSS_FILE "swad21.76.5.css"
#define JS_FILE "swad21.67.4.js"
/*
Version 21.77: Dec 29, 2021 Animated recycle icon is changed by static icon. (322250 lines)
Version 21.76.5: Dec 29, 2021 Working on design of dark theme. (322313 lines)
Version 21.76.4: Dec 28, 2021 Working on design of dark theme. (322306 lines)
Version 21.76.3: Dec 28, 2021 Working on design of dark theme. (322293 lines)

View File

@ -531,7 +531,7 @@
#define Cfg_TIME_TO_DELETE_OLD_NOTIF ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired notifications
#define Cfg_MIN_TIME_TO_RECOMPUTE_AVG_PHOTO ((time_t)( 12UL * 60UL * 60UL)) // After these seconds, users can recompute the average photos of a degree
#define Cfg_MIN_TIME_TO_RECOMPUTE_AVG_PHOTO ((time_t)( 0 * 60UL * 60UL)) // After these seconds, users can recompute the average photos of a degree
#define Cfg_MAX_TIME_TO_REMEMBER_LAST_ACTION_ON_LOGIN ((time_t)( 2UL * 60UL * 60UL)) // On login, if interval since last action is less than this time, remember last action

View File

@ -647,21 +647,17 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
HTM_TR_End ();
}
/***** Put button to refresh *****/
HTM_TR_Begin (NULL);
/***** End table *****/
HTM_TABLE_End ();
HTM_TD_Begin ("colspan=\"3\" class=\"CM\"");
HTM_BUTTON_Animated_Begin (Txt_Update_results,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Update_results);
HTM_BUTTON_End ();
HTM_TD_End ();
HTM_TR_End ();
/***** End table *****/
HTM_TABLE_End ();
/***** Put link to refresh *****/
HTM_DIV_Begin ("class=\"UPD\"");
HTM_BUTTON_OnSubmit_Begin (Txt_Update_results,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Update_results);
HTM_BUTTON_End ();
HTM_DIV_End ();
/***** End form *****/
Frm_EndForm ();

View File

@ -408,12 +408,12 @@ void Grp_ShowFormToSelectSeveralGroups (void (*FuncParams) (void *Args),void *Ar
Grp_FreeListGrpTypesAndGrps ();
/***** Submit button *****/
HTM_DIV_Begin ("class=\"CM\" style=\"padding-top:12px;\"");
HTM_BUTTON_Animated_Begin (Txt_Update_users,
HTM_DIV_Begin ("class=\"UPD\"");
HTM_BUTTON_OnSubmit_Begin (Txt_Update_users,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
NULL);
Ico_PutCalculateIconWithText (Txt_Update_users);
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Update_users);
HTM_BUTTON_End ();
HTM_DIV_End ();

View File

@ -525,55 +525,6 @@ void Ico_PutIcon (const char *Icon,Ico_Color_t Color,const char *Title,const cha
"class=\"%s%s%s\"",Class,CC[0] ? " " : "",CC);
}
/*****************************************************************************/
/********** Put a icon to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Ico_PutCalculateIcon (const char *Title)
{
/***** Begin container *****/
HTM_DIV_Begin ("class=\"CONTEXT_OPT ICO_HIGHLIGHT\"");
/***** Static icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif",Title, // TODO: change name and resolution to refresh64x64.png
"class=\"CONTEXT_ICO_16x16\" id=\"update_%d\"",Gbl.Form.Num);
/***** Animated icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Title, // TODO: change name and resolution to refreshing64x64.gif
"class=\"CONTEXT_ICO_16x16\" style=\"display:none;\"" // Animated icon hidden
" id=\"updating_%d\"",Gbl.Form.Num);
/***** End container *****/
HTM_DIV_End ();
}
/*****************************************************************************/
/********** Put a icon with a text to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Ico_PutCalculateIconWithText (const char *Text)
{
/***** Begin container *****/
HTM_DIV_Begin ("class=\"ICO_HIGHLIGHT\" style=\"margin:0 6px 0 0; display:inline;\"");
/***** Static icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif",Text,
"class=\"ICO20x20\" id=\"update_%d\"",Gbl.Form.Num);
/***** Animated icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Text, // Animated icon
"class=\"ICO20x20\" style=\"display:none;\"" // hidden
" id=\"updating_%d\"",Gbl.Form.Num);
/***** Text *****/
HTM_TxtF ("&nbsp;%s",Text);
/***** End container *****/
HTM_DIV_End ();
}
/*****************************************************************************/
/******** Put a disabled icon indicating that removal is not allowed *********/
/*****************************************************************************/

View File

@ -102,9 +102,6 @@ void Ico_PutIconOn (const char *Icon,Ico_Color_t Color,const char *Title);
void Ico_PutIconOff (const char *Icon,Ico_Color_t Color,const char *Title);
void Ico_PutIcon (const char *Icon,Ico_Color_t Color,const char *Title,const char *Class);
void Ico_PutCalculateIcon (const char *Title);
void Ico_PutCalculateIconWithText (const char *Text);
void Ico_PutIconRemovalNotAllowed (void);
void Ico_PutIconCut (void);

View File

@ -3335,7 +3335,8 @@ static void Mch_PutBigButtonClose (void)
/***** Put icon with link *****/
HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\"");
HTM_BUTTON_OnClick_Begin (Txt_Close,"BT_LINK MCH_BUTTON_ON ICO_DARKRED",
"window.close();");
"window.close();"
"return false;");
HTM_TxtF ("<i class=\"%s\"></i>",Mch_ICON_CLOSE);
HTM_BUTTON_End ();
HTM_DIV_End ();

View File

@ -603,22 +603,18 @@ static void MchRes_ListGamesToSelect (struct Gam_Games *Games)
HTM_TR_End ();
}
/***** Put button to refresh *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"3\" class=\"CM\"");
HTM_BUTTON_Animated_Begin (Txt_Update_results,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Update_results);
HTM_BUTTON_End ();
HTM_TD_End ();
HTM_TR_End ();
/***** End table *****/
HTM_TABLE_End ();
/***** Put button to refresh *****/
HTM_DIV_Begin ("class=\"UPD\"");
HTM_BUTTON_OnSubmit_Begin (Txt_Update_results,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Update_results);
HTM_BUTTON_End ();
HTM_DIV_End ();
/***** End form *****/
Frm_EndForm ();

View File

@ -1520,14 +1520,14 @@ static void Msg_ShowSntOrRcvMessages (struct Msg_Messages *Messages)
Msg_ShowFormToFilterMsgs (Messages);
/***** Contextual menu *****/
Mnu_ContextMenuBegin ();
HTM_BUTTON_Animated_Begin (Txt_Update_messages,
/***** Put button to refresh *****/
HTM_DIV_Begin ("class=\"UPD\"");
HTM_BUTTON_OnSubmit_Begin (Txt_Update_messages,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Update_messages); // Animated icon to update messages
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Update_messages);
HTM_BUTTON_End ();
Mnu_ContextMenuEnd ();
HTM_DIV_End ();
Frm_EndForm ();

View File

@ -2014,7 +2014,7 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
Deg_GetDataOfDegreeByCod (&Deg);
/***** Contextual menu *****/
Mnu_ContextMenuBegin ();
HTM_DIV_Begin ("class=\"UPD\"");
/* Begin form */
Frm_BeginForm (ActCalPhoDeg);
@ -2023,10 +2023,11 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
Set_PutParamsPrefsAboutUsrList ();
HTM_BUTTON_Animated_Begin (Txt_Calculate_average_photo_of_THE_DEGREE_X,
/***** Put button to refresh *****/
HTM_BUTTON_OnSubmit_Begin (Txt_Calculate_average_photo_of_THE_DEGREE_X,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Calculate_average_photo_of_THE_DEGREE_X);
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Calculate_average_photo_of_THE_DEGREE_X);
HTM_BUTTON_End ();
/* Selector with all degrees with students */
@ -2062,7 +2063,8 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
/* End form and contextual menu */
Frm_EndForm ();
Mnu_ContextMenuEnd ();
HTM_DIV_End ();
/***** Free list of all degrees with students *****/
Deg_FreeListDegs (&Degs);

View File

@ -778,11 +778,14 @@ static void Prf_PutLinkCalculateFigures (const char *EncryptedUsrCod)
Frm_BeginForm (ActCalFig);
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
HTM_BUTTON_Animated_Begin (Txt_Calculate,
/***** Put button to refresh *****/
HTM_BUTTON_OnSubmit_Begin (Txt_Calculate,
The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Calculate);
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_Calculate);
HTM_BUTTON_End ();
Frm_EndForm ();
}

View File

@ -3410,25 +3410,25 @@ const char *Txt_Calculate =
"Calcular";
#endif
const char *Txt_Calculate_average_photo_of_THE_DEGREE_X =
const char *Txt_Calculate_average_photo_of_THE_DEGREE_X = // Warning: should end in space
#if L==1 // ca
"Calcular fotografia mitjana de";
"Calcular fotografia mitjana de ";
#elif L==2 // de
"Calculate average photo of"; // Need Übersetzung
"Berechnen Sie das durchschnittliche Foto von ";
#elif L==3 // en
"Calculate average photo of";
"Calculate average photo of ";
#elif L==4 // es
"Calcular fotograf&iacute;a promedio de";
"Calcular fotograf&iacute;a promedio de ";
#elif L==5 // fr
"Calculate average photo of"; // Besoin de traduction
"Calculer la photo moyenne de ";
#elif L==6 // gn
"Calcular fotograf&iacute;a promedio de"; // Okoteve traducción
"Calcular fotograf&iacute;a promedio de "; // Okoteve traducción
#elif L==7 // it
"Calcolare la media della foto di";
"Calcolare la media della foto di ";
#elif L==8 // pl
"Obliczyc &sacute;rednia zdjecie";
"Obliczyc &sacute;rednia zdjecie ";
#elif L==9 // pt
"Calcular a foto m&eacute;dia de";
"Calcular a foto m&eacute;dia de ";
#endif
const char *Txt_Calendar =

View File

@ -509,7 +509,7 @@ static void Tml_Com_PutIconToToggleComms (const char *UniqueId,
char *OnClick;
/***** Build onclick text *****/
if (asprintf (&OnClick,"toggleComments('%s')",UniqueId) < 0)
if (asprintf (&OnClick,"toggleComments('%s');return false;",UniqueId) < 0)
Err_NotEnoughMemoryExit ();
/***** Link to toggle on/off some divs *****/

View File

@ -493,35 +493,23 @@ void Tml_Pub_PutLinkToViewNewPubs (void)
void Tml_Pub_PutLinkToViewOldPubs (void)
{
extern const char *The_ClassFormInBoxBold[The_NUM_THEMES];
extern const char *The_ClassFormLinkInBoxBold[The_NUM_THEMES];
extern const char *Txt_See_more;
/***** Animated link to view old publications *****/
/* Begin container */
/***** Begin container *****/
HTM_DIV_Begin ("id=\"view_old_pubs_container\""
" class=\"Tml_WIDTH Tml_SEP VERY_LIGHT_BLUE\"");
/* Begin anchor */
HTM_A_Begin ("href=\"\" class=\"%s\" onclick=\""
"document.getElementById('get_old_timeline').style.display='none';" // Icon to be hidden on click
"document.getElementById('getting_old_timeline').style.display='';" // Icon to be shown on click
"refreshOldTimeline();"
"return false;\"",
The_ClassFormInBoxBold[Gbl.Prefs.Theme]);
/* Icon and text */
HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif","Txt_See_more",
"class=\"ICO20x20\" id=\"get_old_timeline\"");
HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Txt_See_more,
"class=\"ICO20x20\" style=\"display:none;\" id=\"getting_old_timeline\""); // Animated icon hidden
HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif","Txt_See_more",
"class=\"ICO20x20\" style=\"display:none;\" id=\"get_old_timeline\"");
HTM_TxtF ("&nbsp;%s",Txt_See_more);
/***** Put button to refresh *****/
HTM_BUTTON_OnClick_Begin (Txt_See_more,
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
"refreshOldTimeline();"
"return false;");
Ico_PutIconTextLink ("recycle.svg",Ico_BLACK,Txt_See_more);
HTM_BUTTON_End ();
/* End anchor */
HTM_A_End ();
/* End container */
/***** End container *****/
HTM_DIV_End ();
}