From: senator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Tue, 2 Mar 2010 23:05:16 +0000 (+0000)
Subject: Acq: add a tooltip to show lineitem alert text description along with code
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bb9cb0683733c84488ea74410c0ec51a7730fa29;p=contrib%2FConifer.git

Acq: add a tooltip to show lineitem alert text description along with code


git-svn-id: svn://svn.open-ils.org/ILS/trunk@15667 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index 478edaee5b..8efb7d9c2c 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -410,8 +410,18 @@ function AcqLiTable() {
         var self = this;
         var row = self.liNotesRow.cloneNode(true);
         nodeByName("value", row).innerHTML = note.value();
-        if (note.alert_text())
-            nodeByName("alert_code", row).innerHTML = note.alert_text().code();
+        var alert_node = nodeByName("alert_code", row);
+        if (note.alert_text()) {
+            alert_node.innerHTML = note.alert_text().code();
+            if (note.alert_text().description()) {
+                new dijit.Tooltip(
+                    {
+                        "connectId": [alert_node],
+                        "label": note.alert_text().description()
+                    }, dojo.create("span", null, alert_node, "after")
+                );
+            }
+        }
 
         nodeByName("delete", row).onclick = function() {
             note.isdeleted(true);
diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2
index 8e4fff35d5..2640fc8031 100644
--- a/Open-ILS/web/templates/default/acq/common/li_table.tt2
+++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2
@@ -151,11 +151,11 @@
                             <span>New Alert</span>
                             <div dojoType="dijit.TooltipDialog">
                                 <div class="acq-lit-note-row">
-                                    <label for="acq-lit-alert-alert-text">Choose alert code &nbsp;</label>
+                                    <label for="acq-lit-alert-alert-text">Choose alert code &nbsp;&nbsp;</label>
                                     <input id="acq-lit-alert-alert-text" jsId="acqLitAlertAlertText" dojoType="dijit.form.FilteringSelect" labelAttr="code" searchAttr="code" required="true" />
                                 </div>
                                 <div class="acq-lit-note-row">
-                                    <label for="acq-lit-alert-value">Optional description</label>
+                                    <label for="acq-lit-alert-value">Additional comments</label>
                                     <div jsId="acqLitAlertNoteValue" id="acq-lit-alert-value" dojoType="dijit.form.Textarea" name="value"></div>
                                 </div>
                                 <button jsId="acqLitCreateAlertSubmit" dojoType="dijit.form.Button" type="submit">Create</button>