From: phasefx Date: Mon, 11 Jun 2007 20:52:55 +0000 (+0000) Subject: removing legacy staff client after having tested modern client for lingering dependen... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d4ef8f542a03458598e5e85b9889254a45583143;p=Evergreen.git removing legacy staff client after having tested modern client for lingering dependencies. yay :) git-svn-id: svn://svn.open-ils.org/ILS/trunk@7418 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Evergreen/staff_client/LICENSE b/Evergreen/staff_client/LICENSE deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Evergreen/staff_client/Makefile b/Evergreen/staff_client/Makefile deleted file mode 100644 index dbd6209063..0000000000 --- a/Evergreen/staff_client/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -VERSION=0.1.0 -PACKAGE=Evergreen -DESCRIPTION=Evergreen Staff Client -BUILD=2005072719 - -RETRIEVE_FIELDMAPPER=wget -N http://dev.gapines.org/opac/common/js/util/fieldmapper.js -RETRIEVE_FM_ALL=wget -N http://dev.gapines.org/opac/common/js/fmall.js -RETRIEVE_ORG_TREE=wget -N http://dev.gapines.org/opac/common/js/OrgTree.js -RETRIEVE_CLIENT_CONFIG=cp ../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml . - -all: build package - @echo - @echo How do makefiles work again? - @echo BUILD = ${BUILD} - touch application.ini - -build: generated open-ils patron circ - @echo - @echo Everything before packaging - -package: evergreen.xpi - @echo - @echo Packaging - -stamp: - sed -i s/^Version=.\*/Version=${VERSION}/ application.ini - sed -i s/^BuildID=.\*/BuildID=${BUILD}/ application.ini - sed -i s/^Name=.\*/Name=${PACKAGE}/ application.ini - sed -i 's/.*<\/em:version>/${VERSION}<\/em:version>/' install.rdf - sed -i 's/.*<\/em:name>/${PACKAGE}<\/em:name>/' install.rdf - sed -i 's/.*<\/em:description>/${DESCRIPTION}<\/em:description>/' install.rdf - sed -i "s/extVersion: '.\*'/extVersion: '${VERSION}'/" install.js - sed -i "s/extFullName: '.\*'/extFullName: '${DESCRIPTION}'/" install.js - sed -i 's/auth\.title ".*"/auth\.title "${DESCRIPTION}"/' chrome/locale/en-US/evergreen/auth.dtd - sed -i 's/auth\.version ".*"/auth\.version "${PACKAGE} ${VERSION} ${BUILD}"/' chrome/locale/en-US/evergreen/auth.dtd - -generated: - @echo - @echo These things are installation specific. The staff client is the last thing you should try to build. - #(cd chrome/content/evergreen/util ; ${RETRIEVE_FIELDMAPPER} ); - (cd chrome/content/evergreen/Open-ILS/util/ ; ${RETRIEVE_ORG_TREE} ); - (cd chrome/content/evergreen/conf ; ${RETRIEVE_CLIENT_CONFIG} ); - (cd chrome/content/evergreen/Open-ILS/util/ ; ${RETRIEVE_FM_ALL} ); - -open-ils: - cp ../../OpenSRF/src/javascript/*.js chrome/content/evergreen/OpenSRF/ - cp ../../Open-ILS/web/opac/common/js/*.js chrome/content/evergreen/Open-ILS/util/ - #cp ../../Open-ILS/src/javascript/widgets/*.js chrome/content/evergreen/Open-ILS/widgets/ - #cp ../../Open-ILS/src/javascript/widgets/menu/*.js chrome/content/evergreen/Open-ILS/widgets/menu/ - -patron: - (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_items/g | sed s/PagedTree/PatronItems/g > chrome/content/evergreen/patron/patron_items_overlay.xul ) - (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_search_results/g | sed s/PagedTree/PatronSearchResults/g > chrome/content/evergreen/patron/patron_search_results_overlay.xul ) - (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_checkout_items/g | sed s/PagedTree/PatronCheckoutItems/g > chrome/content/evergreen/patron/patron_checkout_items_overlay.xul ) - (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/patron_holds/g | sed s/PagedTree/PatronHolds/g > chrome/content/evergreen/patron/patron_holds_overlay.xul ) - (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_items.dtd) - (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_search_results.dtd) - (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_checkout_items.dtd) - (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/patron_holds.dtd) - -circ: - (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/checkin_items/g | sed s/PagedTree/CheckinItems/g > chrome/content/evergreen/circ/checkin_items_overlay.xul ) - (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/checkin_items.dtd) - (cat chrome/content/evergreen/main/paged_tree_overlay.xul | sed s/paged_tree/hold_capture_items/g | sed s/PagedTree/HoldCaptureItems/g > chrome/content/evergreen/circ/hold_capture_items_overlay.xul ) - (cp chrome/locale/en-US/evergreen/paged_tree.dtd chrome/locale/en-US/evergreen/hold_capture_items.dtd) - -evergreen.xpi: evergreen.jar - @echo - @echo make the xpi file - zip -r evergreen.xpi chrome/ defaults/ install.js install.rdf application.ini Makefile LICENSE README -x \*CVS\* > /dev/null - -evergreen.jar: build - @echo - @echo make the jar file - (cd chrome; zip -r evergreen.jar content/ locale/ skin/ -x \*CVS\* > /dev/null ) - -clean: - @echo - @echo delete derived files - rm -f evergreen.xpi - rm -f chrome/evergreen.jar - rm -f chrome/content/evergreen/patron/patron_items_overlay.xul chrome/locale/en-US/evergreen/patron_items.dtd - rm -f chrome/content/evergreen/patron/patron_search_results_overlay.xul chrome/locale/en-US/evergreen/patron_search_results.dtd - rm -f chrome/content/evergreen/patron/patron_checkout_items_overlay.xul chrome/locale/en-US/evergreen/patron_checkout_items.dtd - rm -f chrome/content/evergreen/patron/patron_holds_overlay.xul chrome/locale/en-US/evergreen/patron_holds.dtd - rm -f chrome/content/evergreen/circ/checkin_items_overlay.xul chrome/locale/en-US/evergreen/checkin_items.dtd - rm -f chrome/content/evergreen/circ/hold_capture_items_overlay.xul chrome/locale/en-US/evergreen/hold_capture_items.dtd - rm -f chrome/content/evergreen/conf/client_config.xml - rm -f chrome/content/evergreen/util/fieldmapper.js - rm -f chrome/content/evergreen/util/OrgTree.js - rm -f chrome/content/evergreen/OpenSRF/*js - rm -f chrome/content/evergreen/Open-ILS/util/*js - rm -f chrome/content/evergreen/Open-ILS/widgets/*js - rm -f chrome/content/evergreen/Open-ILS/widgets/menu/*js diff --git a/Evergreen/staff_client/README b/Evergreen/staff_client/README deleted file mode 100644 index e79cef86a1..0000000000 --- a/Evergreen/staff_client/README +++ /dev/null @@ -1 +0,0 @@ -This part of the tree is deprecated.. it was a previous incarnation of the staff client now at ILS/Open-ILS/xul/staff_client/ diff --git a/Evergreen/staff_client/application.ini b/Evergreen/staff_client/application.ini deleted file mode 100644 index 88a62273d9..0000000000 --- a/Evergreen/staff_client/application.ini +++ /dev/null @@ -1,39 +0,0 @@ -[App] -; Modified by Jason for Evergreen -; This file is used by XUL Runner like so: xulrunner ./application.ini -; -; This field specifies your organization's name. This field is recommended, -; but optional. -Vendor=PINES -; -; This field specifies your application's name. This field is required. -Name=Evergreen -; -; This field specifies your application's version. This field is optional. -Version=0.1.0 -; -; This field specifies your application's build ID (timestamp). This field is -; required. -BuildID=2005072719 -; -; This field specifies a compact copyright notice for your application. This -; field is optional. -Copyright=Copyright (c) 2005 GPLS/PINES -; -; This ID is just an example. Every XUL app ought to have it's own unique ID. -; You can use the microsoft "guidgen" or "uuidgen" tools, or go on -; irc.mozilla.org and /msg botbot uuid. This field is optional. -ID={c3dd711b-c9b4-4785-b8f8-6157149c8905} - -[Gecko] -; -; This field is required. It specifies the minimum Gecko version that this -; application requires. Specifying 1.8 matches all releases with a version -; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2). -MinVersion=1.8 -; -; This field is optional. It specifies the maximum Gecko version that this -; application requires. It should be specified if your application uses -; unfrozen interfaces. Specifying 1.8 matches all releases with a version -; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2). -MaxVersion=1.9 diff --git a/Evergreen/staff_client/chrome/chrome.manifest b/Evergreen/staff_client/chrome/chrome.manifest deleted file mode 100644 index 4179af3129..0000000000 --- a/Evergreen/staff_client/chrome/chrome.manifest +++ /dev/null @@ -1,3 +0,0 @@ -content evergreen jar:evergreen.jar!/content/evergreen/ -locale evergreen en-US jar:evergreen.jar!/locale/en-US/evergreen/ -skin evergreen evergreen jar:evergreen.jar!/skin/evergreen/ diff --git a/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS.js b/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS.js deleted file mode 100644 index 2f4a13c072..0000000000 --- a/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS.js +++ /dev/null @@ -1,55 +0,0 @@ -function OpenILS_init(params) { - sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg,function(i,o){try{return [i,o.toString()];}catch(E){return [i,o];}}))' })); - - try { - - switch(params.app) { - case 'Auth' : auth_init(params); break; - case 'AppShell' : app_shell_init(params); register_AppShell(params.w); break; - case 'Opac' : opac_init(params); break; - case 'PatronSearch' : patron_search_init(params); break; - case 'PatronDisplay' : patron_display_init(params); break; - case 'Checkin' : checkin_init(params); break; - case 'HoldCapture' : hold_capture_init(params); break; - } - - } catch(E) { sdump('D_ERROR',js2JSON(E)+'\n'); } - - try { - - //register_document(params.w.document); - register_window(params.w); - - } catch(E) { sdump('D_ERROR',js2JSON(E)+'\n'); } - sdump('D_TRACE_EXIT',arg_dump(arguments)); -} - -function OpenILS_exit(params) { - sdump( 'D_TRACE', arg_dump( arguments, { '0':'js2JSON( map_object( arg,function(i,o){try{return [i,o.toString()];}catch(E){return [i,o];}}))' })); - - /* - try { - - switch(params.app) { - case 'Auth' : auth_exit(params); break; - case 'AppShell' : app_shell_exit(params); unregister_AppShell(params.w); break; - case 'Opac' : opac_exit(params); break; - case 'PatronSearch' : patron_search_exit(params); break; - case 'PatronDisplay' : patron_display_exit(params); break; - case 'Checkin' : checkin_exit(params); break; - case 'HoldCapture' : hold_capture_exit(params); break; - } - - } catch(E) { sdump('D_ERROR',js2JSON(E)+'\n'); } - */ - - try { - - // buggy for now - //unregister_document(params.w.document); - unregister_window(params.w); - - } catch(E) { sdump('D_ERROR',js2JSON(E)+'\n'); } - - sdump('D_TRACE','Exiting OpenILS_exit\n'); -} diff --git a/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS_overlay.xul b/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS_overlay.xul deleted file mode 100644 index 7acee43058..0000000000 --- a/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS_overlay.xul +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS_scripts_overlay.xul b/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS_scripts_overlay.xul deleted file mode 100644 index 870c137e22..0000000000 --- a/Evergreen/staff_client/chrome/content/evergreen/Open-ILS/OpenILS_scripts_overlay.xul +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/Evergreen/staff_client/chrome/content/evergreen/auth/auth.js b/Evergreen/staff_client/chrome/content/evergreen/auth/auth.js deleted file mode 100644 index 4083dedd00..0000000000 --- a/Evergreen/staff_client/chrome/content/evergreen/auth/auth.js +++ /dev/null @@ -1,545 +0,0 @@ -// the master Global variable -var G = { -///////////////////////////////////////////////////////////////////////////////////// - - // pointer to the auth window - 'main_window' : self, - - // list of open window references, used for debugging in shell - 'win_list' : [], - - // list of Top Level menu interface window references - 'appshell_list' : [], - - // list of documents for debugging. BROKEN - 'doc_list' : [], - - // Windows need unique names. This number helps. - 'window_name_increment' : 0, - - // This number gets put into the title bar for Top Level menu interface windows - 'appshell_name_increment' : 0, - - // I was using this to make sure I could shove references into new windows - // correctly. However, it's JSON that tends to behave weirdly when crossing - // window boundaries. [ 'a', 'b', 'c' ] could turn into { '1' : 'a', '2' : 'b', - 'main_test_variable' : 'Hello World', - -///////////////////////////////////////////////////////////////////////////////////// - - // Flag for whether the staff client should act as if it were offline or not - 'offline' : false, - - // Array of Session Keys. This is an array mostly by accident, we usually - // only deal with one session. But this could be useful for implementing - // overrides with other logins. - 'auth_ses' : [], - - // Org Unit for the login user - 'user_ou' : '', - - // The related org units for the login user - 'my_orgs' : [], 'my_orgs_hash' : {}, - -///////////////////////////////////////////////////////////////////////////////////// - - // The Org Unit tree - 'org_tree' : '', 'org_tree_hash' : {}, - -///////////////////////////////////////////////////////////////////////////////////// - - // Historically, was the list of actor::profile's, but now it's user groups. - 'ap_list' : [], 'ap_hash' : {}, - - // config::identification_type - 'cit_list' : [], 'cit_hash' : {}, - - // config::standing - 'cst_list' : [], 'cst_hash' : {}, - - // assett::copy_location, and for my_orgs - 'acpl_list' : [], 'acpl_hash' : {}, - 'acpl_my_orgs' : [], 'acpl_my_orgs_hash' : {}, - - // actor::org_unit_type - 'aout_list' : [], 'aout_hash' : {}, - - // config::copy_status - 'ccs_list' : [], 'ccs_hash' : {}, - - // asset::stat_cat. WHERE IS THIS POPULATED AGAIN? - 'asc_list' : [], - - // actor::stat_cat - 'actsc_list' : [], 'actsc_hash' : {}, - -///////////////////////////////////////////////////////////////////////////////////// - - 'itemsout_header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following items:
    ', - 'itemsout_line_item' : '
  1. %TITLE: 50%\r\nBarcode: %COPY_BARCODE% Due: %DUE_D%\r\n', - 'itemsout_footer' : '

