diff --git a/css/includes/components/_utils.scss b/css/includes/components/_utils.scss index 160504bc4d1..cb5a8aa4b75 100644 --- a/css/includes/components/_utils.scss +++ b/css/includes/components/_utils.scss @@ -44,13 +44,6 @@ transition: border-color 0.3s; } -// Apply the same font-size and line-height as btn-text. -// Useful when replacing a btn-text content by a loading icon. -.btn-text-loading { - font-size: var(--tblr-btn-font-size) !important; - line-height: var(--tblr-btn-line-height) !important; -} - .w-fit-content { width: fit-content !important; } diff --git a/js/modules/IllustrationPicker/Controller.js b/js/modules/IllustrationPicker/Controller.js index 39dc1859034..12dc9d9f3a6 100644 --- a/js/modules/IllustrationPicker/Controller.js +++ b/js/modules/IllustrationPicker/Controller.js @@ -167,16 +167,9 @@ export class GlpiIllustrationPickerController const button = this.#container .querySelector(`[data-glpi-icon-picker-go-to-page="${page}"]`) ; - const button_text = button.querySelector( - '[data-glpi-icon-picker-pagination-text' - ); - const button_loading_indicator = button.querySelector( - '[data-glpi-icon-picker-pagination-loading-icon' - ); button.classList.add('active'); - button_text.classList.add('d-none'); - button_loading_indicator.classList.remove('d-none'); + button.classList.add('btn-loading'); // Apply loading indicator to the search results this.#getSearchResultsDiv().style.opacity = 0.7; @@ -225,13 +218,13 @@ export class GlpiIllustrationPickerController #getSearchDefaultIcon() { - return this.#container.querySelector('[data-glpi-icon-picker-filter-default-icon') + return this.#container.querySelector('[data-glpi-icon-picker-filter-default-icon]') ; } #getSearchLoadingIcon() { - return this.#container.querySelector('[data-glpi-icon-picker-filter-loading-icon'); + return this.#container.querySelector('[data-glpi-icon-picker-filter-loading-icon]'); } #getSearchResultsDiv() diff --git a/src/Ajax.php b/src/Ajax.php index 1e7cbdd7183..bb43c88d306 100644 --- a/src/Ajax.php +++ b/src/Ajax.php @@ -428,7 +428,7 @@ class='nav-link justify-content-between $navlinkp $display_class' updateCurrentTab(); return; } - $(target).html(''); + $(target).html(``); $.get(url, function(data) { $(target).html(data); diff --git a/src/Glpi/Dashboard/Grid.php b/src/Glpi/Dashboard/Grid.php index a19534855ca..05628c126ed 100644 --- a/src/Glpi/Dashboard/Grid.php +++ b/src/Glpi/Dashboard/Grid.php @@ -153,7 +153,7 @@ public function getCards() $card_html = << - + HTML; $this->addGridItem( diff --git a/src/Impact.php b/src/Impact.php index a871625d41f..3e8e8a59a1b 100644 --- a/src/Impact.php +++ b/src/Impact.php @@ -1064,7 +1064,7 @@ public static function printImpactNetworkContainer() echo ''; //
echo '
'; - echo ''; + echo ''; echo '
'; //
echo '
'; //
diff --git a/templates/central/widget_tab.html.twig b/templates/central/widget_tab.html.twig index 7aaf829a666..e10186fb498 100644 --- a/templates/central/widget_tab.html.twig +++ b/templates/central/widget_tab.html.twig @@ -67,7 +67,7 @@ 'widget': this_obj.data('widget'), 'params': this_obj.data('params') }; - this_obj.html('') + this_obj.html('') .load('{{ path('/ajax/central.php') }}', params, function(response, status, xhr) { const parent = this_obj.closest('.grid-item').parent(); diff --git a/templates/components/form/inventory_info.html.twig b/templates/components/form/inventory_info.html.twig index 5feab958912..a2d562deb5f 100644 --- a/templates/components/form/inventory_info.html.twig +++ b/templates/components/form/inventory_info.html.twig @@ -100,7 +100,7 @@
{{ __('Unknown') }}
@@ -108,7 +108,7 @@
{{ __('Unknown') }}
@@ -118,7 +118,7 @@ $(function () { $('#update-status').on('click', function() { var icon = $(this); - icon.addClass('fa-spin'); + icon.addClass('icon-rotate'); $.ajax({ type: 'POST', url: '{{ path('/ajax/agent.php') }}', @@ -132,14 +132,14 @@ $('#agent_status').text(json.answer); }, complete: function() { - icon.removeClass('fa-spin'); + icon.removeClass('icon-rotate'); } }); }); $('#update-inventory').on('click', function() { var icon = $(this); - icon.addClass("fa-spin"); + icon.addClass('icon-rotate'); $.ajax({ type: 'POST', url: '{{ path('/ajax/agent.php') }}', @@ -153,7 +153,7 @@ $('#inventory_status').text(json.answer); }, complete: function() { - icon.removeClass('fa-spin'); + icon.removeClass('icon-rotate'); } }); }); diff --git a/templates/components/illustration/icon_picker_modal.html.twig b/templates/components/illustration/icon_picker_modal.html.twig index 7cd737e4df7..ce3b9fcba3c 100644 --- a/templates/components/illustration/icon_picker_modal.html.twig +++ b/templates/components/illustration/icon_picker_modal.html.twig @@ -53,10 +53,7 @@ class="ti ti-search" data-glpi-icon-picker-filter-default-icon > - + - {{ i }} - + {{ i }} {% endif %} {% endfor %} diff --git a/templates/components/itilobject/actors/field.html.twig b/templates/components/itilobject/actors/field.html.twig index c8b23363a68..b829347d16d 100644 --- a/templates/components/itilobject/actors/field.html.twig +++ b/templates/components/itilobject/actors/field.html.twig @@ -191,13 +191,13 @@ } else if ("{{ actortype }}" == "requester") { label = "{{ __('Number of tickets as requester') }}"; } - const existing_element = $( - ` - - ` - ); + const existing_element = $(` + + + + `); option_element.append(existing_element); $.get("{{ path('/ajax/actorinformation.php') }}", { diff --git a/templates/components/itilobject/timeline/timeline.html.twig b/templates/components/itilobject/timeline/timeline.html.twig index 82726da169d..9ab792c32e7 100644 --- a/templates/components/itilobject/timeline/timeline.html.twig +++ b/templates/components/itilobject/timeline/timeline.html.twig @@ -237,7 +237,7 @@ $(function() { content_block.find(".read-only-content").hide(); content_block.find(".edit-content").show() .find(".ajax-content") - .html('') + .html('') .load("{{ path('/ajax/timeline.php') }}", { 'action' : 'viewsubitem', 'type' : itemtype, diff --git a/templates/components/search/criteria_filter_actions.html.twig b/templates/components/search/criteria_filter_actions.html.twig index 3c2dff9fbd1..05be5322aa0 100644 --- a/templates/components/search/criteria_filter_actions.html.twig +++ b/templates/components/search/criteria_filter_actions.html.twig @@ -31,116 +31,118 @@ # --------------------------------------------------------------------- #} -{% set rand = random() %} -{% set save_action_id = "save_filters_" ~ rand %} -{% set save_action_icon_id = "save_filters_icon" ~ rand %} -{% set delete_action_id = "delete_filters_" ~ rand %} - - - - - - diff --git a/templates/layout/parts/saved_searches.html.twig b/templates/layout/parts/saved_searches.html.twig index 588e9015df5..802e083cfb7 100644 --- a/templates/layout/parts/saved_searches.html.twig +++ b/templates/layout/parts/saved_searches.html.twig @@ -80,11 +80,11 @@
- +
- +