installer: Open skin screenshot in new window
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 18 Apr 2018 01:59:36 +0000 (02:59 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 18 Apr 2018 01:59:36 +0000 (02:59 +0100)
By default the plain links hijack the current window, thus
causing the user to lose their current changes to the installer
form. It may also cause confusion as to how to get back.

Absence a modal way to view the image, at least it should default
to opening the image in a new tab.

Change-Id: I4a25f1f51e04a33f1f359f12af25b8e1db5fbd20

includes/installer/WebInstallerOptions.php

index c62eb65..2027c97 100644 (file)
@@ -331,7 +331,7 @@ class WebInstallerOptions extends WebInstallerPage {
                        foreach ( $screenshots as $shot ) {
                                $links[] = Html::element(
                                        'a',
-                                       [ 'href' => $shot ],
+                                       [ 'href' => $shot, 'target' => '_blank' ],
                                        $wgLang->formatNum( $counter++ )
                                );
                        }
@@ -341,7 +341,7 @@ class WebInstallerOptions extends WebInstallerPage {
                } else {
                        $link = Html::element(
                                'a',
-                               [ 'href' => $screenshots[0] ],
+                               [ 'href' => $screenshots[0], 'target' => '_blank' ],
                                wfMessage( 'config-screenshot' )->text()
                        );
                        return wfMessage( 'config-skins-screenshot', $name )->rawParams( $link )->escaped();