%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%', - - 'checkout_header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou checked out the following items:
    ', - 'checkout_line_item' : '
  1. %TITLE%\r\nBarcode: %COPY_BARCODE% Due: %DUE_D%\r\n', - 'checkout_footer' : '

%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%' - -///////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////// -}; - -var debug_ignore_auth_failures = false; - -var mw = G['main_window']; -var auth_meter_incr = 10; - -///////////////////////////////////////////////////////////////////////////////////// - -function auth_init() { - sdump('D_AUTH','TESTING: auth.js: ' + mw.G['main_test_variable'] + '\n'); - sdump('D_AUTH',arg_dump(arguments)); - - var np = document.getElementById('name_prompt'); - np.addEventListener("keypress",handle_keypress,false); - np.focus(); - var pp = document.getElementById('password_prompt'); - pp.addEventListener("keypress",handle_keypress,false); - self.addEventListener("unload",nice_shutdown,false); - - G['sound'] = xp_sound_init(); snd_logon(); - var pref = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); - if (pref) { - pref.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead"); - pref.setCharPref("capability.principal.codebase.p0.id", "http://dev.gapines.org"); - } -} - -function handle_keypress(ev) { - if (ev.keyCode && ev.keyCode == 13) { - switch(this) { - case document.getElementById('name_prompt') : - ev.preventDefault(); - var pp = document.getElementById('password_prompt'); - pp.focus(); pp.select(); - break; - case document.getElementById('password_prompt') : - ev.preventDefault(); - var sb = document.getElementById('submit_button'); - sb.focus(); - authenticate(); - break; - default: - break; - } - } -} - -function disable_login_prompts() { - sdump('D_AUTH',arg_dump(arguments)); - disable_widgets(document,'password_prompt','name_prompt','submit_button'); - G.sound.beep(); -} - -function enable_login_prompts() { - sdump('D_AUTH',arg_dump(arguments)); - enable_widgets(document,'password_prompt','name_prompt','submit_button'); - document.getElementById('password_prompt').value = ''; - var np = document.getElementById('name_prompt'); - np.focus(); np.select(); - document.getElementById('auth_meter').value = 0; - document.getElementById('auth_meter').setAttribute('real', '0.0'); - G.sound.beep(); -} - -///////////////////////////////////////////////////////////////////////////////////// - -function authenticate() { - sdump('D_AUTH',arg_dump(arguments)); - timer_init('cat'); - var name = document.getElementById('name_prompt').value; - if (name.length == 0) { enable_login_prompts(); return; } - // Talk to the system and authenticate the user. - user_async_request( - 'open-ils.auth', - 'open-ils.auth.authenticate.init', - [ name ], - auth_init_callback - ); -} - -function auth_init_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var auth_init; - try { - auth_init = request.getResultObject(); - if (!auth_init) { throw('null result'); } - } catch(E) { - G.offline = true; - sdump('D_ERROR','Error trying to communicate with the server. Entering OFFLINE mode.\n' + js2JSON(E) + '\n'); - s_alert('Error trying to communicate with the server. Entering OFFLINE mode.\n' + js2JSON(E) + '\n'); - } - - sdump( 'D_AUTH', 'D_AUTH_INIT: ' + typeof(auth_init) + ' : ' + auth_init + '\n'); - var name = document.getElementById('name_prompt').value; - var pw = document.getElementById('password_prompt').value; - G.name = name; G.pw = pw; - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.auth', - 'open-ils.auth.authenticate.complete', - [ name, hex_md5(auth_init + hex_md5(pw)) ], - auth_ses_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function auth_ses_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var auth_ses; - try { - auth_ses = request.getResultObject(); - if (!auth_ses) { if (!G.offline) { throw('null result'); } } - if (auth_ses == 0) { throw('0 result'); } - if (instanceOf(auth_ses,ex)) { - throw(auth_ses.err_msg()); - } - } catch(E) { - alert('Login failed on auth_ses: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - mw.G.auth_ses = [ auth_ses ]; - sdump( 'D_AUTH', 'D_AUTH_SES: ' + typeof(mw.G['auth_ses'][0]) + ' : ' + mw.G['auth_ses'][0] + '\n'); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - //'open-ils.actor.user.profiles.retrieve', - user_async_request( - 'open-ils.actor', - 'open-ils.actor.groups.retrieve', - [], - ap_list_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function ap_list_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - //var ap_file = get_file('ap_list'); - var ap_list; - try { - ap_list = request.getResultObject(); - if (!ap_list && G.offline) { - //ap_list = get_object_in_file('ap_list'); - } - if (!ap_list) { throw('null result'); } - if (ap_list.length == 0) { throw('zero length result'); } - } catch(E) { - handle_error('Login failed on ap_list: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('ap_list',ap_list); } catch(E) { handle_error(E); } - mw.G.ap_list = ap_list; - mw.G.ap_hash = convert_object_list_to_hash( ap_list ); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.actor', - 'open-ils.actor.user.ident_types.retrieve', - [], - cit_list_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function cit_list_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var cit_list; - try { - cit_list = request.getResultObject(); - //if (!cit_list && G.offline) { cit_list = get_object_in_file('cit_list'); } - if (!cit_list) { throw('null result'); } - if (cit_list.length == 0) { throw('zero length result'); } - } catch(E) { - alert('Login failed on cit_list: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('cit_list',cit_list); } catch(E) { handle_error(E); } - mw.G.cit_list = cit_list; - mw.G.cit_hash = convert_object_list_to_hash( cit_list ); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.actor', - 'open-ils.actor.standings.retrieve', - [], - cst_list_callback - ); - - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function cst_list_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var cst_list; - try { - cst_list = request.getResultObject(); - //if (!cst_list && G.offline) { cst_list = get_object_in_file('cst_list'); } - if (!cst_list) { throw('null result'); } - if (cst_list.length == 0) { throw('zero length result'); } - } catch(E) { - alert('Login failed on cst_list: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('cst_list',cst_list); } catch(E) { handle_error(E); } - mw.G.cst_list = cst_list; - mw.G.cst_hash = convert_object_list_to_hash( cst_list ); - sdump('D_AUTH', 'cst_list = ' + js2JSON(cst_list) + '\n'); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.search', - 'open-ils.search.config.copy_location.retrieve.all', - [], - acpl_list_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); - -} - -function acpl_list_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var acpl_list; - try { - acpl_list = request.getResultObject(); - //if (!acpl_list && G.offline) { acpl_list = get_object_in_file('acpl_list'); } - if (!acpl_list) { throw('null result'); } - if (acpl_list.length == 0) { throw('zero length result'); } - } catch(E) { - alert('Login failed on acpl_list: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('acpl_list',acpl_list); } catch(E) { handle_error(E); } - mw.G.acpl_list = acpl_list; - mw.G.acpl_hash = convert_object_list_to_hash( acpl_list ); - sdump('D_AUTH', 'acpl_list = ' + js2JSON(acpl_list) + '\n'); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.search', - 'open-ils.search.config.copy_status.retrieve.all', - [], - ccs_list_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function ccs_list_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var ccs_list; - try { - ccs_list = request.getResultObject(); - //if (!ccs_list && G.offline) { ccs_list = get_object_in_file('ccs_list'); } - if (!ccs_list) { throw('null result'); } - if (ccs_list.length == 0) { throw('zero length result'); } - } catch(E) { - alert('Login failed on ccs_list: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('ccs_list',ccs_list); } catch(E) { handle_error(E); } - mw.G.ccs_list = ccs_list; - mw.G.ccs_hash = convert_object_list_to_hash( ccs_list ); - sdump('D_AUTH', 'ccs_list = ' + js2JSON(ccs_list) + '\n'); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.search', - 'open-ils.search.actor.user.session', - [ mw.G['auth_ses'][0] ], - user_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function user_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var user; - var user_ou; - try { - user = request.getResultObject(); - if (!user && G.offline) { - //user = new au(); - //user.home_ou( get_object_in_file('user_ou') ); - } - if (!user) { throw('null result'); } - if (typeof(user) != 'object') { throw('result not an object' + user); } - } catch(E) { - alert('Login failed on user: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('user_ou',user.home_ou()); } catch(E) { handle_error(E); } - mw.G.user = user; - mw.G.user_ou = user.home_ou(); - sdump('D_AUTH', "user: " + js2JSON(mw.G['user']) + '\n'); - sdump('D_AUTH', "user_ou: " + js2JSON(mw.G['user_ou']) + '\n'); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.actor', - 'open-ils.actor.org_tree.retrieve', - [], - org_tree_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function org_tree_callback(request) { - var org_tree; - try { - org_tree = request.getResultObject(); - //if (!org_tree && G.offline) { org_tree = get_object_in_file('org_tree'); } - if (!org_tree) { throw('null result'); } - if (typeof(org_tree) != 'object') { throw('result not an object' + org_tree); } - } catch(E) { - alert('Login failed on org_tree: ' + js2JSON(E)); enable_login_prompts(); return; - } - - //mw.G.org_tree = globalOrgTree; - //try { set_object_in_file('org_tree',org_tree); } catch(E) { handle_error(E); } - mw.G.org_tree = org_tree; - mw.G.org_tree_hash = convert_object_list_to_hash( flatten_ou_branch( mw.G.org_tree ) ); - mw.G.user_ou = find_ou( mw.G.org_tree, mw.G.user_ou ); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - /*user_async_request( - 'open-ils.actor', - 'open-ils.actor.org_types.retrieve', - [ mw.G.auth_ses[0] ], - org_type_callback - );*/ - org_type_callback(); -} - -function org_type_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var aout_list = globalOrgTypes; - /*try { - aout_list = request.getResultObject(); - if (!aout_list) { throw('null result'); } - if (typeof(aout_list) != 'object') { throw('result not an object' + aout_list); } - if (aout_list.length == 0) { throw('empty aout_list'); } - } catch(E) { - alert('Login failed on aout_list: ' + js2JSON(E)); enable_login_prompts(); return; - }*/ - mw.G.aout_list = aout_list; - mw.G.aout_hash = convert_object_list_to_hash( aout_list ); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.actor', - 'open-ils.actor.org_unit.full_path.retrieve', - [ mw.G.auth_ses[0] ], - my_orgs_callback - ); - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function my_orgs_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var my_orgs; - try { - my_orgs = request.getResultObject(); - //if (!my_orgs && G.offline) { my_orgs = get_object_in_file('my_orgs'); } - if (!my_orgs) { throw('null result'); } - if (typeof(my_orgs) != 'object') { throw('result not an object' + my_orgs); } - if (my_orgs.length == 0) { throw('empty my_orgs'); } - } catch(E) { - alert('Login failed on my_orgs: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - - //try { set_object_in_file('my_orgs',my_orgs); } catch(E) { handle_error(E); } - mw.G.my_orgs = my_orgs; - mw.G.my_orgs_hash = convert_object_list_to_hash( my_orgs ); - sdump('D_AUTH','my_orgs = ' + js2JSON(my_orgs) + '\n'); - mw.G.acpl_my_orgs = filter_list( - mw.G.acpl_list, - function (obj) { - if ( typeof obj != 'object' ) return null; - if ( mw.G.my_orgs_hash[ obj.owning_lib() ] ) return obj; - } - ); - mw.G.acpl_my_orgs_hash = convert_object_list_to_hash( mw.G.acpl_my_orgs ); - //sdump('D_AUTH', 'my_orgs.length = ' + mw.G.my_orgs.length + ' other_orgs.length = ' + mw.G.other_orgs.length + '\n'); - - ///////////////////////////////////////////////////////////////////////////////////////////////////// - user_async_request( - 'open-ils.circ', - 'open-ils.circ.stat_cat.actor.retrieve.all', - [ mw.G.auth_ses[0], mw.G.user_ou.id() ], - my_actsc_list_callback - ); - - incr_progressmeter(document,'auth_meter',auth_meter_incr); -} - -function my_actsc_list_callback(request) { - sdump('D_AUTH',arg_dump(arguments)); - var actsc_list; - try { - actsc_list = request.getResultObject(); - //if (!actsc_list && G.offline) { actsc_list = get_object_in_file('actsc_list'); } - if (!actsc_list) { throw('null result'); } - //if (actsc_list.length == 0) { throw('zero length result'); } - } catch(E) { - alert('Login failed on actsc_list: ' + js2JSON(E)); - if (!debug_ignore_auth_failures) { - enable_login_prompts(); return; - } - } - //try { set_object_in_file('actsc_list',actsc_list); } catch(E) { handle_error(E); } - mw.G.actsc_list = actsc_list; - mw.G.actsc_hash = convert_object_list_to_hash( actsc_list ); - sdump('D_AUTH', 'actsc_list = ' + js2JSON(actsc_list) + '\n'); - - incr_progressmeter(document,'auth_meter',auth_meter_incr); - - spawn_main(); - - mw.minimize(); - -} - - -function logoff() { - sdump('D_AUTH',arg_dump(arguments)); - mw.G['auth_ses'] = ''; - close_all_windows(); - enable_login_prompts(); - incr_progressmeter(document,'auth_meter',-100); - snd_logoff(); -} - -function nice_shutdown() { - sdump('D_AUTH',arg_dump(arguments)); - if (ses) { logoff(); ses.disconnect(); } - snd_exit; - close_all_windows(); - window.close(); -} - diff --git a/Evergreen/staff_client/chrome/content/evergreen/auth/auth.xul b/Evergreen/staff_client/chrome/content/evergreen/auth/auth.xul deleted file mode 100644 index 736185ab87..0000000000 --- a/Evergreen/staff_client/chrome/content/evergreen/auth/auth.xul +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Evergreen/staff_client/chrome/content/evergreen/auth/auth_overlay.xul b/Evergreen/staff_client/chrome/content/evergreen/auth/auth_overlay.xul deleted file mode 100644 index b949fe6fdf..0000000000 --- a/Evergreen/staff_client/chrome/content/evergreen/auth/auth_overlay.xul +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -