Start Digital | DBS Digital Solutions | DBS SME Banking
- Home
- Start Digital Pack
- Start Digital Form 2.0 Solutions
Start Digital
Enjoy 6 Months Free Subscription to Digital Solutions!
- Home
- Start Digital Pack
- Start Digital Form 2.0 Solutions
Start Digital
Enjoy 6 Months Free Subscription to Digital Solutions!
An error occurred while processing the template.
?sort_by(...) failed at sequence index 0: The "ProductCategory" subvariable was null or missing. ---- FTL stack trace ("~" means nesting-related): - Failed at: #list ProductItem.getSiblings()?sort_... [in template "20100#20136#1636260" at line 953, column 97] ----
1<style>
2.smecardtemplate .liferay-ddm-form-field-checkbox-multiple .custom-control {
3 display: flex;
4}
5
6.smecardtemplate .portlet-forms form label {
7 display: flex;
8}
9
10.smecardtemplate .portlet-forms form .tick {
11 z-index: 98;
12 left: 3px;
13 top: 7px;
14 position: absolute;
15}
16
17.smecardtemplate .portlet-forms form .custom-control-label-text {
18 display: flex;
19}
20
21.smecardtemplate .row .col-md-1.col-sm-1.col-2 {
22 max-width: 10%;
23}
24
25.portlet-content, .portlet-minimized .portlet-content-container {
26 padding: 0;
27}
28
29.portlet-forms {
30 padding: 0 16px;
31}
32
33/*** Main ***/
34
35.sme-academy {
36 overflow: auto;
37 margin-top: 50px;
38}
39.sme-academy h2.sme-academy__title {
40 margin: 0 auto;
41 max-width: 992px;
42 font-weight: 700;
43 font-size: 32px;
44 color: #2e2e2e;
45 margin-bottom: 10px;
46}
47.sme-academy p.sme-academy__description {
48 margin: 0 auto;
49 max-width: 992px;
50 font-size: 14px;
51 color: #909090;
52 margin-bottom: 16px;
53}
54.sme-academy *, .sme-academy *:before, .sme-academy *:after {
55 margin: 0;
56 padding: 0;
57 box-sizing: border-box;
58}
59.sme-academy .sme-academy-tab-main {
60 margin: 0 auto;
61 text-align: center;
62}
63.sme-academy .sme-academy-tab-main .sme-academy-content {
64 background: #fff;
65 color: #373737;
66}
67.sme-academy .sme-academy-tab-main .sme-academy-content > div {
68 display: block;
69}
70.sme-academy .sme-academy-tab-main input {
71 display: none;
72}
73.sme-academy .sme-academy-tab-main input:checked + label {
74 background: #f33;
75 color: #fff;
76}
77 .sme-academy .sme-academy-tab-main > label {
78 display: inline-block;
79 padding: 15px 25px;
80 font-weight: 600;
81 text-align: center;
82 margin-bottom: 50px;
83 border: 1px solid #f33;
84}
85 .sme-academy .sme-academy-tab-main label:hover {
86 color: #909090;
87 cursor: pointer;
88}
89 .sme-academy #sme-academy-tab1:checked ~ .sme-academy-content #sme-academy-content1, .sme-academy #sme-academy-tab2:checked ~ .sme-academy-content #sme-academy-content2 {
90 display: block;
91}
92
93.move-top-to-card-container {
94 display: flex !important;
95 justify-content: flex-end;
96 padding-bottom: 8px;
97 padding-right: 40px;
98 padding-top: 5px;
99}
100
101.at_flat_counter {
102 margin: 0 5px !important;
103 padding: 0 6px !important;
104}
105
106/*** Single Select ***/
107
108.product-card-single-select-layout {
109 max-width: 992px;
110 margin: 0 auto;
111 overflow: hidden;
112}
113.product-card-single-select-layout .product-card-tabs {
114 max-width: 992px;
115 text-align: left;
116}
117/* .product-card-single-select-layout .product-card-tabs .product-card-content > div {
118 display: none;
119} */
120.product-card-single-select-layout .product-card-tabs input {
121 display: none;
122}
123.product-card-single-select-layout .product-card-tabs label {
124 display: inline-block;
125 border-radius: 4px 4px 0 0;
126 height: 50px;
127 width: 160px;
128 font-weight: 600;
129 text-align: center;
130 padding-top: 14px;
131 padding-bottom: 0;
132 margin: 0;
133}
134.product-card-single-select-layout .product-card-tabs label:hover {
135 color: #e5e5e5;
136 cursor: pointer;
137}
138.product-card-single-select-layout .product-card-tabs__separator {
139 padding: 0;
140 margin-top: 0;
141 margin-bottom: 50px;
142 border: 1px solid #e5e5e5;
143}
144.product-card-single-select-layout #product-card-tab1:checked ~ .product-card-content #product-card-content1, .product-card-single-select-layout #product-card-tab2:checked ~ .product-card-content #product-card-content2 {
145 display: block;
146}
147.product-card-single-select-layout .product-card-layout {
148 text-align: left;
149 list-style: none;
150 margin: 0 auto;
151 padding: 0;
152 max-width: 992px;
153 overflow: auto;
154 display: flex;
155 flex-wrap: wrap;
156 margin-bottom: 100px;
157}
158.product-card-single-select-layout .product-card-layout li:nth-of-type(3n-1) {
159 margin-left: 22px;
160 margin-right: 22px;
161}
162
163.product-card-single-select-layout .product-card-layout .product-card-content__modal-body li {
164 margin-left: 0px;
165 margin-right: 0px;
166}
167
168.product-card-multi-select-layout .product-card-layout .product-card-content__modal-body li {
169 margin-left: 0px;
170 margin-right: 0px;
171}
172.product-card-single-select-layout .product-card-layout .product-card-checkbox {
173 display: none;
174 width: 300px;
175 height: 500px;
176 background: #fff;
177 border: 1px solid #dcdcdc;
178 border-radius: 4px;
179 margin-bottom: 22px;
180 position:relative;
181}
182.product-card-single-select-layout .product-card-layout .product-card-checkbox__image {
183 border-radius: 4px 4px 0 0;
184 width: 300px;
185 height: 144px;
186 object-fit: cover;
187 background-color: #dcdcdc;
188}
189.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content {
190 margin-left: 24px;
191 margin-right: 24px;
192 margin-top: 16px;
193 margin: bottom: 0px;
194}
195.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__title {
196 font-weight: 700;
197 font-size: 20px;
198 color: #333;
199 /*Restrict 3 lines, 42 characters*/
200 overflow: hidden;
201 text-overflow: ellipsis;
202 display: -webkit-box;
203 line-height: 25px;
204 max-height: 75px;
205 -webkit-line-clamp: 3;
206 -webkit-box-orient: vertical;
207}
208.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__subtitle {
209 margin-top: 8px;
210 font-size: 14px;
211 color: #909090;
212}
213.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__time {
214 font-size: 14px;
215 color: #909090;
216 margin-top: 8px;
217 margin-bottom: 8px;
218}
219.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__description {
220 margin-top: 16px;
221 width: 250px;
222 height: 90px;
223 font-size: 14px;
224 line-height: 17px;
225}
226.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__btn-info,
227.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content__btn-info
228{
229 width: 93%;
230 height: 24px;
231 color: #909090;
232 display: block;
233 border: none;
234 font-size: 14px;
235 text-align: left;
236 padding-top: 0;
237 cursor: pointer;
238 margin-left:24px;
239 margin-top: 8px;
240 margin-bottom: 16px;
241 display: flex;
242 align-items: center;
243}
244.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__btn-info:hover,
245.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content__btn-info:hover {
246 color: #000;
247 text-decoration: underline;
248}
249 .product-card-layout .product-card-checkbox .product-card-content__modal {
250 display: none;
251 position: fixed;
252 z-index: 1001;
253 padding-top: 0;
254 left: 0;
255 top: 0;
256 width: 100%;
257 height: 100%;
258 overflow: hidden;
259 background-color: rgba(0, 0, 0, 0.5);
260}
261 .product-card-layout .product-card-checkbox .product-card-content__modal.active {
262 display: block;
263}
264.product-card-layout .product-card-checkbox .product-card-content__modal-content {
265 top: 50vh;
266 background-color: #fff;
267 margin: 0 auto;
268 position: relative;
269 margin-top: -210px;
270 max-width: 640px;
271 max-height: 420px;
272 border-radius: 4px;
273 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
274}
275.product-card-layout .product-card-checkbox .product-card-content__modal-content.active {
276 -webkit-animation-name: comedown;
277 -webkit-animation-duration: 0.4s;
278 animation-name: comedown;
279 animation-duration: 0.4s;
280}
281@-webkit-keyframes comedown {
282 from {
283 top: -300px;
284 opacity: 0;
285 }
286 to {
287 top: 50vh;
288 opacity: 1;
289 }
290}
291@keyframes comedown {
292 from {
293 top: -300px;
294 opacity: 0;
295 }
296 to {
297 top: 50vh;
298 opacity: 1;
299 }
300}
301.product-card-layout .product-card-checkbox .product-card-content__modal-header {
302 height: 70px;
303 padding: 2px 16px;
304 text-align: center;
305 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 6px 20px 0 rgba(0, 0, 0, 0.01);
306}
307.product-card-layout .product-card-checkbox .product-card-content__modal-header .product-card-content_modal-close {
308 color: black;
309 font-size: 32px;
310 cursor: pointer;
311 position: absolute;
312 left: 20px;
313 top: 12px;
314}
315.product-card-layout .product-card-checkbox .product-card-content__modal-header .product-card-content_modal-download {
316 color: black;
317 font-size: 24px;
318 cursor: pointer;
319 position: absolute;
320 right: 20px;
321 top: 16px;
322}
323.product-card-layout .product-card-checkbox .product-card-content__btn-info .ico-information-line{
324 color: #909090;
325 font-size: 18px;
326 margin-right: 5px;
327}
328.product-card-layout .product-card-checkbox .product-card-content__modal-header .product-card-content_modal-close:hover {
329 color: black;
330 text-decoration: none;
331}
332.product-card-layout .product-card-checkbox .product-card-content__modal-header h2 {
333 font-size: 16px;
334 font-weight: bold;
335 margin-top: 24px;
336}
337.product-card-layout .product-card-checkbox .product-card-content__modal-body {
338 padding: 12px 24px;
339 overflow: auto;
340 height: 270px;
341 font-size: 14px;
342 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 6px 20px 0 rgba(0, 0, 0, 0.01);
343 -ms-overflow-style: none;
344 scrollbar-width: none;
345}
346.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-content__modal-body::-webkit-scrollbar {
347 display: none;
348}
349 .product-card-layout .product-card-checkbox .product-card-content__modal-footer {
350 text-align: center;
351 height: 100px;
352}
353.product-card-layout .product-card-checkbox .product-card-content__modal-btn-cta {
354 margin-top: 20px;
355 background-color: #f33333;
356 color: #fff;
357 border: 1px solid #ee1818;
358 border-radius: 4px;
359 height: 40px;
360 width: 160px;
361 cursor: pointer;
362}
363.product-card-layout .product-card-checkbox .product-card-content__modal-btn-cta:hover {
364 background-color: #ee1818;
365}
366
367.product-card-layout .product-card-checkbox .product-card-footer {
368 position: absolute;
369 bottom: 0px;
370 width: 100%;
371 left: 0px;
372}
373.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-separator {
374 /*margin-left: 24px;
375 margin-right: 24px;*/
376 margin-top: 16px;
377 margin-bottom: 16px;
378}
379.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-group {
380 cursor: pointer;
381}
382.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-group__btn {
383 margin: 0 auto;
384 text-align: center;
385 display: block;
386 font-size: 14px;
387 background-color: #fff;
388 color: #ee1818;
389 border: 1px solid #ee1818;
390 border-radius: 4px;
391 height: 30px;
392 width: 140px;
393 cursor: pointer;
394}
395.product-card-single-select-layout .product-card-layout .product-card-checkbox .product-card-group__btn:hover {
396 background-color: #ee1818;
397 color: #fff;
398 text-decoration: none;
399}
400@media (max-width: 991px) and (min-width: 769px) {
401 .product-card-single-select-layout {
402 max-width: 622px;
403 }
404 .product-card-single-select-layout .product-card-layout {
405 margin-left: 0px;
406 }
407 .product-card-single-select-layout .product-card-layout li:nth-of-type(3n-1) {
408 margin-left: 0px;
409 margin-right: 0px;
410 }
411 .product-card-single-select-layout .product-card-layout li:nth-of-type(2n-1) {
412 margin-right: 22px;
413 }
414}
415 @media (max-width: 767px) {
416
417 .sme-academy h2.sme-academy__title {
418 padding:0px 24px 0px 24px;
419 }
420
421 .sme-academy p.sme-academy__description {
422 padding:0px 24px 0px 24px;
423 }
424
425 .product-card-single-select-layout .product-card-layout {
426 scroll-snap-type: x mandatory;
427 overflow-x: auto;
428 overflow-y: hidden;
429 height: 576px;
430 flex-wrap: inherit;
431 margin-right: 24px;
432 margin-left:24px;
433 }
434
435 .product-card-single-select-layout .product-card-layout::-webkit-scrollbar{
436 display: none;
437 width: 0px !important;
438 }
439 .product-card-single-select-layout .product-card-layout li:nth-of-type(3n-1) {
440 margin-left: 0px;
441 margin-right: 22px;
442 }
443 .product-card-single-select-layout .product-card-layout .product-card-checkbox {
444 scroll-snap-align: center;
445 margin: 0px;
446 margin-right: 22px;
447 }
448
449 p.tag-description {
450 margin-left: 25px;
451 }
452}
453
454/*** Multi Select ***/
455
456.product-card-multi-select-layout {
457 max-width: 992px;
458 margin: 0 auto;
459 overflow: hidden;
460}
461 .product-card-multi-select-layout .product-card-tabs {
462 max-width: 992px;
463 text-align: left;
464}
465/* .product-card-multi-select-layout .product-card-tabs .product-card-content > div {
466 display: none;
467} */
468 .product-card-multi-select-layout .product-card-tabs__tab {
469 display: none;
470}
471 .product-card-multi-select-layout .product-card-tabs__tab:checked + label {
472 background: #e5e5e5;
473 color: black;
474}
475 .product-card-multi-select-layout .product-card-tabs__label {
476 display: inline-block;
477 border-radius: 4px 4px 0 0;
478 height: 50px;
479 width: 160px;
480 font-weight: 600;
481 text-align: center;
482 padding-top: 14px;
483 padding-bottom: 0;
484 margin: 0;
485}
486 .product-card-multi-select-layout .product-card-tabs__label:hover {
487 color: #e5e5e5;
488 cursor: pointer;
489}
490 .product-card-multi-select-layout .product-card-tabs__separator {
491 padding: 0;
492 margin-top: 0;
493 margin-bottom: 50px;
494 border: 1px solid #e5e5e5;
495}
496.product-card-tabs input[type="radio"][data-tag="All"]:checked ~.product-card-content li.product-card-checkbox,
497.product-card-tabs input[type="radio"][data-tag="accounting"]:checked ~ .product-card-content li.product-card-checkbox[data-tag="accounting"],
498.product-card-tabs input[type="radio"][data-tag="humanresources"]:checked ~ .product-card-content li.product-card-checkbox[data-tag="humanresources"],
499.product-card-tabs input[type="radio"][data-tag="it"]:checked ~ .product-card-content li.product-card-checkbox[data-tag="it"] {
500 display: block;
501}
502 .product-card-multi-select-layout .product-card-layout {
503 text-align: left;
504 list-style: none;
505 padding: 0;
506 overflow: auto;
507 display: flex;
508 flex-wrap: wrap;
509 margin-bottom: 24px;
510}
511.product-card-multi-select-layout .product-card-layout li:nth-of-type(3n-1) {
512 margin-left: 22px;
513 margin-right: 22px;
514}
515.product-card-multi-select-layout .product-card-layout .product-card-content__modal-body li {
516 margin-left: 0px;
517 margin-right: 0px;
518}
519.product-card-multi-select-layout .product-card-layout .product-card-checkbox {
520 display: none;
521 width: 304px;
522 height: 576px;
523 background: #fff;
524 border: 1px solid #dcdcdc;
525 border-radius: 4px;
526 margin-bottom: 22px;
527 position:relative;
528}
529.product-card-multi-select-layout .product-card-layout .product-card-checkbox__image {
530 border-radius: 4px 4px 0 0;
531 width: 302px;
532 height: 144px;
533 object-fit: cover;
534 background-color: #dcdcdc;
535}
536.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content {
537 margin-left: 24px;
538 margin-right: 24px;
539 margin-top: 16px;
540 margin-bottom: 8px;
541}
542.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content__title {
543 font-weight: 700;
544 font-size: 20px;
545 color: #333;
546 /*Restrict 3 lines, 42 characters*/
547 overflow: hidden;
548 text-overflow: ellipsis;
549 display: -webkit-box;
550 line-height: 25px;
551 max-height: 75px;
552 -webkit-line-clamp: 3;
553 -webkit-box-orient: vertical;
554}
555.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content__subtitle {
556 margin-top: 8px;
557 font-size: 14px;
558 color: #909090;
559}
560.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content__time {
561 font-size: 14px;
562 color: #909090;
563 magin-top: 8px;
564 margin-bottom: 8px;
565}
566 .product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-content__description {
567 margin-top: 16px;
568 width: 250px;
569 height: 90px;
570 font-size: 14px;
571 line-height: 17px;
572}
573.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-separator {
574 /*margin-left: 24px;
575 margin-right: 24px;*/
576 margin-top: 16px;
577 margin-bottom: 0px;
578}
579 .product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group {
580 margin-left: 24px;
581 margin-right: 24px;
582 cursor: pointer;
583 height: 64px;
584 display: flex;
585 align-items: center;
586}
587 .product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label {
588 -webkit-user-select: none;
589 -moz-user-select: none;
590 -ms-user-select: none;
591 user-select: none;
592 display: block;
593 position: relative;
594 padding-left: 32px;
595 cursor: pointer;
596}
597 .product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label:hover input[type="checkbox"] ~ .product-card-check-group__checkmark {
598 /* background-color: #dcdcdc; */
599 border: 1px solid #03c58b;
600}
601 .product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label input[type="checkbox"] {
602 position: absolute;
603 opacity: 0;
604 cursor: pointer;
605 height: 0;
606 width: 0;
607}
608.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label input[type="checkbox"]:checked ~ .product-card-check-group__checkmark {
609 background-color: #03c58b;
610 border: 3px solid #03c58b;
611}
612.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label input[type="checkbox"]:checked ~ .product-card-check-group__checkmark:after {
613 display: block;
614}
615.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label .product-card-check-group__checkmark {
616 position: absolute;
617 top: 0;
618 left: 0;
619 height: 24px;
620 width: 24px;
621 background-color: #fff;
622 border: 1px solid #dcdcdc;
623 border-radius: 5px;
624}
625.product-card-multi-select-layout .product-card-layout .product-card-checkbox .product-card-check-group__label .product-card-check-group__checkmark:after {
626 content: "";
627 position: absolute;
628 display: none;
629 left: 5px;
630 top: 0;
631 width: 8px;
632 height: 15px;
633 border: solid white;
634 border-width: 0 2px 2px 0;
635 border-radius: 2px;
636 -webkit-transform: rotate(45deg);
637 -ms-transform: rotate(45deg);
638 transform: rotate(45deg);
639}
640.product-card-multi-select-layout .products-selected-footer {
641 display: default;
642 position: fixed;
643 bottom: 0;
644 left: 0;
645 width: 100%;
646 height: 80px;
647 margin: 0 auto;
648 background-color: #f7f7f7;
649 border-bottom: 2px solid #f33;
650 z-index: 1001;
651}
652.products-selected-header {
653 display: default;
654 width: 100%;
655 height: 80px;
656 margin: 0 auto;
657 background-color: #f7f7f7;
658 border-bottom: 2px solid #f33;
659 z-index: 1001;
660}
661.product-card-multi-select-layout .products-selected-footer__container,
662.products-selected-header__container {
663 width: 992px;
664 height: 100%;
665 margin: 0 auto;
666}
667.product-card-multi-select-layout .products-selected-footer__container{
668 display: flex;
669 align-items: center;
670 justify-content: flex-end;
671 margin-right: 0px;
672}
673.product-card-multi-select-layout .products-selected-footer__text,
674.products-selected-header__text {
675 font-weight: 650;
676 font-size: 20px;
677 color: #333;
678 margin-top: 26px;
679 margin-left: 120px;
680 float: left;
681}
682.product-card-multi-select-layout .products-selected-footer__text{
683 margin-left: 0px;
684 margin-right: 24px;
685 margin-top: 0px;
686}
687.product-card-multi-select-layout .products-selected-footer__btn-cta {
688 margin-right: 52px;
689 position: relative;
690 float: right;
691 background-color: #f33333;
692 color: #fff;
693 border: 1px solid #ee1818;
694 border-radius: 4px;
695 height: 40px;
696 width: 160px;
697 cursor: pointer;
698}
699.product-card-multi-select-layout .products-selected-footer__btn-cta:hover {
700 background-color: #ee1818;
701}
702.products-back-to-selection__btn-cta{
703 margin-top: 20px;
704 margin-right: 160px;
705 position: relative;
706 float: right;
707 background-color: #fff;
708 color: #f33333;
709 border: 1px solid #ee1818;
710 border-radius: 4px;
711 height: 40px;
712 width: 160px;
713 cursor: pointer;
714}
715.products-back-to-selection__btn-cta:hover{
716 color: #ee1818;
717}
718 .product-card-multi-select-layout .hidden-footer {
719 display: none;
720}
721 @media (max-width: 991px) and (min-width: 768px) {
722 .product-card-multi-select-layout {
723 max-width: 622px;
724 }
725 .product-card-multi-select-layout .product-card-layout {
726 margin-left: 0px;
727 }
728 .product-card-multi-select-layout .product-card-layout li:nth-of-type(3n-1) {
729 margin-left: 0px;
730 margin-right: 0px;
731 }
732 .product-card-multi-select-layout .product-card-layout li:nth-of-type(2n-1) {
733 margin-right: 22px;
734 }
735}
736@media (max-width: 767px) {
737 .product-card-multi-select-layout .product-card-layout {
738 scroll-snap-type: x mandatory;
739 overflow-x: auto;
740 overflow-y: hidden;
741 height: 576px;
742 flex-wrap: inherit;
743 margin-right: 24px;
744 margin-left:24px;
745 }
746 .product-card-multi-select-layout .product-card-layout::-webkit-scrollbar{
747 display: none;
748 width: 0px !important;
749 }
750 .product-card-multi-select-layout .product-card-layout li:nth-of-type(3n-1) {
751 margin-left: 0px;
752 margin-right: 22px;
753 }
754 .product-card-multi-select-layout .product-card-layout .product-card-checkbox {
755 scroll-snap-align: center;
756 margin: 0px;
757 margin-right: 22px;
758 }
759 .product-card-multi-select-layout .products-selected-footer__container,
760 .products-selected-header__container {
761 width: 100%;
762 margin: 0 0;
763 }
764 .product-card-multi-select-layout .products-selected-footer__text,
765 .products-selected-header__text {
766 font-size: 16px;
767 margin-left: 10px;
768 margin-right: 16px;
769 }
770 .product-card-multi-select-layout .products-selected-footer__btn-cta,
771 .products-back-to-selection__btn-cta {
772 margin-left: 0;
773 margin-right: 10px;
774 min-width: 160px !important;
775 height: 40px;
776 font-size: 14px;
777 }
778 .product-card-tabs .dbs-dropdown {
779 margin: 0 25px;
780 }
781
782 p.tag-description {
783 margin-left: 25px;
784 }
785}
786
787.dbs-dropdown {
788 position: relative;
789}
790/* this is due to the filter by category text on top of the dropdown*/
791.sme-academy .dbs-dropdown i.icon {
792 top: 36px;
793}
794.dbs-dropdown .icon.ico-arrowdown1 {
795 position: absolute;
796 right: 8px;
797 top: 10px;
798}
799.dbs-dropdown select {
800 font-family: sans-serif;
801 color: #2e2e2e;
802 border-width: 1px;
803 border-style: solid;
804 border-color: #c0c0c0;
805 border-image: initial;
806 width: 100%;
807 position: relative;
808 font-size: 16px;
809 z-index: 2;
810 letter-spacing: 0px;
811 -webkit-appearance: none;
812 height: 40px;
813 background: transparent;
814 border-radius: 4px;
815 padding: 8px 40px 8px 12px;
816}
817
818.dbs-dropdown select::-ms-expand{
819 display:none;
820}
821
822.sme-academy .product-card-tabs .dbs-dropdown {
823 width: 300px;
824 margin-bottom: 16px;
825}
826
827p.tag-description{
828 display: none;
829 margin-bottom: 16px;
830}
831
832.liferay-ddm-form-field-text[data-fieldname*='SelectedProducts']{
833 display: none;
834}
835.smecardtemplate .portlet-forms-display {
836 display: block !important;
837}
838/*.smecardtemplate .ddm-user-view-content {
839 display: none;
840}*/
841.smecardtemplate .ddm-form-builder-app {
842 display: none;
843}
844
845.product-card-layout .product-card-checkbox .tag {
846 font-size: 12px;
847 background: rgb(221,227,231);
848 color: black;
849 padding: 3px 15px;
850 margin: 8px 8px 0px 0px;
851}
852.product-card-layout .product-card-checkbox .tag.tag-round {
853 border-radius: 50px;
854 -moz-border-radius: 50px;
855 -webkit-border-radius: 50px;
856 -khtml-border-radius: 50px;
857}
858
859
860.product-card-content__modal-body ul {
861 margin-left: 24px;
862}
863@media (max-width: 385px) {
864 .product-card-layout{
865 margin-right: 0px !important;
866 margin-left: 0px !important;
867 }
868}
869
870.carousel-left-icon {
871 cursor: pointer;
872 position: relative;
873 top: 230px;
874 left: 15px;
875 z-index: 1;
876 color: white;
877 border: 1px solid transparent;
878 border-radius: 46px;
879 padding: 8px 5px 5px 6px !important;
880 height: 25px;
881 width: 25px;
882 font-size: 9px;
883 background-color: darkgray;
884}
885
886.carousel-right-icon {
887 cursor: pointer;
888 position: relative;
889 top: 230px;
890 left: calc(100% - 40px);
891 z-index: 1;
892 color: white;
893 border: 1px solid transparent;
894 border-radius: 46px;
895 padding: 8px 5px 5px 7px !important;
896 height: 25px;
897 width: 25px;
898 font-size: 9px;
899 background-color: darkgray;
900}
901
902@media (max-width: 575px) and (min-width: 350px){
903.carousel-right-icon {
904 top: 230px;
905 left: calc(100% - 65px) !important;
906}
907}
908</style>
909
910<div class="hide content-id">${.vars['reserved-article-id'].data}</div>
911<div class="sme-academy group-header">
912 <h2 class="sme-academy__title">${CardDesignPageDescription.PageTitle.getData()}</h2>
913 <p class="sme-academy__description">
914 ${CardDesignPageDescription.PageSubtitle.getData()}
915 </p>
916
917 <div class="sme-academy-tab-main">
918 <div class="sme-academy-content">
919 <#if CardDesignPageDescription.DisplayType.getData()=="multi">
920 <div id="sme-academy-content1">
921 <div class="product-card-multi-select-layout">
922 <div class="product-card-tabs">
923 <#if CategoryDescription.CategoryTags.getData()!="">
924 <div class="dbs-dropdown">
925 <p>${OtherLanguageLabel.CategoryLabel.getData()}</p>
926 <i class="icon ico-arrowdown1"></i>
927 <select id="card-selector" name="category">
928 <#list CategoryDescription.CategoryTags.getData()?split("\n") as category>
929 <#if category?keep_before("=") == "All" && OtherLanguageLabel.CategoryAll??>
930 <option value="${category?keep_before("=")}">${ OtherLanguageLabel.CategoryAll.getData()}</option>
931 <#else>
932 <option value="${category?keep_before("=")}">${category?keep_before("=")}</option>
933 </#if>
934 </#list>
935 </select>
936 </div>
937 </#if>
938
939 <#list CategoryDescription.CategoryTags.getData()?split("\n") as category>
940 <p class="tag-description" data-tag="${category?keep_before("=")}">${category?keep_after("=")}</p>
941 </#list>
942
943
944 <div class="product-card-content">
945 <div id="product-card-content1-m">
946 <i class="icon ico-arrowleft1 carousel-left-icon d-xs-block d-sm-block d-md-none"></i>
947 <i class="icon ico-arrowright1 carousel-right-icon d-xs-block d-sm-block d-md-none"></i>
948 <ul class="product-card-layout" id="product-card-layout">
949 <#if ProductItem.getSiblings()?has_content>
950 <#assign BadgeList = []>
951 <#assign NonBadgeList = []>
952 <#if CardDesignPageDescription.Subtitle.getData() == "Category">
953 <#list ProductItem.getSiblings()?sort_by(["ProductCategory", "data"]) as cur_ProdContent>
954 <#if cur_ProdContent.BadgeDisplay.getData() == "yes" && cur_ProdContent.BadgeTitle.getData() != "">
955 <#assign BadgeList += [cur_ProdContent]>
956 <#else>
957 <#assign NonBadgeList += [cur_ProdContent]>
958 </#if>
959 </#list>
960 <#else>
961 <#list ProductItem.getSiblings()?sort_by(["CardDateTime", "data"]) as cur_ProdContent>
962 <#assign cardDate = cur_ProdContent.Date.getData() + " " + cur_ProdContent.Time.getData()>
963 <#if cur_ProdContent.BadgeDisplay.getData() == "yes" && cur_ProdContent.BadgeTitle.getData() != "">
964 <#assign BadgeList += [cur_ProdContent]>
965 <#else>
966 <#assign NonBadgeList += [cur_ProdContent]>
967 </#if>
968 </#list>
969 </#if>
970
971 <#assign CombinedBadgeList = BadgeList + NonBadgeList>
972 <#assign modalCounter=1>
973
974 <#list CombinedBadgeList as cur_ProdContent>
975 <li class="product-card-checkbox" id="${cur_ProdContent.CardUUID.getData()}" data-uuid="${cur_ProdContent.CardUUID.getData()}" data-spltc="<#if cur_ProdContent.SpecialTC?? && cur_ProdContent.SpecialTC.getData() !="">${cur_ProdContent.SpecialTC.getData()}<#else>undefined</#if>" data-tag="${(cur_ProdContent?? && cur_ProdContent.ProductCategory?? && (cur_ProdContent?? && cur_ProdContent.ProductCategory?? && cur_ProdContent.ProductCategory.getData()?? )?then(cur_ProdContent.ProductCategory.getData(), "")?? )?then(cur_ProdContent.ProductCategory.getData(), "")}">
976 <#if cur_ProdContent.ProductImage.getData()?? && cur_ProdContent.ProductImage.getData() != "">
977 <img class="product-card-checkbox__image"
978 alt="${cur_ProdContent.ProductImage.getAttribute("alt")}"
979 data-fileentryid="${cur_ProdContent.ProductImage.getAttribute("fileEntryId")}"
980 src="${cur_ProdContent.ProductImage.getData()}" />
981 </#if>
982 <div class="product-card-content">
983 <#-- <p>${cur_ProdContent.CardDateTime.getData()}</p> -->
984 <h2 class="product-card-content__title">
985 ${cur_ProdContent.ProductTitle.getData()}
986 </h2>
987 <p class="product-card-content__subtitle">
988 <#if CardDesignPageDescription.Subtitle.getData() == "Category">
989 ${(cur_ProdContent?? && cur_ProdContent.ProductCategory?? && cur_ProdContent.ProductCategory.getData()?? )?then(cur_ProdContent.ProductCategory.getData(), "")}
990 <#else>
991 <#assign cardDate = cur_ProdContent.Date.getData() + " " + cur_ProdContent.Time.getData()>
992 ${cur_ProdContent.Date.getData()?datetime("yyyy-MM-dd")?string('dd MMMM yyyy')}
993 </#if>
994 </p>
995 <p class="product-card-content__time">
996 <#if CardDesignPageDescription.Subtitle.getData() != "Category">
997 <#assign cardDate = cur_ProdContent.Date.getData() + " " + cur_ProdContent.Time.getData()>
998 ${cur_ProdContent.Time.getData()?datetime("hh:mm a")?string('hh:mm a')}
999 <#if cur_ProdContent.EndTime.getData()?? && cur_ProdContent.EndTime.getData() != "">
1000 - ${cur_ProdContent.EndTime.getData()}
1001 </#if>
1002 </#if>
1003 </p>
1004 <#if cur_ProdContent.BadgeDisplay.getData() == "yes" && cur_ProdContent.BadgeTitle.getData() != "">
1005 <span class="tag tag-round">
1006 ${cur_ProdContent.BadgeTitle.getData()}
1007 </span>
1008 </#if>
1009 <p class="product-card-content__description">
1010 ${cur_ProdContent.ProductDesc.getData()}
1011 </p>
1012 </div>
1013 <div class="product-card-footer">
1014 <#assign modalId = "modal0" + modalCounter>
1015 <#assign modalCounter = modalCounter +1>
1016 <a class="product-card-content__btn-info" name="${modalId}">
1017 <img src="/o/smeportal-theme/images/Info.svg" style="padding-right: 5px;">${ModalDescription.ModalLinkText.getData()}
1018 </a>
1019 <div class="product-card-content__modal" id="${modalId}">
1020 <div class="product-card-content__modal-content" id="${modalId}">
1021 <div class="product-card-content__modal-header">
1022 <span class="product-card-content_modal-close">×</span>
1023 <#if cur_ProdContent.ModalDocumentsAndMedia.getData()?? && cur_ProdContent.ModalDocumentsAndMedia.getData() != "">
1024 <a class="product-card-content_modal-download" href="${cur_ProdContent.ModalDocumentsAndMedia.getData()}"><i class="icon ico-download-1-line"></i></a>
1025 </#if>
1026 <h2>${ModalDescription.ModalLinkText.getData()}</h2>
1027 </div>
1028 <div class="product-card-content__modal-body">
1029 <h2>${cur_ProdContent.ProductTitle.getData()}</h2>
1030 ${cur_ProdContent.ModalDescriptionHTML.getData()}
1031 </div>
1032 <div class="product-card-content__modal-footer">
1033 <button class="product-card-content__modal-btn-cta">
1034 ${ModalDescription.SelectButtonText.getData()}
1035 </button>
1036 </div>
1037 </div>
1038 </div>
1039 <hr class="product-card-separator" />
1040 <div class="product-card-check-group">
1041 <label class="product-card-check-group__label">
1042 ${ModalDescription.SelectButtonText.getData()}
1043 <input class="product-card-check-group__input" type="checkbox" />
1044 <span class="product-card-check-group__checkmark"></span>
1045 </label>
1046 </div>
1047 </div>
1048 </li>
1049 </#list>
1050 </#if>
1051 </ul>
1052 </div>
1053 </div>
1054 </div>
1055 <div class="products-selected-footer hidden-footer">
1056 <div class="products-selected-footer__container">
1057 <h2 class="products-selected-footer__text">0 ${OtherLanguageLabel.SelectedText.getData()}</h2>
1058 <button class="products-selected-footer__btn-cta">${OtherLanguageLabel.ContinueButtonText.getData()}</button>
1059 </div>
1060 </div>
1061 </div>
1062 </div>
1063 <#elseif CardDesignPageDescription.DisplayType.getData()=="single">
1064 <div id="sme-academy-content2">
1065 <div class="product-card-single-select-layout">
1066 <div class="product-card-tabs">
1067 <div class="dbs-dropdown">
1068 <p>${OtherLanguageLabel.CategoryLabel.getData()}</p>
1069 <i class="icon ico-arrowdown1"></i>
1070 <select id="card-selector" name="category">
1071 <#list CategoryDescription.CategoryTags.getData()?split("\n") as category>
1072 <#if category?keep_before("=") == "All" && OtherLanguageLabel.CategoryAll??>
1073 <option value="${category?keep_before("=")}">${ OtherLanguageLabel.CategoryAll.getData()}</option>
1074 <#else>
1075 <option value="${category?keep_before("=")}">${category?keep_before("=")}</option>
1076 </#if>
1077 </#list>
1078 </select>
1079 </div>
1080
1081 <#list CategoryDescription.CategoryTags.getData()?split("\n") as category>
1082 <p class="tag-description" data-tag="${category?keep_before("=")}">${category?keep_after("=")}</p>
1083 </#list>
1084
1085 <div class="product-card-content">
1086 <div id="product-card-content1">
1087 <ul class="product-card-layout" id="product-card-layout">
1088 <#if ProductItem.getSiblings()?has_content>
1089 <#assign BadgeList = []>
1090 <#assign NonBadgeList = []>
1091 <#if CardDesignPageDescription.Subtitle.getData() == "Category">
1092 <#list ProductItem.getSiblings()?sort_by(["ProductCategory", "data"]) as cur_ProdContent>
1093 <#if cur_ProdContent.BadgeDisplay.getData() == "yes" && cur_ProdContent.BadgeTitle.getData() != "">
1094 <#assign BadgeList += [cur_ProdContent]>
1095 <#else>
1096 <#assign NonBadgeList += [cur_ProdContent]>
1097 </#if>
1098 </#list>
1099 <#else>
1100 <#list ProductItem.getSiblings()?sort_by(["CardDateTime", "data"]) as cur_ProdContent>
1101 <#assign cardDate = cur_ProdContent.Date.getData() + " " + cur_ProdContent.Time.getData()>
1102 <#if cur_ProdContent.BadgeDisplay.getData() == "yes" && cur_ProdContent.BadgeTitle.getData() != "">
1103 <#assign BadgeList += [cur_ProdContent]>
1104 <#else>
1105 <#assign NonBadgeList += [cur_ProdContent]>
1106 </#if>
1107 </#list>
1108 </#if>
1109
1110 <#assign CombinedBadgeList = BadgeList + NonBadgeList>
1111 <#assign modalCounter=1>
1112
1113 <#list CombinedBadgeList as cur_ProdContent>
1114 <li class="product-card-checkbox" id="${cur_ProdContent.CardUUID.getData()}" data-uuid="${cur_ProdContent.CardUUID.getData()}" data-spltc="<#if cur_ProdContent.SpecialTC?? && cur_ProdContent.SpecialTC.getData() !="">${cur_ProdContent.SpecialTC.getData()}<#else>undefined</#if>" data-tag="${cur_ProdContent.ProductCategory.getData()}">
1115 <#if cur_ProdContent.ProductImage.getData()?? && cur_ProdContent.ProductImage.getData() != "">
1116 <img class="product-card-checkbox__image"
1117 alt="${cur_ProdContent.ProductImage.getAttribute("alt")}"
1118 data-fileentryid="${cur_ProdContent.ProductImage.getAttribute("fileEntryId")}"
1119 src="${cur_ProdContent.ProductImage.getData()}" />
1120 </#if>
1121 <div class="product-card-content">
1122 <#-- <p>${cur_ProdContent.CardDateTime.getData()}</p> -->
1123 <h2 class="product-card-content__title">
1124 ${cur_ProdContent.ProductTitle.getData()}
1125 </h2>
1126 <p class="product-card-content__subtitle">
1127 <#if CardDesignPageDescription.Subtitle.getData() == "Category">
1128 ${(cur_ProdContent?? && cur_ProdContent.ProductCategory?? && cur_ProdContent.ProductCategory.getData()?? )?then(cur_ProdContent.ProductCategory.getData(), "")}
1129 <#else>
1130 <#assign cardDate = cur_ProdContent.Date.getData() + " " + cur_ProdContent.Time.getData()>
1131 ${cur_ProdContent.Date.getData()?datetime("yyyy-MM-dd")?string('dd MMMM yyyy')}
1132 </#if>
1133 </p>
1134 <p class="product-card-content__time">
1135 <#if CardDesignPageDescription.Subtitle.getData() != "Category">
1136 <#assign cardDate = cur_ProdContent.Date.getData() + " " + cur_ProdContent.Time.getData()>
1137 ${cur_ProdContent.Time.getData()?datetime("hh:mm a")?string('hh:mm a')}
1138 <#if cur_ProdContent.EndTime.getData()?? && cur_ProdContent.EndTime.getData() != "">
1139 - ${cur_ProdContent.EndTime.getData()}
1140 </#if>
1141 </#if>
1142 </p>
1143 <#if cur_ProdContent.BadgeDisplay.getData() == "yes" && cur_ProdContent.BadgeTitle.getData() != "">
1144 <span class="tag tag-round">
1145 ${cur_ProdContent.BadgeTitle.getData()}
1146 </span>
1147 </#if>
1148 <p class="product-card-content__description">
1149 ${cur_ProdContent.ProductDesc.getData()}
1150 </p>
1151 </div>
1152 <div class="product-card-footer">
1153 <#assign modalId = "modal0" + modalCounter>
1154 <#assign modalCounter = modalCounter +1>
1155 <a class="product-card-content__btn-info" name="${modalId}">
1156 <img src="/o/smeportal-theme/images/Info.svg" style="padding-right: 5px;">${ModalDescription.ModalLinkText.getData()}
1157 </a>
1158 <div class="product-card-content__modal" id="${modalId}">
1159 <div class="product-card-content__modal-content" id="${modalId}">
1160 <div class="product-card-content__modal-header">
1161 <span class="product-card-content_modal-close">×</span>
1162 <#if cur_ProdContent.ModalDocumentsAndMedia.getData()?? && cur_ProdContent.ModalDocumentsAndMedia.getData() != "">
1163 <a class="product-card-content_modal-download" href="${cur_ProdContent.ModalDocumentsAndMedia.getData()}"><i class="icon ico-download-1-line"></i></a>
1164 </#if>
1165 <h2>${ModalDescription.ModalLinkText.getData()}</h2>
1166 </div>
1167 <div class="product-card-content__modal-body">
1168 <h2>${cur_ProdContent.ProductTitle.getData()}</h2>
1169 ${cur_ProdContent.ModalDescriptionHTML.getData()}
1170 </div>
1171 <div class="product-card-content__modal-footer">
1172 <button class="product-card-content__modal-btn-cta">
1173 ${ModalDescription.SelectButtonText.getData()}
1174 </button>
1175 </div>
1176 </div>
1177 </div>
1178 <hr class="product-card-separator" />
1179 <div class="product-card-group">
1180 <button class="product-card-group__btn">
1181 ${ModalDescription.SelectButtonText.getData()}
1182 </button>
1183 </div>
1184 </div>
1185 </li>
1186 </#list>
1187 </#if>
1188 </ul>
1189 </div>
1190 </div>
1191 </div>
1192 </div>
1193 </div>
1194 </#if>
1195 </div>
1196 </div>
1197</div>
1198
1199<script type="text/javascript">
1200var selectedProductsUUID = [];
1201var selectedProductsTerms = [];
1202var cardContainer;
1203var cardScrollerContainer;
1204var cardItemSize;
1205<#if CardDesignPageDescription.MaximumDealLimit.getData()?? && CardDesignPageDescription.MaximumDealLimit.getData() != "">
1206 var maxSelect = ${CardDesignPageDescription.MaximumDealLimit.getData()};
1207<#else>
1208 var maxSelect = 0;
1209</#if>
1210$(window).on("load", function() {
1211 // $(".at-share-btn-elements").hide();
1212 $(".at-share-btn-elements").addClass("move-top-to-card-container");
1213 $($(".at-share-btn-elements").closest(".portlet-content-container")).prependTo("#product-card-content1-m");
1214 // $(".at-share-btn-elements").show();
1215});
1216$(document).ready(function() {
1217
1218 bindCardNavigation();
1219
1220 $(".at-share-btn-elements").hide();
1221 if($(".sme-academy").length>0) {
1222 $(".product-card-checkbox").css("display","block");
1223 }
1224
1225 $("#card-selector option").each(function(){
1226 if($(this).attr("value")=="All")
1227 return;
1228 if($(".product-card-checkbox[data-tag='"+$(this).attr("value")+"']").length <=0) {
1229 $(this).remove();
1230 }
1231
1232 // Load "All" Description
1233 $(".product-card-checkbox").replaceWith(function() {
1234 return "<li class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</li>";
1235 });
1236 $(".product-card-checkbox").css("display","block");
1237 $("p.tag-description[data-tag="+"All"+"]").css("display","block");
1238 });
1239
1240 $(".sme-academy").on("click","a.product-card-content__btn-info", function(){
1241 var modalID ="#"+$(this).attr("name");
1242 $(modalID).addClass("active");
1243 $(modalID+":first-child").addClass("active");
1244 });
1245
1246 $(".sme-academy").on("click","span.product-card-content_modal-close", function() {
1247 $(".product-card-content__modal-content.active").removeClass("active");
1248 $(".product-card-content__modal.active").removeClass("active");
1249 });
1250
1251 window.addEventListener("click", function(event) {
1252 var modal = document.getElementsByClassName("product-card-content__modal active")[0];
1253 if (event.target == modal) {
1254 modal.classList.remove("active");
1255 }
1256 });
1257
1258 $(".sme-academy").on("change",".dbs-dropdown select", function() {
1259 var optionSelected = $(this).find("option:selected").attr('value');
1260 $(".product-card-checkbox").css("display","none");
1261 $("p.tag-description").css("display","none");
1262 $(".product-card-checkbox").replaceWith(function() {
1263 return "<span class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</span>";
1264 });
1265
1266 if(optionSelected=="All") {
1267 $(".product-card-checkbox").replaceWith(function() {
1268 return "<li class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</li>";
1269 });
1270 $(".product-card-checkbox").css("display","block");
1271 $("p.tag-description[data-tag='"+optionSelected+"']").css("display","block");
1272 }else {
1273 $(".product-card-checkbox[data-tag='"+optionSelected+"']").replaceWith(function() {
1274 return "<li class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</li>";
1275 });
1276 $(".product-card-checkbox[data-tag='"+optionSelected+"']").css("display","block");
1277 $("p.tag-description[data-tag='"+optionSelected+"']").css("display","block");
1278 }
1279
1280 showArrowsIfNeeded(false);
1281
1282 $(".product-card-check-group__input").each(function(){
1283 if($(this).attr("data-checked") =="true") {
1284 $(this).prop("checked",true);
1285 }
1286 });
1287 });
1288});
1289
1290// Multi Select
1291<#if CardDesignPageDescription.DisplayType.getData()=="multi">
1292 $(document).ready(function() {
1293 $(".sme-academy").on("click",'.product-card-check-group__label input[type="checkbox"]', function() {
1294 var count = $('.product-card-check-group__label input[type="checkbox"]:checked').length;
1295 var productTitle = $(this).closest("li.product-card-checkbox").find(".product-card-content .product-card-content__title").text().trim();
1296 var productSubTitle = $(this).closest("li.product-card-checkbox").find(".product-card-content .product-card-content__subtitle").text().trim();
1297 var productUUID = $(this).closest("li.product-card-checkbox").attr("data-uuid");
1298 var productTerm = $(this).closest("li.product-card-checkbox").attr("data-spltc");
1299 console.log("removed productTerm here" + productTerm);
1300 if($(this).is(":checked")) {
1301 selectedProductsUUID.push(productUUID);
1302 if (productTerm !== "undefined") {
1303 selectedProductsTerms.push(productTerm);
1304 }
1305 } else {
1306 selectedProductsUUID = selectedProductsUUID.filter(function(e){
1307 return e !== productUUID;
1308 });
1309 if (productTerm !== "undefined") {
1310 selectedProductsTerms.splice(selectedProductsTerms.indexOf(productTerm),1);
1311 }
1312 console.log("products after removing " + selectedProductsTerms);
1313 }
1314 $(".lfr-ddm-form-pages .lfr-ddm-form-page .row .liferay-ddm-form-field-checkbox-multiple[data-fieldname*=SplTermsAndCondition]").closest(".row").hide();
1315 if (selectedProductsTerms.length > 0) {
1316 selectedProductsTerms.forEach(function(term) {
1317 $(".lfr-ddm-form-pages .lfr-ddm-form-page .row .liferay-ddm-form-field-checkbox-multiple").each(function() {
1318 if ($(this).attr("data-fieldname").indexOf(term) > -1) {
1319 $(this).closest(".row").show();
1320 }
1321 });
1322 });
1323 }
1324
1325
1326 if(count > maxSelect && maxSelect > 0) {
1327 var removedProductUUID = selectedProductsUUID.shift();
1328 var removedProductTerm = selectedProductsTerms.shift();
1329
1330 $(".product-card-checkbox").each(function(){
1331 if($(this).attr("data-uuid") == removedProductUUID) {
1332 console.log("clicked");
1333 $(this).find('.product-card-check-group__label input[type="checkbox"]').click();
1334 }
1335 });
1336
1337 count = $('.product-card-check-group__label input[type="checkbox"]:checked').length;
1338 console.log("showing only" + selectedProductsTerms);
1339 $(".lfr-ddm-form-pages .lfr-ddm-form-page .row .liferay-ddm-form-field-checkbox-multiple[data-fieldname*=SplTermsAndCondition]").closest(".row").hide();
1340
1341 if (selectedProductsTerms.length > 0) {
1342 selectedProductsTerms.forEach(function(term) {
1343 $(".lfr-ddm-form-pages .lfr-ddm-form-page .row .liferay-ddm-form-field-checkbox-multiple").each(function() {
1344 if ($(this).attr("data-fieldname").indexOf(term) > -1) {
1345 $(this).closest(".row").show();
1346 }
1347 });
1348 });
1349 }
1350 }
1351
1352 if (count > 0) {
1353 $('.products-selected-footer').css("display", "block");
1354 if (count == maxSelect && maxSelect > 0) {
1355 $('.products-selected-footer__text').text(count + " ${OtherLanguageLabel.SelectedText.getData()} (MAX)");
1356 } else {
1357 $('.products-selected-footer__text').text(count + " ${OtherLanguageLabel.SelectedText.getData()}");
1358 }
1359 } else {
1360 $('.products-selected-footer').css("display", "none");
1361 }
1362 });
1363
1364 $(".sme-academy").on("change",".product-card-tabs input[type='radio']", function() {
1365 if($(this).is(':checked')){
1366 $(".sme-academy .product-card-checkbox").css("display","");
1367 $(".product-card-checkbox").replaceWith(function() {
1368 return "<span class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</span>";
1369 });
1370 if($(this).attr("data-tag")=="All") {
1371 $(".product-card-checkbox").replaceWith(function() {
1372 return "<li class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</li>";
1373 });
1374 }else {
1375 $(".product-card-checkbox[data-tag='"+$(this).attr("data-tag")+"']").replaceWith(function() {
1376 return "<li class='product-card-checkbox' id="+$(this).attr("id")+" data-uuid="+$(this).attr("data-uuid")+" data-spltc="+$(this).attr("data-spltc")+" data-tag='"+$(this).attr("data-tag")+"'>" + this.innerHTML + "</li>";
1377 });
1378 }
1379 $(".product-card-check-group__input").each(function() {
1380 if($(this).attr("data-checked") =="true") {
1381 $(this).prop("checked",true);
1382 }
1383 });
1384 }
1385 });
1386
1387 $(".sme-academy").on("change",".product-card-check-group__input", function() {
1388 if($(this).is(":checked")) {
1389 $(this).attr("data-checked","true");
1390 }else {
1391 console.log("unchecked");
1392 $(this).attr("data-checked","false");
1393 }
1394 });
1395
1396 $(".sme-academy").on("click", ".product-card-content__modal-btn-cta", function() {
1397 var checkbox = $(this).closest('.product-card-checkbox').find('.product-card-check-group input.product-card-check-group__input');
1398 if(!checkbox.is(':checked')) {
1399 checkbox.attr("data-checked","true");
1400 checkbox.click();
1401 }
1402
1403 console.log("select product-multi");
1404
1405 $(".product-card-content__modal-content.active").removeClass("active");
1406 $(".product-card-content__modal.active").removeClass("active");
1407 });
1408
1409 $(".products-selected-footer__btn-cta").click(function() {
1410 $(this).hide();
1411 $(".form-selected-products").remove();
1412 var title = $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts'] label").text().trim();
1413 var selectedCoursesHTML = "<div class='form-selected-products'><h2>"+title+"</h2></div>";
1414 $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts']").after(selectedCoursesHTML);
1415 $(".sme-academy").closest(".portlet-boundary").nextAll(".portlet-boundary").hide();
1416 $(".ddm-form-builder-app").show();
1417 $(".sme-academy").hide();
1418 $(".slide-share .carousel").hide();
1419
1420 $(".lfr-ddm-form-pages .lfr-ddm-form-page .row .liferay-ddm-form-field-checkbox-multiple[data-fieldname*=SplTermsAndCondition]").closest(".row").hide();
1421
1422 if (selectedProductsTerms.length > 0) {
1423 selectedProductsTerms.forEach(function(term) {
1424 $(".lfr-ddm-form-pages .lfr-ddm-form-page .row .liferay-ddm-form-field-checkbox-multiple").each(function() {
1425 if ($(this).attr("data-fieldname").indexOf(term) > -1) {
1426 $(this).closest(".row").show();
1427 }
1428 });
1429 });
1430 }
1431
1432 selectedProductsUUID.forEach(function(uuid) {
1433 var cardTitle = $(".product-card-checkbox[data-uuid="+uuid+"]").find(".product-card-content__title").text();
1434 var cardSubTitle = $(".product-card-checkbox[data-uuid="+uuid+"]").find(".product-card-content__subtitle").text();
1435 var cardTime = $(".product-card-checkbox[data-uuid="+uuid+"]").find(".product-card-content__time").text();
1436 var spltc = $(".product-card-checkbox[data-uuid="+uuid+"]").attr("data-spltc");
1437
1438 $(".form-selected-products").append("<div class='form-selected-course' data-uuid='"+uuid+"' data-spltc='"+spltc+"'><p class='title'>"+cardTitle+"</p><p class='date'>"+cardSubTitle + " " + cardTime +"</p><span class='remove-course'>X</span><hr/></div>");
1439 });
1440
1441 $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts'] input").val($(".content-id").text().trim()+"="+selectedProductsUUID.toString());
1442 $("#nav-bar").append('<div class="products-selected-header"><div class="products-selected-header__container"><h2 class="products-selected-header__text">'+selectedProductsUUID.length+' ${OtherLanguageLabel.SelectedText.getData()}</h2><button class="products-back-to-selection__btn-cta">${OtherLanguageLabel.ReturnButtonText.getData()}</button></div></div>');
1443 $(".products-selected-header").get(0).scrollIntoView();
1444
1445 window.scrollTo({ top: 0, behavior: 'smooth' });
1446 // Add warning message context first
1447 $(".form-selected-products").append('<div class="no-product-selected-msg"><div class="alert alert-danger" style="display: none; border: 1px solid red; border-left: 4px solid red; background-color:transparent;"><span class="icon ico-exclamation" style="display: table-cell; margin-right: 10px; font-size:21px"></span><div style=" display: inline-block; font-weight: 500; color: black; vertical-align: middle; margin-left: 8px;">'+"${FormDescription.WarningMessage.getData()}"+'</div></div><button class="back-to-selection cta-btn-inline dbswhite" type="button" style="margin-left: 0px; box-shadow:none;">'+"${FormDescription.SelectMoreButtonText.getData()}"+'</button></div>');
1448
1449 var selectedProductsCount = $('.product-card-check-group__label input[type="checkbox"]:checked').length;
1450 if(maxSelect == selectedProductsCount) {
1451 $(".form-selected-products .back-to-selection").hide();
1452 $(".products-selected-header__text").text($(".products-selected-header__text").text()+" (MAX)");
1453 }
1454 });
1455
1456 $(document).on("click",".remove-course",function() {
1457 $(".form-selected-products .back-to-selection").show();
1458 var currentProductUUID = $(this).parent().attr("data-uuid");
1459 var currentProductTerm = $(this).parent().attr("data-spltc");
1460 selectedProductsUUID = selectedProductsUUID.filter(function(e){
1461 return e !== currentProductUUID;
1462 });
1463
1464 console.log("selected Courses After removal " + selectedProductsTerms);
1465 $(this).parent().remove();
1466
1467 $(".products-selected-header .products-selected-header__text").text(selectedProductsUUID.length + " ${OtherLanguageLabel.SelectedText.getData()}");
1468 $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts'] input").val($(".content-id").text().trim()+"="+selectedProductsUUID.toString());
1469
1470 $(".product-card-checkbox").each(function() {
1471 if($(this).attr("data-uuid") == currentProductUUID) {
1472 $(this).find('.product-card-check-group__label input[type="checkbox"]').click();
1473 console.log("clicked2");
1474 }
1475 });
1476
1477 if(selectedProductsUUID.length < 1) {
1478 $(".lfr-ddm-form-pagination-controls .lfr-ddm-form-submit").attr("disabled", true);
1479 $(".products-selected-header").remove();
1480 $(".no-product-selected-msg .alert-danger").css("display", "table");
1481 }
1482 });
1483
1484 $(document).on("click",".products-back-to-selection__btn-cta", function() {
1485 if(selectedProductsUUID.length < 1) {
1486 BackToSelection(true);
1487 } else {
1488 BackToSelection(false);
1489 }
1490 });
1491
1492 $(document).on("click",".no-product-selected-msg .back-to-selection", function() {
1493 $(".lfr-ddm-form-pagination-controls .lfr-ddm-form-submit").attr("disabled", false);
1494 if(selectedProductsUUID.length < 1) {
1495 BackToSelection(true);
1496 } else {
1497 BackToSelection(false);
1498 }
1499 });
1500
1501 function BackToSelection(bool) {
1502 if (bool) {
1503 selectedProductsUUID = [];
1504 selectedProductsTerms = [];
1505 }
1506 $(".products-selected-header").remove();
1507 $(".form-selected-products").remove();
1508 $(".sme-academy").show();
1509 $(".sme-academy").closest(".portlet-boundary").nextAll(".portlet-boundary").show();
1510 $(".slide-share .carousel").show();
1511 $(".ddm-form-builder-app").hide();
1512 $(".products-selected-footer__btn-cta").show();
1513 $(".sme-academy")[0].scrollIntoView();
1514 }
1515
1516 // Set Max Select to number of cards if user haven't set
1517 if(maxSelect < 1) {
1518 maxSelect = $(".product-card-checkbox").length;
1519 }
1520 });
1521// Single Select
1522<#elseif CardDesignPageDescription.DisplayType.getData()=="single">
1523 $(document).ready(function() {
1524 $(".sme-academy").on("click", ".product-card-group__btn", function() {
1525 SelectProduct($(this));
1526 });
1527
1528 $(".sme-academy").on("click", ".product-card-content__modal-btn-cta", function() {
1529 $(".product-card-content__modal-content.active").removeClass("active");
1530 $(".product-card-content__modal.active").removeClass("active");
1531
1532 SelectProduct($(this));
1533 });
1534
1535 $(".sme-academy").on("click", ".product-card-content__modal-btn-cta", function() {
1536 var checkbox = $(this).closest('.product-card-checkbox').find('.product-card-check-group input.product-card-check-group__input');
1537 if(!checkbox.is(':checked')) {
1538 checkbox.click();
1539 }
1540
1541 $(".product-card-content__modal-content.active").removeClass("active");
1542 $(".product-card-content__modal.active").removeClass("active");
1543 });
1544
1545 $(document).on("click",".products-back-to-selection__btn-cta", function() {
1546 BackToSelection();
1547 });
1548
1549 $(document).on("click",".remove-course", function(){
1550 $(this).parent().remove();
1551
1552 $(".products-selected-header .products-selected-header__text").text("0 ${OtherLanguageLabel.SelectedText.getData()}");
1553 $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts'] input").val("");
1554
1555 $(".lfr-ddm-form-pagination-controls .lfr-ddm-form-submit").attr("disabled", true);
1556 $(".products-selected-header").remove();
1557 $(".form-selected-products").append('<div class="no-product-selected-msg"><div class="alert alert-danger" style="display: table;border: 1px solid red;border-left: 4px solid red;background-color:transparent;"><span class="icon ico-exclamation" style="display: table-cell;margin-right: 10px; font-size:21px"></span><div style=" display: inline-block;font-weight: 500;color: black;vertical-align: middle;margin-left: 8px;">'+"${FormDescription.WarningMessage.getData()}"+'</div></div><button class="back-to-selection cta-btn-inline dbswhite" type="button" style="margin-left: 0px; box-shadow:none;">'+"${FormDescription.SelectMoreButtonText.getData()}"+'</button></div>');
1558 });
1559
1560 $(document).on("click",".no-product-selected-msg .back-to-selection", function() {
1561 $(".lfr-ddm-form-pagination-controls .lfr-ddm-form-submit").attr("disabled", false);
1562 BackToSelection();
1563 });
1564
1565 function BackToSelection() {
1566 $(".products-selected-header").remove();
1567 $(".form-selected-products").remove();
1568 $(".sme-academy").show();
1569 $(".sme-academy").closest(".portlet-boundary").nextAll(".portlet-boundary").show();
1570 $(".slide-share .carousel").show();
1571 $(".ddm-form-builder-app").hide();
1572 $(".products-selected-footer__btn-cta").show();
1573 $(".sme-academy")[0].scrollIntoView();
1574 }
1575
1576 function SelectProduct(myClass) {
1577 var productUUID = $(myClass).closest("li.product-card-checkbox").attr("data-uuid");
1578 var productTitle = $(myClass).closest("li.product-card-checkbox").find(".product-card-content .product-card-content__title").text().trim();
1579 var productSubTitle = $(myClass).closest("li.product-card-checkbox").find(".product-card-content .product-card-content__subtitle").text().trim();
1580
1581 $(".form-selected-products").remove();
1582 var title = $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts'] label").text().trim();
1583 var selectedCoursesHTML = "<div class='form-selected-products'><h2>"+title+"</h2></div>";
1584 $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts']").after(selectedCoursesHTML);
1585 $(".ddm-form-builder-app").show();
1586 $(".sme-academy").hide();
1587 $(".slide-share .carousel").hide();
1588
1589 $(".form-selected-products").append("<div class='form-selected-course'><p class='title'>"+productTitle+"</p><p class='date'>"+productSubTitle+"</p><span class='remove-course'>X</span><hr/></div>");
1590 $(".liferay-ddm-form-field-text[data-fieldname*='SelectedProducts'] input").val($(".content-id").text().trim()+"="+productUUID);
1591 $("#nav-bar").append('<div class="products-selected-header"><div class="products-selected-header__container"><h2 class="products-selected-header__text">1 ${OtherLanguageLabel.SelectedText.getData()}</h2><button class="products-back-to-selection__btn-cta">${OtherLanguageLabel.ReturnButtonText.getData()}</button></div></div>');
1592 $(".products-selected-header").get(0).scrollIntoView();
1593 window.scrollTo({ top: 0, behavior: 'smooth' });
1594 }
1595 });
1596</#if>
1597
1598$(document).ready(function(){
1599 if(window.location.href.indexOf("#")>-1) {
1600 var idOfAnchor = window.location.href.substring(window.location.href.indexOf("#"));
1601 if(idOfAnchor.length>1)
1602 {
1603 var x = $(idOfAnchor);
1604 $(window).scrollTop(x.offset().top-document.getElementById("header-wrapper").getBoundingClientRect().height);
1605 //document.getElementById(idOfAnchor).scrollIntoView();
1606 }
1607 }
1608});
1609
1610function bindCardNavigation() {
1611 cardScrollerContainer = document.querySelector('#product-card-layout');
1612 cardItemSize = $(".product-card-checkbox:first").width();
1613
1614 $(".product-card-layout").scroll(scrollEventHandler);
1615 $(".ico-arrowright1").click(scrollToNextEventHandler);
1616 $(".ico-arrowleft1").click(scrollToPrevEventHandler);
1617
1618 showArrowsIfNeeded(true);
1619}
1620
1621function scrollToNextEventHandler() {
1622 console.log("Right");
1623 cardScrollerContainer.scrollBy(cardItemSize, 0);
1624}
1625
1626function scrollToPrevEventHandler() {
1627 console.log("Left");
1628 cardScrollerContainer.scrollBy(-cardItemSize, 0);
1629}
1630
1631function scrollEventHandler(event) {
1632 var $width = $(this).outerWidth();
1633 var $scrollWidth = $(this)[0].scrollWidth;
1634 var $scrollLeft = $(this).scrollLeft();
1635
1636 if ($scrollWidth - $width === $scrollLeft) {
1637 $('.ico-arrowright1').css('opacity','0');
1638 $('.ico-arrowleft1').css('opacity','1');
1639 } else if (($scrollWidth - $width) > $scrollLeft) {
1640 $('.ico-arrowright1').css('opacity','1');
1641 }
1642
1643 if ($scrollLeft === 0) {
1644 $('.ico-arrowright1').css('opacity','1');
1645 $('.ico-arrowleft1').css('opacity','0');
1646 } else if ($scrollLeft > 0) {
1647 $('.ico-arrowleft1').css('opacity','1');
1648 }
1649
1650 if ($scrollLeft === 0 && ($scrollWidth - $width) === 0) {
1651 $('.ico-arrowright1').css('opacity','0');
1652 $('.ico-arrowleft1').css('opacity','0');
1653 }
1654}
1655
1656function showArrowsIfNeeded(isOnLoad) {
1657 var visibleCards;
1658
1659 if (isOnLoad) {
1660 visibleCards = $(".product-card-checkbox");
1661 } else {
1662 visibleCards = $(".product-card-checkbox").filter(function() {
1663 return $(this).css("display") === "block";
1664 });
1665 }
1666
1667 console.log("Visible Cards", visibleCards.length);
1668
1669 if (visibleCards.length > 1) {
1670 $('.ico-arrowright1').css('opacity','1');
1671 $('.ico-arrowleft1').css('opacity','0');
1672 } else {
1673 $('.ico-arrowright1').css('opacity','0');
1674 $('.ico-arrowleft1').css('opacity','0');
1675 }
1676}
1677</script>