Version 15.84.4

This commit is contained in:
Antonio Cañas Vargas 2015-12-30 18:43:58 +01:00
parent 20e795fa21
commit 89d2be20d5
3 changed files with 26 additions and 39 deletions

View File

@ -4423,7 +4423,7 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle)
} }
/*****************************************************************************/ /*****************************************************************************/
/***************** Adjust current action when no user's logged ***************/ /******** Put contextual link with animated icon to update an action *********/
/*****************************************************************************/ /*****************************************************************************/
void Act_PutLinkToUpdateAction (Act_Action_t Action) void Act_PutLinkToUpdateAction (Act_Action_t Action)

View File

@ -116,13 +116,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.84.3 (2015-12-30)" #define Log_PLATFORM_VERSION "SWAD 15.84.4 (2015-12-30)"
#define CSS_FILE "swad15.84.2.css" #define CSS_FILE "swad15.84.2.css"
#define JS_FILE "swad15.77.7.js" #define JS_FILE "swad15.77.7.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 15.84.4: Dec 30, 2015 Code refactoring in profile. (189429 lines)
Version 15.84.3: Dec 30, 2015 Form to update timeline. (189444 lines) Version 15.84.3: Dec 30, 2015 Form to update timeline. (189444 lines)
Version 15.84.2: Dec 30, 2015 Help about editor in new social post. (189422 lines) Version 15.84.2: Dec 30, 2015 Help about editor in new social post. (189422 lines)
Version 15.84.1: Dec 30, 2015 Request confirmation before removing a social post. (189419 lines) Version 15.84.1: Dec 30, 2015 Request confirmation before removing a social post. (189419 lines)

View File

@ -81,6 +81,7 @@ static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickna
static void Prf_GetUsrDatAndShowUserProfile (void); static void Prf_GetUsrDatAndShowUserProfile (void);
static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat); static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *EncryptedUsrCod);
static void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures); static void Prf_GetUsrFigures (long UsrCod,struct UsrFigures *UsrFigures);
@ -299,7 +300,6 @@ void Prf_ChangeProfileVisibility (void)
static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
{ {
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_teachers_ABBREVIATION; extern const char *Txt_teachers_ABBREVIATION;
extern const char *Txt_students_ABBREVIATION; extern const char *Txt_students_ABBREVIATION;
@ -311,7 +311,6 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
extern const char *Txt_From_TIME; extern const char *Txt_From_TIME;
extern const char *Txt_day; extern const char *Txt_day;
extern const char *Txt_days; extern const char *Txt_days;
extern const char *Txt_Calculate;
extern const char *Txt_Clicks; extern const char *Txt_Clicks;
extern const char *Txt_clicks; extern const char *Txt_clicks;
extern const char *Txt_Downloads; extern const char *Txt_Downloads;
@ -406,14 +405,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
(long) UsrFigures.FirstClickTimeUTC); (long) UsrFigures.FirstClickTimeUTC);
} }
else // First click time is unknown or user never logged else // First click time is unknown or user never logged
{
/***** Button to fetch and store first click time *****/ /***** Button to fetch and store first click time *****/
Act_FormStart (ActCal1stClkTim); Prf_PutLinkToUpdateAction (ActCal1stClkTim,UsrDat->EncryptedUsrCod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
/***** End of right list *****/ /***** End of right list *****/
@ -451,14 +444,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
} }
} }
else // Number of clicks is unknown else // Number of clicks is unknown
{
/***** Button to fetch and store number of clicks *****/ /***** Button to fetch and store number of clicks *****/
Act_FormStart (ActCalNumClk); Prf_PutLinkToUpdateAction (ActCalNumClk,UsrDat->EncryptedUsrCod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
/***** Number of file views *****/ /***** Number of file views *****/
@ -483,14 +470,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
} }
} }
else // Number of file views is unknown else // Number of file views is unknown
{
/***** Button to fetch and store number of file views *****/ /***** Button to fetch and store number of file views *****/
Act_FormStart (ActCalNumFilVie); Prf_PutLinkToUpdateAction (ActCalNumFilVie,UsrDat->EncryptedUsrCod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
/***** Number of posts in forums *****/ /***** Number of posts in forums *****/
@ -515,14 +496,9 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
} }
} }
else // Number of forum posts is unknown else // Number of forum posts is unknown
{
/***** Button to fetch and store number of forum posts *****/ /***** Button to fetch and store number of forum posts *****/
Act_FormStart (ActCalNumForPst); Prf_PutLinkToUpdateAction (ActCalNumForPst,UsrDat->EncryptedUsrCod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
/***** Number of messages sent *****/ /***** Number of messages sent *****/
@ -547,14 +523,8 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
} }
} }
else // Number of clicks is unknown else // Number of clicks is unknown
{
/***** Button to fetch and store number of messages sent *****/ /***** Button to fetch and store number of messages sent *****/
Act_FormStart (ActCalNumMsgSnt); Prf_PutLinkToUpdateAction (ActCalNumMsgSnt,UsrDat->EncryptedUsrCod);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
} }
@ -563,6 +533,22 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
"</div>"); "</div>");
} }
/*****************************************************************************/
/******** Put contextual link with animated icon to update an action *********/
/*****************************************************************************/
static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *EncryptedUsrCod)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Calculate;
Act_FormStart (Action);
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme]);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}
/*****************************************************************************/ /*****************************************************************************/
/********************** Select values on user's figures **********************/ /********************** Select values on user's figures **********************/
/*****************************************************************************/ /*****************************************************************************/