From 1b36ce9c1b5103560c055c4d4d2fe87e9c59be0f Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 27 Mar 2008 06:16:41 +0000 Subject: [PATCH] cleaning up org unit interface; adding org type interface git-svn-id: svn://svn.open-ils.org/ILS/branches/dojo-admin@9151 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/conify/global/actor/org_unit.html | 26 +- .../web/conify/global/actor/org_unit_type.html | 409 +++++++++++++++++++++ Open-ILS/web/conify/global/actor/org_unit_type.js | 67 ++++ Open-ILS/web/conify/global/admin.html | 7 +- 4 files changed, 501 insertions(+), 8 deletions(-) create mode 100644 Open-ILS/web/conify/global/actor/org_unit_type.html create mode 100644 Open-ILS/web/conify/global/actor/org_unit_type.js diff --git a/Open-ILS/web/conify/global/actor/org_unit.html b/Open-ILS/web/conify/global/actor/org_unit.html index 8d2b8b35df..12e3a60c89 100644 --- a/Open-ILS/web/conify/global/actor/org_unit.html +++ b/Open-ILS/web/conify/global/actor/org_unit.html @@ -110,10 +110,12 @@
@@ -290,6 +296,14 @@ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Type Name + + + +
OPAC Label + + + +
Parent Type +
+ +
+
Can have Volumes/Copies + + + +
Can have Users + + + +
+ +
+ + + + + +
+ + + +
+
+
+
+ + diff --git a/Open-ILS/web/conify/global/actor/org_unit_type.js b/Open-ILS/web/conify/global/actor/org_unit_type.js new file mode 100644 index 0000000000..b2e0b64661 --- /dev/null +++ b/Open-ILS/web/conify/global/actor/org_unit_type.js @@ -0,0 +1,67 @@ +dojo.require('conify.fieldmapper.addToHash', true); +dojo.require('conify.fieldmapper.addFromHash', true); +dojo.require('conify.fieldmapper.addToStoreData', true); +dojo.require('conify.fieldmapper.addFromStoreItem', true); +dojo.require('dojo.parser'); +dojo.require('dojo.data.ItemFileWriteStore'); +dojo.require('dojo.date.stamp'); +dojo.require('dijit.form.NumberSpinner'); +dojo.require('dijit.form.TextBox'); +dojo.require('dijit.form.TimeTextBox'); +dojo.require('dijit.form.ValidationTextBox'); +dojo.require('dijit.form.CheckBox'); +dojo.require('dijit.form.FilteringSelect'); +dojo.require('dijit.Tree'); +dojo.require('dijit.layout.ContentPane'); +dojo.require('dijit.layout.TabContainer'); +dojo.require('dijit.layout.LayoutContainer'); +dojo.require('dijit.layout.SplitContainer'); +dojo.require('dojox.widget.Toaster'); +dojo.require('dojox.fx'); + +// some handy globals +var cgi = new CGI(); +var cookieManager = new HTTP.Cookies(); +var ses = cookieManager.read('ses') || cgi.param('ses'); +var pCRUD = new OpenSRF.ClientSession('open-ils.permacrud'); + +var current_type; +var virgin_out_id = -1; + +var highlighter = {}; + +function status_update (markup) { + if (parent !== window && parent.status_update) parent.status_update( markup ); +} + +function save_type () { + + var modified_aout = new aout().fromStoreItem( current_type ); + modified_aout.ischanged( 1 ); + + new_kid_button.disabled = false; + save_out_button.disabled = false; + delete_out_button.disabled = false; + + pCRUD.request({ + method : 'open-ils.permacrud.update.aout', + timeout : 10, + params : [ ses, modified_aout ], + onerror : function (r) { + highlighter.editor_pane.red.play(); + status_update( 'Problem saving data for ' + ou_type_store.getValue( current_type, 'name' ) ); + }, + oncomplete : function (r) { + var res = r.recv(); + if ( res && res.content() ) { + ou_type_store.setValue( current_type, 'ischanged', 0 ); + highlighter.editor_pane.green.play(); + status_update( 'Saved changes to ' + ou_type_store.getValue( current_type, 'name' ) ); + } else { + highlighter.editor_pane.red.play(); + status_update( 'Problem saving data for ' + ou_type_store.getValue( current_type, 'name' ) ); + } + }, + }).send(); +} + diff --git a/Open-ILS/web/conify/global/admin.html b/Open-ILS/web/conify/global/admin.html index 045aa0d0cb..253f0ebc96 100644 --- a/Open-ILS/web/conify/global/admin.html +++ b/Open-ILS/web/conify/global/admin.html @@ -42,8 +42,11 @@ Configure your ILS -
-