r109970 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109969‎ | r109970 | r109971 >
Date:00:03, 25 January 2012
Author:yonishostak
Status:resolved (Comments)
Tags:aft 
Comment:
AFTv5: bugfixes, styles according to requirements
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/images/type-happy-hovered.png (added) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/images/type-sad-hovered.png (added) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
@@ -113,10 +113,10 @@
114114 'articlefeedbackv5-invalid-feedback-id' => 'Invalid feedback ID',
115115 'articlefeedbackv5-invalid-feedback-flag' => 'Invalid feedback flag',
116116 'articlefeedbackv5-go-to-article' => 'View article',
117 - 'articlefeedbackv5-discussion-page' => 'Discussion',
 117+ 'articlefeedbackv5-discussion-page' => 'Talk',
118118 'articlefeedbackv5-whats-this' => 'Help',
119119 'articlefeedbackv5-invalid-page-id' => 'Invalid page ID',
120 - 'articlefeedbackv5-percent-found' => '<span class="stat-marker positive">$1%</span> found what they were looking for.',
 120+ 'articlefeedbackv5-percent-found' => '<span class="stat-marker positive">$1%</span> found what they were looking for',
121121 'articlefeedbackv5-overall-rating' => 'Rating: $1/5',
122122 'articlefeedbackv5-special-title' => '==Feedback==',
123123 'articlefeedbackv5' => 'Article feedback dashboard',
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/images/type-happy-hovered.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/images/type-happy-hovered.png
___________________________________________________________________
Added: svn:mime-type
124124 + application/octet-stream
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/images/type-sad-hovered.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/images/type-sad-hovered.png
___________________________________________________________________
Added: svn:mime-type
125125 + application/octet-stream
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css
@@ -20,29 +20,34 @@
2121 }
2222 #articleFeedbackv5-showing-count-wrap {
2323 float: left;
24 - margin: 0 0 15px;
 24+ font-size: 1.4em;
 25+ margin: 15px 50px 5px 0;
 26+ padding-top: 6px;
2527 }
 28+#articleFeedbackv5-feedback-count-total {
 29+ font-weight: bold;
 30+}
2631 #articleFeedbackv5-percent-found-wrap {
27 - clear: left;
28 - font-size: 1.5em;
29 - line-height: 35px;
 32+ font-size: 1.4em;
 33+ margin: 15px 0 5px 0;
3034 float: left;
3135 }
3236 #articleFeedbackv5-percent-found-wrap .stat-marker {
33 - display: inline-block;
34 - color: #fff;
35 - -webkit-border-radius: 3px;
36 - -moz-border-radius: 3px;
37 - -ms-border-radius: 3px;
38 - border-radius: 3px;
39 - padding: 3px 10px 0 35px;
40 - text-align: center;
 37+ font-weight: bold;
 38+ line-height: 32px;
 39+ padding: 11px 0 8px 50px;
4140 }
4241 #articleFeedbackv5-percent-found-wrap .positive {
43 - background: #2f8035 url(images/bg_emoticon_positive.png) no-repeat 13px center;
 42+ background-image: url(images/type-happy-hovered.png);
 43+ background-repeat: no-repeat;
 44+ background-size: 32px;
 45+ background-position: left;
4446 }
4547 #articleFeedbackv5-percent-found-wrap .negative {
46 - background: #bf0a0a url(images/bg_emoticon_negative.png) no-repeat 13px center;
 48+ background-image: url(images/type-sad-hovered.png);
 49+ background-repeat: no-repeat;
 50+ background-size: 32px;
 51+ background-position: left;
4752 }
4853 .aftv5-feedbackpage .aftv5-feedbackpage-comment-display-header {
4954 height: 40px;
@@ -58,9 +63,6 @@
5964 height: 40px;
6065 line-height: 40px;
6166 background: #D2E5F7;
62 - border: 1px solid #ccc;
63 - border-left: none;
64 - border-right: none;
6567 }
6668 #articleFeedbackv5-sort-filter-controls:after {
6769 clear: both;
@@ -77,14 +79,14 @@
7880 display: inline-block;
7981 }
8082 #articleFeedbackv5-show-feedback {
81 - overflow: scroll;
 83+ overflow: auto;
