Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -86,8 +86,8 @@ |
87 | 87 | 'articlefeedbackv5-form-unoversight' => 'Unmark for oversight', |
88 | 88 | 'articlefeedbackv5-form-undelete' => 'Un-delete (oversight)', |
89 | 89 | 'articlefeedbackv5-form-header' => 'Feedback #$1, at $2', |
90 | | - 'articlefeedbackv5-form1-header-found' => '{{GENDER:$1|$1}} found what they were looking for', |
91 | | - 'articlefeedbackv5-form1-header-not-found' => '{{GENDER:$1|$1}} did not find what they were looking for', |
| 90 | + 'articlefeedbackv5-form1-header-found' => 'found what they were looking for', |
| 91 | + 'articlefeedbackv5-form1-header-not-found' => 'did not find what they were looking for', |
92 | 92 | 'articlefeedbackv5-form2-header-praise' => '{{GENDER:$1|$1}} had a praise:', |
93 | 93 | 'articlefeedbackv5-form2-header-problem' => '{{GENDER:$1|$1}} had a problem:', |
94 | 94 | 'articlefeedbackv5-form2-header-question' => '{{GENDER:$1|$1}} had a question:', |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css |
— | — | @@ -113,52 +113,33 @@ |
114 | 114 | /*color: #bf0a0a;*/ |
115 | 115 | } |
116 | 116 | .articleFeedbackv5-feedback .articleFeedbackv5-feedback-tools { |
117 | | - display: none; |
| 117 | + /* display: none; */ |
| 118 | + width: 140px; |
118 | 119 | position: absolute; |
119 | | - top: 0; |
| 120 | + top: 10px; |
120 | 121 | right: 10px; |
121 | | - width: 140px; |
| 122 | + border: solid 1px #c5c5c5; |
122 | 123 | } |
123 | 124 | .articleFeedbackv5-feedback .articleFeedbackv5-feedback-tools h3 { |
124 | | - background: #5171B7; |
125 | | - -moz-border-radius-bottomright: 5px; |
126 | | - -moz-border-radius-bottomleft: 5px; |
127 | | - -webkit-border-bottom-right-radius: 5px; |
128 | | - -webkit-border-bottom-left-radius: 5px; |
129 | | - -ms-border-radius-bottomleft: 5px; |
130 | | - -ms-border-radius-bottomright: 5px; |
131 | | - border-radius-bottomleft: 5px; |
132 | | - border-radius-bottomright: 5px; |
133 | | - color: #fff; |
| 125 | + background: #d2e5f7; |
134 | 126 | text-align: center; |
135 | 127 | font-weight: normal; |
136 | 128 | font-size: 1em; |
137 | | - position: absolute; |
138 | | - z-index: 150; |
139 | 129 | width: 140px; |
140 | 130 | height: 20px; |
141 | 131 | line-height: 15px; |
142 | 132 | margin: 0; |
143 | 133 | cursor: pointer; |
| 134 | + display: none; |
144 | 135 | } |
145 | 136 | .articleFeedbackv5-feedback .articleFeedbackv5-feedback-tools ul { |
146 | | - position: relative; |
147 | | - padding: 40px 10px 10px; |
| 137 | + padding: 10px 10px 10px; |
148 | 138 | background: #d2e5f7; |
149 | | - border: solid 1px #c5c5c5; |
150 | | - -moz-border-radius-bottomright: 5px; |
151 | | - -moz-border-radius-bottomleft: 5px; |
152 | | - -webkit-border-bottom-right-radius: 5px; |
153 | | - -webkit-border-bottom-left-radius: 5px; |
154 | | - -ms-border-radius-bottomleft: 5px; |
155 | | - -ms-border-radius-bottomright: 5px; |
156 | | - border-radius-bottomleft: 5px; |
157 | | - border-radius-bottomright: 5px; |
158 | 139 | margin: 0; |
159 | 140 | list-style: none; |
160 | 141 | } |
161 | 142 | .articleFeedbackv5-feedback .articleFeedbackv5-feedback-tools ul li a:hover { |
162 | | - cursor: pointer; |
| 143 | + cursor: hand; |
163 | 144 | } |
164 | 145 | .articleFeedbackv5-feedback:hover { |
165 | 146 | /*padding: -1px 10px; |
— | — | @@ -180,6 +161,10 @@ |
181 | 162 | margin: 10px 0; |
182 | 163 | padding: 0; |
183 | 164 | font-size: 1.25em; |
| 165 | + display: block; |
| 166 | + float: left; |
| 167 | + clear: left; |
| 168 | + padding-right: 160px; |
184 | 169 | } |
185 | 170 | .articleFeedbackv5-feedback .articleFeedbackv5-comment-details { |
186 | 171 | padding-top: 30px; |
— | — | @@ -187,8 +172,18 @@ |
188 | 173 | width: 140px; |
189 | 174 | } |
190 | 175 | .articleFeedbackv5-feedback .articleFeedbackv5-comment-details-updates { |
191 | | - padding-top: 15px; |
| 176 | + float: right; |
| 177 | + margin-right: 10px; |
192 | 178 | } |
| 179 | +.articleFeedbackv5-comment-details-date { |
| 180 | + float: left; |
| 181 | + clear: right; |
| 182 | + display: block; |
| 183 | + line-height: 24px; |
| 184 | + margin: 0 5px 0 0; |
| 185 | + position: relative; |
| 186 | + top: 18px; |
| 187 | +} |
193 | 188 | #articleFeedbackv5-special-add-feedback { |
194 | 189 | /*color:white; |
195 | 190 | display: block; |
— | — | @@ -208,7 +203,7 @@ |
209 | 204 | clear:both; |
210 | 205 | } |
211 | 206 | #articleFeedbackv5-show-feedback .articleFeedbackv5-abuse-link { |
212 | | - margin-left: 150px; |
| 207 | + |
213 | 208 | } |
214 | 209 | #articleFeedbackv5-show-feedback .articleFeedbackv5-abuse-link.abusive { |
215 | 210 | color: red; |
— | — | @@ -216,7 +211,13 @@ |
217 | 212 | #articleFeedbackv5-show-feedback .articleFeedbackv5-comment-foot { |
218 | 213 | line-height: 22px; |
219 | 214 | float: left; |
| 215 | + width: 520px; |
220 | 216 | } |
| 217 | +.articleFeedbackv5-vote-wrapper { |
| 218 | + float: left; |
| 219 | + width: 100%; |
| 220 | + margin-bottom: 8px; |
| 221 | +} |
221 | 222 | #articleFeedbackv5-show-feedback .articleFeedbackv5-comment-foot .articleFeedbackv5-helpful-caption { |
222 | 223 | margin: 0 15px 0 0; |
223 | 224 | } |
— | — | @@ -266,7 +267,10 @@ |
267 | 268 | color: #888; |
268 | 269 | } |
269 | 270 | .articleFeedbackv5-feedback .articleFeedbackv5-comment-wrap h3 { |
270 | | - line-height: 24px; |
| 271 | + display: block; |
| 272 | + float: left; |
| 273 | + width: 520px; |
| 274 | + line-height: 24px; |
271 | 275 | } |
272 | 276 | .articleFeedbackv5-feedback .articleFeedbackv5-comment-wrap h3 .icon { |
273 | 277 | display: inline-block; |
— | — | @@ -331,6 +335,9 @@ |
332 | 336 | background: url(images/bg-button.png) !important; |
333 | 337 | color: white !important; |
334 | 338 | } |
| 339 | +.articleFeedbackv5-comment-wrap { |
| 340 | + width: 100%; |
| 341 | +} |
335 | 342 | .articleFeedbackv5-feedback-hidden .articleFeedbackv5-comment-wrap { |
336 | 343 | opacity : 0.4; |
337 | 344 | filter: alpha(opacity=40); // msie |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -556,19 +556,6 @@ |
557 | 557 | $( '#articleFeedbackv5-show-feedback' ).append( $newList ); |
558 | 558 | $( '#articleFeedbackv5-feedback-count-total' ).text( data['articlefeedbackv5-view-feedback'].count ); |
559 | 559 | $.articleFeedbackv5special.listControls.continue = data['articlefeedbackv5-view-feedback'].continue; |
560 | | - // set effects on toolboxes |
561 | | - $( '.articleFeedbackv5-feedback-tools > ul' ).hide(); |
562 | | - $( '.articleFeedbackv5-feedback-tools' ).hover( |
563 | | - function( eventObj ) { |
564 | | - //alert(this); |
565 | | - var id = $.articleFeedbackv5special.stripID( this, 'articleFeedbackv5-feedback-tools-' ); |
566 | | - $( '#articleFeedbackv5-feedback-tools-list-' + id ).slideDown( 200 ); |
567 | | - }, |
568 | | - function( eventObj ) { |
569 | | - var id = $.articleFeedbackv5special.stripID( this, 'articleFeedbackv5-feedback-tools-' ); |
570 | | - $( '#articleFeedbackv5-feedback-tools-list-' + id ).slideUp( 200 ); |
571 | | - } |
572 | | - ); |
573 | 560 | } else { |
574 | 561 | $( '#articleFeedbackv5-show-feedback' ).text( mw.msg( 'articlefeedbackv5-error-loading-feedback' ) ); |
575 | 562 | } |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php |
— | — | @@ -271,14 +271,14 @@ |
272 | 272 | $wgHooks['ArticleSaveComplete'][] = 'ArticleFeedbackv5Hooks::trackEditSuccess'; |
273 | 273 | |
274 | 274 | // API Registration |
275 | | -#$wgAPIListModules['articlefeedbackv5-view-ratings'] = 'ApiViewRatingsArticleFeedbackv5'; |
276 | | -#$wgAPIListModules['articlefeedbackv5-view-feedback'] = 'ApiViewFeedbackArticleFeedbackv5'; |
277 | | -#$wgAPIModules['articlefeedbackv5-flag-feedback'] = 'ApiFlagFeedbackArticleFeedbackv5'; |
| 275 | +$wgAPIListModules['articlefeedbackv5-view-ratings'] = 'ApiViewRatingsArticleFeedbackv5'; |
| 276 | +$wgAPIListModules['articlefeedbackv5-view-feedback'] = 'ApiViewFeedbackArticleFeedbackv5'; |
| 277 | +$wgAPIModules['articlefeedbackv5-flag-feedback'] = 'ApiFlagFeedbackArticleFeedbackv5'; |
278 | 278 | $wgAPIModules['articlefeedbackv5'] = 'ApiArticleFeedbackv5'; |
279 | 279 | |
280 | 280 | // Special Page |
281 | | -#$wgSpecialPages['ArticleFeedbackv5'] = 'SpecialArticleFeedbackv5'; |
282 | | -#$wgSpecialPageGroups['ArticleFeedbackv5'] = 'other'; |
| 281 | +$wgSpecialPages['ArticleFeedbackv5'] = 'SpecialArticleFeedbackv5'; |
| 282 | +$wgSpecialPageGroups['ArticleFeedbackv5'] = 'other'; |
283 | 283 | |
284 | 284 | $wgAvailableRights[] = 'aftv5-hide-feedback'; |
285 | 285 | $wgAvailableRights[] = 'aftv5-delete-feedback'; |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -315,37 +315,9 @@ |
316 | 316 | $can_hide = $wgUser->isAllowed( 'aftv5-hide-feedback' ); |
317 | 317 | $can_delete = $wgUser->isAllowed( 'aftv5-delete-feedback' ); |
318 | 318 | |
319 | | - // Taken from the Moodbar extension. |
320 | | - $now = wfTimestamp( TS_UNIX ); |
321 | | - $timestamp = wfTimestamp( TS_UNIX, $record[0]->af_created ); |
322 | | - $date; |
323 | | - |
324 | | - // Relative dates for 48 hours, normal timestamps later. |
325 | | - if ( $timestamp > ( $now - ( 86400 * 2 ) ) ) { |
326 | | - $time = $wgLang->formatTimePeriod( |
327 | | - ( $now - $timestamp ), 'avoidseconds' |
328 | | - ); |
329 | | - $date = wfMessage( 'articleFeedbackv5-comment-ago', $time )->escaped(); |
330 | | - } elseif( $timestamp ) { |
331 | | - $date = $wgLang->timeanddate($record[0]->af_created ); |
332 | | - } |
333 | | - |
334 | 319 | $details = Html::openElement( 'div', array( |
335 | | - 'class' => 'articleFeedbackv5-comment-details' |
336 | | - ) ) |
337 | | - . Html::openElement( 'div', array( |
338 | | - 'class' => 'articleFeedbackv5-comment-details-date' |
339 | | - ) ) |
340 | | - . Html::element( 'a', array( |
341 | | - 'class' => 'articleFeedbackv5-permalink', |
342 | | - 'id' => "articleFeedbackv5-permalink-$id", |
343 | | - 'href' => "#id=$id" |
344 | | - ), $date ) |
345 | | - . Html::closeElement( 'div' ) |
346 | | - . Html::openElement( 'div', array( |
347 | 320 | 'class' => 'articleFeedbackv5-comment-details-updates' |
348 | 321 | ) ); |
349 | | - |
350 | 322 | if( $record[0]->age > 0 ) { |
351 | 323 | $details .= Linker::link( |
352 | 324 | Title::newFromText( $record[0]->page_title ), |
— | — | @@ -358,14 +330,12 @@ |
359 | 331 | ) |
360 | 332 | ); |
361 | 333 | } |
| 334 | + $details .= Html::closeElement( 'div' ); |
362 | 335 | |
363 | | - $details .= Html::closeElement( 'div' ) |
364 | | - . Html::closeElement( 'div' ); |
365 | | - |
366 | 336 | $footer_links = Html::openElement( 'div', array( |
367 | 337 | 'class' => 'articleFeedbackv5-vote-wrapper' |
368 | 338 | ) ) |
369 | | - . Html::openElement( 'p', array( 'class' => 'articleFeedbackv5-comment-foot' ) ); |
| 339 | + . Html::openElement( 'div', array( 'class' => 'articleFeedbackv5-comment-foot' ) ); |
370 | 340 | |
371 | 341 | if ( $can_vote ) { |
372 | 342 | $footer_links .= Html::element( 'span', array( |
— | — | @@ -384,6 +354,7 @@ |
385 | 355 | 'class' => 'articleFeedbackv5-helpful-votes', |
386 | 356 | 'id' => "articleFeedbackv5-helpful-votes-$id" |
387 | 357 | ), wfMessage( 'articlefeedbackv5-form-helpful-votes', $record[0]->af_helpful_count, $record[0]->af_unhelpful_count ) ); |
| 358 | + $footer_links .= Html::closeElement( 'div' ); |
388 | 359 | if ( $can_flag ) { |
389 | 360 | $aclass = 'articleFeedbackv5-abuse-link'; |
390 | 361 | global $wgArticleFeedbackv5AbusiveThreshold; |
— | — | @@ -395,8 +366,7 @@ |
396 | 367 | 'class' => $aclass |
397 | 368 | ), wfMessage( 'articlefeedbackv5-form-abuse', $record[0]->af_abuse_count )->text() ); |
398 | 369 | } |
399 | | - $footer_links .= Html::closeElement( 'p' ) |
400 | | - . Html::closeelement( 'div' ); |
| 370 | + $footer_links .= $details . Html::closeElement( 'div' ); |
401 | 371 | |
402 | 372 | /*$footer_links .= Html::element( 'span', array( |
403 | 373 | 'class' => 'articleFeedbackv5-helpful-votes' |
— | — | @@ -486,11 +456,42 @@ |
487 | 457 | . $content |
488 | 458 | . $footer_links |
489 | 459 | . Html::closeElement( 'div' ) |
490 | | - . $details |
| 460 | + //. $details |
491 | 461 | . $tools |
492 | 462 | . Html::closeElement( 'div' ); |
493 | 463 | } |
| 464 | + |
| 465 | + private function renderPermalinkTimestamp( $record ) { |
| 466 | + global $wgLang; |
| 467 | + $id = $record->af_id; |
| 468 | + |
| 469 | + // Taken from the Moodbar extension. |
| 470 | + $now = wfTimestamp( TS_UNIX ); |
| 471 | + $timestamp = wfTimestamp( TS_UNIX, $record->af_created ); |
| 472 | + $date = ''; |
494 | 473 | |
| 474 | + // Relative dates for 48 hours, normal timestamps later. |
| 475 | + if ( $timestamp > ( $now - ( 86400 * 2 ) ) ) { |
| 476 | + $time = $wgLang->formatTimePeriod( |
| 477 | + ( $now - $timestamp ), 'avoidseconds' |
| 478 | + ); |
| 479 | + $date = wfMessage( 'articleFeedbackv5-comment-ago', $time )->escaped(); |
| 480 | + } elseif( $timestamp ) { |
| 481 | + $date = $wgLang->timeanddate($record->af_created ); |
| 482 | + } |
| 483 | + |
| 484 | + // format the element |
| 485 | + return Html::openElement( 'span', array( |
| 486 | + 'class' => 'articleFeedbackv5-comment-details-date' |
| 487 | + ) ) |
| 488 | + . Html::element( 'a', array( |
| 489 | + 'class' => 'articleFeedbackv5-permalink', |
| 490 | + 'id' => "articleFeedbackv5-permalink-$id", |
| 491 | + 'href' => "#id=$id" |
| 492 | + ), $date ) |
| 493 | + . Html::closeElement( 'span' ); |
| 494 | + } |
| 495 | + |
495 | 496 | private function renderBucket1( $record ) { |
496 | 497 | if ( $record['found']->aa_response_boolean ) { |
497 | 498 | $msg = 'articlefeedbackv5-form1-header-found'; |
— | — | @@ -632,7 +633,8 @@ |
633 | 634 | array( 'class' => 'result' ), |
634 | 635 | wfMessage( $message, $gender, $extra )->text() |
635 | 636 | ) |
636 | | - . Html::closeElement( 'h3' ); |
| 637 | + . Html::closeElement( 'h3' ) |
| 638 | + . $this->renderPermalinkTimestamp( $record ); |
637 | 639 | } |
638 | 640 | |
639 | 641 | /** |