r64497 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64496‎ | r64497 | r64498 >
Date:19:48, 1 April 2010
Author:neilk
Status:deferred
Tags:
Comment:
css for the front page -- aligned indicators, etc.
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/css/uploadWizard.css (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/mw.UploadWizard.js (modified) (history)
  • /branches/js2-work/phase3/js/specialUploadWizardPage.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/mw.UploadWizard.js
@@ -128,6 +128,9 @@
129129 var _this = this;
130130
131131 _this.progressBarDiv.progressbar( 'value', parseInt( fraction * 100 ) );
 132+ if (fraction > 0.5) {
 133+ debugger;
 134+ }
132135
133136 var remainingTime;
134137 if (_this.beginTime == null) {
@@ -534,13 +537,13 @@
535538 )
536539 .append( _this.filenameCtrl ).get( 0 );
537540
538 - _this.progressMessage = $j('<span class="mwe-upwiz-status-message" style="display: none"></span>').get(0);
 541+ _this.progressMessage = $j('<span class="mwe-upwiz-status-message mwe-upwiz-file-indicator" style="display: none"></span>').get(0);
539542
540543
541 - _this.errorDiv = $j('<div class="mwe-upwiz-upload-error" style="display: none;"></div>').get(0);
 544+ _this.errorDiv = $j('<div class="mwe-upwiz-upload-error mwe-upwiz-file-indicator" style="display: none;"></div>').get(0);
542545
543 - _this.removeCtrl = $j( '<a title="' + gM( 'mwe-upwiz-remove-upload' )
544 - + '" href="#" class="mwe-upwiz-remove">x</a>' )
 546+ _this.removeCtrl = $j( '<div class="mwe-upwiz-file-indicator"><a title="' + gM( 'mwe-upwiz-remove-upload' )
 547+ + '" href="#" class="mwe-upwiz-remove">x</a></div>' )
545548 .click( function() { _this.upload.remove() } )
546549 .hide()
547550 .get( 0 );
@@ -553,7 +556,7 @@
554557
555558 // XXX evil hardcoded
556559 // we don't really need filesdiv if we do it this way?
557 - $j( _this.div ).insertBefore( '#mwe-upwiz-add-file-container' ); // append( _this.div );
 560+ $j( _this.div ).insertBefore( '#mwe-upwiz-upload-ctrls' ); // append( _this.div );
558561
559562 // _this.progressBar = ( no progress bar for individual uploads yet )
560563 // add a details thing to details
@@ -611,7 +614,7 @@
612615 showTransported: function() {
613616 var _this = this;
614617 $j( _this.progressMessage ).removeClass( 'mwe-upwiz-status-progress' )
615 - .addClass( 'mwe-upwiz-status-transported' )
 618+ .addClass( 'mwe-upwiz-status-completed' )
616619 .html( gM( 'mwe-upwiz-transported' ) );
617620 },
618621
@@ -1757,10 +1760,16 @@
17581761 + '<div id="mwe-upwiz-intro">' + gM('mwe-upwiz-intro') + '</div>'
17591762 + '<div id="mwe-upwiz-files">'
17601763 + '<div class="shim" style="height: 120px"></div>'
1761 - + '<div id="mwe-upwiz-add-file-container" class="mwe-upwiz-add-files-0"><a id="mwe-upwiz-add-file">' + gM("mwe-upwiz-add-file-0") + '</a></div>'
 1764+ + '<div id="mwe-upwiz-upload-ctrls" class="mwe-upwiz-file">'
 1765+ + '<div id="mwe-upwiz-add-file-container" class="mwe-upwiz-add-files-0">'
 1766+ + '<a id="mwe-upwiz-add-file">' + gM("mwe-upwiz-add-file-0") + '</a>'
 1767+ + '</div>'
 1768+ + '<div id="proceed" class="mwe-upwiz-file-indicator" style="display: none;">'
 1769+ + '<button id="mwe-upwiz-upload-ctrl" disabled="disabled">' + gM("mwe-upwiz-upload") + '</button>'
 1770+ + '</div>'
 1771+ + '</div>'
17621772 + '<div class="clearShim"></div>'
17631773 + '</div>'
1764 - + '<div class="proceed"><button id="mwe-upwiz-upload-ctrl" disabled="disabled">' + gM("mwe-upwiz-upload") + '</button></div>'
17651774 + '<div id="mwe-upwiz-progress"></div>'
17661775 + '<div style="clear: left;"></div>'
17671776 + '</div>'
@@ -2061,12 +2070,16 @@
20622071
20632072 if ( _this.uploads.length ) {
20642073 $j( '#mwe-upwiz-upload-ctrl' ).removeAttr( 'disabled' );
 2074+ $j( '#proceed' ).show();
20652075 $j( '#mwe-upwiz-add-file' ).html( gM( 'mwe-upwiz-add-file-n' ) );
20662076 $j( '#mwe-upwiz-add-file-container' ).removeClass('mwe-upwiz-add-files-0');
 2077+ $j( '#mwe-upwiz-add-file-container' ).addClass('mwe-upwiz-add-files-n');
20672078 } else {
20682079 $j( '#mwe-upwiz-upload-ctrl' ).attr( 'disabled', 'disabled' );
 2080+ $j( '#proceed' ).hide();
20692081 $j( '#mwe-upwiz-add-file' ).html( gM( 'mwe-upwiz-add-file-0' ) );
20702082 $j( '#mwe-upwiz-add-file-container' ).addClass('mwe-upwiz-add-files-0');
 2083+ $j( '#mwe-upwiz-add-file-container' ).removeClass('mwe-upwiz-add-files-n');
20712084 }
20722085
20732086 if ( _this.uploads.length < _this.maxUploads ) {
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/css/uploadWizard.css
@@ -82,9 +82,8 @@
8383 padding: 1em;
8484 }
8585
86 -
8786 .mwe-upwiz-add-files-0 {
88 - margin-top: 40px;
 87+ margin-top: 20px;
8988 text-align: center;
9089 font-size: 16px;
9190 }
@@ -122,16 +121,36 @@
123122 z-index: 2;
124123 }
125124
 125+.mwe-upwiz-file.filled, #mwe-upwiz-upload-ctrls {
 126+ padding: 4px;
 127+}
 128+
