mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
e8767481e9
* Fix GitHub/NoTitleAttribute, LinkHasHref errors - Replaces `title` attribute with `aria-label` for interactive elements. - Removes `title` from non-interactive elements. - Converts `<a>` tags without proper `href` to `<button>` elements, using Primer `Button`/`IconButton` where possible. # Conflicts: # app/views/custom_fields/_custom_options.html.erb # spec/features/admin/custom_fields/shared_custom_field_expectations.rb # spec/features/admin/custom_fields/work_packages/list_spec.rb * Fix Autocomplete missing errors * Fix GitHub/NoPositiveTabIndex errors Removes all positive `tabindex` values. * Fix Rails/LinkToBlank errors * Replace toast with Primer Banner on LDAP form * Add frozen_string_literal * Ignore erb lint for deprecated files * Fix linting errors in repository module * Fix linting errors in budgets and custom actions * Fix linting errors in member form and 2fa * Fix linting errors in mcost types and wiki help and storages * Fix linting errors in multi select filters, ifc viewer, and unsupported browser banner * Fix failing spec * Use Primer banner instead of op-toast where ever it is possible * Use octicon instead of op_icon * Fix failing tests * Use no-decoration-on-hover for button links and change the button with only an icon to primer icon button * Keep webhook response modal activation selector class-based * use icon button for edit of hourly rate --------- Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
<div id="unsupported-browser-warning" class="warning-bar--item">
|
|
<button type="button"
|
|
aria-label="<%= t("unsupported_browser.close_warning") %>"
|
|
class="icon3 icon-warning warning-bar--disable-on-hover button--link"></button>
|
|
<p>
|
|
<strong><%= t("unsupported_browser.title") %></strong>
|
|
|
|
<%= t("unsupported_browser.message") %>
|
|
|
|
<a href="https://www.openproject.org/open-source/download/systemrequirements/"
|
|
target="_blank">
|
|
<%= t("unsupported_browser.update_message") %>
|
|
</a>
|
|
</p>
|
|
</div>
|
|
|
|
<%= nonced_javascript_tag do %>
|
|
(function() {
|
|
// Hide initially
|
|
var message = document.getElementById('unsupported-browser-warning');
|
|
|
|
try {
|
|
var hidden = window.localStorage.getItem('unsupported-browser-warning-ignore') === '1';
|
|
if (hidden) {
|
|
message.style.display = 'none';
|
|
}
|
|
} catch (e) {
|
|
console.error('Failed to access your browsers local storage.');
|
|
}
|
|
|
|
// Click handler to hide
|
|
var closeButton = message.querySelector('.warning-bar--disable-on-hover');
|
|
closeButton.onclick = function() {
|
|
message.style.display = 'none';
|
|
try {
|
|
window.localStorage.setItem('unsupported-browser-warning-ignore', '1');
|
|
} catch (e) {
|
|
console.error('Failed to access your browsers local storage.');
|
|
}
|
|
};
|
|
})();
|
|
<% end %>
|