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_ListBannersForEdition (void);
|
||||
static void Ban_PutParamBanCodToEdit (void);
|
||||
static void Ban_PutParamBanCod (long BanCod);
|
||||
static void Ban_ShowOrHideBanner (bool Hide);
|
||||
|
||||
|
@ -398,8 +399,6 @@ void Ban_PutIconToViewBanners (void)
|
|||
|
||||
static void Ban_ListBannersForEdition (void)
|
||||
{
|
||||
extern const char *Txt_Show;
|
||||
extern const char *Txt_Hide;
|
||||
unsigned NumBan;
|
||||
struct Banner *Ban;
|
||||
|
||||
|
@ -415,26 +414,20 @@ static void Ban_ListBannersForEdition (void)
|
|||
NumBan++)
|
||||
{
|
||||
Ban = &Gbl.Banners.Lst[NumBan];
|
||||
Gbl.Banners.BanCodToEdit = Ban->BanCod;
|
||||
|
||||
/* Put icon to remove banner */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"BM\">");
|
||||
Frm_StartForm (ActRemBan);
|
||||
Ban_PutParamBanCod (Ban->BanCod);
|
||||
Ico_PutIconRemove ();
|
||||
Frm_EndForm ();
|
||||
Ico_PutContextualIconToRemove (ActRemBan,Ban_PutParamBanCodToEdit);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Put icon to hide/show banner */
|
||||
fprintf (Gbl.F.Out,"<td class=\"BM\">");
|
||||
Frm_StartForm (Ban->Hidden ? ActShoBan :
|
||||
ActHidBan);
|
||||
Ban_PutParamBanCod (Ban->BanCod);
|
||||
Ico_PutIconLink (Ban->Hidden ? "eye-slash.svg" :
|
||||
"eye.svg",
|
||||
Ban->Hidden ? Txt_Show :
|
||||
Txt_Hide);
|
||||
Frm_EndForm ();
|
||||
if (Ban->Hidden)
|
||||
Ico_PutContextualIconToUnhide (ActShoBan,NULL,Ban_PutParamBanCodToEdit);
|
||||
else
|
||||
Ico_PutContextualIconToHide (ActHidBan,NULL,Ban_PutParamBanCodToEdit);
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Banner code */
|
||||
|
@ -448,7 +441,7 @@ static void Ban_ListBannersForEdition (void)
|
|||
/* Banner short name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Frm_StartForm (ActRenBanSho);
|
||||
Ban_PutParamBanCod (Ban->BanCod);
|
||||
Ban_PutParamBanCodToEdit ();
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_SHORT_NAME\""
|
||||
|
@ -460,7 +453,7 @@ static void Ban_ListBannersForEdition (void)
|
|||
/* Banner full name */
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Frm_StartForm (ActRenBanFul);
|
||||
Ban_PutParamBanCod (Ban->BanCod);
|
||||
Ban_PutParamBanCodToEdit ();
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_FULL_NAME\""
|
||||
|
@ -472,7 +465,7 @@ static void Ban_ListBannersForEdition (void)
|
|||
/* Banner image */
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Frm_StartForm (ActChgBanImg);
|
||||
Ban_PutParamBanCod (Ban->BanCod);
|
||||
Ban_PutParamBanCodToEdit ();
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Img\""
|
||||
" size=\"12\" maxlength=\"%u\" value=\"%s\""
|
||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||
|
@ -483,7 +476,7 @@ static void Ban_ListBannersForEdition (void)
|
|||
/* Banner WWW */
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
|
||||
Frm_StartForm (ActChgBanWWW);
|
||||
Ban_PutParamBanCod (Ban->BanCod);
|
||||
Ban_PutParamBanCodToEdit ();
|
||||
fprintf (Gbl.F.Out,"<input type=\"url\" name=\"WWW\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_WWW\""
|
||||
|
@ -502,6 +495,11 @@ static void Ban_ListBannersForEdition (void)
|
|||
/******************* Write parameter with code of banner *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_PutParamBanCodToEdit (void)
|
||||
{
|
||||
Ban_PutParamBanCod (Gbl.Banners.BanCodToEdit);
|
||||
}
|
||||
|
||||
static void Ban_PutParamBanCod (long BanCod)
|
||||
{
|
||||
Par_PutHiddenParamLong ("BanCod",BanCod);
|
||||
|
|
|
@ -448,11 +448,12 @@ En OpenSWAD:
|
|||
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 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.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)
|
||||
|
|
|
@ -326,6 +326,7 @@ void Gbl_InitializeGlobals (void)
|
|||
|
||||
Gbl.Banners.Num = 0;
|
||||
Gbl.Banners.Lst = NULL;
|
||||
Gbl.Banners.BanCodToEdit = -1L;
|
||||
Gbl.Banners.BanCodClicked = 0L;
|
||||
|
||||
Gbl.Links.Num = 0;
|
||||
|
|
|
@ -254,9 +254,10 @@ struct Globals
|
|||
} Mails;
|
||||
struct
|
||||
{
|
||||
unsigned Num; // Number of banners
|
||||
struct Banner *Lst; // List of banners
|
||||
long BanCodClicked;
|
||||
unsigned Num; // Number of banners
|
||||
struct Banner *Lst; // List of banners
|
||||
long BanCodToEdit; // Used as parameter in contextual links
|
||||
long BanCodClicked; // Banned clicked, used to log it
|
||||
} Banners;
|
||||
struct
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue