Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/mw.UploadWizard.js |
— | — | @@ -128,6 +128,9 @@ |
129 | 129 | var _this = this; |
130 | 130 | |
131 | 131 | _this.progressBarDiv.progressbar( 'value', parseInt( fraction * 100 ) ); |
| 132 | + if (fraction > 0.5) { |
| 133 | + debugger; |
| 134 | + } |
132 | 135 | |
133 | 136 | var remainingTime; |
134 | 137 | if (_this.beginTime == null) { |
— | — | @@ -534,13 +537,13 @@ |
535 | 538 | ) |
536 | 539 | .append( _this.filenameCtrl ).get( 0 ); |
537 | 540 | |
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); |
539 | 542 | |
540 | 543 | |
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); |
542 | 545 | |
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>' ) |
545 | 548 | .click( function() { _this.upload.remove() } ) |
546 | 549 | .hide() |
547 | 550 | .get( 0 ); |
— | — | @@ -553,7 +556,7 @@ |
554 | 557 | |
555 | 558 | // XXX evil hardcoded |
556 | 559 | // 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 ); |
558 | 561 | |
559 | 562 | // _this.progressBar = ( no progress bar for individual uploads yet ) |
560 | 563 | // add a details thing to details |
— | — | @@ -611,7 +614,7 @@ |
612 | 615 | showTransported: function() { |
613 | 616 | var _this = this; |
614 | 617 | $j( _this.progressMessage ).removeClass( 'mwe-upwiz-status-progress' ) |
615 | | - .addClass( 'mwe-upwiz-status-transported' ) |
| 618 | + .addClass( 'mwe-upwiz-status-completed' ) |
616 | 619 | .html( gM( 'mwe-upwiz-transported' ) ); |
617 | 620 | }, |
618 | 621 | |
— | — | @@ -1757,10 +1760,16 @@ |
1758 | 1761 | + '<div id="mwe-upwiz-intro">' + gM('mwe-upwiz-intro') + '</div>' |
1759 | 1762 | + '<div id="mwe-upwiz-files">' |
1760 | 1763 | + '<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>' |
1762 | 1772 | + '<div class="clearShim"></div>' |
1763 | 1773 | + '</div>' |
1764 | | - + '<div class="proceed"><button id="mwe-upwiz-upload-ctrl" disabled="disabled">' + gM("mwe-upwiz-upload") + '</button></div>' |
1765 | 1774 | + '<div id="mwe-upwiz-progress"></div>' |
1766 | 1775 | + '<div style="clear: left;"></div>' |
1767 | 1776 | + '</div>' |
— | — | @@ -2061,12 +2070,16 @@ |
2062 | 2071 | |
2063 | 2072 | if ( _this.uploads.length ) { |
2064 | 2073 | $j( '#mwe-upwiz-upload-ctrl' ).removeAttr( 'disabled' ); |
| 2074 | + $j( '#proceed' ).show(); |
2065 | 2075 | $j( '#mwe-upwiz-add-file' ).html( gM( 'mwe-upwiz-add-file-n' ) ); |
2066 | 2076 | $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'); |
2067 | 2078 | } else { |
2068 | 2079 | $j( '#mwe-upwiz-upload-ctrl' ).attr( 'disabled', 'disabled' ); |
| 2080 | + $j( '#proceed' ).hide(); |
2069 | 2081 | $j( '#mwe-upwiz-add-file' ).html( gM( 'mwe-upwiz-add-file-0' ) ); |
2070 | 2082 | $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'); |
2071 | 2084 | } |
2072 | 2085 | |
2073 | 2086 | if ( _this.uploads.length < _this.maxUploads ) { |
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/css/uploadWizard.css |
— | — | @@ -82,9 +82,8 @@ |
83 | 83 | padding: 1em; |
84 | 84 | } |
85 | 85 | |
86 | | - |
87 | 86 | .mwe-upwiz-add-files-0 { |
88 | | - margin-top: 40px; |
| 87 | + margin-top: 20px; |
89 | 88 | text-align: center; |
90 | 89 | font-size: 16px; |
91 | 90 | } |
— | — | @@ -122,16 +121,36 @@ |
123 | 122 | z-index: 2; |
124 | 123 | } |
125 | 124 | |
| 125 | +.mwe-upwiz-file.filled, #mwe-upwiz-upload-ctrls { |
| 126 | + padding: 4px; |
| 127 | +} |
| 128 | + |
126 | 129 | .mwe-upwiz-file.filled { |
127 | | - padding: 4px; |
128 | 130 | height: 24px; |
| 131 | + border-bottom: 1px solid #e0e0e0; |
129 | 132 | } |
130 | 133 | |
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 { |
132 | 148 | width: 300px; |
133 | 149 | height: 18px; |
134 | 150 | padding-left: 5px; |
135 | 151 | float: left; |
| 152 | +} |
| 153 | + |
| 154 | +.mwe-upwiz-visible-file { |
136 | 155 | white-space: nowrap; |
137 | 156 | overflow: hidden; |
138 | 157 | |
— | — | @@ -160,14 +179,27 @@ |
161 | 180 | |
162 | 181 | |
163 | 182 | #mwe-upwiz-files { |
164 | | - /* margin-left: 100px; */ |
| 183 | + margin-top: 20px; |
165 | 184 | } |
166 | 185 | |
| 186 | +.mwe-upwiz-file { |
| 187 | + margin-left: 50px; |
| 188 | + width: 410px; |
| 189 | +} |
167 | 190 | |
| 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 | + |
168 | 200 | .mwe-upwiz-remove { |
169 | | - margin-left: 5px; |
170 | 201 | padding: 5px; |
171 | 202 | cursor: pointer; |
| 203 | + text-align: center; |
172 | 204 | } |
173 | 205 | |
174 | 206 | a.mwe-upwiz-remove:link, |
— | — | @@ -208,6 +240,11 @@ |
209 | 241 | color: #009900; |
210 | 242 | } |
211 | 243 | |
| 244 | +.mwe-upwiz-progress-bar { |
| 245 | + margin-left: 50px; |
| 246 | +} |
| 247 | + |
| 248 | + |
212 | 249 | .mwe-upwiz-upload-warning { |
213 | 250 | background: #ffffe0; |
214 | 251 | } |
— | — | @@ -239,8 +276,11 @@ |
240 | 277 | } |
241 | 278 | |
242 | 279 | |
| 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 */ |
243 | 282 | .proceed { |
244 | 283 | text-align: right; |
| 284 | + width: 410px; |
245 | 285 | } |
246 | 286 | |
247 | 287 | .shim { |
Index: branches/js2-work/phase3/js/specialUploadWizardPage.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | |
7 | 7 | mw.ready( function() { |
8 | | - mw.load( 'UploadWizard.UploadWizardTest', function () { |
| 8 | + mw.load( 'UploadWizard.UploadWizard', function () { |
9 | 9 | |
10 | 10 | mw.setConfig( 'debug', true ); |
11 | 11 | |