Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -2256,16 +2256,19 @@ |
2257 | 2257 | $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos ); |
2258 | 2258 | |
2259 | 2259 | /** |
2260 | | - |
2261 | | - * toolarray an array of arrays which each include the filename of |
2262 | | - * the button image (without path), the opening tag, the closing tag, |
2263 | | - * and optionally a sample text that is inserted between the two when no |
2264 | | - * selection is highlighted. |
2265 | | - * The tip text is shown when the user moves the mouse over the button. |
| 2260 | + * $toolarray is an array of arrays each of which includes the |
| 2261 | + * filename of the button image (without path), the opening |
| 2262 | + * tag, the closing tag, optionally a sample text that is |
| 2263 | + * inserted between the two when no selection is highlighted |
| 2264 | + * and an option to select which switches the automatic |
| 2265 | + * selection of inserted text (default is true, see |
| 2266 | + * mw-editbutton-image). The tip text is shown when the user |
| 2267 | + * moves the mouse over the button. |
2266 | 2268 | * |
2267 | | - * Already here are accesskeys (key), which are not used yet until someone |
2268 | | - * can figure out a way to make them work in IE. However, we should make |
2269 | | - * sure these keys are not defined on the edit page. |
| 2269 | + * Also here: accesskeys (key), which are not used yet until |
| 2270 | + * someone can figure out a way to make them work in |
| 2271 | + * IE. However, we should make sure these keys are not defined |
| 2272 | + * on the edit page. |
2270 | 2273 | */ |
2271 | 2274 | $toolarray = array( |
2272 | 2275 | array( |
— | — | @@ -2320,7 +2323,8 @@ |
2321 | 2324 | 'close' => ']]', |
2322 | 2325 | 'sample' => wfMsg( 'image_sample' ), |
2323 | 2326 | 'tip' => wfMsg( 'image_tip' ), |
2324 | | - 'key' => 'D' |
| 2327 | + 'key' => 'D', |
| 2328 | + 'select' => true |
2325 | 2329 | ) : false, |
2326 | 2330 | $imagesAvailable ? array( |
2327 | 2331 | 'image' => $wgLang->getImageFile( 'button-media' ), |
— | — | @@ -2376,6 +2380,10 @@ |
2377 | 2381 | continue; |
2378 | 2382 | } |
2379 | 2383 | |
| 2384 | + if( !isset( $tool['select'] ) ) { |
| 2385 | + $tool['select'] = true; |
| 2386 | + } |
| 2387 | + |
2380 | 2388 | $params = array( |
2381 | 2389 | $image = $wgStylePath . '/common/images/' . $tool['image'], |
2382 | 2390 | // Note that we use the tip both for the ALT tag and the TITLE tag of the image. |