r65934 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65933‎ | r65934 | r65935 >
Date:02:23, 5 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Made the inline tooltip size a little bigger
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/skins/SMW_tooltip.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/skins/SMW_tooltip.js
@@ -1,8 +1,5 @@
2 -
3 -
42 addOnloadHook(smw_tooltipInit);
53
6 -
74 //these two objects needed due to the "hack" in timeline-api.js
85 //see the comment there
96 BubbleTT = new Object();
@@ -13,13 +10,13 @@
1411
1512 var imagePath=wgScriptPath+"/extensions/SemanticMediaWiki/skins/images/";
1613
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;
2017
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;
2421
2522 /*register events for the tooltips*/
2623 function smw_tooltipInit() {
@@ -83,9 +80,11 @@
8481 var origin = (BubbleTT.Platform.browser.isIE) ? window.event.srcElement : e.target;
8582 //If the anchor of the tooltip contains hmtl, the source of the event is not the anchor.
8683 //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+ };
8887
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 );
9089 all_tt.push(tt);
9190 BubbleTT.fillBubble(tt, origin);
9291
@@ -118,7 +117,7 @@
119118 //As we need a reference to it to get the tooltip content we need to go up the dom-tree.
120119 while(!(origin.className=="smwttactiveinline"))origin=origin.parentNode;
121120 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 );
123122 BubbleTT.fillBubble(tt, origin);
124123 }
125124
@@ -232,7 +231,8 @@
233232 } else {
234233 elmt.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url +"', sizingMethod='crop')";
235234 }
236 - }
 235+ };
 236+
237237 var div = doc.createElement("div");
238238 div.style.width = bubbleWidth + "px";
239239 div.style.height = bubbleHeight + "px";

Status & tagging log