mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Follow-up I1a81484: Replace MetaItem#remove with SurfaceFragment#removeMeta in other pages
Change-Id: Ie5c79b2099b5c293534c82ae4ba8a17f801060e9
This commit is contained in:
parent
1d90bae5c8
commit
56489cabd0
|
@ -262,7 +262,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) {
|
|||
if ( this.indexingOptionTouched ) {
|
||||
if ( newIndexingData.data === 'default' ) {
|
||||
if ( currentIndexingItem ) {
|
||||
currentIndexingItem.remove();
|
||||
this.fragment.removeMeta( currentIndexingItem );
|
||||
}
|
||||
} else {
|
||||
var newIndexingItem = { type: 'mwIndex', attributes: { property: newIndexingData.data } };
|
||||
|
@ -286,7 +286,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) {
|
|||
if ( this.newSectionEditLinkOptionTouched ) {
|
||||
if ( newNewSectionEditLinkData.data === 'default' ) {
|
||||
if ( currentNewSectionEditLinkItem ) {
|
||||
currentNewSectionEditLinkItem.remove();
|
||||
this.fragment.removeMeta( currentNewSectionEditLinkItem );
|
||||
}
|
||||
} else {
|
||||
var newNewSectionEditLinkItem = { type: 'mwNewSectionEdit', attributes: { property: newNewSectionEditLinkData.data } };
|
||||
|
@ -326,7 +326,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) {
|
|||
}
|
||||
} else {
|
||||
// There was a display title and is no new one, so remove
|
||||
currentDisplayTitleItem.remove();
|
||||
this.fragment.removeMeta( currentDisplayTitleItem );
|
||||
}
|
||||
} else {
|
||||
if ( newDisplayTitle ) {
|
||||
|
@ -342,7 +342,7 @@ ve.ui.MWAdvancedSettingsPage.prototype.teardown = function ( data ) {
|
|||
isSelected = metaItemCheckbox.fieldLayout.getField().isSelected();
|
||||
|
||||
if ( currentItem && !isSelected ) {
|
||||
currentItem.remove();
|
||||
advancedSettingsPage.fragment.removeMeta( currentItem );
|
||||
} else if ( !currentItem && isSelected ) {
|
||||
advancedSettingsPage.fragment.insertMeta( { type: metaItemCheckbox.metaName } );
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ ve.ui.MWCategoriesPage.prototype.teardown = function ( data ) {
|
|||
if ( this.defaultSortKeyTouched ) {
|
||||
if ( newDefaultSortKey === '' || newDefaultSortKey === this.fallbackDefaultSortKey ) {
|
||||
if ( currentDefaultSortKeyItem ) {
|
||||
currentDefaultSortKeyItem.remove();
|
||||
this.fragment.removeMeta( currentDefaultSortKeyItem );
|
||||
}
|
||||
} else {
|
||||
if ( !currentDefaultSortKeyItem ) {
|
||||
|
|
Loading…
Reference in a new issue