Merge "MWCategoryWidget: Remove entries from this.categories when appropriate"

This commit is contained in:
jenkins-bot 2015-02-28 01:00:15 +00:00 committed by Gerrit Code Review
commit 757e8d1950

View file

@ -168,6 +168,7 @@ ve.ui.MWCategoryWidget.prototype.onReorder = function ( item, newIndex ) {
*/
ve.ui.MWCategoryWidget.prototype.onRemoveCategory = function ( name ) {
this.categories[name].metaItem.remove();
delete this.categories[name];
};
/**
@ -182,6 +183,14 @@ ve.ui.MWCategoryWidget.prototype.onUpdateSortkey = function ( name, value ) {
this.emit( 'updateSortkey', this.categories[name] );
};
/**
* @inheritdoc
*/
ve.ui.MWCategoryWidget.prototype.clearItems = function () {
OO.ui.GroupElement.prototype.clearItems.call( this );
this.categories = {};
};
/**
* Sets popup state when popup is hidden
*/