Acq: add a tooltip to show lineitem alert text description along with code
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Mar 2010 23:05:16 +0000 (23:05 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Mar 2010 23:05:16 +0000 (23:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15667 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/templates/default/acq/common/li_table.tt2

index 478edae..8efb7d9 100644 (file)
@@ -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);
index 8e4fff3..2640fc8 100644 (file)
                             <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>