Skip to content

Commit

Permalink
fix missing controls after editing card
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Dec 9, 2024
1 parent 846fd74 commit d327213
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions js/modules/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class GLPIDashboard {
this.filters_selector = "";

GridStack.renderCB = (el, w) => {
el.innerHTML = w.content;
el.parentElement.innerHTML = w.content;
};

// get passed options and merge it with default ones
Expand Down Expand Up @@ -628,16 +628,13 @@ class GLPIDashboard {
const height = parseInt(p.height || 2);
const options = p.card_options || {};

const html = ' \
<div class="grid-stack-item"> \
<span class="controls"> \
<i class="refresh-item ti ti-refresh" title="'+__("Refresh this card")+'"></i> \
<i class="edit-item ti ti-edit" title="'+__("Edit this card")+'"></i> \
<i class="delete-item ti ti-x" title="'+__("Delete this card")+'"></i> \
</span> \
<div class="grid-stack-item-content"> \
</div> \
</div>';
const html = `
<span class="controls">
<i class="refresh-item ti ti-refresh" title="${__("Refresh this card")}"></i>
<i class="edit-item ti ti-edit" title="${__("Edit this card")}"></i>
<i class="delete-item ti ti-x" title="${__("Delete this card")}"></i>
</span>
<div class="grid-stack-item-content"></div>`;

// add the widget to the grid
const widget = this.grid.addWidget({
Expand Down

0 comments on commit d327213

Please sign in to comment.