Index: trunk/extensions/UploadWizard/resources/uploadWizard.css |
— | — | @@ -649,6 +649,7 @@ |
650 | 650 | |
651 | 651 | .mwe-readonly { |
652 | 652 | background-color: #ffffff; |
| 653 | + padding: 0.25em; |
653 | 654 | } |
654 | 655 | |
655 | 656 | .mwe-date-display { |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -1207,20 +1207,12 @@ |
1208 | 1208 | $j('<p/>').append( |
1209 | 1209 | gM( 'mwe-upwiz-thanks-wikitext' ), |
1210 | 1210 | $j( '<br />' ), |
1211 | | - $j( '<textarea class="mwe-long-textarea" rows="2"/>' ) |
1212 | | - .growTextArea() |
1213 | | - .readonly() |
1214 | | - .append( thumbWikiText ) |
1215 | | - .trigger('resizeEvent') |
| 1211 | + _this.makeReadOnlyInput( thumbWikiText ) |
1216 | 1212 | ), |
1217 | 1213 | $j('<p/>').append( |
1218 | 1214 | gM( 'mwe-upwiz-thanks-url' ), |
1219 | 1215 | $j( '<br />' ), |
1220 | | - $j( '<textarea class="mwe-long-textarea" rows="2"/>' ) |
1221 | | - .growTextArea() |
1222 | | - .readonly() |
1223 | | - .append( upload.imageinfo.descriptionurl ) |
1224 | | - .trigger('resizeEvent') |
| 1216 | + _this.makeReadOnlyInput( upload.imageinfo.descriptionurl ) |
1225 | 1217 | ) |
1226 | 1218 | ) |
1227 | 1219 | ); |
— | — | @@ -1230,6 +1222,17 @@ |
1231 | 1223 | }, |
1232 | 1224 | |
1233 | 1225 | /** |
| 1226 | + * make a read only text input, which self-selects on gaining focus |
| 1227 | + * @param {String} text it will contain |
| 1228 | + */ |
| 1229 | + makeReadOnlyInput: function ( s ) { |
| 1230 | + return $j( '<input/>' ).addClass( 'mwe-title ui-corner-all' ) |
| 1231 | + .readonly() |
| 1232 | + .val( s ) |
| 1233 | + .focus( function() { this.select(); } ); |
| 1234 | + }, |
| 1235 | + |
| 1236 | + /** |
1234 | 1237 | * Build interface for collecting user feedback on Upload Wizard |
1235 | 1238 | */ |
1236 | 1239 | launchFeedback: function() { |