r57047 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57046‎ | r57047 | r57048 >
Date:09:56, 29 September 2009
Author:catrope
Status:ok
Tags:
Comment:
EditToolbar: (bug 20864) When opening a dialog, focus the first textbox in it
Modified paths:
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js
@@ -1012,6 +1012,9 @@
10131013 }
10141014 },
10151015 open: function() {
 1016+ $j( '#edittoolbar-link-int-target, #edittoolbar-link-ext-target' )
 1017+ .filter( ':visible' )
 1018+ .focus();
10161019 // Pre-fill the text fields based on the current selection
10171020 var selection = $j(this).data( 'context' ).$textarea.getSelection();
10181021 $j( '#edittoolbar-link-dialog-tab-int' ).data( 'whitespace', [ '', '' ] );
@@ -1157,6 +1160,7 @@
11581161 }
11591162 },
11601163 open: function() {
 1164+ $j( '#edittoolbar-table-dimensions-columns' ).focus();
11611165 if ( !( $j(this).data( 'dialogkeypressset' ) ) ) {
11621166 $j(this).data( 'dialogkeypressset', true );
11631167 // Execute the action associated with the first button
@@ -1302,6 +1306,7 @@
13031307 },
13041308 open: function() {
13051309 $j(this).data( 'offset', 0 );
 1310+ $j( '#edittoolbar-replace-search' ).focus();
13061311 $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success' ).hide();
13071312 if ( !( $j(this).data( 'dialogkeypressset' ) ) ) {
13081313 $j(this).data( 'dialogkeypressset', true );
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php
@@ -19,7 +19,7 @@
2020 /* Configuration */
2121
2222 // Bump the version number every time you change any of the .css/.js files
23 -$wgEditToolbarStyleVersion = 42;
 23+$wgEditToolbarStyleVersion = 43;
2424
2525 // Set this to true to simply override the stock toolbar for everyone
2626 $wgEditToolbarGlobalEnable = false;

Status & tagging log