Index: trunk/extensions/Collection/js/bookcreator.js |
— | — | @@ -50,6 +50,8 @@ |
51 | 51 | var show_soon_timeout = null; |
52 | 52 | var get_data_xhr = null; |
53 | 53 | var script_url = wgServer + ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript); |
| 54 | +var current_link = null; |
| 55 | +var title = null; |
54 | 56 | |
55 | 57 | function createDiv() { |
56 | 58 | addremove_link = $('<a href="javascript:void(0)" />'); |
— | — | @@ -74,7 +76,9 @@ |
75 | 77 | if (visible) { |
76 | 78 | return; |
77 | 79 | } |
78 | | - var title = link.attr('title'); |
| 80 | + current_link = link; |
| 81 | + title = link.attr('title'); |
| 82 | + link.attr('title', ''); // disable default browser tooltip |
79 | 83 | show_soon_timeout = setTimeout(function() { |
80 | 84 | get_data_xhr = $.post(script_url, { |
81 | 85 | 'action': 'ajax', |
— | — | @@ -113,6 +117,9 @@ |
114 | 118 | } |
115 | 119 | visible = false; |
116 | 120 | popup_div.hide(); |
| 121 | + if (current_link && title) { |
| 122 | + current_link.attr('title', title); |
| 123 | + } |
117 | 124 | } |
118 | 125 | |
119 | 126 | function is_inside(x, y, left, top, width, height) { |