Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php |
— | — | @@ -261,7 +261,7 @@ |
262 | 262 | $linkText = wfMessage('moodbar-feedback-show')->escaped(); |
263 | 263 | $query = array('show-feedback' => '1'); |
264 | 264 | $link = $GLOBALS['wgUser']->getSkin() |
265 | | - ->link( $permalinkTitle, $linkText ); |
| 265 | + ->link( $permalinkTitle, $linkText, array(), $query ); |
266 | 266 | return Xml::tags( 'div', array( 'class' => 'fbd-item-show' ), "($link)" ); |
267 | 267 | } |
268 | 268 | } |
— | — | @@ -276,7 +276,8 @@ |
277 | 277 | $permalinkTitle = SpecialPage::getTitleFor( 'FeedbackDashboard', $id ); |
278 | 278 | $permalinkText = wfMessage( 'moodbar-feedback-hide' )->escaped(); |
279 | 279 | $permalink = $GLOBALS['wgUser']->getSkin() |
280 | | - ->link( $permalinkTitle, $permalinkText, array(), array('hide-feedback' => '1') ); |
| 280 | + ->link( $permalinkTitle, $permalinkText, |
| 281 | + array(), array('hide-feedback' => '1') ); |
281 | 282 | return Xml::tags( 'div', array( 'class' => 'fbd-item-permalink' ), "($permalink)" ); |
282 | 283 | } |
283 | 284 | |
Index: trunk/extensions/MoodBar/DashboardForms.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | public function getForm() { |
145 | 145 | $form = parent::getForm(); |
146 | 146 | |
147 | | - $header = Html::element( 'h3', null, |
| 147 | + $header = Html::rawElement( 'h3', null, |
148 | 148 | wfMessage( 'moodbar-hide-header' )->parse() ); |
149 | 149 | |
150 | 150 | $header .= wfMessage( 'moodbar-hide-intro' )->parse(); |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | public function getForm() { |
184 | 184 | $form = parent::getForm(); |
185 | 185 | |
186 | | - $header = Html::element( 'h3', null, |
| 186 | + $header = Html::rawElement( 'h3', null, |
187 | 187 | wfMessage( 'moodbar-restore-header' )->parse() ); |
188 | 188 | |
189 | 189 | $header .= wfMessage( 'moodbar-restore-intro' )->parse(); |
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js |
— | — | @@ -198,7 +198,7 @@ |
199 | 199 | */ |
200 | 200 | function showHiddenComment(e) { |
201 | 201 | var $item = $(this).closest('.fbd-item'); |
202 | | - var cont = $item.attr('data-mbccontinue'); |
| 202 | + var cont = $item.data('mbccontinue'); |
203 | 203 | |
204 | 204 | var request = { |
205 | 205 | 'action' : 'query', |
— | — | @@ -209,10 +209,18 @@ |
210 | 210 | 'mbccontinue' : cont |
211 | 211 | }; |
212 | 212 | |
| 213 | + var $spinner = $('<span class="mw-ajax-loader"> </span>'); |
| 214 | + $item.find('.fbd-item-show').empty().append( $spinner ); |
| 215 | + |
213 | 216 | $.post( mw.util.wikiScript('api'), request, |
214 | 217 | function( data ) { |
215 | | - var $content = $j(data.query.moodbarcomments[0].formatted); |
216 | | - $item.replaceWith($content); |
| 218 | + if ( data && data.query && data.query.moodbarcomments ) { |
| 219 | + var $content = $j(data.query.moodbarcomments[0].formatted); |
| 220 | + $item.replaceWith($content); |
| 221 | + } else { |
| 222 | + // Failure, just remove the link. |
| 223 | + $item.find('.fbd-item-show').remove(); |
| 224 | + } |
217 | 225 | }, 'json' ); |
218 | 226 | |
219 | 227 | e.preventDefault(); |