Browse Source

Combine tooltipster and tooltipster_settings so they can't load out of order

spaghetti 8 years ago
parent
commit
659f1f5d2a

+ 1
- 1
classes/view.class.php View File

@@ -30,7 +30,7 @@ class View {
30 30
       require(SERVER_ROOT.'/design/publicheader.php');
31 31
     } else {
32 32
       // HTTP/2 Server Push headers for cloudflare
33
-      $Scripts = array_merge(['jquery', 'global', 'ajax.class', 'jquery.autocomplete', 'autocomplete', 'tooltipster', 'tooltipster_settings'], explode(',', $JSIncludes));
33
+      $Scripts = array_merge(['jquery', 'global', 'ajax.class', 'jquery.autocomplete', 'autocomplete', 'tooltipster'], explode(',', $JSIncludes));
34 34
       $Styles = array_merge(['tooltipster'], explode(',', $CSSIncludes));
35 35
       foreach ($Scripts as $Script) {
36 36
         if (trim($Script) == '') { continue; }

+ 1
- 1
design/privateheader.php View File

@@ -95,7 +95,7 @@ foreach ($ExtraCSS as $CSS) {
95 95
 <?
96 96
 }
97 97
 
98
-$Scripts = array_merge(array('jquery', 'global', 'ajax.class', 'jquery.autocomplete', 'autocomplete', 'tooltipster', 'tooltipster_settings'), explode(',', $JSIncludes));
98
+$Scripts = array_merge(array('jquery', 'global', 'ajax.class', 'jquery.autocomplete', 'autocomplete', 'tooltipster'), explode(',', $JSIncludes));
99 99
 foreach ($Scripts as $Script) {
100 100
   if (trim($Script) == '') { continue; }
101 101
   $Async = (in_array($Script, ['jquery','global','ajax.class'])) ? '' : 'async';

+ 33
- 0
static/functions/tooltipster.js
File diff suppressed because it is too large
View File


+ 0
- 36
static/functions/tooltipster_settings.js View File

@@ -1,36 +0,0 @@
1
-var tooltip_delay = 500;
2
-$(function() {
3
-  if (!$.fn.tooltipster) {
4
-    $('.tooltip_interactive, .tooltip_image, .tooltip, .tooltip_left').each(function() {
5
-      if ($(this).data('title-plain')) {
6
-        $(this).attr('title', $(this).data('title-plain')).removeData('title-plain');
7
-      }
8
-    });
9
-    return;
10
-  }
11
-  $('.tooltip_interactive').tooltipster({
12
-    interactive: true,
13
-    interactiveTolerance: 500,
14
-    delay: tooltip_delay,
15
-    updateAnimation: false,
16
-    maxWidth: 400
17
-  });
18
-  $('.tooltip').tooltipster({
19
-    delay: tooltip_delay,
20
-    updateAnimation: false,
21
-    maxWidth: 400
22
-  });
23
-
24
-  $('.tooltip_left').tooltipster({
25
-    delay: tooltip_delay,
26
-    position: 'left',
27
-    updateAnimation: false,
28
-    maxWidth: 400
29
-  });
30
-
31
-  $('.tooltip_image').tooltipster({
32
-    delay: tooltip_delay,
33
-    updateAnimation: false,
34
-    fixedWidth: 252
35
-  });
36
-});

Loading…
Cancel
Save