From: senator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Tue, 2 Mar 2010 19:42:26 +0000 (+0000)
Subject: Acq: Indicate presence of alerts among notes in lineitem table interface
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e31c33958f723452128b714e9a73e549b970c618;p=contrib%2FConifer.git

Acq: Indicate presence of alerts among notes in lineitem table interface

Italicize the notes link and mark it with a red flag character when the notes
associated with a given lineitem have alert texts linked to them.


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

diff --git a/Open-ILS/web/css/skin/default/acq.css b/Open-ILS/web/css/skin/default/acq.css
index 0aa12ab71e..e3d1872385 100644
--- a/Open-ILS/web/css/skin/default/acq.css
+++ b/Open-ILS/web/css/skin/default/acq.css
@@ -143,6 +143,7 @@ label[for="attr_search_type_scalar"] { vertical-align: top; }
 #acq-lit-alert-value { height: 5em; width: 20em; }
 .acq-lit-note-row { margin: 6px 0; }
 span[name="alert_code"] {color: #c00;padding-right: 1em;font-weight: bold;}
+span[name="notes_alert_flag"] {color: #c00;font-weight: bold;font-size: 110%;margin: 0 7px;}
 
 .acq-lit-li-menu-bar {width:99%; text-align:left; border:1px solid #aaa; margin:5px 0px 10px 0px;}
 .acq-lit-li-menu-left {text-align:left; width:300px;}
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 4702426b8e..478edaee5b 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
@@ -271,6 +271,16 @@ function AcqLiTable() {
     this.updateLiNotesCount = function(li, row) {
         if (typeof(row) == "undefined")
             row = dojo.query('tr[li="' + li.id() + '"]', "acq-lit-tbody")[0];
+
+        var has_notes = (li.lineitem_notes().filter(
+                function(o) { return Boolean (o.alert_text()); }
+            ).length > 0);
+
+        /* U+2691 is the code point for a filled-in flag character */
+        nodeByName("notes_alert_flag", row).innerHTML =
+             has_notes ? "&#x2691;" : "";
+        nodeByName("noteslink", row).style.fontStyle =
+            has_notes ? "italic" : "normal";
         nodeByName("notes_count", row).innerHTML = li.lineitem_notes().length;
     };
 
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 c5891d7ead..8e4fff35d5 100644
--- a/Open-ILS/web/templates/default/acq/common/li_table.tt2
+++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2
@@ -96,8 +96,7 @@
                     </td>
                     <td><a name='copieslink' href='javascript:void(0);'>Copies(<span name='count'>0</span>)</a></td>
                     <td>
-                        <a name='noteslink' href='javascript:void(0);' 
-                            style='margin-right:15px;'>Notes(<span name='notes_count'>0</span>)</a>
+                        <a name='noteslink' href='javascript:void(0);'>Notes(<span name='notes_count'>0</span>)</a><span name="notes_alert_flag"></span>
                     </td>
                     <td><span name='li_state'></span></td>
                     <td><input type='text' size='8' name='price'/></td>