From 87c609569a3096714d02cfd4d579226a93850416 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 2 Dec 2008 23:57:21 +0000 Subject: [PATCH] added initial z39 source config interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@11379 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/oils_web.xml.example | 1 + .../default/conify/global/config/z3950_source.js | 53 ++++++++++++++++ .../default/conify/global/config/z3950_source.tt2 | 71 ++++++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js create mode 100644 Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2 diff --git a/Open-ILS/examples/oils_web.xml.example b/Open-ILS/examples/oils_web.xml.example index acbf9e863e..92fe52693c 100644 --- a/Open-ILS/examples/oils_web.xml.example +++ b/Open-ILS/examples/oils_web.xml.example @@ -39,6 +39,7 @@ + diff --git a/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js b/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js new file mode 100644 index 0000000000..9e323edb5b --- /dev/null +++ b/Open-ILS/web/js/ui/default/conify/global/config/z3950_source.js @@ -0,0 +1,53 @@ +dojo.require('dojox.grid.DataGrid'); +dojo.require('dojo.data.ItemFileReadStore'); +dojo.require('dijit.form.NumberTextBox'); +dojo.require('dijit.form.CheckBox'); +dojo.require('fieldmapper.OrgUtils'); +dojo.require('openils.widget.OrgUnitFilteringSelect'); + +var zsList; + +function buildZSGrid() { + fieldmapper.standardRequest( + ['open-ils.permacrud', 'open-ils.permacrud.search.czs.atomic'], + { async: true, + params: [openils.User.authtoken, {name:{'!=':null}}], + oncomplete: function(r) { + if(zsList = openils.Util.readResponse(r)) { + var store = new dojo.data.ItemFileReadStore( + {data:czs.toStoreData(zsList, 'name',{identifier:'name'})}); + zsGrid.setStore(store); + zsGrid.render(); + } + } + } + ); +} + +function zsCreate(args) { + return alert(js2JSON(args)); + if(!args.name || args.owner == null) + return; + if(args.default_price == '' || isNaN(args.default_price)) + args.default_price = null; + + var zsype = new czs(); + zsype.name(args.name); + zsype.owner(args.owner); + zsype.default_price(args.default_price); + + fieldmapper.standardRequest( + ['open-ils.permacrud', 'open-ils.permacrud.create.czs'], + { async: true, + params: [openils.User.authtoken, zsype], + oncomplete: function(r) { + if(new String(openils.Util.readResponse(r)) != '0') + buildBTGrid(); + } + } + ); +} + +openils.Util.addOnLoad(buildZSGrid); + + diff --git a/Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2 b/Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2 new file mode 100644 index 0000000000..343ef621c8 --- /dev/null +++ b/Open-ILS/web/templates/default/conify/global/config/z3950_source.tt2 @@ -0,0 +1,71 @@ +[% WRAPPER default/base.tt2 %] + +

Z39.50 Servers


+ +
+ Z39.50 Servers +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+
+ + + + + + + + + + + + + +
NameLabelHostPortDatabaseRecord FormatTransmission FormatRequires Authentication
+
+
+ +[% END %] + + -- 2.11.0