From e24713904ac682bcf540068dc8f4f87731dcb7f1 Mon Sep 17 00:00:00 2001 From: Tobias Graml Date: Fri, 12 Apr 2024 11:13:49 +0200 Subject: [PATCH 1/5] Adapt administration --- .../component/nosto-entity-listing/index.js | 9 +- .../nosto-entity-listing.html.twig | 82 ++++++------- .../src/component/nosto-grouped-view/index.js | 4 + .../nosto-grouped-view.html.twig | 116 ++++++++---------- .../src/component/nosto-job-info/index.js | 4 + .../nosto-job-info/nosto-job-info.html.twig | 49 ++++---- .../src/component/nosto-job-sub-jobs/index.js | 4 + .../nosto-job-sub-jobs.html.twig | 6 +- .../component/nosto-scheduler-charts/index.js | 2 +- .../nosto-scheduler-charts.html.twig | 4 +- .../page/nosto-job-listing-index/index.js | 4 + .../nosto-job-listing-index.html.twig | 22 ++-- .../administration/css/nosto-scheduler.css | 6 +- .../administration/js/nosto-scheduler.js | 2 +- 14 files changed, 166 insertions(+), 148 deletions(-) diff --git a/src/Resources/app/administration/src/component/nosto-entity-listing/index.js b/src/Resources/app/administration/src/component/nosto-entity-listing/index.js index c1bf6b2..af3db42 100644 --- a/src/Resources/app/administration/src/component/nosto-entity-listing/index.js +++ b/src/Resources/app/administration/src/component/nosto-entity-listing/index.js @@ -61,7 +61,7 @@ Component.extend('nosto-entity-listing', 'sw-entity-listing', { }, selectAll(selected) { - this.$delete(this.selection); + this.selection = {}; this.records.forEach(item => { if (this.isSelected(item[this.itemIdentifierProperty]) !== selected) { this.selectItem(selected, item); @@ -77,11 +77,12 @@ Component.extend('nosto-entity-listing', 'sw-entity-listing', { } const selection = this.selection; + const identifier = item[this.itemIdentifierProperty]; if (selected) { - this.$set(this.selection, item[this.itemIdentifierProperty], item); - } else if (!selected && selection[item[this.itemIdentifierProperty]]) { - this.$delete(this.selection, item[this.itemIdentifierProperty]); + this.selection[identifier] = item; + } else if (!selected && selection[identifier]) { + delete this.selection[identifier]; } this.$emit('select-item', this.selection, item, selected); diff --git a/src/Resources/app/administration/src/component/nosto-entity-listing/nosto-entity-listing.html.twig b/src/Resources/app/administration/src/component/nosto-entity-listing/nosto-entity-listing.html.twig index 2af84ec..91faae6 100644 --- a/src/Resources/app/administration/src/component/nosto-entity-listing/nosto-entity-listing.html.twig +++ b/src/Resources/app/administration/src/component/nosto-entity-listing/nosto-entity-listing.html.twig @@ -192,29 +192,28 @@ - - {% endblock %} - {% block sw_data_grid_select_item_checkbox %} - - {% endblock %} +{% block sw_data_grid_select_item_checkbox %} + +{% endblock %} {% block sw_data_grid_table %} - {% block sw_data_grid_header %} {% block sw_data_grid_header_row %} @@ -222,18 +221,18 @@ {% block sw_data_grid_header_cell_selection %}
{% block sw_data_grid_header_cell_selection_content %}
{% block sw_data_grid_select_all_checkbox %} {% endblock %}
@@ -304,21 +303,21 @@ name="sort-indicator" mode="out-in" > - {% block sw_data_grid_sort_indicator_icon_asc %} - - {% endblock %} + name="solid-long-arrow-up" + size="20px" + /> + {% endblock %} {% block sw_data_grid_sort_indicator_icon_desc %} {% endblock %} @@ -419,10 +418,11 @@ {% block sw_data_grid_body_cell_selection_content %}
{% block sw_data_grid_select_item_checkbox %} - {% endblock %}
@@ -460,7 +460,7 @@