mirror of https://github.com/acanas/swad-core.git
Version 22.120.2: Jun 07, 2023 Code refactoring related to cookies and hidden-visible.
This commit is contained in:
parent
6408f2f54b
commit
9b9f081200
|
@ -633,7 +633,7 @@ TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la ho
|
|||
#define CSS_FILE "swad22.120.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.120.2: Jun 07, 2023 Code refactoring related to cookies and hidden-visible. (337640 lines)
|
||||
Version 22.120.2: Jun 07, 2023 Code refactoring related to cookies and hidden-visible. (337642 lines)
|
||||
Version 22.120.1: Jun 06, 2023 Translation of messages about cookies. (337620 lines)
|
||||
Version 22.120: Jun 06, 2023 Code refactoring related to hidden-visible. (337561 lines)
|
||||
Version 22.119: Jun 06, 2023 Code refactoring related to hidden-visible. (337588 lines)
|
||||
|
|
26
swad_media.c
26
swad_media.c
|
@ -1739,9 +1739,13 @@ static void Med_ShowYoutube (const struct Med_Media *Media,const char *ClassMedi
|
|||
{
|
||||
/***** Check if YouTube code exists *****/
|
||||
if (Media->Name[0]) // YouTube code
|
||||
switch (Gbl.Usrs.Me.UsrDat.Prefs.RefuseAcceptCookies)
|
||||
{
|
||||
if (Gbl.Usrs.Me.UsrDat.Prefs.AcceptCookies)
|
||||
{
|
||||
case Coo_REFUSE:
|
||||
/***** Alert to inform about third party cookies *****/
|
||||
Med_AlertThirdPartyCookies ();
|
||||
break;
|
||||
case Coo_ACCEPT:
|
||||
/***** Show linked external media *****/
|
||||
// Example of code given by YouTube:
|
||||
// <iframe width="560" height="315"
|
||||
|
@ -1769,10 +1773,7 @@ static void Med_ShowYoutube (const struct Med_Media *Media,const char *ClassMedi
|
|||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
else
|
||||
/***** Alert to inform about third party cookies *****/
|
||||
Med_AlertThirdPartyCookies ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1784,9 +1785,13 @@ static void Med_ShowEmbed (const struct Med_Media *Media,const char *ClassMedia)
|
|||
{
|
||||
/***** Check if embed URL exists *****/
|
||||
if (Media->URL[0]) // Embed URL
|
||||
switch (Gbl.Usrs.Me.UsrDat.Prefs.RefuseAcceptCookies)
|
||||
{
|
||||
if (Gbl.Usrs.Me.UsrDat.Prefs.AcceptCookies)
|
||||
{
|
||||
case Coo_REFUSE:
|
||||
/***** Alert to inform about third party cookies *****/
|
||||
Med_AlertThirdPartyCookies ();
|
||||
break;
|
||||
case Coo_ACCEPT:
|
||||
/***** Show linked external media *****/
|
||||
// Example of code given by Slideshare:
|
||||
// <iframe src="//www.slideshare.net/slideshow/embed_code/key/yngasD9sIZ7GQV"
|
||||
|
@ -1813,10 +1818,7 @@ static void Med_ShowEmbed (const struct Med_Media *Media,const char *ClassMedia)
|
|||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
else
|
||||
/***** Alert to inform about third party cookies *****/
|
||||
Med_AlertThirdPartyCookies ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue