Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -469,14 +469,14 @@ |
470 | 470 | * |
471 | 471 | * @param $row element the feedback row |
472 | 472 | */ |
473 | | - $.articleFeedbackv5special.markHidden = function ( $row ) { |
| 473 | + $.articleFeedbackv5special.markHidden = function ( $row, $hide_user, $hide_timestamp ) { |
474 | 474 | if ( $row.data( 'hidden' ) ) { |
475 | 475 | $.articleFeedbackv5special.unmarkHidden( $row ); |
476 | 476 | } |
477 | 477 | $row.addClass( 'articleFeedbackv5-feedback-hidden' ) |
478 | 478 | .data( 'hidden', true ); |
479 | 479 | $( '<span class="articleFeedbackv5-feedback-hidden-marker"></span>' ) |
480 | | - .text( mw.msg( 'articlefeedbackv5-hidden', $row.data('hide-user'), $row.data('hide-timestamp')) ) |
| 480 | + .text( mw.msg( 'articlefeedbackv5-hidden', $hide_user, $hide_timestamp) ) |
481 | 481 | .insertBefore( $row.find( '.articleFeedbackv5-comment-wrap h3' ) ); |
482 | 482 | $.articleFeedbackv5special.maskPost( $row ); |
483 | 483 | }; |
— | — | @@ -516,14 +516,14 @@ |
517 | 517 | * |
518 | 518 | * @param $row element the feedback row |
519 | 519 | */ |
520 | | - $.articleFeedbackv5special.markDeleted = function ( $row ) { |
| 520 | + $.articleFeedbackv5special.markDeleted = function ( $row , $oversight_user, $oversight_timestamp) { |
521 | 521 | if ( $row.data( 'deleted' ) ) { |
522 | 522 | $.articleFeedbackv5special.unmarkDeleted(); |
523 | 523 | } |
524 | 524 | $row.addClass( 'articleFeedbackv5-feedback-deleted' ) |
525 | 525 | .data( 'deleted', true ); |
526 | 526 | var $marker = $( '<span class="articleFeedbackv5-feedback-deleted-marker"></span>' ) |
527 | | - .text( mw.msg( 'articlefeedbackv5-deleted', $row.data('oversight-user'), $row.data('oversight-timestamp') ) ) |
| 527 | + .text( mw.msg( 'articlefeedbackv5-deleted', $oversight_user, $oversight_timestamp ) ) |
528 | 528 | .insertBefore( $row.find( '.articleFeedbackv5-comment-wrap h3' ) ); |
529 | 529 | $.articleFeedbackv5special.maskPost( $row ); |
530 | 530 | }; |
— | — | @@ -752,10 +752,10 @@ |
753 | 753 | } |
754 | 754 | } |
755 | 755 | if ( $( this ).hasClass( 'articleFeedbackv5-feedback-hidden' ) ) { |
756 | | - $.articleFeedbackv5special.markHidden( $( this ) ); |
| 756 | + $.articleFeedbackv5special.markHidden( $( this ), $( this ).attr('hide-user'), $( this ).attr('hide-timestamp')); |
757 | 757 | } |
758 | 758 | if ( $( this ).hasClass( 'articleFeedbackv5-feedback-deleted' ) ) { |
759 | | - $.articleFeedbackv5special.markDeleted( $( this ) ); |
| 759 | + $.articleFeedbackv5special.markDeleted( $( this ), $( this ).attr('oversight-user'), $( this ).attr('oversight-timestamp')); |
760 | 760 | } |
761 | 761 | } ); |
762 | 762 | $( '#articleFeedbackv5-feedback-count-total' ).text( data['articlefeedbackv5-view-feedback'].count ); |
— | — | @@ -974,7 +974,9 @@ |
975 | 975 | $link.removeClass( 'abusive' ); |
976 | 976 | } |
977 | 977 | if ( data['articlefeedbackv5-flag-feedback']['abuse-hidden'] ) { |
978 | | - $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ) ); |
| 978 | + $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ), |
| 979 | + data['articlefeedbackv5-flag-feedback']['hide-user'], |
| 980 | + data['articlefeedbackv5-flag-feedback']['hide-timestamp']); |
979 | 981 | } |
980 | 982 | $link.attr( 'id', 'articleFeedbackv5-unabuse-link-' + id ) |
981 | 983 | .removeClass( 'articleFeedbackv5-abuse-link' ) |
— | — | @@ -1010,7 +1012,9 @@ |
1011 | 1013 | $link.removeClass( 'abusive' ); |
1012 | 1014 | } |
1013 | 1015 | if ( data['articlefeedbackv5-flag-feedback']['abuse-hidden'] ) { |
1014 | | - $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ) ); |
| 1016 | + $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ), |
| 1017 | + data['articlefeedbackv5-flag-feedback']['hide-user'], |
| 1018 | + data['articlefeedbackv5-flag-feedback']['hide-timestamp']); |
1015 | 1019 | } |
1016 | 1020 | $link.attr( 'id', 'articleFeedbackv5-abuse-link-' + id ) |
1017 | 1021 | .removeClass( 'articleFeedbackv5-unabuse-link' ) |
— | — | @@ -1034,10 +1038,9 @@ |
1035 | 1039 | .removeClass( 'articleFeedbackv5-hide-link' ) |
1036 | 1040 | .addClass( 'articleFeedbackv5-show-link' ); |
1037 | 1041 | |
1038 | | - $link.data( 'hide-user', data['articlefeedbackv5-flag-feedback']['hide-user']); |
1039 | | - $link.data( 'hide-timestamp', data['articlefeedbackv5-flag-feedback']['hide-timestamp']); |
1040 | | - |
1041 | | - $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ) ); |
| 1042 | + $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ), |
| 1043 | + data['articlefeedbackv5-flag-feedback']['hide-user'], |
| 1044 | + data['articlefeedbackv5-flag-feedback']['hide-timestamp']); |
1042 | 1045 | $.articleFeedbackv5special.setActivityFlag( id, 'hide', true ); |
1043 | 1046 | } |
1044 | 1047 | }, |
— | — | @@ -1075,8 +1078,19 @@ |
1076 | 1079 | .text( mw.msg( 'articlefeedbackv5-form-unoversight' ) ) |
1077 | 1080 | .removeClass( 'articleFeedbackv5-requestoversight-link' ) |
1078 | 1081 | .addClass( 'articleFeedbackv5-unrequestoversight-link'); |
| 1082 | + |
1079 | 1083 | if ( data['articlefeedbackv5-flag-feedback']['autohidden'] ) { |
1080 | | - $.articleFeedbackv5special.markHidden( $link.closest( '.articleFeedbackv5-feedback' ) ); |
| 1084 | + var $new_link = $( '#articleFeedbackv5-hide-link-' + id ) |
| 1085 | + .attr( 'action', 'show' ) |
| 1086 | + .attr( 'id', 'articleFeedbackv5-show-link-' + id ) |
| 1087 | + .text( mw.msg( 'articlefeedbackv5-form-unhide' ) ) |
| 1088 | + .removeClass( 'articleFeedbackv5-hide-link' ) |
| 1089 | + .addClass( 'articleFeedbackv5-show-link' ); |
| 1090 | + |
| 1091 | + $.articleFeedbackv5special.markHidden( $new_link.closest( '.articleFeedbackv5-feedback' ), |
| 1092 | + data['articlefeedbackv5-flag-feedback']['hide-user'], |
| 1093 | + data['articlefeedbackv5-flag-feedback']['hide-timestamp']); |
| 1094 | + $.articleFeedbackv5special.setActivityFlag( id, 'hide', true ); |
1081 | 1095 | } |
1082 | 1096 | } |
1083 | 1097 | }, |
— | — | @@ -1113,10 +1127,9 @@ |
1114 | 1128 | .removeClass( 'articleFeedbackv5-oversight-link' ) |
1115 | 1129 | .addClass( 'articleFeedbackv5-unoversight-link' ); |
1116 | 1130 | |
1117 | | - $link.data( 'oversight-user', data['articlefeedbackv5-flag-feedback']['oversight-user']); |
1118 | | - $link.data( 'oversight-timestamp', data['articlefeedbackv5-flag-feedback']['oversight-timestamp']); |
1119 | | - |
1120 | | - $.articleFeedbackv5special.markDeleted( $link.closest( '.articleFeedbackv5-feedback' ) ); |
| 1131 | + $.articleFeedbackv5special.markDeleted( $link.closest( '.articleFeedbackv5-feedback' ) , |
| 1132 | + data['articlefeedbackv5-flag-feedback']['oversight-user'], |
| 1133 | + data['articlefeedbackv5-flag-feedback']['oversight-timestamp']); |
1121 | 1134 | $.articleFeedbackv5special.setActivityFlag( id, 'delete', true ); |
1122 | 1135 | } |
1123 | 1136 | }, |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -508,9 +508,9 @@ |
509 | 509 | $name = 'Article Feedback V5'; |
510 | 510 | } |
511 | 511 | |
512 | | - $attributes['data-hide-user'] = $name; |
| 512 | + $attributes['hide-user'] = $name; |
513 | 513 | if ($record[0]->af_hide_timestamp > 0) { |
514 | | - $attributes['data-hide-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_hide_timestamp ); |
| 514 | + $attributes['hide-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_hide_timestamp ); |
515 | 515 | } |
516 | 516 | } |
517 | 517 | if ( $record[0]->af_is_deleted ) { |
— | — | @@ -525,9 +525,9 @@ |
526 | 526 | $name = 'Article Feedback V5'; |
527 | 527 | } |
528 | 528 | |
529 | | - $attributes['data-oversight-user'] = $name; |
| 529 | + $attributes['oversight-user'] = $name; |
530 | 530 | if ($record[0]->af_oversight_timestamp > 0) { |
531 | | - $attributes['data-oversight-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_oversight_timestamp ); |
| 531 | + $attributes['oversight-timestamp'] = wfTimestamp( TS_RFC2822, $record[0]->af_oversight_timestamp ); |
532 | 532 | } |
533 | 533 | } |
534 | 534 | |