Version18.85.3

This commit is contained in:
Antonio Cañas Vargas 2019-03-22 09:48:37 +01:00
parent 33e5de7d7d
commit c4b60ebe1c
2 changed files with 32 additions and 37 deletions

View File

@ -459,10 +459,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.85.2 (2019-03-22)" #define Log_PLATFORM_VERSION "SWAD 18.85.3 (2019-03-22)"
#define CSS_FILE "swad18.85.1.css" #define CSS_FILE "swad18.85.1.css"
#define JS_FILE "swad18.85.js" #define JS_FILE "swad18.85.js"
/* /*
Version 18.85.3: Mar 22, 2019 Code refactoring related to third-party cookies. (240833 lines)
Version 18.85.2: Mar 22, 2019 Changed text related to third-party cookies. (240837 lines) Version 18.85.2: Mar 22, 2019 Changed text related to third-party cookies. (240837 lines)
Version 18.85.1: Mar 21, 2019 Fixed bug in form to link YouTube videos. Version 18.85.1: Mar 21, 2019 Fixed bug in form to link YouTube videos.
Changes in CSS. (240827 lines) Changes in CSS. (240827 lines)

View File

@ -154,6 +154,7 @@ static void Med_ShowVideo (struct Media *Media,
const char *ClassMedia); const char *ClassMedia);
static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia); static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia);
static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia); static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia);
static void Med_AlertThirdPartyCookies (void);
static Med_Type_t Med_GetTypeFromStrInDB (const char *Str); static Med_Type_t Med_GetTypeFromStrInDB (const char *Str);
static Med_Type_t Med_GetTypeFromExtAndMIME (const char *Extension, static Med_Type_t Med_GetTypeFromExtAndMIME (const char *Extension,
@ -1661,11 +1662,8 @@ static void Med_ShowVideo (struct Media *Media,
static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia) static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia)
{ {
extern const char *Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings; /***** Check if YouTube code exists *****/
extern const char *Txt_Settings; if (Media->Name[0]) // YouTube code
/***** Check if embed URL exists *****/
if (Media->URL[0]) // Embed URL
{ {
if (Gbl.Usrs.Me.UsrDat.Prefs.AcceptThirdPartyCookies) if (Gbl.Usrs.Me.UsrDat.Prefs.AcceptThirdPartyCookies)
{ {
@ -1693,20 +1691,8 @@ static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia)
"</div>"); "</div>");
} }
else else
{
/***** Alert to inform about third party cookies *****/ /***** Alert to inform about third party cookies *****/
/* Start alert */ Med_AlertThirdPartyCookies ();
Ale_ShowAlertAndButton1 (Ale_INFO,Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings);
/* Put form to change cookies preferences */
if (!Gbl.Form.Inside)
Lay_PutContextualLinkIconText (ActReqEdiPrf,Coo_COOKIES_ID,NULL,
"cog.svg",
Txt_Settings);
/* End alert */
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
}
} }
} }
@ -1716,9 +1702,6 @@ static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia)
static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia) static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia)
{ {
extern const char *Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings;
extern const char *Txt_Settings;
/***** Check if embed URL exists *****/ /***** Check if embed URL exists *****/
if (Media->URL[0]) // Embed URL if (Media->URL[0]) // Embed URL
{ {
@ -1747,7 +1730,20 @@ static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia)
"</div>"); "</div>");
} }
else else
/***** Alert to inform about third party cookies *****/
Med_AlertThirdPartyCookies ();
}
}
/*****************************************************************************/
/********** Remove several media files and entries in database ***************/
/*****************************************************************************/
static void Med_AlertThirdPartyCookies (void)
{ {
extern const char *Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings;
extern const char *Txt_Settings;
/***** Alert to inform about third party cookies *****/ /***** Alert to inform about third party cookies *****/
/* Start alert */ /* Start alert */
Ale_ShowAlertAndButton1 (Ale_INFO,Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings); Ale_ShowAlertAndButton1 (Ale_INFO,Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings);
@ -1761,8 +1757,6 @@ static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia)
/* End alert */ /* End alert */
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL); Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
} }
}
}
/*****************************************************************************/ /*****************************************************************************/
/********** Remove several media files and entries in database ***************/ /********** Remove several media files and entries in database ***************/