Version 16.68.2

This commit is contained in:
Antonio Cañas Vargas 2016-11-22 12:07:29 +01:00
parent 69e56ca606
commit cbcdc472be
5 changed files with 22 additions and 22 deletions

View File

@ -172,14 +172,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.68.1 (2016-11-22)"
#define Log_PLATFORM_VERSION "SWAD 16.68.2 (2016-11-22)"
#define CSS_FILE "swad16.68.css"
#define JS_FILE "swad16.46.1.js"
// 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 16.68.1: Nov 22, 2016 Code refactoringrelated to notifications and contextual checkbox. (207438 lines)
Version 16.68.2: Nov 22, 2016 Code refactoring related to file browser and contextual checkbox. (207438 lines)
Version 16.68.1: Nov 22, 2016 Code refactoring related to notifications and contextual checkbox. (207438 lines)
Version 16.68: Nov 22, 2016 Change in text related to notifications.
Changes in contextual links in notifications. (207406 lines)
Version 16.67.3: Nov 22, 2016 Contextual help on notifications. (207355 lines)

View File

@ -1470,6 +1470,7 @@ static void Brw_StoreSizeOfFileTreeInDB (void);
static void Brw_PutParamsContextualLink (void);
static void Brw_WriteFormFullTree (void);
static void Brw_PutParamsFullTree (void);
static bool Brw_GetFullTreeFromForm (void);
static void Brw_GetAndUpdateDateLastAccFileBrowser (void);
static long Brw_GetGrpLastAccZone (const char *FieldNameDB);
@ -4668,13 +4669,18 @@ static void Brw_PutParamsContextualLink (void)
static void Brw_WriteFormFullTree (void)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Show_all_files;
/***** Start form depending on type of tree *****/
fprintf (Gbl.F.Out,"<div class=\"%s CENTER_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme]);
Act_FormStart (Brw_ActSeeAdm[Gbl.FileBrowser.Type]);
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualCheckbox (Brw_ActSeeAdm[Gbl.FileBrowser.Type],
Brw_PutParamsFullTree,
"FullTree",Gbl.FileBrowser.FullTree,
Txt_Show_all_files,Txt_Show_all_files);
fprintf (Gbl.F.Out,"</div>");
}
static void Brw_PutParamsFullTree (void)
{
switch (Gbl.FileBrowser.Type)
{
case Brw_SHOW_DOCUM_INS:
@ -4709,17 +4715,6 @@ static void Brw_WriteFormFullTree (void)
default:
break;
}
/***** End form *****/
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"FullTree\" value=\"Y\"");
if (Gbl.FileBrowser.FullTree)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
" %s",
Gbl.Form.Id,
Txt_Show_all_files);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/

View File

@ -1043,6 +1043,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction,
/*****************************************************************************/
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
void (*FuncParams) (),
const char *CheckboxName,bool Checked,
const char *Title,const char *Text)
{
@ -1055,6 +1056,8 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
/***** Start form *****/
Act_FormStart (NextAction);
if (FuncParams)
FuncParams ();
/***** Start container *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT %s %s\" title=\"%s\">",

View File

@ -77,6 +77,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction,
const char *Title,const char *Text,
const char *OnSubmit);
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
void (*FuncParams) (),
const char *CheckboxName,bool Checked,
const char *Title,const char *Text);
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,

View File

@ -344,11 +344,10 @@ void Ntf_ShowMyNotifications (void)
Gbl.Usrs.Me.UsrDat.UsrCod,SubQuery);
NumNotifications = DB_QuerySELECT (Query,&mysql_res,"can not get your notifications");
/***** Links to mark all notifications as read
and to change preferences *****/
/***** Contextual links *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
/***** Write form to show all notifications *****/
/* Write form to show all notifications */
Ntf_WriteFormAllNotifications (AllNotifications);
if (NumNotifications)
@ -659,7 +658,8 @@ static void Ntf_WriteFormAllNotifications (bool AllNotifications)
extern const char *Txt_Show_all_notifications;
extern const char *Txt_Show_all_NOTIFICATIONS;
Lay_PutContextualCheckbox (ActSeeNtf,"All",AllNotifications,
Lay_PutContextualCheckbox (ActSeeNtf,NULL,
"All",AllNotifications,
Txt_Show_all_notifications,
Txt_Show_all_NOTIFICATIONS);
}