Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> themeDisplay.getURLCurrent()?split("/")[2] [in template "20102#20129#23798944" at line 470, column 37]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to 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 friendlyURLTipoCurso = themeD... [in template "20102#20129#23798944" in function "getTipoCursoFirendlyUrl" at line 470, column 7]
----
1<#-- Name: Unidade - Tipos de Curso Type: Asset Publisher Widget Template Path:
2 ROOT/assets/unidades-tipos-de-curso/widget-templates/unidades_tipos_de_curso.html -->
3 <#assign prefix="ssp" />
4 <#assign companyId=themeDisplay.getCompanyId() />
5 <#assign siteGroupId=themeDisplay.getSiteGroupId() />
6 <#assign friendlyUrlTipoCurso=getTipoCursoFirendlyUrl() />
7 <#assign friendlyUrlUnidade=getUnidadeFirendlyUrl() />
8
9 <#assign categoryId=0 />
10
11 <#if friendlyUrlTipoCurso?contains("livre") || friendlyUrlTipoCurso?contains("extensao")>
12 <#assign friendlyUrlTemaFirst=getTemaFirstLevelFriendly() />
13 <#assign friendlyUrlTemaSecond=getTemaSecondLevelFriendly() />
14 <#assign friendlyUrlTemaThird=getTemaThirdLevelFriendly() />
15
16 <#if friendlyUrlTipoCurso?contains("livre")>
17 <#assign tipoCurso="Livre" />
18 <#else>
19 <#assign tipoCurso="Extensão" />
20 </#if>
21 <#-- cursos tecnicos nao tem 2o e 3o nivel de temas conforme prototipo GCR -->
22 <#elseif friendlyUrlTipoCurso?contains("tecnico")>
23 <#assign tipoCurso="Técnico" />
24 <#assign friendlyUrlTemaFirst=getTemaFirstLevelFriendly() />
25 <#assign friendlyUrlTemaSecond="#erro#" />
26 <#assign friendlyUrlTemaThird="#erro#" />
27
28 <#else>
29 </#if>
30
31 <#assign groupService=serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") />
32 <#assign groupObj=groupService.fetchFriendlyURLGroup(companyId, "/" +friendlyUrlUnidade) />
33 <#assign groupIdUnidade=groupObj.getGroupId() />
34
35 <#assign journal=getJournalArticle(groupIdUnidade)>
36 <#if !journal?contains("#erro#")>
37 <#assign groupIdUnidade=groupId />
38 <#assign journalArticleUnidade=journal>
39 <#assign document=saxReaderUtil.read(journalArticleUnidade.getContent()) />
40 <#assign rootElement=document.getRootElement() />
41
42 <#-- Get fields -->
43
44 <#-- Nome da unidade -->
45 <#assign
46 xPathSelector_nomeUnidadeParaBreadCrumb=saxReaderUtil.createXPath("dynamic-element[@field-reference='nomeUnidade'
47 ]")>
48 <#assign
49 nomeUnidadeParaBreadCrumb=xPathSelector_nomeUnidadeParaBreadCrumb.selectSingleNode(rootElement).getStringValue()>
50
51 <#-- Nome da unidade -->
52 <#assign
53 xPathSelector_nome=saxReaderUtil.createXPath("dynamic-element[@field-reference='nomeUsualUnidade'
54 ]")>
55 <#assign nomeUnidade=xPathSelector_nome.selectSingleNode(rootElement).getStringValue()>
56
57 <#assign
58 xPathSelector_codigoUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='codigoUnidade'
59 ]")>
60 <#assign
61 codigoUnidade=xPathSelector_codigoUnidade.selectSingleNode(rootElement).getStringValue()?trim>
62
63 <#if nomeUnidade??>
64 <#assign nome=nomeUnidade>
65 <#else>
66 <#assign nome="">
67 </#if>
68
69 <#-- Endereço 1 -->
70
71 <#-- Rua -->
72 <#assign
73 xPathSelector_enderecoUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='enderecoUnidade'
74 ]")>
75 <#assign
76 enderecoUnidade=xPathSelector_enderecoUnidade.selectSingleNode(rootElement).getStringValue()?trim>
77
78 <#if enderecoUnidade??>
79 <#assign endereco=enderecoUnidade>
80 <#else>
81 <#assign endereco="">
82 </#if>
83
84 <#-- número -->
85 <#assign
86 xPathSelector_numEnderecoUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='numEnderecoUnidade'
87 ]")>
88 <#assign
89 numeroUnidade=xPathSelector_numEnderecoUnidade.selectSingleNode(rootElement).getStringValue()?trim>
90
91 <#if numeroUnidade??>
92 <#assign numero=numeroUnidade>
93 <#else>
94 <#assign numero="">
95 </#if>
96
97 <#-- Bairro -->
98 <#assign
99 xPathSelector_bairroUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='bairroUnidade'
100 ]")>
101 <#assign
102 bairroUnidade=xPathSelector_bairroUnidade.selectSingleNode(rootElement).getStringValue()?trim>
103
104 <#if bairroUnidade??>
105 <#assign bairro=bairroUnidade>
106 <#else>
107 <#assign bairro="">
108 </#if>
109
110 <#-- Cidade -->
111 <#assign
112 xPathSelector_cidadeUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='cidadeUnidade'
113 ]")>
114 <#assign
115 cidadeUnidade=xPathSelector_cidadeUnidade.selectSingleNode(rootElement).getStringValue()?trim>
116
117 <#if cidadeUnidade??>
118 <#assign cidade=cidadeUnidade>
119 <#else>
120 <#assign cidade="">
121 </#if>
122
123 <#-- Cep -->
124 <#assign
125 xPathSelector_cepUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='cepUnidade'
126 ]")>
127 <#assign
128 cepUnidade=xPathSelector_cepUnidade.selectSingleNode(rootElement).getStringValue()?trim>
129
130 <#if cepUnidade??>
131 <#assign cep=cepUnidade>
132 <#else>
133 <#assign cep="">
134 </#if>
135
136 <#-- Fim endereço 1 -->
137
138 <#-- Endereço 2 -->
139
140 <#-- Rua -->
141 <#assign
142 xPathSelector_enderecoUnidade2=saxReaderUtil.createXPath("dynamic-element[@field-reference='enderecoUnidade2'
143 ]")>
144 <#assign
145 enderecoUnidade2=xPathSelector_enderecoUnidade2.selectSingleNode(rootElement).getStringValue()?trim>
146
147 <#if enderecoUnidade2??>
148 <#assign endereco2=enderecoUnidade2>
149 <#else>
150 <#assign endereco2="">
151 </#if>
152
153 <#-- número -->
154 <#assign
155 xPathSelector_numeroUnidade2=saxReaderUtil.createXPath("dynamic-element[@field-reference='numeroUnidade2'
156 ]")>
157 <#assign
158 numeroUnidade2=xPathSelector_numeroUnidade2.selectSingleNode(rootElement).getStringValue()?trim>
159
160 <#if numeroUnidade2??>
161 <#assign numero2=numeroUnidade2>
162 <#else>
163 <#assign numero2="">
164 </#if>
165
166 <#-- Bairro -->
167 <#assign
168 xPathSelector_bairroUnidade2=saxReaderUtil.createXPath("dynamic-element[@field-reference='bairroUnidade2'
169 ]")>
170 <#assign
171 bairroUnidade2=xPathSelector_bairroUnidade2.selectSingleNode(rootElement).getStringValue()?trim>
172
173 <#if bairroUnidade2??>
174 <#assign bairro2=bairroUnidade2>
175 <#else>
176 <#assign bairro2="">
177 </#if>
178
179 <#-- Cidade -->
180 <#assign
181 xPathSelector_cidadeUnidade2=saxReaderUtil.createXPath("dynamic-element[@field-reference='cidadeUnidade2'
182 ]")>
183 <#assign
184 cidadeUnidade2=xPathSelector_cidadeUnidade2.selectSingleNode(rootElement).getStringValue()?trim>
185
186 <#if cidadeUnidade2??>
187 <#assign cidade2=cidadeUnidade2>
188 <#else>
189 <#assign cidade2="">
190 </#if>
191
192 <#-- Cep -->
193 <#assign
194 xPathSelector_cepUnidade2=saxReaderUtil.createXPath("dynamic-element[@field-reference='cepUnidade2'
195 ]")>
196 <#assign
197 cepUnidade2=xPathSelector_cepUnidade2.selectSingleNode(rootElement).getStringValue()?trim>
198
199 <#if cepUnidade2??>
200 <#assign cep2=cepUnidade2>
201 <#else>
202 <#assign cep2="">
203 </#if>
204
205 <#-- Fim endereço 2 -->
206
207
208
209 <#-- Horário -->
210 <#assign
211 xPathSelector_horarioUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='horarioUnidade'
212 ]")>
213 <#assign
214 horarioUnidade=xPathSelector_horarioUnidade.selectSingleNode(rootElement).getStringValue()?trim>
215
216 <#if
217 horarioUnidade??>
218 <#assign
219 horario=horarioUnidade>
220 <#else>
221 <#assign
222 horario="">
223 </#if>
224
225 <#-- DDD -->
226 <#assign
227 xPathSelector_dddUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='dddTelefoneUnidade'
228 ]")>
229 <#assign
230 dddUnidade=xPathSelector_dddUnidade.selectSingleNode(rootElement).getStringValue()?trim>
231
232 <#if
233 dddUnidade??>
234 <#assign
235 ddd=dddUnidade>
236 <#else>
237 <#assign
238 ddd="">
239 </#if>
240
241 <#-- telefone
242 -->
243 <#assign
244 xPathSelector_telefoneUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='telefoneUnidade'
245 ]")>
246 <#assign
247 telefoneUnidade=xPathSelector_telefoneUnidade.selectSingleNode(rootElement).getStringValue()?trim>
248
249 <#if
250 telefoneUnidade??>
251 <#assign
252 telefone=telefoneUnidade>
253 <#else>
254 <#assign
255 telefone="">
256 </#if>
257
258 <#-- UF
259 -->
260 <#assign
261 xPathSelector_ufUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='ufUnidade'
262 ]")>
263 <#assign
264 ufUnidade=xPathSelector_ufUnidade.selectSingleNode(rootElement).getStringValue()?trim>
265
266 <#if
267 ufUnidade??>
268 <#assign
269 UF=ufUnidade>
270 <#else>
271 <#assign
272 UF="">
273 </#if>
274
275 <#--
276 Estacionamento
277 -->
278 <#assign
279 xPathSelector_estacionamento=saxReaderUtil.createXPath("dynamic-element[@field-reference='estacionamentoUnidade'
280 ]")>
281 <#assign
282 estacionamentoUnidade=xPathSelector_estacionamento.selectSingleNode(rootElement).getStringValue()>
283
284 <#if
285 estacionamentoUnidade??>
286 <#assign
287 estacionamento=estacionamentoUnidade>
288 <#else>
289 <#assign
290 estacionamento="">
291 </#if>
292
293 <#--
294 Estacionamento
295 Unidade
296 2
297 -->
298 <#assign
299 xPathSelector_estacionamento2=saxReaderUtil.createXPath("dynamic-element[@field-reference='estacionamentoUnidade2'
300 ]")>
301 <#assign
302 estacionamentoUnidade2=xPathSelector_estacionamento2.selectSingleNode(rootElement).getStringValue()>
303
304 <#if
305 estacionamentoUnidade2??>
306 <#assign
307 estacionamento2=estacionamentoUnidade2>
308 <#else>
309 <#assign
310 estacionamento2="">
311 </#if>
312
313 <#--
314 Facebook
315 -->
316 <#assign
317 xPathSelector_facebookUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='facebookUnidade'
318 ]")>
319 <#assign
320 facebookUnidade=xPathSelector_facebookUnidade.selectSingleNode(rootElement).getStringValue()>
321
322 <#if
323 facebookUnidade??>
324 <#assign
325 facebook=facebookUnidade>
326 <#else>
327 <#assign
328 facebook="">
329 </#if>
330
331 <#--
332 Instagram
333 -->
334 <#assign
335 xPathSelector_instagramUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='instagramUnidade'
336 ]")>
337 <#assign
338 instagramUnidade=xPathSelector_instagramUnidade.selectSingleNode(rootElement).getStringValue()>
339
340 <#if
341 instagramUnidade??>
342 <#assign
343 instagram=instagramUnidade>
344 <#else>
345 <#assign
346 instagram="">
347 </#if>
348
349 <#--
350 Maps
351 -->
352 <#assign
353 xPathSelector_googlemapsUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='googlemapsUnidade'
354 ]")>
355 <#assign
356 googlemapsUnidade=xPathSelector_googlemapsUnidade.selectSingleNode(rootElement).getStringValue()?trim>
357
358 <#if
359 googlemapsUnidade??>
360 <#assign
361 googlemaps=googlemapsUnidade>
362 <#else>
363 <#assign
364 googlemaps="">
365 </#if>
366
367 <#assign
368 hasMaps=(googlemaps?trim?length>
369 0)
370 >
371
372
373
374 <#--
375 Waze
376 -->
377 <#assign
378 xPathSelector_wazeUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='wazeUnidade'
379 ]")>
380 <#assign
381 wazeUnidade=xPathSelector_wazeUnidade.selectSingleNode(rootElement).getStringValue()>
382
383 <#if
384 wazeUnidade??>
385 <#assign
386 waze=wazeUnidade>
387 <#else>
388 <#assign
389 waze="">
390 </#if>
391
392 <#--
393 Imagem
394 -->
395
396 <#assign
397 imagem=getImagemURL('imagemUnidade')>
398 <#assign
399 imagem2=getImagemURL('imagemUnidade2')>
400
401 <#--
402 Estação
403 próxima
404 -->
405 <#assign
406 xPathSelector_estacaoProxima=saxReaderUtil.createXPath("dynamic-element[@field-reference='estacaoProxima'
407 ]")>
408
409 <#assign
410 estacaoProxima=xPathSelector_estacaoProxima.selectSingleNode(rootElement).getStringValue()>
411
412 <#assign
413 hasEstacaoProxima=(estacaoProxima?trim?length>
414 0)
415 >
416
417 </#if>
418
419 <#function getImagemURL fieldName>
420
421 <#assign xPathSelector=saxReaderUtil.createXPath("dynamic-element[@field-reference='${fieldName}' ]")>
422
423 <#assign imagemStr=xPathSelector.selectSingleNode(rootElement).getStringValue()>
424
425 <#if imagemStr?contains("classPK")>
426 <#assign imagemJson=jsonFactoryUtil.createJSONObject(imagemStr)
427 imagemId=getterUtil.getInteger(imagemJson.get('fileEntryId'))
428 dl=serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")
429 dlURLHelper=serviceLocator.findService("com.liferay.document.library.util.DLURLHelper")
430 fileEntry=dl.getFileEntry(imagemId) imagemURL=dlURLHelper.getImagePreviewURL(fileEntry, themeDisplay)
431 imagem={ "alt" : imagemJson.get('alt'), "url" : imagemURL } />
432 <#return imagem>
433 </#if>
434
435 <#return {"alt":"", "url" :""}>
436
437 </#function>
438
439 <#function getJournalArticle groupId>
440 <#assign
441 journalArticleService=serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
442 <#assign friendlyURL=getUnidadeFirendlyUrl()>
443
444 <#attempt>
445
446 <#if !friendlyURL?contains("fragment_collections")>
447
448 <#return journalArticleService.getArticleByUrlTitle(groupId,friendlyURL)>
449
450 </#if>
451
452 <#recover>
453
454 <#return '#erro#'>
455 </#attempt>
456 </#function>
457
458 <#function getUnidadeFirendlyUrl>
459 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[1]?split("?")?first />
460 <#if friendly?contains("web")>
461 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[3]?split("?")?first>
462 </#if>
463
464 <#return friendly />
465
466 </#function>
467
468 <#function getTipoCursoFirendlyUrl>
469
470 <#assign friendlyURLTipoCurso=themeDisplay.getURLCurrent()?split("/")[2]?split("?")?first />
471 <#if friendlyURLTipoCurso?contains("guest")>
472 <#assign friendlyURLTipoCurso=themeDisplay.getURLCurrent()?split("/")[4]?split("?")?first>
473 </#if>
474
475 <#return friendlyURLTipoCurso />
476
477 </#function>
478
479 <#function getTemaFirstLevelFriendly>
480 <#attempt>
481 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[1]?split("?")?first />
482 <#if !friendly?contains("web")>
483 <#if themeDisplay.getURLCurrent()?split("/")?size gt 3>
484 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[3]?split("?")?first />
485 <#else>
486 <#assign friendly="" />
487 </#if>
488
489 <#else>
490 <#if themeDisplay.getURLCurrent()?split("/")?size gt 5>
491 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[5]?split("?")?first>
492 <#else>
493 <#assign friendly="" />
494 </#if>
495 </#if>
496
497 <#return friendly />
498 <#recover>
499 <#return '#erro#'>
500 </#attempt>
501
502 </#function>
503
504 <#function getTemaSecondLevelFriendly>
505 <#attempt>
506 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[1]?split("?")?first />
507
508 <#if !friendly?contains("web")>
509 <#if themeDisplay.getURLCurrent()?split("/")?size gt 4>
510 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[4]?split("?")?first />
511 <#else>
512 <#assign friendly="" />
513 </#if>
514 <#else>
515 <#if themeDisplay.getURLCurrent()?split("/")?size gt 6>
516 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[6]?split("?")?first>
517 <#else>
518 <#assign friendly="" />
519 </#if>
520 </#if>
521
522 <#return friendly />
523 <#recover>
524 <#return '#erro#'>
525 </#attempt>
526
527 </#function>
528
529 <#function getTemaThirdLevelFriendly>
530 <#attempt>
531 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[1]?split("?")?first />
532
533 <#if !friendly?contains("web")>
534 <#if themeDisplay.getURLCurrent()?split("/")?size gt 5>
535 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[5]?split("?")?first />
536 <#else>
537 <#assign friendly="" />
538 </#if>
539 <#else>
540 <#if themeDisplay.getURLCurrent()?split("/")?size gt 7>
541 <#assign friendly=themeDisplay.getURLCurrent()?split("/")[7]?split("?")?first>
542 <#else>
543 <#assign friendly="" />
544 </#if>
545 </#if>
546 <#return friendly />
547 <#recover>
548 <#return '#erro#'>
549 </#attempt>
550
551 </#function>
552
553 <style>
554 body {
555 background: #fafafa;
556 }
557
558 .stop-scrolling {
559 height: 100%;
560 overflow: hidden;
561 }
562
563 /*Header Unidade*/
564
565 .ssp-header-unidade__content-info-body {
566 padding-top: 30px;
567 }
568
569 .ssp-header-unidade__atendimento-container>p>a {
570 color: white !important;
571 }
572
573 .ssp-header-unidade__atendimento-container>p>a:hover {
574 color: white !important;
575 font-weight: normal !important;
576 }
577
578 .creditoFotoMob {
579
580 margin: 0 auto;
581 background: #FFF7D6;
582 font-family: 'Montserrat';
583 font-size: 14px;
584 line-height: 1.6em;
585 border-radius: 3px;
586 max-width: 240px;
587 height: auto;
588 color: #4F596F;
589 padding: 5px;
590 position: relative;
591 float: right;
592 top: 70%;
593 max-height: 40px;
594 font-weight: 500;
595 right: 15%;
596 flex-wrap: unset;
597 }
598
599 .creditoFotoMob:after {
600 /*Triangulo*/
601 content: "";
602 width: 0;
603 height: 0;
604 position: absolute;
605 border-left: 10px solid transparent;
606 border-right: 10px solid transparent;
607 /*Faz seta "apontar para baixo. Definir o valor como 'top' fará ela "apontar para cima" */
608 /*Aqui entra a cor da "aba" do balão */
609 border-bottom: 10px solid #FFF7D6;
610 top: -9px;
611 /*localização. Experimente alterar para 'bottom'*/
612 left: 20%;
613 }
614
615 .tooltip-inner {
616 max-width: 230px;
617 padding: 0.75rem 0.75rem;
618 color: #4F596F;
619 text-align: center;
620 background-color: #FFF7D6;
621 border-radius: 0.3125rem;
622 }
623
624 .bs-tooltip-top .arrow::before,
625 .bs-tooltip-auto[x-placement^="top"] .arrow::before {
626 top: 0;
627 border-width: 0.4rem 0.4rem 0;
628 border-top-color: #FFF7D6;
629 }
630
631 .ssp-header-title-bloco {
632 font-size: 20px;
633 font-weight: 600;
634 }
635
636 .ssp:not(.liferay-instance) .ssp-header-unidade__imagem-box-imagem {
637 height: 100%;
638 }
639
640 /*#slider {
641 width: 80%;
642 max-width: 500px;
643 height: 25vw;
644 max-height: 150px;
645
646 position: relative;
647}*/
648
649 #slider .ssp-header-unidade__imagem-box-imagem {
650 opacity: 0;
651 position: absolute;
652 /*width: 100%;
653 height: 100%;*/
654 object-fit: cover;
655 transition: opacity 2000ms;
656 }
657
658 #slider .ssp-header-unidade__imagem-box-imagem.selected {
659 opacity: 1;
660 }
661
662 @media only screen and (max-width: 1024px) {
663
664 #slider .ssp-header-unidade__imagem-box-imagem {
665 margin-top: -240px;
666 height: 248px;
667
668 }
669
670 .ssp-header-unidade__container-info {
671 margin-top: 240px !important;
672 }
673
674 }
675
676 @media only screen and (max-width: 768px) {
677
678 .ssp:not(.liferay-instance) .ssp-header-unidade__imagem-box-imagem {
679 height: 228px;
680 }
681
682 .ssp-header-title-bloco {
683 font-size: 14px;
684 }
685
686 .creditoFotoMob {
687 font-size: 9px !important;
688 max-width: 161px !important;
689 max-height: 30px !important;
690 padding: 8.5px 9.5px !important;
691 line-height: 0.6em !important;
692
693 }
694 }
695
696 /* Final Header Unidade*/
697
698 .btn-nivel-livre-ead {
699 background-color: #ff9057;
700 border-color: #ff9057;
701 box-shadow: none;
702 }
703
704 .icon-ao-vivo {
705 font-size: 12px;
706 margin: 0 3px;
707 }
708
709
710 .subtema-ativo {
711
712 color: #fcc080 !important;
713 }
714
715 .separador-subtemas {
716 width: 100% !important;
717 margin-top: -1em !important;
718 margin-bottom: 2.25rem !important;
719 }
720
721 .bg-nivel-extensao {
722 background-color: #3ECCA6 !important;
723 }
724
725 a.bg-nivel-extensao:hover,
726 a.bg-nivel-extensao:focus,
727 button.bg-nivel-extensao:hover,
728 button.bg-nivel-extensao:focus {
729 background-color: #3ECCA6 !important;
730 }
731
732
733 /*novo forma de exibir o menu de areas*/
734
735 .ssp:not(.liferay-instance) .ssp-section-tema__container-menu-item .tema {
736 font-size: 15px;
737 color: #454F63;
738 }
739
740
741
742 .ssp:not(.liferay-instance) .ssp-section-tema__container-menu {
743 flex-wrap: wrap;
744 }
745
746 .tema i {
747 margin-right: 8px;
748 }
749
750 /* novo style tags tipo de curso */
751
752 section#section-links div.container.text-left {
753 max-width: none !important;
754 padding: 0 28px !important;
755 }
756
757
758 .btn-nivel-panelinha {
759 background-color: #F9C5B5 !important;
760 order: 12;
761 color: black;
762 }
763
764 .ssp:not(.liferay-instance) .ssp-btns-horizontal-area {
765 max-width: 1090px;
766 gap: 16px;
767 }
768
769 .btn-nivel-panelinha:hover {
770 background-color: #E56C5A !important;
771 }
772
773 .btn-nivel-panelinha:active {
774 background-color: #E1523D !important;
775 }
776
777 .ssp:not(.liferay-instance) .ssp-btns-horizontal-area a.btn.btn-nivel {
778 color: #000 !important;
779 border: none !important;
780 font-size: 16px !important;
781 padding-left: unset !important;
782 padding-right: unset !important;
783 padding-top: unset !important;
784 padding-bottom: unset !important;
785 padding: 16px !important;
786 border-radius: 20px;
787 margin: 0 !important;
788 max-height: 52px;
789
790 }
791
792 .ssp:not(.liferay-instance) .ssp-btns-horizontal-area a.btn.btn-nivel[target=_blank]::after {
793 font-family: "Font Awesome 6 Pro";
794 content: "\f08e";
795 font-size: 1rem;
796 margin-left: 8px;
797 }
798
799 .ssp-btns-horizontal-area .btn-nivel-especializacao-tecnica {
800 background-color: #FDF2D7;
801 order: 1;
802 }
803
804 .ssp-btns-horizontal-area .btn-nivel-especializacao-tecnica:hover {
805 background-color: #FACA5C;
806 }
807
808 .ssp-btns-horizontal-area .btn-nivel-especializacao-tecnica:active {
809 background-color: #F6BC39;
810 }
811
812
813 .ssp-btns-horizontal-area .btn-nivel-tecnico {
814 background-color: #FDF2D7;
815 order: 2;
816 }
817
818 .ssp-btns-horizontal-area .btn-nivel-tecnico:hover {
819 background-color: #FACA5C;
820 }
821
822 .ssp-btns-horizontal-area .btn-nivel-tecnico:active {
823 background-color: #F6BC39;
824 }
825
826
827 .ssp-btns-horizontal-area .btn-nivel-ensino-medio-tecnico {
828 background-color: #F4E0F4;
829 order: 3;
830 }
831
832 .ssp-btns-horizontal-area .btn-nivel-ensino-medio-tecnico:hover {
833 background-color: #D281D5;
834 }
835
836 .ssp-btns-horizontal-area .btn-nivel-ensino-medio-tecnico:active {
837 background-color: #C665C9;
838 }
839
840
841 .ssp-btns-horizontal-area .btn-nivel-livre {
842 background-color: #FFE9DF;
843 order: 4;
844 }
845
846 .ssp-btns-horizontal-area .btn-nivel-livre:hover {
847 background-color: #FFA47B;
848 }
849
850 .ssp-btns-horizontal-area .btn-nivel-livre:active {
851 background-color: #FD905E;
852 }
853
854
855 .ssp-btns-horizontal-area .btn-nivel-idiomas {
856 background-color: #FFE9DF;
857 order: 5;
858 }
859
860 .ssp-btns-horizontal-area .btn-nivel-idiomas:hover {
861 background-color: #FFA47B;
862 }
863
864 .ssp-btns-horizontal-area .btn-nivel-idiomas:active {
865 background-color: #FD905E;
866 }
867
868
869 .ssp-btns-horizontal-area .btn-nivel-graduacao {
870 background-color: #DCEBF9;
871 order: 6;
872 }
873
874 .ssp-btns-horizontal-area .btn-nivel-graduacao:hover {
875 background-color: #6EACEA;
876 }
877
878 .ssp-btns-horizontal-area .btn-nivel-graduacao:active {
879 background-color: #4E99E3;
880 }
881
882 .ssp-btns-horizontal-area .btn-nivel-graduacao-ead {
883 background-color: #DCEBF9;
884 order: 7;
885 }
886
887 .ssp-btns-horizontal-area .btn-nivel-graduacao-ead:hover {
888 background-color: #6EACEA;
889 }
890
891 .ssp-btns-horizontal-area .btn-nivel-graduacao-ead:active {
892 background-color: #4E99E3 !important;
893 }
894
895
896 .ssp-btns-horizontal-area .btn-nivel-pos-graduacao {
897 background-color: #E1E0FE;
898 order: 8;
899 }
900
901 .ssp-btns-horizontal-area .btn-nivel-pos-graduacao:hover {
902 background-color: #8280FE;
903 }
904
905 .ssp-btns-horizontal-area .btn-nivel-pos-graduacao:active {
906 background-color: #6764FB;
907 }
908
909 .ssp-btns-horizontal-area .btn-nivel-pos-graduacao-ead {
910 background-color: #E1E0FE;
911 order: 9;
912 }
913
914 .ssp-btns-horizontal-area .btn-nivel-pos-graduacao-ead:hover {
915 background-color: #8280FE;
916 }
917
918 .ssp-btns-horizontal-area .btn-nivel-pos-graduacao-ead:active {
919 background-color: #6764FB;
920 }
921
922
923 .ssp-btns-horizontal-area .btn-nivel-extensao {
924 background-color: #DAF5ED;
925 order: 10 !important;
926 }
927
928 .ssp-btns-horizontal-area .btn-nivel-extensao:hover {
929 background-color: #68D7B8;
930 }
931
932 .ssp-btns-horizontal-area .btn-nivel-extensao:active {
933 background-color: #47CBA7;
934 }
935
936 .ssp-btns-horizontal-area .btn-nivel-extensao-ead {
937 background-color: #DAF5ED;
938 order: 11;
939 }
940
941 .ssp-btns-horizontal-area .btn-nivel-extensao-ead:hover {
942 background-color: #68D7B8;
943 }
944
945 .ssp-btns-horizontal-area .btn-nivel-extensao-ead:active {
946 background-color: #47CBA7;
947 }
948
949 .ssp-btns-horizontal-area .btn-nivel-jovem-aprendiz {
950 background-color: #DAF5F9;
951 }
952
953 .ssp-btns-horizontal-area .btn-nivel-jovem-aprendiz:hover {
954 background-color: #66D7E8;
955 }
956
957 .ssp-btns-horizontal-area .btn-nivel-jovem-aprendiz:active {
958 background-color: #44CCE0;
959 }
960
961
962
963 @media only screen and (max-width: 768px) {
964 .ssp:not(.liferay-instance) .ssp-btns-horizontal-area a.btn.btn-nivel {
965 padding: 8px !important;
966 border-radius: 12px;
967 }
968
969 .ssp:not(.liferay-instance) .ssp-btns-horizontal-area {
970 justify-content: center;
971 align-items: center;
972 }
973 }
974 </style>
975
976 <#if tipoCurso=="Livre">
977
978 <style>
979 .ssp:not(.liferay-instance) .ativo {
980 background-color: #FF9057 !important;
981 color: white !important;
982 font-weight: 600 !important;
983 }
984
985 .tema-ativo {
986 background-color: #FF9057 !important;
987 color: white !important;
988 font-weight: 600 !important;
989 }
990
991 .ssp:not(.liferay-instance) .ssp-section-tema__container-menu-item .tema:hover {
992 background-color: #FF9057;
993 color: white;
994 font-weight: 600 !important;
995 }
996
997 .subtema.btn-nivel-3.subtema-ativo {
998 background: #FF9057 !important;
999 color: white !important;
1000 border-color: #FF9057 !important;
1001 }
1002 </style>
1003
1004 <#elseif tipoCurso=="Técnico">
1005
1006
1007 <style>
1008 /* curso tecnico */
1009 .ssp:not(.liferay-instance) .ativo {
1010 background-color: #F7BD23 !important;
1011 color: white !important;
1012 font-weight: 600 !important;
1013 }
1014
1015 .tema-ativo {
1016 background-color: #F7BD23 !important;
1017 color: white !important;
1018 font-weight: 600 !important;
1019 }
1020
1021 .ssp:not(.liferay-instance) .ssp-section-tema__container-menu-item .tema:hover {
1022 background-color: #F7BD23;
1023 color: white;
1024 font-weight: 600 !important;
1025 }
1026
1027 .subtema.btn-nivel-3.subtema-ativo {
1028 background: #F7BD23 !important;
1029 color: white !important;
1030 border-color: #F7BD23 !important;
1031 }
1032 </style>
1033
1034 <#else>
1035
1036 <style>
1037 /* curso extensao */
1038 .ssp:not(.liferay-instance) .ativo {
1039 background-color: #3ECCA6 !important;
1040 color: white !important;
1041 font-weight: 600 !important;
1042 }
1043
1044 .tema-ativo {
1045 background-color: #3ECCA6 !important;
1046 color: white !important;
1047 font-weight: 600 !important;
1048 }
1049
1050 .ssp:not(.liferay-instance) .ssp-section-tema__container-menu-item .tema:hover {
1051 background-color: #3ECCA6;
1052 color: white;
1053 font-weight: 600 !important;
1054 }
1055
1056 .subtema.btn-nivel-3.subtema-ativo {
1057 background: #3ECCA6 !important;
1058 color: white !important;
1059 border-color: #3ECCA6 !important;
1060 }
1061 </style>
1062
1063 </#if>
1064
1065 <style>
1066 /* css para link no nome da unidade */
1067
1068 .ssp-header-unidade__title a {
1069
1070 text-decoration: none !important;
1071 font-family: Montserrat;
1072 font-size: 44px;
1073 max-width: 440px;
1074 font-weight: 600 !important;
1075 line-height: 1.23;
1076 text-align: left;
1077 color: white;
1078 }
1079
1080 .ssp-section-tema__subtitle-curso-section {
1081
1082 margin-left: 40px !important;
1083
1084 }
1085
1086 .ssp-page-busca__section-resultado__ver-todos {
1087 margin-right: 40px !important;
1088 }
1089
1090 .submenu-tema-ativo {
1091 background-color: #34495e !important;
1092 color: white !important;
1093 font-weight: 600 !important;
1094 }
1095
1096 .submenu-tema-ativo-hover {
1097 background-color: #34495e !important;
1098 color: white !important;
1099 font-size: 50px;
1100 font-weight: 600 !important;
1101 }
1102
1103 .slider-curso>.slick-area__item {
1104
1105 width: 100%;
1106
1107 }
1108
1109 .custom-card-curso-tema {
1110
1111 height: 288px !important;
1112
1113 }
1114
1115 @media only screen and (max-width: 768px) {
1116
1117 .ssp:not(.liferay-instance) .custom-card-curso-tema {
1118 width: 100% !important;
1119 height: auto !important;
1120 }
1121
1122
1123 .ssp-page-busca__section-resultado__ver-todos {
1124 display: none;
1125 }
1126
1127 .filtroInscBolsa {
1128 display: none !important;
1129 }
1130
1131 }
1132
1133 .ssp:not(.liferay-instance) .ssp-container__cursos-sem-slick {
1134 display: flex;
1135 justify-content: center;
1136 flex-wrap: wrap;
1137 }
1138
1139 /*Novas funcionalidades*/
1140 #filtro-temas-nivel-3 {
1141 padding-bottom: 2em;
1142 }
1143
1144 .switch {
1145 position: relative;
1146 display: inline-block;
1147 width: 63px;
1148 height: 31.5px;
1149 margin: 0;
1150 }
1151
1152 .switch input {
1153 opacity: 0;
1154 width: 0;
1155 height: 0;
1156 }
1157
1158 .slider {
1159 position: absolute;
1160 cursor: pointer;
1161 top: 0;
1162 left: 0;
1163 right: 0;
1164 bottom: 0;
1165 background-color: #454F63;
1166 -webkit-transition: .4s;
1167 transition: .4s;
1168 }
1169
1170 .slider:before {
1171 position: absolute;
1172 content: "";
1173 height: 21px;
1174 width: 21px;
1175 left: 7px;
1176 bottom: 5.5px;
1177 background-color: #454F63;
1178 -webkit-transition: .4s;
1179 transition: .4s;
1180 }
1181
1182 input:checked+.slider {
1183 background-color: #2967F4;
1184 }
1185
1186 input:focus+.slider {
1187 box-shadow: 0 0 1px #2967F4;
1188 }
1189
1190 input:checked+.slider:before {
1191 -webkit-transform: translateX(26px);
1192 -ms-transform: translateX(26px);
1193 transform: translateX(26px);
1194 }
1195
1196 /* Rounded sliders */
1197 .slider.round {
1198 border-radius: 35px;
1199 }
1200
1201 .slider.round:before {
1202 border-radius: 50%;
1203 }
1204
1205 /* content filter */
1206
1207 .ssp-slider-check__container {
1208
1209 display: flex;
1210 justify-content: flex-end;
1211
1212 }
1213
1214
1215
1216 .ssp-slider-check__content-itens {
1217
1218 display: flex;
1219 width: 800px !important;
1220
1221 justify-content: flex-end !important;
1222
1223 }
1224
1225 .ssp-slider-check__content-item {
1226
1227 display: flex;
1228 align-items: center;
1229 padding: 0 20px;
1230 }
1231
1232
1233 .ssp-slider-check__label {
1234
1235 font-family: Montserrat;
1236 color: #78849E;
1237 font-size: 16px;
1238 padding-left: 10px;
1239 font-weight: 600;
1240
1241 }
1242
1243 .ssp-section-tema__container-menu {
1244 padding-bottom: 15px;
1245 }
1246
1247 .ssp-section-tema__subtitle-desconto {
1248 display: block;
1249 font-size: 30px;
1250 }
1251
1252 @media only screen and (max-width: 1024px) {
1253
1254 .ssp-section-tema__subtitle-desconto {
1255 font-size: 19px;
1256 }
1257
1258 .ssp-header-unidade__title a {
1259
1260 font-size: 24px;
1261 }
1262
1263 .ssp-section-tema__subtitle-curso-section {
1264
1265 margin-left: 0px !important;
1266
1267 }
1268
1269 #filtro-ativo-nivel-2 {
1270 justify-content: center;
1271 }
1272
1273 .ssp-slider-check__label {
1274
1275 font-size: 11px;
1276
1277 }
1278
1279 .tema-slick-area {
1280
1281 display: flex;
1282 align-items: center;
1283 justify-content: flex-start;
1284 font-size: 0;
1285 flex-wrap: wrap;
1286 }
1287
1288 /* custom itens */
1289
1290
1291 .ssp-unidade-temas__label-filtre-por {
1292 font-size: 15px !important;
1293 padding-left: 5px !important;
1294 }
1295
1296
1297 .ssp-section-tema__container-menu {
1298 height: auto !important;
1299 }
1300
1301 .tema-slick-area-mobile {
1302 display: flex;
1303 align-items: center;
1304 justify-content: center;
1305 font-size: 0;
1306 flex-wrap: wrap;
1307 }
1308
1309 .ssp-section-tema__container-submenu-nivel3 {
1310
1311 justify-content: center;
1312 }
1313
1314 .ssp-slider-check__container {
1315 padding-top: 10px !important;
1316 }
1317 }
1318 </style>
1319
1320 <#if tipoCurso=="Livre" || tipoCurso=="Extensão">
1321
1322 <style>
1323 @media only screen and (max-width: 768px) {
1324 .tema-ativo::after {
1325 font-family: "Font Awesome 5 Free";
1326 font-weight: 900;
1327 content: "\f00d";
1328 font-size: 12px;
1329 margin: 0 5px;
1330 }
1331 }
1332 </style>
1333 </#if>
1334 <style>
1335 @media only screen and (max-width: 768px) {
1336 .subtema-ativo::after {
1337 font-family: "Font Awesome 5 Free";
1338 font-weight: 900;
1339 content: "\f00d";
1340 font-size: 12px;
1341 margin: 0 5px;
1342 }
1343
1344 .ssp:not(.liferay-instance) .ssp-page-busca__section-resultado__ver-todos-mobile {
1345 font-family: Montserrat;
1346 font-size: 16px;
1347 font-weight: 600;
1348 line-height: 1.21;
1349 color: #78849e;
1350 text-decoration: none !important;
1351 transition: 0.3s;
1352 text-align: center !important;
1353 padding-left: 7em;
1354 }
1355
1356 .ssp:not(.liferay-instance) .ssp-page-busca__section-resultado__ver-todos-mobile::after {
1357 font-family: FontAwesome;
1358 font-weight: 900;
1359 content: '\f054';
1360 font-size: 12px;
1361 margin-left: 5px;
1362 }
1363
1364 }
1365
1366 /* Custom css para unidades */
1367
1368 .ssp-unidade-temas__label-filtre-por {
1369
1370 font-family: Montserrat;
1371 font-size: 20px;
1372 font-weight: 600;
1373 padding: 15px;
1374 padding-left: 30px;
1375 color: #78849E;
1376
1377 }
1378
1379 .ssp-section-tema__container-submenu-nivel3 .btn-nivel-3 {
1380 margin: 15px 10px;
1381
1382 }
1383
1384
1385 .ssp-line-nivel-divisor {
1386 width: 100%;
1387 height: 1px;
1388 background: #78849E;
1389 margin: 15px 0;
1390 }
1391
1392 .ssp-header-unidade__content-info {
1393 z-index: 0 !important;
1394 }
1395
1396 .ssp-btn-tema-mobile--active {
1397 background-color: #FE9057 !important;
1398 color: white !important;
1399 }
1400
1401 .ssp-btn-tema-mobile--active::after {
1402 font-family: "Font Awesome 5 Free";
1403 font-weight: 900;
1404 content: "\f00d";
1405 font-size: 12px;
1406 margin: 0 5px;
1407 }
1408
1409 .ssp-btn-subtema-mobile--active {
1410 background-color: #78849E !important;
1411 color: white !important;
1412 }
1413
1414
1415
1416 /* Botão Visualizar mais */
1417
1418 .ssp-btn__visualizar-mais-content {
1419 display: flex;
1420 flex-wrap: nowrap;
1421 align-items: center;
1422 justify-content: center;
1423 }
1424
1425 .ssp-btn__visualizar-mais {
1426 cursor: pointer;
1427 font-size: 14px;
1428 }
1429
1430 #visualizar-mais {
1431 font-family: montserrat;
1432 }
1433
1434 .tema {
1435 box-shadow: none !important;
1436 }
1437
1438 .separador-subtemas {
1439 margin: 10px 0px 30px 0px !important;
1440 }
1441
1442 .py-5 {
1443 padding-bottom: 0px !important;
1444 padding-top: 5px !important;
1445 }
1446
1447 .ssp-section-tema__title {
1448 margin: 40px 0px 25px 0px !important;
1449 }
1450
1451 @media only screen and (min-width: 1025px) {
1452 .ssp-section-tema__container-submenu-nivel3 .btn-nivel-3 {
1453 margin-bottom: 20px !important;
1454 }
1455
1456 .filtroTextoMobile {
1457 display: none;
1458 }
1459 }
1460
1461 /* novo botao ver todos os cursos */
1462
1463 .ver-todos-cursos-link {
1464 color: #78849E !important;
1465 }
1466
1467 .ver-todos-cursos-link:hover {
1468 color: #515A6B !important;
1469 }
1470
1471 .ver-todos-cursos-link:hover p {
1472 color: #515A6B !important;
1473 }
1474
1475 .custom-card-curso-tema {
1476
1477 height: 282px !important;
1478
1479 }
1480
1481 .container-fluid .row {
1482 margin: 0 !important;
1483 }
1484
1485
1486 .container-fluid .col-md-12 {
1487 padding: 0 !important;
1488 }
1489
1490 .ver-todos-no-click {
1491 text-decoration: none !important;
1492 pointer-events: none !important;
1493 }
1494
1495 .slick-area__item.card-curso-nivel-2 .custom-card-curso-tema__title {
1496 height: 70px;
1497 }
1498
1499 #slider .ssp-header-unidade__imagem-box-imagem img {
1500 position: absolute;
1501 width: 100%;
1502 height: 100%;
1503 object-fit: cover;
1504 }
1505
1506 /* Transporte próximo */
1507
1508 .ssp:not(.liferay-instance) .ssp-header-unidade__estacionamento {
1509 display: block;
1510 padding-top: 5px;
1511 }
1512
1513 .ssp:not(.liferay-instance) .ssp-header-unidade__endereco-container {
1514 display: flex;
1515 align-items: center;
1516 justify-content: space-between;
1517 flex-flow: column;
1518 align-items: flex-start;
1519 gap: 15px;
1520 }
1521
1522 .ssp:not(.liferay-instance) .ssp-header-unidade__estacionamento a {
1523 color: white;
1524 }
1525
1526 .ssp:not(.liferay-instance) .ssp-header-unidade__estacionamento a:hover {
1527 font-weight: normal !important;
1528 }
1529
1530 .ssp:not(.liferay-instance) .ssp-header-unidade__estacionamento p {
1531 display: inline-block;
1532 margin: 0;
1533 }
1534
1535 .ssp:not(.liferay-instance) .ssp-header-unidade__endereco {
1536 max-width: 100%;
1537 }
1538
1539 @media only screen and (max-width: 768px) {
1540
1541 .ssp:not(.liferay-instance) .ssp-header-unidade__container-info .container {
1542 padding: 0;
1543 }
1544
1545 .ssp:not(.liferay-instance) .ssp-header-unidade__estacionamento p {
1546 display: inline;
1547 font-size: 13px;
1548 }
1549 }
1550
1551
1552 /* Alteracoes para 10019 */
1553 .ssp:not(.liferay-instance) .ssp-section-tema__container-submenu-nivel3 .btn-nivel-3 {
1554 font-weight: 600;
1555 color: #454F63;
1556 }
1557
1558 #filtro-temas-nivel-2 .subtema.subtema-ativo:not(.todos) {
1559 margin: 0 auto 30px auto !important;
1560 }
1561
1562 #filtro-temas-nivel-2 .btn-nivel-3 {
1563 display: inline-flex;
1564 height: 40.061px;
1565 padding: 16.868px;
1566 justify-content: center;
1567 align-items: center;
1568 gap: 16.868px;
1569 flex-shrink: 0;
1570 border-radius: 8px;
1571 border: 1.054px solid #C3CAD9;
1572 }
1573
1574 .tema-ativo::after {
1575 font-family: "Font Awesome 5 Free";
1576 font-weight: 900;
1577 content: "\f00d";
1578 font-size: 12px;
1579 margin: 0 5px;
1580 }
1581
1582 .subtema-ativo:not(.subtema-ativo.todos)::after {
1583 font-family: "Font Awesome 5 Free";
1584 font-weight: 900;
1585 content: "\f00d";
1586 font-size: 12px;
1587 margin: 0 5px;
1588 }
1589
1590 #filtro-temas-nivel-3 {
1591 margin-bottom: 20px;
1592 }
1593
1594 #filtro-temas-nivel-3 a:not(.todos, .subtema-ativo)::after {
1595 content: "+";
1596 padding-left: 10px;
1597 font-size: 16px;
1598 }
1599
1600 .ssp:not(.liferay-instance) .ssp-section-tema__title {
1601 color: #78849E;
1602 text-align: center;
1603 font-family: Montserrat;
1604 font-size: 32px;
1605 font-style: normal;
1606 font-weight: 600;
1607 line-height: normal;
1608 }
1609
1610 .ssp:not(.liferay-instance) .ssp-section-tema__title.selected {
1611 font-size: 24px;
1612 font-weight: 400;
1613 }
1614
1615 .ssp:not(.liferay-instance) .ssp-section-tema__title::after {
1616 display: none !important;
1617 }
1618
1619 .ssp-title-filtrar-mais {
1620 color: #454F63;
1621 font-family: Montserrat;
1622 font-size: 20px;
1623 font-style: normal;
1624 font-weight: 600;
1625 line-height: normal;
1626 margin-top: 58px;
1627 margin-bottom: 24px;
1628 margin-left: 10px;
1629 }
1630
1631 #filtro-temas-nivel-3 .subtema {
1632 border-radius: 32px;
1633 border: 1.054px solid #C3CAD9;
1634 display: flex;
1635 height: 32px;
1636 padding: 16.868px 16px;
1637 justify-content: center;
1638 align-items: center;
1639 gap: 12px;
1640 color: var(--boto, #636C7E);
1641 text-align: center;
1642 font-family: Montserrat;
1643 font-size: 16px;
1644 font-style: normal;
1645 font-weight: 600;
1646 line-height: normal;
1647 }
1648
1649 .ssp-divider {
1650 content: " ";
1651 display: block;
1652 background-color: #78849E;
1653 width: 127px;
1654 height: 3px;
1655 margin: 25px auto 50px;
1656 }
1657
1658 .ssp-section-tema__container-menu-item:has(.tema-ativo) {
1659 margin-left: auto;
1660 margin-right: auto;
1661 }
1662
1663 @media only screen and (max-width: 1024px) {
1664 .ssp-title-filtrar-mais {
1665 color: #454F63;
1666 font-family: Montserrat;
1667 font-size: 18px;
1668 font-style: normal;
1669 font-weight: 600;
1670 line-height: normal;
1671 margin-top: 48px;
1672 margin-bottom: 40px;
1673 margin-left: 0px;
1674 }
1675
1676 .ssp:not(.liferay-instance) .ssp-section-tema__title {
1677 color: #78849E;
1678 text-align: center;
1679 font-family: Montserrat;
1680 font-size: 21px;
1681 font-style: normal;
1682 font-weight: 700;
1683 line-height: normal;
1684 }
1685
1686 .ssp:not(.liferay-instance) .ssp-section-tema__title.selected {
1687 font-size: 16px;
1688 font-weight: 400;
1689 }
1690
1691 .ssp-divider {
1692 margin: 0px auto 30px;
1693 }
1694 }
1695
1696 .ssp:not(.liferay-instance) .ssp-card-curso,
1697 .ssp:not(.liferay-instance) .ssp-card-todos-cursos {
1698
1699 box-shadow: 0 0 15px rgba(0, 0, 0, 0.20);
1700
1701 }
1702 </style>
1703
1704
1705 <#assign
1706 assetVocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
1707 <#assign
1708 assetCategoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
1709 <#assign groupId=themeDisplay.getSiteGroupId()>
1710
1711 <#assign
1712 vocabularyTemaMercadologico=assetVocabularyLocalService.getGroupVocabulary(groupId, "Tema(Mercadológico)" )>
1713
1714 <input type="hidden" id="ssp-vocabulary-id-tema-mercadologico"
1715 value="${vocabularyTemaMercadologico.getVocabularyId()}">
1716
1717
1718 <#-- Header da Unidade -->
1719
1720
1721 <section style="position:relative;">
1722 <div class="ssp-header-unidade__imagem-box">
1723 <div class="ssp-header-unidade__imagem-box-box-linha"></div>
1724
1725 <div class="ssp-header-unidade__imagem-box-box-linha2"></div>
1726
1727 <div id="slider">
1728
1729 <div class="ssp-header-unidade__imagem-box-imagem selected">
1730
1731 <img src="${imagem.url}" loading="lazy" <#if imagem.alt?length !=0> alt="${imagem.alt}"</#if> >
1732
1733 </div>
1734
1735 <#if endereco2?length !=0>
1736
1737 <div class="ssp-header-unidade__imagem-box-imagem">
1738 <img src="${imagem2.url}" loading="lazy" <#if imagem2.alt?length !=0> alt="${imagem2.alt}"
1739 </#if> >
1740 </div>
1741
1742 </#if>
1743
1744
1745 </div>
1746 <!--div class="ssp-header-unidade__imagem-box-imagem" style="background-image: url(img/bg-fale-com-gente.jpg)"></div-->
1747
1748 <#-- dados de compartilhamento -->
1749 <@liferay_util["html-top"]>
1750 <meta name="image" property="og:image" content="${imagem.url}">
1751 <meta property="og:image:width" content="1024">
1752 </@>
1753 <#-- dados de compartilhamento -->
1754
1755 <#if tipoCurso=="Livre">
1756 <div class="ssp-header-tema__tag-tipo-curso"></div>
1757 <#elseif tipoCurso=="Técnico">
1758 <!-- Tag de Tipo de Curso -->
1759 <div class="ssp-header-tema__tag-tipo-curso bg-nivel-tecnico"></div>
1760
1761 <#else>
1762 <!-- Tag de Extensão -->
1763 <div class="ssp-header-tema__tag-tipo-curso bg-nivel-extensao"></div>
1764
1765 </#if>
1766 <div class="ssp-header-unidade__container-info">
1767
1768 <div class="container">
1769
1770 <div class="ssp-header-unidade__content-info" style="height: auto;">
1771
1772 <div class="ssp-header-unidade__content-info-container">
1773
1774 <div>
1775
1776 <div>
1777 <small class="ssp-header-unidade__subtitle">Senac</small>
1778 </div>
1779
1780 <div class="ssp-header-unidade__title-container">
1781
1782 <div>
1783
1784 <h1 class="ssp-header-unidade__title">
1785 <a href="https://www.sp.senac.br/${friendlyUrlUnidade}">
1786 ${nome}
1787 </a>
1788 </h1>
1789
1790
1791 </div>
1792
1793 <#-- o código da unidade é usado para referência de unidade no -->
1794 <span id="codUnidadeReferencia" class="d-none">${codigoUnidade}</span>
1795 <span id="friendlyUnidade" class="d-none">${friendlyUrlUnidade}</span>
1796 <span id="friendlyTipoCurso" class="d-none">${friendlyUrlTipoCurso}</span>
1797 <span id="nomeUnidadeParaBreadCrumb"
1798 class="d-none">${nomeUnidadeParaBreadCrumb}</span>
1799
1800 <#if friendlyUrlTipoCurso?contains("livre")>
1801 <span id="tipoCursoText" class="d-none">Livre</span>
1802 <#elseif friendlyUrlTipoCurso?contains("tecnico")>
1803 <span id="tipoCursoText" class="d-none">Técnico</span>
1804 <#else>
1805 <span id="tipoCursoText" class="d-none">Extensão</span>
1806 </#if>
1807 <#if friendlyUrlTemaFirst?contains("#erro#")>
1808 <span id="friendlyTemaNv1" class="d-none"></span>
1809 <#else>
1810 <span id="friendlyTemaNv1" class="d-none">${friendlyUrlTemaFirst}</span>
1811 </#if>
1812 <#if friendlyUrlTemaSecond?contains("#erro#")>
1813 <span id="friendlyTemaNv2" class="d-none"></span>
1814 <#else>
1815 <span id="friendlyTemaNv2" class="d-none">${friendlyUrlTemaSecond}</span>
1816 </#if>
1817 <#if friendlyUrlTemaThird?contains("#erro#")>
1818 <span id="friendlyTemaNv3" class="d-none"></span>
1819 <#else>
1820 <span id="friendlyTemaNv3" class="d-none">${friendlyUrlTemaThird}</span>
1821 </#if>
1822
1823 </div>
1824
1825 </div>
1826
1827 <div class="ssp-header-unidade__endereco-container">
1828
1829 <div class="d-flex flex-wrap">
1830
1831 <div>
1832
1833 <#if endereco2?length !=0>
1834 <span class="ssp-header-title-bloco">Bloco I</span><br>
1835 </#if>
1836
1837 <address class="ssp-header-unidade__endereco">
1838 ${endereco}, ${numero}<br>
1839 ${bairro}, ${cidade} - ${UF}, ${cep}
1840 </address>
1841
1842 <span class="ssp-header-unidade__estacionamento">
1843
1844 <i class="fas fa-car"></i>
1845
1846 <#if estacionamento?contains("true")>
1847 <strong>Possui estacionamento?</strong> Sim
1848 <#else>
1849 <strong>Possui estacionamento?</strong> Não
1850 </#if>
1851
1852 </span>
1853 </div>
1854
1855 <#if endereco2?length !=0>
1856
1857 <div class="pt-5">
1858 <span class="ssp-header-title-bloco">Bloco II</span><br>
1859 <address class="ssp-header-unidade__endereco">
1860 ${endereco2}, ${numero2}<br>
1861 ${bairro2}, ${cidade2}, ${cep2}
1862 </address>
1863 <span class="ssp-header-unidade__estacionamento">
1864 <i class="fas fa-car"></i>
1865
1866 <#if estacionamento2?contains("true")>
1867 <strong>Possui estacionamento?</strong> Sim
1868 <#else>
1869 <strong>Possui estacionamento?</strong> Não
1870 </#if>
1871
1872 </span>
1873 </div>
1874
1875 </#if>
1876
1877 <#if hasEstacaoProxima>
1878
1879 <span class="ssp-header-unidade__estacionamento">
1880 <i class="fa-solid fa-train-subway" aria-hidden="true"></i>
1881 <strong>Estação mais próxima:</strong>
1882 ${estacaoProxima}
1883 </span>
1884
1885 </#if>
1886
1887 </div>
1888
1889 <div class="ssp-header-unidade__content-info-maps">
1890
1891
1892 <a class="btn btn-nivel border-white ssp-header-unidade__btn" href="${googlemaps}"
1893 target="_blank">
1894 <i class="fas fa-map-marker-alt mr-2 ssp-header-unidade__btn-icon"></i>Google Maps
1895 </a>
1896
1897 <a class="btn btn-nivel border-white ml-2 d-sm-inline-block d-md-none d-lg-none d-xl-none ssp-header-unidade__btn"
1898 href="${waze}" target="_blank">
1899 <i class="fab fa-waze mr-2 ssp-header-unidade__btn-icon"></i>Waze
1900 </a>
1901
1902 </div>
1903
1904 </div>
1905
1906 </div>
1907
1908 <div class="ssp-header-unidade__content-info-body">
1909
1910 <div class="ssp-header-unidade__atendimento-container">
1911 <p><strong>Atendimento:</strong></p>
1912 <p>${horario}</p>
1913 </div>
1914
1915 </div>
1916
1917
1918 </div>
1919
1920 </div>
1921
1922 </div>
1923
1924 </div>
1925
1926
1927 <script>
1928
1929 if ($.trim($('.ssp-header-unidade__title').html()) === 'Santo Amaro') {
1930
1931 $('.ssp-header-unidade__subtitle').html('Centro Universitário Senac')
1932
1933 } else if ($.trim($('.ssp-header-unidade__title').html()) === 'Campos do Jordão') {
1934
1935 $('.ssp-header-unidade__subtitle').html('Centro Universitário Senac')
1936
1937 } else if ($.trim($('.ssp-header-unidade__title').html()) === 'Águas de São Pedro') {
1938
1939 $('.ssp-header-unidade__subtitle').html('Centro Universitário Senac')
1940
1941 }
1942
1943 //Animação de Crédito da imagem
1944
1945 $(document).ready(function () {
1946 let larguraTela = $(window).width();
1947
1948 if (larguraTela < 1024) {
1949
1950 animateCreditImage()
1951
1952 $(window).scroll(function () {
1953 ScrollPagina()
1954 });
1955
1956 } else {
1957
1958 $(".ssp-header-unidade__imagem-box-imagem").mouseover(function () {
1959 $(".creditoFotoMob").removeClass('d-none')
1960
1961 });
1962
1963 $(".ssp-header-unidade__imagem-box-imagem").mouseout(function () {
1964 $(".creditoFotoMob").addClass('d-none')
1965
1966 });
1967
1968 }
1969
1970 //verifica posição do Top
1971
1972 function ScrollPagina() {
1973
1974 let scrollPage = $(window).scrollTop();
1975
1976 if (scrollPage == 0) {
1977
1978 animateCreditImage()
1979
1980 }
1981 }
1982
1983 function animateCreditImage() {
1984
1985 $(".creditoFotoMob").removeClass('d-none').fadeIn(200).delay(2500).fadeOut(5000);
1986
1987 }
1988
1989 //anima Slider fotos unidades de
1990
1991 let time = 5000,
1992 currentImageIndex = 0,
1993 images = document
1994 .querySelectorAll("#slider .ssp-header-unidade__imagem-box-imagem")
1995 max = images.length;
1996
1997 function nextImage() {
1998
1999 images[currentImageIndex]
2000 .classList.remove("selected")
2001
2002 currentImageIndex++
2003
2004 if (currentImageIndex >= max)
2005 currentImageIndex = 0
2006
2007 images[currentImageIndex]
2008 .classList.add("selected")
2009 }
2010
2011 function start() {
2012
2013 let enderecos = document.querySelectorAll('address');
2014
2015 if (enderecos.length >= 2) {
2016
2017 setInterval(() => {
2018 // troca de image
2019 nextImage()
2020 }, time)
2021 }
2022
2023 }
2024
2025 window.addEventListener("load", start)
2026
2027 });
2028
2029 </script>
2030
2031
2032
2033 </section>
2034
2035 <!-- Fim Header Unidade -->
2036
2037
2038
2039 <#-- Conteúdo dinâmico que carrega os temas, subtemas e cursos -->
2040
2041 <section>
2042
2043 <div>
2044
2045 <h2 class="ssp-section-tema__title" data-section="title">
2046 Qual a sua área de interesse?
2047 </h2>
2048
2049 <div class="ssp-divider"></div>
2050
2051 <div class="container">
2052
2053 <div id="temas" class="ssp-section-tema__container-menu">
2054
2055 <div class="ssp-section-tema__container-menu-item">
2056 <a href="#a" class="tema todos" data-nvl="0">
2057 <i class="fa-solid fa-dice-d6"></i>
2058 Todos
2059 </a>
2060 </div>
2061
2062 </div>
2063
2064 <!-- Botão Visualizar Mais -->
2065
2066 <div class="ssp-btn__visualizar-mais-content d-md-none d-lg-none d-xl-none">
2067
2068 <p id="visualizar-mais" class="ssp-btn__visualizar-mais">Visualizar mais</p>
2069
2070 <i class="fas fa-chevron-down mx-2 visualizar-mais-seta" style="font-size: 14px;"></i>
2071
2072 </div>
2073
2074 <!-- filtros ativos para Mobile -->
2075
2076 <div id="filtro-ativo" class="tema-slick-area-mobile py-2">
2077
2078 <!-- filtro nivel 1 -->
2079 <div id="filtro-ativo-nivel-1" class="ssp-section-tema__container-menu-item mega-menu">
2080
2081 </div>
2082
2083 <div id="filtro-ativo-nivel-2" class="container ssp-section-tema__container-submenu-nivel3">
2084
2085 </div>
2086
2087 </div>
2088
2089 </div>
2090
2091 </div>
2092
2093 </section>
2094
2095 <section id="tema-nivel2-container">
2096
2097 <div id="tema-atual">
2098 <h2 class="ssp-section-tema__title"></h2>
2099 <div class="ssp-divider"></div>
2100 </div>
2101
2102 <#-- <div id="subtemas-lista-mobile"
2103 class="container d-none ssp-section-tema__container-submenu-nivel3"></div> -->
2104
2105 <div id="filtro-temas-nivel-2" class="container ssp-section-tema__container-submenu-nivel3 d-none">
2106 </div>
2107
2108 <div id="filtro-temas-nivel-3" class="container ssp-section-tema__container-submenu-nivel3 d-none">
2109 </div>
2110
2111 </section>
2112
2113 <section id="cursos-por-categoria-container" style="padding-bottom:30px">
2114
2115 <section class="py-5">
2116
2117 <div class="container">
2118 <!-- <hr class="filtroInscBolsa"> -->
2119 <div class="filtroTextoMobile">
2120 <span style="font-family: 'Montserrat';font-size: 15px;font-weight: 600;color: #454F63;">
2121 Filtrar por:</span>
2122 </div>
2123 <div class="ssp-slider-check__container" style="padding: 20px 0px;" id="container-filtros">
2124 <div class="ssp-slider-check__content-itens">
2125
2126 <div class="ssp-slider-check__content-item">
2127
2128 <label id="inscricao-aberta" class="switch">
2129 <input id="chkInscricao" type="checkbox">
2130 <span class="slider round"></span>
2131 </label>
2132
2133 <span class="ssp-slider-check__label">Comprar agora</span>
2134
2135 </div>
2136
2137 <#if tipoCurso=="Livre" || tipoCurso=="Técnico">
2138
2139 <div class="ssp-slider-check__content-item">
2140
2141 <label id="bolsas-estudo" class="switch">
2142 <input id="chkBolsa" type="checkbox">
2143 <span class="slider azul round"></span>
2144 </label>
2145
2146 <span class="ssp-slider-check__label">Bolsas de estudo</span>
2147
2148 </div>
2149 </#if>
2150 </div>
2151
2152 </div>
2153
2154 <!-- <hr class="filtroInscBolsa"> -->
2155 </div>
2156
2157 </section>
2158
2159 <div style="padding-bottom: 30px;">
2160
2161 <section id="cursos-por-subtema-container" class="container d-none">
2162
2163 <!--h2 id="subtema-atual" class="ssp-section-tema__title-subtema"></h2-->
2164
2165 <div id="subsubtemas-lista" class="ssp-section-tema__container-submenu-nivel3"></div>
2166
2167 <div id="curso-sem-slick" class="ssp-container__cursos-sem-slick"></div>
2168
2169
2170 </section>
2171
2172 </div>
2173
2174 <div id="filtroSemCurso" class="ssp-bolsa-formulario__card-aviso-atencao d-none container text-left"
2175 style="width: 100%;">
2176
2177 <i class="fas fa-exclamation-circle ssp-bolsa-formulario__card-aviso-atencao-icon"
2178 aria-hidden="true"></i>
2179
2180 <div class="ssp-bolsa-formulario__card-aviso-texto">
2181 <p>Sem cursos para o filtro selecionado</p>
2182 </div>
2183
2184 </div>
2185
2186
2187 </section>
2188
2189
2190 <#-- Template para card de cursos por categoria -->
2191 <section id="cursos-por-categoria-template" class="cursos-por-categoria ssp-section container d-none">
2192
2193
2194 <div class="ssp-page-busca__section-resultado-container" id="container-slider-cursos-livres">
2195
2196 <a href="#a" data-nvl="" data-tema="" class="ver-todos-cursos-link d-none-mobile">
2197 <p
2198 class="ssp-page-busca__section-resultado__title-outros tema-nome ssp-section-tema__subtitle-curso-section">
2199 </p>
2200 </a>
2201
2202 </div>
2203
2204 <div class="slider-curso" style="display: flex;"></div>
2205
2206 </section>
2207
2208 <#-- Estrutura com botões de tipos de curso - os únicos que precisam ser dinâmicos são Livre e Técnico
2209 -->
2210
2211 <section class="ssp-section ssp-section-lg-top">
2212
2213
2214 <div class="container text-left">
2215
2216 <h2 class="ssp-section-title">
2217
2218 Cursos oferecidos
2219
2220 </h2>
2221
2222 <div class="ssp-btns-horizontal-area">
2223
2224 <#function getCategorias primaryKey>
2225
2226 <#assign
2227 categoryService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
2228 <#attempt>
2229
2230 <#return categoryService.getCategories("com.liferay.journal.model.JournalArticle",
2231 primaryKey)>
2232
2233 <#recover>
2234
2235 <#return '#erro#'>
2236 </#attempt>
2237 </#function>
2238
2239 <#assign categoriesList=getCategorias(journal.getResourcePrimKey())
2240 normalizer=serviceLocator.findService("com.liferay.portal.kernel.util.FriendlyURLNormalizer")
2241 vocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")
2242 vocabularies=vocabularyLocalService.getAssetVocabularies(-1,-1) />
2243
2244
2245 <#list vocabularies as vocabulary>
2246 <#if vocabulary.getName()=='Unidades'>
2247
2248 <#assign
2249 xPathSelector_nomeUsualUnidade=saxReaderUtil.createXPath("dynamic-element[@field-reference='nomeUsualUnidade'
2250 ]")
2251 nomeUsual=xPathSelector_nomeUsualUnidade.selectSingleNode(rootElement).getStringValue()
2252 categories=vocabulary.getCategories()>
2253 <#list categories as category>
2254 <#if category.getName()?trim==nomeUsual?trim>
2255
2256 <#assign categoryId=category.getCategoryId()>
2257 </#if>
2258 </#list>
2259 </#if>
2260 </#list>
2261
2262 <#list categoriesList![] as category>
2263
2264 <#assign
2265 vocabularyName=vocabularyLocalService.getVocabulary(category.getVocabularyId()).getTitle("pt-br")?trim />
2266
2267 <#if normalizer.normalize(vocabularyName)=="tipo-de-curso">
2268 <#assign normalizedCategoryName=normalizer.normalize(category.getName()) />
2269
2270
2271
2272 <#if normalizedCategoryName=="livre">
2273 <a href="/${friendlyUrlUnidade}/cursos-livres"
2274 data-categoryId="${category.getCategoryId()}"
2275 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2276 ${category.getName()}
2277 </a>
2278
2279 <#elseif normalizedCategoryName=="tecnico">
2280 <a href="/${friendlyUrlUnidade}/cursos-tecnicos"
2281 data-categoryId="${category.getCategoryId()}"
2282 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2283 ${category.getName()}
2284 </a>
2285
2286 <#elseif normalizedCategoryName=="extensao">
2287 <a href="/${friendlyUrlUnidade}/extensao-universitaria"
2288 data-categoryId="${category.getCategoryId()}"
2289 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2290 ${category.getName()}
2291 </a>
2292
2293 <#elseif normalizedCategoryName=="extensao-ead">
2294 <a href="https://www.ead.senac.br/extensao-universitaria" target="_blank"
2295 data-categoryId="${category.getCategoryId()}"
2296 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2297 ${category.getName()}
2298 </a>
2299
2300 <#elseif normalizedCategoryName=="graduacao-ead">
2301 <a href="https://www.ead.senac.br/graduacao" target="_blank"
2302 data-categoryId="${category.getCategoryId()}"
2303 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2304 ${category.getName()}
2305 </a>
2306
2307 <#elseif normalizedCategoryName=="pos-graduacao-ead">
2308 <a href="https://www.ead.senac.br/pos-graduacao" target="_blank"
2309 data-categoryId="${category.getCategoryId()}"
2310 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2311 ${category.getName()}
2312 </a>
2313 <#elseif normalizedCategoryName=="jovem-aprendiz">
2314 <a href="/jovem-aprendiz" data-categoryId="${category.getCategoryId()}"
2315 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2316 ${category.getName()}
2317 </a>
2318
2319 <#else>
2320 <a href="/${friendlyUrlUnidade}/${normalizedCategoryName}"
2321 data-categoryId="${category.getCategoryId()}"
2322 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">
2323 ${category.getName()}
2324 </a>
2325 </#if>
2326
2327
2328 </#if>
2329
2330 </#list>
2331
2332 <#-- Verifica se a unidade oferta curso de Idiomas-->
2333
2334 <#list categoriesList![] as category>
2335
2336 <#assign
2337 vocabularyName=vocabularyLocalService.getVocabulary(category.getVocabularyId()).getTitle("pt-br")?trim />
2338
2339 <#if normalizer.normalize(vocabularyName)=="tema-mercadologico-">
2340
2341 <#assign normalizedCategoryName=normalizer.normalize(category.getName()) />
2342
2343 <#if category.getName()=="Idiomas">
2344 <a href="/${friendlyUrlUnidade}/cursos-livres/${normalizedCategoryName}"
2345 data-categoryId="${category.getCategoryId()}"
2346 class="btn btn-nivel btn-nivel-${normalizedCategoryName}">${category.getName()}</a>
2347 <#else>
2348 </#if>
2349
2350 </#if>
2351
2352 </#list>
2353
2354 <#list categoriesList![] as category>
2355
2356 <#assign
2357 vocabularyName=vocabularyLocalService.getVocabulary(category.getVocabularyId()).getTitle("pt-br")?trim />
2358
2359 <#if normalizer.normalize(vocabularyName)=="modalidade">
2360
2361 <#assign normalizedCategoryName=normalizer.normalize(category.getName()) />
2362
2363 <#if normalizedCategoryName=="espec.-tecnica-de-nivel-medio">
2364 <a href="/${friendlyUrlUnidade}/especializacao-tecnica"
2365 data-categoryId="${category.getCategoryId()}"
2366 class="btn btn-nivel btn-nivel-especializacao-tecnica"
2367 style="order: 1">Especialização Técnica</a>
2368 </#if>
2369
2370 </#if>
2371
2372 </#list>
2373
2374 </div>
2375
2376 </div>
2377
2378
2379 </section>
2380
2381 <script>
2382
2383 const isMobile = $(window).width() <= 1024
2384
2385 var temas = [];
2386 var subtemasStorage = new Map();
2387 var activeCategory = 'all';
2388 var activeCategoryLevel = 0;
2389 var limit = 2;
2390 var offset = 0;
2391 var todosText = '';
2392 var limitTodosCursos = 16;
2393 var offsetTodosCursos = 0;
2394 var groupId = 0;
2395 var tipoCursoNome = "${tipoCurso}";
2396 var categoryIdTipoCurso = 0;
2397 var tipoCursoNomeBreadCrumb = "";
2398 var cookieName = "";
2399 var tam = $(window).width();
2400 var urlUnidade = "";
2401 var urlTipoCurso = "";
2402 var categoryIdUnidade = "";
2403 var urlTemasStorage = new Map();
2404 var urlTemaNv1 = "";
2405 var urlTemaNv2 = "";
2406 var urlTemaNv3 = "";
2407 let urlParamTemaNv3 = ''
2408 var acessoDireto = 0;
2409 var categoryIdTemaNv1 = "";
2410 var categoryIdTemaNv2 = "";
2411 var categoryIdTemaNv3 = "";
2412 const HOST = window.location.origin;
2413 var filtrarInscricoesAbertas = 0;
2414 var filtrarBolsaEstudo = 0;
2415 var activeModeloExibicao = 1;
2416 var limitCursos = isMobile ? 4 : 11;
2417 var cliqueFiltroMobile = 0;
2418 var carregandoMais = false;
2419 var urlSearchTipoCurso = '/o/senac-content-services/idTipoCursoPorNome/{groupId}/{tipoCursoNome}';
2420 var cardVerTodosTipoCursoClass = ''
2421 let categorias = []
2422 let categoryWithoutCourse = []
2423 let friendlyUrlUnidade = ''
2424
2425 $(document).ready(function () {
2426 init()
2427
2428 //Associa eventos
2429 $(document).on("click", ".ver-todos-cursos-link", verTodosCursos);
2430 $(document).on("click", ".card-ver-todos-cursos-link", verTodosCursos);
2431 })
2432
2433 function montaBreadCrumb() {
2434 var breadCrumb = $(".breadcrumb");
2435 var nomeUnidade = $("#nomeUnidadeParaBreadCrumb").text().trim();
2436
2437 breadCrumb.empty();
2438
2439 //Home
2440 breadCrumb.append('<li class="breadcrumb-item"><a class="breadcrumb-link" href="/" title="Home"><span class="breadcrumb-text-truncate">Home</span></a></li>');
2441
2442 //Unidades
2443 breadCrumb.append('<li class="breadcrumb-item"><a class="breadcrumb-link" href="/unidades" title="Unidades"><span class="breadcrumb-text-truncate">Unidades</span></a></li>');
2444
2445 //Unidade
2446 breadCrumb.append('<li class="breadcrumb-item"><a class="breadcrumb-link" href="/' + getFriendlyUrlUnidade() + '" title="' + nomeUnidade + '"><span class="breadcrumb-text-truncate">' + nomeUnidade + '</span></a></li>');
2447
2448 //Tipo de Curso
2449 breadCrumb.append('<li class="breadcrumb-item"><a class="breadcrumb-link" href="/' + getFriendlyUrlUnidade() + '/' + getUrlTipoCurso() + '" title="' + tipoCursoNomeBreadCrumb + '"><span class="breadcrumb-text-truncate">' + tipoCursoNomeBreadCrumb + '</span></a></li>');
2450
2451 }
2452
2453 function carregaLinkBotoesLivreETecnico() {
2454
2455 urlUnidade = $("#friendlyUnidade").text().trim();
2456 urlTipoCurso = $("#friendlyTipoCurso").text().trim();
2457
2458 $.ajax({
2459 url: '/o/senac-content-services/url-tipos-de-curso/' + groupId,
2460 type: 'get',
2461 dataType: 'json',
2462 }).done(function (res) {
2463 $(res).each(function (key, value) {
2464 if (value.name == 'tecnico') {
2465 //botao livre
2466 $("#linkTecnico").attr('href', "/" + urlUnidade + "/" + value.friendlyURL);
2467 } else
2468 if (value.name == 'livre') {
2469 $("#linkLivre").attr('href', "/" + urlUnidade + "/" + value.friendlyURL);
2470 }
2471 });
2472 });
2473 }
2474
2475
2476 // Botao para filtro de cursos com inscricoes abertas e bolsas
2477 $('#inscricao-aberta input, #bolsas-estudo input').click(function () {
2478
2479 //Atualiza as variaveis globais dos dois filtros
2480 $("#inscricao-aberta input").is(":checked") == true ? filtrarInscricoesAbertas = 1 : filtrarInscricoesAbertas = 0;
2481 $("#bolsas-estudo input").is(":checked") == true ? filtrarBolsaEstudo = 1 : filtrarBolsaEstudo = 0;
2482
2483 //Refaz a busca com os filtros atualizados
2484 switch (getCurrentLevel()) {
2485 case 1:
2486 case 2:
2487 //Verifica se esta exibindo todos ou algum tema
2488 var botaoTodos = $('.todos');
2489
2490 if (botaoTodos.hasClass('ativo') || botaoTodos.hasClass('tema-ativo'))
2491 $('.todos:first').trigger('click');
2492
2493 //Se estiver ativo um tema, verifica se possui ativo um subtema
2494 else
2495 //Verifica o nivel do tema clicado
2496 $('.subtema-ativo:not(.todos)').length == 0 ? $('.subtema-ativo.todos').trigger('click') : $('.subtema-ativo:first').trigger('click', [$(this)]);
2497 break;
2498
2499 case 3:
2500 if ($('#filtro-temas-nivel-3 .subtema-ativo:not(.todos)').length) {
2501 const preSelecteds = []
2502 document.querySelectorAll('#filtro-temas-nivel-3 .subtema-ativo:not(.todos)')
2503 .forEach(el => {
2504 preSelecteds.push(el)
2505 el.classList.remove('subtema-ativo')
2506 })
2507
2508 preSelecteds.forEach(async el => await clickTema(el.getAttribute('data-tema')))
2509 } else {
2510 const el = $('#filtro-temas-nivel-3 .todos')
2511 el.trigger('click')
2512 }
2513 break;
2514 }
2515 })
2516
2517 //carrega url com tema clicado
2518 function atualizaUrlBrowser(urlTema, nivel) {
2519 var path = window.location.pathname;
2520 var urlFinal = "";
2521
2522 if (path.indexOf('staging') > 1) {
2523 urlFinal = "/web/guest-staging";
2524 } else
2525 if (path.indexOf('guest') > 1) {
2526 urlFinal = "/web/guest";
2527 }
2528
2529 const pathnames = window.location.pathname.split('/').filter(str => !!str)
2530 urlFinal += '/' + pathnames[0] + '/' + pathnames[1]
2531
2532 //se for todos os cursos a url fica so /unidade/tipo-curso
2533 if (nivel > 0) {
2534 const urlParams = new URLSearchParams(window.location.search);
2535
2536 switch (nivel) {
2537
2538 case 1:
2539 urlTemaNv1 = urlTema;
2540 urlFinal += "/" + urlTemaNv1;
2541 break;
2542
2543 case 2:
2544 urlTemaNv2 = urlTema;
2545 urlFinal += tipoCursoNome != "Técnico" ? "/" + urlTemaNv1 + "/" + urlTemaNv2 : "/" + urlTemaNv1;
2546 break;
2547
2548 case 3:
2549 urlTemaNv3 = urlTema;
2550
2551 if (tipoCursoNome != "Técnico")
2552 urlParams.set('q', urlTemaNv3)
2553
2554 urlFinal += tipoCursoNome != "Técnico" ? "/" + urlTemaNv1 + "/" + urlTemaNv2 : "/" + urlTemaNv1;
2555 break;
2556
2557 }
2558
2559 urlFinal += (urlParams.toString() ? '?' + urlParams.toString() : '')
2560
2561 }
2562
2563 urlFinal = new URL(window.location.origin + urlFinal);
2564 if ($("#inscricao-aberta input").is(":checked")) {
2565 urlFinal.searchParams.set("inscricao", true);
2566 }
2567 if ($("#bolsas-estudo input").is(":checked")) {
2568 urlFinal.searchParams.set("bolsa", true);
2569 }
2570 window.history.pushState('', 'Categoria JavaScript', decodeURIComponent(urlFinal.toString()))
2571 }
2572
2573 function getUrlTipoCurso() {
2574 return $('#friendlyTipoCurso').text().trim();
2575 }
2576
2577 function buscaFriendlyUrlTemaEAtualizaBrowser(temaId, nivelClicado) {
2578
2579 var friendlyUrlTema = urlTemasStorage.get(temaId);
2580
2581 if (typeof friendlyUrlTema === "undefined") {
2582 //se ainda nao tem no map, busco via ajax e armazeno no map a url do tema clicado para nao precisar buscar novamente
2583 $.ajax({
2584 url: '/o/senac-content-services/friendlyUrlPorCategoria/' + temaId,
2585 type: 'get',
2586 dataType: 'json',
2587 async: false
2588 }).done(function (res) {
2589
2590 urlTemasStorage.set(temaId, res.url);
2591 friendlyUrlTema = res.url
2592
2593 })
2594 }
2595
2596 if (nivelClicado == 3) {
2597 let params = ''
2598
2599 document.querySelectorAll("#filtro-temas-nivel-3 a.subtema-ativo")
2600 .forEach(a => {
2601 const friendlyUrl = urlTemasStorage.get(parseInt(a.getAttribute('data-tema')))
2602 params = (params ? params + ',' : '') + friendlyUrl
2603 })
2604
2605 atualizaUrlBrowser(params, nivelClicado);
2606 } else {
2607 atualizaUrlBrowser(friendlyUrlTema, nivelClicado);
2608 }
2609
2610 }
2611
2612 let isAcessoDireto = false
2613 //verifica se usuario acessou direto pelas urls dos temas e carrega os temas para dar sequencia
2614 async function verificaAcessoDiretoELoadTema() {
2615 isAcessoDireto = true
2616 urlTemaNv1 = $("#friendlyTemaNv1").text().trim();
2617 urlTemaNv2 = $("#friendlyTemaNv2").text().trim();
2618 urlTemaNv3 = $("#friendlyTemaNv3").text().trim();
2619
2620 const urlParamsTemaNv3 = new URLSearchParams(window.location.search);
2621 urlParamTemaNv3 = urlParamsTemaNv3.get('q');
2622
2623 carregaTemas()
2624
2625 let nivel1CategoryId
2626 let nivel2CategoryId
2627 let nivel3CategoryId
2628
2629 if (urlTemaNv1) {
2630 getSubtemas(urlTemaNv1)
2631 .done(categories => {
2632 nivel1CategoryId = categories[0].categoryId
2633 clickTema(nivel1CategoryId)
2634 })
2635 }
2636
2637 if (urlTemaNv2) {
2638 getSubtemas(urlTemaNv2, nivel1CategoryId)
2639 .done(categories => {
2640 nivel2CategoryId = categories[0].categoryId
2641 clickTema(nivel2CategoryId)
2642 })
2643 }
2644
2645 if (urlParamTemaNv3) {
2646 const params = urlParamTemaNv3.split(',')
2647
2648 for (let index = 0; index < params.length; index++) {
2649 const url = params[index];
2650
2651 const categories = await getSubtemas(url, nivel2CategoryId)
2652
2653 await clickTema(categories[0].categoryId)
2654 }
2655 }
2656
2657 isAcessoDireto = false
2658 }
2659
2660 function getFriendlyUrlUnidade() {
2661 return $("#friendlyUnidade").text().trim()
2662 }
2663
2664 /* Prefixa a URL do curso com a unidade atual, pro card novo (PortalView.Card) */
2665 function hrefResolverUnidade(curso) {
2666 var cursoUrl = curso.url || '';
2667 return (friendlyUrlUnidade && friendlyUrlUnidade.length > 1)
2668 ? HOST + '/' + friendlyUrlUnidade + '/' + cursoUrl
2669 : HOST + '/' + cursoUrl;
2670 }
2671
2672 /* Prepara a montagem inicial da página */
2673 async function init() {
2674 var tipoCursoText = $('#tipoCursoText').text().trim();
2675
2676 if (tipoCursoText == "Livre") {
2677 tipoCursoNomeBreadCrumb = "Cursos Livres";
2678 tipoCursoNome = "Livre";
2679 cookieName = "ck-cursos-livre";
2680 cardVerTodosTipoCursoClass = "livre"
2681
2682 } else if (tipoCursoText == "Técnico") {
2683 tipoCursoNomeBreadCrumb = "Cursos Técnicos";
2684 tipoCursoNome = "Técnico";
2685 cookieName = "ck-cursos-tecnico";
2686 cardVerTodosTipoCursoClass = "tecnico"
2687
2688 } else if (tipoCursoText == "Extensão") {
2689 tipoCursoNomeBreadCrumb = "Extensão Universitária";
2690 tipoCursoNome = "Extensão";
2691 cookieName = "ck-cursos-extensao";
2692 cardVerTodosTipoCursoClass = "extensao"
2693 }
2694
2695 montaBreadCrumb()
2696
2697 friendlyUrlUnidade = getFriendlyUrlUnidade()
2698
2699 const categories = await getSubtemas(friendlyUrlUnidade)
2700 categoryIdUnidade = categories[0].categoryId
2701
2702 urlTipoCurso = getUrlTipoCurso();
2703
2704 groupId = Liferay.ThemeDisplay.getScopeGroupId();
2705
2706 $('#tema-atual h2').text("");
2707 $('#tema-atual').hide();
2708
2709 todosText = $('#tema-atual h2').text();
2710
2711 //Preenche o id do tipo de curso e a modalidade
2712 var url = urlSearchTipoCurso
2713 .replace('{groupId}', groupId)
2714 .replace('{tipoCursoNome}', tipoCursoNome);
2715
2716 $.ajax({
2717 url: url,
2718 type: 'get',
2719 async: false
2720 }).done(function (categoryIdTipoCursoResponse) {
2721
2722 categoryIdTipoCurso = categoryIdTipoCursoResponse;
2723
2724 });
2725
2726 carregarCategorias()
2727 verificaFiltroInscricaoBolsaEToggle()
2728 verificaAcessoDiretoELoadTema()
2729 visualizarMais()
2730 hideVisualizarMais()
2731
2732 if (isMobile) {
2733 visualizarMenos()
2734 showVisualizarMais()
2735 }
2736
2737 }
2738
2739 function verificaFiltroInscricaoBolsaEToggle() {
2740 const urlParams = new URLSearchParams(window.location.search)
2741 $('#chkInscricao').prop("checked", urlParams.get('inscricao') == 'true')
2742 $('#chkInscricao').prop("checked") ? filtrarInscricoesAbertas = 1 : filtrarInscricoesAbertas = 0
2743 $('#chkInscricao').change(ev => selectFilter('inscricao', $('#chkInscricao')))
2744
2745 if ($('#chkBolsa').length) {
2746 $('#chkBolsa').prop("checked", urlParams.get('bolsa') == 'true')
2747 $('#chkBolsa').prop("checked") ? filtrarBolsaEstudo = 1 : filtrarBolsaEstudo = 0
2748 $('#chkBolsa').change(ev => selectFilter('bolsa', $('#chkBolsa')))
2749 }
2750 }
2751
2752 function carregarCategorias() {
2753 if (!categorias.length) {
2754 const searchParams = new URLSearchParams({
2755 companyId: themeDisplay.getCompanyId(),
2756 groupIds: themeDisplay.getScopeGroupId(),
2757 parentCategoryIds: 0,
2758 vocabularyIds: document.querySelector('#ssp-vocabulary-id-tema-mercadologico').value
2759 })
2760
2761 $.ajax({
2762 url: '/o/senac-category-services/categories?' + searchParams.toString(),
2763 method: 'get',
2764 async: false
2765 })
2766 .done(data => categorias = data)
2767 .fail(err => console.error(err))
2768 }
2769 }
2770
2771 function selectFilter(paramkey, el) {
2772 setUrlParam(paramkey, el.prop("checked"))
2773 }
2774
2775 function setUrlParam(key, value) {
2776 const url = new URL(window.location.href)
2777 if (value)
2778 url.searchParams.set(key, value);
2779 else
2780 url.searchParams.set(key, false)
2781 window.history.pushState({}, '', decodeURIComponent(url.toString()))
2782 }
2783
2784 $(document).on("click", '.ssp-btn__visualizar-mais-content', toggleVisualizarMais)
2785
2786 function visualizarMenos() {
2787 const itensTema = $('#temas').children();
2788 const itensExibidos = 6;
2789
2790 if (isMobile)
2791 itensTema.slice(itensExibidos).hide();
2792
2793 $('#visualizar-mais').text('Visualizar mais');
2794 $('#visualizar-mais').parent().find('i').removeClass('fa-chevron-up');
2795 $('#visualizar-mais').parent().find('i').addClass('fa-chevron-down');
2796 }
2797
2798 function visualizarMais() {
2799 const itensTema = $('#temas').children();
2800 const itensExibidos = 6;
2801
2802 if (isMobile)
2803 itensTema.slice(itensExibidos).show();
2804
2805 $('#visualizar-mais').text('Visualizar menos');
2806 $('#visualizar-mais').parent().find('i').removeClass('fa-chevron-down');
2807 $('#visualizar-mais').parent().find('i').addClass('fa-chevron-up');
2808 }
2809
2810 function toggleVisualizarMais() {
2811 if ($('#visualizar-mais').text() === "Visualizar mais")
2812 visualizarMais()
2813 else
2814 visualizarMenos()
2815 }
2816
2817 function showVisualizarMais() {
2818 $('.ssp-btn__visualizar-mais-content').show()
2819 }
2820
2821 function hideVisualizarMais() {
2822 $('.ssp-btn__visualizar-mais-content').hide()
2823 }
2824
2825 /* Carrega os subtemas ou cursos ao clicar no tema */
2826 let lastClicked
2827 $(".container").on(
2828 "click",
2829 ".tema",
2830 function () {
2831 const categoriaId = $(this).data('tema');
2832 const isEqualTema = lastClicked == categoriaId
2833 lastClicked = categoriaId
2834
2835 const isTodos = this.classList.contains('todos')
2836
2837 activeCategoryLevel = $(this).data('nvl');
2838 limit = 2;
2839 offset = 0;
2840 limitTodosCursos = 16;
2841 offsetTodosCursos = 0;
2842
2843 $('#filtro-temas-nivel-2').empty()
2844 $('#filtro-temas-nivel-3').empty()
2845
2846 hideVisualizarMais()
2847 $('.tema').removeClass('ativo');
2848 $('.tema').removeClass('tema-ativo')
2849 $('.ssp-section-tema__container-menu-item').show()
2850
2851 document.querySelector('.ssp-divider').classList.add('d-none')
2852
2853 document.querySelector('[data-section="title"]').classList.remove('selected')
2854
2855 if (isTodos) {
2856 document.querySelector('[data-section="title"]').innerHTML = 'Qual a sua área de interesse?'
2857 document.querySelector('.ssp-divider').classList.remove('d-none')
2858
2859 showVisualizarMais()
2860 atualizaUrlBrowser(0, 0);
2861 $('.todos').addClass('ativo');
2862
2863 if (isMobile) {
2864 visualizarMenos()
2865 showVisualizarMais()
2866 }
2867 } else {
2868 document.querySelector('[data-section="title"]').innerHTML = 'Você selecionou:'
2869 $('.ssp-section-tema__container-menu-item').hide()
2870 $('.ssp-section-tema__container-menu-item').has(this).show()
2871
2872 if (isEqualTema) {
2873 removeFiltersLevel1()
2874 return
2875 } else
2876 $(this).addClass('tema-ativo')
2877
2878 $.ajax(
2879 {
2880 url: '/o/senac-content-services/category/'
2881 + $(this).data('tema'),
2882 type: 'get'
2883 }).done(function (category) {
2884
2885 activeCategory = JSON.parse(category);
2886
2887 cleanElements();
2888
2889 displayCursosPorTema();
2890
2891 displaySubTemasLista();
2892
2893 buscaFriendlyUrlTemaEAtualizaBrowser(categoriaId, 1);
2894 });
2895
2896 if (!this.classList.contains('todos')) {
2897 hideOthersLevel1(this)
2898 }
2899 }
2900 }
2901 );
2902
2903 /* Quando clica em Ver Todos cursos de um tema */
2904 function verTodosCursos() {
2905
2906 //Scrool top
2907 $('html, body').animate({
2908 scrollTop: $("#temas").offset().top
2909 }, -1000);
2910
2911
2912 var tema = $(this).data('tema');
2913 activeCategoryLevel = $(this).data('nvl');
2914
2915 if (activeCategoryLevel == 1)
2916 buscaFriendlyUrlTemaEAtualizaBrowser(tema, activeCategoryLevel);
2917
2918 // Verifica o elemento, adiciona a classe ativo e remove dos seus primos
2919 $('.todos').removeClass('ativo');
2920
2921 limit = 2;
2922 offset = 0;
2923
2924 $.ajax({
2925 url: '/o/senac-content-services/category/' + tema,
2926 type: 'get'
2927 }).done(function (category) {
2928
2929 activeCategory = JSON.parse(category);
2930
2931 switch (activeCategoryLevel) {
2932 case 1:
2933 $('.tema').removeClass('tema-ativo');
2934 $('.tema[data-tema="' + activeCategory.categoryId + '"]').not('.slick-cloned').each(function () {
2935 if (!$(this).parent().hasClass('slick-cloned')) {
2936 var botaoTemaVerTodos = $(this);
2937 botaoTemaVerTodos.trigger('click');
2938 }
2939 });
2940
2941 break;
2942 case 2:
2943
2944 var botaoTemaVerTodosNv2 = $('.subtema[data-tema="' + activeCategory.categoryId + '"]');
2945 botaoTemaVerTodosNv2.trigger('click');
2946
2947 break;
2948 case 3:
2949 var botaoTemaVerTodosNv3 = $('.subtema[data-tema="' + activeCategory.categoryId + '"]');
2950 botaoTemaVerTodosNv3.trigger('click');
2951
2952 break;
2953 }
2954
2955
2956 });
2957 }
2958
2959 function defaultSubtema(el, temaIds) {
2960 limit = 2;
2961 offset = 0;
2962 limitTodosCursos = 16;
2963 offsetTodosCursos = 0;
2964
2965 $('#cursos-por-subtema-container').find('#curso-sem-slick').empty();
2966
2967 activeCategoryLevel = $(el).data('nvl');
2968
2969 if (!acessoDireto)
2970 buscaFriendlyUrlTemaEAtualizaBrowser($(el).data('tema'), activeCategoryLevel);
2971
2972 cleanElements();
2973
2974 const categories = []
2975 temaIds.forEach(id => {
2976 $.ajax({
2977 url: '/o/senac-content-services/category/' + id,
2978 type: 'get',
2979 async: false
2980 })
2981 .done((category) => {
2982 activeCategory = JSON.parse(category)
2983 categories.push(activeCategory)
2984 })
2985 });
2986
2987 displayCursosPorTema(categories)
2988 }
2989
2990 // evento de click nos subtemas
2991 $("#filtro-temas-nivel-2")
2992 .on("click", ".subtema", function (ev, trigger) {
2993
2994 $(this).siblings('.todos').removeClass("subtema-ativo")
2995
2996 if (this.classList.contains('todos') || (this.classList.contains('subtema-ativo') && !trigger)) {
2997 removeFiltersLevel2()
2998 return
2999 } else {
3000 hideOthersLevel2(this)
3001 this.classList.add('subtema-ativo')
3002 }
3003
3004 defaultSubtema(this, [$(this).data('tema')])
3005 })
3006
3007 $("#filtro-temas-nivel-3")
3008 .on("click", ".subtema", function (ev) {
3009
3010 $(this).siblings('.todos').removeClass("subtema-ativo")
3011
3012 if (this.classList.contains('todos')) {
3013 removeFiltersLevel3()
3014 return
3015 }
3016
3017 const isActived = this.classList.contains('subtema-ativo')
3018 if (isActived)
3019 this.classList.remove('subtema-ativo')
3020 else
3021 this.classList.add('subtema-ativo')
3022
3023
3024 const anyActive = !!document.querySelector("#filtro-temas-nivel-3 a.subtema-ativo")
3025 if (!anyActive)
3026 removeFiltersLevel3()
3027
3028 const temaIds = []
3029 document.querySelectorAll("#filtro-temas-nivel-3 a.subtema-ativo:not(.todos)")
3030 .forEach(a => temaIds.push(a.getAttribute('data-tema')))
3031
3032 defaultSubtema(this, temaIds)
3033 })
3034
3035 /* Click no botao todos */
3036 $(".container").on("click", ".todos:not(.subtema.todos)", function () {
3037
3038 atualizaUrlBrowser(0);
3039
3040 activeCategory = 'all';
3041 activeCategoryLevel = $(this).data('nvl');
3042 offset = 0;
3043
3044 /* Limpa dados de subtemas que possam ter sido criados na navegação */
3045 cleanElements();
3046
3047 $('#tema-atual').show()
3048 $('#tema-atual h2').text(todosText);
3049
3050 // Esconde a div com subtemas
3051 $('#filtro-temas-nivel-2').empty();
3052 $('#filtro-temas-nivel-2').addClass('d-none');
3053
3054 displayCursosPorTema();
3055
3056 });
3057
3058 /* Limpa a tela para exibição de novos cursos */
3059 function cleanElements() {
3060
3061 $('#subtemas-lista').empty();
3062
3063 $('#cursos-por-categoria-container .cursos-por-categoria').remove();
3064 $('#subtema-atual').empty();
3065 $('#cursos-por-subtema-container #subsubtemas-lista').empty();
3066 $('#cursos-por-subtema-container .ssp-new-card-course').remove();
3067
3068 $('#cursos-por-categoria-container').removeClass('d-none');
3069 $('#cursos-por-subtema-container').addClass('d-none');
3070 }
3071
3072 /*
3073 * Armazena a navegação em cookies, se habilitado
3074 */
3075 $(document).on("click", ".ck-curso", function () {
3076
3077 //Verifica se os alternadores estao selecionados e manipula o link do curso de acordo a eles.
3078 urlFinal = new URL(window.location.origin + $(this).attr('href'));
3079 let filtroInscricaoBolsa = false;
3080
3081 if ($("#inscricao-aberta input").is(":checked")) {
3082 urlFinal.searchParams.set("inscricao", true);
3083 filtroInscricaoBolsa = true;
3084 }
3085 if ($("#bolsas-estudo input").is(":checked")) {
3086 urlFinal.searchParams.set("bolsa", true);
3087 filtroInscricaoBolsa = true;
3088 }
3089 $(this).attr('href', urlFinal.pathname + (filtroInscricaoBolsa ? "?" + urlFinal.searchParams : ""))
3090
3091
3092 //Verifica se o cookie está habilitado
3093 if (getCookie('portalSenacCookie') != null) {
3094
3095 var articleId = $(this).data('ck');
3096 manageCookieArray(cookieName, articleId);
3097 manageCookieArray('ck-cursos', articleId);
3098 }
3099
3100 });
3101
3102 /*
3103 * Exibe os cursos por tema, dependendo do nivel
3104 */
3105 function displayCursosPorTema(categories) {
3106 hideMensagemSemCurso();
3107
3108 // Verifica o nivel
3109 switch (activeCategoryLevel) {
3110
3111 case 0: // exibe todos
3112 $('#tema-atual').hide()
3113 limit = 2;
3114
3115 $.each(temas.slice(offset, limit + offset), function (k, t) {
3116
3117 if ($('#cursos-por-categoria-' + t.categoryId).length == 0) {
3118 var template = $('#cursos-por-categoria-template').clone();
3119 template.prop('id', 'cursos-por-categoria-' + t.categoryId);
3120 template.removeClass('d-none');
3121 $('#cursos-por-categoria-container').append(template);
3122 }
3123
3124 $.ajax(
3125 {
3126 url: '/o/senac-content-services/category/'
3127 + t.categoryId,
3128 type: 'get',
3129 async: false
3130 }).done(function (category) {
3131
3132 var dadosCategoria = JSON.parse(category);
3133
3134 //monta as divs para cada tcategoria
3135 var templatePorCategoria = $('#cursos-por-categoria-' + dadosCategoria.categoryId);
3136 templatePorCategoria.find('.tema-nome').text(dadosCategoria.name);
3137 templatePorCategoria.find('.ver-todos-cursos-link').attr('data-nvl', 1);
3138 templatePorCategoria.find('.ver-todos-cursos-link').attr('data-tema', dadosCategoria.categoryId);
3139 templatePorCategoria.removeClass('d-none');
3140
3141 cursosPorCategoriaModelo1(dadosCategoria);
3142
3143 });
3144 });
3145
3146 // Esconde botao carregar mais, se necessário
3147
3148 $('.section-carregar-mais').remove();
3149
3150 if (temas.length > limit + offset)
3151 $('#cursos-por-categoria-container').append('<section style="padding: 30px 0; width:100%" class="section-carregar-mais"><div class="container"><a href="#a" class="ssp-section-tema__btn-ver-mais" id="carregar-mais" style="visibility:hidden"> Carregar mais unidades </a></div></section>');
3152
3153 break;
3154
3155 case 1:
3156 limit = 2;
3157
3158 $('#tema-atual h2').text("O que você quer aprender nessa área?");
3159 $('#tema-atual').show()
3160
3161 // Exibe os cursos dos subtemas do tema clicado percorrendo a lista de
3162 // subtemas do tema clicado
3163 if (subtemasStorage.get(activeCategory.categoryId) && subtemasStorage.get(activeCategory.categoryId).length > 0) {
3164
3165 $.each(subtemasStorage.get(activeCategory.categoryId).slice(offset,
3166 limit + offset), function (k, t) {
3167
3168 if ($('#cursos-por-categoria-' + t.categoryId).length == 0) {
3169 var template = $('#cursos-por-categoria-template').clone();
3170 template.prop('id', 'cursos-por-categoria-' + t.categoryId);
3171
3172 template.removeClass('d-none');
3173
3174 $('#cursos-por-categoria-container').append(template);
3175 }
3176
3177 $.ajax(
3178 {
3179 url: '/o/senac-content-services/category/'
3180 + t.categoryId,
3181 type: 'get',
3182 async: false
3183 }).done(function (category) {
3184
3185 var dadosCategoria = JSON.parse(category);
3186
3187 //monta as divs para cada tcategoria
3188 var templatePorCategoria = $('#cursos-por-categoria-' + dadosCategoria.categoryId);
3189 templatePorCategoria.find('.tema-nome').text(dadosCategoria.name);
3190 templatePorCategoria.find('.ver-todos-cursos-link').attr('data-nvl', 2);
3191 templatePorCategoria.find('.ver-todos-cursos-link').attr('data-tema', dadosCategoria.categoryId);
3192 templatePorCategoria.removeClass('d-none');
3193
3194 cursosPorCategoriaModelo1(dadosCategoria);
3195
3196 });
3197 });
3198
3199 // Esconde botao carregar mais, se necessário
3200 $('.section-carregar-mais').remove();
3201
3202 if (subtemasStorage.get(activeCategory.categoryId).length > limit + offset)
3203 $('#cursos-por-categoria-container').append('<section style="padding: 30px 0; width:100%" class="section-carregar-mais"><div class="container"><a href="#a" class="ssp-section-tema__btn-ver-mais" id="carregar-mais" style="visibility:hidden"> Carregar mais unidades </a></div></section>');
3204
3205 } else {
3206 //Se nao tiver subtema, exibe o modelo 2
3207 cursosPorCategoriaModelo2();
3208 }
3209
3210 break;
3211
3212 case 2: // exibe cursos do nivel 2
3213 limitTodosCursos = 16;
3214 cursosPorCategoriaModelo2();
3215 break;
3216
3217 case 3:
3218 // subtemas de nivel 3 nao devem ter limite
3219 limitTodosCursos = ($('#filtro-temas-nivel-3 .subtema-ativo:not(.todos)').length) ? -1 : 16;
3220 cursosPorCategoriaModelo3(categories);
3221 break;
3222 }
3223
3224 }
3225
3226 /*
3227 * Faz a exibição dos cursos quando se carrega a tela ou clica em 'Todos'
3228 */
3229 async function cursosPorCategoriaModelo1(category) {
3230
3231 activeModeloExibicao = 1;
3232 categoryWithoutCourse = []
3233 hideMensagemSemCurso()
3234
3235 function limparCategoria() {
3236 $('#cursos-por-categoria-' + category.categoryId).html('');
3237
3238 //essa classe tirar todo o padding da div, escondendo ela
3239 $('#cursos-por-categoria-' + category.categoryId).removeClass('ssp-section');
3240
3241 if (isMobile) {
3242 var $element = document.getElementById('cursos-por-categoria-container');
3243 var _elementPos = $element.offsetTop + 100;
3244 var _scrollDown = _elementPos + (filtrarInscricoesAbertas == 1 || filtrarBolsaEstudo == 1 ? 300 : 1);
3245 window.scrollTo(window.scrollX || window.pageXOffset, _scrollDown);//carrega os cursos
3246 setTimeout(() => window.scrollTo(window.scrollX || window.pageXOffset, _elementPos), 500);//mostra o primeiro
3247
3248 } else {
3249 var _scrollDown = (window.scrollY || window.pageYOffset) + (filtrarInscricoesAbertas == 1 || filtrarBolsaEstudo == 1 ? 20 : 1);
3250 window.scrollTo(window.scrollX || window.pageXOffset, _scrollDown);
3251 }
3252 }
3253
3254 try {
3255
3256 if (typeof CursoService !== 'object') throw new Error('Missing CursoService from script js-portal-services');
3257
3258 loading('#cursos-por-categoria-' + category.categoryId + ' .slider-curso');
3259
3260 const cursosPorCategoria = await CursoService.buscaCursos({
3261 area: [category.categoryId],
3262 tipoCurso: [categoryIdTipoCurso],
3263 unidade: [categoryIdUnidade],
3264 turmasCompra: filtrarInscricoesAbertas == 1,
3265 turmasBolsa: filtrarBolsaEstudo == 1,
3266 start: 0,
3267 end: limitCursos
3268 });
3269
3270 var totalCursos = cursosPorCategoria.total;
3271
3272 //Se nao retornou cursos, deve esconder a div da categoria
3273 if (totalCursos == 0) {
3274 limparCategoria();
3275 updateMensagemSemCurso();
3276 return;
3277 }
3278
3279 if (!$('#cursos-por-categoria-' + category.categoryId).hasClass('ssp-section'))
3280 $('#cursos-por-categoria-' + category.categoryId).addClass('ssp-section');
3281
3282 var template = $('#cursos-por-categoria-' + category.categoryId);
3283
3284 template.find('.slider-curso').empty();
3285
3286 //if (!isMobile) template.find('.slider-curso').addClass('slick-area--md-bleed slider-container');
3287
3288 const cursosListId = 'lista-cursos-' + category.categoryId;
3289 const $swiperCursosList = await PortalView.Card.createCardsCursosList(
3290 cursosPorCategoria.cursos, cursosListId, 'horizontal',
3291 { cardsLimit: limitCursos, hideGeolocation: true, hrefResolver: hrefResolverUnidade }
3292 );
3293
3294 const $cardVerTodos = $swiperCursosList.querySelector('.card-ver-todos-cursos-link');
3295 if ($cardVerTodos) {
3296 $cardVerTodos.setAttribute('data-nvl', (activeCategoryLevel + 1));
3297 $cardVerTodos.setAttribute('data-tema', category.categoryId);
3298 }
3299
3300 template.find('.slider-curso').append($swiperCursosList);
3301
3302 PortalView.Card.initSwiperCursos('#' + $swiperCursosList.id);
3303
3304 updateMensagemSemCurso();
3305
3306 } catch (err) {
3307 console.error(err);
3308 limparCategoria();
3309 } finally {
3310 enableScroll(true);
3311 }
3312 }
3313
3314 /*
3315 * Faz a exibição dos cursos quando se clica em temas nivel 2
3316 */
3317 function cursosPorCategoriaModelo2() {
3318
3319 activeModeloExibicao = 2;
3320 categoryWithoutCourse = []
3321 hideMensagemSemCurso()
3322
3323 $('#tema-atual').hide()
3324 $("#tema-atual h2").html('');
3325
3326 // Busca os filhos (3 nivel)
3327 $.ajax({
3328 url: '/o/senac-unidade-services/subtemasPorTipoCursoETemaEUnidade/' + groupId + '/' + activeCategory.categoryId + '/' + tipoCursoNome + '/' + categoryIdUnidade,
3329 type: 'get',
3330 data: {}
3331 }).done(function (subtemas) {
3332
3333 enableScroll(true);
3334
3335 subtemas = JSON.parse(subtemas);
3336
3337 let subsubtemaLista = '';
3338
3339 if (subtemas.length > 0) {
3340 subsubtemaLista = '<h3 class="ssp-title-filtrar-mais">Filtrar mais:</h3>';
3341 const btnTodos = '<a href="#a" '
3342 + ' class="subtema btn-nivel-3 subtema-ativo todos" '
3343 + '" data-nvl="2" >'
3344 + 'Todos'
3345 + '</a>'
3346
3347 subsubtemaLista += btnTodos
3348 }
3349
3350 $.each(subtemas, function (k, v) {
3351 subsubtemaLista += '<a href="#a" class="subtema btn-nivel-3" data-tema="'
3352 + v.categoryId
3353 + '" data-nvl="3" >'
3354 + v.name
3355 + '</a>';
3356 });
3357
3358 const containerSubTemaLista = document.createElement('div')
3359 containerSubTemaLista.classList.add('row')
3360 containerSubTemaLista.innerHTML = subsubtemaLista
3361 $('#filtro-temas-nivel-3').html(containerSubTemaLista.outerHTML);
3362
3363 if (subtemas.length > 0) $('#filtro-temas-nivel-3').removeClass('d-none');
3364
3365 cursosPorCategoriaModelo3();
3366
3367 })
3368
3369 }
3370
3371 async function getCursosByCategory(category) {
3372 if (activeCategory == 'all')
3373 return []
3374
3375 return await CursoService.buscaCursos({
3376 area: [category.categoryId],
3377 tipoCurso: [categoryIdTipoCurso],
3378 unidade: [categoryIdUnidade],
3379 turmasCompra: filtrarInscricoesAbertas == 1,
3380 turmasBolsa: filtrarBolsaEstudo == 1,
3381 start: offsetTodosCursos,
3382 end: limitTodosCursos + offsetTodosCursos
3383 });
3384 }
3385 /*
3386 * Faz a exibição dos cursos quando se clica em temas nivel 3
3387 */
3388 async function cursosPorCategoriaModelo3(categories) {
3389 activeModeloExibicao = 3;
3390 categoryWithoutCourse = []
3391 hideMensagemSemCurso()
3392
3393 //Se já estiver carregando não deixa juntar várias chamadas
3394 if ($('#loading-todos-cursos').length > 0) return;
3395
3396 //Loading
3397 $('#cursos-por-categoria-container').append('<div id="loading-todos-cursos" style="width:100%; text-align:center">' +
3398 '<div class="ssp-loader-content">' +
3399 '<div class="ssp-loader"></div>' +
3400 '<p class="ssp-loader-text">Carregando...</p>' +
3401 '</div>' +
3402 '</div>');
3403 $("#tema-atual").hide()
3404 $("#tema-atual h2").html('');
3405
3406 categories = categories && categories.length ? categories : [activeCategory]
3407
3408 const cursosPorSubtema = []
3409 var totalCursos = 0;
3410 var templateContainer = $('#cursos-por-subtema-container');
3411 if (offsetTodosCursos == 0) templateContainer.find('#curso-sem-slick').empty();
3412
3413 try {
3414
3415 for (let index = 0; index < categories.length; index++) {
3416 const category = categories[index];
3417
3418 const cursosEncontrados = await getCursosByCategory(category)
3419
3420 if (!cursosEncontrados || !cursosEncontrados.cursos || !cursosEncontrados.cursos.length)
3421 categoryWithoutCourse.push(category)
3422
3423 totalCursos += cursosEncontrados.total || 0;
3424
3425 (cursosEncontrados.cursos || []).forEach(cEncontrado => {
3426 if (!cursosPorSubtema.filter(c => c.articleId == cEncontrado.articleId).length)
3427 cursosPorSubtema.push(cEncontrado)
3428 })
3429 }
3430
3431 $('.ssp-loader-content').parent().remove();
3432
3433 if (!cursosPorSubtema.length) {
3434 updateMensagemSemCurso()
3435 return
3436 }
3437
3438 const $cards = await PortalView.Card.buildCardsCurso(cursosPorSubtema, {
3439 hideGeolocation: true,
3440 hrefResolver: hrefResolverUnidade
3441 });
3442
3443 $cards.forEach(function ($card) {
3444 templateContainer.find('#curso-sem-slick').append($card);
3445 });
3446
3447 templateContainer.removeClass('d-none');
3448
3449 var totalCursosExibicao = $('#curso-sem-slick .ssp-new-card-course').length;
3450
3451 // Esconde botao carregar mais, se necessário
3452 $('.section-carregar-mais').remove();
3453
3454 if (totalCursosExibicao < totalCursos)
3455 $('#cursos-por-subtema-container').append('<section style="padding: 30px 0; width:100%" class="section-carregar-mais"><div class="container"><a href="#a" class="ssp-section-tema__btn-ver-mais" id="carregar-mais" style="visibility:hidden"> Carregar mais unidades </a></div></section>');
3456
3457 updateMensagemSemCurso();
3458
3459 } catch (err) {
3460 console.error(err);
3461 $('.ssp-loader-content').parent().remove();
3462 updateMensagemSemCurso();
3463 } finally {
3464 enableScroll(true)
3465 }
3466 }
3467
3468 function montaTextoTipoCursoParaCard(curso) {
3469
3470 var tipoCursoNomeFinal = curso.tipoCursoNome + " ¿ " + curso.formatos[0].name;
3471
3472 if (curso.tipoCursoNome == "Livre")
3473 tipoCursoNomeFinal = "Livre";
3474 //tipoCursoNomeFinal = "Curso " + curso.tipoCursoNome + " ¿ " + curso.formatos[0].name;
3475
3476 return tipoCursoNomeFinal;
3477 }
3478
3479 //ao final de todos os ajax, se não houver curso na pag por causa dos filtros, exibimos mensagem de nenhum curso
3480 $(document).ajaxStop(function () {
3481 $(".card-curso-nivel-2").each(function () {
3482 if ($(this).children().length == 0)
3483 $(this).remove()
3484 });
3485 });
3486
3487 function hideMensagemSemCurso() {
3488 const $msg = $("#filtroSemCurso");
3489 if (!$msg.hasClass('d-none')) $msg.addClass('d-none');
3490 }
3491 function updateMensagemSemCurso() {
3492
3493 if ($(".ssp-new-card-course").not('.cursos-recentes-card').not('.d-none').length > 0 || $('#curso-sem-slick .ssp-new-card-course').length > 0) {
3494 hideMensagemSemCurso();
3495 return;
3496 }
3497
3498 let htmlSemCurso = ''
3499
3500 switch (getCurrentLevel()) {
3501 case 1:
3502 case 2:
3503 htmlSemCurso = getTextoSemCurso(filtrarBolsaEstudo, filtrarInscricoesAbertas, activeCategory.name)
3504 $(".ssp-bolsa-formulario__card-aviso-texto").html(htmlSemCurso);
3505 break;
3506
3507 case 3:
3508 categoryWithoutCourse
3509 .forEach(category => {
3510 const el = document.querySelector('[data-tema="' + category.categoryId + '"]')
3511 if (el) {
3512 const temaName = el.text
3513 htmlSemCurso += getTextoSemCurso(filtrarBolsaEstudo, filtrarInscricoesAbertas, temaName)
3514 }
3515 })
3516 if (!htmlSemCurso)
3517 htmlSemCurso = getTextoSemCurso(filtrarBolsaEstudo, filtrarInscricoesAbertas, activeCategory.name)
3518
3519 $(".ssp-bolsa-formulario__card-aviso-texto").html(htmlSemCurso);
3520 break;
3521
3522 default:
3523 break;
3524 }
3525
3526 if (htmlSemCurso) {
3527 $("#filtroSemCurso").removeClass("d-none");
3528 }
3529 }
3530
3531 function getTextoSemCurso(filtroBolsa, filtroInsc, temaNome) {
3532
3533 temaNome = typeof temaNome === "undefined" ? '' : 'de ' + temaNome;
3534
3535 if (filtroBolsa && filtroInsc)
3536 return "<p>No momento, estamos sem cursos <strong><span id='nomeTemaSemCurso'>" + temaNome + "</span></strong> disponíveis para compra e com bolsas de estudo.<br>Selecione outras áreas para consultar bolsas ou <a href='https://www.sp.senac.br/bolsas-de-estudo'>confira bolsas disponíveis em diferentes cursos.</a></p>";
3537 else if (filtroBolsa)
3538 return "<p>No momento, estamos sem cursos <strong><span id='nomeTemaSemCurso'>" + temaNome + "</span></strong> com bolsas de estudo.<br>Selecione outras áreas para consultar bolsas ou <a href='https://www.sp.senac.br/bolsas-de-estudo'>confira bolsas disponíveis em diferentes cursos.</a></p>";
3539 else if (filtroInsc)
3540 return "<p>No momento, estamos sem cursos <strong><span id='nomeTemaSemCurso'>" + temaNome + "</span></strong> disponíveis para compra.";
3541
3542 return ''
3543 }
3544
3545 /*
3546 * Monta a lista de temas de curso livre no header da página
3547 */
3548
3549 function carregaTemas() {
3550
3551 $
3552 .ajax(
3553 {
3554 url: '/o/senac-unidade-services/temasPorTipoCursoEUnidade/' + groupId + '/' + tipoCursoNome + '/' + categoryIdUnidade,
3555 type: 'get',
3556 async: false
3557 })
3558 .done(
3559 function (temasLista) {
3560 if (typeof temasLista != 'object')
3561 temasLista = JSON.parse(temasLista);
3562
3563 var temasObj = $('#temas');
3564
3565 $
3566 .each(
3567 temasLista,
3568 function (k, tema) {
3569 const icon = (categorias.filter(cat => cat.categoryId == tema.categoryId)[0] || { properties: {} }).properties.icon
3570 temasObj
3571 .append('<div class="ssp-section-tema__container-menu-item mega-menu"><a href="#a" class="tema" data-nvl="1" data-tema="'
3572 + tema.categoryId
3573 + '">'
3574 + '<i class="' + icon + '"></i>'
3575 + tema.name
3576 + '</a></div>');
3577
3578 // Armazena os subtemas deste tema
3579 $
3580 .ajax(
3581 {
3582 url: '/o/senac-unidade-services/subtemasPorTipoCursoETemaEUnidade/' + groupId + '/' + tema.categoryId + '/' + tipoCursoNome + '/' + categoryIdUnidade,
3583 type: 'get',
3584 data: {},
3585 async: false
3586 })
3587 .done(
3588 function (subtemas) {
3589 subtemasStorage
3590 .set(
3591 tema.categoryId,
3592 JSON
3593 .parse(subtemas));
3594
3595 });
3596 });
3597
3598 temas = temasLista;
3599
3600 displayCursosPorTema();
3601
3602 $('.todos').addClass('ativo');
3603
3604 }).fail(function (jqXHR, textStatus, msg) {
3605 // alert(msg);
3606 });
3607 }
3608
3609 /*
3610 * Exibe a lista de subtemas no mouse over do tema
3611 */
3612 function displaySubTemasLista(categoryId) {
3613 $('#filtro-temas-nivel-2').empty();
3614 $('#filtro-temas-nivel-2').removeClass('d-none');
3615
3616 const btnTodos = $('<a href="#a" '
3617 + ' class="subtema btn-nivel-3 subtema-ativo todos" '
3618 + '" data-nvl="2" >'
3619 + 'Todos'
3620 + '</a>')
3621
3622 $('#filtro-temas-nivel-2').append(btnTodos);
3623
3624 if (!subtemasStorage.get(activeCategory.categoryId) || !subtemasStorage.get(activeCategory.categoryId).length)
3625 $('#filtro-temas-nivel-2 .subtema-ativo.todos').hide()
3626
3627 $.each(subtemasStorage.get(activeCategory.categoryId), function (k, t) {
3628 $('#filtro-temas-nivel-2').append('<a href="#a" class="subtema btn-nivel-3" data-tema="'
3629 + t.categoryId
3630 + '" data-nvl="2" >'
3631 + t.name
3632 + '</a>');
3633 });
3634 }
3635
3636 //Carregar mais
3637 $(window).scroll(function () {
3638
3639 var element = document.querySelector('#carregar-mais');
3640
3641 if (element != null && !carregandoMais) {
3642 var position = element.getBoundingClientRect();
3643
3644 // carregar maios
3645 if (position.top >= 0 && position.bottom <= window.innerHeight) {
3646 // enableScroll(false);
3647 var qtCardsSubTema = $('#cursos-por-subtema-container .ssp-new-card-course').not('.d-none').length;
3648 if (qtCardsSubTema > 0) {
3649 offsetTodosCursos = qtCardsSubTema;
3650 $('.section-carregar-mais').remove();
3651 } else {
3652 offset = $('.cursos-por-categoria').not('.d-none').length;
3653 }
3654
3655 const urlParamsTemaNv3 = new URLSearchParams(window.location.search);
3656 urlParamTemaNv3 = urlParamsTemaNv3.get('q');
3657
3658 if (!urlParamTemaNv3)
3659 displayCursosPorTema();
3660 }
3661 }
3662
3663 });
3664
3665 function enableScroll(enable) {
3666 if (enable === false) document.body.classList.add("stop-scrolling")
3667 else document.body.classList.remove("stop-scrolling");
3668 carregandoMais = !enable;
3669 }
3670
3671 function hideOthersLevel1(elementShow) {
3672 document.querySelectorAll('#temas .ssp-section-tema__container-menu-item a')
3673 .forEach(a => a != elementShow ? a.classList.add('d-none') : undefined)
3674 }
3675
3676 function hideOthersLevel2(elementShow) {
3677 document.querySelectorAll('#filtro-temas-nivel-2 a')
3678 .forEach(a => a != elementShow ? a.classList.add('d-none') : undefined)
3679 }
3680
3681 function hideOthersLevel3(elementShow) {
3682 document.querySelectorAll('#filtro-temas-nivel-3 a')
3683 .forEach(a => a != elementShow ? a.classList.add('d-none') : undefined)
3684 }
3685
3686 function showAllLevel1() {
3687 document.querySelectorAll('#temas .ssp-section-tema__container-menu-item a')
3688 .forEach(btn => {
3689 btn.classList.remove('d-none')
3690 btn.classList.remove('ativo')
3691 btn.classList.remove('tema-ativo')
3692 })
3693 }
3694
3695 function showAllLevel2() {
3696 document.querySelectorAll('#filtro-temas-nivel-2 a')
3697 .forEach(btn => {
3698 btn.classList.remove('d-none')
3699 btn.classList.remove('subtema-ativo')
3700 })
3701 }
3702
3703 function showAllLevel3() {
3704 document.querySelectorAll('#filtro-temas-nivel-3 a')
3705 .forEach(btn => {
3706 btn.classList.remove('d-none')
3707 btn.classList.remove('subtema-ativo')
3708 })
3709 }
3710
3711 function removeFiltersLevel1() {
3712 showAllLevel1()
3713
3714 const btnActived = document.querySelector('#temas .ssp-section-tema__container-menu-item .todos')
3715 btnActived.click()
3716 }
3717
3718 function removeFiltersLevel2() {
3719 const btnActived = document.querySelector('#temas .tema-ativo')
3720 btnActived.click()
3721
3722 new Promise(() => btnActived.click())
3723 }
3724
3725 function removeFiltersLevel3() {
3726 const btnActivedNivel2 = document.querySelector('#filtro-temas-nivel-2 .subtema-ativo:not(.todos)')
3727 const temaNivel2 = btnActivedNivel2.getAttribute('data-tema')
3728
3729 removeFiltersLevel2()
3730
3731 const intervalNível2 = setInterval(() => {
3732 const btn = document.querySelector('[data-tema="' + temaNivel2 + '"]')
3733
3734 if (btn) {
3735 btn.click()
3736 $('.ssp-loader-content').parent().remove();
3737 clearInterval(intervalNível2)
3738 }
3739 }, 200);
3740 }
3741
3742 function clickTema(categoryId) {
3743 return new Promise(resolve => {
3744 const interval = setInterval(() => {
3745 const el = document.querySelector('[data-tema="' + categoryId + '"]')
3746
3747 if (el) {
3748 el.click()
3749 clearInterval(interval)
3750 resolve()
3751 }
3752 }, 200);
3753 })
3754 }
3755
3756 function getSubtemas(categoryFriendlyUrl, parentCategoryId) {
3757 return $.ajax({
3758 url: '/o/senac-unidade-services/categoriaPorFriendlyURL/' + categoryFriendlyUrl + "/" + (parentCategoryId || 0),
3759 type: 'get',
3760 dataType: 'json',
3761 async: false
3762 })
3763 }
3764
3765 function getCategoriesIdNivel3Actived() {
3766 const categories = []
3767
3768 document.querySelectorAll("#filtro-temas-nivel-3 a.subtema-ativo")
3769 .forEach(a => categories.push(parseInt(a.getAttribute('data-tema'))))
3770
3771 return categories
3772 }
3773
3774 function getCurrentLevel() {
3775 let level = 1
3776
3777 if (document.querySelector('#temas .tema-ativo'))
3778 level = 1
3779
3780 if (document.querySelector('#filtro-temas-nivel-2 .subtema-ativo'))
3781 level = 2
3782
3783 if (document.querySelector('#filtro-temas-nivel-3 .subtema-ativo'))
3784 level = 3
3785
3786 return level
3787 }
3788
3789
3790 </script>