123456789101112131415161718192021222324252627282930 |
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI
- * (C) Copyright IBM Corp. 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- export default class ShowNavBarItemLabelsAction {
- public canExecute(context: any): boolean {
- if (context.glassContext.appController.currentAppView) {
- const navBar = this.getNavBar();
- return navBar !== null;
- }
- return false;
- }
- public doAction(): void {
- const navBar = this.getNavBar();
- if (navBar !== null) {
- navBar.classList.remove("narrow");
- }
- }
- private getNavBar = (): HTMLElement => {
- const navBar = document
- .querySelector(".appview.paneColumn:not(.hidden)")
- .getElementsByClassName("navbar");
- return navBar && navBar.length > 0 ? (navBar[0] as HTMLElement) : null;
- };
- }
|