From 5c5934cdab027d73cb5c64a03937a947eba19229 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 28 Apr 2010 18:40:51 +0000 Subject: [PATCH] * Add accesskey 'b' and tooltip to the summary field of edit mode --- RELEASE-NOTES | 1 + includes/EditPage.php | 5 +++-- languages/messages/MessagesEn.php | 2 ++ maintenance/language/messageTypes.inc | 1 + maintenance/language/messages.inc | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 33a281828b..f22b887fd7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -54,6 +54,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 22647) Add category details in search results. * (bug 23276) Add hook to Special:NewPages to modify query * Add accesskey 's' and tooltip to 'Save' button at Special:Preferences +* Add accesskey 'b' and tooltip to the summary field of edit mode * (bug 20186) Allow filtering Special:Contributions for RevisionDeleted edits * (bug 22858) $wgLocalStylePath is by default set to the same value as $wgStylePath but should never point to a different domain than the site is diff --git a/includes/EditPage.php b/includes/EditPage.php index 9f3df79893..e9db1e4d74 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1485,14 +1485,15 @@ HTML * @return array An array in the format array( $label, $input ) */ function getSummaryInput($summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null) { + global $wgUser; $inputAttrs = ( is_array($inputAttrs) ? $inputAttrs : array() ) + array( 'id' => 'wpSummary', 'maxlength' => '200', 'tabindex' => '1', 'size' => 60, 'spellcheck' => 'true', - ); - + ) + $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'summary' ); + $spanLabelAttrs = ( is_array($spanLabelAttrs) ? $spanLabelAttrs : array() ) + array( 'class' => $this->missingSummary ? 'mw-summarymissed' : 'mw-summary', 'id' => "wpSummaryLabel" diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 43657f7ead..f3195a1b4a 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3295,6 +3295,7 @@ Please try again.', 'accesskey-watch' => 'w', # do not translate or duplicate this message to other languages 'accesskey-upload' => 's', # do not translate or duplicate this message to other languages 'accesskey-preferences-save' => 's', # do not translate or duplicate this message to other languages +'accesskey-summary' => 'b', # do not translate or duplicate this message to other languages # Tooltip help for the actions 'tooltip-pt-userpage' => 'Your user page', @@ -3362,6 +3363,7 @@ You can view its source', 'tooltip-rollback' => '"Rollback" reverts edit(s) to this page of the last contributor in one click', 'tooltip-undo' => '"Undo" reverts this edit and opens the edit form in preview mode. It allows adding a reason in the summary.', 'tooltip-preferences-save' => 'Save preferences', +'tooltip-summary' => 'Enter a short summary', # Stylesheets 'common.css' => '/* CSS placed here will be applied to all skins */', # only translate this message to other languages if you have to change it diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 7006fb76a4..239abb829c 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -70,6 +70,7 @@ $wgIgnoredMessages = array( 'accesskey-watch', 'accesskey-upload', 'accesskey-preferences-save', + 'accesskey-summary', 'addsection', 'talkpageheader', 'anonnotice', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index c57abc5e26..89c36886b0 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2263,6 +2263,7 @@ $wgMessageStructure = array( 'accesskey-watch', 'accesskey-upload', 'accesskey-preferences-save', + 'accesskey-summary', ), 'tooltips' => array( 'tooltip-pt-userpage', @@ -2330,6 +2331,7 @@ $wgMessageStructure = array( 'tooltip-rollback', 'tooltip-undo', 'tooltip-preferences-save', + 'tooltip-summary', ), 'stylesheets' => array( 'common.css', -- 2.20.1