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

fix(widget): fix widget from central page #127

Merged
merged 6 commits into from
Oct 25, 2022

Conversation

stonebuzz
Copy link
Contributor

fix widget from central page

Before :
image

After :
image

@stonebuzz stonebuzz added the bug label Oct 20, 2022
@stonebuzz stonebuzz added this to the 2.8.1 milestone Oct 20, 2022
@stonebuzz stonebuzz self-assigned this Oct 20, 2022
@stonebuzz stonebuzz requested a review from cedric-anne October 20, 2022 12:11
Comment on lines 58 to 59
container.append(text);
window.msnry = new Masonry('.masonry_grid');
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Previous code was checking if response was empty before trying to append it. This can happens when there is no data to shown in the widget.
  2. Is this normal to redefine window.msnry ?
  3. Is this notmal to remove call to msnry.layout(); ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If i keep the old code the widgets are badly placed, I have two widgets on top of each other
image

With my method
All widgets are displayed and visible
image

I added the check on the ajax data received

@stonebuzz stonebuzz requested a review from cedric-anne October 25, 2022 06:07
@cedric-anne cedric-anne merged commit 275757f into pluginsGLPI:develop Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants