-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b03832f
commit 6b2f7c0
Showing
18 changed files
with
161 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*----------------------------------------------------------------------------------------------- | ||
* Copyright (c) Red Hat, Inc. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
*-----------------------------------------------------------------------------------------------*/ | ||
|
||
|
||
export function disableRemoveButton(event: Node & ParentNode): void { | ||
const selectedItem = event.querySelectorAll('[id^=items-section-workspace-new-item]'); | ||
if (selectedItem.length === 1) { | ||
selectedItem[0].lastElementChild.firstElementChild.className = 'close-button-disable'; | ||
} else { | ||
selectedItem[0].lastElementChild.firstElementChild.className = 'close-button'; | ||
} | ||
} | ||
|
||
// Disable button if section are not selected for workspace | ||
export function disableSelection(nodeList: HTMLCollectionOf<HTMLSelectElement>): boolean { | ||
const selectOption = ['Select a Config Map', 'Select a Secret', 'Select a PVC'] | ||
let startButton = document.querySelector('.startButton'); | ||
if (!startButton) { | ||
startButton = document.querySelector('.startButton-disable') | ||
} | ||
for (let element = 0; element < nodeList.length; element++) { | ||
const findOption = selectOption.includes(nodeList[element].value); | ||
if (findOption) { | ||
startButton.className = 'startButton-disable'; // Disable the button. | ||
return false; | ||
} else { | ||
startButton.className = 'startButton'; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.