Index: trunk/extensions/Survey/specials/SpecialSurvey.php |
— | — | @@ -171,6 +171,7 @@ |
172 | 172 | 'label-message' => 'survey-special-label-name', |
173 | 173 | 'id' => 'survey-name', |
174 | 174 | 'name' => 'survey-name', |
| 175 | + //'disabled' => true |
175 | 176 | ); |
176 | 177 | |
177 | 178 | $fields[] = array( |
Index: trunk/extensions/Survey/resources/ext.survey.special.survey.js |
— | — | @@ -26,8 +26,7 @@ |
27 | 27 | |
28 | 28 | $tr.append( $( '<td />' ).attr( { 'class': 'mw-input' } ).html( |
29 | 29 | getQuestionInput( { 'id': 'new' } ) |
30 | | - ).append( $( '<button />' ).button() |
31 | | - .text( mw.msg( 'survey-special-label-button' ) ) |
| 30 | + ).append( $( '<button />' ).button( { 'label': mw.msg( 'survey-special-label-button' ) } ) |
32 | 31 | .click( function() { onAddQuestionRequest(); return false; } ) |
33 | 32 | ) ); |
34 | 33 | |
— | — | @@ -44,8 +43,6 @@ |
45 | 44 | 'class': 'mw-htmlform-field-SurveyQuestionField' |
46 | 45 | } ); |
47 | 46 | |
48 | | - // TODO: defaulting |
49 | | - |
50 | 47 | $tr.append( $( '<td />' ).attr( { 'class': 'mw-label question-label' } ).html( |
51 | 48 | $( '<label />' ).text( mw.msg( 'survey-question-label-nr', ++questionNr ) ) |
52 | 49 | ) ); |
— | — | @@ -53,8 +50,7 @@ |
54 | 51 | $tr.append( $( '<td />' ).attr( { 'class': 'mw-input' } ).html( |
55 | 52 | getQuestionInput( question ) |
56 | 53 | .append( '<br />' ) |
57 | | - .append( $( '<button />' ).button() |
58 | | - .text( mw.msg( 'survey-special-remove' ) ) |
| 54 | + .append( $( '<button />' ).button( { 'label': mw.msg( 'survey-special-remove' ) } ) |
59 | 55 | .click( function() { |
60 | 56 | if ( confirm( mw.msg( 'survey-special-remove-confirm' ) ) ) { |
61 | 57 | removeQuestion( question ); |
— | — | @@ -65,7 +61,7 @@ |
66 | 62 | ) |
67 | 63 | ) ); |
68 | 64 | |
69 | | - $table.append( $tr ); |
| 65 | + $table.find( '.add-question' ).before( $tr ); |
70 | 66 | }; |
71 | 67 | |
72 | 68 | function getQuestionInput( question ) { |
— | — | @@ -129,6 +125,7 @@ |
130 | 126 | 'id': 'new-' + newQuestionNr++ |
131 | 127 | } ); |
132 | 128 | $( '#survey-question-text-new' ).focus().select(); |
| 129 | + $( 'html' ).animate( { scrollTop: $( document ).height() }, 'fast' ); |
133 | 130 | }; |
134 | 131 | |
135 | 132 | function setup() { |