SMS edo posta elektroniko bidez informazioa jaso nahi izanez gero kazetarientzako izen-emate atalean sar zaitez.

Errorea gertatu da txantiloia prozesatzerakoan.
Java method "com.sun.proxy.$Proxy426.getEvents(String)" threw an exception when invoked on com.sun.proxy.$Proxy426 object "net.bizkaia.bipo.pressarea.service.impl.BipoEventLocalServiceImpl@133d763d"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign events = service.getEvents(lo...  [in template "842907#842945#880207" at line 2, column 1]
----
1<#assign service = serviceLocator.findService("net.bizkaia.bipo.pressarea.service.BipoEventLocalService")> 
2<#assign events = service.getEvents(locale)> 
3<#assign portletNamespace = themeDisplay.getPortletDisplay().getId() + '_' > 
4 
5<link href="http://addtocalendar.com/atc/1.5/atc-style-blue.css" rel="stylesheet" type="text/css" /> 
6<script type="text/javascript"> 
7    /*(function () { 
8        if (window.addtocalendar)if(typeof window.addtocalendar.start == "function")return; 
9        if (window.ifaddtocalendar == undefined) { window.ifaddtocalendar = 1; 
10        var d = document, s = d.createElement('script'), g = 'getElementsByTagName'; 
11        s.type = 'text/javascript';s.charset = 'UTF-8';s.async = true; 
12        s.src = ('https:' == window.location.protocol ? 'https' : 'http')+'://addtocalendar.com/atc/1.5/atc.min.js'; 
13        var h = d[g]('body')[0];h.appendChild(s); }})();*/ 
14</script> 
15 
16<#assign aDateTime = .now> 
17<#assign aDate = aDateTime?date> 
18<#assign dateMili = aDate?long> 
19<#assign dateMili = dateMili + 86400000> 
20<#assign aDateTomorrow = dateMili?number_to_datetime> 
21<#assign aDateTomorrow = aDateTomorrow?date> 
22 
23 
24<#if events?has_content> 
25    <#list events as event> 
26        <#assign tomorrow = false> 
27         
28        <#if (event.getFechaInicio()?string["d MMMM yyyy"] == aDate?string["d MMMM yyyy"] || (event.getFechaInicio()?date lt aDate && event.getFechaFin()?date gte aDate))> 
29            <#if todayEvents?has_content> 
30                <#assign todayEvents = todayEvents + [event]> 
31            <#else> 
32                <#assign todayEvents = [event]> 
33            </#if> 
34        </#if> 
35        <#if (event.getFechaInicio()?string["d MMMM yyyy"] == aDateTomorrow?string["d MMMM yyyy"])> 
36            <#assign tomorrow = true> 
37            <#if tomorrowEvents?has_content> 
38                <#assign tomorrowEvents = tomorrowEvents + [event]> 
39            <#else> 
40                <#assign tomorrowEvents = [event]> 
41            </#if> 
42        </#if> 
43        <#if (!tomorrow && event.getFechaInicio()?date gt aDateTomorrow)> 
44            <#if nextDaysEvents?has_content> 
45                <#assign nextDaysEvents = nextDaysEvents + [event]> 
46            <#else> 
47                <#assign nextDaysEvents = [event]> 
48            </#if> 
49        </#if> 
50    </#list> 
51</#if> 
52 
53<div class="container_fullgray bipo_Agenda"> 
54  <div class="container"> 
55    <div class="row"> 
56      <div class="col-xxs-12 col-xxs-offset-0  col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-12 col-md-offset-0"> 
57        <h2> 
58            <a href="#" class="mostrar_ocultar"> 
59                <span class="sr-only plegarTexto"><@liferay.language key="dpt-parrafos-titulados.show-less" /></span> 
60                <span id="${portletNamespace}plegar1" class="bipoicon icon-plegar"></span>  
61                <span class="bipo_acordeon_dia">  
62                    <@liferay.language key="agenda-all.today" />  
63                    <span class="bipo_negro" > 
64                        <!--${aDate?string["d MMMM"]}--> 
65                        ${getDateToText(aDate?long)} 
66                    </span> 
67                </span> 
68            </a>  
69          <!--INICIO DIV ACORDEON-->  
70        </h2> 
71        <div id="${portletNamespace}caja_hoy" class="bide_contenidoagenda"> 
72        <#if todayEvents?has_content> 
73              <div class="row"> 
74                <ul> 
75                    <#assign cont = 1> 
76                    <#list todayEvents as event> 
77                        <#if validator.isNotNull(event)> 
78                            <li class="col-xxs-12 col-xs-12 col-sm-6 col-md-4" <#if (cont > 9)> style="display:none;" </#if>> 
79                                <div class="bipo_zuria"> 
80                                  <h3> <span class="bipo_hora">${event.getFechaInicio()?string["HH:mm"]}</span> <span class="bipo-agenda-titulo">${event.getTitulo()}</span> </h3> 
81                                  <p class="bipo-agenda-texto"> ${event.getDescripcion()}</p> 
82                                  <p> <span class="bipoicon icon-localizador"><span class="sr-only"><@liferay.language key="agenda-all.place" /></span></span><span class="bipo_datos_lugar"> ${event.getLugar()}</span> </p> 
83                                  <p>  
84                                    <span class="bipo_anadir_agenda"> 
85                                        <span class="bipoicon icon-calendario"></span> 
86                                    </span> 
87                                  </p> 
88                                    <div class="addtocalendar" 
89                                     data-calendars="iCalendar, Google Calendar, Outlook, Outlook Online, Yahoo! Calendar" 
90                                     data-dropdownLinkClass="dropdown-toggle bipo_anadir_agenda" 
91                                     data-dropdownLinkAttrs="[{'key':'data-toggle','value':'dropdown'}]" 
92                                     data-dropdownMenuClass="dropdown-menu" 
93                                     data-dropdownMenuType="ul" 
94                                     data-dropdownMenuItemClass="" 
95                                     data-dropdownMenuItemType="li" 
96                                     data-dropdownMenuItemLinkClass="dropdown-item"> 
97                                         
98                                        <var class="atc_event hidden"> 
99                                            <var class="atc_date_start">${event.getFechaInicio()}</var> 
100                                            <var class="atc_date_end">${event.getFechaFin()?string["HH:mm"]}</var> 
101                                            <var class="atc_timezone">Europe/Madrid</var> 
102                                            <var class="atc_title">${event.getTitulo()}</var> 
103                                            <var class="atc_description">${event.getDescripcion()}</var> 
104                                            <var class="atc_location">${event.getLugar()}</var> 
105                                        </var> 
106                                    </div> 
107                             
108                        </div> 
109                    </li> 
110                              <#assign cont = cont+1> 
111                        </#if> 
112                    </#list> 
113                </ul> 
114          </div> 
115           
116          <#if (todayEvents?size > 9)> 
117            <div class="row"> 
118                <div class="col-md-12"> <a class="btn btn-defaultwhite" href="#" role="button"><@liferay.language key="agenda-all.more-events" /></a> </div> 
119            </div> 
120          </#if> 
121         
122        <#else> 
123            <p><@liferay.language key="agenda-all.no-events" /></p> 
124        </#if> 
125        </div> 
126 
127 
128<h2> 
129    <a href="#" class="mostrar_ocultar">  
130        <span class="sr-only plegarTexto"><@liferay.language key="dpt-parrafos-titulados.show-less" /></span> 
131        <span id="${portletNamespace}plegar2" class="bipoicon icon-plegar"></span>  
132        <span class="bipo_acordeon_dia">  
133            <@liferay.language key="agenda-all.tomorrow" />  
134            <span class="bipo_negro"> 
135                <!--${aDateTomorrow?string["d MMMM"]}--> 
136                 ${getDateToText(aDateTomorrow?long)} 
137            </span> 
138        </span> 
139    </a> 
140</h2> 
141<div id="${portletNamespace}caja_maniana" class="bide_contenidoagenda"> 
142<#if tomorrowEvents?has_content> 
143    <div class="row"> 
144        <ul> 
145            <#assign cont = 1> 
146            <#list tomorrowEvents as event> 
147                <#if validator.isNotNull(event)> 
148                    <li class="col-xxs-12 col-xs-12 col-sm-6 col-md-4" <#if (cont > 9)> style="display:none;" </#if>> 
149                        <div class="bipo_zuria"> 
150                          <h3> <span class="bipo_hora">${event.getFechaInicio()?string["HH:mm"]}</span> <span class="bipo-agenda-titulo">${event.getTitulo()}</span> </h3> 
151                          <p class="bipo-agenda-texto">${event.getDescripcion()}</p> 
152                          <p> <span class="bipoicon icon-localizador"><span class="sr-only"><@liferay.language key="agenda-all.place" /></span></span><span class="bipo_datos_lugar"> ${event.getLugar()}</span> </p> 
153                          <p>  
154                            <span class="bipo_anadir_agenda"> 
155                                <span class="bipoicon icon-calendario"></span> 
156                            </span> 
157                          </p> 
158                          
159                            <div class="addtocalendar" 
160                             data-calendars="iCalendar, Google Calendar, Outlook, Outlook Online, Yahoo! Calendar" 
161                             data-dropdownLinkClass="dropdown-toggle bipo_anadir_agenda" 
162                             data-dropdownLinkAttrs="[{'key':'data-toggle','value':'dropdown'}]" 
163                             data-dropdownMenuClass="dropdown-menu" 
164                             data-dropdownMenuType="ul" 
165                             data-dropdownMenuItemClass="" 
166                             data-dropdownMenuItemType="li" 
167                             data-dropdownMenuItemLinkClass="dropdown-item"> 
168                                 
169                                <var class="atc_event hidden"> 
170                                    <var class="atc_date_start">${event.getFechaInicio()}</var> 
171                                    <var class="atc_date_end">${event.getFechaFin()}</var> 
172                                    <var class="atc_timezone">Europe/Madrid</var> 
173                                    <var class="atc_title">${event.getTitulo()}</var> 
174                                    <var class="atc_description">${event.getDescripcion()}</var> 
175                                    <var class="atc_location">${event.getLugar()}</var> 
176                                </var> 
177                            </div> 
178                        </div> 
179                    </li> 
180                      <#assign cont = cont+1> 
181                </#if> 
182            </#list> 
183        </ul> 
184      </div> 
185       
186      <#if (tomorrowEvents?size > 9)> 
187        <div class="row"> 
188            <div class="col-md-12"> <a class="btn btn-defaultwhite" href="#" role="button"><@liferay.language key="agenda-all.more-events" /></a> </div> 
189        </div> 
190      </#if> 
191 
192<#else> 
193    <p><@liferay.language key="agenda-all.no-events" /></p> 
194</#if> 
195</div> 
196<#if (events?size > 9)> 
197    <div class="row"> 
198        <div class="col-md-12"> <a class="btn btn-defaultwhite" href="#" role="button"><@liferay.language key="agenda-all.more-events" /></a> </div> 
199    </div> 
200</#if> 
201 
202<h2> <a href="#" class="mostrar_ocultar"> <span class="sr-only plegarTexto"><@liferay.language key="dpt-parrafos-titulados.show-less" /></span><span id="${portletNamespace}plegar3" class="bipoicon icon-plegar"></span> <span class="bipo_acordeon_dia"> <@liferay.language key="agenda-all.nextDays" /></span></a>  
203</h2> 
204          <!--INICIO DIV ACORDEON-->  
205        <div id="${portletNamespace}caja_proximos" class="bide_contenidoagenda"> 
206        <#if nextDaysEvents?has_content> 
207          <div class="row"> 
208            <ul> 
209                <#assign cont = 1> 
210                <#list nextDaysEvents as event> 
211                    <li class="col-xxs-12 col-xs-12 col-sm-6 col-md-4" <#if (cont > 9)> style="display:none;" </#if>> 
212                        <div class="bipo_zuria"> 
213                            <!--${event.getFechaInicio()?string["d MMMM"]}--> 
214                          <h3><span class="bipo-dia">${getDateToText(event.getFechaInicio()?long)}</span> <span class="bipo_hora">${event.getFechaInicio()?string["HH:mm"]}</span> <span class="bipo-agenda-titulo">${event.getTitulo()}</span> </h3> 
215                          <p class="bipo-agenda-texto"> ${event.getDescripcion()}</p> 
216                          <p> <span class="bipoicon icon-localizador"><span class="sr-only"><@liferay.language key="agenda-all.place" /></span></span><span class="bipo_datos_lugar"> ${event.getLugar()}</span> </p> 
217                          <p>  
218                            <span class="bipo_anadir_agenda"> 
219                                <span class="bipoicon icon-calendario"></span> 
220                            </span> 
221                          </p> 
222                          
223                            <div class="addtocalendar" 
224                             data-calendars="iCalendar, Google Calendar, Outlook, Outlook Online, Yahoo! Calendar" 
225                             data-dropdownLinkClass="dropdown-toggle bipo_anadir_agenda" 
226                             data-dropdownLinkAttrs="[{'key':'data-toggle','value':'dropdown'}]" 
227                             data-dropdownMenuClass="dropdown-menu" 
228                             data-dropdownMenuType="ul" 
229                             data-dropdownMenuItemClass="" 
230                             data-dropdownMenuItemType="li" 
231                             data-dropdownMenuItemLinkClass="dropdown-item"> 
232                                 
233                                <var class="atc_event hidden"> 
234                                    <var class="atc_date_start">${event.getFechaInicio()}</var> 
235                                    <var class="atc_date_end">${event.getFechaFin()}</var> 
236                                    <var class="atc_timezone">Europe/Madrid</var> 
237                                    <var class="atc_title">${event.getTitulo()}</var> 
238                                    <var class="atc_description">${event.getDescripcion()}</var> 
239                                    <var class="atc_location">${event.getLugar()}</var> 
240                                </var> 
241                            </div> 
242                        </div> 
243                    </li> 
244                    <#assign cont = cont+1> 
245                </#list> 
246            </ul> 
247        </div> 
248         
249        <#if (nextDaysEvents?size > 9)> 
250            <div class="row"> 
251                <div class="col-md-12"> <a class="btn btn-defaultwhite moreEvents" href="#" role="button"><@liferay.language key="agenda-all.more-events" /></a> </div> 
252            </div> 
253        </#if> 
254    <#else> 
255        <p><@liferay.language key="agenda-all.no-events" /></p> 
256    </#if> 
257    </div> 
258     
259</div> 
260</div> 
261</div> 
262</div> 
263 
264<script> 
265$(".moreEvents").click(function(e) { 
266    e.preventDefault(); 
267    var ul = $(this).parent().parent().prev().find().first(); 
268    var cont = 0; 
269    var final = false 
270    $(ul).find("> li").each(function(index, value) { 
271        if (cont <3){ 
272            if ($(value).css("display") == "none"){ 
273                $(value).show(500); 
274                cont++; 
275
276        }else{ 
277            return; 
278
279        if ($(ul).find("> li").length - 1 == index){ 
280            final = true; 
281
282    }); 
283    if (final){ 
284        $(this).hide(500); 
285
286}); 
287 
288<!-- FUNCION PLEGAR DEPLEGAR ELEMENTO-->  
289$('.mostrar_ocultar').click(function(e) { 
290     e.preventDefault(); 
291     $(this).parent().next().toggle(500); 
292    if ($(this).find(".bipoicon").hasClass("icon-plegar")){ 
293        $(this).find(".bipoicon").removeClass("icon-plegar"); 
294		$(this).find(".bipoicon").addClass("icon-desplegar"); 
295		$(this).find(".plegarTexto").html("<@liferay.language key="dpt-parrafos-titulados.show-more" />"); 
296    }else{ 
297        $(this).find(".bipoicon").removeClass("icon-desplegar"); 
298		$(this).find(".bipoicon").addClass("icon-plegar"); 
299		$(this).find(".plegarTexto").html("<@liferay.language key="dpt-parrafos-titulados.show-less" />"); 
300
301}); 
302	 
303$(".bipo_anadir_agenda").click(function(e) { 
304    e.preventDefault(); 
305}); 
306</script> 
307 
308<script> 
309(function (w, d) { 
310  var 
311      atc_url = '//addtocalendar.com/atc/', 
312      atc_version = '1.5'; 
313 
314 
315  if (!Array.indexOf) { 
316      Array.prototype.indexOf = function (obj) { 
317          for (var i = 0, l = this.length; i < l; i++) { 
318              if (this[i] == obj) { 
319                  return i 
320
321
322          return -1 
323
324
325 
326  if (!Array.prototype.map) { 
327      Array.prototype.map = function (f) { 
328          var result = []; 
329          for (var i = 0, l = this.length; i < l; i++) { 
330              result.push(f(this[i])) 
331
332          return result 
333
334
335 
336  var isArray = function (obj) { 
337      return Object.prototype.toString.call(obj) === "[object Array]" 
338  }; 
339 
340  var isFunc = function (obj) { 
341      return Object.prototype.toString.call(obj) === "[object Function]" 
342  }; 
343 
344  var ready = function (w, d) { 
345      var inited = false, 
346          loaded = false, 
347          queue = [], 
348          done, old; 
349 
350      function go() { 
351          if (!inited) { 
352              if (!d.body) return setTimeout(go, 13); 
353              inited = true; 
354              if (queue) { 
355                  var j, k = 0; 
356                  while (j = queue[k++]) j.call(null); 
357                  queue = null 
358
359
360
361 
362      function check() { 
363          if (loaded) return; 
364          loaded = true; 
365          if (d.readyState === "complete") return go(); 
366          if (d.addEventListener) { 
367              d.addEventListener("DOMContentLoaded", done, false); 
368              w.addEventListener("load", go, false) 
369          } else { 
370              if (d.attachEvent) { 
371                  d.attachEvent("onreadystatechange", done); 
372                  w.attachEvent("onload", go); 
373                  var k = false; 
374                  try { 
375                      k = w.frameElement == null 
376                  } catch (j) {} 
377                  if (b.doScroll && k) ie() 
378              } else { 
379                  old = w.onload; 
380                  w.onload = function (e) { 
381                      old(e); 
382                      go() 
383
384
385
386
387      if (d.addEventListener) { 
388          done = function () { 
389              d.removeEventListener("DOMContentLoaded", done, false); 
390              go() 
391
392      } else { 
393          if (d.attachEvent) { 
394              done = function () { 
395                  if (d.readyState === "complete") { 
396                      d.detachEvent("onreadystatechange", done); 
397                      go() 
398
399
400
401
402 
403      function ie() { 
404          if (inited) return; 
405          try { 
406              b.doScroll("left") 
407          } catch (j) { 
408              setTimeout(ie, 1); 
409              return 
410
411          go() 
412
413      return function (callback) { 
414          check(); 
415          if (inited) { 
416              callback.call(null) 
417          } else { 
418              queue.push(callback) 
419
420
421  }(w, d); 
422 
423  Object.size = function (obj) { 
424      var size = 0, key; 
425      for (key in obj) { 
426          if (obj.hasOwnProperty(key)) size++; 
427
428      return size; 
429  }; 
430 
431  if (w.addtocalendar && typeof w.addtocalendar.start == "function") return; 
432  if (!w.addtocalendar) w.addtocalendar = {}; 
433 
434  addtocalendar.languages = { 
435      'de': 'In den Kalender', 
436      'en': 'Add to Calendar', 
437      'es': '<@liferay.language key="agenda-all.add-to-agenda" />', 
438      'eu': '<@liferay.language key="agenda-all.add-to-agenda" />', 
439      'fr': 'Ajouter au calendrier', 
440      'hi': 'कैलेंडर में जोड़ें', 
441      'in': 'Tambahkan ke Kalender', 
442      'ja': 'カレンダーに追加', 
443      'ko': '캘린더에 추가', 
444      'pt': 'Adicionar ao calendário', 
445      'ru': 'Добавить в календарь', 
446      'uk': 'Додати в календар', 
447      'zh': '添加到日历' 
448  }; 
449 
450  addtocalendar.calendar_urls = { 
451 
452
453 
454  addtocalendar.loadSettings = function(element){ 
455      var settings = { 
456          'language':'auto', 
457          'show-list-on':'click', 
458          'calendars':[ 
459              'iCalendar', 
460              'Google Calendar', 
461              'Outlook', 
462              'Outlook Online', 
463              'Yahoo! Calendar' 
464          ], 
465          'secure': 'auto', 
466 
467          // Added extensibility for bootstrap support. 
468          'dropdownLinkClass': 'atcb-link', // btn btn-secondary dropdown-toggle 
469          'dropdownLinkAttrs': [], // { key: 'data-toggle', value: 'dropdown' } 
470          'dropdownMenuClass': 'atcb-list', // dropdown-menu 
471          'dropdownMenuType': 'ul', // ul, div 
472          'dropdownMenuItemClass': '',  
473          'dropdownMenuItemType': 'li', // li, div, none 
474          'dropdownMenuItemLinkClass': 'atcb-item-link', // dropdown-item  
475          'on-button-click':function(){}, 
476          'on-calendar-click':function(){} 
477      }; 
478 
479      for (var option in settings){ 
480          var pname = 'data-' + option; 
481          var eattr = element.getAttribute(pname); 
482 
483           
484          if (eattr != null) { 
485              console.log(eattr); 
486 
487              // convert string to array. 
488              if (pname == 'data-dropdownLinkAttrs') { 
489 
490                  // JavaScript array of JavaScript objects 
491                  var objs = eattr.replace(/([a-zA-Z0-9]+?):/g, '"$1":'); 
492                  objs = objs.replace(/'/g, '"'); 
493                  var data = JSON.parse(objs); 
494                  //console.log('----------------------'); 
495                  console.log(data); 
496                  console.log(data.length); 
497                  //console.log('----------------------'); 
498 
499                  eattr = data; 
500                  settings[option] = eattr; 
501              } else { 
502 
503                  if (isArray(settings[option])) { 
504                      settings[option] = eattr.replace(/\s*,\s*/g, ',').replace(/^\s+|\s+$/g, '').split(','); 
505                      continue; 
506
507 
508                  if (isFunc(settings[option])) { 
509                      var fn = window[eattr]; 
510                      if (isFunc(fn)) { 
511                          settings[option] = fn; 
512                      } else { 
513                          settings[option] = eval('(function(mouseEvent){' + eattr + '})'); 
514
515                      continue; 
516
517 
518                  settings[option] = element.getAttribute(pname); 
519 
520
521               
522 
523               
524
525
526 
527      return settings; 
528  }; 
529 
530  addtocalendar.load = ready(function () { 
531 
532      var calendarsUrl = { 
533          'iCalendar':'ical', 
534          'Google Calendar':'google', 
535          'Outlook':'outlook', 
536          'Outlook Online':'outlookonline', 
537          'Yahoo! Calendar':'yahoo' 
538      }; 
539      var utz = (-(new Date()).getTimezoneOffset().toString()); 
540 
541      var languages = addtocalendar.languages; 
542 
543      var dom = document.getElementsByTagName('*'); 
544      for (var tagnum = 0; tagnum < dom.length; tagnum++) { 
545          var tag_class = dom[tagnum].className; 
546 
547          if (tag_class.length && tag_class.split(" ").indexOf('addtocalendar') != -1) { 
548 
549              var settings = addtocalendar.loadSettings(dom[tagnum]); 
550 
551              var protocol = 'http:'; 
552              if(settings['secure'] == 'auto'){ 
553                  protocol = location.protocol == 'https:' ? 'https:' : 'http:'; 
554              } else if(settings['secure'] == 'true'){ 
555                  protocol = 'https:'; 
556
557 
558              var tag_id = dom[tagnum].id; 
559              var atc_button_title = languages['en']; 
560              if(settings['language'] == 'auto'){ 
561                  var user_lang = "no_lang"; 
562                  if (typeof navigator.language === "string") { 
563                      user_lang = navigator.language.substr(0, 2) 
564                  } else if (typeof navigator.browserLanguage === "string") { 
565                      user_lang = navigator.browserLanguage.substr(0, 2) 
566
567 
568                  if(languages.hasOwnProperty(user_lang)){ 
569                      atc_button_title = languages[user_lang]; 
570
571              }else if(languages.hasOwnProperty(settings['language'])){ 
572                  atc_button_title = languages[settings['language']]; 
573
574 
575              var url_paramteres = [ 
576                  'utz=' + utz, 
577                  'uln=' + navigator.language, 
578                  'vjs=' + atc_version 
579              ]; 
580 
581              var addtocalendar_div = dom[tagnum].getElementsByTagName('var'); 
582              var event_number = -1; 
583              for (var varnum = 0; varnum < addtocalendar_div.length; varnum++) { 
584                  var param_name = addtocalendar_div[varnum].className.replace("atc_","").split(" ")[0]; 
585                  var param_value = addtocalendar_div[varnum].innerHTML; 
586 
587                  if(param_name == 'event'){ 
588                      event_number++; 
589                      continue; 
590
591 
592                  if(param_name == addtocalendar_div[varnum].className){ 
593                      if(param_name == 'atc-body'){ 
594                          atc_button_title = param_value; 
595
596                      continue; 
597
598 
599                  if(event_number == -1){ 
600                      continue; 
601
602 
603                  url_paramteres.push('e['+event_number+']['+param_name+']' + '=' + encodeURIComponent(param_value)); 
604
605 
606 
607              var atcb_link_id_val = (tag_id == ''?'':(tag_id + '_link') ); 
608              var atcb_list = document.createElement(settings['dropdownMenuType']); 
609              atcb_list.className = settings['dropdownMenuClass']; 
610 
611              var menu_links = ''; 
612              for (var cnum in settings['calendars']){ 
613                  if(!calendarsUrl.hasOwnProperty(settings['calendars'][cnum])){ 
614                      continue; 
615
616                  var cal_id = calendarsUrl[settings['calendars'][cnum]]; 
617                  var atcb_cal_link_id = (tag_id == '' ? '' : ('id="' + tag_id + '_' + cal_id + '_link"')); 
618 
619 
620 
621                  if (settings['dropdownMenuItemType'] != 'none') { menu_links += '<' + settings['dropdownMenuItemType'] + ' class="' + settings['dropdownMenuItemClass'] + '">'; } // Create link with wrapper. 
622 
623                
624 
625                  menu_links += 
626                      '<a ' + atcb_cal_link_id + ' class="' + settings['dropdownMenuItemLinkClass'] + '"  href="' 
627                      + (cal_id == 'ical' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream ? 'webcal:' : protocol) 
628                      + atc_url + cal_id + '?' + url_paramteres.join('&') 
629                      + '" target="_blank" title="<@liferay.language key='opens-new-window' />" lang="en">' + settings['calendars'][cnum] 
630                      + '</a>'; 
631                   if (settings['dropdownMenuItemType'] != 'none') { menu_links += '</' + settings['dropdownMenuItemType'] + '>'; } // Create link with wrapper. 
632 
633 
634
635              atcb_list.innerHTML = menu_links; 
636 
637              if (dom[tagnum].getElementsByClassName(settings['dropdownLinkClass'])[0] == undefined) { 
638                  var atcb_link = document.createElement('a'); 
639                  atcb_link.className = settings['dropdownLinkClass']; 
640                  atcb_link.innerHTML = atc_button_title; 
641                  atcb_link.id = atcb_link_id_val; 
642                  atcb_link.tabIndex = 0; 
643                  //atcb_link.tabIndex = 1; 
644 
645                  if (settings['dropdownLinkAttrs'] != undefined && settings['dropdownLinkAttrs'].length > 0) { 
646                      for (i = 0; i < settings['dropdownLinkAttrs'].length; ++i) { 
647                          //console.log('*******************************'); 
648                          atcb_link.setAttribute(settings['dropdownLinkAttrs'][i].key, settings['dropdownLinkAttrs'][i].value)                                       
649
650
651 
652 
653                  dom[tagnum].appendChild(atcb_link); 
654                  dom[tagnum].appendChild(atcb_list); 
655              }else{ 
656                  var atcb_link = dom[tagnum].getElementsByClassName(settings['dropdownLinkClass'])[0]; 
657                  atcb_link.parentNode.appendChild(atcb_list); 
658                  atcb_link.tabIndex=0; 
659                  //atcb_link.tabIndex=1; 
660                  if(atcb_link.id == ''){ 
661                      atcb_link.id = atcb_link_id_val; 
662
663
664 
665              dom[tagnum] 
666                  .getElementsByClassName(settings['dropdownMenuClass'])[0] 
667                  .addEventListener("click", settings['on-button-click'], false); 
668 
669              var item_links = dom[tagnum].getElementsByClassName(settings['dropdownMenuItemLinkClass']); 
670 
671              for (var varnum = 0; varnum < item_links.length; varnum++) { 
672                  item_links[varnum].addEventListener("click", settings['on-calendar-click'], false); 
673
674 
675
676
677  }); 
678  addtocalendar.load; 
679  //Custom 
680  $(".addtocalendar").each(function() { 
681    $(this).prev().append($(this)); 
682    if ($(this).parent().next().is("p") && $(this).parent().next().is(":empty")){ 
683      $(this).parent().next().remove(); 
684
685  }); 
686})(window, document); 
687</script> 
688 
689<#function getDateToText date_Data> 
690    <#assign date = []> 
691    <#assign date_DateObj = dateUtil.newDate(date_Data)> 
692    <#assign date = date + [ '${dateUtil.getDate(date_DateObj, "d", locale)}' ] > 
693    <#assign sdfMonth = objectUtil("java.text.SimpleDateFormat", "MMMMM", locale) /> 
694    ${sdfMonth.setDateFormatSymbols(sdfMonth.getDateFormatSymbols())} 
695    <#assign date = date + [ '${sdfMonth.format(date_DateObj)}' ] > 
696    <#return languageUtil.format(locale, "dateFormatList", date) /> 
697</#function>