Remove unused code from ext.uls.interface.js

During the implementation of the “addEmptyState” method, a part of code
was copied from the “addActionsMenuTrigger” method. This part is the
rendering of the action menu items (Translate button, Open Language
Settings button, etc) that is common for both the empty state and the
actions menu. During this copy, two unused lines were also copied. These
lines basically create the trigger for the actions menu (the “ellipsis”
or “cog” icon button at the bottom right corner of non-empty ULS), which
is not rendered for the ULS empty state.

This patch removes these unused lines.

Change-Id: I4776c2038cb6e1c74401c4caa6705e98181c6dca
This commit is contained in:
NikG
2022-10-24 21:03:03 +03:00
committed by jenkins-bot
parent a2b1bb6c47
commit de77ea992e

View File

@@ -149,8 +149,6 @@
var actionItemsRegistry = mw.uls.ActionsMenuItemsRegistry; var actionItemsRegistry = mw.uls.ActionsMenuItemsRegistry;
actionItemsRegistry.register( languageSettingsMenuItem ); actionItemsRegistry.register( languageSettingsMenuItem );
var $actionsMenuTrigger = createActionsMenuTrigger();
setActionsMenuTriggerIconClass( $actionsMenuTrigger, actionItemsRegistry.size() );
var $header = $( '<h3>' ) var $header = $( '<h3>' )
.addClass( 'uls-empty-state__header' ) .addClass( 'uls-empty-state__header' )
.text( $.i18n( 'ext-uls-empty-state-header' ) ); .text( $.i18n( 'ext-uls-empty-state-header' ) );