Во время обработки запрошенного шаблона произошла ошибка...
The following has evaluated to null or missing:
==> ctx.proc  [in template "20100#20136#1583049" at line 449, column 26]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
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: ${ctx.proc}  [in template "20100#20136#1583049" at line 449, column 24]
----
1<#assign log = staticUtil['com.liferay.portal.kernel.log.LogFactoryUtil'].getLog("feeds.template")> 
2<#assign _ = log.info(themeDisplay.getURLCurrent())/> 
3 
4<#assign ctx = serviceLocator.findService("ru.voskhod.gpparf.portal.feeds.main.page.portlet.util.FeedsTemplateRenderUtil").buildContext(.vars) /> 
5 
6<#assign tagList = templateUtil.getArticleTagsWithId(groupId, ctx.journalArticleId, locale)/> 
7<#assign catList = templateUtil.getNewsCategoriesWithId(groupId, ctx.journalArticleId, locale)/> 
8 
9<#assign feedUrl = ctx.getPortletFriendlyURL()/> 
10 
11<#--todo:: перенести это безумие в buildContext--> 
12<#if gp_media_file?? && gp_media_file.getSiblings()?has_content> 
13    <#assign audioList = ddmService.getAudioFiles(gp_media_file.getSiblings()) /> 
14    <#assign videoList = ddmService.getVideoFiles(gp_media_file.getSiblings()) /> 
15</#if> 
16 
17<#assign imagesList = [] /> 
18<#if gp_images?? && gp_images.getSiblings()?has_content > 
19    <#list gp_images.getSiblings() as cur_gp_images> 
20        <#if cur_gp_images.getData()?? && cur_gp_images.getData() != ""> 
21            <#if gp_main_image_uuid?? && gp_main_image_uuid.getData()?? && cur_gp_images.getAttribute("uuid") == gp_main_image_uuid.getData()> 
22                <#assign imagesList = [cur_gp_images] + imagesList /> 
23            <#else> 
24                <#assign imagesList = imagesList + [cur_gp_images] /> 
25            </#if> 
26        </#if> 
27    </#list> 
28</#if> 
29 
30<#assign mediaFileCount = 0 /> 
31<#if gp_media_file?? && gp_media_file?has_content && gp_media_file.getSiblings()?has_content> 
32    <#list gp_media_file.getSiblings() as cur_gp_media> 
33        <#if cur_gp_media.data?? && cur_gp_media.data?has_content> 
34            <#assign mediaFileCount = mediaFileCount + 1 /> 
35        </#if> 
36    </#list> 
37</#if> 
38 
39<#assign attachmentCount = 0 /> 
40<#if gp_attachment?? && gp_attachment?has_content && gp_attachment.getSiblings()?has_content> 
41    <#list gp_attachment.getSiblings() as cur_gp_attachment> 
42        <#if cur_gp_attachment.data?? && cur_gp_attachment.data?has_content> 
43            <#assign attachmentCount = attachmentCount + 1 /> 
44        </#if> 
45    </#list> 
46</#if> 
47 
48<style> 
49    button:focus { 
50        outline: unset; 
51
52 
53    .a_custom { 
54        padding-top: 10px !important; 
55        color: white; 
56
57 
58    .a_custom:hover, .a_custom:focus { 
59        color: #ffffff; 
60        text-decoration: none; 
61        outline: unset; 
62
63</style> 
64 
65<#if ctx.showTitle> 
66    <h2 class="feeds-page__title"> 
67        ${themeDisplay.portletDisplay.title} 
68    </h2> 
69</#if> 
70<div class="feeds-page__header"> 
71    <ul class="feeds-page__info"> 
72        <#if ctx.datetimePubFieldFormatted?has_content> 
73            <li class="feeds-page__info_item">${ctx.datetimePubFieldFormatted}</li> 
74        </#if> 
75        <#if ctx.proc?has_content> 
76            <li class="feeds-page__info_item"> 
77                <#if ctx.procUri?has_content> 
78                    <a href="${ctx.procUri}" title="" class="feeds-page__info_link"> 
79                        ${ctx.proc} 
80                    </a> 
81                <#else> 
82                    <a title="" class="feeds-page__info_link" style="cursor: default;"> 
83                        ${ctx.proc} 
84                    </a> 
85                </#if> 
86            </li> 
87        </#if> 
88    </ul> 
89    <div class="feeds-page__subtitle" id="text_printprw">${ctx.journalArticleTitle}</div> 
90</div> 
91<div class="feeds-page__body"> 
92    <div class="feeds-page__navigation"> 
93        <#if gp_content?has_content> 
94            <div class="feeds-page__navigation_item text-item is-active" 
95                 onclick="openTab('feeds-page__article_text_block', 'text-item')"> 
96                <span class="feeds-page__navigation_icon is-text">&nbsp;</span> 
97                <span class="feeds-page__navigation_tooltip"> 
98                    <@liferay.language key="feeds.tab.text" /> 
99                </span> 
100            </div> 
101        </#if> 
102        <#if (imagesList?size > 0)> 
103            <div class="feeds-page__navigation_item photo-item" 
104                 onclick="openTab('feeds-page__article_gallery', 'photo-item')"> 
105                <span class="feeds-page__navigation_icon is-image">&nbsp;</span> 
106                <span class="feeds-page__navigation_badge">${imagesList?size}</span> 
107                <span class="feeds-page__navigation_tooltip"> 
108                    <@liferay.language key="feeds.tab.photo" /> 
109                </span> 
110            </div> 
111        </#if> 
112        <#if (mediaFileCount > 0)> 
113            <div class="feeds-page__navigation_item media-item" 
114                 onclick="openTab('feeds-page__article_media', 'media-item')"> 
115                <span class="feeds-page__navigation_icon is-video">&nbsp;</span> 
116                <span class="feeds-page__navigation_badge">${mediaFileCount}</span> 
117                <span class="feeds-page__navigation_tooltip"> 
118                    <@liferay.language key="feeds.tab.media" /> 
119                </span> 
120            </div> 
121        </#if> 
122        <#if (attachmentCount > 0)> 
123            <div class="feeds-page__navigation_item attach-item" 
124                 onclick="openTab('feeds-page__article_file', 'attach-item')"> 
125                <span class="feeds-page__navigation_icon is-attach">&nbsp;</span> 
126                <span class="feeds-page__navigation_badge">${attachmentCount}</span> 
127                <span class="feeds-page__navigation_tooltip"> 
128                    <@liferay.language key="feeds.tab.attach" /> 
129                </span> 
130            </div> 
131        </#if> 
132        <#if !ctx.internal> 
133            <div class="feeds-page__navigation_item share-item" 
134                 onclick="openTab('feeds-page__article_share', 'share-item')"> 
135                <span class="feeds-page__navigation_icon is-share">&nbsp;</span> 
136                <span class="feeds-page__navigation_tooltip"> 
137                    <@liferay.language key="feeds.tab.share" /> 
138                </span> 
139            </div> 
140        </#if> 
141    </div> 
142    <div class="feeds-page__article"> 
143        <#if gp_content?has_content> 
144            <div class="feeds-page__article_text_block"> 
145                <#if (imagesList?size > 0)> 
146                    <div class="feeds-page__article_image"> 
147                        <div class="feeds-page__article_image-viewport"> 
148                            <div class="feeds-page__article_image-list"> 
149                                <#list imagesList as cur_gp_image> 
150                                    <#if cur_gp_image.getAttribute("alt")??> 
151                                        <#assign img_alt = cur_gp_image.getAttribute("alt")/> 
152                                    <#else> 
153                                        <#assign img_alt = ""/> 
154                                    </#if> 
155 
156                                    <#if cur_gp_image.getAttribute("displaySource")?? && cur_gp_image.getAttribute("displaySource") == "true"> 
157                                        <#assign img_src = cur_gp_image.getData()/> 
158                                    <#else> 
159                                        <#assign img_src = "/o/adaptive-media/image/" + cur_gp_image.getAttribute("fileEntryId") + "/news/img"/> 
160                                    </#if> 
161 
162                                    <div class="feeds-page__article_image-item"> 
163                                        <img src="${img_src}" alt="${img_alt}"> 
164                                    </div> 
165                                </#list> 
166                            </div> 
167                        </div> 
168                        <div class="feeds-page__article_image-buttons"> 
169                            <span class="feeds-page__article_image-arr to-left">&nbsp;</span> 
170                            <span class="feeds-page__article_image-arr to-right">&nbsp;</span> 
171                        </div> 
172                        <div class="feeds-page__article_image-counter"> 
173                        </div> 
174                    </div> 
175                </#if> 
176 
177                <div class="feeds-page__article_text"> 
178                    ${gp_content.getData()} 
179                </div> 
180 
181                <div class="feeds-page__article_buttons"> 
182                    <a href="" class="button size-s a_custom" aria-label="<@liferay.language key="news.print" />" 
183                       id="button_printprw"><@liferay.language key="news.print" /> 
184                    </a> 
185                    <a href="${feedUrl}" 
186                       class="button button-contour size-s"><@liferay.language key="news.archive" /> 
187                    </a> 
188                    <div class="feeds-page__article_buttons-last" id="subscribeButtonPlaceHolder"></div> 
189                </div> 
190            </div> 
191        </#if> 
192 
193        <!-- Images begin --> 
194        <#if (imagesList?size > 0)> 
195            <div class="feeds-page__article_gallery" style="display: none"> 
196                <h4 class="feeds-page__article_gallery-title">${gp_images.getSiblings()?size} <@liferay.language key="photo" /></h4> 
197                <ul class="feeds-page__article_gallery-list"> 
198                    <#list imagesList as cur_gp_image> 
199                        <#if cur_gp_image.getAttribute("alt")??> 
200                            <#assign img_alt = cur_gp_image.getAttribute("alt")/> 
201                        <#else> 
202                            <#assign img_alt = ""/> 
203                        </#if> 
204 
205                        <#if cur_gp_image.getAttribute("displaySource")?? && cur_gp_image.getAttribute("displaySource") == "true"> 
206                            <#assign img_src = cur_gp_image.getData()/> 
207                        <#else> 
208                            <#assign img_src = "/o/adaptive-media/image/" + cur_gp_image.getAttribute("fileEntryId") + "/news/img"/> 
209                        </#if> 
210 
211                        <a data-epp-photo-modal="feeds-images" 
212                           data-title="${img_alt}" 
213                           href="${img_src}"> 
214                            <li class="feeds-page__article_gallery-item one-new-slider__item swiper-slide" 
215                                style="background-image: url('${img_src}')" 
216
217                            </li> 
218                        </a> 
219                    </#list> 
220                </ul> 
221            </div> 
222        </#if> 
223        <!-- Images end --> 
224 
225 
226        <!-- Media --> 
227        <#if (mediaFileCount > 0)> 
228            <div class="feeds-page__article_media" style="display: none"> 
229                <!-- Video slide --> 
230                <#if videoList?has_content> 
231                    <div class="feeds-page__article_video"> 
232                        <h4 class="feeds-page__article_video-title">${videoList?size} 
233                            <@liferay.language key="video" /> 
234                        </h4> 
235                        <ul class="feeds-page__article_video-list"> 
236                            <#list videoList as cur_gp_media_file> 
237                                <#assign url = templateUtil.getImagePath(cur_gp_media_file, themeDisplay) /> 
238                                <#assign previewUrl = url + "&videoThumbnail=1" /> 
239                                <#assign videoSizeTitle = templateUtil.fileSizeFormat(cur_gp_media_file.size, locale)/> 
240 
241                                <#if cur_gp_media_file.description?has_content > 
242                                    <#assign description = cur_gp_media_file.description /> 
243                                <#else> 
244                                    <#assign description = cur_gp_media_file.title /> 
245                                </#if> 
246 
247                                <li class="feeds-page__article_video-item"> 
248                                    <div class="feeds-page__article_video-preview"> 
249                                        <a data-epp-video-modal="feeds-images" 
250                                           data-title="${description}" 
251                                           data-preview="${previewUrl}" 
252                                           href="${url}" 
253
254                                            <span class="feeds-page__article_video-tumb" 
255                                                  style="background-image: url('${previewUrl}')" 
256
257                                            </span> 
258                                        </a> 
259                                        <p class="feeds-page__article_video-name"> 
260                                            <span> 
261                                                ${description} 
262                                            </span> 
263                                        </p> 
264                                    </div> 
265                                    <a href="${url}&download=true" target="_blank" class="button size-s"> 
266                                        <@liferay.language key="news.download" /> [ ${videoSizeTitle} ] 
267                                    </a> 
268                                </li> 
269                            </#list> 
270                        </ul> 
271                    </div> 
272                </#if> 
273                <!-- Video slide end --> 
274 
275                <!-- Audio slide --> 
276                <#if audioList?has_content> 
277                    <div class="feeds-page__article_audio "> 
278                        <h4 class="feeds-page__article_audio-title"> 
279                            ${audioList?size} <@liferay.language key="audio" /> 
280                        </h4> 
281                        <ul class="feeds-page__article_audio-list media-audio-wrapper"> 
282                            <#list audioList as cur_gp_media_file> 
283                                <#assign url = templateUtil.getImagePath(cur_gp_media_file, themeDisplay) /> 
284                                <#assign videoSizeTitle = templateUtil.fileSizeFormat(cur_gp_media_file.size, locale)/> 
285 
286                                <li class="feeds-page__article_audio-item media-a-wrapper"> 
287                                    <span class="feeds-page__article_audio-name"> 
288                                        <span> 
289                                            <#if cur_gp_media_file.description?has_content > 
290                                                ${cur_gp_media_file.description} 
291                                            <#else> 
292                                                ${cur_gp_media_file.title} 
293                                            </#if> 
294                                        </span> 
295                                    </span> 
296                                    <audio class="feeds_media_player" 
297                                           controls 
298                                           style="max-width:100%;" 
299                                           stretching="auto" 
300                                           pluginPath="js" 
301                                           loop="false" 
302                                           features="['playpause', 'progress', 'current', 'duration', 'tracks', 'volume']" 
303                                           alwaysShowControls="false" 
304                                           pauseOtherPlayers="true" 
305                                           preload="none" 
306
307                                        <source src="${url}" type="${cur_gp_media_file.getMimeType()}"> 
308                                    </audio> 
309                                    <a href="${url}&download=true" target="_blank" class="button size-s"> 
310                                        <@liferay.language key="news.download" /> [ ${videoSizeTitle} ] 
311                                    </a> 
312                                </li> 
313                            </#list> 
314                        </ul> 
315                    </div> 
316                </#if> 
317                <!-- Audio slide end --> 
318            </div> 
319        </#if> 
320        <!-- Media end --> 
321 
322        <!-- Attachments begin --> 
323        <#if (attachmentCount > 0)> 
324            <div class="feeds-page__article_file" style="display: none"> 
325                <#assign numberOfFiles = templateUtil.numberOfFiles(gp_attachment.getSiblings()?size) /> 
326                <h4 class="feeds-page__article_file-title">${numberOfFiles}</h4> 
327                <ul class="feeds-page__article_file-list"> 
328                    <#list gp_attachment.getSiblings() as cur_gp_attachment> 
329                        <#assign fileSize = ddmService.getFileSizeByDataEntry(locale, groupId, cur_gp_attachment) /> 
330                        <#assign sizeTitle = templateUtil.fileSizeFormat(fileSize, locale)/> 
331 
332                        <#if cur_gp_attachment.data?? && cur_gp_attachment.data?has_content> 
333                            <#assign fileMeta = cur_gp_attachment.data?replace('\\\\u(....)', '&#x$1;', 'r')?eval/> 
334 
335                            <li class="feeds-page__article_file-item"> 
336                                <p class="feeds-page__article_file-name"> 
337                                    <#if cur_gp_attachment.gp_attachment_description?? && cur_gp_attachment.gp_attachment_description.getData()?has_content> 
338                                        <#assign fileDescription = cur_gp_attachment.gp_attachment_description.getData() /> 
339                                        <spna> 
340                                            ${fileDescription} 
341                                        </spna> 
342                                    <#else > 
343                                        <spna> 
344                                            ${fileMeta.title} 
345                                        </spna> 
346                                    </#if> 
347                                </p> 
348                                <a href="${cur_gp_attachment.getData()}&download=true" target="_blank" 
349                                   class="button size-s a_custom"> 
350                                    <@liferay.language key="news.download" /> [ ${sizeTitle} ] 
351                                </a> 
352                            </li> 
353                        </#if> 
354                    </#list> 
355                </ul> 
356            </div> 
357        </#if> 
358 
359        <!-- Attachments end --> 
360 
361        <#if !ctx.internal> 
362            <div class="feeds-page__article_share" style="display: none"> 
363                <span class="feeds-page__article_share-title"> 
364                    <@liferay.language key="news.direct-link" /> 
365                </span> 
366                <div class="text-field hidden-xs"> 
367                    <div class="text-field__value"> 
368                        <input type="search" class="text-field__input" placeholder="${ctx.repostUrl}" 
369                               value="${ctx.repostUrl}" 
370                               readonly> 
371                    </div> 
372                    <span class="text-field__help">&nbsp;</span> 
373                </div> 
374                <button id="shareButton" class="a_custom button hidden-lg hidden-sm  hidden-md size-s" 
375                        onclick="CopyToClipboard('${ctx.repostUrl}')" 
376
377                    <@liferay.language key="news.direct-link.copy" /> 
378                </button> 
379 
380                <span class="feeds-page__article_share-title"> 
381                    <@liferay.language key="news.share" /> 
382                </span> 
383                <ul class="feeds-page__article_share-list"> 
384                    <li class="feeds-page__article_share-item"> 
385                        <a href="#" title="" class="feeds-page__article_share-link s_vk">Вконтакте</a> 
386                    </li> 
387                    <li class="feeds-page__article_share-item"> 
388                        <a href="#" title="" class="feeds-page__article_share-link s_livejournal">LiveJournal</a> 
389                    </li> 
390                    <li class="feeds-page__article_share-item"> 
391                        <a href="#" title="" class="feeds-page__article_share-link s_facebook">Facebook</a> 
392                    </li> 
393                    <li class="feeds-page__article_share-item"> 
394                        <a href="#" title="" class="feeds-page__article_share-link s_twitter">Twitter</a> 
395                    </li> 
396                </ul> 
397            </div> 
398        </#if> 
399    </div> 
400</div> 
401<div class="feeds-page__footer"> 
402    <#if catList?has_content> 
403        <div class="feeds-page__footer_item"> 
404            <h4 class="feeds-page__footer_title"><@liferay.language key="news.rubrics" /></h4> 
405            <#list catList?keys as catName> 
406                <a class="chips" href="${feedUrl + "?rubrics=" + catList[catName]}"> 
407                    ${catName} 
408                </a> 
409            </#list> 
410        </div> 
411    </#if> 
412    <#if tagList?has_content> 
413        <div class="feeds-page__footer_item"> 
414            <h4 class="feeds-page__footer_title">Теги</h4> 
415            <#list tagList?keys as tagName> 
416                <a class="chips" href="${feedUrl + "?tags=" + tagList[tagName]}"> 
417                    ${tagName} 
418                </a> 
419            </#list> 
420        </div> 
421    </#if> 
422</div> 
423 
424<div id="printContent" class="print_data"> 
425    <div class="print_header"> 
426        <div class="print__wrapper"> 
427            <div class="print__logo"> 
428                <#if !ctx.internal> 
429                    <img src="/o/gpparf-public-theme/images/logo.png" alt="logo" width="50" height="54"> 
430                <#else> 
431                    <img src="/o/gpparf-internal-theme/images/logo.svg" alt="logo" width="50" height="54"> 
432                </#if> 
433                <h2 class="print__title">${ctx.procStart}<br><span>${ctx.procEnd}</span></h2> 
434            </div> 
435            <div class="print_button_wrapper no-print"> 
436                <a href="#" class="print_button" aria-label="<@liferay.language key="news.print" />" 
437                   id="button_print" onclick="self.print()"> 
438                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="19" viewBox="0 0 24 19"> 
439                        <path fill-rule="evenodd" 
440                              d="M7 17h10v-7H7v7zm-2 1v-4H0V3h24v11h-5v5H5v-1zm0-9V8h14v4h3V5H2v7h3V9zm0-9h14v2H5V0zm4 13h6v2H9v-2z"></path> 
441                    </svg> 
442                </a> 
443            </div> 
444        </div> 
445        <div class="container"> 
446            <div class="category__info row"> 
447                <div class="category__item col-xs-6 col-sm-6 col-md-6 col-lg-6"> 
448                    <span class="category__category"><@liferay.language key="news.source" />:</span> 
449                    <p>${ctx.proc}</p> 
450                </div> 
451                <div class="category__item col-xs-6 col-sm-6 col-md-6 col-lg-6"> 
452                    <span class="category__category"><@liferay.language key="news.publication-date" />:</span> 
453                    <p>${ctx.datetimePubFieldFormatted}</p> 
454                </div> 
455            </div> 
456        </div> 
457    </div> 
458 
459    <section class="one-new__content"> 
460        <h2 class="one-new__title">${ctx.journalArticleTitle}</h2> 
461        <#if gp_content?has_content> 
462            <div class="break-word">${gp_content.getData()}</div> 
463        </#if> 
464    </section> 
465    <div class="print_footer"> 
466        <div class="container"> 
467            <div class="row"> 
468                <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6"> 
469                    © 2003-2020 ${ctx.proc}<br> 
470                    <@liferay.language key="footer.copyright" /> 
471                </div> 
472                <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6"> 
473                    <#if ctx.currentUnitContactInfo?has_content> 
474                        <@liferay.language key="news.address" />: ${ctx.currentUnitContactInfo.address}<br> 
475                        <#if ctx.currentUnitContactInfo.categoryPointTitle?? && ctx.currentUnitContactInfo.phone??> 
476                            ${ctx.currentUnitContactInfo.categoryPointTitle}: 
477                            <a href="tel:${ctx.currentUnitContactInfo.phone}">${ctx.currentUnitContactInfo.phone}</a> 
478                        </#if> 
479                    </#if> 
480                </div> 
481            </div> 
482        </div> 
483    </div> 
484</div> 
485 
486 
487<script> 
488  (function () { 
489    var init = function () { 
490      $(".feeds-page__article_share-link").ShareLink({ 
491        title: '${ctx.journalArticleTitle}', 
492        text: '${ctx.journalArticleTitle}', 
493        image: '${themeDisplay.getPortalURL()}/documents/1664002/1691794/emblem_big%281%29.PNG',//'http://cdn.myanimelist.net/images/characters/3/27890.jpg', 
494        url: '${ctx.repostUrl}' 
495      }); 
496 
497 
498      $("#button_printprw").printPreview({ 
499        obj2print: '#printContent', 
500        width: '980', 
501        style: '<style>.print_data{display:block;}</style>', 
502        resizable: 'no', 
503        status: 'no', 
504        title: '${ctx.proc?html}' 
505      }); 
506 
507      $("#shareButton").on("click", function () { 
508        $(this).html('<@liferay.language key="news.direct-link.copy-success" />'); 
509        setTimeout(function () { 
510          $("#shareButton").html('<@liferay.language key="news.direct-link.copy" />'); 
511        }, 600); 
512      }); 
513 
514      $('.feeds_media_player').mediaelementplayer({ 
515        audioVolume: "vertical", 
516        success: function (mediaElement, originalNode, instance2) { 
517          mediaElement.pause(); 
518          mediaElement.load(); 
519
520      }); 
521 
522      <#if (imagesList?size > 0)> 
523      eppCarousel.create({ 
524        containerSelector: '.feeds-page__article_image-list', 
525        buttonsSelector: '.feeds-page__article_image-buttons', 
526        dotContainerSelector: '.feeds-page__article_image-counter', 
527        dotElementClass: '${(imagesList?size > 1 && imagesList?size <= 5)?string('feeds-page__article_image-counter_item', '')}', 
528        dotElementTag: 'a', 
529        fadeElementSelector: '.feeds-page__article_image_content', 
530        infinity: true, 
531      }); 
532      </#if> 
533 
534      textOverflowDots('.feeds-page__article_video-name span'); 
535      textOverflowDots('.feeds-page__article_audio-name span'); 
536    }; 
537 
538    if ($().mediaelementplayer && $().ShareLink && $().printPreview) 
539      init(); 
540    else 
541      document.addEventListener("DOMContentLoaded", init); 
542  })(); 
543 
544  function openTab(blockName, tabName) { 
545 
546    var tab = $('.' + tabName); 
547 
548    if (!tab.hasClass('is-active')) { 
549 
550      $('.text-item').removeClass('is-active'); 
551      $('.photo-item').removeClass('is-active'); 
552      $('.media-item').removeClass('is-active'); 
553      $('.attach-item').removeClass('is-active'); 
554      $('.share-item').removeClass('is-active'); 
555 
556      tab.addClass('is-active'); 
557 
558      $('.feeds-page__article_text_block').css('display', 'none'); 
559      $('.feeds-page__article_gallery').css('display', 'none'); 
560      $('.feeds-page__article_media').css('display', 'none'); 
561      $('.feeds-page__article_file').css('display', 'none'); 
562      $('.feeds-page__article_share').css('display', 'none'); 
563      $('.' + blockName).css('display', 'block'); 
564
565
566 
567  document.querySelectorAll('.feeds-page__navigation_item').forEach(function (item) { 
568    item.onpointerenter = function(e) { 
569      e.target.classList.add('pointer-enter'); 
570    }; 
571    item.onpointerleave = function(e) { 
572      e.target.classList.remove('pointer-enter'); 
573    }; 
574  }); 
575</script>