Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -305,7 +305,7 @@ |
306 | 306 | $wgAvailableRights[] = 'stablesettings'; |
307 | 307 | |
308 | 308 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
309 | | -$wgFlaggedRevStyleVersion = 67; |
| 309 | +$wgFlaggedRevStyleVersion = 68; |
310 | 310 | |
311 | 311 | $wgExtensionFunctions[] = 'efLoadFlaggedRevs'; |
312 | 312 | |
Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -54,7 +54,9 @@ |
55 | 55 | 'revreview-diff-toggle-hide' => '(hide changes)', |
56 | 56 | 'revreview-diff-toggle-title' => 'Toggle display of pending changes to the published version', |
57 | 57 | 'revreview-log-toggle-show' => '(show stability log)', |
| 58 | + 'revreview-log-toggle-hide' => '(hide stability log)', |
58 | 59 | 'revreview-log-details-show' => '(show details)', |
| 60 | + 'revreview-log-details-hide' => '(hide details)', |
59 | 61 | 'review-diff2stable' => 'View all pending changes', |
60 | 62 | 'review-logentry-app' => 'reviewed a version of [[$1]]', |
61 | 63 | 'review-logentry-dis' => 'deprecated a version of [[$1]]', |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php |
— | — | @@ -336,14 +336,25 @@ |
337 | 337 | * Generates (show/hide) JS toggle HTML |
338 | 338 | * @returns string |
339 | 339 | */ |
340 | | - public static function logToggle( $msg ) { |
| 340 | + public static function logToggle() { |
341 | 341 | return '<a id="mw-fr-logtoggle" class="flaggedrevs_toggle" style="display:none;"' . |
342 | 342 | ' onclick="FlaggedRevs.toggleLog()" title="' . |
343 | | - wfMsgHtml( $msg ) . '" >' . |
344 | | - wfMsgHtml( $msg ) . '</a>'; |
| 343 | + wfMsgHtml( 'revreview-log-toggle-show' ) . '" >' . |
| 344 | + wfMsgHtml( 'revreview-log-toggle-show' ) . '</a>'; |
345 | 345 | } |
346 | | - |
| 346 | + |
347 | 347 | /** |
| 348 | + * Generates (show/hide) JS toggle HTML |
| 349 | + * @returns string |
| 350 | + */ |
| 351 | + public static function logDetailsToggle() { |
| 352 | + return '<a id="mw-fr-logtoggle" class="flaggedrevs_toggle" style="display:none;"' . |
| 353 | + ' onclick="FlaggedRevs.toggleLogDetails()" title="' . |
| 354 | + wfMsgHtml( 'revreview-log-details-show' ) . '" >' . |
| 355 | + wfMsgHtml( 'revreview-log-details-show' ) . '</a>'; |
| 356 | + } |
| 357 | + |
| 358 | + /** |
348 | 359 | * @param array $flags, selected flags |
349 | 360 | * @param array $config, page config |
350 | 361 | * @param bool $disabled, form disabled |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -63,10 +63,14 @@ |
64 | 64 | } |
65 | 65 | # Set basic messages |
66 | 66 | $msgs = (object) array( |
67 | | - 'revreviewDiffToggleShow' => wfMsgHtml( 'revreview-diff-toggle-show' ), |
68 | | - 'revreviewDiffToggleHide' => wfMsgHtml( 'revreview-diff-toggle-hide' ), |
69 | | - 'revreviewToggleShow' => wfMsgHtml( 'revreview-toggle-show'), |
70 | | - 'revreviewToggleHide' => wfMsgHtml( 'revreview-toggle-hide') |
| 67 | + 'diffToggleShow' => wfMsgHtml( 'revreview-diff-toggle-show' ), |
| 68 | + 'diffToggleHide' => wfMsgHtml( 'revreview-diff-toggle-hide' ), |
| 69 | + 'logToggleShow' => wfMsgHtml( 'revreview-log-toggle-show'), |
| 70 | + 'logToggleHide' => wfMsgHtml( 'revreview-log-toggle-hide'), |
| 71 | + 'logDetailsShow' => wfMsgHtml( 'revreview-log-details-show'), |
| 72 | + 'logDetailsHide' => wfMsgHtml( 'revreview-log-details-hide'), |
| 73 | + 'toggleShow' => wfMsgHtml( 'revreview-toggle-show'), |
| 74 | + 'toggleHide' => wfMsgHtml( 'revreview-toggle-hide') |
71 | 75 | ); |
72 | 76 | $head .= "\n<script type=\"{$wgJsMimeType}\">" . |
73 | 77 | "FlaggedRevs.messages = " . Xml::encodeJsVar( $msgs ) . ";</script>\n"; |
Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.js |
— | — | @@ -4,10 +4,14 @@ |
5 | 5 | |
6 | 6 | var FlaggedRevs = { |
7 | 7 | 'messages': { |
8 | | - 'revreviewDiffToggleShow': '(show)', |
9 | | - 'revreviewDiffToggleHide': '(hide)', |
10 | | - 'revreviewToggleShow' : '(+)', |
11 | | - 'revreviewToggleHide' : '(-)' |
| 8 | + 'diffToggleShow' : '(show changes)', |
| 9 | + 'diffToggleHide' : '(hide changes)', |
| 10 | + 'logToggleShow' : '(show log)', |
| 11 | + 'logToggleHide' : '(hide log)', |
| 12 | + 'logDetailsShow' : '(show details)', |
| 13 | + 'logDetailsHide' : '(hide details)', |
| 14 | + 'toggleShow' : '(+)', |
| 15 | + 'toggleHide' : '(-)' |
12 | 16 | }, |
13 | 17 | /* Hide rating/diff clutter */ |
14 | 18 | 'enableShowhide': function() { |
— | — | @@ -45,10 +49,10 @@ |
46 | 50 | if( !toggle ) return; |
47 | 51 | if( ratings.style.display == 'none' ) { |
48 | 52 | ratings.style.display = 'inline'; |
49 | | - toggle.innerHTML = this.messages.revreviewToggleHide; |
| 53 | + toggle.innerHTML = this.messages.toggleHide; |
50 | 54 | } else { |
51 | 55 | ratings.style.display = 'none'; |
52 | | - toggle.innerHTML = this.messages.revreviewToggleShow; |
| 56 | + toggle.innerHTML = this.messages.toggleShow; |
53 | 57 | } |
54 | 58 | }, |
55 | 59 | |
— | — | @@ -60,10 +64,10 @@ |
61 | 65 | if( !toggle ) return; |
62 | 66 | if( diff.style.display == 'none' ) { |
63 | 67 | diff.style.display = 'inline'; |
64 | | - toggle.innerHTML = this.messages.revreviewDiffToggleHide; |
| 68 | + toggle.innerHTML = this.messages.diffToggleHide; |
65 | 69 | } else { |
66 | 70 | diff.style.display = 'none'; |
67 | | - toggle.innerHTML = this.messages.revreviewDiffToggleShow; |
| 71 | + toggle.innerHTML = this.messages.diffToggleShow; |
68 | 72 | } |
69 | 73 | }, |
70 | 74 | |
— | — | @@ -75,8 +79,26 @@ |
76 | 80 | if( !toggle ) return; |
77 | 81 | if( log.style.display == 'none' ) { |
78 | 82 | log.style.display = 'inline'; |
79 | | - toggle.innerHTML = ''; |
| 83 | + toggle.innerHTML = this.messages.logToggleHide; |
| 84 | + } else { |
| 85 | + log.style.display = 'none'; |
| 86 | + toggle.innerHTML = this.messages.logToggleShow; |
80 | 87 | } |
| 88 | + }, |
| 89 | + |
| 90 | + /* Toggles log excerpts */ |
| 91 | + 'toggleLogDetails': function() { |
| 92 | + var log = document.getElementById('mw-fr-logexcerpt'); |
| 93 | + if( !log ) return; |
| 94 | + var toggle = document.getElementById('mw-fr-logtoggle'); |
| 95 | + if( !toggle ) return; |
| 96 | + if( log.style.display == 'none' ) { |
| 97 | + log.style.display = 'inline'; |
| 98 | + toggle.innerHTML = this.messages.logDetailsHide; |
| 99 | + } else { |
| 100 | + log.style.display = 'none'; |
| 101 | + toggle.innerHTML = this.messages.logDetailsShow; |
| 102 | + } |
81 | 103 | } |
82 | 104 | }; |
83 | 105 | |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -859,12 +859,12 @@ |
860 | 860 | # Only for pages manually made to be stable... |
861 | 861 | if ( $this->article->isPageLocked() ) { |
862 | 862 | $s = wfMsgExt( 'revreview-locked', 'parseinline' ); |
863 | | - $s .= ' ' . FlaggedRevsXML::logToggle('revreview-log-details-show'); |
| 863 | + $s .= ' ' . FlaggedRevsXML::logDetailsToggle(); |
864 | 864 | $s .= FlaggedRevsXML::stabilityLogExcerpt( $this->article ); |
865 | 865 | # ...or unstable |
866 | 866 | } elseif ( $this->article->isPageUnlocked() ) { |
867 | 867 | $s = wfMsgExt( 'revreview-unlocked', 'parseinline' ); |
868 | | - $s .= ' ' . FlaggedRevsXML::logToggle('revreview-log-details-show'); |
| 868 | + $s .= ' ' . FlaggedRevsXML::logDetailsToggle(); |
869 | 869 | $s .= FlaggedRevsXML::stabilityLogExcerpt( $this->article ); |
870 | 870 | } |
871 | 871 | return $s; |