Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -77,6 +77,8 @@ |
78 | 78 | td.mw-label { vertical-align: top; width: 20%; } |
79 | 79 | td.mw-submit { white-space: nowrap; } |
80 | 80 | |
| 81 | +table.mw-htmlform-nolabel td.mw-label { width: 0 !important; } |
| 82 | + |
81 | 83 | /** |
82 | 84 | * Image captions |
83 | 85 | */ |
Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -271,6 +271,7 @@ |
272 | 272 | function displaySection( $fields ) { |
273 | 273 | $tableHtml = ''; |
274 | 274 | $subsectionHtml = ''; |
| 275 | + $hasLeftColumn = false; |
275 | 276 | |
276 | 277 | foreach( $fields as $key => $value ) { |
277 | 278 | if ( is_object( $value ) ) { |
— | — | @@ -278,6 +279,9 @@ |
279 | 280 | ? $this->mFieldData[$key] |
280 | 281 | : $value->getDefault(); |
281 | 282 | $tableHtml .= $value->getTableRow( $v ); |
| 283 | + |
| 284 | + if ($value->getLabel() != ' ') |
| 285 | + $hasLeftColumn = true; |
282 | 286 | } elseif ( is_array( $value ) ) { |
283 | 287 | $section = $this->displaySection( $value ); |
284 | 288 | $legend = wfMsg( "{$this->mMessagePrefix}-$key" ); |
— | — | @@ -285,8 +289,13 @@ |
286 | 290 | } |
287 | 291 | } |
288 | 292 | |
289 | | - $tableHtml = "<table><tbody>\n$tableHtml\n</tbody></table>\n"; |
| 293 | + $classes = array(); |
| 294 | + if (!$hasLeftColumn) // Avoid strange spacing when no labels exist |
| 295 | + $classes[] = 'mw-htmlform-nolabel'; |
| 296 | + $classes = implode( ' ', $classes ); |
290 | 297 | |
| 298 | + $tableHtml = "<table class='$classes'><tbody>\n$tableHtml\n</tbody></table>\n"; |
| 299 | + |
291 | 300 | return $subsectionHtml . "\n" . $tableHtml; |
292 | 301 | } |
293 | 302 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1477,7 +1477,7 @@ |
1478 | 1478 | * to ensure that client-side caches don't keep obsolete copies of global |
1479 | 1479 | * styles. |
1480 | 1480 | */ |
1481 | | -$wgStyleVersion = '213'; |
| 1481 | +$wgStyleVersion = '214'; |
1482 | 1482 | |
1483 | 1483 | |
1484 | 1484 | # Server-side caching: |