Index: trunk/extensions/Survey/resources/jquery.survey.css |
— | — | @@ -2,4 +2,9 @@ |
3 | 3 | |
4 | 4 | .survey-textarea { |
5 | 5 | width: 80% |
6 | | -} |
\ No newline at end of file |
| 6 | +} |
| 7 | + |
| 8 | +div .survey-question { |
| 9 | + padding-bottom: 7px; |
| 10 | + font-size: 10pt; |
| 11 | +} |
Index: trunk/extensions/Survey/resources/jquery.survey.js |
— | — | @@ -54,19 +54,19 @@ |
55 | 55 | var type = survey.question.type; |
56 | 56 | |
57 | 57 | var $input; |
58 | | - var id = 'survey-question-' + question.id; |
| 58 | + var id = 'question-input-' + question.id; |
59 | 59 | |
60 | 60 | switch ( question.type ) { |
61 | 61 | case type.TEXT: default: |
62 | 62 | $input = $( '<input />' ).attr( { |
63 | 63 | 'id': id, |
64 | | - 'class': 'survey-question survey-text' |
| 64 | + 'class': 'question-input survey-text' |
65 | 65 | } ); |
66 | 66 | break; |
67 | 67 | case type.NUMBER: |
68 | 68 | $input = $( '<input />' ).numeric().attr( { |
69 | 69 | 'id': id, |
70 | | - 'class': 'survey-question survey-number', |
| 70 | + 'class': 'question-input survey-number', |
71 | 71 | 'size': 7 |
72 | 72 | } ); |
73 | 73 | break; |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | |
81 | 81 | $input = survey.htmlSelect( answers, 0, { |
82 | 82 | 'id': id, |
83 | | - 'class': 'survey-question survey-select' |
| 83 | + 'class': 'question-input survey-select' |
84 | 84 | } ); |
85 | 85 | break; |
86 | 86 | case type.RADIO: |
— | — | @@ -95,14 +95,14 @@ |
96 | 96 | id, |
97 | 97 | { |
98 | 98 | 'id': id, |
99 | | - 'class': 'survey-question survey-radio' |
| 99 | + 'class': 'question-input survey-radio' |
100 | 100 | } |
101 | 101 | ); |
102 | 102 | break; |
103 | 103 | case type.TEXTAREA: |
104 | 104 | $input = $( '<textarea />' ).attr( { |
105 | 105 | 'id': id, |
106 | | - 'class': 'survey-question survey-textarea', |
| 106 | + 'class': 'question-input survey-textarea', |
107 | 107 | 'cols': 80, |
108 | 108 | 'rows': 2 |
109 | 109 | } ); |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | $input = $( '<input />' ).attr( { |
113 | 113 | 'id': id, |
114 | 114 | 'type': 'checkbox', |
115 | | - 'class': 'survey-question survey-check', |
| 115 | + 'class': 'question-input survey-check', |
116 | 116 | } ); |
117 | 117 | break; |
118 | 118 | } |
— | — | @@ -120,13 +120,13 @@ |
121 | 121 | |
122 | 122 | this.inputs.push( { 'input': $input, 'type': question.type } ); |
123 | 123 | |
124 | | - $q = $( '<div />' ).html( $input ); |
| 124 | + $q = $( '<div />' ).attr( 'class', 'survey-question' ).html( $input ); |
125 | 125 | |
126 | 126 | if ( question.type === type.CHECK ) { |
127 | 127 | $q.prepend( $( '<label />' ).text( question.text ).attr( 'for', id ) ); |
128 | 128 | } |
129 | 129 | else { |
130 | | - $q.prepend( $( '<p />' ).text( question.text ) ); |
| 130 | + $q.prepend( $( '<p />' ).text( question.text ).attr( 'class', 'question-text' ) ); |
131 | 131 | } |
132 | 132 | |
133 | 133 | return $q; |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | var id = $input.data( 'question-id' ); |
163 | 163 | |
164 | 164 | if ( this.inputs[i].type === survey.question.type.RADIO ) { |
165 | | - var value = $( 'input:radio[name=survey-question-' + id + ']:checked' ).val(); |
| 165 | + var value = $( 'input:radio[name=question-input-' + id + ']:checked' ).val(); |
166 | 166 | } |
167 | 167 | else { |
168 | 168 | var value = $input.val(); |