[open-ils-commits] r16459 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 20 00:54:14 EDT 2010
Author: phasefx
Date: 2010-05-20 00:54:11 -0400 (Thu, 20 May 2010)
New Revision: 16459
Modified:
trunk/Open-ILS/xul/staff_client/server/circ/util.js
Log:
rework these column definitions for pre-cats, since all rows in the list are getting mvr objects now
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2010-05-20 04:54:03 UTC (rev 16458)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2010-05-20 04:54:11 UTC (rev 16459)
@@ -991,8 +991,15 @@
'primary' : false,
'hidden' : true,
'editable' : false, 'render' : function(my) {
- try { return my.mvr.title(); }
- catch(E) { return my.acp.dummy_title(); }
+ if (my.mvr) {
+ if (my.mvr.doc_id() == -1) {
+ return my.acp.dummy_title();
+ } else {
+ return my.mvr.title();
+ }
+ } else {
+ return my.acp.dummy_title();
+ }
}
},
{
@@ -1004,8 +1011,15 @@
'primary' : false,
'hidden' : true,
'editable' : false, 'render' : function(my) {
- try { return my.mvr.author(); }
- catch(E) { return my.acp.dummy_author(); }
+ if (my.mvr) {
+ if (my.mvr.doc_id() == -1) {
+ return my.acp.dummy_author();
+ } else {
+ return my.mvr.author();
+ }
+ } else {
+ return my.acp.dummy_author();
+ }
}
},
{
@@ -1027,8 +1041,15 @@
'primary' : false,
'hidden' : true,
'editable' : false, 'render' : function(my) {
- try { return my.mvr.isbn(); }
- catch(E) { return my.acp.dummy_isbn(); }
+ if (my.mvr) {
+ if (my.mvr.doc_id() == -1) {
+ return my.acp.dummy_isbn();
+ } else {
+ return my.mvr.isbn();
+ }
+ } else {
+ return my.acp.dummy_isbn();
+ }
}
},
{
More information about the open-ils-commits
mailing list