8284 height: 750px;
8385 }
8486 .articleFeedbackv5-feedback {
8587 min-width: 650px;
8688 position: relative;
87 - padding: 10px 10px 8px;
88 - border-bottom: 2px solid #d6d6d6;
 89+ padding: 0 10px 8px;
 90+ border-bottom: 1px solid #aaa;
8991 overflow: hidden;
9092 }
9193 .articleFeedbackv5-feedback:after {
@@ -93,11 +95,19 @@
9496 .articleFeedbackv5-comment-wrap {
9597 float: left;
9698 }
 99+.articleFeedbackv5-comment-wrap h3 {
 100+ font-weight: normal;
 101+ color: #444;
 102+ font-size: 1.1em;
 103+}
 104+.articleFeedbackv5-comment-wrap h3 a {
 105+ font-size: 1.2em;
 106+}
97107 .articleFeedbackv5-comment-wrap h3.positive .result {
98 - color: #2f8035;
 108+ /*color: #2f8035;*/
99109 }
100110 .articleFeedbackv5-comment-wrap h3.negative .result {
101 - color: #bf0a0a;
 111+ /*color: #bf0a0a;*/
102112 }
103113 .articleFeedbackv5-feedback .articleFeedbackv5-feedback-tools {
104114 display: none;
@@ -107,7 +117,7 @@
108118 width: 140px;
109119 }
110120 .articleFeedbackv5-feedback .articleFeedbackv5-feedback-tools h3 {
111 - background: #3366bb;
 121+ background: #5171B7;
112122 -moz-border-radius-bottomright: 5px;
113123 -moz-border-radius-bottomleft: 5px;
114124 -webkit-border-bottom-right-radius: 5px;
@@ -118,6 +128,8 @@
119129 border-radius-bottomright: 5px;
120130 color: #fff;
121131 text-align: center;
 132+ font-weight: normal;
 133+ font-size: 1em;
122134 position: absolute;
123135 z-index: 150;
124136 width: 140px;
@@ -130,6 +142,7 @@
131143 position: relative;
132144 padding: 40px 10px 10px;
133145 background: #d2e5f7;
 146+ border: solid 1px #c5c5c5;
134147 -moz-border-radius-bottomright: 5px;
135148 -moz-border-radius-bottomleft: 5px;
136149 -webkit-border-bottom-right-radius: 5px;
@@ -145,16 +158,13 @@
146159 cursor: pointer;
147160 }
148161 .articleFeedbackv5-feedback:hover {
149 - padding: 8px 10px;
150 - border-top: 2px solid #3366bb;
151 - border-bottom: 2px solid #3366bb;
 162+ /*padding: -1px 10px;
 163+ border-top: 1px solid #5171B7;
 164+ border-bottom: 1px solid #5171B7;*/
152165 }
153166 .articleFeedbackv5-feedback:hover .articleFeedbackv5-feedback-tools {
154167 display: block;
155168 }
156 -span.positive {
157 - color: #2f8035;
158 -}
159169 a#articleFeedbackv5-show-more {
160170 display: block;
161171 width: 100%;
@@ -166,10 +176,16 @@
167177 .articleFeedbackv5-feedback blockquote {
168178 margin: 10px 0;
169179 padding: 0;
 180+ font-size: 1.2em;
170181 }
171182 .articleFeedbackv5-feedback .articleFeedbackv5-comment-details {
 183+ padding-top: 30px;
172184 float: right;
 185+ width: 140px;
173186 }
 187+.articleFeedbackv5-feedback .articleFeedbackv5-comment-details-updates {
 188+ padding-top: 15px;
 189+}
174190 #articleFeedbackv5-special-add-feedback {
175191 /*color:white;
176192 display: block;
@@ -188,8 +204,12 @@
189205 #articleFeedbackv5-special-add-feedback:after {
190206 clear:both;
191207 }
 208+#articleFeedbackv5-show-feedback .articleFeedbackv5-abuse-link {
 209+ margin-left: 150px;
 210+}
192211 #articleFeedbackv5-show-feedback .articleFeedbackv5-comment-foot {
193212 line-height: 22px;
 213+ float: left;
194214 }
195215 #articleFeedbackv5-show-feedback .articleFeedbackv5-comment-foot .articleFeedbackv5-helpful-caption {
196216 margin: 0 15px 0 0;
@@ -212,10 +232,9 @@
213233 -webkit-border-radius: 3px;
214234 border-radius: 3px;
215235 -khtml-border-radius: 3px;
216 - /*-moz-box-shadow: -2px 2px 1px #999;
 236+ -moz-box-shadow: -2px 2px 1px #999;
217237 -webkit-box-shadow: -2px 2px 1px #999;
218 - box-shadow: -2px 2px 1px #999;*/
219 - border: 1px solid #999;
 238+ box-shadow: -2px 2px 1px #999;
220239 }
221240
222241 #articleFeedbackv5-show-feedback .articleFeedbackv5-comment-foot .articleFeedbackv5-helpful-link:hover,
@@ -235,6 +254,9 @@
236255 background: url(images/bg-button.png) repeat-x;
237256 color: #fff;
238257 }
 258+.articleFeedbackv5-helpful-votes {
 259+ color: #888;
 260+}
