From: senator Date: Mon, 22 Feb 2010 22:23:33 +0000 (+0000) Subject: Acq: optionally associate an alert with lineitem note when creating the latter. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3a613b5b4099e3cef48ded9ffeee36da904480fe;p=evergreen%2Fpines.git Acq: optionally associate an alert with lineitem note when creating the latter. git-svn-id: svn://svn.open-ils.org/ILS/trunk@15623 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 3ae2d80ead..3cea4fb573 100644 --- a/Open-ILS/web/css/skin/default/acq.css +++ b/Open-ILS/web/css/skin/default/acq.css @@ -140,6 +140,7 @@ label[for="attr_search_type_scalar"] { vertical-align: top; } .acq-lit-note-textarea { border-right: 2px solid #aaa; width:50%;} .acq-lit-note-textarea div { padding: 4px; font-weight: bold; } #acq-lit-notes-tbody td {padding: 20px 10px 20px 10px; border-bottom:2px solid #aaa;} +.acq-lit-note-create-row { margin: 6px 0; } .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 015d867f44..6f0416abb3 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 @@ -311,12 +311,30 @@ function AcqLiTable() { }; + this._setAlertStore = function() { + acqLitNoteAlertSelector.store = new dojo.data.ItemFileReadStore( + { + "data": acqliat.toStoreData( + (new openils.PermaCrud()).search( + "acqliat", {"id": {"!=": null}} + ) + ) + } + ); + acqLitNoteAlertSelector.setValue(); /* make the store "live" */ + acqLitNoteAlertSelector._store_ready = true; + }; + /** * Draws and shows the lineitem notes pane */ this.drawLiNotes = function(li) { var self = this; + if (!acqLitNoteAlertSelector._store_ready) { + this._setAlertStore(); + } + li.lineitem_notes( li.lineitem_notes().sort( function(a, b) { @@ -337,6 +355,9 @@ function AcqLiTable() { note.isnew(true); note.value(value); note.lineitem(li.id()); + if (acqLitNoteAlertSelector.item) + note.alert_text(Number(acqLitNoteAlertSelector.item.id)); + self.updateLiNotes(li, note); } 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 0e3f878fbd..96bdd48414 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -142,8 +142,13 @@
New Note
-
-
+
+ +
+
+
+ +