get rid of Barcode column in patron search
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Sep 2006 00:23:40 +0000 (00:23 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Sep 2006 00:23:40 +0000 (00:23 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5909 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/search_result.js
Open-ILS/xul/staff_client/server/patron/util.js

index b076e59..bf78f52 100644 (file)
@@ -33,6 +33,11 @@ patron.search_result.prototype = {
                                'first_given_name' : { 'hidden' : 'false' },
                                'second_given_name' : { 'hidden' : 'false' },
                                'dob' : { 'hidden' : 'false' },
+                       },
+                       {
+                               'except_these' : [
+                                       'barcode',
+                               ],
                        }
                );
                obj.list.init(
index ff8def2..8c55ee2 100644 (file)
@@ -91,7 +91,16 @@ patron.util.mbts_columns = function(modify,params) {
                                var x = util.functional.find_list(c,function(d){return(d.id==params.just_these[i]);});
                                new_c.push( function(y){ return y; }( x ) );
                        }
-                       return new_c;
+                       c = new_c;
+               }
+               if (params.except_these) {
+                       JSAN.use('util.functional');
+                       var new_c = [];
+                       for (var i = 0; i < c.length; i++) {
+                               var x = util.functional.find_list(params.except_these,function(d){return(d==c[i].id);});
+                               if (!x) new_c.push(c[i]);
+                       }
+                       c = new_c;
                }
        }
        return c.sort( function(a,b) { if (a.label < b.label) return -1; if (a.label > b.label) return 1; return 0; } );
@@ -158,8 +167,18 @@ patron.util.mb_columns = function(modify,params) {
                                var x = util.functional.find_list(c,function(d){return(d.id==params.just_these[i]);});
                                new_c.push( function(y){ return y; }( x ) );
                        }
-                       return new_c;
+                       c = new_c;
+               }
+               if (params.except_these) {
+                       JSAN.use('util.functional');
+                       var new_c = [];
+                       for (var i = 0; i < c.length; i++) {
+                               var x = util.functional.find_list(params.except_these,function(d){return(d==c[i].id);});
+                               if (!x) new_c.push(c[i]);
+                       }
+                       c = new_c;
                }
+
        }
        return c.sort( function(a,b) { if (a.label < b.label) return -1; if (a.label > b.label) return 1; return 0; } );
 }
@@ -221,8 +240,18 @@ patron.util.mp_columns = function(modify,params) {
                                var x = util.functional.find_list(c,function(d){return(d.id==params.just_these[i]);});
                                new_c.push( function(y){ return y; }( x ) );
                        }
-                       return new_c;
+                       c = new_c;
                }
+               if (params.except_these) {
+                       JSAN.use('util.functional');
+                       var new_c = [];
+                       for (var i = 0; i < c.length; i++) {
+                               var x = util.functional.find_list(params.except_these,function(d){return(d==c[i].id);});
+                               if (!x) new_c.push(c[i]);
+                       }
+                       c = new_c;
+               }
+
        }
        return c.sort( function(a,b) { if (a.label < b.label) return -1; if (a.label > b.label) return 1; return 0; } );
 }
@@ -364,8 +393,18 @@ patron.util.columns = function(modify,params) {
                                var x = util.functional.find_list(c,function(d){return(d.id==params.just_these[i]);});
                                new_c.push( function(y){ return y; }( x ) );
                        }
-                       return new_c;
+                       c = new_c;
                }
+               if (params.except_these) {
+                       JSAN.use('util.functional');
+                       var new_c = [];
+                       for (var i = 0; i < c.length; i++) {
+                               var x = util.functional.find_list(params.except_these,function(d){return(d==c[i].id);});
+                               if (!x) new_c.push(c[i]);
+                       }
+                       c = new_c;
+               }
+
        }
        return c.sort( function(a,b) { if (a.label < b.label) return -1; if (a.label > b.label) return 1; return 0; } );
 }