https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114135
Revision: 114135
Author: emsmith
Date: 2012-03-19 13:06:19 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
bug 35035 - hide/show decline oversight link on oversight/unoversight and make
sure the hide link toggles on oversight
Modified Paths:
--------------
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
Modified:
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
===================================================================
---
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
2012-03-19 13:03:41 UTC (rev 114134)
+++
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
2012-03-19 13:06:19 UTC (rev 114135)
@@ -1138,8 +1138,17 @@
'apiFlagType': 'delete',
'apiFlagDir': 1,
'onSuccess': function( id, data ) {
+ // if there is a "decline oversight" just hide
it
+ var $link = $(
'#articleFeedbackv5-declineoversight-link-' + id ).hide();
- // First we must possibly show
+ // Oversight is going to hide this as well, do
the unhide/hide toggle
+ var $link = $( '#articleFeedbackv5-hide-link-'
+ id )
+ .attr( 'action', 'show' )
+ .attr( 'id',
'articleFeedbackv5-show-link-' + id )
+ .text( mw.msg(
'articlefeedbackv5-form-unhide' ) )
+ .removeClass(
'articleFeedbackv5-hide-link' )
+ .addClass(
'articleFeedbackv5-show-link' );
+
var $link = $(
'#articleFeedbackv5-oversight-link-' + id )
.attr( 'action', 'unoversight' )
.attr( 'id',
'articleFeedbackv5-unoversight-link-' + id )
@@ -1162,6 +1171,9 @@
'apiFlagType': 'delete',
'apiFlagDir': -1,
'onSuccess': function( id, data ) {
+ // if there is a "decline oversight" just show
it
+ var $link = $(
'#articleFeedbackv5-declineoversight-link-' + id ).show();
+
var $link = $(
'#articleFeedbackv5-unoversight-link-' + id )
.attr( 'action', 'oversight' )
.attr( 'id',
'articleFeedbackv5-oversight-link-' + id )
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs