Index: trunk/extensions/UploadWizard/resources/jquery/jquery.mwCoolCats.css |
— | — | @@ -41,6 +41,10 @@ |
42 | 42 | display: inline-block; |
43 | 43 | } |
44 | 44 | |
| 45 | +.cat-widget .categoryInput { |
| 46 | + width: 16em; |
| 47 | +} |
| 48 | + |
45 | 49 | /* Fix for IE6 */ |
46 | 50 | .cat-widget .ui-button { |
47 | 51 | position: static; |
Index: trunk/extensions/UploadWizard/resources/uploadWizard.css |
— | — | @@ -660,8 +660,8 @@ |
661 | 661 | padding: 0.25em; |
662 | 662 | } |
663 | 663 | |
664 | | -.mwe-date-display { |
665 | | - width: 100%; |
| 664 | +.mwe-date { |
| 665 | + width: 20em; |
666 | 666 | background: #ffffff url('images/calendar.gif') no-repeat right center; |
667 | 667 | } |
668 | 668 | |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -128,7 +128,6 @@ |
129 | 129 | ); |
130 | 130 | |
131 | 131 | var dateInputId = "dateInput" + ( _this.upload.index ).toString(); |
132 | | - var dateDisplayInputId = "dateDisplayInput" + ( _this.upload.index ).toString(); |
133 | 132 | |
134 | 133 | var dateErrorDiv = $j('<div class="mwe-upwiz-details-input-error"><label class="mwe-validator-error" for="' + dateInputId + '" generated="true"/></div>'); |
135 | 134 | |
— | — | @@ -137,14 +136,12 @@ |
138 | 137 | /* $.datepicker.setDefaults() for other settings */ |
139 | 138 | _this.dateInput = |
140 | 139 | $j( '<input type="text" id="' + dateInputId + '" name="' + dateInputId + '" type="text" class="mwe-date" size="20"/>' ); |
141 | | - _this.dateDisplayInput = |
142 | | - $j( '<input type="text" id="' + dateDisplayInputId + '" name="' + dateDisplayInputId + '" type="text" class="mwe-date-display" size="20"/>' ); |
143 | 140 | |
144 | 141 | var dateInputDiv = $j( '<div class="mwe-upwiz-details-fieldname-input ui-helper-clearfix"></div>' ) |
145 | 142 | .append( |
146 | 143 | dateErrorDiv, |
147 | | - $j( '<div class="mwe-upwiz-details-fieldname"></div>' ).append( gM( 'mwe-upwiz-date-created' ) ), |
148 | | - $j( '<div class="mwe-upwiz-details-input"></div>' ).append( _this.dateInput, _this.dateDisplayInput ) ); |
| 144 | + $j( '<div class="mwe-upwiz-details-fieldname"></div>' ).append( gM( 'mwe-upwiz-date-created' ) ).requiredFieldLabel(), |
| 145 | + $j( '<div class="mwe-upwiz-details-input"></div>' ).append( _this.dateInput ) ); |
149 | 146 | |
150 | 147 | var moreDetailsCtrlDiv = $j( '<div class="mwe-upwiz-details-more-options"></div>' ); |
151 | 148 | |
— | — | @@ -188,37 +185,29 @@ |
189 | 186 | |
190 | 187 | _this.$form.validate(); |
191 | 188 | _this.$form.find( '.mwe-date' ).rules( "add", { |
192 | | - dateISO: true, |
| 189 | + required: true, |
| 190 | + /* dateISO: true, */ |
193 | 191 | messages: { |
194 | | - dateISO: gM( 'mwe-upwiz-error-date' ) |
| 192 | + required: gM( 'mwe-upwiz-error-blank' ) |
| 193 | + /* dateISO: gM( 'mwe-upwiz-error-date' ) */ |
195 | 194 | } |
196 | 195 | } ); |
197 | 196 | |
198 | | - // we hide the "real" ISO date, and create another "display" date |
199 | | - _this.$form.find( '.mwe-date-display' ) |
200 | | - .datepicker( { |
201 | | - dateFormat: 'DD, MM d, yy', |
| 197 | + _this.$form.find( '.mwe-date' ) |
| 198 | + .datepicker( { |
| 199 | + dateFormat: 'yy-mm-dd', |
| 200 | + constrainInput: false, |
202 | 201 | //buttonImage: mw.getMwEmbedPath() + 'skins/common/images/calendar.gif', |
203 | 202 | showOn: 'focus', |
204 | 203 | /* buttonImage: '???', |
205 | 204 | buttonImageOnly: true, */ |
206 | | - changeMonth: true, |
207 | | - changeYear: true, |
| 205 | + changeMonth: true, |
| 206 | + changeYear: true, |
208 | 207 | showAnim: 'slideDown', |
209 | | - altField: '#' + dateInputId, |
210 | | - altFormat: 'yy-mm-dd', |
211 | | - minDate: new Date( 1800, 0, 1 ) |
| 208 | + showButtonPanel: true |
212 | 209 | } ) |
213 | | - .click( function() { $j( this ).datepicker( 'show' ); } ) |
214 | | - .readonly(); |
| 210 | + .click( function() { $j( this ).datepicker( 'show' ); } ); |
215 | 211 | |
216 | | - _this.$form.find( '.mwe-date' ) |
217 | | - .bind( 'change', function() { $j( this ).valid(); } ) |
218 | | - .hide(); |
219 | | - |
220 | | - /* if the date is not valid, we need to pop open the "more options". How? |
221 | | - guess we'll revalidate it with element */ |
222 | | - |
223 | 212 | mw.UploadWizardUtil.makeToggler( moreDetailsCtrlDiv, moreDetailsDiv ); |
224 | 213 | |
225 | 214 | _this.addDescription( true, mw.config.get( 'wgUserLanguage' ) ); |
— | — | @@ -469,7 +458,6 @@ |
470 | 459 | |
471 | 460 | // ok by now we should definitely have a dateObj and a date string |
472 | 461 | $j( _this.dateInput ).val( dateStr ); |
473 | | - $j( _this.dateDisplayInput ).datepicker( "setDate", dateObj ); |
474 | 462 | }, |
475 | 463 | |
476 | 464 | /** |
— | — | @@ -619,7 +607,6 @@ |
620 | 608 | information['description'] += desc.getWikiText(); |
621 | 609 | } ); |
622 | 610 | |
623 | | - // XXX add a sanity check here for good date |
624 | 611 | information['date'] = $j.trim( $j( _this.dateInput ).val() ); |
625 | 612 | |
626 | 613 | var deed = _this.upload.deedChooser.deed; |