From a4cef6296c811f0ecf894611a2e66551059a9f15 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 26 Sep 2024 17:29:01 +0200 Subject: ✨ imports: buttons "ignore all errors", "no errors" - fix window closing on check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/static/js/ishtar.js | 13 +++++----- .../templates/ishtar/blocks/view_import_csv.html | 28 ++++++++++++++++++++-- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 6d4b3aa92..2bcfe5a7e 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -2146,16 +2146,17 @@ var import_table_refresh_import_list = function(data){ } } -var import_csv_check_ignored = function(){ - let tr = $(this).parent().parent(); - if (this.checked){ +var import_csv_check_ignored = function(item){ + let tr = $(item).parent().parent(); + if (item.checked){ tr.addClass("import-line-ignored"); } else { tr.removeClass("import-line-ignored"); } - $.get(url_path + ignore_error_line_url + this.value + "/", function(){ - let import_ids = [tr.parent().parent().attr("data-import")]; - import_table_update_import_list(import_ids); + $.get(url_path + ignore_error_line_url + item.value + "/", function(){ + /* update import list display - removed for now because close the "error view" window */ + // let import_ids = [tr.parent().parent().attr("data-import")]; + // import_table_update_import_list(import_ids); }); } diff --git a/ishtar_common/templates/ishtar/blocks/view_import_csv.html b/ishtar_common/templates/ishtar/blocks/view_import_csv.html index e8dd5e093..3c522f6b1 100644 --- a/ishtar_common/templates/ishtar/blocks/view_import_csv.html +++ b/ishtar_common/templates/ishtar/blocks/view_import_csv.html @@ -11,6 +11,10 @@ +
+ + +
@@ -25,7 +29,7 @@ {% for cell in line %}{% endfor %} {% endfor %} @@ -34,5 +38,25 @@ \ No newline at end of file -- cgit v1.2.3
{{ forloop.counter }} - {% if has_line_errors and not forloop.counter0 %}{% else %}{{cell}}{% endif %} + {% if has_line_errors and not forloop.counter0 %}{% else %}{{cell}}{% endif %}