r63596 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63595‎ | r63596 | r63597 >
Date:12:01, 11 March 2010
Author:jojo
Status:ok
Tags:
Comment:
fix: title attr has not always been reset
Modified paths:
  • /trunk/extensions/Collection/js/bookcreator.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/js/bookcreator.js
@@ -105,7 +105,10 @@
106106 }, 300);
107107 }
108108
109 -function cancel_asyncs() {
 109+function cancel() {
 110+ if (current_link && title) {
 111+ current_link.attr('title', title);
 112+ }
110113 if (show_soon_timeout) {
111114 clearTimeout(show_soon_timeout);
112115 show_soon_timeout = null;
@@ -117,15 +120,12 @@
118121 }
119122
120123 function hide() {
121 - cancel_asyncs();
 124+ cancel();
122125 if (!visible) {
123126 return;
124127 }
125128 visible = false;
126129 popup_div.hide();
127 - if (current_link && title) {
128 - current_link.attr('title', title);
129 - }
130130 }
131131
132132 function is_inside(x, y, left, top, width, height) {
@@ -173,7 +173,7 @@
174174 if ($this.parents('.nopopups').length) {
175175 return;
176176 }
177 - $this.hover(function() { show($this); }, cancel_asyncs);
 177+ $this.hover(function() { show($this); }, cancel);
178178 });
179179 });
180180

Status & tagging log