jenkins-bot has submitted this change and it was merged.
Change subject: Correct error handling for hide/show admin actions
......................................................................
Correct error handling for hide/show admin actions
Bug: T96319
Change-Id: Ia167bc2b0c2ea2042e170809cd783dbb358f0e65
---
M includes/views/ReportTableRow.php
M resources/ext.gather.lists/init.js
2 files changed, 5 insertions(+), 5 deletions(-)
Approvals:
Jhernandez: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/views/ReportTableRow.php
b/includes/views/ReportTableRow.php
index 7c3f2a3..40e2367 100644
--- a/includes/views/ReportTableRow.php
+++ b/includes/views/ReportTableRow.php
@@ -64,11 +64,11 @@
$ts = $lang->userTimeAndDate( $collection->getUpdated(), $user
);
$owner = $collection->getOwner();
- $label = $collection->getTitle();
+ $title = $collection->getTitle();
$id = $collection->getId();
$html = Html::openElement( 'li' )
- . $this->collectionLink( $label, $owner, $id )
+ . $this->collectionLink( $title, $owner, $id )
. Html::element( 'span', array(),
$collection->getDescription() )
. Html::element( 'span', array(),
$collection->getCount() )
. $this->userLink( $owner )
@@ -88,7 +88,7 @@
'class' => $className,
'data-id' => $id,
'data-action' => $action,
- 'data-label' => $label,
+ 'data-label' => $title,
'data-owner' => $owner->getName(),
), $label )
. Html::closeElement( 'span' );
diff --git a/resources/ext.gather.lists/init.js
b/resources/ext.gather.lists/init.js
index c92bab3..135f000 100644
--- a/resources/ext.gather.lists/init.js
+++ b/resources/ext.gather.lists/init.js
@@ -20,11 +20,11 @@
key = 'gather-lists-' + data.action + '-collection';
if ( window.confirm( mw.msg( key, data.label, data.owner ) ) ) {
- api.setVisible( data.id, data.action === 'show'
).always( function () {
+ api.setVisible( data.id, data.action === 'show' ).done(
function () {
$button.closest( 'li' ).remove();
key = 'gather-lists-' + data.action +
'-success-toast';
toast.show( mw.msg( key, data.label ), 'toast'
);
- }, function () {
+ } ).fail( function () {
key = 'gather-lists-' + data.action +
'-failure-toast';
toast.show( mw.msg( key, data.label ), 'toast
fail' );
} );
--
To view, visit https://gerrit.wikimedia.org/r/204670
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia167bc2b0c2ea2042e170809cd783dbb358f0e65
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits