Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.hooks.php |
— | — | @@ -120,6 +120,7 @@ |
121 | 121 | 'edittoolbar-tool-replace-close', |
122 | 122 | 'edittoolbar-tool-replace-nomatch', |
123 | 123 | 'edittoolbar-tool-replace-success', |
| 124 | + 'edittoolbar-tool-replace-emptysearch', |
124 | 125 | /* Special Characters Section */ |
125 | 126 | 'edittoolbar-section-characters', |
126 | 127 | 'edittoolbar-characters-page-latin', |
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js |
— | — | @@ -1084,10 +1084,10 @@ |
1085 | 1085 | </tr></table><table><tr>\ |
1086 | 1086 | <td class="label"><label for="edittoolbar-table-dimensions-columns"\ |
1087 | 1087 | rel="edittoolbar-tool-table-dimensions-columns"></label></td>\ |
1088 | | - <td><input type="text" id="edittoolbar-table-dimensions-columns" size="2" /></td>\ |
| 1088 | + <td><input type="text" id="edittoolbar-table-dimensions-columns" size="3" /></td>\ |
1089 | 1089 | <td class="label"><label for="edittoolbar-table-dimensions-rows"\ |
1090 | 1090 | rel="edittoolbar-tool-table-dimensions-rows"></label></td>\ |
1091 | | - <td><input type="text" id="edittoolbar-table-dimensions-rows" size="2" /></td>\ |
| 1091 | + <td><input type="text" id="edittoolbar-table-dimensions-rows" size="3" /></td>\ |
1092 | 1092 | </tr></table></fieldset>', |
1093 | 1093 | init: function() { |
1094 | 1094 | $j(this).find( '[rel]' ).each( function() { |
— | — | @@ -1184,6 +1184,7 @@ |
1185 | 1185 | <div id="edittoolbar-replace-message">\ |
1186 | 1186 | <div id="edittoolbar-replace-nomatch" rel="edittoolbar-tool-replace-nomatch"></div>\ |
1187 | 1187 | <div id="edittoolbar-replace-success"></div>\ |
| 1188 | + <div id="edittoolbar-replace-emptysearch" rel="edittoolbar-tool-replace-emptysearch"></div>\ |
1188 | 1189 | </div>\ |
1189 | 1190 | <fieldset><table><tr>\ |
1190 | 1191 | <td><label for="edittoolbar-replace-search" rel="edittoolbar-tool-replace-search"></label></td>\ |
— | — | @@ -1214,8 +1215,12 @@ |
1215 | 1216 | |
1216 | 1217 | // TODO: Find a cleaner way to share this function |
1217 | 1218 | $j(this).data( 'replaceCallback', function( mode ) { |
1218 | | - $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success' ).hide(); |
| 1219 | + $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success, #edittoolbar-replace-emptysearch' ).hide(); |
1219 | 1220 | var searchStr = $j( '#edittoolbar-replace-search' ).val(); |
| 1221 | + if ( searchStr == '' ) { |
| 1222 | + $j( '#edittoolbar-replace-emptysearch' ).show(); |
| 1223 | + return; |
| 1224 | + } |
1220 | 1225 | var replaceStr = $j( '#edittoolbar-replace-replace' ).val(); |
1221 | 1226 | var flags = ''; |
1222 | 1227 | var matchCase = $j( '#edittoolbar-replace-case' ).is( ':checked' ); |
— | — | @@ -1288,7 +1293,7 @@ |
1289 | 1294 | open: function() { |
1290 | 1295 | $j(this).data( 'offset', 0 ); |
1291 | 1296 | $j( '#edittoolbar-replace-search' ).focus(); |
1292 | | - $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success' ).hide(); |
| 1297 | + $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success, #edittoolbar-replace-emptysearch' ).hide(); |
1293 | 1298 | if ( !( $j(this).data( 'dialogkeypressset' ) ) ) { |
1294 | 1299 | $j(this).data( 'dialogkeypressset', true ); |
1295 | 1300 | // Execute the action associated with the first button |
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.i18n.php |
— | — | @@ -114,6 +114,7 @@ |
115 | 115 | 'edittoolbar-tool-replace-close' => 'Cancel', |
116 | 116 | 'edittoolbar-tool-replace-nomatch' => 'Your search did not match anything.', |
117 | 117 | 'edittoolbar-tool-replace-success' => '$1 replacement(s) made.', |
| 118 | + 'edittoolbar-tool-replace-emptysearch' => 'You did not enter anything to search for.', |
118 | 119 | /* Special characters Section */ |
119 | 120 | 'edittoolbar-section-characters' => 'Special characters', |
120 | 121 | 'edittoolbar-characters-page-latin' => 'Latin', |
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | /* Configuration */ |
21 | 21 | |
22 | 22 | // Bump the version number every time you change any of the .css/.js files |
23 | | -$wgEditToolbarStyleVersion = 47; |
| 23 | +$wgEditToolbarStyleVersion = 48; |
24 | 24 | |
25 | 25 | // Set this to true to simply override the stock toolbar for everyone |
26 | 26 | $wgEditToolbarGlobalEnable = false; |