From bae1ec5dd89662529127eab766ba100afe53c618 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Fri, 20 May 2011 18:12:58 -0400 Subject: [PATCH] Show the "match score," a hopefully clearer term for match point quality, in the expression tree UI Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/web/js/dojo/openils/vandelay/nls/match_set.js | 3 ++- .../web/js/ui/default/conify/global/vandelay/match_set.js | 14 +++++++++++--- .../default/conify/global/vandelay/match_set_tree.tt2 | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/vandelay/nls/match_set.js b/Open-ILS/web/js/dojo/openils/vandelay/nls/match_set.js index 92851d2a54..be2c79bc30 100644 --- a/Open-ILS/web/js/dojo/openils/vandelay/nls/match_set.js +++ b/Open-ILS/web/js/dojo/openils/vandelay/nls/match_set.js @@ -11,5 +11,6 @@ "FAULTY_MARC": "A MARC tag must be identified by three digits, and the subfield must be one non-whitespace, non-control character.", "WORKING_MP_HERE": "Choose from among the three buttons above to add a new match point.", "WORKING_QM_HERE": "Use buttons above and to the right to add new quality metrics.", - "SVF": "Record Attribute" + "SVF": "Record Attribute", + "MATCH_SCORE": "Match score ${0}" } diff --git a/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js b/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js index 28f30b51a1..87656a3959 100644 --- a/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js +++ b/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js @@ -339,19 +339,27 @@ function find_crad_by_name(name) { } function render_vmsp_label(point, minimal) { - /* "minimal" has this implication: + /* "minimal" has these implications: * for svf, only show the code, not the longer label. + * no quality display */ if (point.bool_op()) { return point.bool_op(); } else if (point.svf()) { return (openils.Util.isTrue(point.negate()) ? "NOT " : "") + ( minimal ? point.svf() : - (point.svf() + " / " + find_crad_by_name(point.svf()).label()) + (point.svf() + " / " + find_crad_by_name(point.svf()).label()) + + " | " + dojo.string.substitute( + localeStrings.MATCH_SCORE, [point.quality()] + ) ); } else { return (openils.Util.isTrue(point.negate()) ? "NOT " : "") + - point.tag() + " \u2021" + point.subfield(); + point.tag() + " \u2021" + point.subfield() + (minimal ? "" : " | " + + dojo.string.substitute( + localeStrings.MATCH_SCORE, [point.quality()] + ) + ); } } diff --git a/Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2 b/Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2 index 99367c0e38..cc5c7880c2 100644 --- a/Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2 +++ b/Open-ILS/web/templates/default/conify/global/vandelay/match_set_tree.tt2 @@ -61,7 +61,7 @@ -- 2.11.0