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							<#if file.elementText("dynamic-content")?has_content> 
171								<#assign fileContent = DLFileEntryLocalService.getFileEntryByUuidAndGroupId(file.elementText("dynamic-content")?keep_after_last("/")?keep_before("?"),groupId)/> 
172								<#assign mimeType = fileContent.getMimeType()?keep_before("/")/> 
173								<#if mimeType == "image"> 
174									<div class="modal-rec-image-wrapper" data-download="${file.elementText("dynamic-content")}">  
175									 
176										<img data-fileentryid="" alt="alt" src="${file.elementText("dynamic-content")}" /> 
177									</div> 
178								<#elseif mimeType == "video"> 
179									<div class="video-wrapper modal-rec-video-wrapper" data-download="${file.elementText("dynamic-content")}"> 
180										<video controls="" controlsList="nodownload"> 
181										  <source src="${file.elementText("dynamic-content")}" type="${fileContent.getMimeType()}"> 
182										</video> 
183										<div class="playpause"></div> 
184									</div> 
185								</#if> 
186							<#elseif file.valueOf("dynamic-element[@name='youtubeVideo']/dynamic-content/text()")?has_content && file.valueOf("dynamic-element[@name='youtubeVideo']/dynamic-content/text()") != ""> 
187								<#if file?is_first> 
188									<#assign avilableDownload = "no-rec-download"/> 
189								</#if> 
190								<div class="yt-video-wrapper modal-rec-yt-wrapper"> 
191									<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> 
192								</div> 
193							</#if> 
194						</#list> 
195						</div> 
196					</#if>	 
197				</#if> 
198			</#if> 
199			<div class="modal-rec-actions"> 
200				<#if type?contains("resource")> 
201					<#if !downloable?has_content> 
202						<#assign avilableDownload = "no-rec-download"/> 
203						<#assign downloable = ""/> 
204					</#if> 
205					<a href="${downloable}" class="modal-rec-download-but-resource boton small boton-${css} ${avilableDownload} width-100">${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.download")}</a> 
206				<#else> 
207					<a href="" class="modal-rec-download-but boton small boton-${css} ${avilableDownload} width-100">${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.download")}</a> 
208				</#if> 
209				<a class="modal-rec-compartir" data-url="${url}"></a> 
210				<div id="share" class="hide"> 
211					<span class="modal-close"></span> 
212					<p class="negro bold">${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.share")}</p> 
213					<p class="margin-bottom-20">${title}</p> 
214					<div id="share-content"></div> 
215				</div> 
216				<#if is_signed_in> 
217					<#assign isUserBookmark = UserBookmarkLocalService.isUserBookmark(companyId,userId,journalArticleId,groupId)/> 
218					<#if isUserBookmark> 
219						<a class="modal-rec-bookmark bookmarked ${css}" onClick="updateUserBookmark(${journalArticleId},false);" data-articleid="${journalArticleId}"></a>  
220					<#else> 
221						<a class="modal-rec-bookmark ${css}" onClick="updateUserBookmark(${journalArticleId},true);" data-articleid="${journalArticleId}" ></a> 
222					</#if> 
223					<#-- a class="modal-rec-bookmark" data-articleid="${journalArticleId}"></a --> 
224				<#else> 
225					<#assign httpServletRequest = serviceContext.getRequest() /> 
226					<#assign plid = portalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), "EducaixaMyeducaixaLogin") /> 
227					<#assign renderURL = portletURLFactory.create(httpServletRequest, "EducaixaMyeducaixaLogin", plid, "RENDER_PHASE") /> 
228					${renderURL.setParameter("mvcPath", "/login_modal.jsp")} 
229					${renderURL.setWindowState("POP_UP")} 
230					<a class="modal-rec-bookmark not-log" onClick="openPopup('${renderURL}','','500', '650')"></a> 
231				</#if> 
232				<#if (isBanner == "true" && (!bannerTitle?has_content && !bannerDescription?has_content)) || type?contains("activity")> 
233				<#else> 
234					<a class="zoom-in"></a> 
235				</#if> 
236			</div> 
237		</div> 
238					 
239		<#if (type?contains("resource") && files?has_content) || (isBanner=="false" && !type?contains("experience"))> 
240			<div class="falsa-modal-rec-content-info falsa-modal-rec-content-info-slick"> 
241		<#else> 
242			<div class="falsa-modal-rec-content-info"> 
243		</#if> 
244			<#if isBanner == "true"> 
245				<div class="falsa-modal-rec-info-item"> 
246					<p class="negro bold uppercase" style="width:100%;">${bannerTitle}</p> 
247					<p style="width:100%;">${bannerDescription}</p> 
248				</div> 
249			<#else> 
250				<#-- experiencias B5--> 
251				<#if  type?contains("experience")> 
252					<#if highlightTitle?has_content> 
253						<div class="falsa-modal-rec-info-item"> 
254							<p class="negro bold uppercase">${highlightTitle}</p> 
255							<#if highlightText?has_content> 
256								<p>${highlightText}</p> 
257							</#if> 
258						</div> 
259					</#if> 
260				<#else> 
261					<#list files as file> 
262						<#assign fileTitle = "" /> 
263						<#assign fileDescr = "" /> 
264						<#if file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-content/text()")?has_content && file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-content/text()") != ""> 
265							<#assign fileTitle = file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-content/text()") /> 
266						</#if> 
267						<#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()") != ""> 
268							<#assign fileDescr = file.valueOf("dynamic-element[@name='fileItemTitle']/dynamic-element[@name='fileItemDescription']/dynamic-content/text()") /> 
269						</#if> 
270						<div class="falsa-modal-rec-info-item"> 
271							<p class="negro bold uppercase">${fileTitle}</p> 
272							<p>${fileDescr}</p> 
273						</div> 
274					</#list> 
275				</#if> 
276			</#if> 
277		</div> 
278	</div> 
279</div> 
280 
281 <#-- Modal confirmacion eliminar--> 
282<div id="modal-confirm-delete" class="close-modal hide"> 
283	<span class="modal-close" onclick="javascript:closeModal();"></span> 
284	<input type="hidden" class="titulo-confirmacion" value="${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.are.you.sure.to.delete")} "> 
285	<#--El titulo y los datos del boton eliminar se rellenan por js --> 
286	<h3 class="center uppercase"></h3>	 
287	<p class=" button-wrapper center"> 
288		<a onClick="closeModal();" class="cancel uppercase boton width-150 margin-top-20 boton-blanco medium margin-bottom-10"> 
289			${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.no.cancel")} 
290		</a> 
291		<a data-articleid="" class="delete uppercase boton width-150 margin-top-20 boton-educaixa medium margin-bottom-10"> 
292			${LiteralsToolsServiceUtil.getLiteral(groupId, language, "com.educaixa.yes.delete")} 
293		</a> 
294	</p> 
295</div> 
296 
297<style> 
298#share { 
299	width: 15rem; 
300	position: fixed; 
301	top: 5rem; 
302	left: 50%; 
303	transform: translateX(-50%); 
304	top: 50%; 
305	transform: translateY(-50%); 
306	padding: 2rem; 
307	background-color: white; 
308	text-align: left; 
309	z-index: 10; 
310
311#share p { 
312	color: $blue-grey; 
313
314#share .jssocials-share { 
315	width: 100%; 
316
317#share .jssocials-share  a { 
318	width: 100%; 
319	text-align: left; 
320	margin: 0 !important; 
321
322#share .jssocials-share  a i { 
323	color: white; 
324
325#share .jssocials-share  a span { 
326	color: white; 
327
328#share .jssocials-share  a .copyLink { 
329	background-color: darkgray; 
330
331 
332#share  .modal-close { 
333	position: absolute; 
334	top: 0; 
335	right: 0; 
336	font-size: 16px; 
337	margin: .5rem; 
338	padding: 2px; 
339	cursor: pointer; 
340
341 
342 
343#falsa-modal-recurso .falsa-modal-rec-info-item p { 
344	color: #607d8b; 
345
346#falsa-modal-recurso .falsa-modal-rec-content-info { 
347	padding: 2rem 3rem; 
348
349	 
350	 
351</style> 
352 
353<script> 
354$('.modal-rec-carrousel-items').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 
355	//var content = $('.slide-counter span').html(); 
356	//var newContent =  (Number(nextSlide)+1) + content.substring(content.indexOf('/'), content.length); 
357	var newContent =  (Number(nextSlide)+1) + "/" + $('.slick-slider')[0].slick.slideCount; 
358	$('.slide-counter span').html(newContent); 
359	 
360	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") != "") { 
361		var href = $('.modal-rec-carrousel-items [data-slick-index = '+nextSlide+'] [data-download]').data("download"); 
362		$('.modal-rec-download-but').attr('href', href); 
363		$('.modal-rec-download-but').removeClass('no-rec-download'); 
364	} else { 
365		$('.modal-rec-download-but').addClass('no-rec-download'); 
366
367}); 
368 
369$('#banner').addClass('hide'); 
370 
371$(document).ready(function(){ 
372 
373	// Acciones bookmark 
374	var userId = $('#falsa-modal-recurso-user-id').val(); 
375	var companyId = $('#falsa-modal-recurso-comp-id').val(); 
376 
377	/*if (!$('.modal-rec-bookmark').hasClass('not-log')) { 
378		var articleId = $('.modal-rec-bookmark').data('articleid'); 
379		if (isUserBookmark(companyId, userId, articleId) { 
380			$('.modal-rec-bookmark').addClass('bookmarked'); 
381
382	}*/ 
383 
384	/*$('.modal-rec-bookmark').on('click', function() { 
385		if (!$(this).hasClass('not-log')) { 
386			var articleId = $(this).data('articleid'); 
387			if ($(this).hasClass('bookmarked')) { 
388				deleteUserBookmark(companyId, userId, articleId); 
389				$(this).removeClass('bookmarked'); 
390
391			else { 
392				addUserBookmark(companyId, userId, articleId); 
393				$(this).addClass('bookmarked'); 
394
395
396	});*/ 
397 
398	// Contador slides 
399	if ($('.modal-rec-carrousel-items').children().length > 1) { 
400		$('.slide-counter span').html('1/' + $('.modal-rec-carrousel-items').children().length); 
401
402	$('.modal-rec-carrousel-items').slick({ 
403		slidesToShow: 1, 
404		slidesToScroll: 1, 
405		infinite: false, 
406		adaptiveHeight: true, 
407		lazyLoad: 'ondemand', 
408		asNavFor: '.falsa-modal-rec-content-info' 
409	}); 
410	//$('.falsa-modal-rec-content-info').slick({ 
411	$('.falsa-modal-rec-content-info-slick').slick({ 
412		slidesToShow: 1, 
413		slidesToScroll: 1, 
414		infinite: false, 
415		arrows: false, 
416		draggable: false, 
417		speed: 0 
418	}); 
419	// Acciones abrir descripcion elemento 
420	$("#falsa-modal-recurso .zoom-in").on('click', function(){ 
421		if ($(this).hasClass('zoomed')) { 
422			$(this).removeClass('zoomed'); 
423			$('.falsa-modal-rec-content-item').removeClass('open'); 
424			$('.falsa-modal-rec-content-info').removeClass('open'); 
425		} else { 
426			$(this).addClass('zoomed'); 
427			$('.falsa-modal-rec-content-item').addClass('open'); 
428			$('.falsa-modal-rec-content-info').addClass('open'); 
429
430		if ($('.modal-rec-carrousel-items').length) { 
431			if ($('.modal-rec-carrousel-items').hasClass('slick-initialized') && $('.modal-rec-carrousel-items')[0].slick.slideCount > 1) { 
432				var initSlide = Number($('.modal-rec-carrousel-items .slick-active')[0].dataset.slickIndex); 
433				$('.modal-rec-carrousel-items').slick("unslick"); 
434				$('.modal-rec-carrousel-items').slick({ 
435					slidesToShow: 1, 
436					slidesToScroll: 1, 
437					infinite: false, 
438					asNavFor: '.falsa-modal-rec-content-info' 
439				}); 
440				$('.modal-rec-carrousel-items').slick('slickGoTo',parseInt(initSlide),true); 
441			} else { 
442				$('.modal-rec-carrousel-items').slick("unslick"); 
443				$('.modal-rec-carrousel-items').slick({ 
444					slidesToShow: 1, 
445					slidesToScroll: 1, 
446					infinite: false 
447				}); 
448
449
450	}); 
451 
452	// Seteo download  
453	if (!$('.modal-rec-download-but').hasClass('no-rec-download')) { 
454		var href = $("[data-download]")[0].dataset.download; 
455		$('.modal-rec-download-but').attr('href', href); 
456
457	 
458	trimElemAndAddTitleAt($('#falsa-modal-recurso .modal-rec-title'), 60); 
459 
460	$(".modal-rec-compartir").on('click', function (event) { 
461		//event.preventDefault(); 
462		event.stopPropagation(); 
463		var url = $(this).data('url'); 
464		var title = $('#falsa-modal-recurso .modal-rec-title').attr('title'); 
465		var subtitle = $(this).parents('.tarjeta').find('.subtitulo').data('subtitle');  
466 
467		$("#falsa-modal-recurso #share-content").jsSocials({ 
468			url: url, 
469			text: title + ": " + subtitle, 
470			showCount: false, 
471			showLabel: true, 
472			shares: [ { share: "facebook", label: "Facebook" },  
473					  { share: "twitter", label: "Twitter", shareUrl: "https://twitter.com/share?url={url}&via={via}&hashtags={hashtags}", hashtags: "EduCaixa" },  
474					  { share: "email", label: "E-mail", shareUrl: "mailto:{to}?subject={text}&body={url}"},  
475					  "whatsapp"] 
476		}); 
477		if(!isMobile()) { 
478			$('#falsa-modal-recurso .jssocials-share-whatsapp').addClass("hide"); 
479
480		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>"; 
481		$(".jssocials-share-whatsapp").after(buttonCopy); 
482		$(this).next().removeClass("hide");	 
483	}); 
484 
485	$("#falsa-modal-recurso #share .modal-close").on('click', function (event) { 
486 
487		$("#falsa-modal-recurso #share").addClass("hide"); 
488	}); 
489 
490}); 
491</script>