as promised, moving ACQ JS from the Pylons section of the repo into the global JS...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Apr 2008 17:40:54 +0000 (17:40 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Apr 2008 17:40:54 +0000 (17:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9405 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/acq/CurrencyType.js [new file with mode: 0644]
Open-ILS/web/js/dojo/openils/acq/Fund.js [new file with mode: 0644]
Open-ILS/web/js/dojo/openils/acq/FundingSource.js [new file with mode: 0644]
Open-ILS/web/js/dojo/openils/acq/Picklist.js [new file with mode: 0644]
Open-ILS/web/js/dojo/openils/acq/Provider.js [new file with mode: 0644]
Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js [deleted file]
Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js [deleted file]
Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js [deleted file]
Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js [deleted file]
Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js [deleted file]

diff --git a/Open-ILS/web/js/dojo/openils/acq/CurrencyType.js b/Open-ILS/web/js/dojo/openils/acq/CurrencyType.js
new file mode 100644 (file)
index 0000000..c041b3e
--- /dev/null
@@ -0,0 +1,43 @@
+/* ---------------------------------------------------------------------------
+ * Copyright (C) 2008  Georgia Public Library Service
+ * Bill Erickson <erickson@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ */
+
+if(!dojo._hasResource["openils.acq.CurrencyType"]) {
+
+    dojo._hasResource["openils.acq.CurrencyType"] = true;
+    dojo.provide("openils.acq.CurrencyType");
+    dojo.declare('openils.acq.CurrencyType', null, {
+    });
+
+    openils.acq.CurrencyType.cache = {};
+
+    /**
+     * Retrieves all of the currency types
+     */
+    openils.acq.CurrencyType.fetchAll = function(onComplete) {
+        var req = new OpenSRF.ClientSession('open-ils.acq').request(
+            'open-ils.acq.currency_type.all.retrieve', openils.User.authtoken);
+
+        req.oncomplete = function(r) {
+            var msg = r.recv();
+            var types = msg.content();
+            for(var i in types) 
+                openils.acq.CurrencyType.cache[types[i].code()] = types[i];
+            onComplete(types);
+        }
+        req.send();
+    }
+}
+
diff --git a/Open-ILS/web/js/dojo/openils/acq/Fund.js b/Open-ILS/web/js/dojo/openils/acq/Fund.js
new file mode 100644 (file)
index 0000000..621cac8
--- /dev/null
@@ -0,0 +1,57 @@
+/* ---------------------------------------------------------------------------
+ * Copyright (C) 2008  Georgia Public Library Service
+ * Bill Erickson <erickson@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ */
+
+if(!dojo._hasResource['openils.acq.Fund']) {
+dojo._hasResource['openils.acq.Fund'] = true;
+dojo.provide('openils.acq.Fund');
+dojo.require('util.Dojo');
+
+/** Declare the Fund class with dojo */
+dojo.declare('openils.acq.Fund', null, {
+    /* add instance methods here if necessary */
+});
+
+
+openils.acq.Fund.loadGrid = function(domId, columns) {
+    /** Fetches the list of funds and builds a grid from them */
+
+    var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request('open-ils.acq.fund.org.retrieve', 
+        openils.User.authtoken, null, {flesh_summary:1});
+
+    req.oncomplete = function(r) {
+        var msg
+        gridRefs.grid.setModel(gridRefs.model);
+        while(msg = r.recv()) {
+            var fund = msg.content();
+            gridRefs.store.newItem({
+                id:fund.id(),
+                name:fund.name(), 
+                org: findOrgUnit(fund.org()).name(),
+                currency_type:fund.currency_type(),
+                year:fund.year(),
+                combined_balance:fund.summary()['combined_balance']
+            });
+        }
+        gridRefs.grid.update();
+    };
+
+    req.send();
+    return gridRefs.grid;
+};
+}
+
diff --git a/Open-ILS/web/js/dojo/openils/acq/FundingSource.js b/Open-ILS/web/js/dojo/openils/acq/FundingSource.js
new file mode 100644 (file)
index 0000000..624bbfd
--- /dev/null
@@ -0,0 +1,125 @@
+/* ---------------------------------------------------------------------------
+ * Copyright (C) 2008  Georgia Public Library Service
+ * Bill Erickson <erickson@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ */
+
+if(!dojo._hasResource['openils.acq.FundingSource']) {
+dojo._hasResource['openils.acq.FundingSource'] = true;
+dojo.provide('openils.acq.FundingSource');
+
+/** Declare the FundingSource class with dojo */
+dojo.declare('openils.acq.FundingSource', null, {
+    /* add instance methods here if necessary */
+});
+
+/** cached funding_source objects */
+openils.acq.FundingSource.cache = {};
+
+openils.acq.FundingSource.createStore = function(onComplete) {
+    /** Fetches the list of funding_sources and builds a grid from them */
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request('open-ils.acq.funding_source.org.retrieve', 
+        openils.User.authtoken, null, {flesh_summary:1});
+
+    req.oncomplete = function(r) {
+        var msg
+        var items = [];
+        var src = null;
+        while(msg = r.recv()) {
+            src = msg.content();
+            openils.acq.FundingSource.cache[src.id()] = src;
+            items.push(src);
+        }
+        onComplete(acqfs.toStoreData(items));
+    };
+
+    req.send();
+};
+
+
+
+/**
+ * Create a new funding source object
+ * @param fields Key/value pairs used to create the new funding source
+ */
+openils.acq.FundingSource.create = function(fields, onCreateComplete) {
+
+    var fs = new acqfs()
+    for(var field in fields) 
+        fs[field](fields[field]);
+
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request('open-ils.acq.funding_source.create', openils.User.authtoken, fs);
+
+    req.oncomplete = function(r) {
+        var msg = r.recv();
+        var id = msg.content();
+        if(onCreateComplete)
+            onCreateComplete(id);
+    };
+    req.send();
+};
+
+
+openils.acq.FundingSource.createCredit = function(fields, onCreateComplete) {
+
+    var fsc = new acqfscred()
+    for(var field in fields) 
+        fsc[field](fields[field]);
+
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request(
+        'open-ils.acq.funding_source_credit.create', openils.User.authtoken, fsc);
+
+    req.oncomplete = function(r) {
+        var msg = r.recv();
+        var id = msg.content();
+        if(onCreateComplete)
+            onCreateComplete(id);
+    };
+    req.send();
+};
+
+
+openils.acq.FundingSource.deleteFromGrid = function(grid, onComplete) {
+    var list = []
+    var selected = grid.selection.getSelected();
+    for(var rowIdx in selected) 
+        list.push(grid.model.getDatum(selected[rowIdx], 0));
+    openils.acq.FundingSource.deleteList(list, onComplete);
+};
+
+openils.acq.FundingSource.deleteList = function(list, onComplete) {
+    openils.acq.FundingSource._deleteList(list, 0, onComplete);
+}
+
+openils.acq.FundingSource._deleteList = function(list, idx, onComplete) {
+    if(idx >= list.length)    
+        return onComplete();
+
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request('open-ils.acq.funding_source.delete', openils.User.authtoken, list[idx]);
+    delete openils.acq.FundingSource.cache[list[idx]];
+
+    req.oncomplete = function(r) {
+        msg = r.recv()
+        stat = msg.content();
+        /* XXX CHECH FOR EVENT */
+        openils.acq.FundingSource._deleteList(list, ++idx, onComplete);
+    }
+    req.send();
+};
+
+
+} /* end dojo._hasResource[] */
diff --git a/Open-ILS/web/js/dojo/openils/acq/Picklist.js b/Open-ILS/web/js/dojo/openils/acq/Picklist.js
new file mode 100644 (file)
index 0000000..ad31894
--- /dev/null
@@ -0,0 +1,52 @@
+if(!dojo._hasResource['openils.acq.Picklist']) {
+dojo._hasResource['openils.acq.Picklist'] = true;
+dojo.provide('openils.acq.Picklist');
+dojo.require('util.Dojo');
+
+/** Declare the Picklist class with dojo */
+dojo.declare('openils.acq.Picklist', null, {
+    /* add instance methods here if necessary */
+});
+
+    openils.acq.Picklist.find_attr = function(li, at_name, at_type) {
+       for (var i in li.attributes()) {
+           var attr = li.attributes()[i];
+           if (attr.attr_type() == at_type && attr.attr_name() == at_name) {
+               return attr.attr_value();
+           }
+       }
+       return '';
+    };
+
+
+    openils.acq.Picklist.loadGrid = function(domId, columns, pl_id) {
+    /** Fetches the list of picklists and builds a grid from them */
+
+    var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request('open-ils.acq.lineitem.picklist.retrieve', 
+        openils.User.authtoken, pl_id, {flesh_attrs:1});
+
+    req.oncomplete = function(r) {
+        var msg
+        gridRefs.grid.setModel(gridRefs.model);
+        gridRefs.model.query = {id:'*'};
+        while(msg = r.recv()) {
+            var jub = msg.content();
+           //alert(js2JSON(jub));
+            gridRefs.store.newItem({
+                   id:jub.id(),
+                   title:openils.acq.Picklist.find_attr(jub, "title", "lineitem_marc_attr_definition"),
+                   price:openils.acq.Picklist.find_attr(jub, "price", "lineitem_marc_attr_definition"),
+                   provider:jub.provider(),
+                   copies:jub.item_count()
+               });
+        }
+        gridRefs.grid.update();
+    };
+
+    req.send();
+    return gridRefs.grid;
+};
+}
+
diff --git a/Open-ILS/web/js/dojo/openils/acq/Provider.js b/Open-ILS/web/js/dojo/openils/acq/Provider.js
new file mode 100644 (file)
index 0000000..523ba85
--- /dev/null
@@ -0,0 +1,55 @@
+/* ---------------------------------------------------------------------------
+ * Copyright (C) 2008  Georgia Public Library Service
+ * Bill Erickson <erickson@esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * ---------------------------------------------------------------------------
+ */
+
+if(!dojo._hasResource['openils.acq.Provider']) {
+dojo._hasResource['openils.acq.Provider'] = true;
+dojo.provide('openils.acq.Provider');
+dojo.require('util.Dojo');
+
+/** Declare the Provider class with dojo */
+dojo.declare('openils.acq.Provider', null, {
+    /* add instance methods here if necessary */
+});
+
+/* define some static provider methods ------- */
+
+openils.acq.Provider.loadGrid = function(domId, columns) {
+    /** Fetches the list of providers and builds a grid from them */
+
+    var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
+    var ses = new OpenSRF.ClientSession('open-ils.acq');
+    var req = ses.request('open-ils.acq.provider.org.retrieve', openils.User.authtoken);
+
+    req.oncomplete = function(r) {
+        var msg
+        gridRefs.grid.setModel(gridRefs.model);
+        while(msg = r.recv()) {
+            var prov = msg.content();
+            gridRefs.store.newItem({
+                id:prov.id(),
+                name:prov.name(), 
+                owner: findOrgUnit(prov.owner()).name(),
+                currency_type:prov.currency_type()
+            });
+        }
+        gridRefs.grid.update();
+    };
+
+    req.send();
+    return gridRefs.grid;
+};
+}
+
diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/CurrencyType.js
deleted file mode 100644 (file)
index c041b3e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* ---------------------------------------------------------------------------
- * Copyright (C) 2008  Georgia Public Library Service
- * Bill Erickson <erickson@esilibrary.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * ---------------------------------------------------------------------------
- */
-
-if(!dojo._hasResource["openils.acq.CurrencyType"]) {
-
-    dojo._hasResource["openils.acq.CurrencyType"] = true;
-    dojo.provide("openils.acq.CurrencyType");
-    dojo.declare('openils.acq.CurrencyType', null, {
-    });
-
-    openils.acq.CurrencyType.cache = {};
-
-    /**
-     * Retrieves all of the currency types
-     */
-    openils.acq.CurrencyType.fetchAll = function(onComplete) {
-        var req = new OpenSRF.ClientSession('open-ils.acq').request(
-            'open-ils.acq.currency_type.all.retrieve', openils.User.authtoken);
-
-        req.oncomplete = function(r) {
-            var msg = r.recv();
-            var types = msg.content();
-            for(var i in types) 
-                openils.acq.CurrencyType.cache[types[i].code()] = types[i];
-            onComplete(types);
-        }
-        req.send();
-    }
-}
-
diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Fund.js
deleted file mode 100644 (file)
index 621cac8..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ---------------------------------------------------------------------------
- * Copyright (C) 2008  Georgia Public Library Service
- * Bill Erickson <erickson@esilibrary.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * ---------------------------------------------------------------------------
- */
-
-if(!dojo._hasResource['openils.acq.Fund']) {
-dojo._hasResource['openils.acq.Fund'] = true;
-dojo.provide('openils.acq.Fund');
-dojo.require('util.Dojo');
-
-/** Declare the Fund class with dojo */
-dojo.declare('openils.acq.Fund', null, {
-    /* add instance methods here if necessary */
-});
-
-
-openils.acq.Fund.loadGrid = function(domId, columns) {
-    /** Fetches the list of funds and builds a grid from them */
-
-    var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request('open-ils.acq.fund.org.retrieve', 
-        openils.User.authtoken, null, {flesh_summary:1});
-
-    req.oncomplete = function(r) {
-        var msg
-        gridRefs.grid.setModel(gridRefs.model);
-        while(msg = r.recv()) {
-            var fund = msg.content();
-            gridRefs.store.newItem({
-                id:fund.id(),
-                name:fund.name(), 
-                org: findOrgUnit(fund.org()).name(),
-                currency_type:fund.currency_type(),
-                year:fund.year(),
-                combined_balance:fund.summary()['combined_balance']
-            });
-        }
-        gridRefs.grid.update();
-    };
-
-    req.send();
-    return gridRefs.grid;
-};
-}
-
diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/FundingSource.js
deleted file mode 100644 (file)
index 4506efa..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/* ---------------------------------------------------------------------------
- * Copyright (C) 2008  Georgia Public Library Service
- * Bill Erickson <erickson@esilibrary.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * ---------------------------------------------------------------------------
- */
-
-if(!dojo._hasResource['openils.acq.FundingSource']) {
-dojo._hasResource['openils.acq.FundingSource'] = true;
-dojo.provide('openils.acq.FundingSource');
-dojo.require('util.Dojo');
-
-/** Declare the FundingSource class with dojo */
-dojo.declare('openils.acq.FundingSource', null, {
-    /* add instance methods here if necessary */
-});
-
-/** cached funding_source objects */
-openils.acq.FundingSource.cache = {};
-
-openils.acq.FundingSource.createStore = function(onComplete) {
-    /** Fetches the list of funding_sources and builds a grid from them */
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request('open-ils.acq.funding_source.org.retrieve', 
-        openils.User.authtoken, null, {flesh_summary:1});
-
-    req.oncomplete = function(r) {
-        var msg
-        var items = [];
-        var src = null;
-        while(msg = r.recv()) {
-            src = msg.content();
-            openils.acq.FundingSource.cache[src.id()] = src;
-            items.push(src);
-        }
-        onComplete(acqfs.toStoreData(items));
-    };
-
-    req.send();
-};
-
-
-
-/**
- * Create a new funding source object
- * @param fields Key/value pairs used to create the new funding source
- */
-openils.acq.FundingSource.create = function(fields, onCreateComplete) {
-
-    var fs = new acqfs()
-    for(var field in fields) 
-        fs[field](fields[field]);
-
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request('open-ils.acq.funding_source.create', openils.User.authtoken, fs);
-
-    req.oncomplete = function(r) {
-        var msg = r.recv();
-        var id = msg.content();
-        if(onCreateComplete)
-            onCreateComplete(id);
-    };
-    req.send();
-};
-
-
-openils.acq.FundingSource.createCredit = function(fields, onCreateComplete) {
-
-    var fsc = new acqfscred()
-    for(var field in fields) 
-        fsc[field](fields[field]);
-
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request(
-        'open-ils.acq.funding_source_credit.create', openils.User.authtoken, fsc);
-
-    req.oncomplete = function(r) {
-        var msg = r.recv();
-        var id = msg.content();
-        if(onCreateComplete)
-            onCreateComplete(id);
-    };
-    req.send();
-};
-
-
-openils.acq.FundingSource.deleteFromGrid = function(grid, onComplete) {
-    var list = []
-    var selected = grid.selection.getSelected();
-    for(var rowIdx in selected) 
-        list.push(grid.model.getDatum(selected[rowIdx], 0));
-    openils.acq.FundingSource.deleteList(list, onComplete);
-};
-
-openils.acq.FundingSource.deleteList = function(list, onComplete) {
-    openils.acq.FundingSource._deleteList(list, 0, onComplete);
-}
-
-openils.acq.FundingSource._deleteList = function(list, idx, onComplete) {
-    if(idx >= list.length)    
-        return onComplete();
-
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request('open-ils.acq.funding_source.delete', openils.User.authtoken, list[idx]);
-    delete openils.acq.FundingSource.cache[list[idx]];
-
-    req.oncomplete = function(r) {
-        msg = r.recv()
-        stat = msg.content();
-        /* XXX CHECH FOR EVENT */
-        openils.acq.FundingSource._deleteList(list, ++idx, onComplete);
-    }
-    req.send();
-};
-
-
-} /* end dojo._hasResource[] */
diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Picklist.js
deleted file mode 100644 (file)
index ad31894..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-if(!dojo._hasResource['openils.acq.Picklist']) {
-dojo._hasResource['openils.acq.Picklist'] = true;
-dojo.provide('openils.acq.Picklist');
-dojo.require('util.Dojo');
-
-/** Declare the Picklist class with dojo */
-dojo.declare('openils.acq.Picklist', null, {
-    /* add instance methods here if necessary */
-});
-
-    openils.acq.Picklist.find_attr = function(li, at_name, at_type) {
-       for (var i in li.attributes()) {
-           var attr = li.attributes()[i];
-           if (attr.attr_type() == at_type && attr.attr_name() == at_name) {
-               return attr.attr_value();
-           }
-       }
-       return '';
-    };
-
-
-    openils.acq.Picklist.loadGrid = function(domId, columns, pl_id) {
-    /** Fetches the list of picklists and builds a grid from them */
-
-    var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request('open-ils.acq.lineitem.picklist.retrieve', 
-        openils.User.authtoken, pl_id, {flesh_attrs:1});
-
-    req.oncomplete = function(r) {
-        var msg
-        gridRefs.grid.setModel(gridRefs.model);
-        gridRefs.model.query = {id:'*'};
-        while(msg = r.recv()) {
-            var jub = msg.content();
-           //alert(js2JSON(jub));
-            gridRefs.store.newItem({
-                   id:jub.id(),
-                   title:openils.acq.Picklist.find_attr(jub, "title", "lineitem_marc_attr_definition"),
-                   price:openils.acq.Picklist.find_attr(jub, "price", "lineitem_marc_attr_definition"),
-                   provider:jub.provider(),
-                   copies:jub.item_count()
-               });
-        }
-        gridRefs.grid.update();
-    };
-
-    req.send();
-    return gridRefs.grid;
-};
-}
-
diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/js/openils/acq/Provider.js
deleted file mode 100644 (file)
index 523ba85..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ---------------------------------------------------------------------------
- * Copyright (C) 2008  Georgia Public Library Service
- * Bill Erickson <erickson@esilibrary.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * ---------------------------------------------------------------------------
- */
-
-if(!dojo._hasResource['openils.acq.Provider']) {
-dojo._hasResource['openils.acq.Provider'] = true;
-dojo.provide('openils.acq.Provider');
-dojo.require('util.Dojo');
-
-/** Declare the Provider class with dojo */
-dojo.declare('openils.acq.Provider', null, {
-    /* add instance methods here if necessary */
-});
-
-/* define some static provider methods ------- */
-
-openils.acq.Provider.loadGrid = function(domId, columns) {
-    /** Fetches the list of providers and builds a grid from them */
-
-    var gridRefs = util.Dojo.buildSimpleGrid(domId, columns, [], 'id', true);
-    var ses = new OpenSRF.ClientSession('open-ils.acq');
-    var req = ses.request('open-ils.acq.provider.org.retrieve', openils.User.authtoken);
-
-    req.oncomplete = function(r) {
-        var msg
-        gridRefs.grid.setModel(gridRefs.model);
-        while(msg = r.recv()) {
-            var prov = msg.content();
-            gridRefs.store.newItem({
-                id:prov.id(),
-                name:prov.name(), 
-                owner: findOrgUnit(prov.owner()).name(),
-                currency_type:prov.currency_type()
-            });
-        }
-        gridRefs.grid.update();
-    };
-
-    req.send();
-    return gridRefs.grid;
-};
-}
-