mirror of https://github.com/acanas/swad-core.git
Version18.116.1
This commit is contained in:
parent
af9a391f65
commit
640040b622
|
@ -73,6 +73,7 @@ static void Ban_GetListBanners (MYSQL_RES **mysql_res,unsigned long NumRows);
|
||||||
static void Ban_PutIconsEditingBanners (void);
|
static void Ban_PutIconsEditingBanners (void);
|
||||||
|
|
||||||
static void Ban_ListBannersForEdition (void);
|
static void Ban_ListBannersForEdition (void);
|
||||||
|
static void Ban_PutParamBanCodToEdit (void);
|
||||||
static void Ban_PutParamBanCod (long BanCod);
|
static void Ban_PutParamBanCod (long BanCod);
|
||||||
static void Ban_ShowOrHideBanner (bool Hide);
|
static void Ban_ShowOrHideBanner (bool Hide);
|
||||||
|
|
||||||
|
@ -398,8 +399,6 @@ void Ban_PutIconToViewBanners (void)
|
||||||
|
|
||||||
static void Ban_ListBannersForEdition (void)
|
static void Ban_ListBannersForEdition (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Show;
|
|
||||||
extern const char *Txt_Hide;
|
|
||||||
unsigned NumBan;
|
unsigned NumBan;
|
||||||
struct Banner *Ban;
|
struct Banner *Ban;
|
||||||
|
|
||||||
|
@ -415,26 +414,20 @@ static void Ban_ListBannersForEdition (void)
|
||||||
NumBan++)
|
NumBan++)
|
||||||
{
|
{
|
||||||
Ban = &Gbl.Banners.Lst[NumBan];
|
Ban = &Gbl.Banners.Lst[NumBan];
|
||||||
|
Gbl.Banners.BanCodToEdit = Ban->BanCod;
|
||||||
|
|
||||||
/* Put icon to remove banner */
|
/* Put icon to remove banner */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"BM\">");
|
"<td class=\"BM\">");
|
||||||
Frm_StartForm (ActRemBan);
|
Ico_PutContextualIconToRemove (ActRemBan,Ban_PutParamBanCodToEdit);
|
||||||
Ban_PutParamBanCod (Ban->BanCod);
|
|
||||||
Ico_PutIconRemove ();
|
|
||||||
Frm_EndForm ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Put icon to hide/show banner */
|
/* Put icon to hide/show banner */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||||
Frm_StartForm (Ban->Hidden ? ActShoBan :
|
if (Ban->Hidden)
|
||||||
ActHidBan);
|
Ico_PutContextualIconToUnhide (ActShoBan,NULL,Ban_PutParamBanCodToEdit);
|
||||||
Ban_PutParamBanCod (Ban->BanCod);
|
else
|
||||||
Ico_PutIconLink (Ban->Hidden ? "eye-slash.svg" :
|
Ico_PutContextualIconToHide (ActHidBan,NULL,Ban_PutParamBanCodToEdit);
|
||||||
"eye.svg",
|
|
||||||
Ban->Hidden ? Txt_Show :
|
|
||||||
Txt_Hide);
|
|
||||||
Frm_EndForm ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Banner code */
|
/* Banner code */
|
||||||
|
@ -448,7 +441,7 @@ static void Ban_ListBannersForEdition (void)
|
||||||
/* Banner short name */
|
/* Banner short name */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||||
Frm_StartForm (ActRenBanSho);
|
Frm_StartForm (ActRenBanSho);
|
||||||
Ban_PutParamBanCod (Ban->BanCod);
|
Ban_PutParamBanCodToEdit ();
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" maxlength=\"%u\" value=\"%s\""
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
|
@ -460,7 +453,7 @@ static void Ban_ListBannersForEdition (void)
|
||||||
/* Banner full name */
|
/* Banner full name */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||||
Frm_StartForm (ActRenBanFul);
|
Frm_StartForm (ActRenBanFul);
|
||||||
Ban_PutParamBanCod (Ban->BanCod);
|
Ban_PutParamBanCodToEdit ();
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" maxlength=\"%u\" value=\"%s\""
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
|
@ -472,7 +465,7 @@ static void Ban_ListBannersForEdition (void)
|
||||||
/* Banner image */
|
/* Banner image */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||||
Frm_StartForm (ActChgBanImg);
|
Frm_StartForm (ActChgBanImg);
|
||||||
Ban_PutParamBanCod (Ban->BanCod);
|
Ban_PutParamBanCodToEdit ();
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Img\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Img\""
|
||||||
" size=\"12\" maxlength=\"%u\" value=\"%s\""
|
" size=\"12\" maxlength=\"%u\" value=\"%s\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||||
|
@ -483,7 +476,7 @@ static void Ban_ListBannersForEdition (void)
|
||||||
/* Banner WWW */
|
/* Banner WWW */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||||
Frm_StartForm (ActChgBanWWW);
|
Frm_StartForm (ActChgBanWWW);
|
||||||
Ban_PutParamBanCod (Ban->BanCod);
|
Ban_PutParamBanCodToEdit ();
|
||||||
fprintf (Gbl.F.Out,"<input type=\"url\" name=\"WWW\""
|
fprintf (Gbl.F.Out,"<input type=\"url\" name=\"WWW\""
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" maxlength=\"%u\" value=\"%s\""
|
||||||
" class=\"INPUT_WWW\""
|
" class=\"INPUT_WWW\""
|
||||||
|
@ -502,6 +495,11 @@ static void Ban_ListBannersForEdition (void)
|
||||||
/******************* Write parameter with code of banner *********************/
|
/******************* Write parameter with code of banner *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Ban_PutParamBanCodToEdit (void)
|
||||||
|
{
|
||||||
|
Ban_PutParamBanCod (Gbl.Banners.BanCodToEdit);
|
||||||
|
}
|
||||||
|
|
||||||
static void Ban_PutParamBanCod (long BanCod)
|
static void Ban_PutParamBanCod (long BanCod)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamLong ("BanCod",BanCod);
|
Par_PutHiddenParamLong ("BanCod",BanCod);
|
||||||
|
|
|
@ -448,11 +448,12 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.116 (2019-04-19)"
|
#define Log_PLATFORM_VERSION "SWAD 18.116.1 (2019-04-20)"
|
||||||
#define CSS_FILE "swad18.112.1.css"
|
#define CSS_FILE "swad18.112.1.css"
|
||||||
#define JS_FILE "swad18.114.js"
|
#define JS_FILE "swad18.114.js"
|
||||||
/*
|
/*
|
||||||
Version 18.116: Apr 18, 2019 Code refactoring related to actions and AJAX. (243246 lines)
|
Version 18.116.1: Apr 20, 2019 Code refactoring in edition of banners. (243246 lines)
|
||||||
|
Version 18.116: Apr 19, 2019 Code refactoring related to actions and AJAX. (243246 lines)
|
||||||
Version 18.115: Apr 18, 2019 Contextual buttons to lock/unlock edition of all projects, suggested by Pedro Villar Castro. (243275 lines)
|
Version 18.115: Apr 18, 2019 Contextual buttons to lock/unlock edition of all projects, suggested by Pedro Villar Castro. (243275 lines)
|
||||||
Version 18.114.3: Apr 18, 2019 Locked edition of a project. (243025 lines)
|
Version 18.114.3: Apr 18, 2019 Locked edition of a project. (243025 lines)
|
||||||
Version 18.114.2: Apr 18, 2019 Icons to inform about locked/unlocked project edition. (243023 lines)
|
Version 18.114.2: Apr 18, 2019 Icons to inform about locked/unlocked project edition. (243023 lines)
|
||||||
|
|
|
@ -326,6 +326,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
|
|
||||||
Gbl.Banners.Num = 0;
|
Gbl.Banners.Num = 0;
|
||||||
Gbl.Banners.Lst = NULL;
|
Gbl.Banners.Lst = NULL;
|
||||||
|
Gbl.Banners.BanCodToEdit = -1L;
|
||||||
Gbl.Banners.BanCodClicked = 0L;
|
Gbl.Banners.BanCodClicked = 0L;
|
||||||
|
|
||||||
Gbl.Links.Num = 0;
|
Gbl.Links.Num = 0;
|
||||||
|
|
|
@ -254,9 +254,10 @@ struct Globals
|
||||||
} Mails;
|
} Mails;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned Num; // Number of banners
|
unsigned Num; // Number of banners
|
||||||
struct Banner *Lst; // List of banners
|
struct Banner *Lst; // List of banners
|
||||||
long BanCodClicked;
|
long BanCodToEdit; // Used as parameter in contextual links
|
||||||
|
long BanCodClicked; // Banned clicked, used to log it
|
||||||
} Banners;
|
} Banners;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue