dashboard: Change widgets menu buttons to a bootstrap group. (#7799)

This commit is contained in:
Jaka Prašnikar 2024-08-21 15:22:17 +02:00 committed by GitHub
parent 0908acf7b2
commit 48746909a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -250,10 +250,11 @@ class WidgetManager {
_renderHeader() {
// Serialization options
let $btn_group = $('.btn-group-container');
let $btn_group_container = $('.btn-group-container');
let $btn_group = $('<div\>').addClass('btn-group');
// Append Save button and directly next to it, a hidden spinner
$btn_group.append($(`
$btn_group_container.append($(`
<button class="btn btn-primary" id="save-grid">
<span id="save-btn-text" class="show">${this.gettext.save}</span>
<span id="icon-container">
@ -275,6 +276,9 @@ class WidgetManager {
</button>
`));
// Append the button group to the container
$btn_group.appendTo($btn_group_container);
// Initially hide the save button
$('#save-grid').hide();