Add continue editing link also to js and css pages
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 20 Sep 2013 17:16:52 +0000 (19:16 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 16 Nov 2013 13:20:21 +0000 (13:20 +0000)
Wrap link in a span with class

Change-Id: I3cbbf9c2ae23672c0939261f2675273f5923e5f9

includes/EditPage.php

index 68691c5..9a68ab3 100644 (file)
@@ -3155,6 +3155,10 @@ HTML
                                return $previewHTML;
                        }
 
+                       # provide a anchor link to the editform
+                       $continueEditing = '<span class="mw-continue-editing">' .
+                               '[[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' .
+                               wfMessage( 'continue-editing' )->text() . ']]</span>';
                        if ( $this->mTriedSave && !$this->mTokenOk ) {
                                if ( $this->mTokenOkExceptSuffix ) {
                                        $note = wfMessage( 'token_suffix_mismatch' )->plain();
@@ -3165,8 +3169,7 @@ HTML
                        } elseif ( $this->incompleteForm ) {
                                $note = wfMessage( 'edit_form_incomplete' )->plain();
                        } else {
-                               $note = wfMessage( 'previewnote' )->plain() .
-                                       ' [[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' . wfMessage( 'continue-editing' )->text() . ']]';
+                               $note = wfMessage( 'previewnote' )->plain() . ' ' . $continueEditing;
                        }
 
                        $parserOptions = $this->mArticle->makeParserOptions( $this->mArticle->getContext() );
@@ -3195,7 +3198,9 @@ HTML
                                # Used messages to make sure grep find them:
                                # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
                                if ( $level && $format ) {
-                                       $note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text() . "</div>";
+                                       $note = "<div id='mw-{$level}{$format}preview'>" .
+                                               wfMessage( "{$level}{$format}preview" )->text() .
+                                               ' ' . $continueEditing . "</div>";
                                }
                        }