Version 23.50.1: Nov 28, 2023 Responsive design in announcements and notices.

This commit is contained in:
acanas 2023-11-28 09:24:29 +01:00
parent 33cd1e8bfe
commit ae559a39c2
6 changed files with 66 additions and 72 deletions

View File

@ -1925,7 +1925,7 @@ a:hover img.CENTER_PHOTO_SHOW
/********************************** Notice ***********************************/
.NOTICE_CONT
{
padding:10px 0;
padding:4px;
}
.NOTICE_HIGHLIGHT {animation:fadeinnotice 2s linear forwards;}
@keyframes fadeinnotice

View File

@ -103,8 +103,6 @@ static void HTM_TEXTAREA_BeginWithoutAttr (void);
static void HTM_SELECT_BeginWithoutAttr (void);
static void HTM_SPTxt (const char *Txt);
/*****************************************************************************/
/******************************* Begin/end title *****************************/
/*****************************************************************************/
@ -1922,7 +1920,7 @@ void HTM_TxtF (const char *fmt,...)
}
}
static void HTM_SPTxt (const char *Txt)
void HTM_SPTxt (const char *Txt)
{
HTM_Txt (" ");
HTM_Txt (Txt);

View File

@ -222,6 +222,7 @@ void HTM_U_End (void);
void HTM_BR (void);
void HTM_TxtF (const char *fmt,...);
void HTM_SPTxt (const char *Txt);
void HTM_Txt (const char *Txt);
void HTM_TxtColon (const char *Txt);
void HTM_TxtSemicolon (const char *Txt);

View File

@ -107,7 +107,7 @@ void Ann_ShowAllAnnouncements (void)
NumAnnouncements = Ann_DB_GetAnnouncementsForUnknownUsers (&mysql_res);
/***** Begin box *****/
Box_BoxBegin ("550px",Txt_Announcements,
Box_BoxBegin (NULL,Txt_Announcements,
ICanEdit ? Ann_PutIconToAddNewAnnouncement :
NULL,NULL,
Hlp_COMMUNICATION_Announcements,Box_NOT_CLOSABLE);
@ -243,6 +243,7 @@ static void Ann_DrawAnAnnouncement (struct Ann_Announcement *Announcement,
bool SomeRolesAreSelected;
/***** Begin yellow note *****/
HTM_DIV_Begin ("class=\"NOTICE_CONT\"");
HTM_DIV_Begin ("class=\"%s\"",ContainerClass[Announcement->Status]);
if (ICanEdit == Ann_I_CAN_EDIT)
@ -294,7 +295,7 @@ static void Ann_DrawAnAnnouncement (struct Ann_Announcement *Announcement,
if (SomeRolesAreSelected)
HTM_Comma ();
SomeRolesAreSelected = true;
HTM_TxtF (" %s",Txt_ROLES_PLURAL_abc[Role][Usr_SEX_UNKNOWN]);
HTM_SPTxt (Txt_ROLES_PLURAL_abc[Role][Usr_SEX_UNKNOWN]);
}
break;
}
@ -304,6 +305,7 @@ static void Ann_DrawAnAnnouncement (struct Ann_Announcement *Announcement,
/***** End yellow note *****/
HTM_DIV_End ();
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -633,10 +633,11 @@ Me sale este error, no s
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
*/
#define Log_PLATFORM_VERSION "SWAD 23.50 (2023-11-28)"
#define CSS_FILE "swad23.48.2.css"
#define Log_PLATFORM_VERSION "SWAD 23.50.1 (2023-11-28)"
#define CSS_FILE "swad23.50.1.css"
#define JS_FILE "swad23.47.3.js"
/*
Version 23.50.1: Nov 28, 2023 Responsive design in announcements and notices. (335630 lines)
Version 23.50: Nov 28, 2023 Code refactoring in hierarchy. (335634 lines)
Version 23.49: Nov 27, 2023 Code refactoring in highlighting. (335774 lines)
Version 23.48.3: Nov 27, 2023 Code refactoring in notices. (335746 lines)

View File

@ -66,12 +66,6 @@ extern struct Globals Gbl;
#define Not_MAX_CHARS_ON_NOTICE 40 // Maximum number of characters in notices (when not expanded)
static const unsigned Not_ContainerWidth[Not_NUM_TYPES_LISTING] =
{
[Not_LIST_BRIEF_NOTICES] = 148 + 50,
[Not_LIST_FULL_NOTICES ] = 500 + 50,
};
static const unsigned Not_MaxCharsURLOnScreen[Not_NUM_TYPES_LISTING] =
{
[Not_LIST_BRIEF_NOTICES] = 15,
@ -317,7 +311,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
extern const char *Txt_Notices;
extern const char *Txt_No_notices;
MYSQL_RES *mysql_res;
char StrWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1];
// char StrWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1];
struct Not_Notice Notice;
unsigned NumNot;
unsigned NumNotices = 0; // Initialized to avoid warning
@ -338,9 +332,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
NumNotices = Not_DB_GetAllNotices (&mysql_res);
/***** Begin box *****/
snprintf (StrWidth,sizeof (StrWidth),"%upx",
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
Box_BoxBegin (StrWidth,Txt_Notices,
Box_BoxBegin (NULL,Txt_Notices,
Not_PutIconsListNotices,NULL,
Hlp_COMMUNICATION_Notices,Box_NOT_CLOSABLE);
if (!NumNotices)