[open-ils-commits] r14793 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 5 15:13:48 EST 2009


Author: phasefx
Date: 2009-11-05 15:13:43 -0500 (Thu, 05 Nov 2009)
New Revision: 14793

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/util.js
Log:
We shouldn't expect a fleshed acp.circulations in the staff client

Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js	2009-11-05 20:08:29 UTC (rev 14792)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js	2009-11-05 20:13:43 UTC (rev 14793)
@@ -519,7 +519,7 @@
             'flex' : 1,
             'primary' : false,
             'hidden' : true,
-            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.id() : ( my.acp.circulations() ? my.acp.circulations()[0].id() : ""); },
+            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.id() : ""; },
             'persist' : 'hidden width ordinal'
         },
         {
@@ -869,11 +869,7 @@
                 if (my.circ) {
                     return data.hash.aou[ my.circ.circ_lib() ].shortname();
                 } else {
-                    if (my.acp.circulations()) {
-                        return data.hash.aou[ my.acp.circulations()[0].circ_lib() ].shortname();
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -889,12 +885,7 @@
                 if (my.circ) {
                     return my.circ.xact_start();
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].xact_start();
-                    }
-                    else {
-                        return  "";
-                    }
+                    return  "";
                 }
             }
         },
@@ -910,11 +901,7 @@
                 if (my.circ) {
                     return my.circ.checkin_time();
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].checkin_time();
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -930,11 +917,7 @@
                 if (my.circ) {
                     return my.circ.xact_start().substr(0,10);
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].xact_start().substr(0,10);
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -950,11 +933,7 @@
                 if (my.circ) {
                     return my.circ.checkin_time().substr(0,10);
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].checkin_time().substr(0,10);
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -966,7 +945,7 @@
             'flex' : 1,
             'primary' : false,
             'hidden' : true,
-            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.xact_finish() : ( my.acp.circulations() ? my.acp.circulations()[0].xact_finish() : ""); },
+            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.xact_finish() : ""; },
         },
         {
             'persist' : 'hidden width ordinal',
@@ -980,11 +959,7 @@
                 if (my.circ) {
                     return my.circ.due_date().substr(0,10);
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].due_date().substr(0,10);
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -1000,11 +975,7 @@
                 if (my.circ) {
                     return my.circ.due_date().substr(11,8);
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].due_date().substr(11,8);
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -1120,11 +1091,7 @@
                 if (my.circ) {
                     return my.circ.renewal_remaining();
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].renewal_remaining();
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             },
             'sort_type' : 'number'
@@ -1141,11 +1108,7 @@
                 if (my.circ) {
                     return my.circ.stop_fines();
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].stop_fines();
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -1161,11 +1124,7 @@
                 if (my.circ) {
                     return my.circ.stop_fines_time();
                 } else {
-                    if (my.acp.circulations()) {
-                        return my.acp.circulations()[0].stop_fines_time();
-                    } else {
-                        return "";
-                    }
+                    return "";
                 }
             }
         },
@@ -1261,7 +1220,7 @@
             'flex' : 1,
             'primary' : false,
             'hidden' : true,
-            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.checkin_scan_time().substr(0,10) : ( my.acp.circulations() ? my.acp.circulations()[0].checkin_scan_time().substr(0,10) : ""); },
+            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.checkin_scan_time().substr(0,10) : ""; },
         },
         {
             'persist' : 'hidden width ordinal',
@@ -1271,7 +1230,7 @@
             'flex' : 1,
             'primary' : false,
             'hidden' : true,
-            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.checkin_scan_time() : ( my.acp.circulations() ? my.acp.circulations()[0].checkin_scan_time() : ""); },
+            'editable' : false, 'render' : function(my) { return my.circ ? my.circ.checkin_scan_time() : ""; },
         },
         {
             'persist' : 'hidden width ordinal',



More information about the open-ils-commits mailing list