Version 14.101

This commit is contained in:
Antonio Cañas Vargas 2015-03-24 18:12:06 +01:00
parent ae7481a92b
commit 5572467839
6 changed files with 24 additions and 41 deletions

View File

@ -4299,9 +4299,7 @@ void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle,const char *I
Id);
}
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle,
const char *StaticIconId,
const char *AnimatedIconId)
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle)
{
fprintf (Gbl.F.Out,"<a href=\"\"");
if (Title)
@ -4311,11 +4309,11 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle,
if (LinkStyle[0])
fprintf (Gbl.F.Out," class=\"%s\"",LinkStyle);
fprintf (Gbl.F.Out," onclick=\"javascript:"
"document.getElementById('%s').style.display='none';"
"document.getElementById('%s').style.display='';"
"document.getElementById('update_%d').style.display='none';" // Icon to be hiden on click
"document.getElementById('updating_%d').style.display='';" // Icon to be shown on click
"document.getElementById('%s').submit();return false;\">",
StaticIconId, // Icon to be hiden on click
AnimatedIconId, // Icon to be shown on click
Gbl.NumForm,
Gbl.NumForm,
Gbl.FormId);
}

View File

@ -1342,9 +1342,7 @@ void Act_FormStartId (Act_Action_t NextAction,const char *Id);
void Act_FormEnd (void);
void Act_LinkFormSubmit (const char *Title,const char *LinkStyle);
void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle,const char *Id);
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle,
const char *StaticIconId,
const char *AnimatedIconId);
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle);
void Act_AdjustActionWhenNoUsrLogged (void);
void Act_AdjustCurrentAction (void);
Act_Action_t Act_GetFirstActionAvailableInCurrentTab (void);

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.101 (2015/03/24)"
#define Log_PLATFORM_VERSION "SWAD 14.101.1 (2015/03/24)"
// 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 14.101.1: Mar 24, 2015 Changes in some update buttons. (? lines)
Version 14.101: Mar 24, 2015 Fixed bug in form to create a new account.
Fixed bug in statistics.
New design of buttons. (183753 lines)

View File

@ -984,17 +984,15 @@ void Lay_PutSendIcon (const char *Icon,const char *Alt,const char *Text)
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Lay_PutCalculateIcon (const char *Alt,const char *Text,
const char *StaticIconId,
const char *AnimatedIconId)
void Lay_PutCalculateIcon (const char *Alt,const char *Text)
{
fprintf (Gbl.F.Out,"<img id=\"%s\" src=\"%s/recycle16x16.gif\" alt=\"%s\""
fprintf (Gbl.F.Out,"<img id=\"update_%d\" src=\"%s/recycle16x16.gif\" alt=\"%s\""
" class=\"ICON16x16\" />"
"<img id=\"%s\" src=\"%s/working16x16.gif\" alt=\"%s\""
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\" alt=\"%s\""
" class=\"ICON16x16\" style=\"display:none;\" />" // Animated icon hidden
"&nbsp;%s</a>",
StaticIconId,Gbl.Prefs.IconsURL,Alt,
AnimatedIconId,Gbl.Prefs.IconsURL,Alt,
Gbl.NumForm,Gbl.Prefs.IconsURL,Alt,
Gbl.NumForm,Gbl.Prefs.IconsURL,Alt,
Text);
}

View File

@ -89,9 +89,7 @@ void Lay_WriteTitle (const char *Title);
void Lay_PutFormToView (Act_Action_t Action);
void Lay_PutFormToEdit (Act_Action_t Action);
void Lay_PutSendIcon (const char *Icon,const char *Alt,const char *Text);
void Lay_PutCalculateIcon (const char *Alt,const char *Text,
const char *StaticIconId,
const char *AnimatedIconId);
void Lay_PutCalculateIcon (const char *Alt,const char *Text);
void Lay_PutCreateButton (const char *Text);
void Lay_PutCreateButtonInline (const char *Text);

View File

@ -438,10 +438,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
/***** Button to fetch and store first click time *****/
Act_FormStart (ActCal1stClkTim);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme],
"calculate1","calculating1");
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate,
"calculate1","calculating1");
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>"
@ -478,10 +476,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
/***** Button to fetch and store number of clicks *****/
Act_FormStart (ActCalNumClk);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme],
"calculate2","calculating2");
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate,
"calculate2","calculating2");
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>"
@ -517,10 +513,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
/***** Button to fetch and store number of file views *****/
Act_FormStart (ActCalNumFilVie);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme],
"calculate3","calculating3");
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate,
"calculate3","calculating3");
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>"
@ -556,10 +550,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
/***** Button to fetch and store number of forum posts *****/
Act_FormStart (ActCalNumForPst);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme],
"calculate4","calculating4");
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate,
"calculate4","calculating4");
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>"
@ -595,10 +587,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
/***** Button to fetch and store number of messages sent *****/
Act_FormStart (ActCalNumMsgSnt);
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme],
"calculate5","calculating5");
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate,
"calculate5","calculating5");
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>"