Acq: Indicate presence of alerts among notes in lineitem table interface
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Mar 2010 19:42:26 +0000 (19:42 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 2 Mar 2010 19:42:26 +0000 (19:42 +0000)
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

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

index 0aa12ab..e3d1872 100644 (file)
@@ -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;}
index 4702426..478edae 100644 (file)
@@ -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;
     };
 
index c5891d7..8e4fff3 100644 (file)
@@ -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>