Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php |
— | — | @@ -218,12 +218,14 @@ |
219 | 219 | |
220 | 220 | $userPageUrl = htmlspecialchars($user->getUserPage()->getLocalURL()); |
221 | 221 | |
| 222 | + $userLink = Linker::userLink( $user->getId(), $username ); |
| 223 | + |
222 | 224 | return <<<HTML |
223 | 225 | <div class="fbd-item-userName"> |
224 | | - <a href="$userPageUrl" class="fbd-item-userLink">$username</a> |
225 | | - <sup class="fbd-item-userLinks"> |
| 226 | + $userLink |
| 227 | + <span class="fbd-item-userLinks"> |
226 | 228 | $links |
227 | | - </sup> |
| 229 | + </span> |
228 | 230 | </div> |
229 | 231 | HTML; |
230 | 232 | } |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | .localize() |
113 | 113 | .click( function( e ) { |
114 | 114 | var $el = $( this ); |
115 | | - mb.ui.overlay.find( '.mw-moodBar-formSubmit').removeAttr('disabled'); |
| 115 | + //mb.ui.overlay.find( '.mw-moodBar-formSubmit').removeAttr('disabled'); |
116 | 116 | mb.ui.overlay.find( '.mw-moodBar-formInput' ).focus(); |
117 | 117 | $mwMoodBarTypes.addClass( 'mw-moodBar-types-select' ); |
118 | 118 | mb.feedbackItem.type = $el.attr( 'rel' ); |
— | — | @@ -120,6 +120,7 @@ |
121 | 121 | .find( '.mw-moodBar-selected' ) |
122 | 122 | .not( $el ) |
123 | 123 | .removeClass( 'mw-moodBar-selected' ); |
| 124 | + mb.validate(); |
124 | 125 | } ) |
125 | 126 | .get( 0 ) |
126 | 127 | ); |
— | — | @@ -228,9 +229,18 @@ |
229 | 230 | .val( mw.msg( 'moodbar-form-submit' ) ) |
230 | 231 | .click( function() { |
231 | 232 | mb.feedbackItem.comment = mb.ui.overlay.find( '.mw-moodBar-formInput' ).val(); |
232 | | - mb.swapContent( mb.tpl.loading ); |
233 | | - $.moodBar.submit( mb.feedbackItem ); |
| 233 | + if(mb.feedbackItem.comment){ |
| 234 | + mb.swapContent( mb.tpl.loading ); |
| 235 | + $.moodBar.submit( mb.feedbackItem ); |
| 236 | + } |
234 | 237 | } ) |
| 238 | + .end() |
| 239 | + |
| 240 | + // Keypress |
| 241 | + .find( '#mw-moodBar-feedbackInput' ) |
| 242 | + .keyup( function(event) { |
| 243 | + mb.validate(); |
| 244 | + }) |
235 | 245 | .end(); |
236 | 246 | |
237 | 247 | // Set up character counter |
— | — | @@ -298,6 +308,14 @@ |
299 | 309 | mb.prepareUserinputContent( mb.ui.overlay ); |
300 | 310 | } |
301 | 311 | return true; |
| 312 | + }, |
| 313 | + |
| 314 | + validate: function() { |
| 315 | + if( $( '#mw-moodBar-feedbackInput' ).val() !== "" && $( '.mw-moodBar-selected').length ) { |
| 316 | + mb.ui.overlay.find( '.mw-moodBar-formSubmit').removeAttr('disabled'); |
| 317 | + } else { |
| 318 | + mb.ui.overlay.find( '.mw-moodBar-formSubmit').attr({'disabled':'true'}); |
| 319 | + } |
302 | 320 | } |
303 | 321 | } ); |
304 | 322 | |
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | #fbd-filters { |
5 | 5 | position: absolute; |
6 | | - width: 12em; |
| 6 | + width: 14em; |
7 | 7 | } |
8 | 8 | |
9 | 9 | #fbd-filters form { |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | /* List */ |
84 | 84 | |
85 | 85 | #fbd-list { |
86 | | - margin: 0 0 0 13em; |
| 86 | + margin: 0px 20px 0px 15em; |
87 | 87 | padding: 0; |
88 | 88 | min-height: 20em; |
89 | 89 | list-style: none; |
— | — | @@ -173,6 +173,7 @@ |
174 | 174 | .fbd-item { |
175 | 175 | border-bottom: solid 1px silver; |
176 | 176 | position: relative; |
| 177 | + margin-bottom:1em; |
177 | 178 | } |
178 | 179 | |
179 | 180 | .fbd-item-emoticon { |
— | — | @@ -210,7 +211,7 @@ |
211 | 212 | } |
212 | 213 | |
213 | 214 | .fbd-item-userLinks { |
214 | | - font-size: 0.5em; |
| 215 | + font-size: 1em; |
215 | 216 | } |
216 | 217 | |
217 | 218 | .fbd-item-time { |