diff --git a/css/swad15.187.2.css b/css/swad15.188.css similarity index 99% rename from css/swad15.187.2.css rename to css/swad15.188.css index ae7e83f3e..f095b2298 100644 --- a/css/swad15.187.2.css +++ b/css/swad15.188.css @@ -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 diff --git a/swad_changelog.h b/swad_changelog.h index cffcf50c0..3f60bafe1 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -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) diff --git a/swad_social.c b/swad_social.c index 5ff4a7788..02845932a 100644 --- a/swad_social.c +++ b/swad_social.c @@ -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,"" + "" + "
", + Gbl.Prefs.IconsURL, + Txt_Image,Txt_Image,Txt_optional); + + /***** Image title/attribution *****/ + fprintf (Gbl.F.Out,"", + Txt_Image_title_attribution,Txt_optional, + ClassImgTit,Img_MAX_BYTES_TITLE); + /***** Help on editor and submit button *****/ fprintf (Gbl.F.Out,"
", 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 (); diff --git a/swad_test.c b/swad_test.c index 197904400..146b068a3 100644 --- a/swad_test.c +++ b/swad_test.c @@ -1146,15 +1146,11 @@ static void Tst_PutFormToEditQstImage (struct Image *Image, UniqueId); /***** Image title/attribution *****/ - fprintf (Gbl.F.Out,"
" - "", - 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,"", + ParamTitle,Txt_Image_title_attribution,Txt_optional, + ClassTitle,Img_MAX_BYTES_TITLE,Image->Title ? Image->Title : ""); /***** End container *****/ fprintf (Gbl.F.Out,"
");