rework these column definitions for pre-cats, since all rows in the list are getting...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 20 May 2010 04:54:11 +0000 (04:54 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 20 May 2010 04:54:11 +0000 (04:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16459 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/util.js

index 089a860..a08239c 100644 (file)
@@ -991,8 +991,15 @@ circ.util.columns = function(modify,params) {
             '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 @@ circ.util.columns = function(modify,params) {
             '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 @@ circ.util.columns = function(modify,params) {
             '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();
+                }
             }
         },
         {