Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/295318
Change subject: [wip] Fade in/out elements that are moved in the notifications list ...................................................................... [wip] Fade in/out elements that are moved in the notifications list Bug: T126214 Change-Id: Iad5df1f56bfbd12cb6f42dd6e73860bdcc27cd68 --- M modules/ui/mw.echo.ui.SortedListWidget.js 1 file changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/18/295318/1 diff --git a/modules/ui/mw.echo.ui.SortedListWidget.js b/modules/ui/mw.echo.ui.SortedListWidget.js index 99fde36..add81a3 100644 --- a/modules/ui/mw.echo.ui.SortedListWidget.js +++ b/modules/ui/mw.echo.ui.SortedListWidget.js @@ -1,4 +1,4 @@ -( function ( mw ) { +( function ( mw, $ ) { /** * Sorted list widget. This is a group widget that sorts its items * according to a given sorting callback. @@ -44,6 +44,20 @@ /* Methods */ + /** + * @inheritdoc + */ + mw.echo.ui.SortedListWidget.prototype.onItemSortChange = function ( item ) { + var widget = this; + + item.$element.fadeOut( 400, function () { + widget.removeItems( item ); + + item.$element.hide(); + widget.addItems( item ); + item.$element.fadeIn( 400 ); + } ); + }; /** * Set the group element. * @@ -205,4 +219,4 @@ ); }; -} )( mediaWiki ); +} )( mediaWiki, jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/295318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad5df1f56bfbd12cb6f42dd6e73860bdcc27cd68 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits