Editor de continguts

S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> request.getParameter('resourcePK')  [in template "10154#10192#21258889" at line 1, column 23]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign resourcePK = request.getParam...  [in template "10154#10192#21258889" at line 1, column 1]
----
1<#assign resourcePK = request.getParameter('resourcePK') /> 
2<#assign isBanner = request.getParameter('isBanner') /> 
3 
4<#assign LiteralsToolsServiceUtil = serviceLocator.findService("com.aqua.literals.util.LiteralsToolsService")/> 
5<#assign UtilsService = serviceLocator.findService("com.educaixa.utils.service.EduCaixaUtilsService")/> 
6<#assign UserBookmarkLocalService = serviceLocator.findService("com.educaixa.services.service.UserBookmarkLocalService") /> 
7<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
8<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")/> 
9<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
10<#assign article = journalArticleService.getLatestArticle(resourcePK?number, 0) /> 
11<#assign journalArticleId = article.getArticleId() /> 
12<#assign document = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
13<#assign language = themeDisplay.getLocale() /> 
14<#assign companyId =themeDisplay.getCompanyId()/> 
15<#assign groupId = themeDisplay.getScopeGroupId()/> 
16<#assign userId =themeDisplay.getUserId()/> 
17<#assign jaUrlTitle = article.getUrlTitle() /> 
18<#assign url = "https://${request.serverName}/-/${jaUrlTitle}" /> 
19<#assign is_signed_in = themeDisplay.isSignedIn()/> 
20<#assign type = document.valueOf("//dynamic-element[@name='tipo']/dynamic-content/text()")?keep_after('"')?keep_before('"') /> 
21<#assign title = document.valueOf("//dynamic-element[@name='title']/dynamic-content/text()") /> 
22 
23<#assign avilableDownload = ""/> 
24<#assign css = ""/> 
25<#if type == "program"> 
26	<#assign css = "programas"/> 
27<#elseif type == "evidence" || type == "slavin"> 
28	<#assign css = "evidencias"/> 
29<#elseif type == "activity"> 
30	<#assign css = "actividades"/> 
31<#elseif type == "actuality"> 
32	<#assign css = "actualidad"/> 
33<#elseif type == "center"> 
34	<#assign css = "educaixa"/> 
35<#elseif type?contains("training")> 
36	<#assign css = "formacion"/> 
37<#elseif type == "experience"> 
38	<#assign css = "educaixa"/> 
39<#elseif type?contains("resource")> 
40	<#assign css = "recursos"/> 
41</#if> 
42 
43<#assign files = "" /> 
44<#if isBanner == "true"> 
45	<#assign bannerTitle = "" /> 
46	<#assign bannerDescription = "" /> 
47	<#if type == "activity"> 
48		<#assign bannerObj = document.valueOf("//dynamic-element[@name='bannerVideo']/dynamic-content/text()") /> 
49	<#elseif type?contains("resource")> 
50		<#assign docprincipal = document.valueOf("//dynamic-element[@name='docprincipal']/dynamic-content/text()") /> 
51		<#assign siteMeta = UtilsService.getDocumentMetadataInJSON(docprincipal, themeDisplay) /> 
52		<#assign title = document.valueOf("//dynamic-element[@name='titulo']/dynamic-content/text()")?replace('<[^>]+>','','r') /> 
53		<#assign downloable = document.valueOf("//dynamic-element[@name='descargable']/dynamic-content/text()") /> 
54		<#if type?contains("resourceImage") || type?contains("resourceInfograph")> 
55			<#assign files = [docprincipal] /> 
56			<#assign otherImages = document.selectNodes("//dynamic-element[@name='otraimagenficha']") /> 
57			<#if otherImages?has_content && otherImages?size gt 0> 
58				<#list otherImages as otherImg> 
59					<#if otherImg.elementText("dynamic-content")?has_content> 
60						<#assign files = files + [otherImg.elementText("dynamic-content")] /> 
61					</#if> 
62				</#list> 
63			</#if> 
64		<#elseif type?contains("resourcePodcast")> 
65			<#assign file = DLFileEntryLocalService.getFileEntryByUuidAndGroupId(docprincipal?keep_after_last("/")?keep_before("?"),groupId)/> 
66			<#assign mimeType = file.getMimeType()?keep_before("/")/> 
67			<#if mimeType == "audio"> 
68				<#assign bannerObj = docprincipal /> 
69			<#else> 
70				<#if siteMeta.get(0).audio_id?has_content> 
71					<#assign bannerObjYT = siteMeta.get(0).audio_id /> 
72				</#if> 
73			</#if> 
74		<#elseif type?contains("resourceVideo")> 
75			<#assign file = DLFileEntryLocalService.getFileEntryByUuidAndGroupId(docprincipal?keep_after_last("/")?keep_before("?"),groupId)/> 
76			<#assign mimeType = file.getMimeType()?keep_before("/")/> 
77			<#if siteMeta.get(0).brightcove_id?has_content> 
78				<#assign bannerObjYT = siteMeta.get(0).brightcove_id /> 
79			</#if> 
80		</#if> 
81	<#else> 
82		<#assign bannerObjYT = document.valueOf("//dynamic-element[@name='video']/dynamic-element[@name='videoYTBanner']/dynamic-content/text()") /> 
83		<#assign bannerObj = document.valueOf("//dynamic-element[@name='video']/dynamic-content/text()") /> 
84		<#assign bannerTitle = document.valueOf("//dynamic-element[@name='video']/dynamic-element[@name='videoTitle']/dynamic-content/text()") /> 
85		<#assign bannerDescription = document.valueOf("//dynamic-element[@name='video']/dynamic-element[@name='videoDescription']/dynamic-content/text()") /> 
86	</#if> 
87	 
88<#else> 
89    <#-- excperiencias B5--> 
90    <#if type?contains("experience")> 
91		<#assign highlightTitle = document.valueOf("//dynamic-element[@name='highlightTitle']/dynamic-content/text()") /> 
92		<#assign highlightText = document.valueOf("//dynamic-element[@name='highlightTitle']/dynamic-element[@name='highlightText']/dynamic-content/text()") /> 
93		<#assign highlightExternalVideoLink = document.valueOf("//dynamic-element[@name='highlightTitle']/dynamic-element[@name='highlightExternalVideoLink']/dynamic-content/text()") /> 
94    <#else> 
95	    <#assign files = document.selectNodes("//dynamic-element[@name='videoOrImage']") /> 
96    </#if> 
97</#if> 
98 
99<input id="falsa-modal-recurso-comp-id" value="${themeDisplay.getCompanyId()}" type="hidden" /> 
100<input id="falsa-modal-recurso-user-id" value="${themeDisplay.getUserId()}" type="hidden" /> 
101 
102<div id="falsa-modal-recurso"> 
103	<div class="falsa-modal-rec-header"> 
104		<a class="modal-rec-home" href="/home" alt="Home"><img src="/o/edu-caixa-theme/images/logo_eduCaixa.png" alt="EduCaixa" class="logo"></a> 
105		<div class="falsa-modal-rec-header-info"> 
106			<span class="modal-rec-title modal-rec-tit-${css} bold ">${title}</span> 
107		</div> 
108		<#if files?has_content && files?size gt 1> 
109		<div class="slide-counter blanco"> 
110			<span class="blanco"></span> 
111		</div> 
112		</#if> 
113	</div> 
114	<div class="falsa-modal-rec-content"> 
115		<div class="falsa-modal-rec-content-item"> 
116			<#if type?contains("resourceInfograph")> 
117				<#if files?first?has_content> 
118					<img src="${files?first}" /> 
119				</#if> 
120			<#else> 
121				<#if isBanner == "true"> 
122					<#if type?contains("resource")> 
123						<#if files?has_content> 
124						<div class="modal-rec-carrousel-items"> 
125							<#list files as file> 
126								<div class="modal-rec-image-wrapper" data-download="">  
127									<img data-fileentryid="" alt="alt" src="${file}" /> 
128								</div> 
129							</#list> 
130						</div> 
131						<#elseif bannerObjYT?has_content && bannerObjYT != ""> 
132							<div class="yt-video-wrapper modal-rec-yt-wrapper"> 
133								<iframe src="https://www.youtube.com/embed/${bannerObjYT}?rel=0" enablejsapi='1' allowfullscreen webkitallowfullscreen mozallowfullscreen frameborder='0'></iframe> 
134							</div> 
135						<#elseif bannerObj?has_content && bannerObj != ""> 
136							<div class="video-wrapper modal-rec-video-wrapper"> 
137								<video controls="" controlsList="nodownload"> 
138								  <source src="${bannerObj}"> 
139								</video> 
140								<div class="playpause"></div> 
141							</div> 
142						</#if> 
143					<#else> 
144						<#if bannerObjYT?has_content && bannerObjYT != ""> 
145						<#assign avilableDownload = "no-rec-download"/> 
146						<div class="yt-video-wrapper modal-rec-yt-wrapper"> 
147							<iframe src="https://www.youtube.com/embed/${bannerObjYT}?rel=0" enablejsapi='1' allowfullscreen webkitallowfullscreen mozallowfullscreen frameborder='0'></iframe> 
148						</div> 
149						<#elseif bannerObj?has_content && bannerObj != ""> 
150						<div class="video-wrapper modal-rec-video-wrapper" data-download="${bannerObj}"> 
151							<video controls="" controlsList="nodownload"> 
152							  <source src="${bannerObj}"> 
153							</video> 
154							<div class="playpause"></div> 
155						</div> 
156						</#if> 
157					</#if> 
158				<#else> 
159					<#-- experiencias B5--> 
160					<#if  type?contains("experience")> 
161						<#if highlightExternalVideoLink?has_content && highlightExternalVideoLink != ""> 
162							<#assign avilableDownload = "no-rec-download"/>				 
163							<div class="yt-video-wrapper modal-rec-yt-wrapper"> 
164								<iframe src="https://www.youtube.com/embed/${highlightExternalVideoLink}?rel=0" enablejsapi='1' allowfullscreen webkitallowfullscreen mozallowfullscreen frameborder='0'></iframe> 
165							</div> 
166						</#if> 
167					<#else> 
168						<div class="modal-rec-carrousel-items"> 
169						<#list files as file> 
170						    <#attempt> 
171							<#if file.elementText("dynamic-content")?has_content> 
172								<#assign fileContent = DLFileEntryLocalService.getFileEntryByUuidAndGroupId(file.elementText("dynamic-content")?keep_after_last("/")?keep_before("?"),groupId)/> 
173								<#assign mimeType = fileContent.getMimeType()?keep_before("/")/> 
174								<#if mimeType == "image"> 
175									<div class="modal-rec-image-wrapper" data-download="${file.elementText("dynamic-content")}">  
176									 
177										<img data-fileentryid="" alt="alt" src="${file.elementText("dynamic-content")}" /> 
178									</div> 
179								<#elseif mimeType == "video"> 
180									<div class="video-wrapper modal-rec-video-wrapper" data-download="${file.elementText("dynamic-content")}"> 
181										<video controls="" controlsList="nodownload"> 
182										  <source src="${file.elementText("dynamic-content")}" type="${fileContent.getMimeType()}"> 
183										</video> 
184										<div class="playpause"></div> 
185									</div> 
186								</#if> 
187							<#elseif file.valueOf("dynamic-element[@name='youtubeVideo']/dynamic-content/text()")?has_content && file.valueOf("dynamic-element[@name='youtubeVideo']/dynamic-content/text()") != ""> 
188								<#if file?is_first> 
189									<#assign avilableDownload = "no-rec-download"/> 
190								</#if> 
191								<div class="yt-video-wrapper modal-rec-yt-wrapper"> 
192									<iframe src="https://www.youtube.com/embed/${file.valueOf("dynamic-element[@name='youtubeVideo']/dynamic-content/text()")}?rel=0" enablejsapi='1' allowfullscreen webkitallowfullscreen mozallowfullscreen frameborder='0'></iframe> 
193								</div> 
194							</#if> 
195							<#recover> 
196							</#attempt> 
197						</#list> 
198						</div> 
199					</#if>	 
200				</#if> 
201			</#if> 
202			<div class="modal-rec-actions"> 
203				<#if type?contains("resource")> 
204					<#if !downloable?has_content> 
205						<#assign avilableDownload = "no-rec-download"/> 
206						<#assign downloable = ""/> 
207					</#if> 
208					<a href="${downloable}" class="modal-rec-download-but-resource boton small boton-${css} ${avilableDownload} width-100">${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.download")}</a> 
209				<#else> 
210					<a href="" class="modal-rec-download-but boton small boton-${css} ${avilableDownload} width-100">${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.download")}</a> 
211				</#if> 
212				<a class="modal-rec-compartir" data-url="${url}"></a> 
213				<div id="share" class="hide"> 
214					<span class="modal-close"></span> 
215					<p class="negro bold">${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.share")}</p> 
216					<p class="margin-bottom-20">${title}</p> 
217					<div id="share-content"></div> 
218				</div> 
219				<#if is_signed_in> 
220					<#assign isUserBookmark = UserBookmarkLocalService.isUserBookmark(companyId,userId,journalArticleId,groupId)/> 
221					<#if isUserBookmark> 
222						<a class="modal-rec-bookmark bookmarked ${css}" onClick="updateUserBookmark(${journalArticleId},false);" data-articleid="${journalArticleId}"></a>  
223					<#else> 
224						<a class="modal-rec-bookmark ${css}" onClick="updateUserBookmark(${journalArticleId},true);" data-articleid="${journalArticleId}" ></a> 
225					</#if> 
226					<#-- a class="modal-rec-bookmark" data-articleid="${journalArticleId}"></a --> 
227				<#else> 
228					<#assign httpServletRequest = serviceContext.getRequest() /> 
229					<#assign plid = portalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), "EducaixaMyeducaixaLogin") /> 
230					<#assign renderURL = portletURLFactory.create(httpServletRequest, "EducaixaMyeducaixaLogin", plid, "RENDER_PHASE") /> 
231					${renderURL.setParameter("mvcPath", "/login_modal.jsp")} 
232					${renderURL.setWindowState("POP_UP")} 
233					<a class="modal-rec-bookmark not-log" onClick="openPopup('${renderURL}','','500', '650')"></a> 
234				</#if> 
235				<#if (isBanner == "true" && (!bannerTitle?has_content && !bannerDescription?has_content)) || type?contains("activity")> 
236				<#else> 
237					<a class="zoom-in"></a> 
238				</#if> 
239			</div> 
240		</div> 
241					 
242		<#if (type?contains("resource") && files?has_content) || (isBanner=="false" && !type?contains("experience"))> 
243			<div class="falsa-modal-rec-content-info falsa-modal-rec-content-info-slick"> 
244		<#else> 
245			<div class="falsa-modal-rec-content-info"> 
246		</#if> 
247			<#if isBanner == "true"> 
248				<div class="falsa-modal-rec-info-item"> 
249					<p class="negro bold uppercase" style="width:100%;">${bannerTitle}</p> 
250					<p style="width:100%;">${bannerDescription}</p> 
251				</div> 
252			<#else> 
253				<#-- experiencias B5--> 
254				<#if  type?contains("experience")> 
255					<#if highlightTitle?has_content> 
256						<div class="falsa-modal-rec-info-item"> 
257							<p class="negro bold uppercase">${highlightTitle}</p> 
258							<#if highlightText?has_content> 
259								<p>${highlightText}</p> 
260							</#if> 
261						</div> 
262					</#if> 
263				<#else> 
264					<#list files as file> 
265						<#assign fileTitle = "" /> 
266						<#assign fileDescr = "" /> 
267						<#if file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-content/text()")?has_content && file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-content/text()") != ""> 
268							<#assign fileTitle = file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-content/text()") /> 
269						</#if> 
270						<#if file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-element[@name='fileItemDescription']/dynamic-content/text()")?has_content && file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-element[@name='fileItemDescription']/dynamic-content/text()") != ""> 
271							<#assign fileDescr = file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-element[@name='fileItemDescription']/dynamic-content/text()") /> 
272						</#if> 
273						<div class="falsa-modal-rec-info-item"> 
274							<p class="negro bold uppercase">${fileTitle}</p> 
275							<p>${fileDescr}</p> 
276						</div> 
277					</#list> 
278				</#if> 
279			</#if> 
280		</div> 
281	</div> 
282</div> 
283 
284 <#-- Modal confirmacion eliminar--> 
285<div id="modal-confirm-delete" class="close-modal hide"> 
286	<span class="modal-close" onclick="javascript:closeModal();"></span> 
287	<input type="hidden" class="titulo-confirmacion" value="${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.are.you.sure.to.delete")} "> 
288	<#--El titulo y los datos del boton eliminar se rellenan por js --> 
289	<h3 class="center uppercase"></h3>	 
290	<p class=" button-wrapper center"> 
291		<a onClick="closeModal();" class="cancel uppercase boton width-150 margin-top-20 boton-blanco medium margin-bottom-10"> 
292			${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.no.cancel")} 
293		</a> 
294		<a data-articleid="" class="delete uppercase boton width-150 margin-top-20 boton-educaixa medium margin-bottom-10"> 
295			${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.yes.delete")} 
296		</a> 
297	</p> 
298</div> 
299 
300<style> 
301#share { 
302	width: 15rem; 
303	position: fixed; 
304	top: 5rem; 
305	left: 50%; 
306	transform: translateX(-50%); 
307	top: 50%; 
308	transform: translateY(-50%); 
309	padding: 2rem; 
310	background-color: white; 
311	text-align: left; 
312	z-index: 10; 
313
314#share p { 
315	color: $blue-grey; 
316
317#share .jssocials-share { 
318	width: 100%; 
319
320#share .jssocials-share  a { 
321	width: 100%; 
322	text-align: left; 
323	margin: 0 !important; 
324
325#share .jssocials-share  a i { 
326	color: white; 
327
328#share .jssocials-share  a span { 
329	color: white; 
330
331#share .jssocials-share  a .copyLink { 
332	background-color: darkgray; 
333
334 
335#share  .modal-close { 
336	position: absolute; 
337	top: 0; 
338	right: 0; 
339	font-size: 16px; 
340	margin: .5rem; 
341	padding: 2px; 
342	cursor: pointer; 
343
344 
345 
346#falsa-modal-recurso .falsa-modal-rec-info-item p { 
347	color: #607d8b; 
348
349#falsa-modal-recurso .falsa-modal-rec-content-info { 
350	padding: 2rem 3rem; 
351
352	 
353	 
354</style> 
355 
356<script> 
357$('.modal-rec-carrousel-items').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 
358	//var content = $('.slide-counter span').html(); 
359	//var newContent =  (Number(nextSlide)+1) + content.substring(content.indexOf('/'), content.length); 
360	var newContent =  (Number(nextSlide)+1) + "/" + $('.slick-slider')[0].slick.slideCount; 
361	$('.slide-counter span').html(newContent); 
362	 
363	if($('.modal-rec-carrousel-items [data-slick-index = "'+nextSlide+'"] [data-download]').length > 0 && $('.modal-rec-carrousel-items [data-slick-index = "'+nextSlide+'"] [data-download]').data("download") != "") { 
364		var href = $('.modal-rec-carrousel-items [data-slick-index = '+nextSlide+'] [data-download]').data("download"); 
365		$('.modal-rec-download-but').attr('href', href); 
366		$('.modal-rec-download-but').removeClass('no-rec-download'); 
367	} else { 
368		$('.modal-rec-download-but').addClass('no-rec-download'); 
369
370}); 
371 
372$('#banner').addClass('hide'); 
373 
374$(document).ready(function(){ 
375 
376	// Acciones bookmark 
377	var userId = $('#falsa-modal-recurso-user-id').val(); 
378	var companyId = $('#falsa-modal-recurso-comp-id').val(); 
379 
380	/*if (!$('.modal-rec-bookmark').hasClass('not-log')) { 
381		var articleId = $('.modal-rec-bookmark').data('articleid'); 
382		if (isUserBookmark(companyId, userId, articleId) { 
383			$('.modal-rec-bookmark').addClass('bookmarked'); 
384
385	}*/ 
386 
387	/*$('.modal-rec-bookmark').on('click', function() { 
388		if (!$(this).hasClass('not-log')) { 
389			var articleId = $(this).data('articleid'); 
390			if ($(this).hasClass('bookmarked')) { 
391				deleteUserBookmark(companyId, userId, articleId); 
392				$(this).removeClass('bookmarked'); 
393
394			else { 
395				addUserBookmark(companyId, userId, articleId); 
396				$(this).addClass('bookmarked'); 
397
398
399	});*/ 
400 
401	// Contador slides 
402	if ($('.modal-rec-carrousel-items').children().length > 1) { 
403		$('.slide-counter span').html('1/' + $('.modal-rec-carrousel-items').children().length); 
404
405	$('.modal-rec-carrousel-items').slick({ 
406		slidesToShow: 1, 
407		slidesToScroll: 1, 
408		infinite: false, 
409		adaptiveHeight: true, 
410		lazyLoad: 'ondemand', 
411		asNavFor: '.falsa-modal-rec-content-info' 
412	}); 
413	//$('.falsa-modal-rec-content-info').slick({ 
414	$('.falsa-modal-rec-content-info-slick').slick({ 
415		slidesToShow: 1, 
416		slidesToScroll: 1, 
417		infinite: false, 
418		arrows: false, 
419		draggable: false, 
420		speed: 0 
421	}); 
422	// Acciones abrir descripcion elemento 
423	$("#falsa-modal-recurso .zoom-in").on('click', function(){ 
424		if ($(this).hasClass('zoomed')) { 
425			$(this).removeClass('zoomed'); 
426			$('.falsa-modal-rec-content-item').removeClass('open'); 
427			$('.falsa-modal-rec-content-info').removeClass('open'); 
428		} else { 
429			$(this).addClass('zoomed'); 
430			$('.falsa-modal-rec-content-item').addClass('open'); 
431			$('.falsa-modal-rec-content-info').addClass('open'); 
432
433		if ($('.modal-rec-carrousel-items').length) { 
434			if ($('.modal-rec-carrousel-items').hasClass('slick-initialized') && $('.modal-rec-carrousel-items')[0].slick.slideCount > 1) { 
435				var initSlide = Number($('.modal-rec-carrousel-items .slick-active')[0].dataset.slickIndex); 
436				$('.modal-rec-carrousel-items').slick("unslick"); 
437				$('.modal-rec-carrousel-items').slick({ 
438					slidesToShow: 1, 
439					slidesToScroll: 1, 
440					infinite: false, 
441					asNavFor: '.falsa-modal-rec-content-info' 
442				}); 
443				$('.modal-rec-carrousel-items').slick('slickGoTo',parseInt(initSlide),true); 
444			} else { 
445				$('.modal-rec-carrousel-items').slick("unslick"); 
446				$('.modal-rec-carrousel-items').slick({ 
447					slidesToShow: 1, 
448					slidesToScroll: 1, 
449					infinite: false 
450				}); 
451
452
453	}); 
454 
455	// Seteo download  
456	if (!$('.modal-rec-download-but').hasClass('no-rec-download')) { 
457		var href = $("[data-download]")[0].dataset.download; 
458		$('.modal-rec-download-but').attr('href', href); 
459
460	 
461	trimElemAndAddTitleAt($('#falsa-modal-recurso .modal-rec-title'), 60); 
462 
463	$(".modal-rec-compartir").on('click', function (event) { 
464		//event.preventDefault(); 
465		event.stopPropagation(); 
466		var url = $(this).data('url'); 
467		var title = $('#falsa-modal-recurso .modal-rec-title').attr('title'); 
468		var subtitle = $(this).parents('.tarjeta').find('.subtitulo').data('subtitle');  
469 
470		$("#falsa-modal-recurso #share-content").jsSocials({ 
471			url: url, 
472			text: title + ": " + subtitle, 
473			showCount: false, 
474			showLabel: true, 
475			shares: [ { share: "facebook", label: "Facebook" },  
476					  { share: "twitter", label: "Twitter", shareUrl: "https://twitter.com/share?url={url}&via={via}&hashtags={hashtags}", hashtags: "EduCaixa" },  
477					  { share: "email", label: "E-mail", shareUrl: "mailto:{to}?subject={text}&body={url}"},  
478					  "whatsapp"] 
479		}); 
480		if(!isMobile()) { 
481			$('#falsa-modal-recurso .jssocials-share-whatsapp').addClass("hide"); 
482
483		var buttonCopy = "<div class='jssocials-share' style='background-color: gray;'><a class='copyLink jssocials-share-link' onclick='copyCardLink($(this));'><i class='fa fa-copy jssocials-share-logo'></i><span class='jssocials-share-label'>Copiar enlace</span></a></div>"; 
484		$(".jssocials-share-whatsapp").after(buttonCopy); 
485		$(this).next().removeClass("hide");	 
486	}); 
487 
488	$("#falsa-modal-recurso #share .modal-close").on('click', function (event) { 
489 
490		$("#falsa-modal-recurso #share").addClass("hide"); 
491	}); 
492 
493}); 
494</script>