mirror of https://github.com/acanas/swad-core.git
Version18.77.4
This commit is contained in:
parent
8961260fbd
commit
372543a63d
|
@ -2716,19 +2716,10 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
/*********************** Media (image/video) uploading ***********************/
|
||||
.MED_UPL_CON /* Upload container */
|
||||
{
|
||||
text-align:center;
|
||||
vertical-align:top;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.MED_UPL_ICO_CON /* Upload icon container */
|
||||
{
|
||||
display:inline-block;
|
||||
}
|
||||
.MED_UPL_ICO /* Upload icon */
|
||||
{
|
||||
height:20px;
|
||||
margin:5px 20px;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
.MED_PLAY
|
||||
{
|
||||
|
@ -2884,7 +2875,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
.TL_WIDTH {width:316px;} /* 536-220 */
|
||||
.TL_RIGHT_WIDTH {width:260px;} /* 480-220 */
|
||||
.TL_RIGHT_AUTHOR_WIDTH {width:100px;} /* 320-220 */
|
||||
.TL_POST_IMG_WIDTH {width:220px;} /* 440-220 */
|
||||
.TL_POST_MED_WIDTH {width:220px;} /* 440-220 */
|
||||
.TL_COMMENT_WIDTH {width:220px;} /* 440-220 */
|
||||
.TL_COMMENT_AUTHOR_WIDTH {width: 60px;} /* 280-220 */
|
||||
}
|
||||
|
@ -2893,7 +2884,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
.TL_WIDTH {width:536px;}
|
||||
.TL_RIGHT_WIDTH {width:480px;}
|
||||
.TL_RIGHT_AUTHOR_WIDTH {width:320px;}
|
||||
.TL_POST_IMG_WIDTH {width:440px;}
|
||||
.TL_POST_MED_WIDTH {width:440px;}
|
||||
.TL_COMMENT_WIDTH {width:440px;}
|
||||
.TL_COMMENT_AUTHOR_WIDTH {width:280px;}
|
||||
}
|
||||
|
@ -2970,7 +2961,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
margin:0;
|
||||
resize:none;
|
||||
}
|
||||
.TL_POST_IMG_TIT_URL
|
||||
.TL_POST_MED_INPUT
|
||||
{
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
@ -3138,7 +3129,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
width:100%;
|
||||
border-radius:4px;
|
||||
}
|
||||
.FOR_IMG_TIT_URL
|
||||
.FOR_MED_INPUT
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:480px;
|
||||
|
@ -3164,7 +3155,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
width:100%;
|
||||
border-radius:4px;
|
||||
}
|
||||
.MSG_IMG_TIT_URL
|
||||
.MSG_MED_INPUT
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:480px;
|
||||
|
|
|
@ -786,8 +786,8 @@ function mediaClickOnActivateUpload (id) {
|
|||
par_emb.disabled = true; // Disable embed
|
||||
par_upl.disabled = false; // Enable upload
|
||||
|
||||
ico_upl.style.opacity = '1'; // Highlighted upload icon
|
||||
ico_emb.style.opacity = '0.5'; // Normal embed icon
|
||||
ico_upl.className = 'PREF_ON'; // Highlighted upload icon
|
||||
ico_emb.className = 'PREF_OFF'; // Normal embed icon
|
||||
|
||||
fil.style.display = ''; // Show file input
|
||||
fil.disabled = false; // Enable file input
|
||||
|
@ -817,8 +817,8 @@ function mediaClickOnActivateEmbed (id) {
|
|||
par_upl.disabled = true; // Disable upload
|
||||
par_emb.disabled = false; // Enable embed
|
||||
|
||||
ico_emb.style.opacity = '1'; // Highlighted embed icon
|
||||
ico_upl.style.opacity = '0.5'; // Normal upload icon
|
||||
ico_emb.className = 'PREF_ON'; // Highlighted embed icon
|
||||
ico_upl.className = 'PREF_OFF'; // Normal upload icon
|
||||
|
||||
fil.style.display = 'none'; // Hide file input
|
||||
fil.disabled = true; // Disable file input
|
||||
|
@ -845,8 +845,8 @@ function mediaDisableUploadAndEmbed (id) {
|
|||
par_upl.disabled = true; // Disable upload
|
||||
par_emb.disabled = true; // Disable embed
|
||||
|
||||
ico_upl.style.opacity = '0.5'; // Normal upload icon
|
||||
ico_emb.style.opacity = '0.5'; // Normal embed icon
|
||||
ico_upl.className = 'PREF_OFF'; // Normal upload icon
|
||||
ico_emb.className = 'PREF_OFF'; // Normal embed icon
|
||||
|
||||
fil.style.display = 'none'; // Hide file input
|
||||
fil.disabled = true; // Disable file input
|
||||
|
|
|
@ -431,6 +431,8 @@ Lo de mutear anuncios, en principio prefiero hacer una opci
|
|||
|
||||
// TODO: Los usuarios que no tienes permiso para ver su perfil público, se debería mostrar algo, una mínima ficha sin tinmeline o algo así
|
||||
|
||||
// TODO: Allow timeline posting only for users belonging to courses or admins to avoid user who create accounts only to post
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -468,6 +470,7 @@ que el usuario podr
|
|||
|
||||
TODO: Fix edition of media in test edition
|
||||
|
||||
Version 18.77.4: Mar 16, 2019 Changes in form to upload media. (240256 lines)
|
||||
Version 18.77.3: Mar 16, 2019 Embedded YouTube videos. Not finished. (240252 lines)
|
||||
Version 18.77.2: Mar 14, 2019 Embedded YouTube videos. Not finished. (240267 lines)
|
||||
Version 18.77.1: Mar 14, 2019 Embedded YouTube videos. Not finished. (240217 lines)
|
||||
|
|
|
@ -4008,7 +4008,7 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
|
|||
Lay_HelpPlainEditor ();
|
||||
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,"FOR_IMG_TIT_URL");
|
||||
Med_PutMediaUploader (-1,"FOR_MED_INPUT");
|
||||
|
||||
/***** Send button *****/
|
||||
Btn_PutCreateButton (Txt_Send);
|
||||
|
|
27
swad_media.c
27
swad_media.c
|
@ -293,17 +293,21 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
|
|||
Frm_SetUniqueId (Id);
|
||||
|
||||
/***** Start container *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"MED_UPL_CON\">"); // container
|
||||
fprintf (Gbl.F.Out,"<div class=\"MED_UPL_CON\">"); // container
|
||||
|
||||
/***** Action to perform on media *****/
|
||||
Par_PutHiddenParamUnsigned (ParamUploadMedia.Action,(unsigned) Med_ACTION_NEW_MEDIA);
|
||||
|
||||
/***** Start icons *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINERS\">" // icons containers
|
||||
"<div class=\"PREF_CONTAINER\">"); // icons container
|
||||
|
||||
/***** Upload icon *****/
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_upl\"" // <id>_ico_upl
|
||||
" class=\"MED_UPL_ICO_CON\">"
|
||||
" class=\"PREF_OFF\">"
|
||||
"<img src=\"%s/file-image.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"MED_UPL_ICO ICO_HIGHLIGHT\""
|
||||
" class=\"ICO_HIGHLIGHT ICOx20\""
|
||||
" onclick=\"mediaClickOnActivateUpload('%s');\" />"
|
||||
"</div>", // <id>_ico_upl
|
||||
Id,
|
||||
|
@ -321,10 +325,10 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
|
|||
|
||||
/***** Embed icon *****/
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_emb\"" // <id>_ico_emb
|
||||
" class=\"MED_UPL_ICO_CON\">"
|
||||
" class=\"PREF_OFF\">"
|
||||
"<img src=\"%s/youtube-brands.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"MED_UPL_ICO ICO_HIGHLIGHT\""
|
||||
" class=\"ICO_HIGHLIGHT ICOx20\""
|
||||
" onclick=\"mediaClickOnActivateEmbed('%s');\" />"
|
||||
"</div>", // <id>_ico_emb
|
||||
Id,
|
||||
|
@ -332,6 +336,14 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
|
|||
"YouTube","YouTube",
|
||||
Id);
|
||||
|
||||
/***** End icons *****/
|
||||
fprintf (Gbl.F.Out,"</div>" // icons container
|
||||
"</div>"); // icons containers
|
||||
|
||||
/***** Start input fields *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">", // input fields
|
||||
ClassInput);
|
||||
|
||||
/***** Form type *****/
|
||||
fprintf (Gbl.F.Out,"<input type=\"hidden\""
|
||||
" id=\"%s_par_emb\"" // <id>_par_emb
|
||||
|
@ -369,8 +381,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
|
|||
ParamUploadMedia.Title,Txt_Title_attribution,
|
||||
ClassInput,Med_MAX_CHARS_TITLE);
|
||||
|
||||
/***** End input fields *****/
|
||||
fprintf (Gbl.F.Out,"</div>"); // input fields
|
||||
|
||||
/***** End container *****/
|
||||
fprintf (Gbl.F.Out,"</div>"); // container
|
||||
fprintf (Gbl.F.Out,"</div>"); // container
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -324,7 +324,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
|
|||
Lay_HelpPlainEditor ();
|
||||
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,"MSG_IMG_TIT_URL");
|
||||
Med_PutMediaUploader (-1,"MSG_MED_INPUT");
|
||||
|
||||
/***** Send button *****/
|
||||
Btn_PutCreateButton (Txt_Send_message);
|
||||
|
|
10
swad_test.c
10
swad_test.c
|
@ -158,7 +158,7 @@ static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank
|
|||
static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
||||
const char *ClassContainer,
|
||||
const char *ClassMedia,
|
||||
const char *ClassMediaTitURL,
|
||||
const char *ClassMediaInput,
|
||||
bool OptionsDisabled);
|
||||
static void Tst_UpdateScoreQst (long QstCod,float ScoreThisQst,bool AnswerIsNotBlank);
|
||||
static void Tst_UpdateMyNumAccessTst (unsigned NumAccessesTst);
|
||||
|
@ -1111,7 +1111,7 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem)
|
|||
static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
||||
const char *ClassContainer,
|
||||
const char *ClassMedia,
|
||||
const char *ClassMediaTitURL,
|
||||
const char *ClassMediaInput,
|
||||
bool OptionsDisabled)
|
||||
{
|
||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
|
@ -1185,7 +1185,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
|||
" placeholder=\"%s (%s)\""
|
||||
" class=\"%s\" maxlength=\"%u\" value=\"%s\">",
|
||||
ParamUploadMedia.Title,Txt_Title_attribution,Txt_optional,
|
||||
ClassMediaTitURL,Med_MAX_CHARS_TITLE,
|
||||
ClassMediaInput,Med_MAX_CHARS_TITLE,
|
||||
Media->Title ? Media->Title :
|
||||
"");
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
|||
" placeholder=\"%s (%s)\""
|
||||
" class=\"%s\" maxlength=\"%u\" value=\"%s\">",
|
||||
ParamUploadMedia.URL,Txt_Link,Txt_optional,
|
||||
ClassMediaTitURL,Cns_MAX_CHARS_WWW,
|
||||
ClassMediaInput,Cns_MAX_CHARS_WWW,
|
||||
Media->URL ? Media->URL :
|
||||
"");
|
||||
|
||||
|
@ -1204,7 +1204,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
|
|||
}
|
||||
else // No current image
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (NumMediaInForm,ClassMediaTitURL);
|
||||
Med_PutMediaUploader (NumMediaInForm,ClassMediaInput);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -183,7 +183,7 @@ static void TL_PublishNoteInTimeline (struct TL_Publication *SocPub);
|
|||
|
||||
static void TL_PutFormToWriteNewPost (void);
|
||||
static void TL_PutTextarea (const char *Placeholder,
|
||||
const char *ClassTextArea,const char *ClassImgTit);
|
||||
const char *ClassTextArea,const char *ClassMediaInput);
|
||||
|
||||
static long TL_ReceivePost (void);
|
||||
|
||||
|
@ -2355,8 +2355,8 @@ static void TL_PutFormToWriteNewPost (void)
|
|||
|
||||
/* Textarea and button */
|
||||
TL_PutTextarea (Txt_New_TIMELINE_post,
|
||||
"TL_POST_TEXTAREA TL_RIGHT_WIDTH",
|
||||
"TL_POST_IMG_TIT_URL TL_POST_IMG_WIDTH");
|
||||
"TL_POST_TEXTAREA TL_RIGHT_WIDTH",
|
||||
"TL_POST_MED_INPUT TL_POST_MED_WIDTH");
|
||||
|
||||
/* End form */
|
||||
Frm_EndForm ();
|
||||
|
@ -2374,7 +2374,7 @@ static void TL_PutFormToWriteNewPost (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void TL_PutTextarea (const char *Placeholder,
|
||||
const char *ClassTextArea,const char *ClassImgTit)
|
||||
const char *ClassTextArea,const char *ClassMediaInput)
|
||||
{
|
||||
extern const char *Txt_Post;
|
||||
char IdDivImgButton[Frm_MAX_BYTES_ID + 1];
|
||||
|
@ -2386,7 +2386,7 @@ static void TL_PutTextarea (const char *Placeholder,
|
|||
fprintf (Gbl.F.Out,"<textarea name=\"Content\" rows=\"1\" maxlength=\"%u\""
|
||||
" placeholder=\"%s…\""
|
||||
" class=\"%s\""
|
||||
" onfocus=\"expandTextarea(this,'%s','5');\">"
|
||||
" onfocus=\"expandTextarea(this,'%s','6');\">"
|
||||
"</textarea>",
|
||||
TL_MAX_CHARS_IN_POST,
|
||||
Placeholder,ClassTextArea,
|
||||
|
@ -2400,7 +2400,7 @@ static void TL_PutTextarea (const char *Placeholder,
|
|||
Lay_HelpPlainEditor ();
|
||||
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,ClassImgTit);
|
||||
Med_PutMediaUploader (-1,ClassMediaInput);
|
||||
|
||||
/***** Submit button *****/
|
||||
fprintf (Gbl.F.Out,"<button type=\"submit\""
|
||||
|
|
Loading…
Reference in New Issue