Index: trunk/extensions/SemanticMediaWiki/skins/SMW_tooltip.js |
— | — | @@ -1,8 +1,5 @@ |
2 | | - |
3 | | - |
4 | 2 | addOnloadHook(smw_tooltipInit); |
5 | 3 | |
6 | | - |
7 | 4 | //these two objects needed due to the "hack" in timeline-api.js |
8 | 5 | //see the comment there |
9 | 6 | BubbleTT = new Object(); |
— | — | @@ -13,13 +10,13 @@ |
14 | 11 | |
15 | 12 | var imagePath=wgScriptPath+"/extensions/SemanticMediaWiki/skins/images/"; |
16 | 13 | |
17 | | -//dimensions of persistent tooltips |
18 | | -var SMWTT_WIDTH_P=200; |
19 | | -var SMWTT_HEIGHT_P=80; |
| 14 | +// Dimensions of persistent tooltips |
| 15 | +var SMWTT_WIDTH_P = 200; |
| 16 | +var SMWTT_HEIGHT_P = 80; |
20 | 17 | |
21 | | -//dimensions of inline tooltips |
22 | | -var SMWTT_WIDTH_I=150; |
23 | | -var SMWTT_HEIGHT_I=50; |
| 18 | +// Dimensions of inline tooltips |
| 19 | +var SMWTT_WIDTH_I = 175; |
| 20 | +var SMWTT_HEIGHT_I = 70; |
24 | 21 | |
25 | 22 | /*register events for the tooltips*/ |
26 | 23 | function smw_tooltipInit() { |
— | — | @@ -83,9 +80,11 @@ |
84 | 81 | var origin = (BubbleTT.Platform.browser.isIE) ? window.event.srcElement : e.target; |
85 | 82 | //If the anchor of the tooltip contains hmtl, the source of the event is not the anchor. |
86 | 83 | //As we need a reference to it to get the tooltip content we need to go up the dom-tree. |
87 | | - while(!(origin.className=="smwttactivepersist")){origin=origin.parentNode}; |
| 84 | + while( !( origin.className=="smwttactivepersist" ) ) { |
| 85 | + origin = origin.parentNode; |
| 86 | + }; |
88 | 87 | |
89 | | - tt = BubbleTT.createBubbleForPoint(true,origin,x,y,SMWTT_WIDTH_P,SMWTT_HEIGHT_P); |
| 88 | + tt = BubbleTT.createBubbleForPoint( true, origin, x, y, SMWTT_WIDTH_P, SMWTT_HEIGHT_P ); |
90 | 89 | all_tt.push(tt); |
91 | 90 | BubbleTT.fillBubble(tt, origin); |
92 | 91 | |
— | — | @@ -118,7 +117,7 @@ |
119 | 118 | //As we need a reference to it to get the tooltip content we need to go up the dom-tree. |
120 | 119 | while(!(origin.className=="smwttactiveinline"))origin=origin.parentNode; |
121 | 120 | var doc = origin.ownerDocument; |
122 | | - tt = BubbleTT.createBubbleForPoint(false,origin,x,y,SMWTT_WIDTH_I,SMWTT_HEIGHT_I); |
| 121 | + tt = BubbleTT.createBubbleForPoint( false, origin, x, y, SMWTT_WIDTH_I, SMWTT_HEIGHT_I ); |
123 | 122 | BubbleTT.fillBubble(tt, origin); |
124 | 123 | } |
125 | 124 | |
— | — | @@ -232,7 +231,8 @@ |
233 | 232 | } else { |
234 | 233 | elmt.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url +"', sizingMethod='crop')"; |
235 | 234 | } |
236 | | - } |
| 235 | + }; |
| 236 | + |
237 | 237 | var div = doc.createElement("div"); |
238 | 238 | div.style.width = bubbleWidth + "px"; |
239 | 239 | div.style.height = bubbleHeight + "px"; |