From 360565f9cf58a34498d360ebda38e6123d291d85 Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 28 Jul 2006 20:43:29 +0000 Subject: [PATCH] change items in in items out :) git-svn-id: svn://svn.open-ils.org/ILS/trunk@5162 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/items.js | 15 ++++++++++----- Open-ILS/xul/staff_client/server/patron/items_overlay.xul | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js index ac14077434..633149c75a 100644 --- a/Open-ILS/xul/staff_client/server/patron/items.js +++ b/Open-ILS/xul/staff_client/server/patron/items.js @@ -475,18 +475,20 @@ patron.items.prototype = { obj.error.standard_unexpected_error_alert('Error retrieving circulations.',E); } obj.checkouts = []; + obj.checkouts2 = []; obj.checkouts = obj.checkouts.concat( robj.long_overdue ); obj.checkouts = obj.checkouts.concat( robj.overdue ); - obj.checkouts = obj.checkouts.concat( robj.lost ); - obj.checkouts = obj.checkouts.concat( robj.claims_returned ); + obj.checkouts2 = obj.checkouts2.concat( robj.claims_returned ); + obj.checkouts2 = obj.checkouts2.concat( robj.lost ); obj.checkouts = obj.checkouts.concat( robj.out ); } - function gen_list_append(circ_id) { + function gen_list_append(circ_id,which_list) { return function() { try { var checkout = obj.network.simple_request('FM_CIRC_RETRIEVE_VIA_ID',[ ses(), circ_id]); - switch( checkout.checkin_time() ? 1 : 0 ) { + //switch( checkout.checkin_time() ? 1 : 0 ) { + switch(which_list) { case 1: obj.list2.append( { 'row' : { 'my' : { 'circ' : checkout, } }, } ); break; @@ -505,7 +507,10 @@ patron.items.prototype = { JSAN.use('util.exec'); var exec = new util.exec(); var rows = []; for (var i in obj.checkouts) { - rows.push( gen_list_append(obj.checkouts[i]) ); + rows.push( gen_list_append(obj.checkouts[i],0) ); + } + for (var i in obj.checkouts2) { + rows.push( gen_list_append(obj.checkouts2[i],1) ); } exec.chain( rows ); if (!dont_show_me_the_list_change) { diff --git a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul index 5b267e1930..11de17619a 100644 --- a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul @@ -43,7 +43,7 @@ - + -- 2.11.0