r59843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59842‎ | r59843 | r59844 >
Date:19:40, 8 December 2009
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Made links in preview all link to # - to disable links.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.preview.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.preview.js
@@ -55,7 +55,10 @@
5656 }
5757 context.modules.preview.previousText = wikitext;
5858 context.$preview.find( '.wikiEditor-preview-loading' ).hide();
59 - context.$preview.find( '.wikiEditor-preview-contents' ).html( data.parse.text['*'] );
 59+ context.$preview.find( '.wikiEditor-preview-contents' )
 60+ .html( data.parse.text['*'] )
 61+ .find( 'a' )
 62+ .attr( 'href', '#' );
6063 },
6164 'json'
6265 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r59849UsabilityInitiative: Recombine and bump style versions for r59838, r59839, r5...catrope20:58, 8 December 2009
r59850Improves on r59843 by keeping the href information and using a click handler ...tparscal21:19, 8 December 2009

Comments

#Comment by Catrope (talk | contribs)   20:48, 8 December 2009

To preserve the href info but stop the link from working, I would suggest leaving the href attribute alone and using .click( function() { return false; } ); instead.

#Comment by Trevor Parscal (WMF) (talk | contribs)   21:20, 8 December 2009

Excellent idea! fixed in r59850

Status & tagging log