Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js |
— | — | @@ -1164,6 +1164,10 @@ |
1165 | 1165 | titleMsg: 'edittoolbar-tool-replace-title', |
1166 | 1166 | id: 'edittoolbar-replace-dialog', |
1167 | 1167 | html: '\ |
| 1168 | + <div id="edittoolbar-replace-message">\ |
| 1169 | + <div id="edittoolbar-replace-nomatch" rel="edittoolbar-tool-replace-nomatch"></div>\ |
| 1170 | + <div id="edittoolbar-replace-success"></div>\ |
| 1171 | + </div>\ |
1168 | 1172 | <fieldset><table><tr>\ |
1169 | 1173 | <td><label for="edittoolbar-replace-search" rel="edittoolbar-tool-replace-search"></label></td>\ |
1170 | 1174 | <td><input type="text" id="edittoolbar-replace-search" /></td>\ |
— | — | @@ -1231,6 +1235,7 @@ |
1232 | 1236 | return s; |
1233 | 1237 | } |
1234 | 1238 | |
| 1239 | + $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success' ).hide(); |
1235 | 1240 | var searchStr = $j( '#edittoolbar-replace-search' ).val(); |
1236 | 1241 | var replaceStr = $j( '#edittoolbar-replace-replace' ).val(); |
1237 | 1242 | var flags = ''; |
— | — | @@ -1249,7 +1254,7 @@ |
1250 | 1255 | var text = fixOperaBrokenness( $textarea.val() ); |
1251 | 1256 | var matches = text.match( regex ); |
1252 | 1257 | if ( !matches ) { |
1253 | | - alert( gM( 'edittoolbar-tool-replace-nomatch' ) ); |
| 1258 | + $j( '#edittoolbar-replace-nomatch' ).show(); |
1254 | 1259 | } else if ( replaceAll ) { |
1255 | 1260 | // Prepare to select the last match |
1256 | 1261 | var start = text.lastIndexOf( matches[matches.length - 1] ); |
— | — | @@ -1261,7 +1266,9 @@ |
1262 | 1267 | .setSelection( start + corr, end + corr ) |
1263 | 1268 | .scrollToCaretPosition(); |
1264 | 1269 | |
1265 | | - alert( gM( 'edittoolbar-tool-replace-success', matches.length ) ); |
| 1270 | + $j( '#edittoolbar-replace-success' ) |
| 1271 | + .text( gM( 'edittoolbar-tool-replace-success', matches.length ) ) |
| 1272 | + .show(); |
1266 | 1273 | $j(this).data( 'offset', 0 ); |
1267 | 1274 | } else { |
1268 | 1275 | var start = text.indexOf( matches[0], |
— | — | @@ -1282,7 +1289,8 @@ |
1283 | 1290 | } |
1284 | 1291 | }, |
1285 | 1292 | open: function() { |
1286 | | - $j(this).data( 'offset', 0 ); |
| 1293 | + $j(this).data( 'offset', 0 ); |
| 1294 | + $j( '#edittoolbar-replace-nomatch, #edittoolbar-replace-success' ).hide(); |
1287 | 1295 | if ( !( $j(this).data( 'dialogkeypressset' ) ) ) { |
1288 | 1296 | $j(this).data( 'dialogkeypressset', true ); |
1289 | 1297 | // Execute the action associated with the first button |
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 = 39; |
| 23 | +$wgEditToolbarStyleVersion = 40; |
24 | 24 | |
25 | 25 | // Set this to true to simply override the stock toolbar for everyone |
26 | 26 | $wgEditToolbarGlobalEnable = false; |