r68415 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68414‎ | r68415 | r68416 >
Date:17:28, 22 June 2010
Author:neilk
Status:deferred
Tags:
Comment:
required field labels, pixels->ems in a few measures
Modified paths:
  • /trunk/extensions/UploadWizard/js/mw.UploadWizard.js (modified) (history)
  • /trunk/extensions/UploadWizard/styles/uploadWizard.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/styles/uploadWizard.css
@@ -350,9 +350,9 @@
351351 margin-top: 12px;
352352 }
353353 .mwe-upwiz-info-file {
354 - margin-bottom: 12px;
355 - padding-bottom: 12px;
356 - width: 660px;
 354+ margin-bottom: 1em;
 355+ padding-bottom: 1em;
 356+ width: 60em;
357357 }
358358
359359
@@ -361,13 +361,19 @@
362362 float: left;
363363 }
364364
 365+
 366+.mwe-upwiz-details-label {
 367+ width: 10em;
 368+ padding-top: 0.5em;
 369+ float: left;
 370+}
 371+
365372 .mwe-upwiz-details-input.mwe-error {
366373 float: none;
367 - margin-left: 9em;
368374 }
369375
370376 .mwe-upwiz-desc-lang-select {
371 - width: 130px;
 377+ width: 11em;
372378 font-family: sans-serif;
373379 font-size: small;
374380 }
@@ -383,9 +389,12 @@
384390 font-size: small;
385391 }
386392
 393+.mwe-upwiz-details-descriptions-add, .mwe-upwiz-details-input.mwe-error {
 394+ margin-left: 10em; /* width of mwe-upwiz-details-label */
 395+}
 396+
387397 .mwe-upwiz-details-descriptions-add {
388 - margin-bottom: 12px;
389 - margin-left: 100px;
 398+ margin-bottom: 1em;
390399 }
391400
392401 .mwe-grow-textarea, .mwe-long-textarea {
@@ -395,21 +404,15 @@
396405 }
397406
398407 .mwe-long-textarea {
399 - width: 370px;
 408+ width: 21em;
400409 }
401410
402411 fieldset .mwe-long-textarea {
403 - width: 280px;
 412+ width: 17em;
404413 }
405414
406415
407416
408 -.mwe-upwiz-details-label {
409 - width: 9em;
410 - padding-top: 0.5em;
411 - float: left;
412 -}
413 -
414417 .mwe-upwiz-details-label-input {
415418 margin-bottom: 1em;
416419 }
@@ -526,3 +529,7 @@
527530 .mwe-upwiz-thanks {
528531 margin-bottom: 2em;
529532 }
 533+
 534+.mwe-upwiz-required-field {
 535+ /* font-weight: bold; */
 536+}
Index: trunk/extensions/UploadWizard/js/mw.UploadWizard.js
@@ -1060,7 +1060,7 @@
10611061
10621062 _this.descriptionsContainerDiv =
10631063 $j( '<div class="mwe-upwiz-details-descriptions-container ui-helper-clearfix"></div>' )
1064 - .append( $j( '<div class="mwe-upwiz-details-label">' + gM( 'mwe-upwiz-desc' ) + '</div>' ) )
 1064+ .append( $j( '<div class="mwe-upwiz-details-label">' + gM( 'mwe-upwiz-desc' ) + '</div>' ).requiredFieldLabel() )
10651065 .append( _this.descriptionsDiv )
10661066 .append( $j( '<div class="mwe-upwiz-details-descriptions-add"></div>' )
10671067 .append( _this.descriptionAdder ) );
@@ -1086,7 +1086,9 @@
10871087 _this.titleContainerDiv = $j('<div class="mwe-upwiz-details-label-input ui-helper-clearfix"></div>')
10881088 .append(
10891089 _this.titleErrorDiv,
1090 - $j( '<div class="mwe-upwiz-details-label"></div>' ).append( gM( 'mwe-upwiz-title' ) ),
 1090+ $j( '<div class="mwe-upwiz-details-label"></div>' )
 1091+ .requiredFieldLabel()
 1092+ .append( gM( 'mwe-upwiz-title' ) ),
10911093 $j( '<div class="mwe-upwiz-details-input"></div>' ).append( _this.titleInput )
10921094 )
10931095
@@ -1364,7 +1366,7 @@
13651367 $j( description.div ).append(
13661368 $j.fn.removeCtrl( 'mwe-upwiz-remove-description', function() { _this.removeDescription( description ) } )
13671369 );
1368 - }
 1370+ }
13691371
13701372 $j( _this.descriptionsDiv ).append( description.div );
13711373 _this.descriptions.push( description );
@@ -3276,4 +3278,8 @@
32773279 return this.css( 'background', '#ffffff' ).attr( 'readonly', 'readonly' );
32783280 };
32793281
 3282+ $j.fn.requiredFieldLabel = function() {
 3283+ return this.addClass( 'mwe-upwiz-required-field' ).prepend(' * ');
 3284+ };
 3285+
32803286 } )( jQuery );

Status & tagging log