From: phasefx Date: Thu, 20 May 2010 04:54:11 +0000 (+0000) Subject: rework these column definitions for pre-cats, since all rows in the list are getting... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b83f6111636ad29376de903c888e1b8ce384e508;p=evergreen%2Fmasslnc.git rework these column definitions for pre-cats, since all rows in the list are getting mvr objects now git-svn-id: svn://svn.open-ils.org/ILS/trunk@16459 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 089a860f32..a08239cdff 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -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(); + } } }, {