X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.widgets%2Fmw.widgets.CategoryTagItemWidget.js;h=a15337c5634d178d6775697fdc56a2db28de672b;hb=98fd48b57bbb8e85aa62c73a9bed608fb6033289;hp=f0b2d44e351372863ad368d3a6777fa50b9ab177;hpb=15f6eff90c305d405fe4331c8a8dc8caa842e5b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.widgets/mw.widgets.CategoryTagItemWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CategoryTagItemWidget.js index f0b2d44e35..a15337c563 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.CategoryTagItemWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.CategoryTagItemWidget.js @@ -4,7 +4,7 @@ * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ -( function ( $, mw ) { +( function () { var hasOwn = Object.prototype.hasOwnProperty; @@ -57,10 +57,10 @@ var normalized = {}, pages = {}; - $.each( response.query.normalized || [], function ( index, data ) { + ( response.query.normalized || [] ).forEach( function ( data ) { normalized[ data.fromencoded ? decodeURIComponent( data.from ) : data.from ] = data.to; } ); - $.each( response.query.pages, function ( index, page ) { + response.query.pages.forEach( function ( page ) { pages[ page.title ] = !page.missing; } ); titles.forEach( function ( title ) { @@ -112,7 +112,7 @@ }; /** - * Category selector capsule item widget. Extends OO.ui.CapsuleItemWidget with the ability to link + * Category selector tag item widget. Extends OO.ui.TagItemWidget with the ability to link * to the given page, and to show its existence status (i.e., whether it is a redlink). * * @class mw.widgets.CategoryTagItemWidget @@ -203,7 +203,4 @@ .addClass( 'new' ); } }; - - // For backwards compatibility. See T183299. - mw.widgets.CategoryCapsuleItemWidget = mw.widgets.CategoryTagItemWidget; -}( jQuery, mediaWiki ) ); +}() );