Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36860 - Remove workaround for fixing layout rendering #9874

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ $(document).on('click', 'a[disabled="disabled"]', function(event) {
});

function onContentLoad() {
tfm.store.observeStore('layout', tfm.nav.showContent);

if ($('input[focus_on_load=true]').length > 0) {
$('input[focus_on_load]')
.first()
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ select {
cursor: auto;
}

#main > #content {
display: none;
}

.used_by_hosts {
color: #000 !important;
cursor: auto;
Expand Down
14 changes: 0 additions & 14 deletions webpack/assets/javascripts/foreman_navigation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable jquery/no-show */

import $ from 'jquery';
import URI from 'urijs';
import { push } from 'connected-react-router';
import store from './react_app/redux';
Expand Down Expand Up @@ -36,14 +33,3 @@ export const hideLoading = () => {
export const changeActive = () => {
deprecate('changeActive', '', '3.8');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reminds me: we need to drop deprecated code. Looks like this function was actually a noop and can also be dropped. Probably doesn't belong in this PR though.

};

export function showContent(layout, unsubscribe) {
const content = () => {
$('#content').show();
unsubscribe();
};
// workaround for pages with no layout object
if (layout.items.length && !layout.isLoading) {
content();
} else if ($('#layout').length === 0) content();
}