https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114152
Revision: 114152
Author: jdlrobson
Date: 2012-03-19 16:40:54 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
track last link
if I click [1] to open reference [1] and then click
[2] to open up reference [2] this shouldn't create
a toggle
follow up to r114134
Modified Paths:
--------------
trunk/extensions/MobileFrontend/javascripts/references.js
Modified: trunk/extensions/MobileFrontend/javascripts/references.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/references.js 2012-03-19
16:40:00 UTC (rev 114151)
+++ trunk/extensions/MobileFrontend/javascripts/references.js 2012-03-19
16:40:54 UTC (rev 114152)
@@ -33,7 +33,7 @@
$( '<div id="mf-references"><div></div></div>'
).hide().appendTo( document.body );
var close = function() {
$( '#mf-references' ).fadeOut(
options.animationSpeed );
- };
+ }, lastLink;
$( '<button>close</button>' ).click( close ).appendTo(
'#mf-references' );
$( '.mw-cite-backlink a' ).click( close );
@@ -43,7 +43,8 @@
data = href && href.charAt(0) === '#' ?
references[ href.substr( 1, href.length
) ] : null;
- if( !$("#mf-references").is(":visible") ) {
+ if( !$("#mf-references").is(":visible") ||
lastLink !== href) {
+ lastLink = href;
if( data ) {
html = '<h3>[' + data.label +
']</h3>' + data.html;
} else {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs