[open-ils-commits] r15951 - in trunk/Open-ILS/web: css/skin/default js/dojo/openils/acq/nls js/ui/default/acq/common js/ui/default/acq/lineitem templates/default/acq/common templates/default/acq/lineitem (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 24 13:32:41 EDT 2010
Author: senator
Date: 2010-03-24 13:32:37 -0400 (Wed, 24 Mar 2010)
New Revision: 15951
Added:
trunk/Open-ILS/web/js/ui/default/acq/lineitem/worksheet.js
trunk/Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2
Modified:
trunk/Open-ILS/web/css/skin/default/acq.css
trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
Acq: Add access to lineitem worksheet from LI table interfaces.
Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css 2010-03-24 16:58:29 UTC (rev 15950)
+++ trunk/Open-ILS/web/css/skin/default/acq.css 2010-03-24 17:32:37 UTC (rev 15951)
@@ -149,7 +149,11 @@
.acq-lit-distrib-applied-row th { border-bottom: 1px #999 solid;padding-bottom: 4px;}
.acq-lit-table-spacer { height:20px; }
.acq-lit-row td[name="selector"] { width:1.5em; font-weight:bold; color:blue; font-size:110%;}
+span[name="worksheet"] { padding: 0 6px; }
+#acq-worksheet-contents thead th { font-weight: bold; background-color: #ccc; text-align: center; border-bottom: 1px #000 solid; border-right: 1px #000 solid; padding: 0 6px; }
+#acq-worksheet-contents tbody td { text-align: left; vertical-align: top; border: 1px #999 inset; padding: 0 2px; }
+
.acq-menu-bar {width:99%; text-align:left; border:1px solid #aaa; margin:5px 0px 10px 0px;}
.acq-notes-note-row { margin: 6px 0; }
#acq-po-notes-tbody li { margin-bottom:10px; border:1px solid #aaa; -moz-border-radius: 5px 5px 5px 5px; }
Modified: trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js 2010-03-24 16:58:29 UTC (rev 15950)
+++ trunk/Open-ILS/web/js/dojo/openils/acq/nls/acq.js 2010-03-24 17:32:37 UTC (rev 15951)
@@ -37,5 +37,6 @@
'NO' : "No",
'VENDOR_SAYS_PREPAY_NOT_NEEDED': "The selected vendor does not necessarily require prepayment, according\nto records. Require prepayment on this PO anyway?",
'VENDOR_SAYS_PREPAY_NEEDED': "The selected vendor requires prepayment, according to records.\nProceed anyway without required prepayment on this PO?",
- 'PREPAYMENT_REQUIRED_REMINDER': "This PO requires prepayment. Are you certain you're ready to activate it?"
+ 'PREPAYMENT_REQUIRED_REMINDER': "This PO requires prepayment. Are you certain you're ready to activate it?",
+ 'LI_FORMAT_ERROR': "Unexpected error retrieving formatted lineitem information."
}
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-03-24 16:58:29 UTC (rev 15950)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-03-24 17:32:37 UTC (rev 15951)
@@ -205,6 +205,9 @@
dojo.query('[name=jacket]', row)[0].setAttribute('src', '/opac/extras/ac/jacket/small/' + isbn);
}
+ nodeByName("worksheet_link", row).href =
+ "/eg/acq/lineitem/worksheet/" + li.id();
+
dojo.query('[attr=title]', row)[0].onclick = function() {self.drawInfo(li.id())};
dojo.query('[name=copieslink]', row)[0].onclick = function() {self.drawCopies(li.id())};
dojo.query('[name=noteslink]', row)[0].onclick = function() {self.drawLiNotes(li)};
Added: trunk/Open-ILS/web/js/ui/default/acq/lineitem/worksheet.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/lineitem/worksheet.js (rev 0)
+++ trunk/Open-ILS/web/js/ui/default/acq/lineitem/worksheet.js 2010-03-24 17:32:37 UTC (rev 15951)
@@ -0,0 +1,22 @@
+dojo.require("openils.Util");
+
+function load() {
+ fieldmapper.standardRequest(
+ ["open-ils.acq", "open-ils.acq.lineitem.format"], {
+ "params": [openils.User.authtoken, liId, "html"],
+ "async": true,
+ "oncomplete": function(r) {
+ r = openils.Util.readResponse(r);
+ var d = dojo.byId("acq-worksheet-contents");
+ if (r.template_output())
+ d.innerHTML = r.template_output().data();
+ else if (r.error_output())
+ d.innerHTML = r.error_output().data();
+ else
+ d.innerHTML = localeStrings.LI_FORMAT_ERROR;
+ }
+ }
+ );
+}
+
+openils.Util.addOnLoad(load);
Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2010-03-24 16:58:29 UTC (rev 15950)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2 2010-03-24 17:32:37 UTC (rev 15951)
@@ -76,6 +76,7 @@
<td rowspan='2' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></img></td>
<td style='width:70%;font-weight:bold;'>
<a attr='title' href='javascript:void(0);'></a>
+ <span name="worksheet">(<a name="worksheet_link" href="javascript:void(0);">✍</a>)</span>
<span name='pl' class='hidden'>(<a name='pl_link' href='javascript:void(0);'></a>)</span>
<span name='po' class='hidden'>(<a name='po_link' href='javascript:void(0);'>PO</a>)</span>
</td>
Added: trunk/Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2 (rev 0)
+++ trunk/Open-ILS/web/templates/default/acq/lineitem/worksheet.tt2 2010-03-24 17:32:37 UTC (rev 15951)
@@ -0,0 +1,7 @@
+[% WRAPPER "default/base.tt2" %]
+[% ctx.page_title = "Lineitem Worksheet" %]
+<script src="[% ctx.media_prefix %]/js/ui/default/acq/lineitem/worksheet.js"></script>
+<script type="text/javascript">var liId = "[% ctx.page_args.0 %]";</script>
+<h1>Lineitem Worksheet</h1>
+<div id="acq-worksheet-contents"></div>
+[% END %]
More information about the open-ils-commits
mailing list