From bf91e76a5aa38bfeae0c63ed1d2d27943051fb5d Mon Sep 17 00:00:00 2001
From: Bill Erickson <berick@esilibrary.com>
Date: Thu, 22 Mar 2012 11:53:55 -0400
Subject: [PATCH] PermaCrud.js flesh support

Now that open-ils.pcrud supports fleshing, allow flesh params to pass
through PermaCrud.js

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
---
 Open-ILS/web/js/dojo/openils/PermaCrud.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Open-ILS/web/js/dojo/openils/PermaCrud.js b/Open-ILS/web/js/dojo/openils/PermaCrud.js
index 1869248ddc..ca3835772e 100644
--- a/Open-ILS/web/js/dojo/openils/PermaCrud.js
+++ b/Open-ILS/web/js/dojo/openils/PermaCrud.js
@@ -148,6 +148,8 @@ if(!dojo._hasResource["openils.PermaCrud"]) {
             if (opts.limit) order_by.limit = opts.limit;
             if (opts.offset) order_by.offset = opts.offset;
             if (opts.join) order_by.join = opts.join;
+            if (opts.flesh) order_by.flesh = opts.flesh;
+            if (opts.flesh_fields) order_by.flesh_fields = opts.flesh_fields;
             
             var method = 'open-ils.pcrud.search.' + fm_class;
             if(!opts.streaming) method += '.atomic';
@@ -196,6 +198,8 @@ if(!dojo._hasResource["openils.PermaCrud"]) {
             if (opts.limit) order_by.limit = opts.limit;
             if (opts.offset) order_by.offset = opts.offset;
             if (opts.join) order_by.join = opts.join;
+            if (opts.flesh) order_by.flesh = opts.flesh;
+            if (opts.flesh_fields) order_by.flesh_fields = opts.flesh_fields;
             if (opts.id_list) return_type = 'id_list';
 
             var method = 'open-ils.pcrud.' + return_type + '.' + fm_class;
-- 
2.11.0