mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "MWCategoryWidget: Remove entries from this.categories when appropriate"
This commit is contained in:
commit
757e8d1950
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue