Skip to content

Commit

Permalink
Merge pull request #426 from TeskaLabs/bugfix/display-button-title
Browse files Browse the repository at this point in the history
Display button titles
  • Loading branch information
aringocode authored Jun 14, 2023
2 parents b193d29 + 22335e0 commit 3a35738
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@

- Remove pointer-events style for tree-menu-item (INDIGO Sprint 230609, [!427](https://github.com/TeskaLabs/asab-webui/pull/427))

- Fixed title display for buttons after a session has ended. Added disabling inputs, Pie chart clickable parts, disabling `tree-menu-item` and reloading the page after clicking the Forward or Backward buttons in the browser (INDIGO Sprint 230609, [!426](https://github.com/TeskaLabs/asab-webui/pull/426))

## v23.5

### Features
Expand Down
7 changes: 6 additions & 1 deletion src/modules/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,19 @@ export default class AuthModule extends Module {
if (that.App.Store != null) {
that.App.Store.dispatch({ type: types.AUTH_SESSION_EXPIRATION, sessionExpired: true });
// Disable buttons and pagination in the whole screen
[...document.querySelectorAll('[class^="btn"]:not(.alert-button), [class*=" btn"]:not(.alert-button), .page-item')].forEach(i => {
[...document.querySelectorAll('[class^="btn"]:not(.alert-button), [class*=" btn"]:not(.alert-button), .btn-group a, .page-item, input, select')].forEach(i => {
i.classList.add("disabled");
i.setAttribute("disabled", "");
});
// Disable link without class "nav-link" in the whole screen
[...document.querySelectorAll('a:not(.nav-link)')].forEach(i => {
i.classList.add("disabled-link");
});
// Tracks Forward and Backward clicks in the browser and reloads the page
window.addEventListener('popstate', () => {
window.location.reload();

});
}
}
else {
Expand Down
5 changes: 3 additions & 2 deletions src/styles/components/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ $btn-dark-outline-hover-bg-color: var(--btn-dark-outline-hover-bg-color);
color: $btn-txt;
}
&.disabled, &:disabled {
pointer-events: none;
& [class^="cil-"] {
pointer-events: none;
}
}
}

Expand Down Expand Up @@ -490,7 +492,6 @@ $btn-dark-outline-hover-bg-color: var(--btn-dark-outline-hover-bg-color);
text-decoration: none;
}
&.disabled, &:disabled, &-sm.disabled, &-sm:disabled {
pointer-events: none;
filter: opacity(60%);
.btn {
filter: opacity(100%);
Expand Down
8 changes: 7 additions & 1 deletion src/styles/components/dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ $disabled-dropdown-item: var(--disabled-dropdown-item);
border: none;
}
}

.dropdown {
&.action-button-dropdown {
&.disabled, &:disabled {
pointer-events: none;
}
}
}
.dropdown-toggle {
padding: 8px;
color: $toggle-text-color;
Expand Down

0 comments on commit 3a35738

Please sign in to comment.