239261 .articleFeedbackv5-feedback .articleFeedbackv5-comment-wrap h3 {
240262 line-height: 24px;
241263 }
@@ -251,10 +273,18 @@
252274 border-radius: 3px;
253275 }
254276 .articleFeedbackv5-feedback h3.positive .icon {
255 - background: #2f8035 url(images/bg_emoticon_positive.png) no-repeat center center;
 277+ background-image: url(images/type-happy-hovered.png);
 278+ background-size: 22px;
 279+ background-repeat: no-repeat;
 280+ background-position: center center;
 281+ margin-left: 25px;
256282 }
257283 .articleFeedbackv5-feedback h3.negative .icon {
258 - background: #bf0a0a url(images/bg_emoticon_negative.png) no-repeat center center;
 284+ background-image: url(images/type-sad-hovered.png);
 285+ background-size: 22px;
 286+ background-repeat: no-repeat;
 287+ background-position: center center;
 288+ margin-left: 25px;
259289 }
260290 #articleFeedbackv5-sort .articleFeedbackv5-sort-label {
261291 display: inline-block;
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -20,7 +20,7 @@
2121 $wgArticleFeedbackv5SMaxage = 2592000;
2222
2323 // Enable/disable dashboard page
24 -$wgArticleFeedbackv5Dashboard = false;
 24+$wgArticleFeedbackv5Dashboard = true;
2525
2626 // Number of revisions to keep a rating alive for
2727 $wgArticleFeedbackv5RatingLifetime = 30;
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -343,10 +343,20 @@
344344 'class' => 'articleFeedbackv5-unhelpful-link'
345345 ), wfMessage( 'articlefeedbackv5-form-helpful-no-label', $record[0]->af_unhelpful_count )->text() );
346346 }
347 - $footer_links .= Html::closeElement( 'p' );
348 -
349347 $footer_links .= Html::element( 'span', array(
350348 'class' => 'articleFeedbackv5-helpful-votes'
 349+ ), wfMessage( 'articlefeedbackv5-form-helpful-votes', ( $record[0]->af_helpful_count + $record[0]->af_unhelpful_count ), $record[0]->af_helpful_count, $record[0]->af_unhelpful_count ) );
 350+ if( $can_flag ) {
 351+ $footer_links .= Html::element( 'a', array(
 352+ 'id' => "articleFeedbackv5-abuse-link-$id",
 353+ 'class' => 'articleFeedbackv5-abuse-link'
 354+ ), wfMessage( 'articlefeedbackv5-form-abuse', $record[0]->af_abuse_count )->text() );
 355+ }
 356+ $footer_links .= Html::closeElement( 'p' )
 357+ . Html::closeelement( 'div' );
 358+
 359+ /*$footer_links .= Html::element( 'span', array(
 360+ 'class' => 'articleFeedbackv5-helpful-votes'
351361 ), wfMessage( 'articlefeedbackv5-form-helpful-votes', ( $record[0]->af_helpful_count + $record[0]->af_unhelpful_count ), $record[0]->af_helpful_count, $record[0]->af_unhelpful_count ) )
352362 . ( $can_flag ? Html::rawElement( 'div', array(
353363 'class' => 'articleFeedbackv5-abuse-link-wrap'
@@ -354,7 +364,7 @@
355365 'id' => "articleFeedbackv5-abuse-link-$id",
356366 'class' => 'articleFeedbackv5-abuse-link'
357367 ), wfMessage( 'articlefeedbackv5-form-abuse', $record[0]->af_abuse_count )->text() ) ) : '' )
358 - . Html::closeElement( 'div' );
 368+ . Html::closeElement( 'div' );*/
359369
360370 // Don't render the toolbox if they can't do anything with it.
361371 $tools = null;
@@ -527,13 +537,14 @@
528538 private function renderComment( $text ) {
529539 if( strlen( $text ) <= 500 ) {
530540 $rv = "<blockquote>"
531 - . htmlspecialchars( $record['comment']->aa_response_text )
 541+ . htmlspecialchars( $text )
532542 . '</blockquote>';
533543 } else {
534544 $rv = "<blockquote>"
535 - . htmlspecialchars( $record['comment']->aa_response_text )
 545+ . htmlspecialchars( $text )
536546 . '</blockquote>';
537547 }
 548+ return $rv;
538549 }
539550
540551 private function feedbackHead( $message, $class, $record, $extra = '' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r109973AFTv5: fix for r109970 - missing @embedsyonishostak00:43, 25 January 2012

Comments

#Comment by Johnduhart (talk | contribs)   00:32, 25 January 2012

Missing /* @embed */s

#Comment by Catrope (talk | contribs)   07:27, 31 January 2012
+		), wfMessage( 'articlefeedbackv5-form-helpful-votes', ( $record[0]->af_helpful_count + $record[0]->af_unhelpful_count ), $record[0]->af_helpful_count, $record[0]->af_unhelpful_count ) );

Don't use implicit stringification of Message objects.

Status & tagging log