Version 15.188

This commit is contained in:
Antonio Cañas Vargas 2016-04-08 02:16:23 +02:00
parent 37b8400232
commit 8b8ce547fa
4 changed files with 48 additions and 15 deletions

View File

@ -1942,6 +1942,11 @@ a:hover img.CENTRE_PHOTO_SHOW
margin:0;
resize:none;
}
.SOCIAL_IMG_TIT_POST
{
box-sizing:border-box;
width:480px;
}
.SOCIAL_TXT
{
padding:5px 0;
@ -2046,6 +2051,11 @@ a:hover img.CENTRE_PHOTO_SHOW
margin:0;
resize:none;
}
.SOCIAL_IMG_TIT_COMMENT
{
box-sizing:border-box;
width:440px;
}
/*********************************** Messages ********************************/
.MSG_TO_ONE_RCP

View File

@ -132,13 +132,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.187.2 (2016-04-08)"
#define CSS_FILE "swad15.187.2.css"
#define Log_PLATFORM_VERSION "SWAD 15.188 (2016-04-08)"
#define CSS_FILE "swad15.188.css"
#define JS_FILE "swad15.186.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.188: Apr 08, 2016 Form to attach an image to a social post or comment. Not finished. (198904 lines)
Version 15.187.2: Apr 08, 2016 Changed CSS of alerts. (198873 lines)
Version 15.187.1: Apr 08, 2016 Code optimization in function to change format of string. (198872 lines)
Version 15.187: Apr 07, 2016 Fixed bug in forms sent using content type multipart/form-data. (198938 lines)

View File

@ -160,7 +160,8 @@ 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,const char *ClassTextArea);
static void Soc_PutTextarea (const char *Placeholder,
const char *ClassTextArea,const char *ClassImgTit);
static long Soc_ReceiveSocialPost (void);
@ -1950,7 +1951,8 @@ static void Soc_PutFormToWriteNewPost (void)
Act_FormStart (ActRcvSocPstGbl);
/***** Textarea and button *****/
Soc_PutTextarea (Txt_New_SOCIAL_post,"SOCIAL_TEXTAREA_POST");
Soc_PutTextarea (Txt_New_SOCIAL_post,
"SOCIAL_TEXTAREA_POST","SOCIAL_IMG_TIT_POST");
/***** End form *****/
Act_FormEnd ();
@ -1967,8 +1969,12 @@ 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,const char *ClassTextArea)
static void Soc_PutTextarea (const char *Placeholder,
const char *ClassTextArea,const char *ClassImgTit)
{
extern const char *Txt_Image;
extern const char *Txt_optional;
extern const char *Txt_Image_title_attribution;
extern const char *Txt_Post;
char IdButton[Soc_MAX_LENGTH_ID];
@ -1986,6 +1992,25 @@ static void Soc_PutTextarea (const char *Placeholder,const char *ClassTextArea)
Placeholder,ClassTextArea,
IdButton,IdButton);
/***** Image file *****/
fprintf (Gbl.F.Out,"<label>"
"<img src=\"%s/photo64x64.gif\""
" alt=\"%s\" title=\"%s (%s)\""
" class=\"ICON20x20\" />"
"</label>"
"<input type=\"file\" name=\"ImgFil\""
" size=\"40\" maxlength=\"100\" value=\"\" />"
"<br />",
Gbl.Prefs.IconsURL,
Txt_Image,Txt_Image,Txt_optional);
/***** Image title/attribution *****/
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ImgTit\""
" placeholder=\"%s (%s)&hellip;\""
" class=\"%s\" maxlength=\"%u\" value=\"\">",
Txt_Image_title_attribution,Txt_optional,
ClassImgTit,Img_MAX_BYTES_TITLE);
/***** Help on editor and submit button *****/
fprintf (Gbl.F.Out,"<div id=\"%s\" style=\"display:none;\">",
IdButton);
@ -2148,7 +2173,8 @@ static void Soc_PutHiddenFormToWriteNewCommentToSocialNote (long NotCod,
Soc_PutHiddenParamNotCod (NotCod);
/***** Textarea and button *****/
Soc_PutTextarea (Txt_New_SOCIAL_comment,"SOCIAL_TEXTAREA_COMMENT");
Soc_PutTextarea (Txt_New_SOCIAL_comment,
"SOCIAL_TEXTAREA_COMMENT","SOCIAL_IMG_TIT_COMMENT");
/***** End form *****/
Act_FormEnd ();

View File

@ -1146,15 +1146,11 @@ static void Tst_PutFormToEditQstImage (struct Image *Image,
UniqueId);
/***** Image title/attribution *****/
fprintf (Gbl.F.Out,"<label class=\"%s\">"
"%s (%s):"
"</label><br />"
"<input type=\"text\" name=\"%s\" class=\"%s\""
" maxlength=\"%u\" value=\"%s\">",
The_ClassForm[Gbl.Prefs.Theme],
Txt_Image_title_attribution,Txt_optional,
ParamTitle,ClassTitle,
Img_MAX_BYTES_TITLE,Image->Title ? Image->Title : "");
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
" placeholder=\"%s (%s)&hellip;\""
" class=\"%s\" maxlength=\"%u\" value=\"%s\">",
ParamTitle,Txt_Image_title_attribution,Txt_optional,
ClassTitle,Img_MAX_BYTES_TITLE,Image->Title ? Image->Title : "");
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");