From 90cac71c0d18d59fb0e644f4fda4564c752b091b Mon Sep 17 00:00:00 2001 From: Benoit DUMONT Date: Thu, 18 Jan 2024 13:56:58 +0100 Subject: [PATCH] fixed #2518 Filter button on homepage is blue when filters exist + Modal with save button. --- .../pages/homepage/tagSettingsModal.html | 2 +- source/src/main/webapp/js/pages/Homepage.js | 23 ++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/source/src/main/webapp/include/pages/homepage/tagSettingsModal.html b/source/src/main/webapp/include/pages/homepage/tagSettingsModal.html index 4e955cb498..c97a5e6ea8 100644 --- a/source/src/main/webapp/include/pages/homepage/tagSettingsModal.html +++ b/source/src/main/webapp/include/pages/homepage/tagSettingsModal.html @@ -23,7 +23,7 @@ diff --git a/source/src/main/webapp/js/pages/Homepage.js b/source/src/main/webapp/js/pages/Homepage.js index adb1a602ae..7d0e50123e 100644 --- a/source/src/main/webapp/js/pages/Homepage.js +++ b/source/src/main/webapp/js/pages/Homepage.js @@ -516,6 +516,11 @@ function loadTagExec() { //Get the last tag to display var tagList = JSON.parse(localStorage.getItem("tagList")); var searchTag = localStorage.getItem("tagSearchString"); + if (searchTag || (tagList && tagList.length > 0)) { + $("#tagSettings").addClass("btn-primary"); + } else { + $("#tagSettings").removeClass("btn-primary"); + } if (tagList === null || tagList.length === 0) { tagList = readLastTagExec(searchTag); @@ -615,11 +620,11 @@ function aoColumnsFunc() { } }, { - "data": "Total", + "data": "Total", "bSortable": true, "sWidth": "10px", - "sClass": "datatable-alignright", - "sName": "Total", + "sClass": "datatable-alignright", + "sName": "Total", "title": "Total" } ]; @@ -636,10 +641,11 @@ function aoColumnsFunc() { "mRender": function (data, type, oObj) { if ((data) === 0) { return ""; - }; - return data; } - }; + ; + return data; + } + }; aoColumns.push(obj); } } @@ -698,6 +704,11 @@ function appendBuildRevRow(dtb) { function updateStats() { + $("#hp_TestcaseNumber").text("Calculating existing test cases..."); + $("#hp_TestExecutionNumber").text("Calculating launched test cases..."); + $("#hp_ApplicationNumber").text("Calculating configured applications..."); + + var jqxhr = $.getJSON("ReadTestCase", "iDisplayLength=1"); $.when(jqxhr).then(function (result) { $("#hp_TestcaseNumber").text(result["iTotalRecords"] + " existing test cases");