Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.history.js |
— | — | @@ -48,45 +48,6 @@ |
49 | 49 | return true; |
50 | 50 | }; |
51 | 51 | |
52 | | - var fixCompare = function () { |
53 | | - var $diffList = $( '#pagehistory' ), |
54 | | - $histForm = $( '#mw-history-compare' ), |
55 | | - $buttons = $histForm.find( 'input.historysubmit' ); |
56 | | - |
57 | | - // There's only one rev, nothing to do here |
58 | | - if ( !$buttons.length ) { |
59 | | - return false; |
60 | | - } |
61 | | - var copyAttrs = ['title', 'accesskey']; |
62 | | - $buttons.each(function() { |
63 | | - var $button = $(this), |
64 | | - $compareLink= $( '<a></a>', { |
65 | | - 'class': 'compare-link', |
66 | | - 'text': $button.val() |
67 | | - }).button(); |
68 | | - $.each( copyAttrs, function( i, name ) { |
69 | | - var val = $button.attr( name ); |
70 | | - if (val) { |
71 | | - $compareLink.attr( name, val ); |
72 | | - } |
73 | | - }); |
74 | | - $button.replaceWith( $compareLink ); |
75 | | - }); |
76 | | - var updateCompare = function() { |
77 | | - var $radio = $histForm.find( 'input[type="radio"]:checked' ); |
78 | | - var genLink = mw.config.get( 'wgScript' ) |
79 | | - + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgPageName' ) ) |
80 | | - + '&diff=' + $radio.eq(0).val() |
81 | | - + '&oldid=' + $radio.eq(1).val(); |
82 | | - $( '.compare-link' ).each( function() { |
83 | | - $(this).attr('href', genLink); |
84 | | - }); |
85 | | - } |
86 | | - updateCompare(); |
87 | | - $diffList.change( updateCompare ); |
88 | | - }; |
89 | | - |
90 | 52 | $( '#pagehistory li input[name="diff"], #pagehistory li input[name="oldid"]' ).click( updateDiffRadios ); |
91 | | - fixCompare(); |
92 | 53 | updateDiffRadios(); |
93 | 54 | }); |
\ No newline at end of file |