[open-ils-commits] r15842 - in trunk/Open-ILS/web: js/ui/default/acq/common templates/default/acq/common (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 12 19:05:41 EST 2010
Author: senator
Date: 2010-03-12 19:05:41 -0500 (Fri, 12 Mar 2010)
New Revision: 15842
Modified:
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/templates/default/acq/common/detail.tt2
Log:
Acq: fix inaccurate word choice in "related lineitems" link; hide when only 1
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-12 23:46:04 UTC (rev 15841)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-03-13 00:05:41 UTC (rev 15842)
@@ -537,26 +537,30 @@
}
this.drawInfo = function(liId) {
- if (!this.relCache[liId]) {
- fieldmapper.standardRequest(
- [
- "open-ils.acq",
- "open-ils.acq.lineitems_for_bib.by_lineitem_id.count"
- ], {
- "async": true,
- "params": [openils.User.authtoken, liId],
- "onresponse": function(r) {
- self.relCache[liId] = openils.Util.readResponse(r);
- nodeByName(
- "related_number", dojo.byId("acq-lit-info-related")
- ).innerHTML = self.relCache[liId];
+ if (!this._isRelatedViewer) {
+ var d = dojo.byId("acq-lit-info-related");
+ if (!this.relCache[liId]) {
+ fieldmapper.standardRequest(
+ [
+ "open-ils.acq",
+ "open-ils.acq.lineitems_for_bib.by_lineitem_id.count"
+ ], {
+ "async": true,
+ "params": [openils.User.authtoken, liId],
+ "onresponse": function(r) {
+ self.relCache[liId] = openils.Util.readResponse(r);
+ nodeByName("related_number", d).innerHTML =
+ self.relCache[liId];
+ openils.Util[
+ self.relCache[liId] >1 ? "show" : "hide"
+ ](d);
+ }
}
- }
- );
- } else {
- nodeByName(
- "related_number", dojo.byId("acq-lit-info-related")
- ).innerHTML = this.relCache[liId];
+ );
+ } else {
+ nodeByName("related_number", d).innerHTML = this.relCache[liId];
+ openils.Util[this.relCache[liId] > 1 ? "show" : "hide"](d);
+ }
}
this.show('info');
@@ -629,10 +633,8 @@
this.infoTbody.appendChild(row);
}
- var rel_div = dojo.byId("acq-lit-info-related");
- nodeByName("rel_link", rel_div).href =
+ nodeByName("rel_link", dojo.byId("acq-lit-info-related")).href =
"/eg/acq/lineitem/related/" + li.id();
- openils.Util.show(rel_div);
}
if(li.eg_bib_id()) {
Modified: trunk/Open-ILS/web/templates/default/acq/common/detail.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/detail.tt2 2010-03-12 23:46:04 UTC (rev 15841)
+++ trunk/Open-ILS/web/templates/default/acq/common/detail.tt2 2010-03-13 00:05:41 UTC (rev 15842)
@@ -13,7 +13,7 @@
</div>
[% IF which == "Lit" %]
<div class="hidden" id="acq-[% which_lc %]-info-related">
- Show the <a name="rel_link" href="#"><span name="related_number"></span> other lineitem(s)</a> related to this bibliographic record.
+ Show the <a name="rel_link" href="#"><span name="related_number"></span> lineitem(s)</a> related to the same bibliographic record.
</div>
<div style="margin-top:40px;">
<h3 id="acq-[% which_lc %]-marc-order-record-label">MARC Order Record</h3>
More information about the open-ils-commits
mailing list