Version 15.121.5

This commit is contained in:
Antonio Cañas Vargas 2016-01-20 14:07:15 +01:00
parent f88fc03a60
commit 1b6f41c46c
6 changed files with 55 additions and 34 deletions

View File

@ -1485,7 +1485,7 @@ a:hover img.CENTRE_PHOTO_SHOW
margin:10px;
text-align:center;
color:#808080;
font-size:9pt;
font-size:8pt;
}
/*********************************** Lists ***********************************/
@ -1773,7 +1773,7 @@ a:hover img.CENTRE_PHOTO_SHOW
{
padding-bottom:10px;
}
.SOCIAL_TEXTAREA
.SOCIAL_TEXTAREA_POST
{
box-sizing:border-box;
width:480px;
@ -1839,27 +1839,16 @@ a:hover img.CENTRE_PHOTO_SHOW
padding-left:4px;
vertical-align:bottom;
}
.SOCIAL_COMMENTS
{
}
.SOCIAL_COMMENT
{
border-top:1px solid silver;
}
.SOCIAL_FORM_COMMENT
{
display:inline-block;
margin-left:56px;
padding-bottom:10px;
width:480px;
text-align:center;
}
.SOCIAL_COMMENT_PHOTO
{
display:inline-block;
box-sizing:border-box;
width:40px;
height:60px;
height:54px;
padding:10px 0;
text-align:left;
vertical-align:top;
@ -1879,6 +1868,22 @@ a:hover img.CENTRE_PHOTO_SHOW
text-align:left;
vertical-align:top;
}
.SOCIAL_FORM_NEW_COMMENT
{
display:inline-block;
margin-left:56px;
border-top:1px solid silver;
padding-bottom:10px;
width:480px;
text-align:center;
}
.SOCIAL_TEXTAREA_COMMENT
{
box-sizing:border-box;
width:440px;
margin:0;
resize:none;
}
/*********************************** Messages ********************************/
.MSG_TO_ONE_RCP

View File

@ -119,21 +119,20 @@
// TODO: Increment one second after each refresh in social timeline?
// TODO: Notifications of new followers should go to follower's profile
// TODO: Textarea in comments smaller and with my photo at left
// TODO: Fav comments (remove favs when comment is removed)
// TODO: Fix bugs on comment favourites
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.121.4 (2016-01-20)"
#define CSS_FILE "swad15.121.3.css"
#define Log_PLATFORM_VERSION "SWAD 15.121.5 (2016-01-20)"
#define CSS_FILE "swad15.121.5.css"
#define JS_FILE "swad15.118.4.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 15.121.5: Jan 20, 2016 New layout of form to write a new social comment. (193922 lines)
Version 15.121.4: Jan 20, 2016 Fixed bug related to favs in social comments. (193904 lines)
Version 15.121.3: Jan 20, 2016 Favs in social comments. Not finished.
Changes in layout of social timeline. (193901 lines)

View File

@ -975,9 +975,9 @@ static const Act_Action_t Brw_ActRecDatFile[Brw_NUM_TYPES_FILE_BROWSER] =
#define Brw_MAX_FILES_ASSIG_PER_STD 500
#define Brw_MAX_FOLDS_ASSIG_PER_STD 50
#define Brw_MAX_QUOTA_WORKS_PER_STD ( 2ULL*Brw_GiB)
#define Brw_MAX_FILES_WORKS_PER_STD 500
#define Brw_MAX_FOLDS_WORKS_PER_STD 50
#define Brw_MAX_QUOTA_WORKS_PER_STD ( 2ULL*Brw_GiB)
#define Brw_MAX_FILES_WORKS_PER_STD 500
#define Brw_MAX_FOLDS_WORKS_PER_STD 50
#define Brw_MAX_QUOTA_MARKS_CRS ( 1ULL*Brw_GiB)
#define Brw_MAX_FILES_MARKS_CRS 500
@ -999,8 +999,8 @@ const unsigned long long Brw_MAX_QUOTA_BRIEF[Rol_NUM_ROLES] = // MaxRole is used
0, // Rol_ROLE_INS_ADM
0, // Rol_ROLE_SYS_ADM
};
#define Brw_MAX_FILES_BRIEF 5000
#define Brw_MAX_FOLDS_BRIEF 1000
#define Brw_MAX_FILES_BRIEF 5000
#define Brw_MAX_FOLDS_BRIEF 1000
/* Extensions allowed for uploaded files */
const char *Brw_FileExtensionsAllowed[] =
@ -1130,6 +1130,7 @@ const char *Brw_MIMETypesAllowed[] =
"application/download", // zip files in Firefox caused by an error?
"application/excel", // Microsoft Excel xls
"application/finale", // Finale .mus
"application/force", // PDF uploaded from Firefox
"application/force-download", // RAR uploaded from Firefox
"application/futuresplash", // Flash
"application/gzip", // GNU ZIP gz, gzip

