r63553 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63552‎ | r63553 | r63554 >
Date:14:02, 10 March 2010
Author:jojo
Status:ok
Tags:
Comment:
disable default browser tooltip
Modified paths:
  • /trunk/extensions/Collection/js/bookcreator.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/js/bookcreator.js
@@ -50,6 +50,8 @@
5151 var show_soon_timeout = null;
5252 var get_data_xhr = null;
5353 var script_url = wgServer + ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
 54+var current_link = null;
 55+var title = null;
5456
5557 function createDiv() {
5658 addremove_link = $('<a href="javascript:void(0)" />');
@@ -74,7 +76,9 @@
7577 if (visible) {
7678 return;
7779 }
78 - var title = link.attr('title');
 80+ current_link = link;
 81+ title = link.attr('title');
 82+ link.attr('title', ''); // disable default browser tooltip
7983 show_soon_timeout = setTimeout(function() {
8084 get_data_xhr = $.post(script_url, {
8185 'action': 'ajax',
@@ -113,6 +117,9 @@
114118 }
115119 visible = false;
116120 popup_div.hide();
 121+ if (current_link && title) {
 122+ current_link.attr('title', title);
 123+ }
117124 }
118125
119126 function is_inside(x, y, left, top, width, height) {

Status & tagging log