mirror of https://github.com/acanas/swad-core.git
Version 16.68.1
This commit is contained in:
parent
78d25d8ad1
commit
69e56ca606
|
@ -172,13 +172,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.68 (2016-11-22)"
|
#define Log_PLATFORM_VERSION "SWAD 16.68.1 (2016-11-22)"
|
||||||
#define CSS_FILE "swad16.68.css"
|
#define CSS_FILE "swad16.68.css"
|
||||||
#define JS_FILE "swad16.46.1.js"
|
#define JS_FILE "swad16.46.1.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.68.1: Nov 22, 2016 Code refactoringrelated to notifications and contextual checkbox. (207438 lines)
|
||||||
Version 16.68: Nov 22, 2016 Change in text related to notifications.
|
Version 16.68: Nov 22, 2016 Change in text related to notifications.
|
||||||
Changes in contextual links in notifications. (207406 lines)
|
Changes in contextual links in notifications. (207406 lines)
|
||||||
Version 16.67.3: Nov 22, 2016 Contextual help on notifications. (207355 lines)
|
Version 16.67.3: Nov 22, 2016 Contextual help on notifications. (207355 lines)
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ static void Lay_ShowRightColumn (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Show an icon with a link in contextual menu ***************/
|
/**************** Show an icon with a link in contextual menu ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Lay_PutContextualLink (Act_Action_t NextAction,
|
void Lay_PutContextualLink (Act_Action_t NextAction,
|
||||||
|
@ -1013,19 +1013,75 @@ void Lay_PutContextualLink (Act_Action_t NextAction,
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
||||||
|
|
||||||
|
/***** Separator *****/
|
||||||
if (Text)
|
if (Text)
|
||||||
fprintf (Gbl.F.Out," "); // This space is necessary to enable
|
fprintf (Gbl.F.Out," "); // This space is necessary to enable
|
||||||
// jumping to the next line on narrow screens
|
// jumping to the next line on narrow screens
|
||||||
|
|
||||||
|
/***** Start form *****/
|
||||||
Act_FormStart (NextAction);
|
Act_FormStart (NextAction);
|
||||||
if (FuncParams)
|
if (FuncParams)
|
||||||
FuncParams ();
|
FuncParams ();
|
||||||
|
|
||||||
|
/***** Put icon with link *****/
|
||||||
Lay_PutIconLink (Icon,Title,Text,
|
Lay_PutIconLink (Icon,Title,Text,
|
||||||
Text ? The_ClassFormBold[Gbl.Prefs.Theme] :
|
Text ? The_ClassFormBold[Gbl.Prefs.Theme] :
|
||||||
NULL,
|
NULL,
|
||||||
OnSubmit);
|
OnSubmit);
|
||||||
|
|
||||||
|
/***** End form *****/
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
|
||||||
|
/***** Separator *****/
|
||||||
|
if (Text)
|
||||||
|
fprintf (Gbl.F.Out," "); // This space is necessary to enable
|
||||||
|
// jumping to the next line on narrow screens
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Show a checkbox in contextual menu *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||||
|
const char *CheckboxName,bool Checked,
|
||||||
|
const char *Title,const char *Text)
|
||||||
|
{
|
||||||
|
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
||||||
|
|
||||||
|
/***** Separator *****/
|
||||||
|
if (Text)
|
||||||
|
fprintf (Gbl.F.Out," "); // This space is necessary to enable
|
||||||
|
// jumping to the next line on narrow screens
|
||||||
|
|
||||||
|
/***** Start form *****/
|
||||||
|
Act_FormStart (NextAction);
|
||||||
|
|
||||||
|
/***** Start container *****/
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT %s %s\" title=\"%s\">",
|
||||||
|
Checked ? "CHECKBOX_CHECKED" :
|
||||||
|
"CHECKBOX_UNCHECKED",
|
||||||
|
The_ClassFormBold[Gbl.Prefs.Theme],
|
||||||
|
Title);
|
||||||
|
|
||||||
|
/****** Checkbox and text *****/
|
||||||
|
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"%s\" value=\"Y\"",
|
||||||
|
CheckboxName);
|
||||||
|
if (Checked)
|
||||||
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
|
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
|
||||||
|
Gbl.Form.Id);
|
||||||
|
if (Text)
|
||||||
|
if (Text[0])
|
||||||
|
fprintf (Gbl.F.Out," %s",
|
||||||
|
Text);
|
||||||
|
|
||||||
|
/***** End container *****/
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
/***** End form *****/
|
||||||
|
Act_FormEnd ();
|
||||||
|
|
||||||
|
/***** Separator *****/
|
||||||
if (Text)
|
if (Text)
|
||||||
fprintf (Gbl.F.Out," "); // This space is necessary to enable
|
fprintf (Gbl.F.Out," "); // This space is necessary to enable
|
||||||
// jumping to the next line on narrow screens
|
// jumping to the next line on narrow screens
|
||||||
|
|
|
@ -76,6 +76,9 @@ void Lay_PutContextualLink (Act_Action_t NextAction,
|
||||||
const char *Icon,
|
const char *Icon,
|
||||||
const char *Title,const char *Text,
|
const char *Title,const char *Text,
|
||||||
const char *OnSubmit);
|
const char *OnSubmit);
|
||||||
|
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||||
|
const char *CheckboxName,bool Checked,
|
||||||
|
const char *Title,const char *Text);
|
||||||
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
|
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
|
||||||
const char *LinkStyle,const char *OnSubmit);
|
const char *LinkStyle,const char *OnSubmit);
|
||||||
void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
|
void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
|
||||||
|
|
|
@ -656,33 +656,12 @@ static void Ntf_PutIconsNotif (void)
|
||||||
|
|
||||||
static void Ntf_WriteFormAllNotifications (bool AllNotifications)
|
static void Ntf_WriteFormAllNotifications (bool AllNotifications)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
|
||||||
extern const char *Txt_Show_all_notifications;
|
extern const char *Txt_Show_all_notifications;
|
||||||
extern const char *Txt_Show_all_NOTIFICATIONS;
|
extern const char *Txt_Show_all_NOTIFICATIONS;
|
||||||
|
|
||||||
/***** Start form *****/
|
Lay_PutContextualCheckbox (ActSeeNtf,"All",AllNotifications,
|
||||||
Act_FormStart (ActSeeNtf);
|
Txt_Show_all_notifications,
|
||||||
|
Txt_Show_all_NOTIFICATIONS);
|
||||||
/***** Start container *****/
|
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT %s %s\" title=\"%s\">",
|
|
||||||
AllNotifications ? "CHECKBOX_CHECKED" :
|
|
||||||
"CHECKBOX_UNCHECKED",
|
|
||||||
The_ClassFormBold[Gbl.Prefs.Theme],
|
|
||||||
Txt_Show_all_notifications);
|
|
||||||
|
|
||||||
/****** Checkbox and text *****/
|
|
||||||
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"All\" value=\"Y\"");
|
|
||||||
if (AllNotifications)
|
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
|
||||||
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
|
|
||||||
" %s",
|
|
||||||
Gbl.Form.Id,Txt_Show_all_NOTIFICATIONS);
|
|
||||||
|
|
||||||
/***** End container *****/
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Act_FormEnd ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue