From 04ae02148284b87c58fec3c690d912ad05dd096d Mon Sep 17 00:00:00 2001
From: "epugh@opensourceconnections.com" <>
Date: Fri, 17 Dec 2021 09:59:14 -0500
Subject: [PATCH 1/2] be smarter about number of matches text
---
.../templates/views/targetedSearchModal.html | 21 +++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/app/assets/templates/views/targetedSearchModal.html b/app/assets/templates/views/targetedSearchModal.html
index e534d72c3..9daff5ae4 100644
--- a/app/assets/templates/views/targetedSearchModal.html
+++ b/app/assets/templates/views/targetedSearchModal.html
@@ -27,7 +27,8 @@
Find and Rate Missing Documents
@@ -43,11 +44,23 @@ Find and Rate Missing Documents
- Your query {{docFinder.lastQuery}} returned {{docFinder.numFound}} results
-
+ Your query
{{docFinder.lastQuery}} returned
+
+
+
+
+
- Your original query {{query.queryText}} has a total of {{docFinder.numFound}} ratings
+
+
+ for your original query {{query.queryText}}.
From 40d46e4c1316c5394d4e0917448cca1db72b596f Mon Sep 17 00:00:00 2001
From: "epugh@opensourceconnections.com" <>
Date: Fri, 17 Dec 2021 13:26:05 -0500
Subject: [PATCH 2/2] properly reset the docFinder so we can look up our
original rated docs.
---
.../javascripts/controllers/docFinder.js | 3 +-
.../templates/views/targetedSearchModal.html | 103 +++++++++---------
2 files changed, 52 insertions(+), 54 deletions(-)
diff --git a/app/assets/javascripts/controllers/docFinder.js b/app/assets/javascripts/controllers/docFinder.js
index ac00528f9..3d10ba744 100644
--- a/app/assets/javascripts/controllers/docFinder.js
+++ b/app/assets/javascripts/controllers/docFinder.js
@@ -165,10 +165,11 @@ angular.module('QuepidApp')
$scope.resetToAllRatedDocs = function(){
$scope.docFinder.queryText = '';
+ $scope.docFinder.docs = [];
$scope.initializeToRatedDocs();
};
-
+
$scope.initializeToRatedDocs = function() {
// Initialize to rated docs
var fieldSpec = currSettings.createFieldSpec();
diff --git a/app/assets/templates/views/targetedSearchModal.html b/app/assets/templates/views/targetedSearchModal.html
index 9daff5ae4..f5a397d5f 100644
--- a/app/assets/templates/views/targetedSearchModal.html
+++ b/app/assets/templates/views/targetedSearchModal.html
@@ -26,75 +26,72 @@
Find and Rate Missing Documents
-
-
-
-
-
+
+
-
-
- Your query {{docFinder.lastQuery}} returned no results
-
+
+
-
-
- Your query {{docFinder.lastQuery}} returned
-
-
+
+
+ Your query {{docFinder.lastQuery}} returned no results
+
+
+
+ Your query {{docFinder.lastQuery}} returned
+
+
-
-
-
-
- for your original query {{query.queryText}}.
-
+
+
+
+
+ for your original query {{query.queryText}}.
+
-
-
- Changing ratings will affect the query score.
+
-
+
+