126129 .mwe-upwiz-file.filled {
127 - padding: 4px;
128130 height: 24px;
 131+ border-bottom: 1px solid #e0e0e0;
129132 }
130133
131 -.mwe-upwiz-visible-file {
 134+.mwe-upwiz-file-indicator {
 135+ float: left;
 136+ width: 92px;
 137+ margin-left: 8px;
 138+ text-align: center;
 139+}
 140+
 141+.mwe-upwiz-add-files-n {
 142+ float: left;
 143+ margin-top: 5px;
 144+ margin-left: 4px;
 145+}
 146+
 147+#mwe-upwiz-add-file-container.mwe-upwiz-add-files-n, .mwe-upwiz-visible-file {
132148 width: 300px;
133149 height: 18px;
134150 padding-left: 5px;
135151 float: left;
 152+}
 153+
 154+.mwe-upwiz-visible-file {
136155 white-space: nowrap;
137156 overflow: hidden;
138157
@@ -160,14 +179,27 @@
161180
162181
163182 #mwe-upwiz-files {
164 - /* margin-left: 100px; */
 183+ margin-top: 20px;
165184 }
166185
 186+.mwe-upwiz-file {
 187+ margin-left: 50px;
 188+ width: 410px;
 189+}
167190
 191+#mwe-upwiz-upload-ctrls {
 192+ margin-top: 15px;
 193+
 194+}
 195+
 196+#mwe-upwiz-add-file-container {
 197+ /* empty; this changes a lot */
 198+}
 199+
168200 .mwe-upwiz-remove {
169 - margin-left: 5px;
170201 padding: 5px;
171202 cursor: pointer;
 203+ text-align: center;
172204 }
173205
174206 a.mwe-upwiz-remove:link,
@@ -208,6 +240,11 @@
209241 color: #009900;
210242 }
211243
 244+.mwe-upwiz-progress-bar {
 245+ margin-left: 50px;
 246+}
 247+
 248+
212249 .mwe-upwiz-upload-warning {
213250 background: #ffffe0;
214251 }
@@ -239,8 +276,11 @@
240277 }
241278
242279
 280+/* XXX this has to be 'centered' beneath the 'x's -- this is about right for english but we need a more
 281+ robust layout strategy for i18n */
243282 .proceed {
244283 text-align: right;
 284+ width: 410px;
245285 }
246286
247287 .shim {
Index: branches/js2-work/phase3/js/specialUploadWizardPage.js
@@ -4,7 +4,7 @@
55 */
66
77 mw.ready( function() {
8 - mw.load( 'UploadWizard.UploadWizardTest', function () {
 8+ mw.load( 'UploadWizard.UploadWizard', function () {
99
1010 mw.setConfig( 'debug', true );
1111

Status & tagging log