mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-12 19:54:05 +02:00
Version18.77.1
This commit is contained in:
parent
33b7542f38
commit
a95ad3969d
|
@ -2725,7 +2725,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
}
|
}
|
||||||
.MED_UPL_ICO /* Upload icon */
|
.MED_UPL_ICO /* Upload icon */
|
||||||
{
|
{
|
||||||
width:16px;
|
/* width:16px; */
|
||||||
height:16px;
|
height:16px;
|
||||||
margin:5px 20px;
|
margin:5px 20px;
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
|
|
|
@ -778,11 +778,16 @@ function mediaActivateUpload (id) {
|
||||||
document.getElementById (id + '_par_upl').disabled = false; // Enable upload
|
document.getElementById (id + '_par_upl').disabled = false; // Enable upload
|
||||||
|
|
||||||
document.getElementById (id + '_ico_upl').style.opacity = '1'; // Highlight upload icon
|
document.getElementById (id + '_ico_upl').style.opacity = '1'; // Highlight upload icon
|
||||||
document.getElementById (id + '_ico_emb').style.opacity = '0.2'; // Shadow embed icon
|
document.getElementById (id + '_ico_emb').style.opacity = '0.3'; // Shadow embed icon
|
||||||
|
|
||||||
document.getElementById (id + '_fil').style.display = ''; // Show input
|
document.getElementById (id + '_fil').style.display = ''; // Show file input
|
||||||
document.getElementById (id + '_url').style.display = ''; // Show input
|
document.getElementById (id + '_fil').disabled = false; // Enable file input
|
||||||
document.getElementById (id + '_tit').style.display = ''; // Show input
|
|
||||||
|
document.getElementById (id + '_url').style.display = ''; // Show URL input
|
||||||
|
document.getElementById (id + '_url').disabled = false; // Enable URL input
|
||||||
|
|
||||||
|
document.getElementById (id + '_tit').style.display = ''; // Show title input
|
||||||
|
document.getElementById (id + '_tit').disabled = false; // Enable title input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,11 +798,16 @@ function mediaActivateEmbed (id) {
|
||||||
document.getElementById (id + '_par_emb').disabled = false; // Enable embed
|
document.getElementById (id + '_par_emb').disabled = false; // Enable embed
|
||||||
|
|
||||||
document.getElementById (id + '_ico_emb').style.opacity = '1'; // Highlight embed icon
|
document.getElementById (id + '_ico_emb').style.opacity = '1'; // Highlight embed icon
|
||||||
document.getElementById (id + '_ico_upl').style.opacity = '0.2'; // Shadow upload icon
|
document.getElementById (id + '_ico_upl').style.opacity = '0.3'; // Shadow upload icon
|
||||||
|
|
||||||
document.getElementById (id + '_fil').style.display = 'none'; // Hide input
|
document.getElementById (id + '_fil').style.display = 'none'; // Hide file input
|
||||||
document.getElementById (id + '_url').style.display = ''; // Show input
|
document.getElementById (id + '_fil').disabled = true; // Disable file input
|
||||||
document.getElementById (id + '_tit').style.display = 'none'; // Hide input
|
|
||||||
|
document.getElementById (id + '_url').style.display = ''; // Show URL input
|
||||||
|
document.getElementById (id + '_url').disabled = false; // Enable URL input
|
||||||
|
|
||||||
|
document.getElementById (id + '_tit').style.display = 'none'; // Hide title input
|
||||||
|
document.getElementById (id + '_tit').disabled = true; // Disable title input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -450,11 +450,13 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.77 (2019-03-15)"
|
#define Log_PLATFORM_VERSION "SWAD 18.77.1 (2019-03-15)"
|
||||||
#define CSS_FILE "swad18.77.css"
|
#define CSS_FILE "swad18.77.css"
|
||||||
#define JS_FILE "swad18.77.js"
|
#define JS_FILE "swad18.77.js"
|
||||||
/*
|
/*
|
||||||
|
TODO: Mejorar javascript subida media
|
||||||
TODO: Fix edition of media in test edition
|
TODO: Fix edition of media in test edition
|
||||||
|
Version 18.77.1: Mar 14, 2019 Embedded YouTube videos. Not finished. (240217 lines)
|
||||||
Version 18.77: Mar 14, 2019 Embedded YouTube videos. Not finished. (240214 lines)
|
Version 18.77: Mar 14, 2019 Embedded YouTube videos. Not finished. (240214 lines)
|
||||||
7 changes necessary in database:
|
7 changes necessary in database:
|
||||||
ALTER TABLE forum_post CHANGE COLUMN MediaType MediaType ENUM('none','jpg','gif','mp4','webm','ogg','youtube') NOT NULL DEFAULT 'none';
|
ALTER TABLE forum_post CHANGE COLUMN MediaType MediaType ENUM('none','jpg','gif','mp4','webm','ogg','youtube') NOT NULL DEFAULT 'none';
|
||||||
|
|
51
swad_media.c
51
swad_media.c
|
@ -299,13 +299,13 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassMediaTitURL)
|
||||||
Par_PutHiddenParamUnsigned (ParamUploadMedia.Action,(unsigned) Med_ACTION_NEW_MEDIA);
|
Par_PutHiddenParamUnsigned (ParamUploadMedia.Action,(unsigned) Med_ACTION_NEW_MEDIA);
|
||||||
|
|
||||||
/***** Upload icon *****/
|
/***** Upload icon *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_upl\"" // <id>_ico_upl
|
fprintf (Gbl.F.Out,"<div id=\"%s_ico_upl\"" // <id>_ico_upl
|
||||||
" class=\"MED_UPL_ICO_CON\">"
|
" class=\"MED_UPL_ICO_CON\">"
|
||||||
"<img src=\"%s/file-image.svg\""
|
"<img src=\"%s/file-image.svg\""
|
||||||
" alt=\"%s\" title=\"%s\""
|
" alt=\"%s\" title=\"%s\""
|
||||||
" class=\"MED_UPL_ICO ICO_HIGHLIGHT\""
|
" class=\"MED_UPL_ICO ICO_HIGHLIGHT\""
|
||||||
" onclick=\"mediaActivateUpload('%s');\" />"
|
" onclick=\"mediaActivateUpload('%s');\" />"
|
||||||
"</div>", // <id>_ico_upl
|
"</div>", // <id>_ico_upl
|
||||||
Id,
|
Id,
|
||||||
Gbl.Prefs.URLIcons,
|
Gbl.Prefs.URLIcons,
|
||||||
Txt_Image_video,Txt_Image_video,
|
Txt_Image_video,Txt_Image_video,
|
||||||
|
@ -313,65 +313,60 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassMediaTitURL)
|
||||||
|
|
||||||
/***** Form type *****/
|
/***** Form type *****/
|
||||||
fprintf (Gbl.F.Out,"<input type=\"hidden\""
|
fprintf (Gbl.F.Out,"<input type=\"hidden\""
|
||||||
" id=\"%s_par_upl\"" // <id>_par_upl
|
" id=\"%s_par_upl\"" // <id>_par_upl
|
||||||
" name=\"FormType\" value=\"%u\""
|
" name=\"FormType\" value=\"%u\""
|
||||||
" disabled=\"disabled\" />",
|
" disabled=\"disabled\" />",
|
||||||
Id,
|
Id,
|
||||||
(unsigned) Med_FORM_FILE);
|
(unsigned) Med_FORM_FILE);
|
||||||
|
|
||||||
/***** Embed icon *****/
|
/***** Embed icon *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"%s_ico_emb\"" // <id>_ico_emb
|
fprintf (Gbl.F.Out,"<div id=\"%s_ico_emb\"" // <id>_ico_emb
|
||||||
" class=\"MED_UPL_ICO_CON\">"
|
" class=\"MED_UPL_ICO_CON\">"
|
||||||
"<img src=\"%s/youtube-brands.svg\""
|
"<img src=\"%s/youtube-brands.svg\""
|
||||||
" alt=\"%s\" title=\"%s\""
|
" alt=\"%s\" title=\"%s\""
|
||||||
" class=\"MED_UPL_ICO ICO_HIGHLIGHT\""
|
" class=\"MED_UPL_ICO ICO_HIGHLIGHT\""
|
||||||
" onclick=\"mediaActivateEmbed('%s');\" />"
|
" onclick=\"mediaActivateEmbed('%s');\" />"
|
||||||
"</div>", // <id>_ico_emb
|
"</div>", // <id>_ico_emb
|
||||||
Id,
|
Id,
|
||||||
Gbl.Prefs.URLIcons,
|
Gbl.Prefs.URLIcons,
|
||||||
"Embed URL","Embed URL",
|
"YouTube","YouTube",
|
||||||
Id);
|
Id);
|
||||||
|
|
||||||
/***** Form type *****/
|
/***** Form type *****/
|
||||||
fprintf (Gbl.F.Out,"<input type=\"hidden\""
|
fprintf (Gbl.F.Out,"<input type=\"hidden\""
|
||||||
" id=\"%s_par_emb\"" // <id>_par_emb
|
" id=\"%s_par_emb\"" // <id>_par_emb
|
||||||
" name=\"FormType\" value=\"%u\""
|
" name=\"FormType\" value=\"%u\""
|
||||||
" disabled=\"disabled\" />",
|
" disabled=\"disabled\" />",
|
||||||
Id,
|
Id,
|
||||||
(unsigned) Med_FORM_EMBED);
|
(unsigned) Med_FORM_EMBED);
|
||||||
|
|
||||||
/***** Media file *****/
|
/***** Media file *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"%s_fil\"" // <id>_fil
|
fprintf (Gbl.F.Out,"<input id=\"%s_fil\" type=\"file\"" // <id>_fil
|
||||||
" style=\"display:none;\">"
|
" name=\"%s\" accept=\"image/,video/\""
|
||||||
"<input type=\"file\" name=\"%s\""
|
" disabled=\"disabled\""
|
||||||
" accept=\"image/,video/\" />"
|
" style=\"display:none;\" />", // <id>_fil
|
||||||
"</div>", // <id>_fil
|
|
||||||
Id,
|
Id,
|
||||||
ParamUploadMedia.File);
|
ParamUploadMedia.File);
|
||||||
|
|
||||||
/***** Media URL *****/
|
/***** Media URL *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"%s_url\"" // <id>_url
|
fprintf (Gbl.F.Out,"<input id=\"%s_url\" type=\"url\"" // <id>_url
|
||||||
" style=\"display:none;\">"
|
" name=\"%s\" placeholder=\"%s\""
|
||||||
"<input type=\"url\" name=\"%s\""
|
" class=\"%s\" maxlength=\"%u\" value=\"\""
|
||||||
" placeholder=\"%s\""
|
" disabled=\"disabled\""
|
||||||
" class=\"%s\" maxlength=\"%u\" value=\"\" />"
|
" style=\"display:none;\" />", // <id>_url
|
||||||
"</div>", // <id>_url
|
|
||||||
Id,
|
Id,
|
||||||
ParamUploadMedia.URL,
|
ParamUploadMedia.URL,Txt_Link,
|
||||||
Txt_Link,
|
|
||||||
ClassMediaTitURL,Cns_MAX_CHARS_WWW);
|
ClassMediaTitURL,Cns_MAX_CHARS_WWW);
|
||||||
|
|
||||||
/***** Media title *****/
|
/***** Media title *****/
|
||||||
fprintf (Gbl.F.Out,"<div id=\"%s_tit\"" // <id>_tit
|
fprintf (Gbl.F.Out,"<input id=\"%s_tit\" type=\"text\"" // <id>_tit
|
||||||
" style=\"display:none;\">"
|
" name=\"%s\" placeholder=\"%s\""
|
||||||
"<input type=\"text\" name=\"%s\""
|
" class=\"%s\" maxlength=\"%u\" value=\"\""
|
||||||
" placeholder=\"%s\""
|
" disabled=\"disabled\""
|
||||||
" class=\"%s\" maxlength=\"%u\" value=\"\" />",
|
" style=\"display:none;\" />", // <id>_tit
|
||||||
Id,
|
Id,
|
||||||
ParamUploadMedia.Title,
|
ParamUploadMedia.Title,Txt_Title_attribution,
|
||||||
Txt_Title_attribution,
|
|
||||||
ClassMediaTitURL,Med_MAX_CHARS_TITLE);
|
ClassMediaTitURL,Med_MAX_CHARS_TITLE);
|
||||||
fprintf (Gbl.F.Out,"</div>"); // <id>_tit
|
|
||||||
|
|
||||||
/***** End container *****/
|
/***** End container *****/
|
||||||
fprintf (Gbl.F.Out,"</div>"); // container
|
fprintf (Gbl.F.Out,"</div>"); // container
|
||||||
|
|
Loading…
Reference in New Issue
Block a user