mirror of https://github.com/acanas/swad-core.git
Version18.89.4
This commit is contained in:
parent
0bfa0df7ab
commit
edc0333dfb
|
@ -2720,6 +2720,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
/*********************** Media (image/video) uploading ***********************/
|
||||
.MED_ICO
|
||||
{
|
||||
text-align:center;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.MED_PLAY
|
||||
|
|
|
@ -464,13 +464,14 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.89.3 (2019-03-27)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.89.4 (2019-03-27)"
|
||||
#define CSS_FILE "swad18.89.3.css"
|
||||
#define JS_FILE "swad18.89.3.js"
|
||||
/*
|
||||
Version 18.89.3: Mar 27, 2019 Changes in multimedia attachment form. (241139 lines)
|
||||
Version 18.89.4: Mar 27, 2019 Code refactoring in media uploader. (241144 lines)
|
||||
Version 18.89.3: Mar 27, 2019 Changes in media attachment form. (241139 lines)
|
||||
Version 18.89.2: Mar 27, 2019 Help link when writing a test question.
|
||||
Changes in multimedia attachment form. (241111 lines)
|
||||
Changes in media attachment form. (241111 lines)
|
||||
Version 18.89.1: Mar 26, 2019 Corrections in help links after recent changes. (241090 lines)
|
||||
Version 18.89: Mar 26, 2019 Corrections in help links after recent changes.
|
||||
Module swad_preference is renamed swad_setting. (241090 lines)
|
||||
|
|
73
swad_media.c
73
swad_media.c
|
@ -113,6 +113,12 @@ static void Med_ResetMediaExceptURLAndTitle (struct Media *Media);
|
|||
static void Med_FreeMediaURL (struct Media *Media);
|
||||
static void Med_FreeMediaTitle (struct Media *Media);
|
||||
|
||||
static void Med_PutIconMediaUploader (const char UniqueId[Frm_MAX_BYTES_ID + 1],
|
||||
const char *IdSuffix,
|
||||
const char *FunctionName,
|
||||
const char *Icon,
|
||||
const char *Title);
|
||||
|
||||
static Med_Action_t Med_GetMediaActionFromForm (const char *ParamAction);
|
||||
static Med_FormType_t Usr_GetFormTypeFromForm (struct ParamUploadMedia *ParamUploadMedia);
|
||||
static void Usr_GetURLFromForm (const char *ParamName,struct Media *Media);
|
||||
|
@ -369,43 +375,22 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
|
|||
"<div class=\"PREF_CONTAINER\">"); // icons container
|
||||
|
||||
/* Upload icon */
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_upl\"" // <id>_ico_upl
|
||||
" class=\"PREF_OFF\">"
|
||||
"<img src=\"%s/file-image.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"ICO_HIGHLIGHT ICOx16\""
|
||||
" onclick=\"mediaClickOnActivateUpload('%s');\" />"
|
||||
"</div>", // <id>_ico_upl
|
||||
Id,
|
||||
Cfg_URL_ICON_PUBLIC,
|
||||
Txt_Image_video,Txt_Image_video,
|
||||
Id);
|
||||
Med_PutIconMediaUploader (Id,"ico_upl", // <id>_ico_upl
|
||||
"mediaClickOnActivateUpload",
|
||||
"file-image.svg",
|
||||
Txt_Image_video);
|
||||
|
||||
/* YouTube icon */
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_you\"" // <id>_ico_you
|
||||
" class=\"PREF_OFF\">"
|
||||
"<img src=\"%s/youtube-brands.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"ICO_HIGHLIGHT ICOx16\""
|
||||
" onclick=\"mediaClickOnActivateYoutube('%s');\" />"
|
||||
"</div>", // <id>_ico_you
|
||||
Id,
|
||||
Cfg_URL_ICON_PUBLIC,
|
||||
"YouTube","YouTube",
|
||||
Id);
|
||||
Med_PutIconMediaUploader (Id,"ico_you", // <id>_ico_you
|
||||
"mediaClickOnActivateYoutube",
|
||||
"youtube-brands.svg",
|
||||
"YouTube");
|
||||
|
||||
/* Embed icon */
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_emb\"" // <id>_ico_emb
|
||||
" class=\"PREF_OFF\">"
|
||||
"<img src=\"%s/code.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"ICO_HIGHLIGHT ICOx16\""
|
||||
" onclick=\"mediaClickOnActivateEmbed('%s');\" />"
|
||||
"</div>", // <id>_ico_emb
|
||||
Id,
|
||||
Cfg_URL_ICON_PUBLIC,
|
||||
"Embed","Embed",
|
||||
Id);
|
||||
Med_PutIconMediaUploader (Id,"ico_emb", // <id>_ico_emb
|
||||
"mediaClickOnActivateEmbed",
|
||||
"code.svg",
|
||||
"Embed");
|
||||
|
||||
/* End icons */
|
||||
fprintf (Gbl.F.Out,"</div>" // icons container
|
||||
|
@ -479,6 +464,28 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
|
|||
fprintf (Gbl.F.Out,"</div>"); // container <id>_med_upl
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Put an icon to toggle on/off the form to comment a note ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Med_PutIconMediaUploader (const char UniqueId[Frm_MAX_BYTES_ID + 1],
|
||||
const char *IdSuffix,
|
||||
const char *FunctionName,
|
||||
const char *Icon,
|
||||
const char *Title)
|
||||
{
|
||||
/***** Icon to activate form in media uploader *****/
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s_%s\" class=\"PREF_OFF\">" // <id>_IdSuffix
|
||||
"<a href=\"\" onclick=\"%s('%s');return false;\">"
|
||||
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
|
||||
" class=\"ICO_HIGHLIGHT ICOx16\" />"
|
||||
"</a>"
|
||||
"</div>", // <id>_IdSuffix
|
||||
UniqueId,IdSuffix,
|
||||
FunctionName,UniqueId,
|
||||
Cfg_URL_ICON_PUBLIC,Icon,Title,Title);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Get media (image/video) from form **********************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -2520,9 +2520,8 @@ static void TL_PutIconToToggleCommentNote (const char UniqueId[Frm_MAX_BYTES_ID
|
|||
/***** Link to toggle on/off the form to comment a note *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"TL_ICO_COMMENT ICO_HIGHLIGHT\">"
|
||||
"<a href=\"\""
|
||||
" onclick=\"toggleDisplay('%s');return false;\" />"
|
||||
"<img src=\"%s/edit.svg\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" onclick=\"toggleDisplay('%s');return false;\">"
|
||||
"<img src=\"%s/edit.svg\" alt=\"%s\" title=\"%s\""
|
||||
" class=\"CONTEXT_ICO_x16\" />"
|
||||
"</a>"
|
||||
"</div>",
|
||||
|
|
Loading…
Reference in New Issue