View File

@ -1750,7 +1750,7 @@ void Lay_HelpPlainEditor (void)
Lay_HelpTextEditor (Txt_TEXT_plain,
"\\(LaTeX\\)",
"$$LaTeX$$, \\[LaTeX\\]");
"$$LaTeX$$ \\[LaTeX\\]");
}
void Lay_HelpRichEditor (void)

View File

@ -255,7 +255,7 @@ static void Soc_GetNoteSummary (const struct SocialNote *SocNot,
static void Soc_PublishSocialNoteInTimeline (struct SocialPublishing *SocPub);
static void Soc_PutFormToWriteNewPost (void);
static void Soc_PutTextarea (const char *Placeholder);
static void Soc_PutTextarea (const char *Placeholder,const char *ClassTextArea);
static long Soc_ReceiveSocialPost (void);
@ -1851,7 +1851,7 @@ static void Soc_PutFormToWriteNewPost (void)
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">"
"<li>");
/***** Left: write author's photo *****/
/***** Left: write author's photo (my photo) *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_LEFT_PHOTO\">");
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
@ -1884,7 +1884,7 @@ static void Soc_PutFormToWriteNewPost (void)
Act_FormStart (ActRcvSocPstGbl);
/***** Textarea and button *****/
Soc_PutTextarea (Txt_New_SOCIAL_post);
Soc_PutTextarea (Txt_New_SOCIAL_post,"SOCIAL_TEXTAREA_POST");
/***** End form *****/
Act_FormEnd ();
@ -1901,7 +1901,7 @@ static void Soc_PutFormToWriteNewPost (void)
/*** Put textarea and button inside a form to submit a new post or comment ***/
/*****************************************************************************/
static void Soc_PutTextarea (const char *Placeholder)
static void Soc_PutTextarea (const char *Placeholder,const char *ClassTextArea)
{
extern const char *Txt_Post;
char IdButton[Soc_MAX_LENGTH_ID];
@ -1912,12 +1912,12 @@ static void Soc_PutTextarea (const char *Placeholder)
/***** Textarea to write the content *****/
fprintf (Gbl.F.Out,"<textarea name=\"Content\" rows=\"1\" maxlength=\"%u\""
" placeholder=\"%s&hellip;\""
" class=\"SOCIAL_TEXTAREA\""
" class=\"%s\""
" onfocus=\"expandTextarea(this,'%s','5');\""
" onblur=\"contractTextarea(this,'%s','1');\">"
"</textarea>",
Soc_MAX_CHARS_IN_POST,
Placeholder,
Placeholder,ClassTextArea,
IdButton,IdButton);
/***** Help on editor and submit button *****/
@ -2056,13 +2056,26 @@ static void Soc_PutHiddenFormToWriteNewCommentToSocialNote (long NotCod,
const char IdNewComment[Soc_MAX_LENGTH_ID])
{
extern const char *Txt_New_SOCIAL_comment;
bool ShowPhoto = false;
char PhotoURL[PATH_MAX+1];
/***** Start container *****/
fprintf (Gbl.F.Out,"<div id=\"%s\""
" class=\"SOCIAL_FORM_COMMENT\""
" class=\"SOCIAL_FORM_NEW_COMMENT\""
" style=\"display:none;\">",
IdNewComment);
/***** Left: write author's photo (my photo) *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_COMMENT_PHOTO\">");
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO30x40",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>");
/***** Right: form to write the comment *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_COMMENT_RIGHT_CONTAINER\">");
/***** Start form to write the post *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{
@ -2074,11 +2087,14 @@ static void Soc_PutHiddenFormToWriteNewCommentToSocialNote (long NotCod,
Soc_PutHiddenParamNotCod (NotCod);
/***** Textarea and button *****/
Soc_PutTextarea (Txt_New_SOCIAL_comment);
Soc_PutTextarea (Txt_New_SOCIAL_comment,"SOCIAL_TEXTAREA_COMMENT");
/***** End form *****/
Act_FormEnd ();
/***** End right container *****/
fprintf (Gbl.F.Out,"</div>");
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
}
@ -2128,7 +2144,7 @@ static void Soc_WriteCommentsInSocialNote (const struct SocialNote *SocNot)
if (NumComments) // Comments to this social note found
{
/***** Start list *****/
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT SOCIAL_COMMENTS\">");
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
/***** List comments one by one *****/
for (NumCom = 0;

View File

@ -1647,7 +1647,7 @@ void Usr_WriteLoggedUsrHead (void)
The_ClassUsr[Gbl.Prefs.Theme]);
}
/***** Show photo *****/
/***** Show my photo *****/
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
NULL,