Browse code

Progress

Benjamin Roth authored on21/02/2023 19:42:19
Showing1 changed files
... ...
@@ -1,13 +1,13 @@
1 1
 <?php
2 2
 
3 3
 // Add the colorbox style sheet
4
-$GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/js/lib/jBox/1.0.7/jBox.min.css|static';
5
-$GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/js/lib/jBox/1.0.7/plugins/jBox.Image.css|static';
6
-$GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/css/jBox.TooltipDurbacher.css|static';
4
+$GLOBALS['TL_CSS'][] = 'files/themes/aldegott_2022/assets/js/lib/jBox/1.2.3/jBox.min.css|static';
5
+$GLOBALS['TL_CSS'][] = 'files/themes/aldegott_2022/assets/js/lib/jBox/1.2.3/plugins/jBox.Image.css|static';
6
+$GLOBALS['TL_CSS'][] = 'files/themes/aldegott_2022/assets/css/jBox.TooltipDurbacher.css|static';
7 7
 
8 8
 ?>
9 9
 
10
-<script src="files/themes/vonrotenberg_2020/assets/js/lib/jBox/1.0.7/jBox.all.min.js"></script>
10
+<script src="files/themes/aldegott_2022/assets/js/lib/jBox/1.2.3/jBox.all.min.js"></script>
11 11
 <script>
12 12
   jQuery(function($) {
13 13
     $('a[data-jbox-iframe]').map(function() {
... ...
@@ -38,6 +38,26 @@ $GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/css/jBox.TooltipDu
38 38
       });
39 39
     });
40 40
 
41
+    $('a[data-jbox-basic-modal]').map(function() {
42
+      new jBox('Modal', {
43
+        attach: $(this),
44
+        preventDefault: true,
45
+        // content: $($(this).data('jbox-basic-modal')),
46
+        closeButton: 'box',
47
+        // width: 700,
48
+        // height: 650,
49
+        theme: 'iframe',
50
+        addClass: 'jBox-noPadding',
51
+        // addClass: 'jBox-noPadding'
52
+        onOpen: function () {
53
+          this.setContent($($(this.source[0]).data('jbox-basic-modal'))[0].innerHTML);
54
+        },
55
+        onCloseComplete: function() {
56
+          this.setContent('');
57
+        }
58
+      });
59
+    });
60
+
41 61
     $lbImages = $('[data-lightbox]').filter(function(index) {
42 62
       if (!$(this).parents().eq(3).hasClass('slick-cloned'))
43 63
       {
... ...
@@ -53,10 +73,20 @@ $GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/css/jBox.TooltipDu
53 73
     });
54 74
 
55 75
     new jBox('Tooltip', {
56
-      attach: '.tooltip',
57
-      theme: 'TooltipDurbacher',
58
-      pointer: 'right:60',
76
+      attach: '[data-tooltip-title]',
77
+      // pointer: 'right:60',
78
+      getContent: 'data-tooltip-title',
59 79
       maxWidth: 250,
80
+      /*position: {
81
+        x: 'right',
82
+        y: 'bottom'
83
+      },
84
+      offset: {
85
+        x: -5,
86
+        y: 5
87
+      },*/
88
+      // outside: 'x',
89
+      zIndex: 4000,
60 90
       adjustPosition: true,
61 91
       adjustTracker: true,
62 92
       closeOnClick: true
Browse code

Initial commit

Benjamin Roth authored on07/11/2022 09:19:06
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,66 @@
1
+<?php
2
+
3
+// Add the colorbox style sheet
4
+$GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/js/lib/jBox/1.0.7/jBox.min.css|static';
5
+$GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/js/lib/jBox/1.0.7/plugins/jBox.Image.css|static';
6
+$GLOBALS['TL_CSS'][] = 'files/themes/vonrotenberg_2020/assets/css/jBox.TooltipDurbacher.css|static';
7
+
8
+?>
9
+
10
+<script src="files/themes/vonrotenberg_2020/assets/js/lib/jBox/1.0.7/jBox.all.min.js"></script>
11
+<script>
12
+  jQuery(function($) {
13
+    $('a[data-jbox-iframe]').map(function() {
14
+      new jBox('Modal', {
15
+      	attach: $(this),
16
+      	preventDefault: true,
17
+        title: $(this).data('jbox-title') ? '<h3>' + $(this).data('jbox-title') + '</h3>' : ($(this).attr('title') ? '<h3>' + $(this).attr('title') + '</h3>' : ''),
18
+        content: '<iframe frameborder="0" class="jBox-iframe" src="' + $(this).attr('href') + '"></iframe>',
19
+        closeButton: 'title',
20
+        width: 700,
21
+        height: 650,
22
+        theme: 'iframe',
23
+        addClass: 'jBox-noPadding'
24
+      });
25
+    });
26
+
27
+    $('a[data-jbox-modal]').map(function() {
28
+      new jBox('Modal', {
29
+        attach: $(this),
30
+        preventDefault: true,
31
+        title: $(this).data('jbox-title') ? '<h3>' + $(this).data('jbox-title') + '</h3>' : ($(this).attr('title') ? '<h3>' + $(this).attr('title') + '</h3>' : ''),
32
+        content: $($(this).data('jbox-modal')),
33
+        closeButton: 'title',
34
+        width: 700,
35
+        height: 650,
36
+        theme: 'iframe',
37
+        // addClass: 'jBox-noPadding'
38
+      });
39
+    });
40
+
41
+    $lbImages = $('[data-lightbox]').filter(function(index) {
42
+      if (!$(this).parents().eq(3).hasClass('slick-cloned'))
43
+      {
44
+        return true;
45
+      }
46
+    });
47
+
48
+    new jBox('Image', {
49
+      // Put custom options here
50
+      gallery: 'data-lightbox',
51
+      attach: $lbImages,
52
+      imageCounter: true
53
+    });
54
+
55
+    new jBox('Tooltip', {
56
+      attach: '.tooltip',
57
+      theme: 'TooltipDurbacher',
58
+      pointer: 'right:60',
59
+      maxWidth: 250,
60
+      adjustPosition: true,
61
+      adjustTracker: true,
62
+      closeOnClick: true
63
+    });
64
+
65
+  });
66
+</script>