Revision c0713b66
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
472 | 472 |
jquery.multiselect2side |
473 | 473 |
ui-lightness/jquery-ui |
474 | 474 |
jquery-ui.custom |
475 |
tooltipster themes/tooltipster-light |
|
475 | 476 |
); |
476 | 477 |
|
477 | 478 |
$layout->use_javascript("$_.js") for (qw( |
478 | 479 |
jquery jquery-ui jquery.cookie jquery.checkall jquery.download |
479 | 480 |
jquery/jquery.form jquery/fixes client_js |
481 |
jquery/jquery.tooltipster.min |
|
480 | 482 |
common part_selection switchmenuframe |
481 | 483 |
), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}"); |
482 | 484 |
|
css/themes/tooltipster-light.css | ||
---|---|---|
1 |
.tooltipster-light { |
|
2 |
border-radius: 5px; |
|
3 |
border: 1px solid #cccccc; |
|
4 |
background: #ededed; |
|
5 |
color: #666666; |
|
6 |
} |
|
7 |
.tooltipster-light .tooltipster-content { |
|
8 |
font-family: Arial, sans-serif; |
|
9 |
font-size: 14px; |
|
10 |
line-height: 16px; |
|
11 |
padding: 8px 10px; |
|
12 |
} |
css/themes/tooltipster-noir.css | ||
---|---|---|
1 |
.tooltipster-noir { |
|
2 |
border-radius: 0px; |
|
3 |
border: 3px solid #2c2c2c; |
|
4 |
background: #fff; |
|
5 |
color: #2c2c2c; |
|
6 |
} |
|
7 |
.tooltipster-noir .tooltipster-content { |
|
8 |
font-family: 'Georgia', serif; |
|
9 |
font-size: 14px; |
|
10 |
line-height: 16px; |
|
11 |
padding: 8px 10px; |
|
12 |
} |
css/themes/tooltipster-punk.css | ||
---|---|---|
1 |
.tooltipster-punk { |
|
2 |
border-radius: 5px; |
|
3 |
border-bottom: 3px solid #f71169; |
|
4 |
background: #2a2a2a; |
|
5 |
color: #fff; |
|
6 |
} |
|
7 |
.tooltipster-punk .tooltipster-content { |
|
8 |
font-family: 'Courier', monospace; |
|
9 |
font-size: 14px; |
|
10 |
line-height: 16px; |
|
11 |
padding: 8px 10px; |
|
12 |
} |
css/themes/tooltipster-shadow.css | ||
---|---|---|
1 |
.tooltipster-shadow { |
|
2 |
border-radius: 5px; |
|
3 |
background: #fff; |
|
4 |
box-shadow: 0px 0px 14px rgba(0,0,0,0.3); |
|
5 |
color: #2c2c2c; |
|
6 |
} |
|
7 |
.tooltipster-shadow .tooltipster-content { |
|
8 |
font-family: 'Arial', sans-serif; |
|
9 |
font-size: 14px; |
|
10 |
line-height: 16px; |
|
11 |
padding: 8px 10px; |
|
12 |
} |
css/tooltipster.css | ||
---|---|---|
1 |
/* This is the default Tooltipster theme (feel free to modify or duplicate and create multiple themes!): */ |
|
2 |
.tooltipster-default { |
|
3 |
border-radius: 5px; |
|
4 |
border: 2px solid #000; |
|
5 |
background: #4c4c4c; |
|
6 |
color: #fff; |
|
7 |
} |
|
8 |
|
|
9 |
/* Use this next selector to style things like font-size and line-height: */ |
|
10 |
.tooltipster-default .tooltipster-content { |
|
11 |
font-family: Arial, sans-serif; |
|
12 |
font-size: 14px; |
|
13 |
line-height: 16px; |
|
14 |
padding: 8px 10px; |
|
15 |
overflow: hidden; |
|
16 |
} |
|
17 |
|
|
18 |
/* This next selector defines the color of the border on the outside of the arrow. This will automatically match the color and size of the border set on the main tooltip styles. Set display: none; if you would like a border around the tooltip but no border around the arrow */ |
|
19 |
.tooltipster-default .tooltipster-arrow .tooltipster-arrow-border { |
|
20 |
/* border-color: ... !important; */ |
|
21 |
} |
|
22 |
|
|
23 |
|
|
24 |
/* If you're using the icon option, use this next selector to style them */ |
|
25 |
.tooltipster-icon { |
|
26 |
cursor: help; |
|
27 |
margin-left: 4px; |
|
28 |
} |
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
/* This is the base styling required to make all Tooltipsters work */ |
|
38 |
.tooltipster-base { |
|
39 |
padding: 0; |
|
40 |
font-size: 0; |
|
41 |
line-height: 0; |
|
42 |
position: absolute; |
|
43 |
left: 0; |
|
44 |
top: 0; |
|
45 |
z-index: 9999999; |
|
46 |
pointer-events: none; |
|
47 |
width: auto; |
|
48 |
overflow: visible; |
|
49 |
} |
|
50 |
.tooltipster-base .tooltipster-content { |
|
51 |
overflow: hidden; |
|
52 |
} |
|
53 |
|
|
54 |
|
|
55 |
/* These next classes handle the styles for the little arrow attached to the tooltip. By default, the arrow will inherit the same colors and border as what is set on the main tooltip itself. */ |
|
56 |
.tooltipster-arrow { |
|
57 |
display: block; |
|
58 |
text-align: center; |
|
59 |
width: 100%; |
|
60 |
height: 100%; |
|
61 |
position: absolute; |
|
62 |
top: 0; |
|
63 |
left: 0; |
|
64 |
z-index: -1; |
|
65 |
} |
|
66 |
.tooltipster-arrow span, .tooltipster-arrow-border { |
|
67 |
display: block; |
|
68 |
width: 0; |
|
69 |
height: 0; |
|
70 |
position: absolute; |
|
71 |
} |
|
72 |
.tooltipster-arrow-top span, .tooltipster-arrow-top-right span, .tooltipster-arrow-top-left span { |
|
73 |
border-left: 8px solid transparent !important; |
|
74 |
border-right: 8px solid transparent !important; |
|
75 |
border-top: 8px solid; |
|
76 |
bottom: -7px; |
|
77 |
} |
|
78 |
.tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-top-left .tooltipster-arrow-border { |
|
79 |
border-left: 9px solid transparent !important; |
|
80 |
border-right: 9px solid transparent !important; |
|
81 |
border-top: 9px solid; |
|
82 |
bottom: -7px; |
|
83 |
} |
|
84 |
|
|
85 |
.tooltipster-arrow-bottom span, .tooltipster-arrow-bottom-right span, .tooltipster-arrow-bottom-left span { |
|
86 |
border-left: 8px solid transparent !important; |
|
87 |
border-right: 8px solid transparent !important; |
|
88 |
border-bottom: 8px solid; |
|
89 |
top: -7px; |
|
90 |
} |
|
91 |
.tooltipster-arrow-bottom .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border { |
|
92 |
border-left: 9px solid transparent !important; |
|
93 |
border-right: 9px solid transparent !important; |
|
94 |
border-bottom: 9px solid; |
|
95 |
top: -7px; |
|
96 |
} |
|
97 |
.tooltipster-arrow-top span, .tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-bottom span, .tooltipster-arrow-bottom .tooltipster-arrow-border { |
|
98 |
left: 0; |
|
99 |
right: 0; |
|
100 |
margin: 0 auto; |
|
101 |
} |
|
102 |
.tooltipster-arrow-top-left span, .tooltipster-arrow-bottom-left span { |
|
103 |
left: 6px; |
|
104 |
} |
|
105 |
.tooltipster-arrow-top-left .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border { |
|
106 |
left: 5px; |
|
107 |
} |
|
108 |
.tooltipster-arrow-top-right span, .tooltipster-arrow-bottom-right span { |
|
109 |
right: 6px; |
|
110 |
} |
|
111 |
.tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border { |
|
112 |
right: 5px; |
|
113 |
} |
|
114 |
.tooltipster-arrow-left span, .tooltipster-arrow-left .tooltipster-arrow-border { |
|
115 |
border-top: 8px solid transparent !important; |
|
116 |
border-bottom: 8px solid transparent !important; |
|
117 |
border-left: 8px solid; |
|
118 |
top: 50%; |
|
119 |
margin-top: -7px; |
|
120 |
right: -7px; |
|
121 |
} |
|
122 |
.tooltipster-arrow-left .tooltipster-arrow-border { |
|
123 |
border-top: 9px solid transparent !important; |
|
124 |
border-bottom: 9px solid transparent !important; |
|
125 |
border-left: 9px solid; |
|
126 |
margin-top: -8px; |
|
127 |
} |
|
128 |
.tooltipster-arrow-right span, .tooltipster-arrow-right .tooltipster-arrow-border { |
|
129 |
border-top: 8px solid transparent !important; |
|
130 |
border-bottom: 8px solid transparent !important; |
|
131 |
border-right: 8px solid; |
|
132 |
top: 50%; |
|
133 |
margin-top: -7px; |
|
134 |
left: -7px; |
|
135 |
} |
|
136 |
.tooltipster-arrow-right .tooltipster-arrow-border { |
|
137 |
border-top: 9px solid transparent !important; |
|
138 |
border-bottom: 9px solid transparent !important; |
|
139 |
border-right: 9px solid; |
|
140 |
margin-top: -8px; |
|
141 |
} |
|
142 |
|
|
143 |
|
|
144 |
/* Some CSS magic for the awesome animations - feel free to make your own custom animations and reference it in your Tooltipster settings! */ |
|
145 |
|
|
146 |
.tooltipster-fade { |
|
147 |
opacity: 0; |
|
148 |
-webkit-transition-property: opacity; |
|
149 |
-moz-transition-property: opacity; |
|
150 |
-o-transition-property: opacity; |
|
151 |
-ms-transition-property: opacity; |
|
152 |
transition-property: opacity; |
|
153 |
} |
|
154 |
.tooltipster-fade-show { |
|
155 |
opacity: 1; |
|
156 |
} |
|
157 |
|
|
158 |
.tooltipster-grow { |
|
159 |
-webkit-transform: scale(0,0); |
|
160 |
-moz-transform: scale(0,0); |
|
161 |
-o-transform: scale(0,0); |
|
162 |
-ms-transform: scale(0,0); |
|
163 |
transform: scale(0,0); |
|
164 |
-webkit-transition-property: -webkit-transform; |
|
165 |
-moz-transition-property: -moz-transform; |
|
166 |
-o-transition-property: -o-transform; |
|
167 |
-ms-transition-property: -ms-transform; |
|
168 |
transition-property: transform; |
|
169 |
-webkit-backface-visibility: hidden; |
|
170 |
} |
|
171 |
.tooltipster-grow-show { |
|
172 |
-webkit-transform: scale(1,1); |
|
173 |
-moz-transform: scale(1,1); |
|
174 |
-o-transform: scale(1,1); |
|
175 |
-ms-transform: scale(1,1); |
|
176 |
transform: scale(1,1); |
|
177 |
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); |
|
178 |
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
179 |
-moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
180 |
-ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
181 |
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
182 |
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
183 |
} |
|
184 |
|
|
185 |
.tooltipster-swing { |
|
186 |
opacity: 0; |
|
187 |
-webkit-transform: rotateZ(4deg); |
|
188 |
-moz-transform: rotateZ(4deg); |
|
189 |
-o-transform: rotateZ(4deg); |
|
190 |
-ms-transform: rotateZ(4deg); |
|
191 |
transform: rotateZ(4deg); |
|
192 |
-webkit-transition-property: -webkit-transform, opacity; |
|
193 |
-moz-transition-property: -moz-transform; |
|
194 |
-o-transition-property: -o-transform; |
|
195 |
-ms-transition-property: -ms-transform; |
|
196 |
transition-property: transform; |
|
197 |
} |
|
198 |
.tooltipster-swing-show { |
|
199 |
opacity: 1; |
|
200 |
-webkit-transform: rotateZ(0deg); |
|
201 |
-moz-transform: rotateZ(0deg); |
|
202 |
-o-transform: rotateZ(0deg); |
|
203 |
-ms-transform: rotateZ(0deg); |
|
204 |
transform: rotateZ(0deg); |
|
205 |
-webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 1); |
|
206 |
-webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4); |
|
207 |
-moz-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4); |
|
208 |
-ms-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4); |
|
209 |
-o-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4); |
|
210 |
transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4); |
|
211 |
} |
|
212 |
|
|
213 |
.tooltipster-fall { |
|
214 |
top: 0; |
|
215 |
-webkit-transition-property: top; |
|
216 |
-moz-transition-property: top; |
|
217 |
-o-transition-property: top; |
|
218 |
-ms-transition-property: top; |
|
219 |
transition-property: top; |
|
220 |
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); |
|
221 |
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
222 |
-moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
223 |
-ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
224 |
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
225 |
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
226 |
} |
|
227 |
.tooltipster-fall-show { |
|
228 |
} |
|
229 |
.tooltipster-fall.tooltipster-dying { |
|
230 |
-webkit-transition-property: all; |
|
231 |
-moz-transition-property: all; |
|
232 |
-o-transition-property: all; |
|
233 |
-ms-transition-property: all; |
|
234 |
transition-property: all; |
|
235 |
top: 0px !important; |
|
236 |
opacity: 0; |
|
237 |
} |
|
238 |
|
|
239 |
.tooltipster-slide { |
|
240 |
left: -40px; |
|
241 |
-webkit-transition-property: left; |
|
242 |
-moz-transition-property: left; |
|
243 |
-o-transition-property: left; |
|
244 |
-ms-transition-property: left; |
|
245 |
transition-property: left; |
|
246 |
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); |
|
247 |
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
248 |
-moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
249 |
-ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
250 |
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
251 |
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15); |
|
252 |
} |
|
253 |
.tooltipster-slide.tooltipster-slide-show { |
|
254 |
} |
|
255 |
.tooltipster-slide.tooltipster-dying { |
|
256 |
-webkit-transition-property: all; |
|
257 |
-moz-transition-property: all; |
|
258 |
-o-transition-property: all; |
|
259 |
-ms-transition-property: all; |
|
260 |
transition-property: all; |
|
261 |
left: 0px !important; |
|
262 |
opacity: 0; |
|
263 |
} |
|
264 |
|
|
265 |
|
|
266 |
/* CSS transition for when contenting is changing in a tooltip that is still open. The only properties that will NOT transition are: width, height, top, and left */ |
|
267 |
.tooltipster-content-changing { |
|
268 |
opacity: 0.5; |
|
269 |
-webkit-transform: scale(1.1, 1.1); |
|
270 |
-moz-transform: scale(1.1, 1.1); |
|
271 |
-o-transform: scale(1.1, 1.1); |
|
272 |
-ms-transform: scale(1.1, 1.1); |
|
273 |
transform: scale(1.1, 1.1); |
|
274 |
} |
js/jquery/jquery.tooltipster.min.js | ||
---|---|---|
1 |
/* Tooltipster v3.3.0 */;(function(e,t,n){function s(t,n){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=e(t);this.$elProxy;this.elProxyPosition;this.enabled=true;this.options=e.extend({},i,n);this.mouseIsOverProxy=false;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function o(t,n){var r=true;e.each(t,function(e,i){if(typeof n[e]==="undefined"||t[e]!==n[e]){r=false;return false}});return r}function f(){return!a&&u}function l(){var e=n.body||n.documentElement,t=e.style,r="transition";if(typeof t[r]=="string"){return true}v=["Moz","Webkit","Khtml","O","ms"],r=r.charAt(0).toUpperCase()+r.substr(1);for(var i=0;i<v.length;i++){if(typeof t[v[i]+r]=="string"){return true}}return false}var r="tooltipster",i={animation:"fade",arrow:true,arrowColor:"",autoClose:true,content:null,contentAsHTML:false,contentCloning:true,debug:true,delay:200,minWidth:0,maxWidth:null,functionInit:function(e,t){},functionBefore:function(e,t){t()},functionReady:function(e,t){},functionAfter:function(e){},hideOnClick:false,icon:"(?)",iconCloning:true,iconDesktop:false,iconTouch:false,iconTheme:"tooltipster-icon",interactive:false,interactiveTolerance:350,multiple:false,offsetX:0,offsetY:0,onlyOne:false,position:"top",positionTracker:false,positionTrackerCallback:function(e){if(this.option("trigger")=="hover"&&this.option("autoClose")){this.hide()}},restoration:"current",speed:350,timer:0,theme:"tooltipster-default",touchDevices:true,trigger:"hover",updateAnimation:true};s.prototype={_init:function(){var t=this;if(n.querySelector){var r=null;if(t.$el.data("tooltipster-initialTitle")===undefined){r=t.$el.attr("title");if(r===undefined)r=null;t.$el.data("tooltipster-initialTitle",r)}if(t.options.content!==null){t._content_set(t.options.content)}else{t._content_set(r)}var i=t.options.functionInit.call(t.$el,t.$el,t.Content);if(typeof i!=="undefined")t._content_set(i);t.$el.removeAttr("title").addClass("tooltipstered");if(!u&&t.options.iconDesktop||u&&t.options.iconTouch){if(typeof t.options.icon==="string"){t.$elProxy=e('<span class="'+t.options.iconTheme+'"></span>');t.$elProxy.text(t.options.icon)}else{if(t.options.iconCloning)t.$elProxy=t.options.icon.clone(true);else t.$elProxy=t.options.icon}t.$elProxy.insertAfter(t.$el)}else{t.$elProxy=t.$el}if(t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=true;t._show()}}).on("mouseleave."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=false}});if(u&&t.options.touchDevices){t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}}else if(t.options.trigger=="click"){t.$elProxy.on("click."+t.namespace,function(){if(!f()||t.options.touchDevices){t._show()}})}}},_show:function(){var e=this;if(e.Status!="shown"&&e.Status!="appearing"){if(e.options.delay){e.timerShow=setTimeout(function(){if(e.options.trigger=="click"||e.options.trigger=="hover"&&e.mouseIsOverProxy){e._showNow()}},e.options.delay)}else e._showNow()}},_showNow:function(n){var r=this;r.options.functionBefore.call(r.$el,r.$el,function(){if(r.enabled&&r.Content!==null){if(n)r.callbacks.show.push(n);r.callbacks.hide=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;if(r.options.onlyOne){e(".tooltipstered").not(r.$el).each(function(t,n){var r=e(n),i=r.data("tooltipster-ns");e.each(i,function(e,t){var n=r.data(t),i=n.status(),s=n.option("autoClose");if(i!=="hidden"&&i!=="disappearing"&&s){n.hide()}})})}var i=function(){r.Status="shown";e.each(r.callbacks.show,function(e,t){t.call(r.$el)});r.callbacks.show=[]};if(r.Status!=="hidden"){var s=0;if(r.Status==="disappearing"){r.Status="appearing";if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+r.options.animation+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.stop().fadeIn(i)}}else if(r.Status==="shown"){i()}}else{r.Status="appearing";var s=r.options.speed;r.bodyOverflowX=e("body").css("overflow-x");e("body").css("overflow-x","hidden");var o="tooltipster-"+r.options.animation,a="-webkit-transition-duration: "+r.options.speed+"ms; -webkit-animation-duration: "+r.options.speed+"ms; -moz-transition-duration: "+r.options.speed+"ms; -moz-animation-duration: "+r.options.speed+"ms; -o-transition-duration: "+r.options.speed+"ms; -o-animation-duration: "+r.options.speed+"ms; -ms-transition-duration: "+r.options.speed+"ms; -ms-animation-duration: "+r.options.speed+"ms; transition-duration: "+r.options.speed+"ms; animation-duration: "+r.options.speed+"ms;",f=r.options.minWidth?"min-width:"+Math.round(r.options.minWidth)+"px;":"",c=r.options.maxWidth?"max-width:"+Math.round(r.options.maxWidth)+"px;":"",h=r.options.interactive?"pointer-events: auto;":"";r.$tooltip=e('<div class="tooltipster-base '+r.options.theme+'" style="'+f+" "+c+" "+h+" "+a+'"><div class="tooltipster-content"></div></div>');if(l())r.$tooltip.addClass(o);r._content_insert();r.$tooltip.appendTo("body");r.reposition();r.options.functionReady.call(r.$el,r.$el,r.$tooltip);if(l()){r.$tooltip.addClass(o+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.css("display","none").fadeIn(r.options.speed,i)}r._interval_set();e(t).on("scroll."+r.namespace+" resize."+r.namespace,function(){r.reposition()});if(r.options.autoClose){e("body").off("."+r.namespace);if(r.options.trigger=="hover"){if(u){setTimeout(function(){e("body").on("touchstart."+r.namespace,function(){r.hide()})},0)}if(r.options.interactive){if(u){r.$tooltip.on("touchstart."+r.namespace,function(e){e.stopPropagation()})}var p=null;r.$elProxy.add(r.$tooltip).on("mouseleave."+r.namespace+"-autoClose",function(){clearTimeout(p);p=setTimeout(function(){r.hide()},r.options.interactiveTolerance)}).on("mouseenter."+r.namespace+"-autoClose",function(){clearTimeout(p)})}else{r.$elProxy.on("mouseleave."+r.namespace+"-autoClose",function(){r.hide()})}if(r.options.hideOnClick){r.$elProxy.on("click."+r.namespace+"-autoClose",function(){r.hide()})}}else if(r.options.trigger=="click"){setTimeout(function(){e("body").on("click."+r.namespace+" touchstart."+r.namespace,function(){r.hide()})},0);if(r.options.interactive){r.$tooltip.on("click."+r.namespace+" touchstart."+r.namespace,function(e){e.stopPropagation()})}}}}if(r.options.timer>0){r.timerHide=setTimeout(function(){r.timerHide=null;r.hide()},r.options.timer+s)}}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(e("body").find(t.$el).length===0||e("body").find(t.$elProxy).length===0||t.Status=="hidden"||e("body").find(t.$tooltip).length===0){if(t.Status=="shown"||t.Status=="appearing")t.hide();t._interval_cancel()}else{if(t.options.positionTracker){var n=t._repositionInfo(t.$elProxy),r=false;if(o(n.dimension,t.elProxyPosition.dimension)){if(t.$elProxy.css("position")==="fixed"){if(o(n.position,t.elProxyPosition.position))r=true}else{if(o(n.offset,t.elProxyPosition.offset))r=true}}if(!r){t.reposition();t.options.positionTrackerCallback.call(t,t.$el)}}}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(e){if(typeof e==="object"&&e!==null&&this.options.contentCloning){e=e.clone(true)}this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");if(typeof e.Content==="string"&&!e.options.contentAsHTML){t.text(e.Content)}else{t.empty().append(e.Content)}},_update:function(e){var t=this;t._content_set(e);if(t.Content!==null){if(t.Status!=="hidden"){t._content_insert();t.reposition();if(t.options.updateAnimation){if(l()){t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!="hidden"){t.$tooltip.removeClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!=="hidden"){t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})}},t.options.speed)}},t.options.speed)}else{t.$tooltip.fadeTo(t.options.speed,.5,function(){if(t.Status!="hidden"){t.$tooltip.fadeTo(t.options.speed,1)}})}}}}else{t.hide()}},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(false),width:e.outerWidth(false)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(n){var r=this;if(n)r.callbacks.hide.push(n);r.callbacks.show=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;var i=function(){e.each(r.callbacks.hide,function(e,t){t.call(r.$el)});r.callbacks.hide=[]};if(r.Status=="shown"||r.Status=="appearing"){r.Status="disappearing";var s=function(){r.Status="hidden";if(typeof r.Content=="object"&&r.Content!==null){r.Content.detach()}r.$tooltip.remove();r.$tooltip=null;e(t).off("."+r.namespace);e("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);e("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);i()};if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(s)}else{r.$tooltip.stop().fadeOut(r.options.speed,s)}}else if(r.Status=="hidden"){i()}return r},show:function(e){this._showNow(e);return this},update:function(e){return this.content(e)},content:function(e){if(typeof e==="undefined"){return this.Content}else{this._update(e);return this}},reposition:function(){var n=this;if(e("body").find(n.$tooltip).length!==0){n.$tooltip.css("width","");n.elProxyPosition=n._repositionInfo(n.$elProxy);var r=null,i=e(t).width(),s=n.elProxyPosition,o=n.$tooltip.outerWidth(false),u=n.$tooltip.innerWidth()+1,a=n.$tooltip.outerHeight(false);if(n.$elProxy.is("area")){var f=n.$elProxy.attr("shape"),l=n.$elProxy.parent().attr("name"),c=e('img[usemap="#'+l+'"]'),h=c.offset().left,p=c.offset().top,d=n.$elProxy.attr("coords")!==undefined?n.$elProxy.attr("coords").split(","):undefined;if(f=="circle"){var v=parseInt(d[0]),m=parseInt(d[1]),g=parseInt(d[2]);s.dimension.height=g*2;s.dimension.width=g*2;s.offset.top=p+m-g;s.offset.left=h+v-g}else if(f=="rect"){var v=parseInt(d[0]),m=parseInt(d[1]),y=parseInt(d[2]),b=parseInt(d[3]);s.dimension.height=b-m;s.dimension.width=y-v;s.offset.top=p+m;s.offset.left=h+v}else if(f=="poly"){var w=[],E=[],S=0,x=0,T=0,N=0,C="even";for(var k=0;k<d.length;k++){var L=parseInt(d[k]);if(C=="even"){if(L>T){T=L;if(k===0){S=T}}if(L<S){S=L}C="odd"}else{if(L>N){N=L;if(k==1){x=N}}if(L<x){x=L}C="even"}}s.dimension.height=N-x;s.dimension.width=T-S;s.offset.top=p+x;s.offset.left=h+S}else{s.dimension.height=c.outerHeight(false);s.dimension.width=c.outerWidth(false);s.offset.top=p;s.offset.left=h}}var A=0,O=0,M=0,_=parseInt(n.options.offsetY),D=parseInt(n.options.offsetX),P=n.options.position;function H(){var n=e(t).scrollLeft();if(A-n<0){r=A-n;A=n}if(A+o-n>i){r=A-(i+n-o);A=i+n-o}}function B(n,r){if(s.offset.top-e(t).scrollTop()-a-_-12<0&&r.indexOf("top")>-1){P=n}if(s.offset.top+s.dimension.height+a+12+_>e(t).scrollTop()+e(t).height()&&r.indexOf("bottom")>-1){P=n;M=s.offset.top-a-_-12}}if(P=="top"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left+D-j/2;M=s.offset.top-a-_-12;H();B("bottom","top")}if(P=="top-left"){A=s.offset.left+D;M=s.offset.top-a-_-12;H();B("bottom-left","top-left")}if(P=="top-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top-a-_-12;H();B("bottom-right","top-right")}if(P=="bottom"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left-j/2+D;M=s.offset.top+s.dimension.height+_+12;H();B("top","bottom")}if(P=="bottom-left"){A=s.offset.left+D;M=s.offset.top+s.dimension.height+_+12;H();B("top-left","bottom-left")}if(P=="bottom-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top+s.dimension.height+_+12;H();B("top-right","bottom-right")}if(P=="left"){A=s.offset.left-D-o-12;O=s.offset.left+D+s.dimension.width+12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A<0&&O+o>i){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=o+A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);A=s.offset.left-D-q-12-I;F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A<0){A=s.offset.left+D+s.dimension.width+12;r="left"}}if(P=="right"){A=s.offset.left+D+s.dimension.width+12;O=s.offset.left-D-o-12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A+o>i&&O<0){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=i-A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A+o>i){A=s.offset.left-D-o-12;r="right"}}if(n.options.arrow){var R="tooltipster-arrow-"+P;if(n.options.arrowColor.length<1){var U=n.$tooltip.css("background-color")}else{var U=n.options.arrowColor}if(!r){r=""}else if(r=="left"){R="tooltipster-arrow-right";r=""}else if(r=="right"){R="tooltipster-arrow-left";r=""}else{r="left:"+Math.round(r)+"px;"}if(P=="top"||P=="top-left"||P=="top-right"){var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}else if(P=="bottom"||P=="bottom-left"||P=="bottom-right"){var z=parseFloat(n.$tooltip.css("border-top-width")),W=n.$tooltip.css("border-top-color")}else if(P=="left"){var z=parseFloat(n.$tooltip.css("border-right-width")),W=n.$tooltip.css("border-right-color")}else if(P=="right"){var z=parseFloat(n.$tooltip.css("border-left-width")),W=n.$tooltip.css("border-left-color")}else{var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}if(z>1){z++}var X="";if(z!==0){var V="",J="border-color: "+W+";";if(R.indexOf("bottom")!==-1){V="margin-top: -"+Math.round(z)+"px;"}else if(R.indexOf("top")!==-1){V="margin-bottom: -"+Math.round(z)+"px;"}else if(R.indexOf("left")!==-1){V="margin-right: -"+Math.round(z)+"px;"}else if(R.indexOf("right")!==-1){V="margin-left: -"+Math.round(z)+"px;"}X='<span class="tooltipster-arrow-border" style="'+V+" "+J+';"></span>'}n.$tooltip.find(".tooltipster-arrow").remove();var K='<div class="'+R+' tooltipster-arrow" style="'+r+'">'+X+'<span style="border-color:'+U+';"></span></div>';n.$tooltip.append(K)}n.$tooltip.css({top:Math.round(M)+"px",left:Math.round(A)+"px"})}return n},enable:function(){this.enabled=true;return this},disable:function(){this.hide();this.enabled=false;return this},destroy:function(){var t=this;t.hide();if(t.$el[0]!==t.$elProxy[0]){t.$elProxy.remove()}t.$el.removeData(t.namespace).off("."+t.namespace);var n=t.$el.data("tooltipster-ns");if(n.length===1){var r=null;if(t.options.restoration==="previous"){r=t.$el.data("tooltipster-initialTitle")}else if(t.options.restoration==="current"){r=typeof t.Content==="string"?t.Content:e("<div></div>").append(t.Content).html()}if(r){t.$el.attr("title",r)}t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else{n=e.grep(n,function(e,n){return e!==t.namespace});t.$el.data("tooltipster-ns",n)}return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(e,t){if(typeof t=="undefined")return this.options[e];else{this.options[e]=t;return this}},status:function(){return this.Status}};e.fn[r]=function(){var t=arguments;if(this.length===0){if(typeof t[0]==="string"){var n=true;switch(t[0]){case"setDefaults":e.extend(i,t[1]);break;default:n=false;break}if(n)return true;else return this}else{return this}}else{if(typeof t[0]==="string"){var r="#*$~&";this.each(function(){var n=e(this).data("tooltipster-ns"),i=n?e(this).data(n[0]):null;if(i){if(typeof i[t[0]]==="function"){var s=i[t[0]](t[1],t[2])}else{throw new Error('Unknown method .tooltipster("'+t[0]+'")')}if(s!==i){r=s;return false}}else{throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element')}});return r!=="#*$~&"?r:this}else{var o=[],u=t[0]&&typeof t[0].multiple!=="undefined",a=u&&t[0].multiple||!u&&i.multiple,f=t[0]&&typeof t[0].debug!=="undefined",l=f&&t[0].debug||!f&&i.debug;this.each(function(){var n=false,r=e(this).data("tooltipster-ns"),i=null;if(!r){n=true}else if(a){n=true}else if(l){console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.')}if(n){i=new s(this,t[0]);if(!r)r=[];r.push(i.namespace);e(this).data("tooltipster-ns",r);e(this).data(i.namespace,i)}o.push(i)});if(a)return o;else return this}}};var u=!!("ontouchstart"in t);var a=false;e("body").one("mousemove",function(){a=true})})(jQuery,window,document); |
js/kivi.js | ||
---|---|---|
255 | 255 |
$(elt).tooltip(); |
256 | 256 |
}); |
257 | 257 |
|
258 |
ns.run_once_for('.tooltipster', 'tooltipster', function(elt) { |
|
259 |
$(elt).tooltipster({ |
|
260 |
contentAsHTML: false, |
|
261 |
theme: 'tooltipster-light' |
|
262 |
}) |
|
263 |
}); |
|
264 |
|
|
265 |
ns.run_once_for('.tooltipster-html', 'tooltipster-html', function(elt) { |
|
266 |
$(elt).tooltipster({ |
|
267 |
contentAsHTML: true, |
|
268 |
theme: 'tooltipster-light' |
|
269 |
}) |
|
270 |
}); |
|
271 |
|
|
258 | 272 |
ns.run_once_for('.tabwidget', 'tabwidget', kivi.init_tabwidget); |
259 | 273 |
ns.run_once_for('.texteditor', 'texteditor', kivi.init_text_editor); |
260 | 274 |
}; |
js/wz_tooltip.js | ||
---|---|---|
1 |
/* This notice must be untouched at all times. |
|
2 |
Copyright (c) 2002-2008 Walter Zorn. All rights reserved. |
|
3 |
|
|
4 |
wz_tooltip.js v. 5.31 |
|
5 |
|
|
6 |
The latest version is available at |
|
7 |
http://www.walterzorn.com |
|
8 |
or http://www.devira.com |
|
9 |
or http://www.walterzorn.de |
|
10 |
|
|
11 |
Created 1.12.2002 by Walter Zorn (Web: http://www.walterzorn.com ) |
|
12 |
Last modified: 7.11.2008 |
|
13 |
|
|
14 |
Easy-to-use cross-browser tooltips. |
|
15 |
Just include the script at the beginning of the <body> section, and invoke |
|
16 |
Tip('Tooltip text') to show and UnTip() to hide the tooltip, from the desired |
|
17 |
HTML eventhandlers. Example: |
|
18 |
<a onmouseover="Tip('Some text')" onmouseout="UnTip()" href="index.htm">My home page</a> |
|
19 |
No container DIV required. |
|
20 |
By default, width and height of tooltips are automatically adapted to content. |
|
21 |
Is even capable of dynamically converting arbitrary HTML elements to tooltips |
|
22 |
by calling TagToTip('ID_of_HTML_element_to_be_converted') instead of Tip(), |
|
23 |
which means you can put important, search-engine-relevant stuff into tooltips. |
|
24 |
Appearance & behaviour of tooltips can be individually configured |
|
25 |
via commands passed to Tip() or TagToTip(). |
|
26 |
|
|
27 |
Tab Width: 4 |
|
28 |
LICENSE: LGPL |
|
29 |
|
|
30 |
This library is free software; you can redistribute it and/or |
|
31 |
modify it under the terms of the GNU Lesser General Public |
|
32 |
License (LGPL) as published by the Free Software Foundation; either |
|
33 |
version 2.1 of the License, or (at your option) any later version. |
|
34 |
|
|
35 |
This library is distributed in the hope that it will be useful, |
|
36 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
37 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
38 |
|
|
39 |
For more details on the GNU Lesser General Public License, |
|
40 |
see http://www.gnu.org/copyleft/lesser.html |
|
41 |
*/ |
|
42 |
|
|
43 |
var config = new Object(); |
|
44 |
|
|
45 |
|
|
46 |
//=================== GLOBAL TOOLTIP CONFIGURATION =========================// |
|
47 |
var tt_Debug = true // false or true - recommended: false once you release your page to the public |
|
48 |
var tt_Enabled = true // Allows to (temporarily) suppress tooltips, e.g. by providing the user with a button that sets this global variable to false |
|
49 |
var TagsToTip = true // false or true - if true, HTML elements to be converted to tooltips via TagToTip() are automatically hidden; |
|
50 |
// if false, you should hide those HTML elements yourself |
|
51 |
|
|
52 |
// For each of the following config variables there exists a command, which is |
|
53 |
// just the variablename in uppercase, to be passed to Tip() or TagToTip() to |
|
54 |
// configure tooltips individually. Individual commands override global |
|
55 |
// configuration. Order of commands is arbitrary. |
|
56 |
// Example: onmouseover="Tip('Tooltip text', LEFT, true, BGCOLOR, '#FF9900', FADEIN, 400)" |
|
57 |
|
|
58 |
config. Above = false // false or true - tooltip above mousepointer |
|
59 |
config. BgColor = '#E2E7FF' // Background colour (HTML colour value, in quotes) |
|
60 |
config. BgImg = '' // Path to background image, none if empty string '' |
|
61 |
config. BorderColor = '#003099' |
|
62 |
config. BorderStyle = 'solid' // Any permitted CSS value, but I recommend 'solid', 'dotted' or 'dashed' |
|
63 |
config. BorderWidth = 1 |
|
64 |
config. CenterMouse = false // false or true - center the tip horizontally below (or above) the mousepointer |
|
65 |
config. ClickClose = false // false or true - close tooltip if the user clicks somewhere |
|
66 |
config. ClickSticky = false // false or true - make tooltip sticky if user left-clicks on the hovered element while the tooltip is active |
|
67 |
config. CloseBtn = false // false or true - closebutton in titlebar |
|
68 |
config. CloseBtnColors = ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF'] // [Background, text, hovered background, hovered text] - use empty strings '' to inherit title colours |
|
69 |
config. CloseBtnText = ' X ' // Close button text (may also be an image tag) |
|
70 |
config. CopyContent = true // When converting a HTML element to a tooltip, copy only the element's content, rather than converting the element by its own |
|
71 |
config. Delay = 400 // Time span in ms until tooltip shows up |
|
72 |
config. Duration = 0 // Time span in ms after which the tooltip disappears; 0 for infinite duration, < 0 for delay in ms _after_ the onmouseout until the tooltip disappears |
|
73 |
config. Exclusive = false // false or true - no other tooltip can appear until the current one has actively been closed |
|
74 |
config. FadeIn = 100 // Fade-in duration in ms, e.g. 400; 0 for no animation |
|
75 |
config. FadeOut = 100 |
|
76 |
config. FadeInterval = 30 // Duration of each fade step in ms (recommended: 30) - shorter is smoother but causes more CPU-load |
|
77 |
config. Fix = null // Fixated position, two modes. Mode 1: x- an y-coordinates in brackets, e.g. [210, 480]. Mode 2: Show tooltip at a position related to an HTML element: [ID of HTML element, x-offset, y-offset from HTML element], e.g. ['SomeID', 10, 30]. Value null (default) for no fixated positioning. |
|
78 |
config. FollowMouse = true // false or true - tooltip follows the mouse |
|
79 |
config. FontColor = '#000044' |
|
80 |
config. FontFace = 'Verdana,Geneva,sans-serif' |
|
81 |
config. FontSize = '8pt' // E.g. '9pt' or '12px' - unit is mandatory |
|
82 |
config. FontWeight = 'normal' // 'normal' or 'bold'; |
|
83 |
config. Height = 0 // Tooltip height; 0 for automatic adaption to tooltip content, < 0 (e.g. -100) for a maximum for automatic adaption |
|
84 |
config. JumpHorz = false // false or true - jump horizontally to other side of mouse if tooltip would extend past clientarea boundary |
|
85 |
config. JumpVert = true // false or true - jump vertically " |
|
86 |
config. Left = false // false or true - tooltip on the left of the mouse |
|
87 |
config. OffsetX = 14 // Horizontal offset of left-top corner from mousepointer |
|
88 |
config. OffsetY = 8 // Vertical offset |
|
89 |
config. Opacity = 100 // Integer between 0 and 100 - opacity of tooltip in percent |
|
90 |
config. Padding = 3 // Spacing between border and content |
|
91 |
config. Shadow = false // false or true |
|
92 |
config. ShadowColor = '#C0C0C0' |
|
93 |
config. ShadowWidth = 5 |
|
94 |
config. Sticky = false // false or true - fixate tip, ie. don't follow the mouse and don't hide on mouseout |
|
95 |
config. TextAlign = 'left' // 'left', 'right' or 'justify' |
|
96 |
config. Title = '' // Default title text applied to all tips (no default title: empty string '') |
|
97 |
config. TitleAlign = 'left' // 'left' or 'right' - text alignment inside the title bar |
|
98 |
config. TitleBgColor = '' // If empty string '', BorderColor will be used |
|
99 |
config. TitleFontColor = '#FFFFFF' // Color of title text - if '', BgColor (of tooltip body) will be used |
|
100 |
config. TitleFontFace = '' // If '' use FontFace (boldified) |
|
101 |
config. TitleFontSize = '' // If '' use FontSize |
|
102 |
config. TitlePadding = 2 |
|
103 |
config. Width = 0 // Tooltip width; 0 for automatic adaption to tooltip content; < -1 (e.g. -240) for a maximum width for that automatic adaption; |
|
104 |
// -1: tooltip width confined to the width required for the titlebar |
|
105 |
//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// |
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
//===================== PUBLIC =============================================// |
|
111 |
function Tip() |
|
112 |
{ |
|
113 |
tt_Tip(arguments, null); |
|
114 |
} |
|
115 |
function TagToTip() |
|
116 |
{ |
|
117 |
var t2t = tt_GetElt(arguments[0]); |
|
118 |
if(t2t) |
|
119 |
tt_Tip(arguments, t2t); |
|
120 |
} |
|
121 |
function UnTip() |
|
122 |
{ |
|
123 |
tt_OpReHref(); |
|
124 |
if(tt_aV[DURATION] < 0 && (tt_iState & 0x2)) |
|
125 |
tt_tDurt.Timer("tt_HideInit()", -tt_aV[DURATION], true); |
|
126 |
else if(!(tt_aV[STICKY] && (tt_iState & 0x2))) |
|
127 |
tt_HideInit(); |
|
128 |
} |
|
129 |
|
|
130 |
//================== PUBLIC PLUGIN API =====================================// |
|
131 |
// Extension eventhandlers currently supported: |
|
132 |
// OnLoadConfig, OnCreateContentString, OnSubDivsCreated, OnShow, OnMoveBefore, |
|
133 |
// OnMoveAfter, OnHideInit, OnHide, OnKill |
|
134 |
|
|
135 |
var tt_aElt = new Array(10), // Container DIV, outer title & body DIVs, inner title & body TDs, closebutton SPAN, shadow DIVs, and IFRAME to cover windowed elements in IE |
|
136 |
tt_aV = new Array(), // Caches and enumerates config data for currently active tooltip |
|
137 |
tt_sContent, // Inner tooltip text or HTML |
|
138 |
tt_t2t, tt_t2tDad, // Tag converted to tip, and its DOM parent element |
|
139 |
tt_musX, tt_musY, |
|
140 |
tt_over, |
|
141 |
tt_x, tt_y, tt_w, tt_h; // Position, width and height of currently displayed tooltip |
|
142 |
|
|
143 |
function tt_Extension() |
|
144 |
{ |
|
145 |
tt_ExtCmdEnum(); |
|
146 |
tt_aExt[tt_aExt.length] = this; |
|
147 |
return this; |
|
148 |
} |
|
149 |
function tt_SetTipPos(x, y) |
|
150 |
{ |
|
151 |
var css = tt_aElt[0].style; |
|
152 |
|
|
153 |
tt_x = x; |
|
154 |
tt_y = y; |
|
155 |
css.left = x + "px"; |
|
156 |
css.top = y + "px"; |
|
157 |
if(tt_ie56) |
|
158 |
{ |
|
159 |
var ifrm = tt_aElt[tt_aElt.length - 1]; |
|
160 |
if(ifrm) |
|
161 |
{ |
|
162 |
ifrm.style.left = css.left; |
|
163 |
ifrm.style.top = css.top; |
|
164 |
} |
|
165 |
} |
|
166 |
} |
|
167 |
function tt_HideInit() |
|
168 |
{ |
|
169 |
if(tt_iState) |
|
170 |
{ |
|
171 |
tt_ExtCallFncs(0, "HideInit"); |
|
172 |
tt_iState &= ~(0x4 | 0x8); |
|
173 |
if(tt_flagOpa && tt_aV[FADEOUT]) |
|
174 |
{ |
|
175 |
tt_tFade.EndTimer(); |
|
176 |
if(tt_opa) |
|
177 |
{ |
|
178 |
var n = Math.round(tt_aV[FADEOUT] / (tt_aV[FADEINTERVAL] * (tt_aV[OPACITY] / tt_opa))); |
|
179 |
tt_Fade(tt_opa, tt_opa, 0, n); |
|
180 |
return; |
|
181 |
} |
|
182 |
} |
|
183 |
tt_tHide.Timer("tt_Hide();", 1, false); |
|
184 |
} |
|
185 |
} |
|
186 |
function tt_Hide() |
|
187 |
{ |
|
188 |
if(tt_db && tt_iState) |
|
189 |
{ |
|
190 |
tt_OpReHref(); |
|
191 |
if(tt_iState & 0x2) |
|
192 |
{ |
|
193 |
tt_aElt[0].style.visibility = "hidden"; |
|
194 |
tt_ExtCallFncs(0, "Hide"); |
|
195 |
} |
|
196 |
tt_tShow.EndTimer(); |
|
197 |
tt_tHide.EndTimer(); |
|
198 |
tt_tDurt.EndTimer(); |
|
199 |
tt_tFade.EndTimer(); |
|
200 |
if(!tt_op && !tt_ie) |
|
201 |
{ |
|
202 |
tt_tWaitMov.EndTimer(); |
|
203 |
tt_bWait = false; |
|
204 |
} |
|
205 |
if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY]) |
|
206 |
tt_RemEvtFnc(document, "mouseup", tt_OnLClick); |
|
207 |
tt_ExtCallFncs(0, "Kill"); |
|
208 |
// In case of a TagToTip tip, hide converted DOM node and |
|
209 |
// re-insert it into DOM |
|
210 |
if(tt_t2t && !tt_aV[COPYCONTENT]) |
|
211 |
tt_UnEl2Tip(); |
|
212 |
tt_iState = 0; |
|
213 |
tt_over = null; |
|
214 |
tt_ResetMainDiv(); |
|
215 |
if(tt_aElt[tt_aElt.length - 1]) |
|
216 |
tt_aElt[tt_aElt.length - 1].style.display = "none"; |
|
217 |
} |
|
218 |
} |
|
219 |
function tt_GetElt(id) |
|
220 |
{ |
|
221 |
return(document.getElementById ? document.getElementById(id) |
|
222 |
: document.all ? document.all[id] |
|
223 |
: null); |
|
224 |
} |
|
225 |
function tt_GetDivW(el) |
|
226 |
{ |
|
227 |
return(el ? (el.offsetWidth || el.style.pixelWidth || 0) : 0); |
|
228 |
} |
|
229 |
function tt_GetDivH(el) |
|
230 |
{ |
|
231 |
return(el ? (el.offsetHeight || el.style.pixelHeight || 0) : 0); |
|
232 |
} |
|
233 |
function tt_GetScrollX() |
|
234 |
{ |
|
235 |
return(window.pageXOffset || (tt_db ? (tt_db.scrollLeft || 0) : 0)); |
|
236 |
} |
|
237 |
function tt_GetScrollY() |
|
238 |
{ |
|
239 |
return(window.pageYOffset || (tt_db ? (tt_db.scrollTop || 0) : 0)); |
|
240 |
} |
|
241 |
function tt_GetClientW() |
|
242 |
{ |
|
243 |
return tt_GetWndCliSiz("Width"); |
|
244 |
} |
|
245 |
function tt_GetClientH() |
|
246 |
{ |
|
247 |
return tt_GetWndCliSiz("Height"); |
|
248 |
} |
|
249 |
function tt_GetEvtX(e) |
|
250 |
{ |
|
251 |
return (e ? ((typeof(e.pageX) != tt_u) ? e.pageX : (e.clientX + tt_GetScrollX())) : 0); |
|
252 |
} |
|
253 |
function tt_GetEvtY(e) |
|
254 |
{ |
|
255 |
return (e ? ((typeof(e.pageY) != tt_u) ? e.pageY : (e.clientY + tt_GetScrollY())) : 0); |
|
256 |
} |
|
257 |
function tt_AddEvtFnc(el, sEvt, PFnc) |
|
258 |
{ |
|
259 |
if(el) |
|
260 |
{ |
|
261 |
if(el.addEventListener) |
|
262 |
el.addEventListener(sEvt, PFnc, false); |
|
263 |
else |
|
264 |
el.attachEvent("on" + sEvt, PFnc); |
|
265 |
} |
|
266 |
} |
|
267 |
function tt_RemEvtFnc(el, sEvt, PFnc) |
|
268 |
{ |
|
269 |
if(el) |
|
270 |
{ |
|
271 |
if(el.removeEventListener) |
|
272 |
el.removeEventListener(sEvt, PFnc, false); |
|
273 |
else |
|
274 |
el.detachEvent("on" + sEvt, PFnc); |
|
275 |
} |
|
276 |
} |
|
277 |
function tt_GetDad(el) |
|
278 |
{ |
|
279 |
return(el.parentNode || el.parentElement || el.offsetParent); |
|
280 |
} |
|
281 |
function tt_MovDomNode(el, dadFrom, dadTo) |
|
282 |
{ |
|
283 |
if(dadFrom) |
|
284 |
dadFrom.removeChild(el); |
|
285 |
if(dadTo) |
|
286 |
dadTo.appendChild(el); |
|
287 |
} |
|
288 |
|
|
289 |
//====================== PRIVATE ===========================================// |
|
290 |
var tt_aExt = new Array(), // Array of extension objects |
|
291 |
|
|
292 |
tt_db, tt_op, tt_ie, tt_ie56, tt_bBoxOld, // Browser flags |
|
293 |
tt_body, |
|
294 |
tt_ovr_, // HTML element the mouse is currently over |
|
295 |
tt_flagOpa, // Opacity support: 1=IE, 2=Khtml, 3=KHTML, 4=Moz, 5=W3C |
|
296 |
tt_maxPosX, tt_maxPosY, |
|
297 |
tt_iState = 0, // Tooltip active |= 1, shown |= 2, move with mouse |= 4, exclusive |= 8 |
|
298 |
tt_opa, // Currently applied opacity |
|
299 |
tt_bJmpVert, tt_bJmpHorz,// Tip temporarily on other side of mouse |
|
300 |
tt_elDeHref, // The tag from which we've removed the href attribute |
|
301 |
// Timer |
|
302 |
tt_tShow = new Number(0), tt_tHide = new Number(0), tt_tDurt = new Number(0), |
|
303 |
tt_tFade = new Number(0), tt_tWaitMov = new Number(0), |
|
304 |
tt_bWait = false, |
|
305 |
tt_u = "undefined"; |
|
306 |
|
|
307 |
|
|
308 |
function tt_Init() |
|
309 |
{ |
|
310 |
tt_MkCmdEnum(); |
|
311 |
// Send old browsers instantly to hell |
|
312 |
if(!tt_Browser() || !tt_MkMainDiv()) |
|
313 |
return; |
|
314 |
tt_IsW3cBox(); |
|
315 |
tt_OpaSupport(); |
|
316 |
tt_AddEvtFnc(document, "mousemove", tt_Move); |
|
317 |
// In Debug mode we search for TagToTip() calls in order to notify |
|
318 |
// the user if they've forgotten to set the TagsToTip config flag |
|
319 |
if(TagsToTip || tt_Debug) |
|
320 |
tt_SetOnloadFnc(); |
|
321 |
// Ensure the tip be hidden when the page unloads |
|
322 |
tt_AddEvtFnc(window, "unload", tt_Hide); |
|
323 |
} |
|
324 |
// Creates command names by translating config variable names to upper case |
|
325 |
function tt_MkCmdEnum() |
|
326 |
{ |
|
327 |
var n = 0; |
|
328 |
for(var i in config) |
|
329 |
eval("window." + i.toString().toUpperCase() + " = " + n++); |
|
330 |
tt_aV.length = n; |
|
331 |
} |
|
332 |
function tt_Browser() |
|
333 |
{ |
|
334 |
var n, nv, n6, w3c; |
|
335 |
|
|
336 |
n = navigator.userAgent.toLowerCase(), |
|
337 |
nv = navigator.appVersion; |
|
338 |
tt_op = (document.defaultView && typeof(eval("w" + "indow" + "." + "o" + "p" + "er" + "a")) != tt_u); |
|
339 |
tt_ie = n.indexOf("msie") != -1 && document.all && !tt_op; |
|
340 |
if(tt_ie) |
|
341 |
{ |
|
342 |
var ieOld = (!document.compatMode || document.compatMode == "BackCompat"); |
|
343 |
tt_db = !ieOld ? document.documentElement : (document.body || null); |
|
344 |
if(tt_db) |
|
345 |
tt_ie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5 |
|
346 |
&& typeof document.body.style.maxHeight == tt_u; |
|
347 |
} |
|
348 |
else |
|
349 |
{ |
|
350 |
tt_db = document.documentElement || document.body || |
|
351 |
(document.getElementsByTagName ? document.getElementsByTagName("body")[0] |
|
352 |
: null); |
|
353 |
if(!tt_op) |
|
354 |
{ |
|
355 |
n6 = document.defaultView && typeof document.defaultView.getComputedStyle != tt_u; |
|
356 |
w3c = !n6 && document.getElementById; |
|
357 |
} |
|
358 |
} |
|
359 |
tt_body = (document.getElementsByTagName ? document.getElementsByTagName("body")[0] |
|
360 |
: (document.body || null)); |
|
361 |
if(tt_ie || n6 || tt_op || w3c) |
|
362 |
{ |
|
363 |
if(tt_body && tt_db) |
|
364 |
{ |
|
365 |
if(document.attachEvent || document.addEventListener) |
|
366 |
return true; |
|
367 |
} |
|
368 |
else |
|
369 |
tt_Err("wz_tooltip.js must be included INSIDE the body section," |
|
370 |
+ " immediately after the opening <body> tag.", false); |
|
371 |
} |
|
372 |
tt_db = null; |
|
373 |
return false; |
|
374 |
} |
|
375 |
function tt_MkMainDiv() |
|
376 |
{ |
|
377 |
// Create the tooltip DIV |
|
378 |
if(tt_body.insertAdjacentHTML) |
|
379 |
tt_body.insertAdjacentHTML("afterBegin", tt_MkMainDivHtm()); |
|
380 |
else if(typeof tt_body.innerHTML != tt_u && document.createElement && tt_body.appendChild) |
|
381 |
tt_body.appendChild(tt_MkMainDivDom()); |
|
382 |
if(window.tt_GetMainDivRefs /* FireFox Alzheimer */ && tt_GetMainDivRefs()) |
|
383 |
return true; |
|
384 |
tt_db = null; |
|
385 |
return false; |
|
386 |
} |
|
387 |
function tt_MkMainDivHtm() |
|
388 |
{ |
|
389 |
return( |
|
390 |
'<div id="WzTtDiV"></div>' + |
|
391 |
(tt_ie56 ? ('<iframe id="WzTtIfRm" src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;"></iframe>') |
|
392 |
: '') |
|
393 |
); |
|
394 |
} |
|
395 |
function tt_MkMainDivDom() |
|
396 |
{ |
|
397 |
var el = document.createElement("div"); |
|
398 |
if(el) |
|
399 |
el.id = "WzTtDiV"; |
|
400 |
return el; |
|
401 |
} |
|
402 |
function tt_GetMainDivRefs() |
|
403 |
{ |
|
404 |
tt_aElt[0] = tt_GetElt("WzTtDiV"); |
|
405 |
if(tt_ie56 && tt_aElt[0]) |
|
406 |
{ |
|
407 |
tt_aElt[tt_aElt.length - 1] = tt_GetElt("WzTtIfRm"); |
|
408 |
if(!tt_aElt[tt_aElt.length - 1]) |
|
409 |
tt_aElt[0] = null; |
|
410 |
} |
|
411 |
if(tt_aElt[0]) |
|
412 |
{ |
|
413 |
var css = tt_aElt[0].style; |
|
414 |
|
|
415 |
css.visibility = "hidden"; |
|
416 |
css.position = "absolute"; |
|
417 |
css.overflow = "hidden"; |
|
418 |
return true; |
|
419 |
} |
|
420 |
return false; |
|
421 |
} |
|
422 |
function tt_ResetMainDiv() |
|
423 |
{ |
|
424 |
tt_SetTipPos(0, 0); |
|
425 |
tt_aElt[0].innerHTML = ""; |
|
426 |
tt_aElt[0].style.width = "0px"; |
|
427 |
tt_h = 0; |
|
428 |
} |
|
429 |
function tt_IsW3cBox() |
|
430 |
{ |
|
431 |
var css = tt_aElt[0].style; |
|
432 |
|
|
433 |
css.padding = "10px"; |
|
434 |
css.width = "40px"; |
|
435 |
tt_bBoxOld = (tt_GetDivW(tt_aElt[0]) == 40); |
|
436 |
css.padding = "0px"; |
|
437 |
tt_ResetMainDiv(); |
|
438 |
} |
|
439 |
function tt_OpaSupport() |
|
440 |
{ |
|
441 |
var css = tt_body.style; |
|
442 |
|
|
443 |
tt_flagOpa = (typeof(css.KhtmlOpacity) != tt_u) ? 2 |
|
444 |
: (typeof(css.KHTMLOpacity) != tt_u) ? 3 |
|
445 |
: (typeof(css.MozOpacity) != tt_u) ? 4 |
|
446 |
: (typeof(css.opacity) != tt_u) ? 5 |
|
447 |
: (typeof(css.filter) != tt_u) ? 1 |
|
448 |
: 0; |
|
449 |
} |
|
450 |
// Ported from http://dean.edwards.name/weblog/2006/06/again/ |
|
451 |
// (Dean Edwards et al.) |
|
452 |
function tt_SetOnloadFnc() |
|
453 |
{ |
|
454 |
tt_AddEvtFnc(document, "DOMContentLoaded", tt_HideSrcTags); |
|
455 |
tt_AddEvtFnc(window, "load", tt_HideSrcTags); |
|
456 |
if(tt_body.attachEvent) |
|
457 |
tt_body.attachEvent("onreadystatechange", |
|
458 |
function() { |
|
459 |
if(tt_body.readyState == "complete") |
|
460 |
tt_HideSrcTags(); |
|
461 |
} ); |
|
462 |
if(/WebKit|KHTML/i.test(navigator.userAgent)) |
|
463 |
{ |
|
464 |
var t = setInterval(function() { |
|
465 |
if(/loaded|complete/.test(document.readyState)) |
|
466 |
{ |
|
467 |
clearInterval(t); |
|
468 |
tt_HideSrcTags(); |
|
469 |
} |
|
470 |
}, 10); |
|
471 |
} |
|
472 |
} |
|
473 |
function tt_HideSrcTags() |
|
474 |
{ |
|
475 |
if(!window.tt_HideSrcTags || window.tt_HideSrcTags.done) |
|
476 |
return; |
|
477 |
window.tt_HideSrcTags.done = true; |
|
478 |
if(!tt_HideSrcTagsRecurs(tt_body)) |
|
479 |
tt_Err("There are HTML elements to be converted to tooltips.\nIf you" |
|
480 |
+ " want these HTML elements to be automatically hidden, you" |
|
481 |
+ " must edit wz_tooltip.js, and set TagsToTip in the global" |
|
482 |
+ " tooltip configuration to true.", true); |
|
483 |
} |
|
484 |
function tt_HideSrcTagsRecurs(dad) |
|
485 |
{ |
|
486 |
var ovr, asT2t; |
|
487 |
// Walk the DOM tree for tags that have an onmouseover or onclick attribute |
|
488 |
// containing a TagToTip('...') call. |
|
489 |
// (.childNodes first since .children is bugous in Safari) |
|
490 |
var a = dad.childNodes || dad.children || null; |
|
491 |
|
|
492 |
for(var i = a ? a.length : 0; i;) |
|
493 |
{--i; |
|
494 |
if(!tt_HideSrcTagsRecurs(a[i])) |
|
495 |
return false; |
|
496 |
ovr = a[i].getAttribute ? (a[i].getAttribute("onmouseover") || a[i].getAttribute("onclick")) |
|
497 |
: (typeof a[i].onmouseover == "function") ? (a[i].onmouseover || a[i].onclick) |
|
498 |
: null; |
|
499 |
if(ovr) |
|
500 |
{ |
|
501 |
asT2t = ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/); |
|
502 |
if(asT2t && asT2t.length) |
|
503 |
{ |
|
504 |
if(!tt_HideSrcTag(asT2t[0])) |
|
505 |
return false; |
|
506 |
} |
|
507 |
} |
|
508 |
} |
|
509 |
return true; |
|
510 |
} |
|
511 |
function tt_HideSrcTag(sT2t) |
|
512 |
{ |
|
513 |
var id, el; |
|
514 |
|
|
515 |
// The ID passed to the found TagToTip() call identifies an HTML element |
|
516 |
// to be converted to a tooltip, so hide that element |
|
517 |
id = sT2t.replace(/.+'([^'.]+)'.+/, "$1"); |
|
518 |
el = tt_GetElt(id); |
|
519 |
if(el) |
|
520 |
{ |
|
521 |
if(tt_Debug && !TagsToTip) |
|
522 |
return false; |
|
523 |
else |
|
524 |
el.style.display = "none"; |
|
525 |
} |
|
526 |
else |
|
527 |
tt_Err("Invalid ID\n'" + id + "'\npassed to TagToTip()." |
|
528 |
+ " There exists no HTML element with that ID.", true); |
|
529 |
return true; |
|
530 |
} |
|
531 |
function tt_Tip(arg, t2t) |
|
532 |
{ |
|
533 |
if(!tt_db || (tt_iState & 0x8)) |
|
534 |
return; |
|
535 |
if(tt_iState) |
|
536 |
tt_Hide(); |
|
537 |
if(!tt_Enabled) |
|
538 |
return; |
|
539 |
tt_t2t = t2t; |
|
540 |
if(!tt_ReadCmds(arg)) |
|
541 |
return; |
|
542 |
tt_iState = 0x1 | 0x4; |
|
543 |
tt_AdaptConfig1(); |
|
544 |
tt_MkTipContent(arg); |
|
545 |
tt_MkTipSubDivs(); |
|
546 |
tt_FormatTip(); |
|
547 |
tt_bJmpVert = false; |
|
548 |
tt_bJmpHorz = false; |
|
549 |
tt_maxPosX = tt_GetClientW() + tt_GetScrollX() - tt_w - 1; |
|
550 |
tt_maxPosY = tt_GetClientH() + tt_GetScrollY() - tt_h - 1; |
|
551 |
tt_AdaptConfig2(); |
|
552 |
// Ensure the tip be shown and positioned before the first onmousemove |
|
553 |
tt_OverInit(); |
|
554 |
tt_ShowInit(); |
|
555 |
tt_Move(); |
|
556 |
} |
|
557 |
function tt_ReadCmds(a) |
|
558 |
{ |
|
559 |
var i; |
|
560 |
|
|
561 |
// First load the global config values, to initialize also values |
|
562 |
// for which no command is passed |
|
563 |
i = 0; |
|
564 |
for(var j in config) |
|
565 |
tt_aV[i++] = config[j]; |
|
566 |
// Then replace each cached config value for which a command is |
|
567 |
// passed (ensure the # of command args plus value args be even) |
|
568 |
if(a.length & 1) |
|
569 |
{ |
|
570 |
for(i = a.length - 1; i > 0; i -= 2) |
|
571 |
tt_aV[a[i - 1]] = a[i]; |
|
572 |
return true; |
|
573 |
} |
|
574 |
tt_Err("Incorrect call of Tip() or TagToTip().\n" |
|
575 |
+ "Each command must be followed by a value.", true); |
|
576 |
return false; |
|
577 |
} |
|
578 |
function tt_AdaptConfig1() |
|
579 |
{ |
|
580 |
tt_ExtCallFncs(0, "LoadConfig"); |
|
581 |
// Inherit unspecified title formattings from body |
|
582 |
if(!tt_aV[TITLEBGCOLOR].length) |
|
583 |
tt_aV[TITLEBGCOLOR] = tt_aV[BORDERCOLOR]; |
|
584 |
if(!tt_aV[TITLEFONTCOLOR].length) |
|
585 |
tt_aV[TITLEFONTCOLOR] = tt_aV[BGCOLOR]; |
|
586 |
if(!tt_aV[TITLEFONTFACE].length) |
|
587 |
tt_aV[TITLEFONTFACE] = tt_aV[FONTFACE]; |
|
588 |
if(!tt_aV[TITLEFONTSIZE].length) |
|
589 |
tt_aV[TITLEFONTSIZE] = tt_aV[FONTSIZE]; |
|
590 |
if(tt_aV[CLOSEBTN]) |
|
591 |
{ |
|
592 |
// Use title colours for non-specified closebutton colours |
|
593 |
if(!tt_aV[CLOSEBTNCOLORS]) |
|
594 |
tt_aV[CLOSEBTNCOLORS] = new Array("", "", "", ""); |
|
595 |
for(var i = 4; i;) |
|
596 |
{--i; |
|
597 |
if(!tt_aV[CLOSEBTNCOLORS][i].length) |
|
598 |
tt_aV[CLOSEBTNCOLORS][i] = (i & 1) ? tt_aV[TITLEFONTCOLOR] : tt_aV[TITLEBGCOLOR]; |
|
599 |
} |
|
600 |
// Enforce titlebar be shown |
|
601 |
if(!tt_aV[TITLE].length) |
|
602 |
tt_aV[TITLE] = " "; |
|
603 |
} |
|
604 |
// Circumvents broken display of images and fade-in flicker in Geckos < 1.8 |
|
605 |
if(tt_aV[OPACITY] == 100 && typeof tt_aElt[0].style.MozOpacity != tt_u && !Array.every) |
|
606 |
tt_aV[OPACITY] = 99; |
|
607 |
// Smartly shorten the delay for fade-in tooltips |
|
608 |
if(tt_aV[FADEIN] && tt_flagOpa && tt_aV[DELAY] > 100) |
|
609 |
tt_aV[DELAY] = Math.max(tt_aV[DELAY] - tt_aV[FADEIN], 100); |
|
610 |
} |
|
611 |
function tt_AdaptConfig2() |
|
612 |
{ |
|
613 |
if(tt_aV[CENTERMOUSE]) |
|
614 |
{ |
|
615 |
tt_aV[OFFSETX] -= ((tt_w - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0)) >> 1); |
|
616 |
tt_aV[JUMPHORZ] = false; |
|
617 |
} |
|
618 |
} |
|
619 |
// Expose content globally so extensions can modify it |
|
620 |
function tt_MkTipContent(a) |
|
621 |
{ |
|
622 |
if(tt_t2t) |
|
623 |
{ |
|
624 |
if(tt_aV[COPYCONTENT]) |
|
625 |
tt_sContent = tt_t2t.innerHTML; |
|
626 |
else |
|
627 |
tt_sContent = ""; |
|
628 |
} |
|
629 |
else |
|
630 |
tt_sContent = a[0]; |
|
631 |
tt_ExtCallFncs(0, "CreateContentString"); |
|
632 |
} |
|
633 |
function tt_MkTipSubDivs() |
|
634 |
{ |
|
635 |
var sCss = 'position:relative;margin:0px;padding:0px;border-width:0px;left:0px;top:0px;line-height:normal;width:auto;', |
|
636 |
sTbTrTd = ' cellspacing="0" cellpadding="0" border="0" style="' + sCss + '"><tbody style="' + sCss + '"><tr><td '; |
|
637 |
|
|
638 |
tt_aElt[0].style.width = tt_GetClientW() + "px"; |
|
639 |
tt_aElt[0].innerHTML = |
|
640 |
('' |
|
641 |
+ (tt_aV[TITLE].length ? |
|
642 |
('<div id="WzTiTl" style="position:relative;z-index:1;">' |
|
643 |
+ '<table id="WzTiTlTb"' + sTbTrTd + 'id="WzTiTlI" style="' + sCss + '">' |
|
644 |
+ tt_aV[TITLE] |
|
645 |
+ '</td>' |
|
646 |
+ (tt_aV[CLOSEBTN] ? |
|
647 |
('<td align="right" style="' + sCss |
|
648 |
+ 'text-align:right;">' |
|
649 |
+ '<span id="WzClOsE" style="position:relative;left:2px;padding-left:2px;padding-right:2px;' |
|
650 |
+ 'cursor:' + (tt_ie ? 'hand' : 'pointer') |
|
651 |
+ ';" onmouseover="tt_OnCloseBtnOver(1)" onmouseout="tt_OnCloseBtnOver(0)" onclick="tt_HideInit()">' |
|
652 |
+ tt_aV[CLOSEBTNTEXT] |
|
653 |
+ '</span></td>') |
|
654 |
: '') |
|
655 |
+ '</tr></tbody></table></div>') |
|
656 |
: '') |
|
657 |
+ '<div id="WzBoDy" style="position:relative;z-index:0;">' |
|
658 |
+ '<table' + sTbTrTd + 'id="WzBoDyI" style="' + sCss + '">' |
|
659 |
+ tt_sContent |
|
660 |
+ '</td></tr></tbody></table></div>' |
|
661 |
+ (tt_aV[SHADOW] |
|
662 |
? ('<div id="WzTtShDwR" style="position:absolute;overflow:hidden;"></div>' |
|
663 |
+ '<div id="WzTtShDwB" style="position:relative;overflow:hidden;"></div>') |
|
664 |
: '') |
|
665 |
); |
|
666 |
tt_GetSubDivRefs(); |
|
667 |
// Convert DOM node to tip |
|
668 |
if(tt_t2t && !tt_aV[COPYCONTENT]) |
|
669 |
tt_El2Tip(); |
|
670 |
tt_ExtCallFncs(0, "SubDivsCreated"); |
|
671 |
} |
|
672 |
function tt_GetSubDivRefs() |
|
673 |
{ |
|
674 |
var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR"); |
|
675 |
|
|
676 |
for(var i = aId.length; i; --i) |
|
677 |
tt_aElt[i] = tt_GetElt(aId[i - 1]); |
|
678 |
} |
|
679 |
function tt_FormatTip() |
|
680 |
{ |
|
681 |
var css, w, h, pad = tt_aV[PADDING], padT, wBrd = tt_aV[BORDERWIDTH], |
|
682 |
iOffY, iOffSh, iAdd = (pad + wBrd) << 1; |
|
683 |
|
|
684 |
//--------- Title DIV ---------- |
|
685 |
if(tt_aV[TITLE].length) |
|
686 |
{ |
|
687 |
padT = tt_aV[TITLEPADDING]; |
|
688 |
css = tt_aElt[1].style; |
|
689 |
css.background = tt_aV[TITLEBGCOLOR]; |
|
690 |
css.paddingTop = css.paddingBottom = padT + "px"; |
|
691 |
css.paddingLeft = css.paddingRight = (padT + 2) + "px"; |
|
692 |
css = tt_aElt[3].style; |
|
693 |
css.color = tt_aV[TITLEFONTCOLOR]; |
|
694 |
if(tt_aV[WIDTH] == -1) |
|
695 |
css.whiteSpace = "nowrap"; |
|
696 |
css.fontFamily = tt_aV[TITLEFONTFACE]; |
|
697 |
css.fontSize = tt_aV[TITLEFONTSIZE]; |
|
698 |
css.fontWeight = "bold"; |
|
699 |
css.textAlign = tt_aV[TITLEALIGN]; |
|
700 |
// Close button DIV |
|
701 |
if(tt_aElt[4]) |
|
702 |
{ |
|
703 |
css = tt_aElt[4].style; |
|
704 |
css.background = tt_aV[CLOSEBTNCOLORS][0]; |
|
705 |
css.color = tt_aV[CLOSEBTNCOLORS][1]; |
|
706 |
css.fontFamily = tt_aV[TITLEFONTFACE]; |
|
707 |
css.fontSize = tt_aV[TITLEFONTSIZE]; |
|
708 |
css.fontWeight = "bold"; |
|
709 |
} |
|
710 |
if(tt_aV[WIDTH] > 0) |
|
711 |
tt_w = tt_aV[WIDTH]; |
|
712 |
else |
|
713 |
{ |
|
714 |
tt_w = tt_GetDivW(tt_aElt[3]) + tt_GetDivW(tt_aElt[4]); |
|
715 |
// Some spacing between title DIV and closebutton |
|
716 |
if(tt_aElt[4]) |
|
717 |
tt_w += pad; |
|
718 |
// Restrict auto width to max width |
|
719 |
if(tt_aV[WIDTH] < -1 && tt_w > -tt_aV[WIDTH]) |
|
720 |
tt_w = -tt_aV[WIDTH]; |
|
721 |
} |
|
722 |
// Ensure the top border of the body DIV be covered by the title DIV |
|
723 |
iOffY = -wBrd; |
|
724 |
} |
|
725 |
else |
|
726 |
{ |
|
727 |
tt_w = 0; |
|
728 |
iOffY = 0; |
|
729 |
} |
|
730 |
|
|
731 |
//-------- Body DIV ------------ |
|
732 |
css = tt_aElt[5].style; |
|
733 |
css.top = iOffY + "px"; |
|
734 |
if(wBrd) |
|
735 |
{ |
|
736 |
css.borderColor = tt_aV[BORDERCOLOR]; |
|
737 |
css.borderStyle = tt_aV[BORDERSTYLE]; |
|
738 |
css.borderWidth = wBrd + "px"; |
|
739 |
} |
|
740 |
if(tt_aV[BGCOLOR].length) |
|
741 |
css.background = tt_aV[BGCOLOR]; |
|
742 |
if(tt_aV[BGIMG].length) |
|
743 |
css.backgroundImage = "url(" + tt_aV[BGIMG] + ")"; |
|
744 |
css.padding = pad + "px"; |
|
745 |
css.textAlign = tt_aV[TEXTALIGN]; |
|
746 |
if(tt_aV[HEIGHT]) |
|
747 |
{ |
|
748 |
css.overflow = "auto"; |
|
749 |
if(tt_aV[HEIGHT] > 0) |
|
750 |
css.height = (tt_aV[HEIGHT] + iAdd) + "px"; |
|
751 |
else |
|
752 |
tt_h = iAdd - tt_aV[HEIGHT]; |
|
753 |
} |
|
754 |
// TD inside body DIV |
|
755 |
css = tt_aElt[6].style; |
|
756 |
css.color = tt_aV[FONTCOLOR]; |
|
757 |
css.fontFamily = tt_aV[FONTFACE]; |
|
758 |
css.fontSize = tt_aV[FONTSIZE]; |
|
759 |
css.fontWeight = tt_aV[FONTWEIGHT]; |
|
760 |
css.textAlign = tt_aV[TEXTALIGN]; |
|
761 |
if(tt_aV[WIDTH] > 0) |
|
762 |
w = tt_aV[WIDTH]; |
|
763 |
// Width like title (if existent) |
|
764 |
else if(tt_aV[WIDTH] == -1 && tt_w) |
|
765 |
w = tt_w; |
|
766 |
else |
|
767 |
{ |
|
768 |
// Measure width of the body's inner TD, as some browsers would expand |
|
769 |
// the container and outer body DIV to 100% |
|
770 |
w = tt_GetDivW(tt_aElt[6]); |
|
771 |
// Restrict auto width to max width |
|
772 |
if(tt_aV[WIDTH] < -1 && w > -tt_aV[WIDTH]) |
|
773 |
w = -tt_aV[WIDTH]; |
|
774 |
} |
|
775 |
if(w > tt_w) |
|
776 |
tt_w = w; |
|
777 |
tt_w += iAdd; |
|
778 |
|
|
779 |
//--------- Shadow DIVs ------------ |
|
780 |
if(tt_aV[SHADOW]) |
|
781 |
{ |
|
782 |
tt_w += tt_aV[SHADOWWIDTH]; |
|
783 |
iOffSh = Math.floor((tt_aV[SHADOWWIDTH] * 4) / 3); |
|
784 |
// Bottom shadow |
|
785 |
css = tt_aElt[7].style; |
|
786 |
css.top = iOffY + "px"; |
|
787 |
css.left = iOffSh + "px"; |
|
788 |
css.width = (tt_w - iOffSh - tt_aV[SHADOWWIDTH]) + "px"; |
|
789 |
css.height = tt_aV[SHADOWWIDTH] + "px"; |
|
790 |
css.background = tt_aV[SHADOWCOLOR]; |
|
791 |
// Right shadow |
|
792 |
css = tt_aElt[8].style; |
|
793 |
css.top = iOffSh + "px"; |
|
794 |
css.left = (tt_w - tt_aV[SHADOWWIDTH]) + "px"; |
|
795 |
css.width = tt_aV[SHADOWWIDTH] + "px"; |
|
796 |
css.background = tt_aV[SHADOWCOLOR]; |
|
797 |
} |
|
798 |
else |
|
799 |
iOffSh = 0; |
|
800 |
|
|
801 |
//-------- Container DIV ------- |
|
802 |
tt_SetTipOpa(tt_aV[FADEIN] ? 0 : tt_aV[OPACITY]); |
|
803 |
tt_FixSize(iOffY, iOffSh); |
|
804 |
} |
|
805 |
// Fixate the size so it can't dynamically change while the tooltip is moving. |
|
806 |
function tt_FixSize(iOffY, iOffSh) |
|
807 |
{ |
|
808 |
var wIn, wOut, h, add, pad = tt_aV[PADDING], wBrd = tt_aV[BORDERWIDTH], i; |
|
809 |
|
|
810 |
tt_aElt[0].style.width = tt_w + "px"; |
|
811 |
tt_aElt[0].style.pixelWidth = tt_w; |
|
812 |
wOut = tt_w - ((tt_aV[SHADOW]) ? tt_aV[SHADOWWIDTH] : 0); |
|
813 |
// Body |
|
814 |
wIn = wOut; |
|
815 |
if(!tt_bBoxOld) |
|
816 |
wIn -= (pad + wBrd) << 1; |
|
817 |
tt_aElt[5].style.width = wIn + "px"; |
|
818 |
// Title |
|
819 |
if(tt_aElt[1]) |
|
820 |
{ |
|
821 |
wIn = wOut - ((tt_aV[TITLEPADDING] + 2) << 1); |
|
822 |
if(!tt_bBoxOld) |
|
823 |
wOut = wIn; |
|
824 |
tt_aElt[1].style.width = wOut + "px"; |
|
825 |
tt_aElt[2].style.width = wIn + "px"; |
|
826 |
} |
|
827 |
// Max height specified |
|
828 |
if(tt_h) |
|
829 |
{ |
|
830 |
h = tt_GetDivH(tt_aElt[5]); |
|
831 |
if(h > tt_h) |
|
832 |
{ |
|
833 |
if(!tt_bBoxOld) |
|
834 |
tt_h -= (pad + wBrd) << 1; |
|
835 |
tt_aElt[5].style.height = tt_h + "px"; |
|
836 |
} |
|
837 |
} |
|
838 |
tt_h = tt_GetDivH(tt_aElt[0]) + iOffY; |
|
839 |
// Right shadow |
|
840 |
if(tt_aElt[8]) |
|
841 |
tt_aElt[8].style.height = (tt_h - iOffSh) + "px"; |
|
842 |
i = tt_aElt.length - 1; |
|
843 |
if(tt_aElt[i]) |
|
844 |
{ |
|
845 |
tt_aElt[i].style.width = tt_w + "px"; |
|
846 |
tt_aElt[i].style.height = tt_h + "px"; |
|
847 |
} |
|
848 |
} |
|
849 |
function tt_DeAlt(el) |
|
850 |
{ |
|
851 |
var aKid; |
|
852 |
|
|
853 |
if(el) |
|
854 |
{ |
|
855 |
if(el.alt) |
|
856 |
el.alt = ""; |
|
857 |
if(el.title) |
|
858 |
el.title = ""; |
|
859 |
aKid = el.childNodes || el.children || null; |
|
860 |
if(aKid) |
|
861 |
{ |
|
862 |
for(var i = aKid.length; i;) |
|
863 |
tt_DeAlt(aKid[--i]); |
|
864 |
} |
|
865 |
} |
|
866 |
} |
|
867 |
// This hack removes the native tooltips over links in Opera |
|
868 |
function tt_OpDeHref(el) |
|
869 |
{ |
|
870 |
if(!tt_op) |
|
871 |
return; |
|
872 |
if(tt_elDeHref) |
|
873 |
tt_OpReHref(); |
|
874 |
while(el) |
|
875 |
{ |
|
876 |
if(el.hasAttribute && el.hasAttribute("href")) |
|
877 |
{ |
|
878 |
el.t_href = el.getAttribute("href"); |
|
879 |
el.t_stats = window.status; |
|
880 |
el.removeAttribute("href"); |
|
881 |
el.style.cursor = "hand"; |
|
882 |
tt_AddEvtFnc(el, "mousedown", tt_OpReHref); |
|
883 |
window.status = el.t_href; |
|
884 |
tt_elDeHref = el; |
|
885 |
break; |
|
886 |
} |
|
887 |
el = tt_GetDad(el); |
|
888 |
} |
|
889 |
} |
|
890 |
function tt_OpReHref() |
|
891 |
{ |
|
892 |
if(tt_elDeHref) |
|
893 |
{ |
|
894 |
tt_elDeHref.setAttribute("href", tt_elDeHref.t_href); |
|
895 |
tt_RemEvtFnc(tt_elDeHref, "mousedown", tt_OpReHref); |
|
896 |
window.status = tt_elDeHref.t_stats; |
|
897 |
tt_elDeHref = null; |
|
898 |
} |
|
899 |
} |
|
900 |
function tt_El2Tip() |
|
901 |
{ |
|
902 |
var css = tt_t2t.style; |
|
903 |
|
|
904 |
// Store previous positioning |
|
905 |
tt_t2t.t_cp = css.position; |
|
906 |
tt_t2t.t_cl = css.left; |
|
907 |
tt_t2t.t_ct = css.top; |
|
908 |
tt_t2t.t_cd = css.display; |
|
909 |
// Store the tag's parent element so we can restore that DOM branch |
|
910 |
// when the tooltip is being hidden |
|
911 |
tt_t2tDad = tt_GetDad(tt_t2t); |
|
912 |
tt_MovDomNode(tt_t2t, tt_t2tDad, tt_aElt[6]); |
|
913 |
css.display = "block"; |
|
914 |
css.position = "static"; |
|
915 |
css.left = css.top = css.marginLeft = css.marginTop = "0px"; |
|
916 |
} |
|
917 |
function tt_UnEl2Tip() |
|
918 |
{ |
|
919 |
// Restore positioning and display |
|
920 |
var css = tt_t2t.style; |
|
921 |
|
|
922 |
css.display = tt_t2t.t_cd; |
|
923 |
tt_MovDomNode(tt_t2t, tt_GetDad(tt_t2t), tt_t2tDad); |
|
924 |
css.position = tt_t2t.t_cp; |
|
925 |
css.left = tt_t2t.t_cl; |
|
926 |
css.top = tt_t2t.t_ct; |
|
927 |
tt_t2tDad = null; |
|
928 |
} |
|
929 |
function tt_OverInit() |
|
930 |
{ |
|
931 |
if(window.event) |
|
932 |
tt_over = window.event.target || window.event.srcElement; |
|
933 |
else |
|
934 |
tt_over = tt_ovr_; |
|
935 |
tt_DeAlt(tt_over); |
|
936 |
tt_OpDeHref(tt_over); |
|
937 |
} |
|
938 |
function tt_ShowInit() |
|
939 |
{ |
|
940 |
tt_tShow.Timer("tt_Show()", tt_aV[DELAY], true); |
|
941 |
if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY]) |
|
942 |
tt_AddEvtFnc(document, "mouseup", tt_OnLClick); |
|
943 |
} |
|
944 |
function tt_Show() |
|
945 |
{ |
|
946 |
var css = tt_aElt[0].style; |
|
947 |
|
|
948 |
// Override the z-index of the topmost wz_dragdrop.js D&D item |
|
949 |
css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1010); |
|
950 |
if(tt_aV[STICKY] || !tt_aV[FOLLOWMOUSE]) |
|
951 |
tt_iState &= ~0x4; |
|
952 |
if(tt_aV[EXCLUSIVE]) |
|
953 |
tt_iState |= 0x8; |
|
954 |
if(tt_aV[DURATION] > 0) |
|
955 |
tt_tDurt.Timer("tt_HideInit()", tt_aV[DURATION], true); |
|
956 |
tt_ExtCallFncs(0, "Show") |
|
957 |
css.visibility = "visible"; |
|
958 |
tt_iState |= 0x2; |
|
959 |
if(tt_aV[FADEIN]) |
|
960 |
tt_Fade(0, 0, tt_aV[OPACITY], Math.round(tt_aV[FADEIN] / tt_aV[FADEINTERVAL])); |
|
961 |
tt_ShowIfrm(); |
|
962 |
} |
|
963 |
function tt_ShowIfrm() |
|
964 |
{ |
|
965 |
if(tt_ie56) |
|
966 |
{ |
|
967 |
var ifrm = tt_aElt[tt_aElt.length - 1]; |
|
968 |
if(ifrm) |
|
969 |
{ |
|
970 |
var css = ifrm.style; |
|
971 |
css.zIndex = tt_aElt[0].style.zIndex - 1; |
|
972 |
css.display = "block"; |
|
973 |
} |
|
974 |
} |
|
975 |
} |
|
976 |
function tt_Move(e) |
|
977 |
{ |
|
978 |
if(e) |
|
979 |
tt_ovr_ = e.target || e.srcElement; |
|
980 |
e = e || window.event; |
|
981 |
if(e) |
|
982 |
{ |
|
983 |
tt_musX = tt_GetEvtX(e); |
|
984 |
tt_musY = tt_GetEvtY(e); |
|
985 |
} |
|
986 |
if(tt_iState & 0x4) |
|
987 |
{ |
|
988 |
// Prevent jam of mousemove events |
|
989 |
if(!tt_op && !tt_ie) |
|
990 |
{ |
|
991 |
if(tt_bWait) |
|
992 |
return; |
|
993 |
tt_bWait = true; |
|
994 |
tt_tWaitMov.Timer("tt_bWait = false;", 1, true); |
|
995 |
} |
|
996 |
if(tt_aV[FIX]) |
|
997 |
{ |
|
998 |
tt_iState &= ~0x4; |
|
999 |
tt_PosFix(); |
|
1000 |
} |
|
1001 |
else if(!tt_ExtCallFncs(e, "MoveBefore")) |
|
1002 |
tt_SetTipPos(tt_Pos(0), tt_Pos(1)); |
|
1003 |
tt_ExtCallFncs([tt_musX, tt_musY], "MoveAfter") |
|
1004 |
} |
|
1005 |
} |
|
1006 |
function tt_Pos(iDim) |
|
1007 |
{ |
|
1008 |
var iX, bJmpMod, cmdAlt, cmdOff, cx, iMax, iScrl, iMus, bJmp; |
|
1009 |
|
|
1010 |
// Map values according to dimension to calculate |
|
1011 |
if(iDim) |
|
1012 |
{ |
|
1013 |
bJmpMod = tt_aV[JUMPVERT]; |
|
1014 |
cmdAlt = ABOVE; |
|
1015 |
cmdOff = OFFSETY; |
|
1016 |
cx = tt_h; |
|
1017 |
iMax = tt_maxPosY; |
|
1018 |
iScrl = tt_GetScrollY(); |
|
1019 |
iMus = tt_musY; |
|
1020 |
bJmp = tt_bJmpVert; |
|
1021 |
} |
|
1022 |
else |
|
1023 |
{ |
|
1024 |
bJmpMod = tt_aV[JUMPHORZ]; |
|
1025 |
cmdAlt = LEFT; |
|
1026 |
cmdOff = OFFSETX; |
|
1027 |
cx = tt_w; |
|
1028 |
iMax = tt_maxPosX; |
|
1029 |
iScrl = tt_GetScrollX(); |
|
1030 |
iMus = tt_musX; |
|
1031 |
bJmp = tt_bJmpHorz; |
|
1032 |
} |
|
1033 |
if(bJmpMod) |
|
1034 |
{ |
|
1035 |
if(tt_aV[cmdAlt] && (!bJmp || tt_CalcPosAlt(iDim) >= iScrl + 16)) |
|
1036 |
iX = tt_PosAlt(iDim); |
|
1037 |
else if(!tt_aV[cmdAlt] && bJmp && tt_CalcPosDef(iDim) > iMax - 16) |
|
1038 |
iX = tt_PosAlt(iDim); |
|
1039 |
else |
|
1040 |
iX = tt_PosDef(iDim); |
|
1041 |
} |
|
1042 |
else |
|
1043 |
{ |
|
1044 |
iX = iMus; |
|
1045 |
if(tt_aV[cmdAlt]) |
|
1046 |
iX -= cx + tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0); |
|
1047 |
else |
|
1048 |
iX += tt_aV[cmdOff]; |
|
1049 |
} |
|
1050 |
// Prevent tip from extending past clientarea boundary |
|
1051 |
if(iX > iMax) |
|
1052 |
iX = bJmpMod ? tt_PosAlt(iDim) : iMax; |
|
1053 |
// In case of insufficient space on both sides, ensure the left/upper part |
|
1054 |
// of the tip be visible |
|
1055 |
if(iX < iScrl) |
|
1056 |
iX = bJmpMod ? tt_PosDef(iDim) : iScrl; |
|
1057 |
return iX; |
|
1058 |
} |
|
1059 |
function tt_PosDef(iDim) |
|
1060 |
{ |
|
1061 |
if(iDim) |
|
1062 |
tt_bJmpVert = tt_aV[ABOVE]; |
|
1063 |
else |
|
1064 |
tt_bJmpHorz = tt_aV[LEFT]; |
|
1065 |
return tt_CalcPosDef(iDim); |
|
1066 |
} |
|
1067 |
function tt_PosAlt(iDim) |
|
1068 |
{ |
|
1069 |
if(iDim) |
|
1070 |
tt_bJmpVert = !tt_aV[ABOVE]; |
|
1071 |
else |
|
1072 |
tt_bJmpHorz = !tt_aV[LEFT]; |
|
1073 |
return tt_CalcPosAlt(iDim); |
|
1074 |
} |
|
1075 |
function tt_CalcPosDef(iDim) |
|
1076 |
{ |
|
1077 |
return iDim ? (tt_musY + tt_aV[OFFSETY]) : (tt_musX + tt_aV[OFFSETX]); |
Auch abrufbar als: Unified diff
wzToolTip durch jQuery ToolTipster ersetzt
wzToolTip hat ein uraltes, ist in der Benutzung ausgesprochen
unkomfortabel und unflexibel und muss zwingend in jedem benutzenden
Template manuell nach dem <body>-Tag eingebunden werden. Dadurch kann
es z.B. nicht im Layout mit ausgegeben werden.