another great renaming, and an un-naming
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 26 Jan 2006 02:47:18 +0000 (02:47 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 26 Jan 2006 02:47:18 +0000 (02:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2848 dcc99617-32d9-48b4-a31d-7c20da2025e4

94 files changed:
Open-ILS/xul/staff_client/Makefile
Open-ILS/xul/staff_client/chrome/chrome.manifest
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/data.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util_overlay.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey_overlay.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey_wizard.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/auth/controller.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/auth/session.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/cat/details.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/cat/opac.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/_browse.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/_marc.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/JSAN.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/bindings.xml [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/constants.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/main.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/main.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame_menus.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame_overlay.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/test/test.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/browser.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/browser.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/controller.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/date.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/deck.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/error.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/exec.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/file.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/fm_utils.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/fm_view.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/functional.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/list.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/money.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/network.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/rbrowser.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/shell.html [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/widgets.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/window.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/xuledit.js [deleted file]
Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/xuledit.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/admin/survey.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/admin/survey_overlay.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/admin/survey_wizard.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/auth/controller.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/auth/session.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/cat/details.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/cat/opac.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/legacy/_browse.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/legacy/_marc.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/JSAN.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/bindings.xml [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/constants.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/lang.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/main.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/main.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/menu.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/menu_frame.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_overlay.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/test.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/test/test.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/browser.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/browser.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/controller.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/date.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/deck.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/error.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/exec.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/file.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/fm_utils.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/fm_view.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/functional.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/list.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/money.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/network.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/shell.html [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/widgets.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/window.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/xuledit.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/xuledit.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/skin/OPEN_ILS_STAFF_CLIENT/OPEN_ILS_STAFF_CLIENT.css [deleted file]
Open-ILS/xul/staff_client/chrome/skin/OPEN_ILS_STAFF_CLIENT/auth.css [deleted file]
Open-ILS/xul/staff_client/chrome/skin/OPEN_ILS_STAFF_CLIENT/media/images/opentriangle.gif [deleted file]
Open-ILS/xul/staff_client/chrome/skin/OPEN_ILS_STAFF_CLIENT/media/images/triangle.gif [deleted file]
Open-ILS/xul/staff_client/chrome/skin/auth.css [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/skin/global.css [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/skin/media/images/opentriangle.gif [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/skin/media/images/triangle.gif [new file with mode: 0644]

index 4f932da..5ca7f03 100644 (file)
@@ -4,11 +4,10 @@ DESCRIPTION=Evergreen Staff Client
 BUILD=2005072719
 
 RETRIEVE_FM_ALL=wget -N http://dev.gapines.org/opac/common/js/fmall.js
-RETRIEVE_CLIENT_CONFIG=cp ../../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml .
-RETRIEVE_LANG_DTD=cp ../../../../../../web/opac/locale/en-US/lang.dtd .
-MOZILLA_SPECIAL_RESOURCE=/home/phasefx/work/mozilla/dist/bin/res/dtd
+RETRIEVE_CLIENT_CONFIG=cp ../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml .
+RETRIEVE_LANG_DTD=cp ../../../../../web/opac/locale/en-US/lang.dtd .
 
-all: build package
+all: build 
        @echo
        @echo How do makefiles work again?
        @echo BUILD = ${BUILD}
@@ -19,7 +18,7 @@ build: generated open-ils custom
        @echo
        @echo Everything before packaging
 
-package: OPEN_ILS_STAFF_CLIENT.xpi
+package: open_ils_staff_client.xpi
        @echo
        @echo Packaging
 
@@ -32,55 +31,50 @@ stamp:
        sed -i 's/<em:description>.*<\/em:description>/<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/OPEN_ILS_STAFF_CLIENT/auth.dtd 
-       sed -i 's/auth\.version ".*"/auth\.version "${PACKAGE} ${VERSION} ${BUILD}"/' chrome/locale/en-US/OPEN_ILS_STAFF_CLIENT/auth.dtd 
+       sed -i 's/auth\.title ".*"/auth\.title "${DESCRIPTION}"/' chrome/locale/en-US/auth.dtd 
+       sed -i 's/auth\.version ".*"/auth\.version "${PACKAGE} ${VERSION} ${BUILD}"/' chrome/locale/en-US/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/OPEN_ILS_STAFF_CLIENT/conf ; ${RETRIEVE_CLIENT_CONFIG} );
-       (cd chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util/ ; ${RETRIEVE_FM_ALL} );
-       (cd chrome/locale/en-US/OPEN_ILS_STAFF_CLIENT/ ; ${RETRIEVE_LANG_DTD} );
-       external/dtd2js.pl chrome/locale/en-US/OPEN_ILS_STAFF_CLIENT/lang.dtd > chrome/content/OPEN_ILS_STAFF_CLIENT/main/lang.js
+       (cd chrome/content/conf ; ${RETRIEVE_CLIENT_CONFIG} );
+       (cd chrome/content/OpenILS/util/ ; ${RETRIEVE_FM_ALL} );
+       (cd chrome/locale/en-US/ ; ${RETRIEVE_LANG_DTD} );
+       external/dtd2js.pl chrome/locale/en-US/lang.dtd > chrome/content/main/lang.js
 
 open-ils:
-       cp ../../../OpenSRF/src/javascript/*.js chrome/content/OPEN_ILS_STAFF_CLIENT/OpenSRF/
-       cp ../../../Open-ILS/web/opac/common/js/*.js chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util/
-       cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/
-       cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/
-       cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd chrome/locale/en-US/OPEN_ILS_STAFF_CLIENT/
-       #cp server/main/menu* chrome/content/OPEN_ILS_STAFF_CLIENT/main/
-       #cp server/cat/opac* chrome/content/OPEN_ILS_STAFF_CLIENT/cat/
+       cp ../../../OpenSRF/src/javascript/*.js chrome/content/OpenSRF/
+       cp ../../../Open-ILS/web/opac/common/js/*.js chrome/content/OpenILS/util/
+       cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/marc* chrome/content/legacy/
+       cp ../../../Evergreen/staff_client/chrome/content/evergreen/cat/browse* chrome/content/legacy/
+       cp ../../../Evergreen/staff_client/chrome/locale/en-US/evergreen/cat.dtd chrome/locale/en-US/
+       find chrome/content/legacy/ -type f -name '*.*' -exec sed -i s/evergreen/open_ils_staff_client/g {} \;
 
 patron:
 
 circ:
 
 custom:
-       #(cd chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
-       #cp chrome/locale/en-US/OPEN_ILS_STAFF_CLIENT/*.* ${MOZILLA_SPECIAL_RESOURCE}
+       #(cd chrome/content/OpenILS/util; cp RemoteRequest.js~ RemoteRequest.js)
 
-OPEN_ILS_STAFF_CLIENT.xpi: OPEN_ILS_STAFF_CLIENT.jar
+open_ils_staff_client.xpi: open_ils_staff_client.jar
        @echo
        @echo make the xpi file
-       zip -r OPEN_ILS_STAFF_CLIENT.xpi chrome/ defaults/ install.js install.rdf application.ini Makefile LICENSE README -x \*CVS\* > /dev/null
+       zip -r open_ils_staff_client.xpi chrome/ defaults/ install.js install.rdf application.ini Makefile LICENSE README -x \*CVS\* > /dev/null
 
-OPEN_ILS_STAFF_CLIENT.jar: build
+open_ils_staff_client.jar: build
        @echo
        @echo make the jar file
-       (cd chrome; zip -r OPEN_ILS_STAFF_CLIENT.jar content/ locale/ skin/ -x \*CVS\* > /dev/null )
+       (cd chrome; zip -r open_ils_staff_client.jar content/ locale/ skin/ -x \*CVS\* > /dev/null )
 
 clean:
        @echo
        @echo delete derived files
-       rm -f OPEN_ILS_STAFF_CLIENT.xpi
-       rm -f chrome/OPEN_ILS_STAFF_CLIENT.jar
-       #rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu.js chrome/content/OPEN_ILS_STAFF_CLIENT/menu_frame*
-       rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/marc*
-       rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/browse*
-       rm -f chrome/locale/en-US/OPEN_ILS_STAFF_CLIENT/cat.dtd
-       rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/conf/client_config.xml
-       rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/OpenSRF/*js
-       rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util/*js
-       #rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/widgets/*js
-       #rm -f chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/widgets/menu/*js
+       rm -f open_ils_staff_client.xpi
+       rm -f chrome/open_ils_staff_client.jar
+       rm -f chrome/content/legacy/marc*
+       rm -f chrome/content/legacy/browse*
+       rm -f chrome/locale/en-US/cat.dtd
+       rm -f chrome/content/conf/client_config.xml
+       rm -f chrome/content/OpenSRF/*js
+       rm -f chrome/content/OpenILS/util/*js
index d8cab61..1572628 100644 (file)
@@ -1,3 +1,3 @@
-content open_ils_staff_client jar:open_ils_staff_client.jar!/content/open_ils_staff_client/
-locale open_ils_staff_client en-US jar:open_ils_staff_client.jar!/locale/en-US/open_ils_staff_client/
-skin open_ils_staff_client open_ils_staff_client jar:open_ils_staff_client.jar!/skin/open_ils_staff_client/
+content open_ils_staff_client content/
+locale open_ils_staff_client locale/en-US/
+skin open_ils_staff_client open_ils_staff_client skin/
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/data.js
deleted file mode 100644 (file)
index e252f7e..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-dump('entering OpenILS/data.js\n');
-
-if (typeof OpenILS == 'undefined') OpenILS = {};
-OpenILS.data = function () {
-
-       JSAN.use('util.error'); this.error = new util.error();
-       JSAN.use('util.network'); this.network = new util.network();
-
-       return this;
-}
-
-OpenILS.data.prototype = {
-
-       'list' : {},
-       'hash' : {},
-       'tree' : {},
-
-       'temp' : '',
-
-       'init' : function (params) {
-
-               try {
-                       if (params && params.via == 'stash') {  
-                               this.stash_retrieve();
-                       } else {
-                               this.network_retrieve();
-                       }
-               
-               } catch(E) {
-                       this.error.sdump('D_ERROR','Error in OpenILS.data.init('
-                               +js2JSON(params)+'): ' + js2JSON(E) );
-               }
-
-
-       },
-
-       'stash' : function () {
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
-                       var data_cache=new OpenILS( );
-                       for (var i = 0; i < arguments.length; i++) {
-                               this.error.sdump('D_DATA','stashing ' + arguments[i] + ' : ' + this[arguments[i]] + '\n');
-                               data_cache.wrappedJSObject.OpenILS.prototype.data[arguments[i]] = this[arguments[i]];
-                       }
-               } catch(E) {
-                       this.error.sdump('D_ERROR','Error in OpenILS.data.stash(): ' + js2JSON(E) );
-               }
-       },
-
-       '_debug_stash' : function() {
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
-                       var data_cache=new OpenILS( );
-                       for (var i in data_cache.wrappedJSObject.OpenILS.prototype.data) {
-                               dump('_debug_stash ' + i + '\n');
-                       }
-               } catch(E) {
-                       this.error.sdump('D_ERROR','Error in OpenILS.data._debug_stash(): ' + js2JSON(E) );
-               }
-       },
-
-       '_fm_objects' : {
-
-               'pgt' : [ api.FM_PGT_RETRIEVE.app, api.FM_PGT_RETRIEVE.method, [], true ],
-               'cit' : [ api.FM_CIT_RETRIEVE.app, api.FM_CIT_RETRIEVE.method, [], true ],
-               'cst' : [ api.FM_CST_RETRIEVE.app, api.FM_CST_RETRIEVE.method, [], true ],
-               'acpl' : [ api.FM_ACPL_RETRIEVE.app, api.FM_ACPL_RETRIEVE.method, [], true ],
-               'ccs' : [ api.FM_CCS_RETRIEVE.app, api.FM_CCS_RETRIEVE.method, [], true ],
-               'aou' : [ api.FM_AOU_RETRIEVE.app, api.FM_AOU_RETRIEVE.method, [], true ],
-               'aout' : [ api.FM_AOUT_RETRIEVE.app, api.FM_AOUT_RETRIEVE.method, [], true ]    
-       },
-
-       'stash_retrieve' : function() {
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
-                       var data_cache=new OpenILS( );
-                       var dc = data_cache.wrappedJSObject.OpenILS.prototype.data;
-                       for (var i in dc) {
-                               this.error.sdump('D_DATA','Retrieving ' + i + ' : ' + dc[i] + '\n');
-                               this[i] = dc[i];
-                       }
-                       if (typeof this.on_complete == 'function') {
-
-                               this.on_complete();
-                       }
-               } catch(E) {
-                       this.error.sdump('D_ERROR','Error in OpenILS.data._debug_stash(): ' + js2JSON(E) );
-               }
-       },
-
-       'network_retrieve' : function() {
-               var obj = this;
-
-               JSAN.use('util.file');
-               JSAN.use('util.functional');
-               JSAN.use('util.fm_utils');
-
-               function gen_fm_retrieval_func(classname,data) {
-                       var app = data[0]; var method = data[1]; var params = data[2]; var cacheable = data[3];
-                       return function () {
-
-                               function convert() {
-                                       try {
-                                               if (obj.list[classname].constructor.name == 'Array') {
-                                                       obj.hash[classname] = 
-                                                               util.functional.convert_object_list_to_hash(
-                                                                       obj.list[classname]
-                                                               );
-                                               }
-                                       } catch(E) {
-
-                                               obj.error.sdump('D_ERROR',E + '\n');
-                                       }
-
-                               }
-
-                               try {
-                                       obj.list[classname] = obj.network.request( app, method, params);
-                                       convert();
-                                       // if cacheable, store an offline copy
-                                       if (cacheable) {
-                                               var file = new util.file( classname );
-                                               file.set_object( obj.list[classname] );
-                                       }
-
-                               } catch(E) {
-                                       // if cacheable, try offline
-                                       if (cacheable) {
-                                               try {
-                                                       var file = new util.file( classname );
-                                                       obj.list[classname] = file.get_object();
-                                                       convert();
-                                               } catch(E) {
-                                                       throw(E);
-                                               }
-                                       } else {
-                                               throw(E); // for now
-                                       }
-                               }
-                       }
-               }
-
-               this.chain = [];
-
-               this.chain.push(
-                       function() {
-                               var f = gen_fm_retrieval_func(
-                                       'au',
-                                       [
-                                               api.FM_AU_RETRIEVE_VIA_SESSION.app,
-                                               api.FM_AU_RETRIEVE_VIA_SESSION.method,
-                                               [ obj.session ],
-                                               false
-                                       ]
-                               );
-                               try {
-                                       f();
-                               } catch(E) {
-                                       var error = 'Error: ' + js2JSON(E);
-                                       obj.error.sdump('D_ERROR',error);
-                                       alert(error);
-                                       throw(E);
-                               }
-                               obj.list.au = [ obj.list.au ];
-                       }
-               );
-
-               this.chain.push(
-                       function() {
-                               var f = gen_fm_retrieval_func(
-                                       'asv',
-                                       [
-                                               api.FM_ASV_RETRIEVE_REQUIRED.app,
-                                               api.FM_ASV_RETRIEVE_REQUIRED.method,
-                                               [ obj.session ],
-                                               true
-                                       ]
-                               );
-                               try {
-                                       f();
-                               } catch(E) {
-                                       var error = 'Error: ' + js2JSON(E);
-                                       obj.error.sdump('D_ERROR',error);
-                                       alert(error);
-                                       throw(E);
-                               }
-                       }
-               );
-
-
-               obj.error.sdump('D_DEBUG','_fm_objects = ' + js2JSON(this._fm_objects) + '\n');
-
-               for (var i in this._fm_objects) {
-                       this.chain.push( gen_fm_retrieval_func(i,this._fm_objects[i]) );
-               }
-
-               // The previous org_tree call returned a tree, not a list or hash.
-               this.chain.push(
-                       function () {
-                               obj.tree.aou = obj.list.aou;
-                               obj.list.aou = util.fm_utils.flatten_ou_branch( obj.tree.aou );
-                               obj.hash.aou = util.functional.convert_object_list_to_hash( obj.list.aou );
-                       }
-               );
-
-               this.chain.push(
-                       gen_fm_retrieval_func('my_aou', 
-                               [ 
-                                       api.FM_AOU_RETRIEVE_RELATED_VIA_SESSION.app,
-                                       api.FM_AOU_RETRIEVE_RELATED_VIA_SESSION.method,
-                                       [ obj.session ],
-                                       true
-                               ]
-                       )
-               );
-
-               // Do this after we get the user object
-               this.chain.push(
-
-                       function () {
-
-                               gen_fm_retrieval_func( 'my_actsc', 
-                                       [ 
-                                               api.FM_ACTSC_RETRIEVE_VIA_AOU.app,
-                                               api.FM_ACTSC_RETRIEVE_VIA_AOU.method,
-                                               [ obj.session, obj.list.au[0].home_ou() ],
-                                               true
-                                       ]
-                               )();
-                       }
-               );
-
-               if (typeof this.on_complete == 'function') {
-
-                       this.chain.push( this.on_complete );
-               }
-               JSAN.use('util.exec'); this.exec = new util.exec();
-               this.exec.on_error = function(E) { 
-               
-                       if (typeof obj.on_error == 'function') {
-                               obj.on_error();
-                       } else {
-                               alert('oops: ' + E ); 
-                       }
-
-                       return false; /* break chain */
-               }
-
-               this.exec.chain( this.chain );
-
-       }
-}
-
-dump('exiting OpenILS/data.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util_overlay.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/OpenILS/util_overlay.xul
deleted file mode 100644 (file)
index 2b1d54d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!-- Modified by Jason for Evergreen -->
-
-<overlay id="openils_util_overlay"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <script>dump('Loading OpenILS/util_overlay.xul\n');</script>
-       <scripts id="openils_util_scripts">
-               <script type="text/javascript" src="../main/constants.js" />
-               <script type="text/javascript" src="util/utils.js" />
-               <script type="text/javascript" src="util/CGI.js" />
-               <script type="text/javascript" src="util/md5.js" />
-               <script type="text/javascript" src="util/JSON.js" />
-               <script type="text/javascript" src="util/fmall.js" />
-               <script type="text/javascript" src="util/fmgen.js" />
-               <script type="text/javascript" src="util/RemoteRequest.js" />
-               <script type="text/javascript" src="util/OrgTree.js" />
-               <script type="text/javascript" src="util/org_utils.js" />   
-       </scripts>
-       <script>dump('Loaded OpenILS/util_overlay.xul\n');</script>
-
-</overlay>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey.js
deleted file mode 100644 (file)
index 8afcef3..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-dump('Loading survey.js\n');
-
-var SURVEY = {};
-var last_answer;
-var last_button;
-
-function populate_lib_list_with_branch(menulist,menupopup,defaultlib,branch,id_flag) {
-       JSAN.use('util.fm_utils');
-       var default_menuitem;
-       if (typeof defaultlib == 'object') {
-               defaultlib = defaultlib.id();   
-       }
-       var popup = menupopup;
-       if (typeof(popup)!='object') popup = document.getElementById(menupopup);
-       if (popup) {
-               //empty_widget(popup);
-               var padding_flag = true;
-               var flat_branch = util.fm_utils.flatten_ou_branch( branch );
-               for (var i in flat_branch) {
-                       var menuitem = document.createElement('menuitem');
-                       var padding = '';
-                       var depth = g.OpenILS.data.hash.aout[ flat_branch[i].ou_type() ].depth();
-                       if (padding_flag) {
-                               for (var j = 0; j < depth; j++) { 
-                                       padding = padding + '  '; 
-                               }
-                       }
-                       menuitem.setAttribute('label', padding + flat_branch[i].name() );
-                       menuitem.setAttribute('value', flat_branch[i].id() );
-                       if (id_flag) menuitem.setAttribute('id', 'libitem' + flat_branch[i].id() );
-                       if (defaultlib == flat_branch[i].id()) {
-                               default_menuitem = menuitem;
-                       }
-                       popup.appendChild(menuitem);
-               }
-               var list = menulist;
-               if (typeof(list)!='object') { list = document.getElementById(menulist); }
-               if (list && defaultlib && default_menuitem) {
-                       if (list) { list.selectedItem = default_menuitem; }
-               }
-       } else {
-                       var err = ('populate_lib_list_with_branch: Could not find ' + menupopup + '\n');
-                       dump(err);
-                       alert(err);
-       }
-}
-
-
-function survey_init() {
-       dump('survey_init()\n');
-       var user_ou = g.OpenILS.data.list.au[0].home_ou();
-       var user_branch = g.OpenILS.data.hash.aou[ user_ou ];
-       populate_lib_list_with_branch('lib_menulist','lib_menupopup',user_ou,user_branch); 
-       SURVEY['asv'] = new asv(); SURVEY['asv'].isnew('1');
-       SURVEY['num_of_questions'] = 0;
-       document.getElementById('survey_name').focus();
-}
-
-function save_survey() {
-       SURVEY.asv.description(
-               document.getElementById('survey_description').value
-       );
-       SURVEY.asv.name(
-               document.getElementById('survey_name').value
-       );
-       SURVEY.asv.owner(
-               document.getElementById('lib_menulist').value
-       );
-       var survey_start = document.getElementById('survey_start').value;
-       if (survey_start) {
-               SURVEY.asv.start_date(
-                       survey_start
-               );
-       } else {
-               SURVEY.asv.start_date(
-                       null
-               );
-       }
-       var survey_end = document.getElementById('survey_end').value;
-       if (survey_end) {
-               SURVEY.asv.end_date(
-                       survey_end
-               );
-       } else {
-               SURVEY.asv.end_date(
-                       null
-               );
-       }
-       if ( document.getElementById('required_checkbox').checked ) {
-               SURVEY.asv.required('1');
-       } else {
-               SURVEY.asv.required('0');
-       }
-       if ( document.getElementById('opac_checkbox').checked ) {
-               SURVEY.asv.opac('1');
-       } else {
-               SURVEY.asv.opac('0');
-       }
-       if ( document.getElementById('poll_checkbox').checked ) {
-               SURVEY.asv.poll('1');
-       } else {
-               SURVEY.asv.poll('0');
-       }
-
-       if ( document.getElementById('patron_summary_checkbox').checked ) {
-               SURVEY.asv.usr_summary('1');
-       } else {
-               SURVEY.asv.usr_summary('0');
-       }
-       g.error.sdump('D_SURVEY', 'before survey = ' + js2JSON( SURVEY.asv ) + '\n');
-       try {
-               var result = g.network.request(
-                       api.FM_ASV_CREATE.app,
-                       api.FM_ASV_CREATE.method,
-                       [ g.session, SURVEY.asv ]
-               );
-               if (! (result instanceof asv) ) {
-                       throw('save_survey: result not an asv');
-               } else {
-                       var surveys_list = g.OpenILS.data.list.asv;
-                       var surveys_hash = g.OpenILS.data.hash.asv;
-                       surveys_list.push( result );
-                       surveys_hash[ result.id() ] = result;
-                       g.OpenILS.data.stash('list','hash');
-               }
-       } catch(E) {
-               var err = ('Survey failed: ' + js2JSON(E) + '\n');
-               g.error.sdump('D_ERROR',err);
-               alert(err);
-               throw(err);
-       }
-       g.error.sdump('D_SURVEY', 'after  survey = ' + js2JSON( SURVEY.asv ) + '\n');
-}
-
-var original_description;
-function setDescription(e,t) {
-       var page = document.getElementById(e);
-       var desc = page.getAttribute('description');
-       if (!original_description) original_description = desc;
-       var value = document.getElementById(t).value;
-       page.setAttribute('description',original_description + ' ' + value); 
-}
-
-var new_id = -1;
-function add_answer(e, my_asvq_id) {
-       var row = e.target.parentNode;
-       var rows = row.parentNode;
-       var answer = e.target.previousSibling; answer.select();
-
-       if (! answer.value ) { return; }
-       
-       /* XUL */
-       var n_row = document.createElement('row');
-       rows.insertBefore( n_row, row );
-       var label_1 = document.createElement('label');
-       n_row.appendChild( label_1 );
-       var label_2 = document.createElement('label');
-               label_2.setAttribute('value', answer.value );
-       n_row.appendChild( label_2 );
-
-       /* OBJECT */
-
-       var my_asva = new asva(); my_asva.isnew('1'); my_asva.id( new_id-- );
-       my_asva.answer( answer.value );
-
-       JSAN.use('util.functional');
-       var my_asvq = util.functional.find_id_object_in_list( SURVEY.asv.questions(), my_asvq_id );
-       if (my_asvq.answers() == null) {
-               my_asvq.answers( [] );
-       }
-
-       my_asvq.answers().push( my_asva );
-
-       var num_of_answers = my_asvq.answers().length;
-       var last_number = 96 + num_of_answers;
-       var next_number = 97 + num_of_answers;
-       var last_letter = String.fromCharCode( last_number );
-       var next_letter = String.fromCharCode( next_number );
-       label_1.setAttribute('value', last_letter + ')' );
-       row.firstChild.setAttribute('value', next_letter + ')' );
-
-       if (num_of_answers == 26) {
-               rows.removeChild(row);
-       }
-}
-
-function add_question() {
-       SURVEY.num_of_questions++;
-       var question = document.getElementById('new_question');
-
-       if (! question.value ) { return; }
-
-       document.getElementById('survey_add').canAdvance = true;
-
-       var my_asvq = new asvq(); my_asvq.isnew('1'); my_asvq.id( new_id-- );
-       my_asvq.question( question.value );
-
-       if ( SURVEY.asv.questions() == null ) {
-               SURVEY.asv.questions( [] );
-       }
-
-       SURVEY.asv.questions().push( my_asvq );
-
-       add_question_row(my_asvq);
-
-       document.getElementById('new_question_label').setAttribute('value', '#' + (SURVEY.num_of_questions + 1) );
-       //question.select();
-       if (last_answer) last_answer.focus();
-}
-
-function add_question_row(my_asvq) {
-       var rows = document.getElementById('page2_grid1_rows');
-       var row = document.createElement('row');
-       rows.insertBefore(row, document.getElementById('page2_grid1_row1'));
-
-       var label_number = document.createElement('label');
-               label_number.setAttribute('value','#' + SURVEY['num_of_questions']);
-       row.appendChild(label_number);
-
-       var grid = document.createElement('grid');
-       row.appendChild(grid);
-       var g_cols = document.createElement('columns');
-       grid.appendChild(g_cols);
-       var g_col_1 = document.createElement('column');
-       g_cols.appendChild(g_col_1);
-       var g_col_2 = document.createElement('column');
-               g_col_2.setAttribute('flex','1');
-       g_cols.appendChild(g_col_2);
-       var g_col_3 = document.createElement('column');
-       g_cols.appendChild(g_col_3);
-       var g_rows = document.createElement('rows');
-       grid.appendChild(g_rows);
-       var g_row_1 = document.createElement('row');
-       g_rows.appendChild(g_row_1);
-       var g_label_1 = document.createElement('label');
-       g_row_1.appendChild(g_label_1);
-       var g_label_2 = document.createElement('label');
-               g_label_2.setAttribute('value', my_asvq.question() );
-       g_row_1.appendChild(g_label_2);
-       var g_row_2 = document.createElement('row');
-       g_rows.appendChild(g_row_2);
-       var g_label2_1 = document.createElement('label');
-               g_label2_1.setAttribute('value', 'a)' );
-       g_row_2.appendChild(g_label2_1);
-       var g_tb = document.createElement('textbox');
-               g_tb.setAttribute('flex','1');
-       g_row_2.appendChild(g_tb);
-       if (last_button) last_button.setAttribute('accesskey','');
-       var g_b = document.createElement('button');
-               g_b.setAttribute('label','Save this Response');
-               g_b.setAttribute('accesskey','R');
-               g_b.setAttribute('oncommand','add_answer(event,' + my_asvq.id() + ');');
-       g_row_2.appendChild(g_b);
-
-       var blank = document.createElement('row');
-       rows.insertBefore( blank , document.getElementById('page2_grid1_row1') );
-       var blank2 = document.createElement('label');
-               blank2.setAttribute('value', ' ');
-       blank.appendChild( blank2 );
-
-       last_answer = g_tb;
-       last_button = g_b;
-}
-
-function page1_check_advance() {
-       if ( document.getElementById('survey_name').value ) {
-               document.getElementById('survey_add').canAdvance = true;
-       } else {
-               document.getElementById('survey_add').canAdvance = false;
-       }
-}
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey_overlay.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey_overlay.xul
deleted file mode 100644 (file)
index a36f746..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE overlay SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-<overlay id="survey_overlay" 
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <script>dump('survey_overlay.xul loading\n');</script>
-
-       <wizardpage id="page1" 
-               description="&staff.survey.wizard.page1;" 
-               onpageadvanced="setDescription('page2','survey_name');"
-               onpageshow="document.getElementById('survey_name').focus();"
-       >
-               <grid id="page1_grid1"/>
-       </wizardpage>
-
-       <grid id="page1_grid1">
-               <columns id="page1_grid1_columns">
-                       <column id="page1_grid1_column1"/>
-                       <column id="page1_grid1_column2"/>
-               </columns>
-               <rows id="page1_grid1_rows">
-                       <row id="page1_grid1_row1">
-                               <label id="page1_row1_label1" value="Available to:" class="wizard_label"/>
-                               <menulist id="lib_menulist">
-                                       <menupopup id="lib_menupopup"/>
-                               </menulist>
-                       </row>
-
-                       <row id="page1_grid1_row2">
-                               <label id="page1_row2_label1" value="Name:" class="wizard_label"/>
-                               <textbox id="survey_name" onchange="page1_check_advance();" onkeyup="page1_check_advance();" />
-                       </row>
-
-                       <row id="page1_grid1_row3">
-                               <label id="page1_row3_label1" value="Description:" class="wizard_label"/>
-                               <textbox id="survey_description" multiline="true" rows="4"/>
-                       </row>
-
-                       <row>
-                               <label id="page1_row1_label2" value="Required:" class="wizard_label"/>
-                               <checkbox id="required_checkbox"/>
-                       </row>
-                       
-                       <row id="page1_grid1_row1c">
-                               <label id="page1_row1c_label3" value="Poll Format:" class="wizard_label"/>
-                               <checkbox id="poll_checkbox"/>
-                       </row>
-
-
-                       <row id="page1_grid1_row1a">
-                               <label id="page1_row1a_label3" value="OPAC Visible:" class="wizard_label"/>
-                               <checkbox id="opac_checkbox"/>
-                       </row>
-
-                       <row id="page1_grid1_row1b">
-                               <label id="page1_row1b_label3" value="Staff Client:" class="wizard_label"/>
-                               <checkbox id="patron_summary_checkbox"/>
-                       </row>
-                       <row id="page1_grid1_row1d">
-                               <label id="page1_row2_label2" value="Start:" class="wizard_label"/>
-                               <textbox id="survey_start"/>
-                       </row>
-                       <row>
-                               <label id="page1_row3_label2" value="End:" class="wizard_label"/>
-                               <textbox id="survey_end"/>
-                       </row>
-               </rows>
-       </grid>
-
-       <wizardpage id="page2" 
-               description="&staff.survey.wizard.page2;" 
-               onpageshow="document.getElementById('survey_add').canAdvance = false; document.getElementById('new_question').focus();"
-       >
-               <separator id="page2_separator1"/>
-               <grid id="page2_grid1"/>
-       </wizardpage>
-
-       <grid id='page2_grid1'>
-               <columns id="page2_grid1_columns">
-                       <column id="page2_grid1_column1"/>
-                       <column id="page2_grid1_column2" flex="1"/>
-                       <column id="page2_grid1_column3"/>
-               </columns>
-               <rows id="page2_grid1_rows"/>
-       </grid>
-
-
-       <rows id="page2_grid1_rows">
-               <row id="page2_grid1_row1">
-                       <label id="new_question_label" value="#1"/>
-                       <textbox id="new_question" flex="1"/>
-                       <button id="page2_button1" label="Save this Question" accesskey="q" oncommand="add_question(event);"/>
-               </row>
-       </rows>
-
-       <script>dump('survey_overlay.xul loaded\n');</script>
-</overlay>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey_wizard.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/admin/survey_wizard.xul
deleted file mode 100644 (file)
index e834ee1..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-       <!-- Overlays for this XUL file -->
-       <?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-       <?xul-overlay href="chrome://open_ils_staff_client/content/admin/survey_overlay.xul"?>
-
-<!-- This DTD declaration needs to be fixed for Mozilla locales -->
-<!DOCTYPE wizard SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-<wizard id="survey_add" title="&staff.survey.wizard.title;" 
-       orient="vertical" style="overflow: auto" width="800" height="600"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
-       onwizardfinish="save_survey();"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-       <script>dump('survey_wizard.xul loading\n');</script>
-       <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
-       <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/lang.js"/>
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/admin/survey.js" />
-       <script type="text/javascript">
-       <![CDATA[
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_init() for survey_wizard.xul');
-
-                               g.cgi = new CGI();
-
-                               g.session = g.cgi.param('session'); 
-
-                               JSAN.use('OpenILS.data'); g.OpenILS = {};
-                               g.OpenILS.data = new OpenILS.data(); g.OpenILS.data.init({'via':'stash'});
-
-                               JSAN.use('util.network');
-                               g.network = new util.network();
-
-                               survey_init(); // legacy init
-                               document.getElementById('survey_add').canAdvance = false; 
-       
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\nsurvey_wizard.xul\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-       ]]>
-       </script>
-
-       <!-- Layout to be filled in by overlays and javascript -->
-       <wizardpage id="page1"/>
-       <wizardpage id="page2"/>
-
-       <script>dump('survey_wizard.xul loaded\n');</script>
-</wizard>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/auth/controller.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/auth/controller.js
deleted file mode 100644 (file)
index c2140f7..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-dump('entering auth/controller.js\n');
-
-if (typeof auth == 'undefined') auth = {};
-auth.controller = function (params) {
-       JSAN.use('util.error'); this.error = new util.error();
-       this.w = params.window;
-
-       return this;
-};
-
-auth.controller.prototype = {
-
-       'init' : function () {
-
-               var obj = this;  // so the 'this' in event handlers don't confuse us
-               var w = obj.w;
-
-               // MVC
-               JSAN.use('util.controller'); obj.controller = new util.controller();
-               obj.controller.init(
-                       {
-                               'control_map' : {
-                                       'cmd_login' : [
-                                               ['command'],
-                                               function() {
-                                                       obj.login();
-                                               }
-                                       ],
-                                       'cmd_logoff' : [
-                                               ['command'],
-                                               function() {
-                                                       obj.logoff()
-                                               }
-                                       ],
-                                       'cmd_close_window' : [
-                                               ['command'],
-                                               function() {
-                                                       obj.close()
-                                               }
-                                       ],
-                                       'server_prompt' : [
-                                               ['keypress'],
-                                               handle_keypress
-                                       ],
-                                       'name_prompt' : [
-                                               ['keypress'],
-                                               handle_keypress
-                                       ],
-                                       'password_prompt' : [
-                                               ['keypress'],
-                                               handle_keypress
-                                       ],
-                                       'submit_button' : [
-                                               ['render'],
-                                               function(e) { return function() {} }
-                                       ],
-                                       'progress_bar' : [
-                                               ['render'],
-                                               function(e) { return function() {} }
-                                       ]
-                               }
-                       }
-               );
-               obj.controller.view.name_prompt.focus();
-
-               function handle_keypress(ev) {
-                       if (ev.keyCode && ev.keyCode == 13) {
-                               switch(this) {
-                                       case obj.controller.view.server_prompt:
-                                               ev.preventDefault();
-                                               obj.controller.view.name_prompt.focus(); obj.controller.view.name_prompt.select();
-                                       break;
-                                       case obj.controller.view.name_prompt:
-                                               ev.preventDefault();
-                                               obj.controller.view.password_prompt.focus(); obj.controller.view.password_prompt.select();
-                                       break;
-                                       case obj.controller.view.password_prompt:
-                                               ev.preventDefault();
-                                               obj.controller.view.submit_button.focus(); 
-                                               obj.login();
-                                       break;
-                                       default: break;
-                               }
-                       }
-               }
-
-               // This talks to our ILS
-               JSAN.use('auth.session');
-               obj.session = new auth.session(obj.controller.view);
-
-               if (typeof this.on_init == 'function') {
-                       this.error.sdump('D_AUTH','auth.controller.on_init()\n');
-                       this.on_init();
-               }
-       },
-
-       'login' : function() { 
-
-               var obj = this;
-
-               this.error.sdump('D_AUTH','login with ' 
-                       + this.controller.view.name_prompt.value + ' and ' 
-                       + this.controller.view.password_prompt.value + ' at ' 
-                       + this.controller.view.server_prompt.value + '\n'
-               ); 
-               this.controller.view.server_prompt.disabled = true;
-               this.controller.view.name_prompt.disabled = true;
-               this.controller.view.password_prompt.disabled = true;
-               this.controller.view.submit_button.disabled = true;
-               XML_HTTP_SERVER = this.controller.view.server_prompt.value;
-
-               try {
-
-                       if (typeof this.on_login == 'function') {
-                               this.error.sdump('D_AUTH','auth.controller.session.on_init = ' +
-                                       'auth.controller.on_login\n');
-                               this.session.on_init = this.on_login;
-                               this.session.on_error = function() { obj.logoff(); };
-                       }
-                       
-                       this.session.init();
-
-               } catch(E) {
-                       var error = '!! ' + E + '\n';
-                       this.error.sdump('D_ERROR',error); 
-                       alert(error);
-                       this.logoff();
-                       if (E == 'open-ils.auth.authenticate.init returned false\n') {
-                               this.controller.view.server_prompt.focus();
-                               this.controller.view.server_prompt.select();
-                       }
-
-                       if (typeof this.on_login_error == 'function') {
-                               this.error.sdump('D_AUTH','auth.controller.on_login_error()\n');
-                               this.on_login_error(E);
-                       }
-               }
-
-       },
-       'logoff' : function() { 
-       
-               this.error.sdump('D_AUTH','logoff' + this.w + '\n'); 
-               this.controller.view.progress_bar.value = 0; 
-               this.controller.view.progress_bar.setAttribute('real','0.0');
-               this.controller.view.submit_button.disabled = false;
-               this.controller.view.password_prompt.disabled = false;
-               this.controller.view.password_prompt.value = '';
-               this.controller.view.name_prompt.disabled = false;
-               this.controller.view.name_prompt.focus(); 
-               this.controller.view.name_prompt.select();
-               this.controller.view.server_prompt.disabled = false;
-
-               var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService();
-               var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
-               var enumerator = windowManagerInterface.getEnumerator(null);
-
-               var w; // close all other windows
-               while ( w = enumerator.getNext() ) {
-                       if (w != window) w.close();
-               }
-
-               this.session.close();
-
-               if (typeof this.on_logoff == 'function') {
-                       this.error.sdump('D_AUTH','auth.controller.on_logoff()\n');
-                       this.on_logoff();
-               }
-               
-       },
-       'close' : function() { 
-       
-               this.error.sdump('D_AUTH','close' + this.w + '\n');
-               this.logoff();
-               //Basically, we want to close all the windows for this application (and in case we're running this as
-               //a firefox extension, we don't want to merely shutdown mozilla).  I'll probably create an XPCOM for
-               //tracking the windows.
-               //for (var w in this.G.window.appshell_list) {
-               //      this.G.window.appshell_list[w].close();
-               //}
-               this.w.close(); /* Probably won't go any further */
-
-               if (typeof this.on_close == 'function') {
-                       this.error.sdump('D_AUTH','auth.controller.on_close()\n');
-                       this.on_close();
-               }
-               
-       }
-}
-
-dump('exiting auth/controller.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/auth/session.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/auth/session.js
deleted file mode 100644 (file)
index d5a8de8..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-dump('entering auth/session.js\n');
-
-if (typeof auth == 'undefined') auth = {};
-auth.session = function (view) {
-
-       JSAN.use('util.error'); this.error = new util.error();
-       JSAN.use('util.network'); this.network = new util.network();
-       this.view = view;
-
-       return this;
-};
-
-auth.session.prototype = {
-
-       'init' : function () {
-
-               try {
-                       var init = this.network.request(
-                               api.AUTH_INIT.app,
-                               api.AUTH_INIT.method,
-                               [ this.view.name_prompt.value ]
-                       );
-
-                       if (init) {
-
-                               var robj = this.network.request(
-                                       api.AUTH_COMPLETE.app,
-                                       api.AUTH_COMPLETE.method,
-                                       [ 
-                                               this.view.name_prompt.value,
-                                               hex_md5(
-                                                       init +
-                                                       hex_md5(
-                                                               this.view.password_prompt.value
-                                                       )
-                                               ),
-                                               'staff'
-                                       ]
-                               );
-
-                               if (robj.ilsevent == 0) {
-                                       this.key = robj.payload.authtoken;
-                                       this.authtime = robj.payload.authtime;
-                               } else {
-                                       var error = robj.ilsevent + ' : ' + this.error.get_ilsevent( robj.ilsevent );
-                                       this.error.sdump('D_AUTH','auth.session.init: ' + error + '\n');
-                                       alert( error );
-                                       throw(robj);
-                               }
-
-                               this.error.sdump('D_AUTH','auth.session.key = ' + this.key + '\n');
-
-                               if (typeof this.on_init == 'function') {
-                                       this.error.sdump('D_AUTH','auth.session.on_init()\n');
-                                       this.on_init();
-                               }
-
-                       } else {
-
-                               var error = 'open-ils.auth.authenticate.init returned false\n';
-                               this.error.sdump('D_ERROR',error);
-                               throw(error);
-                       }
-
-               } catch(E) {
-                       var error = 'Error on auth.session.init(): ' + js2JSON(E) + '\n';
-                       this.error.sdump('D_ERROR',error); 
-
-                       if (typeof this.on_init_error == 'function') {
-                               this.error.sdump('D_AUTH','auth.session.on_init_error()\n');
-                               this.on_init_error(E);
-                       }
-                       if (typeof this.on_error == 'function') {
-                               this.error.sdump('D_AUTH','auth.session.on_error()\n');
-                               this.on_error();
-                       }
-
-                       //throw(E);
-                       /* This was for testing
-                       if (typeof this.on_init == 'function') {
-                               this.error.sdump('D_AUTH','auth.session.on_init() despite error\n');
-                               this.on_init();
-                       }
-                       */
-               }
-       },
-
-       'close' : function () { 
-               var obj = this;
-               obj.error.sdump('D_AUTH','auth.session.close()\n'); 
-               if (obj.key) obj.network.request(
-                       api.AUTH_DELETE.app,
-                       api.AUTH_DELETE.method,
-                       [ obj.key ]
-               );
-               obj.key = null;
-               if (typeof obj.on_close == 'function') {
-                       obj.error.sdump('D_AUTH','auth.session.on_close()\n');
-                       obj.on_close();
-               }
-       }
-
-}
-
-dump('exiting auth/session.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/cat/details.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/cat/details.xul
deleted file mode 100644 (file)
index b91466f..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Cataloger's Search Result Screen -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-
-<window id="details_win"
-       onload="try { my_init(); } catch(E) { alert(E); }"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-        <script type="text/javascript">
-               var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
-               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-       </script>
-        <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script>
-       <![CDATA[
-
-               var session; var docid; var marc_html; var top_pane; var bottom_pane;
-
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_init() for cat/details.xul');
-
-                               g.cgi = new CGI();
-                               session = g.cgi.param('session');
-                               docid = g.cgi.param('docid');
-
-                               JSAN.use('util.deck');
-                               top_pane = new util.deck('top_pane');
-
-                               setTimeout(
-                                       function() {
-                                               set_brief_view();
-                                       }, 0
-                               );
-                               
-                               JSAN.use('util.network'); g.network = new util.network();
-                               bottom_pane = new util.deck('bottom_pane');
-
-                               set_marc_view();
-
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\ncat/details.xul\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-
-               function set_brief_view() {
-                       top_pane.set_iframe( 
-                               xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid), 
-                               {}, 
-                               { 
-                                       'set_tab_name' : function(n) { 
-                                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                                       try { window.xulG.set_tab_name('Bib Record: ' + n); } catch(E) { alert(E); }
-                                               } else {
-                                                       dump('no set_tab_name\n');
-                                               }
-                                       }
-                               }  
-                       );
-               }
-
-               function set_marc_view() {
-                       bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
-               }
-
-               function set_marc_edit() {
-                       bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_EDIT ) + '?session=' + window.escape(session) 
-                               + '&docid=' + window.escape(docid),{},xulG);
-               }
-
-               function set_copy_browser() {
-                       bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?session=' + window.escape(session) 
-                               + '&docid=' + window.escape(docid),{},xulG);
-               }
-
-       ]]>
-       </script>
-
-       <vbox flex="1">
-               <deck id="top_pane"/>
-               <hbox>
-                       <button label="MARC View" id="marc_view" oncommand="set_marc_view();"/>
-                       <button label="MARC Edit" id="marc_edit" oncommand="set_marc_edit();"/>
-                       <button label="Copy Browser" id="copy_browse" oncommand="set_copy_browser();"/>
-               </hbox>
-               <deck id="bottom_pane" flex="1"/>
-       </vbox>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/cat/opac.xul
deleted file mode 100644 (file)
index ed38373..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Cataloger's Search Result Screen -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-
-<window id="opac_win"
-       onload="try { my_init(); } catch(E) { alert(E); }"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-        <script type="text/javascript">
-               var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
-               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-       </script>
-        <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script>
-       <![CDATA[
-
-               var session; var authtime; var docid; var marc_html; var top_pane; var bottom_pane; var opac_frame;
-
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_init() for cat/opac.xul');
-
-                               JSAN.use('util.network'); g.network = new util.network();
-
-                               g.cgi = new CGI();
-                               try { session = g.cgi.param('session') || xulG.session; } catch(E) { g.error.sdump('D_ERROR',E); }
-                               try { authtime = g.cgi.param('authtime') || xulG.authtime; } catch(E) { g.error.sdump('D_ERROR',E); }
-                               try { docid = g.cgi.param('docid') || xulG.docid; } catch(E) { g.error.sdump('D_ERROR',E); }
-                               try { opac_url = g.cgi.param('opac_url') || xulG.opac_url; } catch(E) { g.error.sdump('D_ERROR',E); }
-
-                               JSAN.use('util.deck');
-                               top_pane = new util.deck('top_pane');
-                               bottom_pane = new util.deck('bottom_pane');
-
-                               set_opac();
-
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\ncat/opac.xul\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-
-               function set_brief_view() {
-                       var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid); 
-                       dump('spawning ' + url + '\n');
-                       top_pane.set_iframe( 
-                               url,
-                               {}, 
-                               { 
-                                       'set_tab_name' : function(n) { 
-                                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                                       try { window.xulG.set_tab_name('Bib Record: ' + n); } catch(E) { alert(E); }
-                                               } else {
-                                                       dump('no set_tab_name\n');
-                                               }
-                                       }
-                               }  
-                       );
-               }
-
-               function set_marc_view() {
-                       bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
-               }
-
-               function set_marc_edit() {
-                       bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_EDIT ) + '?session=' + window.escape(session) 
-                               + '&docid=' + window.escape(docid),{},xulG);
-               }
-
-               function set_copy_browser() {
-                       bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?session=' + window.escape(session) 
-                               + '&docid=' + window.escape(docid),{},xulG);
-               }
-
-               function set_opac() {
-                       try {
-                               dump('set_opac: session = ' + session + ' authtime = ' + authtime + '\n');
-                               var content_params = { 
-                                       'show_nav_buttons' : true,
-                                       'show_print_button' : true,
-                                       'passthru_content_params' : { 'authtoken' : session, 'authtime' : authtime },
-                                       'on_url_load' : function(f) {
-                                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                               var win;
-                                               try {
-                                                       if (typeof f.contentWindow.wrappedJSObject.attachEvt != 'undefined') {
-                                                               win = f.contentWindow.wrappedJSObject;
-                                                       } else {
-                                                               win = f.contentWindow;
-                                                       }
-                                               } catch(E) {
-                                                       win = f.contentWindow;
-                                               }
-                                               win.attachEvt("rdetail", "recordRetrieved",
-                                                       function(id){
-                                                               try {
-                                                                       var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid) 
-                                                                       dump('removing ' + url + '\n');
-                                                                       try { top_pane.remove_iframe( url ); } catch(E) { dump(E + '\n'); }
-                                                                       docid = id;
-                                                                       set_brief_view();
-                                                                       document.getElementById('nav').setAttribute('hidden','false');
-                                                               } catch(E) {
-                                                                       alert(E);
-                                                               }
-                                                       }
-                                               );
-                                       },
-                               };
-                               if (opac_url) content_params.url = opac_url;
-                               browser_frame = bottom_pane.set_iframe( xulG.url_prefix(urls.XUL_BROWSER) + '?name=Catalog', {}, content_params);
-                       } catch(E) {
-                               g.error.sdump('D_ERROR','set_opac: ' + E);
-                       }
-               }
-
-               function bib_in_new_tab() {
-                       try {
-                               var url = browser_frame.contentWindow.g.browser.controller.view.browser_browser.contentWindow.wrappedJSObject.location.href;
-                               var content_params = { 'session' : session, 'authtime' : authtime, 'opac_url' : url };
-                               xulG.new_tab(xulG.url_prefix(urls.XUL_OPAC_WRAPPER), {}, content_params);
-                       } catch(E) {
-                               g.error.sdump('D_ERROR',E);
-                       }
-               }
-
-               function remove_me() {
-                       var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid);
-                       dump('removing ' + url + '\n');
-                       try { top_pane.remove_iframe( url ); } catch(E) { dump(E + '\n'); }
-                       document.getElementById('nav').setAttribute('hidden','true');
-               }
-
-       ]]>
-       </script>
-
-       <vbox flex="1">
-               <deck id="top_pane"/>
-               <hbox id="nav" hidden="true">
-                       <button label="OPAC View" id="opac_view" oncommand="set_opac();"/>
-                       <button label="MARC View" id="marc_view" oncommand="set_marc_view();"/>
-                       <button label="MARC Edit" id="marc_edit" oncommand="set_marc_edit();"/>
-                       <button label="Copy Browser" id="copy_browse" oncommand="set_copy_browser();"/>
-                       <button label="Open in New Tab" id="bib_in_new_tab" oncommand="bib_in_new_tab();"/>
-                       <button label="Remove this Frame" id="remove_me" oncommand="remove_me();"/>
-               </hbox>
-               <deck id="bottom_pane" flex="1"/>
-       </vbox>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/_browse.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/_browse.xul
deleted file mode 100644 (file)
index d940cc5..0000000
+++ /dev/null
@@ -1,563 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Cataloger's Search Result Screen -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- PRESENTATION -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-<?xul-overlay href="chrome://open_ils_staff_client/content/legacy/browse_list_overlay.xul"?>
-
-<window id="browse_list_win"
-       orient="vertical" style="overflow: scroll" 
-       onload="try { my_pre_init(); } catch(E) { alert(E); }"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-       <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
-       <scripts id="openils_util_scripts"/>
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script type="text/javascript">
-       <![CDATA[
-
-               var parentWindow = {};
-               var params = {};
-               var mw = {};
-               var find_this_id;
-
-               var org_shortname2id = {};
-               var my_treerow;
-               var browse_meter_per = 0;
-               var orgs_with_copies = [];
-               var orgs_with_copies_hash = {};
-
-               function my_pre_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_pre_init() for legacy/_browse.xul');
-
-                               mw.G = {};
-                               mw.G.main_test_variable = 'Hello World';
-                               g.cgi = new CGI();
-                               g.session = g.cgi.param('session');
-                               mw.G.auth_ses = [ g.session ];
-                               mw.sdump = function(a,b) { g.error.sdump(a,b); }
-
-                               find_this_id = g.cgi.param('docid');
-
-                               JSAN.use('util.network');
-                               g.network = new util.network();
-
-                               JSAN.use('OpenILS.data');
-                               g.data = new OpenILS.data(); g.data.init({'via':'stash'});
-                               mw.G.my_orgs = g.data.list.my_aou;
-                               mw.G.my_orgs_hash = g.data.hash.my_aou;
-                               mw.G.org_tree = g.data.tree.aou;
-                               mw.G.user_ou = g.data.hash.aou[ g.data.list.au[0].home_ou() ];
-                               mw.G.aout_list = g.data.list.aout;
-                               mw.G.aout_hash = g.data.hash.aout;
-                               mw.G.ccs_list = g.data.list.ccs;
-                               mw.G.ccs_hash = g.data.hash.ccs;
-
-                               var x = document.getElementById('cmd_copy_edit');
-                               x.setAttribute('oncommand','try{spawn_copy_editor();}catch(E){alert(E);}');
-
-                               x = document.getElementById('cmd_copy_add');
-                               x.setAttribute('oncommand','try{spawn_copy_add_wizard();}catch(E){alert(E);}');
-
-                               x = document.getElementById('cmd_volume_edit');
-                               x.setAttribute('oncommand','try{spawn_volume_editor();}catch(E){alert(E);}');
-
-                               x = document.getElementById('cmd_volume_add');
-                               x.setAttribute('oncommand','try{spawn_volume_add_wizard();}catch(E){alert(E);}');
-
-                               x = document.getElementById('browse_list_tree');
-                               x.setAttribute('seltype','multiple');
-
-                               my_init();
-       
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\nlegacy/_browse.xul\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-
-               function timer_init() {
-                       return '';
-               }
-
-               function timer_elapsed() {
-                       return '';
-               }
-
-               function handle_error(err) {
-                       try { alert(js2JSON(err)); } catch(E) { alert(err); }
-               }
-
-               function user_request(a,b,c,d) {
-                       return [ g.network.request(a,b,c,d) ];
-               }
-
-               function user_async_request(a,b,c,d) {
-                       return [ g.network.request(a,b,c,d) ];
-               }
-
-               var counter = {};
-
-               function counter_init(id) {
-                       counter[id] = 0;
-               }
-
-               function counter_incr(id) {
-                       if (! counter[id]) { counter_init(id); }
-                       return ++counter[id];
-               }
-
-               function counter_peek(id) {
-                       if (! counter[id]) { return 0; }
-                       return counter[id];
-               }
-
-               function disable_widgets() {
-                       var d = document; var idx = 0;
-                       if (arguments[0].nodeName == '#document') {
-                               idx = 1; d = arguments[0];
-                       }
-                       for (var i = idx; i < arguments.length; i++) {
-                               if (typeof(arguments[i]) == 'object') {
-                                       arguments[i].disabled = true;
-                               } else {
-                                       var w = d.getElementById( arguments[i] );
-                                       if (w) { 
-                                               w.disabled = true; 
-                                       }
-                               }
-                       }
-               }
-
-               function enable_widgets() {
-                       var d = document; var idx = 0;
-                       if (arguments[0].nodeName == '#document') {
-                               idx = 1; d = arguments[0];
-                       }
-                       for (var i = idx; i < arguments.length; i++) {
-                               if (typeof(arguments[i]) == 'object') {
-                                       arguments[i].disabled = false;
-                               } else {
-                                       var w = d.getElementById( arguments[i] );
-                                       if (w) { 
-                                               w.disabled = false; 
-                                       }
-                               }
-                       }
-               }
-
-               function find_ou(tree,id) {
-                       if (typeof(id)=='object') { id = id.id(); }
-                       if (tree.id()==id) {
-                               return tree;
-                       }
-                       for (var i in tree.children()) {
-                               var child = tree.children()[i];
-                               ou = find_ou( child, id );
-                               if (ou) { return ou; }
-                       }
-                       return null;
-               }
-
-               function yesno(value) {
-                       switch(value) {
-                               case true: case 'true': case '1': case 'on':
-                                       return 'Yes';
-                               default: 
-                                       return 'No';
-                       }
-               }
-
-               function empty_widget() {
-                       var d; var e;
-                       if (arguments.length == 1) {
-                               e = arguments[0];
-                       } else {
-                               d = arguments[0];
-                               e = arguments[1];
-                               if (typeof(e) != 'object') { e = d.getElementById(e); }
-                       }
-                       if (typeof(e) != 'object') { dump('Failed on empty_widget\n'); return null; }
-                       while (e.lastChild) { e.removeChild(e.lastChild); }
-               }
-
-               function get_list_from_tree_selection() {
-                       var d = document; var tree_w;
-                       if (arguments.length == 1) {
-                               tree_w = arguments[0];
-                       } else {
-                               d = arguments[0];
-                               tree_w = arguments[1];
-                       }
-                       var hitlist;
-                       if (typeof(tree_w) != 'object') {
-                               hitlist = d.getElementById(tree_w);
-                       } else {
-                               hitlist = tree_w;
-                       }
-                       var list = [];
-                       var start = new Object();
-                       var end = new Object();
-                       var numRanges = hitlist.view.selection.getRangeCount();
-                       for (var t=0; t<numRanges; t++){
-                               hitlist.view.selection.getRangeAt(t,start,end);
-                               for (var v=start.value; v<=end.value; v++){
-                                       var i = hitlist.contentView.getItemAtIndex(v);
-                                       //sdump('D_WIDGETS',i.tagName + '\n');
-                                       list.push( i );
-                               }
-                       }
-                       return list;
-               }
-
-               function filter_list(list,f) {
-                       var new_list = [];
-                       for (var i in list) {
-                               var t = f( list[i] );
-                               if (t) new_list.push( list[i] );
-                       }
-                       return new_list;
-               }
-
-               function cycle_attribute() {
-                       var d; var e; var a; var v;
-                       if (arguments.length == 3) {
-                               e = arguments[0];
-                               a = arguments[1];
-                               v = arguments[2];
-                       } else {
-                               d = arguments[0];
-                               e = arguments[1];
-                               a = arguments[2];
-                               v = arguments[3];
-                               if (typeof(e) != 'object') { e = d.getElementById(e); }
-                       }
-                       try {
-                               if (typeof(e) != 'object') { throw('typeof e != object : typeof e = ' + typeof(e)); }
-                               if (!a) { throw('!a : a = ' + a); }
-                               if (! e.getAttribute(a) ) { throw(' ! e.getAttribute(a) : a = ' + a); }
-                               if (typeof(v) != 'object') { throw('typeof v != object : typeof v = ' + typeof(v)); }
-
-                               var toggle = e.getAttribute(a);
-                               var next_one = false;
-                               for (var i = 0; i < v.length; i++) {
-                                       if (next_one) {
-                                               e.setAttribute(a,v[i]);
-                                               return v[i];
-                                       }
-                                       if (toggle == v[i]) {
-                                               next_one = true;
-                                       }
-                               }
-                               if (next_one) {
-                                       e.setAttribute(a,v[0]);
-                                       return v[0];
-                               } else {
-                                       throw('current value not in list');
-                               }
-                       } catch(E) {
-                               return null;
-                       }
-               }
-
-
-               function mapChrome(chrome) {
-                       switch(chrome) {
-                               case 'chrome://open_ils_staff_client/content/cat/volume_copy_add_wizard.xul':
-                                       return 'chrome://open_ils_staff_client/content/legacy/_volume_copy_add_wizard.xul'; break;
-                               case 'chrome://open_ils_staff_client/content/cat/copy_add_wizard.xul':
-                                       return 'chrome://open_ils_staff_client/content/legacy/_copy_add_wizard.xul'; break;
-                               case 'chrome://open_ils_staff_client/content/cat/volume_edit_wizard.xul':
-                                       return 'chrome://open_ils_staff_client/content/legacy/_volume_edit_wizard.xul'; break;
-                       }
-                       return '';
-               }
-
-               parentWindow.new_tab = function() { };
-
-               parentWindow.replace_tab = function(a,b,c) {
-                       if (window.xulG && typeof window.xulG.new_tab == 'function') {
-                               try {
-                                       var f = window.xulG.new_tab( mapChrome(c), { 'tab_name' : b }, {} );
-                                       return f.contentWindow;
-                               } catch(E) {
-                                       alert(E);
-                               }
-                       }
-               }
-
-               mw.new_window = function(a,b,c) {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       JSAN.use('util.window'); var win = new util.window();
-                       return win.open( mapChrome(a), b, c );
-               }
-
-               function spawn_copy_editor() {
-
-                       JSAN.use('util.widgets'); JSAN.use('util.functional');
-
-                       var list = util.widgets.get_list_from_tree_selection('browse_list_tree');
-                       list = util.functional.filter_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('object_type') == 'copy';
-                               }
-                       );
-
-                       var edit = 0;
-                       try {
-                               edit = g.network.request(
-                                       api.PERM_MULTI_ORG_CHECK.app,
-                                       api.PERM_MULTI_ORG_CHECK.method,
-                                       [ 
-                                               g.session, 
-                                               g.data.list.au[0].id(), 
-                                               util.functional.map_list(
-                                                       list,
-                                                       function (obj) {
-                                                               return obj.getAttribute('ou_id');
-                                                       }
-                                               ),
-                                               [ 'UPDATE_COPY', 'UPDATE_BATCH_COPY' ]
-                                       ]
-                               ).length == 0 ? 1 : 0;
-                       } catch(E) {
-                               g.error.sdump('batch permission check: ' + E);
-                       }
-
-                       list = util.functional.map_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('copy_id');
-                               }
-                       );
-
-                       var title = list.length == 1 ? 'Copy' : 'Copies';
-
-                       JSAN.use('util.window'); var win = new util.window();
-                       var w = win.open(
-                               window.xulG.url_prefix(urls.XUL_COPY_EDITOR)
-                                       +'?session='+window.escape(g.session)
-                                       +'&copy_ids='+window.escape(js2JSON(list))
-                                       +'&edit='+edit,
-                               title,
-                               'chrome,modal,resizable'
-                       );
-                       /* FIXME -- need to unique the temp space, and not rely on modalness of window */
-                       g.data.stash_retrieve();
-                       var copies = JSON2js( g.data.temp );
-                       g.error.sdump('D_CAT','in browse, g.data.temp =\n' + g.data.temp);
-                       if (edit=='1') {
-                               try {
-                                       var r = g.network.request(
-                                               api.FM_ACP_FLESHED_BATCH_UPDATE.app,
-                                               api.FM_ACP_FLESHED_BATCH_UPDATE.method,
-                                               [ g.session, copies ]
-                                       );
-                                       /* FIXME -- revisit the return value here */
-                               } catch(E) {
-                                       alert('copy update error: ' + js2JSON(E));
-                               }
-                               refresh_browse_list();
-                       }
-               }
-
-               function spawn_volume_editor() {
-                       JSAN.use('util.widgets'); JSAN.use('util.functional');
-                       var list = util.widgets.get_list_from_tree_selection('browse_list_tree');
-                       list = util.functional.filter_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('object_type') == 'volume';
-                               }
-                       );
-                       
-                       var edit = 0;
-                       try {
-                               edit = g.network.request(
-                                       api.PERM_MULTI_ORG_CHECK.app,
-                                       api.PERM_MULTI_ORG_CHECK.method,
-                                       [ 
-                                               g.session, 
-                                               g.data.list.au[0].id(), 
-                                               util.functional.map_list(
-                                                       list,
-                                                       function (obj) {
-                                                               return obj.getAttribute('ou_id');
-                                                       }
-                                               ),
-                                               [ 'UPDATE_VOLUME' ]
-                                       ]
-                               ).length == 0 ? 1 : 0;
-                       } catch(E) {
-                               g.error.sdump('batch permission check: ' + E);
-                       }
-
-                       if (edit==0) return; // no read-only view for this interface
-
-                       list = util.functional.map_list(
-                               list,
-                               function (obj) {
-                                       return [ obj.getAttribute('ou_id'), obj.getAttribute('volume_id'), obj.getAttribute('callnumber') ];
-                               }
-                       );
-
-                       var title = list.length == 1 ? 'Volume' : 'Volumes';
-
-                       JSAN.use('util.window'); var win = new util.window();
-                       var w = win.open(
-                               window.xulG.url_prefix(urls.XUL_VOLUME_EDITOR)
-                                       +'?session='+window.escape(g.session)
-                                       +'&ou_id_volume_id_callnumber_tuples=' + window.escape( js2JSON(list) ),
-                               title,
-                               'chrome,modal,resizable'
-                       );
-
-                       /* FIXME -- need to unique the temp space, and not rely on modalness of window */
-                       g.data.stash_retrieve();
-                       var volumes = JSON2js( g.data.temp );
-                       g.error.sdump('D_CAT','in browse, g.data.temp =\n' + g.data.temp);
-               
-                       volumes = util.functional.filter_list(
-                               volumes,
-                               function (obj) {
-                                       return obj.ischanged() == '1';
-                               }
-                       );
-
-                       volumes = util.functional.map_list(
-                               volumes,
-                               function (obj) {
-                                       obj.record( find_this_id ); // staff client 2 didn't do this.  Does it matter?
-                                       return obj;
-                               }
-                       );
-
-                       if (volumes.length == 0) return;
-
-                       try {
-                               var r = g.network.request(
-                                       api.FM_ACN_TREE_UPDATE.app,
-                                       api.FM_ACN_TREE_UPDATE.method,
-                                       [ g.session, volumes ]
-                               );
-                               /* FIXME -- revisit the return value here */
-                       } catch(E) {
-                               alert('volume update error: ' + js2JSON(E));
-                       }
-                       refresh_browse_list();
-
-               }
-
-               function spawn_volume_add_wizard() {
-                       JSAN.use('util.widgets'); JSAN.use('util.functional');
-                       var list = util.widgets.get_list_from_tree_selection('browse_list_tree');
-                       list = util.functional.filter_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('object_type') == 'org_unit';
-                               }
-                       );
-                       list = util.functional.map_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('ou_id');
-                               }
-                       )               
-                       var edit = 0;
-                       try {
-                               edit = g.network.request(
-                                       api.PERM_MULTI_ORG_CHECK.app,
-                                       api.PERM_MULTI_ORG_CHECK.method,
-                                       [ 
-                                               g.session, 
-                                               g.data.list.au[0].id(), 
-                                               list,
-                                               [ 'CREATE_VOLUME', 'CREATE_COPY' ]
-                                       ]
-                               ).length == 0 ? 1 : 0;
-                       } catch(E) {
-                               g.error.sdump('batch permission check: ' + E);
-                       }
-
-                       if (edit==0) return; // no read-only view for this interface
-
-                       var title = 'Add Volume/Copy';
-
-                       JSAN.use('util.window'); var win = new util.window();
-                       var w = win.open(
-                               window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR)
-                                       +'?session='+window.escape(g.session)
-                                       +'&doc_id=' + window.escape(find_this_id)
-                                       +'&ou_ids=' + window.escape( js2JSON(list) ),
-                               title,
-                               'chrome,modal,resizable'
-                       );
-
-                       refresh_browse_list();
-               }
-
-               function spawn_copy_add_wizard() {
-                       /* <command id="cmd_copy_add" oncommand="copy_add(false,{ 'tree' : 'browse_list_tree', 'refresh_func' : refresh_browse_list });"/> */
-                       JSAN.use('util.widgets'); JSAN.use('util.functional');
-                       var list = util.widgets.get_list_from_tree_selection('browse_list_tree');
-                       list = util.functional.filter_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('object_type') == 'volume';
-                               }
-                       );
-                       list = util.functional.map_list(
-                               list,
-                               function (obj) {
-                                       return obj.getAttribute('volume_id');
-                               }
-                       );
-
-
-                       alert('spawn copy add wizard with volume_ids = ' + js2JSON(list));
-               }
-       ]]>
-       </script>
-
-       <!-- The logic for this app -->
-       <Evergreen id="browse_list_js" />
-
-       <!-- XUL'ified abstraction for logic to attach to widgets -->
-       <commandset id="browse_list_cmds" />
-
-       <!-- Accelerator Keys (Accessor Keys are in DTD's) -->
-       <keyset id="browse_list_keys" />
-
-       <!-- Context menus -->
-       <popupset id="browse_list_popupset" />
-
-       <!-- Layout to be filled in by overlays and javascript -->
-       <groupbox flex="1">
-               <caption label="Copy Browser"/>
-               <vbox id="browse_list_vbox" class="test_class"/>
-       </groupbox>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/_marc.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/legacy/_marc.xul
deleted file mode 100644 (file)
index 7c2df6c..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Cataloger's MARC Screen -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- PRESENTATION -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-<?xul-overlay href="chrome://open_ils_staff_client/content/legacy/marc_overlay.xul"?>
-
-<window id="marc_win"
-       orient="vertical" style="overflow: scroll" 
-       onload="
-               try { my_pre_init(); } catch(E) { alert(E); }
-       "
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-       <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
-       <scripts id="openils_util_scripts"/>
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script type="text/javascript">
-       <![CDATA[
-
-               var params = {};
-               var mw = {};
-               var find_this_id;
-               var new_node_id = -1;
-
-               var character_measure = {};
-               var tree;
-               var meta;
-               var backup_tree;
-
-               function my_pre_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_pre_init() for marc.xul');
-
-                               mw.G = {};
-                               mw.G.main_test_variable = 'Hello World';
-                               g.cgi = new CGI();
-                               mw.G.auth_ses = [ g.cgi.param('session') ];
-                               mw.sdump = function(a,b) { g.error.sdump(a,b); }
-
-                               find_this_id = g.cgi.param('docid');
-
-                               JSAN.use('util.network');
-                               g.network = new util.network();
-
-                               disable_widgets('cmd_close_window','cmd_marc_meta_data');
-                               document.getElementById('cmd_close_window').setAttribute('hidden','true');
-                               document.getElementById('cmd_marc_meta_data').setAttribute('hidden','true');
-
-                               my_init();
-       
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\nmarc.xul\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-
-               function timer_elapsed() {
-                       return '';
-               }
-
-               function handle_error(err) {
-                       try { alert(js2JSON(err)); } catch(E) { alert(err); }
-               }
-
-               function user_request(a,b,c,d) {
-                       return [ g.network.request(a,b,c,d) ];
-               }
-
-               function disable_widgets() {
-                       var d = document; var idx = 0;
-                       if (arguments[0].nodeName == '#document') {
-                               idx = 1; d = arguments[0];
-                       }
-                       for (var i = idx; i < arguments.length; i++) {
-                               if (typeof(arguments[i]) == 'object') {
-                                       arguments[i].disabled = true;
-                               } else {
-                                       var w = d.getElementById( arguments[i] );
-                                       if (w) { 
-                                               w.disabled = true; 
-                                       }
-                               }
-                       }
-               }
-
-               function enable_widgets() {
-                       var d = document; var idx = 0;
-                       if (arguments[0].nodeName == '#document') {
-                               idx = 1; d = arguments[0];
-                       }
-                       for (var i = idx; i < arguments.length; i++) {
-                               if (typeof(arguments[i]) == 'object') {
-                                       arguments[i].disabled = false;
-                               } else {
-                                       var w = d.getElementById( arguments[i] );
-                                       if (w) { 
-                                               w.disabled = false; 
-                                       }
-                               }
-                       }
-               }
-
-
-       ]]>
-       </script>
-
-       <!-- The logic for this app -->
-       <Evergreen id="marc_js" />
-
-       <!-- XUL'ified abstraction for logic to attach to widgets -->
-       <commandset id="marc_cmds" />
-
-       <!-- Accelerator Keys (Accessor Keys are in DTD's) -->
-       <keyset id="marc_keys" />
-
-       <!-- Layout to be filled in by overlays and javascript -->
-       <groupbox flex="1">
-               <caption label="MARC Edit"/>
-               <vbox id="marc_vbox" class="test_class" style="overflow: scroll"/>
-       </groupbox>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/JSAN.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/JSAN.js
deleted file mode 100644 (file)
index 9d778fc..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
-
-*/
-
-var JSAN = function () { JSAN.addRepository(arguments) }
-
-JSAN.VERSION = 0.10;
-
-/*
-
-*/
-
-JSAN.globalScope   = self;
-JSAN.includePath   = ['.', 'lib'];
-JSAN.errorLevel    = "die";
-JSAN.errorMessage  = "";
-JSAN.loaded        = {};
-
-/*
-
-*/
-
-JSAN.use = function () {
-    var classdef = JSAN.require(arguments[0]);
-    if (!classdef) return null;
-
-    var importList = JSAN._parseUseArgs.apply(JSAN, arguments).importList;
-    JSAN.exporter(classdef, importList);
-
-    return classdef;
-}
-
-/*
-
-*/
-
-JSAN.require = function (pkg) {
-    var path = JSAN._convertPackageToPath(pkg);
-    if (JSAN.loaded[path]) {
-        return JSAN.loaded[path];
-    }
-
-    try {
-        var classdef = eval(pkg);
-        if (typeof classdef != 'undefined') return classdef;
-    } catch (e) { /* nice try, eh? */ }
-
-
-    for (var i = 0; i < JSAN.includePath.length; i++) {
-        var js;
-        try{
-            var url = JSAN._convertPathToUrl(path, JSAN.includePath[i]);
-                js  = JSAN._loadJSFromUrl(url);
-        } catch (e) {
-            if (i == JSAN.includePath.length - 1) throw e;
-        }
-        if (js != null) {
-            var classdef = JSAN._createScript(js, pkg);
-            JSAN.loaded[path] = classdef;
-            return classdef;
-        }
-    }
-    return false;
-
-}
-
-/*
-
-*/
-
-JSAN.exporter = function () {
-    JSAN._exportItems.apply(JSAN, arguments);
-}
-
-/*
-
-*/
-
-JSAN.addRepository = function () {
-    var temp = JSAN._flatten( arguments );
-    // Need to go in reverse to do something as simple as unshift( @foo, @_ );
-    for ( var i = temp.length - 1; i >= 0; i-- )
-        JSAN.includePath.unshift(temp[i]);
-    return JSAN;
-}
-
-JSAN._flatten = function( list1 ) {
-    var list2 = new Array();
-    for ( var i = 0; i < list1.length; i++ ) {
-        if ( typeof list1[i] == 'object' ) {
-            list2 = JSAN._flatten( list1[i], list2 );
-        }
-        else {
-            list2.push( list1[i] );
-        }
-    }
-    return list2;
-};
-
-JSAN._findMyPath = function () {
-    if (document) {
-        var scripts = document.getElementsByTagName('script');
-        for ( var i = 0; i < scripts.length; i++ ) {
-            var src = scripts[i].getAttribute('src');
-            if (src) {
-                var inc = src.match(/^(.*?)\/?JSAN.js/);
-                if (inc && inc[1]) {
-                    var repo = inc[1];
-                    for (var j = 0; j < JSAN.includePath.length; j++) {
-                        if (JSAN.includePath[j] == repo) {
-                            return;
-                        }
-                    }
-                    JSAN.addRepository(repo);
-                }
-            }
-        }
-    }
-}
-/* For some reason this breaks XUL wizards, but we shouldn't need it.   JSAN._findMyPath(); */
-
-JSAN._convertPathToUrl = function (path, repository) {
-    return repository.concat('/' + path);
-};
-    
-
-JSAN._convertPackageToPath = function (pkg) {
-    var path = pkg.replace(/\./g, '/');
-        path = path.concat('.js');
-    return path;
-}
-
-JSAN._parseUseArgs = function () {
-    var pkg        = arguments[0];
-    var importList = [];
-
-    for (var i = 1; i < arguments.length; i++)
-        importList.push(arguments[i]);
-
-    return {
-        pkg:        pkg,
-        importList: importList
-    }
-}
-
-JSAN._loadJSFromUrl = function (url) {
-    return new JSAN.Request().getText(url);
-}
-
-JSAN._findExportInList = function (list, request) {
-    if (list == null) return false;
-    for (var i = 0; i < list.length; i++)
-        if (list[i] == request)
-            return true;
-    return false;
-}
-
-JSAN._findExportInTag = function (tags, request) {
-    if (tags == null) return [];
-    for (var i in tags)
-        if (i == request)
-            return tags[i];
-    return [];
-}
-
-JSAN._exportItems = function (classdef, importList) {
-    var exportList  = new Array();
-    var EXPORT      = classdef.EXPORT;
-    var EXPORT_OK   = classdef.EXPORT_OK;
-    var EXPORT_TAGS = classdef.EXPORT_TAGS;
-    
-    if (importList.length > 0) {
-       importList = JSAN._flatten( importList );
-
-       for (var i = 0; i < importList.length; i++) {
-            var request = importList[i];
-            if (   JSAN._findExportInList(EXPORT,    request)
-                || JSAN._findExportInList(EXPORT_OK, request)) {
-                exportList.push(request);
-                continue;
-            }
-            var list = JSAN._findExportInTag(EXPORT_TAGS, request);
-            for (var i = 0; i < list.length; i++) {
-                exportList.push(list[i]);
-            }
-        }
-    } else {
-        exportList = EXPORT;
-    }
-    JSAN._exportList(classdef, exportList);
-}
-
-JSAN._exportList = function (classdef, exportList) {
-    if (typeof(exportList) != 'object') return null;
-    for (var i = 0; i < exportList.length; i++) {
-        var name = exportList[i];
-
-        if (JSAN.globalScope[name] == null)
-            JSAN.globalScope[name] = classdef[name];
-    }
-}
-
-JSAN._makeNamespace = function(js, pkg) {
-    var spaces = pkg.split('.');
-    var parent = JSAN.globalScope;
-    eval(js);
-    var classdef = eval(pkg);
-    for (var i = 0; i < spaces.length; i++) {
-        var name = spaces[i];
-        if (i == spaces.length - 1) {
-            if (typeof parent[name] == 'undefined') {
-                parent[name] = classdef;
-                if ( typeof classdef['prototype'] != 'undefined' ) {
-                    parent[name].prototype = classdef.prototype;
-                }
-            }
-        } else {
-            if (parent[name] == undefined) {
-                parent[name] = {};
-            }
-        }
-
-        parent = parent[name];
-    }
-    return classdef;
-}
-
-JSAN._handleError = function (msg, level) {
-    if (!level) level = JSAN.errorLevel;
-    JSAN.errorMessage = msg;
-
-    switch (level) {
-        case "none":
-            break;
-        case "warn":
-            alert(msg);
-            break;
-        case "die":
-        default:
-            throw new Error(msg);
-            break;
-    }
-}
-
-JSAN._createScript = function (js, pkg) {
-    try {
-        return JSAN._makeNamespace(js, pkg);
-    } catch (e) {
-        JSAN._handleError("Could not create namespace[" + pkg + "]: " + e);
-    }
-    return null;
-}
-
-
-JSAN.prototype = {
-    use: function () { JSAN.use.apply(JSAN, arguments) }
-};
-
-
-// Low-Level HTTP Request
-JSAN.Request = function (jsan) {
-    if (JSAN.globalScope.XMLHttpRequest) {
-        this._req = new XMLHttpRequest();
-    } else {
-        this._req = new ActiveXObject("Microsoft.XMLHTTP");
-    }
-}
-
-JSAN.Request.prototype = {
-    _req:  null,
-    
-    getText: function (url) {
-        this._req.open("GET", url, false);
-        try {
-            this._req.send(null);
-            if (this._req.status == 200 || this._req.status == 0)
-                return this._req.responseText;
-        } catch (e) {
-            JSAN._handleError("File not found: " + url);
-            return null;
-        };
-
-        JSAN._handleError("File not found: " + url);
-        return null;
-    }
-};
-
-/*
-
-*/
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/bindings.xml b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/bindings.xml
deleted file mode 100644 (file)
index 9951435..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<bindings id="openils_bindings"
-   xmlns="http://www.mozilla.org/xbl"
-   xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-   xmlns:xbl="http://www.mozilla.org/xbl">
-
-  <binding id="caption" extends="chrome://global/content/bindings/general.xml#basetext">
-    <resources>
-      <stylesheet src="chrome://global/skin/groupbox.css"/>
-    </resources>
-    
-    <content>
-      <children>
-        <xul:image onclick="var n = document.getAnonymousNodes(parentNode.parentNode)[1]; if (n.hidden) { n.hidden = false; this.setAttribute('src','chrome://open_ils_staff_client/skin/media/images/opentriangle.gif'); } else { n.hidden = true; this.setAttribute('src','chrome://open_ils_staff_client/skin/media/images/triangle.gif');  }" />
-        <xul:image class="caption-icon" xbl:inherits="src=image"/>
-        <xul:label class="caption-text" flex="1" xbl:inherits="default,value=label,crop,accesskey" />
-      </children>
-    </content>
-
-    <implementation>
-       <constructor>
-               <![CDATA[
-               var n = document.getAnonymousNodes(this)[0];
-               n.setAttribute('src','chrome://open_ils_staff_client/skin/media/images/opentriangle.gif');
-               ]]>
-       </constructor>
-    </implementation>
-  </binding>
-
-</bindings>
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/constants.js
deleted file mode 100644 (file)
index e4b0071..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-dump('Loading constants.js\n');
-var api = {
-       'AUTH_INIT' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.authenticate.init' },
-       'AUTH_COMPLETE' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.authenticate.complete' },
-       'AUTH_DELETE' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.session.delete' },
-       'BILL_PAY' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment' },
-       'BLOB_CHECKOUTS_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.actor.user.checked_out' },
-       'CAPTURE_COPY_FOR_HOLD_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.capture_copy.barcode' },
-       'CHECKIN_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.checkin.barcode' },
-       'CHECKOUT_PERMIT_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.permit_checkout' },
-       'CHECKOUT_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.checkout.barcode' },
-       'FM_ACN_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.callnumber.retrieve' },
-       'FM_ACN_TREE_UPDATE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.asset.volume_tree.fleshed.batch.update' },
-       'FM_ACP_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.asset.copy.fleshed.retrieve' },
-       'FM_ACP_FLESHED_BATCH_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.asset.copy.fleshed.batch.retrieve' },
-       'FM_ACP_FLESHED_BATCH_UPDATE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.asset.copy.fleshed.batch.update' },
-       'FM_ACPL_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.config.copy_location.retrieve.all' },
-       'FM_ACTSC_RETRIEVE_VIA_AOU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.stat_cat.actor.retrieve.all' },
-       'FM_AHR_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.holds.retrieve' },
-       'FM_AOU_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_tree.retrieve' },
-       'FM_AOU_RETRIEVE_RELATED_VIA_SESSION' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_unit.full_path.retrieve' },
-       'FM_AOUT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_types.retrieve' },
-       'FM_ASV_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.survey.create' },
-       'FM_ASV_RETRIEVE_REQUIRED' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.survey.retrieve.required' },
-       'FM_ASVR_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.survey.response.retrieve' },
-       'FM_AU_IDS_RETRIEVE_VIA_HASH' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.patron.search.advanced' },
-       'FM_AU_RETRIEVE_VIA_SESSION' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.session.retrieve' },
-       'FM_AU_RETRIEVE_VIA_BARCODE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.fleshed.retrieve_by_barcode' },
-       'FM_AU_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.fleshed.retrieve' },
-       'FM_BRE_RETRIEVE_VIA_ID' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.biblio.record.metadata.retrieve' },
-       'FM_CCS_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.config.copy_status.retrieve.all' },
-       'FM_CIRC_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.actor.user.checked_out.slim' },
-       'FM_CIT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.ident_types.retrieve' },
-       'FM_CST_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.standings.retrieve' },
-       'FM_MB_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.create' },
-       'FM_MB_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.retrieve.all' },
-       'FM_MP_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment.retrieve.all' },
-       'FM_MG_CREATE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.grocery.create' },
-       'FM_MOBTS_HAVING_BALANCE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.have_balance' },
-       'FM_PGT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.groups.retrieve' },
-       'MARC_HTML_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.record.html' },
-       'MODS_SLIM_METARECORD_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.metarecord.mods_slim.retrieve' },
-       'MODS_SLIM_RECORD_RETRIEVE' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.record.mods_slim.retrieve' },
-       'MODS_SLIM_RECORD_RETRIEVE_VIA_COPY' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.mods_from_copy' },
-       'PERM_CHECK' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.perm.check' },
-       'PERM_MULTI_ORG_CHECK' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.perm.check.multi_org' },
-}
-
-var urls = {
-       'opac' : 'http://dev.gapines.org/opac/en-US/skin/default/xml/advanced.xml',
-       'browser' : 'http://dev.gapines.org/opac/en-US/skin/default/xml/advanced.xml',
-       'REMOTE' : 'http://dev.gapines.org/',
-       'XUL_BIB_BRIEF' : '/xul/server/cat/bib_brief.xul',
-       'XUL_BROWSER' : 'chrome://open_ils_staff_client/content/util/browser.xul',
-       'XUL_CHECKIN' : '/xul/server/circ/checkin.xul',
-       'XUL_CHECKOUT' : '/xul/server/circ/checkout.xul',
-       'XUL_CAT_DETAILS' : 'chrome://open_ils_staff_client/content/cat/details.xul',
-       'XUL_COPY_EDITOR' : '/xul/server/cat/copy_editor.xul',
-       'XUL_COPY_VOLUME_BROWSE' : 'chrome://open_ils_staff_client/content/legacy/_browse.xul',
-       'XUL_DEBUG_CONSOLE' : 'chrome://global/content/console.xul',
-       'XUL_DEBUG_FIELDMAPPER' : '/xul/server/util/fm_view.xul',
-       'XUL_DEBUG_FILTER_CONSOLE' : '/xul/server/util/filter_console.xul',
-       'XUL_DEBUG_SHELL' : '/xul/server/util/shell.html',
-       'XUL_DEBUG_XULEDITOR' : '/xul/server/util/xuledit.xul',
-       'XUL_HOLD_CAPTURE' : '/xul/server/circ/hold_capture.xul',
-       'XUL_MARC_EDIT' : 'chrome://open_ils_staff_client/content/legacy/_marc.xul',
-       'XUL_MARC_VIEW' : '/xul/server/cat/marc_view.xul',
-       'XUL_MENU_FRAME' : 'chrome://open_ils_staff_client/content/main/menu_frame.xul',
-       'XUL_OPAC_WRAPPER' : 'chrome://open_ils_staff_client/content/cat/opac.xul',
-       'XUL_PATRON_BARCODE_ENTRY' : '/xul/server/patron/barcode_entry.xul',
-       'XUL_PATRON_BILLS' : '/xul/server/patron/bills.xul',
-       'XUL_PATRON_BILL_CC_INFO' : '/xul/server/patron/bill_cc_info.xul',
-       'XUL_PATRON_BILL_CHECK_INFO' : '/xul/server/patron/bill_check_info.xul',
-       'XUL_PATRON_BILL_DETAILS' : '/xul/server/patron/bill_details.xul',
-       'XUL_PATRON_BILL_WIZARD' : '/xul/server/patron/bill_wizard.xul',
-       'XUL_PATRON_DISPLAY' : '/xul/server/patron/display.xul',
-       'XUL_PATRON_EDIT' : '/xul/server/patron/user_edit.xml',
-       'XUL_PATRON_HOLDS' : '/xul/server/patron/holds.xul',
-       'XUL_PATRON_INFO' : 'data:text/html,<h1>Info Here</h1>',
-       'XUL_PATRON_ITEMS' : '/xul/server/patron/items.xul',
-       'XUL_PATRON_SEARCH_FORM' : '/xul/server/patron/search_form.xul',
-       'XUL_PATRON_SEARCH_RESULT' : '/xul/server/patron/search_result.xul',
-       'XUL_PATRON_SUMMARY' : '/xul/server/patron/summary.xul',
-       'XUL_REMOTE_BROWSER' : '/xul/server/util/rbrowser.xul',
-       'XUL_STAT_CAT_EDIT' : '/xul/server/admin/stat_cat_editor.xml',
-       'XUL_SURVEY_WIZARD' : 'chrome://open_ils_staff_client/content/admin/survey_wizard.xul',
-       'XUL_VOLUME_COPY_CREATOR' : '/xul/server/cat/volume_copy_creator.xul',
-       'XUL_VOLUME_EDITOR' : '/xul/server/cat/volume_editor.xul',
-       'TEST_HTML' : '/xul/server/main/test.html',
-       'TEST_XUL' : 'chrome://open_ils_staff_client/content/admin/test.xul',
-}
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/main.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/main.js
deleted file mode 100644 (file)
index 00fccbb..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-dump('entering main/main.js\n');
-
-function grant_perms(url) {
-       var perms = "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead";
-       dump('Granting ' + perms + ' to ' + url + '\n');
-       var pref = Components.classes["@mozilla.org/preferences-service;1"]
-               .getService(Components.interfaces.nsIPrefBranch);
-       if (pref) {
-               pref.setCharPref("capability.principal.codebase.p0.granted", perms);
-               pref.setCharPref("capability.principal.codebase.p0.id", url);
-       }
-
-}
-
-function main_init() {
-       dump('entering main_init()\n');
-       try {
-               if (typeof JSAN == 'undefined') {
-                       throw(
-                               "The JSAN library object is missing."
-                       );
-               }
-               /////////////////////////////////////////////////////////////////////////////
-
-               JSAN.errorLevel = "die"; // none, warn, or die
-               JSAN.addRepository('..');
-
-               //JSAN.use('test.test'); test.test.hello_world();
-
-               var mw = self;
-               G =  {};
-               G.OpenILS = {};
-               G.OpenSRF = {};
-
-               JSAN.use('util.error');
-               G.error = new util.error();
-               G.error.sdump('D_ERROR','Testing');
-
-               JSAN.use('util.window');
-               G.window = new util.window();
-
-               //G.window.open(urls.XUL_DEBUG_CONSOLE,'testconsole','chrome,resizable');
-
-               JSAN.use('auth.controller');
-               G.auth = new auth.controller( { 'window' : mw } );
-
-               JSAN.use('OpenILS.data');
-               G.OpenILS.data = new OpenILS.data()
-               G.OpenILS.data.on_error = G.auth.logoff;
-               G.OpenILS.data.entities = entities;
-               G.OpenILS.data.stash('entities');
-
-               G.auth.on_login = function() {
-
-                       G.OpenILS.data.session = G.auth.session.key;
-                       G.OpenILS.data.on_complete = function () {
-
-                               var url = G.auth.controller.view.server_prompt.value || urls.remote;
-                               if (! url.match( '^http://' ) ) url = 'http://' + url;
-                               grant_perms(url);
-                               
-                               G.OpenILS.data.stash('list','hash','tree','temp');
-                               G.OpenILS.data._debug_stash();
-
-                               G.window.open(urls.XUL_MENU_FRAME 
-                                       + '?session='+mw.escape(G.auth.session.key)
-                                       + '&authtime='+mw.escape(G.auth.session.authtime)
-                                       + '&server='+mw.escape(url),
-                                       'test','chrome,resizable');
-                       }
-                       G.OpenILS.data.init();
-               }
-
-               G.auth.init();
-               // XML_HTTP_SERVER will get reset to G.auth.controller.view.server_prompt.value
-
-               /////////////////////////////////////////////////////////////////////////////
-
-       } catch(E) {
-               var error = "!! This software has encountered an error.  Please tell your friendly " +
-                       "system administrator or software developer the following:\n" + E + '\n';
-               try { G.error.sdump('D_ERROR',error); } catch(E) { dump(error); }
-               alert(error);
-       }
-       dump('exiting main_init()\n');
-}
-
-dump('exiting main/main.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/main.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/main.xul
deleted file mode 100644 (file)
index a2612e6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Main, Authentication Window -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- PRESENTATION -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/auth.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-
-<window id="main_win" 
-       onload="try { main_init(); } catch(E) { alert(E); }"
-       onunload="try { G.auth.logoff(); } catch(E) { alert(E); }"
-       title="&staff.auth.title;"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-       <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var G;</script>
-       <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/lang.js"/>
-       <!--
-       <script type="text/javascript" src="http://dev.gapines.org/xul/server/main/lang.js"/>
-       -->
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/main.js"/>
-       <script>
-               dump("entities['lang.version'] = " + entities['lang.version'] + '\n');
-       </script>
-
-       <commandset id="auth_cmds">
-               <command id="cmd_login"/>
-               <command id="cmd_logoff"/>
-               <command id="cmd_close_window"/>
-       </commandset>
-
-       <keyset id="auth_keys">
-               <key id="auth-login-key" modifiers="accel" key="S" command="cmd_login"/>
-               <key id="auth-logoff-key" modifiers="accel" key="L" command="cmd_logoff"/>
-               <key id="auth-close-key" modifiers="accel" key="Q" command="cmd_close_window"/>
-       </keyset>
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- CONTENT -->
-       <deck id="main_deck">
-       <groupbox id="main_groupbox" flex="1">
-               <caption id="main_caption" label="&staff.auth.login_header;"/>
-               <label value="&staff.auth.version;"/>
-               <label value="Development Version 123"/>
-               <label value=" "/>
-               <grid>
-                       <columns>
-                               <column />
-                               <column />
-                       </columns>
-                       <rows>
-                               <row>
-                                       <label value="Server" control="server_prompt" accesskey="r"/>
-                                       <textbox id="server_prompt" value="dev.gapines.org"/>
-                               </row>
-                               <row>
-                                       <label value="&staff.auth.name_prompt;" control="name_prompt" accesskey="&staff.auth.name_prompt.key;"/>
-                                       <textbox id="name_prompt" value=""/>
-                               </row>
-                               <row>
-                                       <label value="&staff.auth.password_prompt;" control="password_prompt" accesskey="&staff.auth.password_prompt.key;"/>
-                                       <textbox id="password_prompt" value="" type="password"/>
-                               </row>
-                               <row>
-                                       <label/>
-                                       <hbox>
-                                       <button id="submit_button" label="&staff.auth.submit_prompt;" accesskey="&staff.auth.submit_prompt.key;" command="cmd_login"/>
-                                       <button label="&staff.auth.logoff_prompt;" accesskey="&staff.auth.logoff_prompt.key;" command="cmd_logoff"/>
-                                       </hbox>
-                               </row>
-                               <row>
-                                       <label/>
-                                       <label/>
-                               </row>
-                               <row>
-                                       <label/>
-                                       <button label="&staff.auth.quit_prompt;" accesskey="&staff.auth.quit_prompt.key;" command="cmd_close_window"/>
-                               </row>
-                       </rows>
-               </grid>
-               <progressmeter id="progress_bar" mode="normal" value="0"/>
-       </groupbox>
-       </deck>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu.js
deleted file mode 100644 (file)
index 150c4ee..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-dump('entering main/menu.js\n');
-
-if (typeof main == 'undefined') main = {};
-main.menu = function () {
-
-       JSAN.use('util.error'); this.error = new util.error();
-       JSAN.use('util.window'); this.window = new util.window();
-
-       this.w = window;
-}
-
-main.menu.prototype = {
-
-       'url_prefix' : function(url) {
-               if (url.match(/^\//)) url = urls.remote + url;
-               if (! url.match(/^(http|chrome):\/\//) && ! url.match(/^data:/) ) url = 'http://' + url;
-               return url;
-       },
-
-       'init' : function( params ) {
-
-               var session = params['session'];
-               var authtime = params['authtime'];
-               urls.remote = params['server'];
-
-               var obj = this;
-
-               var cmd_map = {
-                       'cmd_broken' : [
-                               ['oncommand'],
-                               function() { alert('Not Yet Implemented'); }
-                       ],
-
-                       /* File Menu */
-                       'cmd_close_window' : [ 
-                               ['oncommand'], 
-                               function() { obj.w.close(); } 
-                       ],
-                       'cmd_new_window' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.window.open(obj.url_prefix(urls.XUL_MENU_FRAME),'test' + 
-                                               obj.window.appshell_name_increment++ ,'chrome'); 
-                               }
-                       ],
-                       'cmd_new_tab' : [
-                               ['oncommand'],
-                               function() { obj.new_tab(null,{'focus':true},null); }
-                       ],
-                       'cmd_close_tab' : [
-                               ['oncommand'],
-                               function() { obj.close_tab(); }
-                       ],
-
-                       /* Search Menu */
-                       'cmd_patron_search' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.XUL_PATRON_DISPLAY)
-                                               + '?session='+obj.w.escape(session),{},{});
-                               }
-                       ],
-                       'cmd_search_opac' : [
-                               ['oncommand'],
-                               function() {
-                                       var content_params = { 'session' : session, 'authtime' : authtime };
-                                       obj.set_tab(obj.url_prefix(urls.XUL_OPAC_WRAPPER), {}, content_params);
-                               }
-                       ],
-
-
-                       /* Circulation Menu */
-                       'cmd_circ_checkin' : [
-                               ['oncommand'],
-                               function() { 
-                                       obj.set_tab(obj.url_prefix(urls.XUL_CHECKIN) + '?session='+obj.w.escape(session),{},{});
-                               }
-                       ],
-                       'cmd_circ_checkout' : [
-                               ['oncommand'],
-                               function() { 
-                                       obj.set_tab(obj.url_prefix(urls.XUL_PATRON_BARCODE_ENTRY) + '?session='+obj.w.escape(session),{},{});
-                               }
-                       ],
-                       'cmd_circ_hold_capture' : [
-                               ['oncommand'],
-                               function() { 
-                                       obj.set_tab(obj.url_prefix(urls.XUL_HOLD_CAPTURE) + '?session='+obj.w.escape(session),{},{});
-                               }
-                       ],
-
-
-                       /* Admin menu */
-                       'cmd_stat_cat_edit' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.XUL_STAT_CAT_EDIT) + '?ses='+obj.w.escape(session),{'tab_name':'Stat Cat Editor'},{});
-                               }
-                       ],
-                       'cmd_test' : [
-                               ['oncommand'],
-                               function() {
-                                       var content_params = { 'session' : session, 'authtime' : authtime };
-                                       obj.set_tab(obj.url_prefix(urls.XUL_OPAC_WRAPPER), {}, content_params);
-                               }
-                       ],
-                       'cmd_test_html' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.TEST_HTML) + '?session='+obj.w.escape(session),{},{});
-                               }
-                       ],
-                       'cmd_test_xul' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.TEST_XUL) + '?session='+obj.w.escape(session),{},{});
-                               }
-                       ],
-                       'cmd_console' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.XUL_DEBUG_CONSOLE),{},{});
-                               }
-                       ],
-                       'cmd_shell' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.XUL_DEBUG_SHELL),{},{});
-                               }
-                       ],
-                       'cmd_xuleditor' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.XUL_DEBUG_XULEDITOR),{},{});
-                               }
-                       ],
-                       'cmd_fieldmapper' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.set_tab(obj.url_prefix(urls.XUL_DEBUG_FIELDMAPPER),{},{});
-                               }
-                       ],
-                       'cmd_survey_wizard' : [
-                               ['oncommand'],
-                               function() {
-                                       obj.window.open(obj.url_prefix(urls.XUL_SURVEY_WIZARD)+ '?session='+obj.w.escape(session),'survey_wizard','chrome'); 
-                               }
-                       ],
-
-               };
-
-               JSAN.use('util.controller');
-               var cmd;
-               obj.controller = new util.controller();
-               obj.controller.init( { 'window_knows_me_by' : 'g.menu.controller', 'control_map' : cmd_map } );
-
-               obj.controller.view.tabbox = obj.w.document.getElementById('main_tabbox');
-               obj.controller.view.tabs = obj.controller.view.tabbox.firstChild;
-               obj.controller.view.panels = obj.controller.view.tabbox.lastChild;
-
-               obj.new_tab(null,{'focus':true},null);
-       },
-
-       'close_tab' : function () {
-               var idx = this.controller.view.tabs.selectedIndex;
-               if (idx == 0) {
-                       try {
-                               this.controller.view.tabs.advanceSelectedTab(+1);
-                       } catch(E) {
-                               this.error.sdump('D_TAB','failed tabs.advanceSelectedTab(+1):'+js2JSON(E) + '\n');
-                               try {
-                                       this.controller.view.tabs.advanceSelectedTab(-1);
-                               } catch(E) {
-                                       this.error.sdump('D_TAB','failed again tabs.advanceSelectedTab(-1):'+
-                                               js2JSON(E) + '\n');
-                               }
-                       }
-               } else {
-                       try {
-                               this.controller.view.tabs.advanceSelectedTab(-1);
-                       } catch(E) {
-                               this.error.sdump('D_TAB','failed tabs.advanceSelectedTab(-1):'+js2JSON(E) + '\n');
-                               try {
-                                       this.controller.view.tabs.advanceSelectedTab(+1);
-                               } catch(E) {
-                                       this.error.sdump('D_TAB','failed again tabs.advanceSelectedTab(+1):'+
-                                               js2JSON(E) + '\n');
-                               }
-                       }
-
-               }
-               
-               this.error.sdump('D_TAB','\tnew tabbox.selectedIndex = ' + this.controller.view.tabbox.selectedIndex + '\n');
-
-               this.controller.view.tabs.childNodes[ idx ].hidden = true;
-               this.error.sdump('D_TAB','tabs.childNodes[ ' + idx + ' ].hidden = true;\n');
-
-               // Make sure we keep at least one tab open.
-               var tab_flag = true;
-               for (var i = 0; i < this.controller.view.tabs.childNodes.length; i++) {
-                       var tab = this.controller.view.tabs.childNodes[i];
-                       if (!tab.hidden)
-                               tab_flag = false;
-               }
-               if (tab_flag) this.new_tab();
-       },
-
-       'find_free_tab' : function() {
-               var last_not_hidden = -1;
-               for (var i = 0; i<this.controller.view.tabs.childNodes.length; i++) {
-                       var tab = this.controller.view.tabs.childNodes[i];
-                       if (!tab.hidden)
-                               last_not_hidden = i;
-               }
-               if (last_not_hidden == this.controller.view.tabs.childNodes.length - 1)
-                       last_not_hidden = -1;
-               // If the one next to last_not_hidden is hidden, we want it.
-               // Basically, we fill in tabs after existing tabs for as 
-               // long as possible.
-               var idx = last_not_hidden + 1;
-               var candidate = this.controller.view.tabs.childNodes[ idx ];
-               if (candidate.hidden)
-                       return idx;
-               // Alright, find the first hidden then
-               for (var i = 0; i<this.controller.view.tabs.childNodes.length; i++) {
-                       var tab = this.controller.view.tabs.childNodes[i];
-                       if (tab.hidden)
-                               return i;
-               }
-               return -1;
-       },
-
-       'new_tab' : function(url,params,content_params) {
-               if (!url) url = 'data:text/html,<h1>Hello World</h1>'
-               if (!params) params = {};
-               if (!content_params) content_params = {};
-               var tc = this.find_free_tab();
-               if (tc == -1) { return null; } // 9 tabs max
-               var tab = this.controller.view.tabs.childNodes[ tc ];
-               tab.hidden = false;
-               try {
-                       if (params.focus) this.controller.view.tabs.selectedIndex = tc;
-                       params.index = tc;
-                       this.set_tab(url,params,content_params);
-               } catch(E) {
-                       this.error.sdump('D_ERROR',E);
-               }
-       },
-
-       'set_tab' : function(url,params,content_params) {
-               if (!url) url = 'data:text/html,<h1>Hello World</h1>';
-               if (!url.match(/:\/\//) && !url.match(/^data:/)) url = urls.remote + url;
-               if (!params) params = {};
-               if (!content_params) content_params = {};
-               var obj = this;
-               var idx = this.controller.view.tabs.selectedIndex;
-               if (params && typeof params.index != 'undefined') idx = params.index;
-               var tab = this.controller.view.tabs.childNodes[ idx ];
-               var panel = this.controller.view.panels.childNodes[ idx ];
-               while ( panel.lastChild ) panel.removeChild( panel.lastChild );
-
-               content_params.new_tab = function(a,b,c) { return obj.new_tab(a,b,c); };
-               content_params.set_tab = function(a,b,c) { return obj.set_tab(a,b,c); };
-               content_params.set_tab_name = function(name) { tab.setAttribute('label',(idx + 1) + ' ' + name); };
-               content_params.open_chrome_window = function(a,b,c) { return obj.window.open(a,b,c); };
-               content_params.url_prefix = function(url) { return obj.url_prefix(url); };
-               if (params && params.tab_name) content_params.set_tab_name( params.tab_name );
-               
-               var frame = this.w.document.createElement('iframe');
-               frame.setAttribute('flex','1');
-               frame.setAttribute('src',url);
-               panel.appendChild(frame);
-
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       frame.contentWindow.IAMXUL = true;
-                       frame.contentWindow.xulG = content_params;
-               } catch(E) {
-                       this.error.sdump('D_ERROR', 'main.menu: ' + E);
-               }
-               return frame;
-       }
-
-}
-
-dump('exiting main/menu.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame.xul
deleted file mode 100644 (file)
index 8ecc829..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Main, Menu and Tab Navigation -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/open_ils_staff_client.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/menu_frame.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/main/menu_frame_overlay.xul"?>
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-<!--
-<?xul-overlay href="/xul/server/main/menu_frame_overlay.xul"?>
-<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
--->
-
-<window id="menu_frame_win"
-       onload="my_init()"
-       orient="vertical" style="overflow: auto" width="800" height="500"
-       sizemode="maximized" persist="width height" title="&staff.main.menu.title;"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-        <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
-        <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="JSAN.js"/>
-       <script type="text/javascript">
-       <![CDATA[
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               /*
-                               JSAN.addRepository('/xul/server/');
-                               */
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_init() for menu_frame.xul');
-
-                               g.cgi = new CGI();
-
-                               JSAN.use('main.menu'); g.menu = new main.menu();
-                               g.menu.init( { 
-                                       'session' : g.cgi.param('session'), 
-                                       'authtime' : g.cgi.param('authtime'),
-                                       'server' : g.cgi.param('server'),
-                               } );
-       
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\nmenu_frame.xul\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-       ]]>
-       </script>
-
-       <commandset id="universal_cmds" />
-
-       <keyset id="menu_frame_keys" />
-
-       <popupset id="universal_popupset" />
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- CONTENT -->
-
-       <box id="menu_frame_main" />
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame_menus.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame_menus.xul
deleted file mode 100644 (file)
index afcf337..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE overlay SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-<overlay id="menu_frame_menus" 
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script>dump('loading menu_frame_menus.xul\n');</script>
-
-<commandset id="universal_cmds">
-       <command id="cmd_close_window" key="close-window-key" />
-       <command id="cmd_new_window" key="new-window-key" />
-       <command id="cmd_new_tab" key="new-tab-key" />
-       <command id="cmd_close_tab" key="close-tab-key" />
-
-       <command id="cmd_cat_main" key="cat-main-key" />
-       <command id="cmd_circ_checkout" key="circ-checkout-key" />
-       <command id="cmd_patron_search" key="patron-search-key" />
-       <command id="cmd_circ_checkin" key="circ-checkin-key" />
-       <command id="cmd_circ_hold_capture" key="circ-hold-capture-key" />
-       <command id="cmd_search_opac" key="search-opac-key" />
-       <command id="cmd_patron_register" key="patron-register-key" />
-       <command id="cmd_survey_wizard" />
-       <command id="cmd_stat_cat_edit" />
-       <command id="cmd_receipt_template_editor" />
-       <command id="cmd_z39_50_import" />
-       <command id="cmd_create_new_marc_book" />
-
-       <command id="cmd_console" />
-       <command id="cmd_shell" />
-       <command id="cmd_xuleditor" />
-       <command id="cmd_fieldmapper" />
-       <command id="cmd_test_html" />
-       <command id="cmd_test_xul" />
-
-       <command id="cmd_test" />
-       <command id="cmd_broken" disabled="true" />
-</commandset>
-
-
-<!-- Accelerator Keys (Accessor Keys are in DTD's) -->
-<keyset id="menu_frame_keys">
-       <key id="new-window-key" modifiers="accel" key="N" command="cmd_new_window"/>
-       <key id="new-tab-key" modifiers="accel" key="T" command="cmd_new_tab"/>
-       <key id="open-key" modifiers="accel" key="O" command=""/>
-       <key id="save-key" modifiers="accel" key="S" command=""/>
-       <key id="close-tab-key" modifiers="accel" key="W" command="cmd_close_tab"/>
-       <key id="close-window-key" modifiers="accel" key="Q" command="cmd_close_window"/>
-       <!--
-       <key id="edit-undo-key" modifiers="accel" key="Z" command=""/>
-       <key id="edit-redo-key" modifiers="accel" key="Y" command=""/>
-       <key id="edit-cut-key" modifiers="accel" key="X" command=""/>
-       <key id="edit-copy-key" modifiers="accel" key="C" command=""/>
-       <key id="edit-paste-key" modifiers="accel" key="V" command=""/>
-       <key id="edit-delete-key" modifiers="" keycode="VK_DELETE" command=""/>
-       <key id="edit-select-all-key" modifiers="accel" key="A" command=""/>
-       <key id="edit-find-key" modifiers="accel" key="F" command=""/>
-       <key id="edit-find-again-key" modifiers="accel" key="G" command=""/>
-
-       <key id="circ-patron-status-key" keycode="VK_F11" command="cmd_circ_display"/>
-       <key id="circ-copy-status-key" keycode="VK_F9" command=""/>
-       <key id="circ-check-in-key" keycode="VK_F2" command="cmd_circ_checkin"/>
-       <key id="circ-renew-key" keycode="VK_F3" command=""/>
-       <key id="circ-mark-used-key" keycode="VK_F4" command=""/>
-       <key id="circ-place-hold-key" keycode="VK_F5" command=""/>
-       <key id="circ-patron-registration-key" keycode="VK_F12" command=""/>
-       -->
-       <key id="circ-checkout-key" keycode="VK_F1" command="cmd_circ_checkout"/>
-       <key id="circ-checkin-key" keycode="VK_F2" command="cmd_circ_checkin"/>
-       <key id="search-opac-key" keycode="VK_F3" command="cmd_search_opac"/>
-       <key id="patron-search-key" keycode="VK_F4" command="cmd_patron_search"/>
-       <key id="circ-hold-capture-key" keycode="VK_F5" command="cmd_circ_hold_capture"/>
-       <key id="patron-register-key" keycode="VK_F12" command="cmd_patron_registration"/>
-</keyset>
-
-
-<!-- The File menu on the main menu -->
-<menu id="main.menu.file" label="&staff.main.menu.file.label;" accesskey="&staff.main.menu.file.key;" >
-       <menupopup id="main.menu.file.popup">
-               <menuitem label="&staff.main.menu.file.new.label;" accesskey="&staff.main.menu.file.new.key;" key="new-window-key" command="cmd_new_window"/>
-               <menuitem label="&staff.main.menu.file.new_tab.label;" accesskey="&staff.main.menu.file.new_tab.key;" key="new-tab-key" command="cmd_new_tab"/>
-               <menuseparator />
-       <!--
-               <menuitem label="&staff.main.menu.file.open.label;" accesskey="&staff.main.menu.file.open.key;" key="file-open-key" command="cmd_broken" disabled="true"/>
-               <menuitem label="&staff.main.menu.file.save.label;" accesskey="&staff.main.menu.file.save.key;" key="file-save-key" command="cmd_broken"/>
-               <menuseparator />
-       -->
-               <menuitem label="&staff.main.menu.file.close_tab.label;" accesskey="&staff.main.menu.file.close_tab.key;" key="close-tab-key" command="cmd_close_tab"/>
-               <menuitem label="&staff.main.menu.file.close.label;" accesskey="&staff.main.menu.file.close.key;" key="close-window-key" command="cmd_close_window"/>
-       </menupopup>
-</menu>
-
-<!-- The Edit menu on the main menu -->
-<menu id="main.menu.edit" label="&staff.main.menu.edit.label;" accesskey="&staff.main.menu.edit.key;">
-       <menupopup id="main.menu.edit.popup">
-               <menuitem label="stub"/>
-       <!--
-               <menuitem label="&staff.main.menu.edit.undo.label;" accesskey="&staff.main.menu.edit.undo.key;" key="edit-undo-key" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.edit.redo.label;" accesskey="&staff.main.menu.edit.redo.key;" key="edit-redo-key" command="cmd_broken"/>
-               <menuseparator />
-               <menuitem label="&staff.main.menu.edit.cut.label;" accesskey="&staff.main.menu.edit.cut.key;" key="edit-cut-key" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.edit.copy.label;" accesskey="&staff.main.menu.edit.copy.key;" key="edit-copy-key" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.edit.paste.label;" accesskey="&staff.main.menu.edit.paste.key;" key="edit-paste-key" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.edit.delete.label;" accesskey="&staff.main.menu.edit.delete.key;" key="edit-delete-key" command="cmd_broken"/>
-               <menuseparator />
-               <menuitem label="&staff.main.menu.edit.buckets.label;" accesskey="&staff.main.menu.edit.buckets.key;" command="cmd_broken"/>
-               <menuseparator />
-               <menuitem label="&staff.main.menu.edit.select_all.label;" accesskey="&staff.main.menu.edit.select_all.key;" key="edit-select-all-key" command="cmd_broken"/>
-               <menuseparator />
-               <menuitem label="&staff.main.menu.edit.find.label;" accesskey="&staff.main.menu.edit.find.key;" key="edit-find-key" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.edit.find_again.label;" accesskey="&staff.main.menu.edit.find_again.key;" key="edit-find-again-key" command="cmd_broken"/>
-       -->
-       </menupopup>
-</menu>
-
-<!-- The Circulation menu on the main menu -->
-<menu id="main.menu.circ" label="&staff.main.menu.circ.label;" accesskey="&staff.main.menu.circ.key;">
-       <menupopup id="main.menu.circ.popup">
-               <menuitem label="&staff.main.menu.circ.checkout.label;" accesskey="&staff.main.menu.circ.checkout.key;" key="circ-checkout-key" command="cmd_circ_checkout"/>
-               <menuitem label="&staff.main.menu.circ.checkin.label;" accesskey="&staff.main.menu.circ.checkin.key;" key="circ-checkin-key" command="cmd_circ_checkin"/>
-               <menuitem label="&staff.main.menu.circ.hold_capture.label;" accesskey="&staff.main.menu.circ.hold_capture.key;" key="circ-hold-capture-key" command="cmd_circ_hold_capture"/>
-       <!--
-               <menu id="special-circ-menu" label="&staff.main.menu.circ.special.label;" accesskey="&staff.main.menu.circ.special.key;" command="cmd_broken"/>
-               <menuseparator />
-               <menuitem label="&staff.main.menu.circ.place_hold.label;" accesskey="&staff.main.menu.circ.place_hold.key;" key="circ-place-hold-key" command="cmd_broken"/>
-       -->
-               <menuseparator />
-               <menuitem label="&staff.main.menu.circ.copy_status.label;" accesskey="&staff.main.menu.circ.copy_status.key;" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.circ.patron_status.label;" accesskey="&staff.main.menu.circ.patron_status.key;" key="circ-checkout-key" command="cmd_circ_checkout"/>
-               <menuseparator />
-               <menuitem label="&staff.main.menu.circ.patron_registration.label;" accesskey="&staff.main.menu.circ.patron_registration.key;" key="patron-register-key" command="cmd_patron_register"/>
-       </menupopup>
-</menu>
-
-<!-- The Special Circulation submenu in the Circulation menu -->
-<menu id="special-circ-menu">
-       <menupopup id="special-circ-popup">
-               <menuitem label="&staff.main.menu.circ.mark_used.label;" accesskey="&staff.main.menu.circ.mark_used.key;" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.circ.lost.label;" accesskey="&staff.main.menu.circ.lost.key;" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.circ.missing.label;" accesskey="&staff.main.menu.circ.missing.key;" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.circ.found.label;" accesskey="&staff.main.menu.circ.found.key;" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.circ.claimed_returned.label;" accesskey="&staff.main.menu.circ.claimed_returned.key;" command="cmd_broken"/>
-               <menuitem label="&staff.main.menu.circ.quick_add.label;" accesskey="&staff.main.menu.circ.quick_add.key;" command="cmd_broken"/>
-       </menupopup>
-</menu>
-
-<!-- The Cataloging menu on the main menu -->
-<menu id="main.menu.cat" label="&staff.main.menu.cat.label;" accesskey="&staff.main.menu.cat.key;">
-       <menupopup id="main.menu.cat.popup">
-               <menuitem label="&staff.main.menu.cat.bib_search.label;" accesskey="&staff.main.menu.cat.bib_search.key;" key="search-opac-key" command="cmd_search_opac"/>
-               <menuseparator />
-               <menuitem disabled="true" label="&staff.main.menu.cat.dedup.label;" accesskey="&staff.main.menu.cat.dedup.key;" command="cmd_broken"/>
-               <menuitem label="Create New Marc Record" accesskey="n" command="cmd_create_new_marc_book"/>
-               <menuitem label="Z39.50 Import" accesskey="Z" command="cmd_z39_50_import"/>
-       </menupopup>
-</menu>
-
-<!-- The Search menu on the main menu -->
-<menu id="main.menu.search" label="&staff.main.menu.search.label;" accesskey="&staff.main.menu.search.key;">
-       <menupopup id="main.menu.search.popup">
-               <menuitem label="Catalog" accesskey="C" key="search-opac-key" command="cmd_search_opac" />
-               <menuitem label="Patrons" accesskey="P" key="patron-search-key" command="cmd_patron_search" />
-       </menupopup>
-</menu>
-
-<!-- The Serials menu on the main menu -->
-<menu id="main.menu.serials" label="&staff.main.menu.serials.label;" accesskey="&staff.main.menu.serials.key;">
-       <menupopup id="main.menu.serials.popup">
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
-
-<!-- The Acquisitions menu on the main menu -->
-<menu id="main.menu.acquisitions" label="&staff.main.menu.acquisitions.label;" accesskey="&staff.main.menu.acquisitions.key;">
-       <menupopup id="main.menu.acquisitions.popup">
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
-
-<!-- The Reports menu on the main menu -->
-<menu id="main.menu.reports" label="&staff.main.menu.reports.label;" accesskey="&staff.main.menu.reports.key;">
-       <menupopup id="main.menu.reports.popup">
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
-
-<!-- The Help menu on the main menu -->
-<menu id="main.menu.help" label="&staff.main.menu.help.label;" accesskey="&staff.main.menu.help.key;">
-       <menupopup id="main.menu.help.popup">
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
-
-<!-- The Help menu on the main menu -->
-<menu id="main.menu.admin" label="&staff.main.menu.admin.label;" accesskey="&staff.main.menu.admin.key;">
-       <menupopup id="main.menu.admin.popup">
-               <menuitem label="Receipt Template Editor" accesskey="R" command="cmd_receipt_template_editor"/>
-               <menuitem label="Survey Wizard" accesskey="S" command="cmd_survey_wizard"/>
-               <menuitem label="Statistical Category Editor" accesskey="C" command="cmd_stat_cat_edit"/>
-               <menuseparator />
-               <menuitem label="Test Module" accesskey="T" command="cmd_test"/>
-               <menuitem label="XUL Test" accesskey="X" command="cmd_xuleditor"/>
-               <menuitem label="Fieldmapper" accesskey="m" command="cmd_fieldmapper"/>
-               <menuitem label="Javscript Console" accesskey="J" command="cmd_console"/>
-               <menuitem label="Javscript Shell" accesskey="H" command="cmd_shell"/>
-               <menuitem label="server/main/test.html" accesskey="1" command="cmd_test_html"/>
-               <menuitem label="server/main/test.xul" accesskey="2" command="cmd_test_xul"/>
-       </menupopup>
-</menu>
-
-
-</overlay>
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame_overlay.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/main/menu_frame_overlay.xul
deleted file mode 100644 (file)
index 12495a2..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE overlay SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-<?xul-overlay href="chrome://open_ils_staff_client/content/main/menu_frame_menus.xul"?>
-<!--
-<?xul-overlay href="/xul/server/main/menu_frame_menus.xul"?>
--->
-<overlay id="menu_frame_overlay" 
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script>dump('loading menu_frame_overlay.xul\n');</script>
-
-<commandset id="universal_cmds" />
-<keyset id="menu_frame_keys" />
-
-<!-- The top level widget for the staff client -->
-<box id="menu_frame_main" flex="1" orient="vertical">
-       <toolbox id="main_toolbox"/>
-       <tabbox id="main_tabbox" flex="1" eventnode="window" handleCtrlTab="true">
-               <tabs id="main_tabs" closebutton="true">
-                       <tab id="tab_1" accesskey="1" label="Tab 1" hidden="true" />
-                       <tab id="tab_2" accesskey="2" label="Tab 2" hidden="true" />
-                       <tab id="tab_3" accesskey="3" label="Tab 3" hidden="true" />
-                       <tab id="tab_4" accesskey="4" label="Tab 4" hidden="true" />
-                       <tab id="tab_5" accesskey="5" label="Tab 5" hidden="true" />
-                       <tab id="tab_6" accesskey="6" label="Tab 6" hidden="true" />
-                       <tab id="tab_7" accesskey="7" label="Tab 7" hidden="true" />
-                       <tab id="tab_8" accesskey="8" label="Tab 8" hidden="true" />
-                       <tab id="tab_9" accesskey="9" label="Tab 9" hidden="true" />
-               </tabs>
-               <tabpanels id="main_panels" flex="1">
-                       <tabpanel id="panel_1"><label value="panel_1"/></tabpanel>
-                       <tabpanel id="panel_2"><label value="panel_2"/></tabpanel>
-                       <tabpanel id="panel_3"><label value="panel_3"/></tabpanel>
-                       <tabpanel id="panel_4"><label value="panel_4"/></tabpanel>
-                       <tabpanel id="panel_5"><label value="panel_5"/></tabpanel>
-                       <tabpanel id="panel_6"><label value="panel_6"/></tabpanel>
-                       <tabpanel id="panel_7"><label value="panel_7"/></tabpanel>
-                       <tabpanel id="panel_8"><label value="panel_8"/></tabpanel>
-                       <tabpanel id="panel_9"><label value="panel_9"/></tabpanel>
-               </tabpanels>
-       </tabbox>
-       <toolbox id="entity_toolbox"/>
-</box>
-
-<!-- The main top level menubar -->
-<toolbox id="main_toolbox">
-       <menubar id="main_menubar">
-               <menu id="main.menu.file" />
-               <menu id="main.menu.edit" />
-               <menu id="main.menu.search" />
-               <menu id="main.menu.circ" />
-               <menu id="main.menu.cat" />
-               <menu id="main.menu.serials" />
-               <menu id="main.menu.acquisitions" />
-               <menu id="main.menu.reports" />
-               <spacer flex="1" />
-               <menu id="main.menu.admin" />
-               <menu id="main.menu.help" />
-       </menubar>
-</toolbox>
-
-<!-- The Entity top level menubar -->
-<!--
-<toolbox id="entity_toolbox">
-       <menubar id="entity_menubar">
-               <menu id="patron-menu" label="&staff.main.menu.entity.patron.label;" accesskey="&staff.main.menu.entity.patron.key;" command="cmd_broken"/>
-               <menu id="copy-menu" label="&staff.main.menu.entity.copy.label;" accesskey="&staff.main.menu.entity.copy.key;" command="cmd_broken"/>
-               <menu id="volume-menu" label="&staff.main.menu.entity.volume.label;" accesskey="&staff.main.menu.entity.volume.key;" command="cmd_broken"/>
-               <menu id="bib-menu" label="&staff.main.menu.entity.bib.label;" accesskey="&staff.main.menu.entity.bib.key;" command="cmd_broken"/>
-       </menubar>
-</toolbox>
--->
-
-<!-- The Patron menu on the Entity menubar -->
-<!--
-<menu id="patron-menu">
-       <menupopup id="patron-popup">
-               <menuitem label="&staff.main.menu.circ.patron_registration.label;" accesskey="&staff.main.menu.entity.patron.register.key;" command="cmd_patron_register"/>
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
--->
-
-<!-- The Items menu on the Entity menubar -->
-<!--
-<menu id="copy-menu">
-       <menupopup id="copy-popup">
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
--->
-
-<!-- The Volumes menu on the Entity menubar -->
-<!--
-<menu id="volume-menu">
-       <menupopup id="volume-popup">
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
--->
-
-<!-- The Bib Records menu on the Entity menubar -->
-<!--
-<menu id="bib-menu">
-       <menupopup id="bib-popup">
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-               <menuitem label="stub" />
-       </menupopup>
-</menu>
--->
-
-</overlay>
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/test/test.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/test/test.js
deleted file mode 100644 (file)
index 33d7018..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-dump('entering test/test.js\n');
-
-if (typeof test == 'undefined') var test = {};
-test.test = {};
-
-test.test.EXPORT_OK    = [ 'hello_world' ];
-test.test.EXPORT_TAGS  = { ':all' : test.test.EXPORT_OK };
-
-test.test.hello_world = function () {
-       alert('Hello World');
-}
-
-dump('exiting test/test.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/browser.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/browser.js
deleted file mode 100644 (file)
index 72834a7..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-dump('entering util.browser.js\n');
-
-if (typeof util == 'undefined') util = {};
-util.browser = function (params) {
-       try {
-               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-               JSAN.use('util.error'); this.error = new util.error();
-       } catch(E) {
-               dump('util.browser: ' + E + '\n');
-       }
-}
-
-util.browser.prototype = {
-
-       'init' : function( params ) {
-
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
-                       var obj = this;
-
-                       obj.session = params['session'];
-                       obj.url = params['url'];
-
-                       JSAN.use('util.controller'); obj.controller = new util.controller();
-                       obj.controller.init(
-                               {
-                                       control_map : {
-                                               'cmd_broken' : [
-                                                       ['command'],
-                                                       function() { alert('Not Yet Implemented'); }
-                                               ],
-                                               'cmd_print' : [
-                                                       ['command'],
-                                                       function() {
-                                                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                                               obj.get_content().print();
-                                                       }
-                                               ],
-                                               'cmd_forward' : [
-                                                       ['command'],
-                                                       function() {
-                                                               try {
-                                                                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                                                       var n = obj.getWebNavigation();
-                                                                       if (n.canGoForward) n.goForward();
-                                                               } catch(E) {
-                                                                       var err = 'cmd_forward: ' + E;
-                                                                       obj.error.sdump('D_ERROR',err);
-                                                               }
-                                                       }
-                                               ],
-                                               'cmd_back' : [
-                                                       ['command'],
-                                                       function() {
-                                                               try {
-                                                                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                                                       var n = obj.getWebNavigation();
-                                                                       if (n.canGoBack) n.goBack();
-                                                               } catch(E) {
-                                                                       var err = 'cmd_back: ' + E;
-                                                                       obj.error.sdump('D_ERROR',err);
-                                                               }
-                                                       }
-                                               ],
-                                       }
-                               }
-                       );
-                       obj.controller.view.browser_browser = document.getElementById('browser_browser');
-
-                       obj.buildProgressListener();
-                       dump('obj.controller.view.browser_browser.addProgressListener = ' 
-                               + obj.controller.view.browser_browser.addProgressListener + '\n');
-                       obj.controller.view.browser_browser.addProgressListener(obj.progressListener,
-                                       Components.interfaces.nsIWebProgress.NOTIFY_ALL );
-
-                       obj.controller.view.browser_browser.setAttribute('src',obj.url);
-                       dump('url = ' + obj.url + '\n');
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.browser.init: ' + E + '\n');
-               }
-       },
-
-       'get_content' : function() {
-               if (this.controller.view.browser_browser.contentWindow.wrappedJSObject) {
-                       return this.controller.view.browser_browser.contentWindow.wrappedJSObject;
-               } else {
-                       return this.controller.view.browser_browser.contentWindow;
-               }
-       },
-
-       'push_variables' : function() {
-
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                       var cw = this.get_content();
-                       cw.IAMXUL = true;
-                       if (window.xulG) {
-                               cw.xulG = window.xulG.passthru_content_params;
-                               dump('xulG = ' + js2JSON(cw.xulG) + '\n');
-                       }
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.browser.push_variables: ' + E + '\n');
-               }
-       },
-
-       'getWebNavigation' : function() {
-               var wn = this.controller.view.browser_browser.webNavigation;
-               dump('getWebNavigation() = ' + wn + '\n');
-               return wn;
-       },
-
-       'updateNavButtons' : function() {
-               var obj = this; var s = '';
-               try {
-                       var n = obj.getWebNavigation();
-                       s += ('webNavigation = ' + n + '\n');
-                       s += ('webNavigation.canGoForward = ' + n.canGoForward + '\n');
-                       s += ('webNavigation.canGoBack = ' + n.canGoBack + '\n');
-                       if (n.canGoForward) {
-                               obj.controller.view.cmd_forward.disabled = false;
-                               obj.controller.view.cmd_forward.setAttribute('disabled','false');
-                       } else {
-                               obj.controller.view.cmd_forward.disabled = true;
-                               obj.controller.view.cmd_forward.setAttribute('disabled','true');
-                       }
-                       if (n.canGoBack) {
-                               obj.controller.view.cmd_back.disabled = false;
-                               obj.controller.view.cmd_back.setAttribute('disabled','false');
-                       } else {
-                               obj.controller.view.cmd_back.disabled = true;
-                               obj.controller.view.cmd_back.setAttribute('disabled','true');
-                       }
-               } catch(E) {
-                       s += E + '\n';
-               }
-               dump(s);
-       },
-
-       'buildProgressListener' : function() {
-
-               try {
-                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
-                       var obj = this;
-                       obj.progressListener = {
-                               onProgressChange        : function(){},
-                               onLocationChange        : function(){},
-                               onStatusChange          : function(){},
-                               onSecurityChange        : function(){},
-                               onStateChange           : function ( webProgress, request, stateFlags, status) {
-                                       netscape.security.PrivilegeManager.enablePrivilege( "UniversalXPConnect" );
-                                       var s = '';
-                                       const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
-                                       const nsIChannel = Components.interfaces.nsIChannel;
-                                       if (stateFlags == 65540 || stateFlags == 65537 || stateFlags == 65552) { return; }
-                                       s = ('onStateChange: stateFlags = ' + stateFlags + ' status = ' + status + '\n');
-                                       if (stateFlags & nsIWebProgressListener.STATE_IS_REQUEST) {
-                                               s += ('\tSTATE_IS_REQUEST\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_IS_DOCUMENT) {
-                                               s += ('\tSTATE_IS_DOCUMENT\n');
-                                               if( stateFlags & nsIWebProgressListener.STATE_STOP ) {
-                                                       obj.push_variables(); obj.updateNavButtons();
-                                                       if (window.xulG && typeof window.xulG.on_url_load == 'function') {
-                                                               try {
-                                                                       obj.error.sdump('D_TRACE','calling on_url_load');
-                                                                       window.xulG.on_url_load( obj.controller.view.browser_browser );
-                                                               } catch(E) {
-                                                                       obj.error.sdump('D_ERROR','on_url_load: ' + E );
-                                                               }
-                                                       }
-                                               }
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
-                                               s += ('\tSTATE_IS_NETWORK\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_IS_WINDOW) {
-                                               s += ('\tSTATE_IS_WINDOW\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_START) {
-                                               s += ('\tSTATE_START\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_REDIRECTING) {
-                                               s += ('\tSTATE_REDIRECTING\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_TRANSFERING) {
-                                               s += ('\tSTATE_TRANSFERING\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_NEGOTIATING) {
-                                               s += ('\tSTATE_NEGOTIATING\n');
-                                       }
-                                       if (stateFlags & nsIWebProgressListener.STATE_STOP) {
-                                               s += ('\tSTATE_STOP\n');
-                                       }
-                                       obj.error.sdump('D_OPAC',s);    
-                               }
-                       }
-                       obj.progressListener.QueryInterface = function(){return this;};
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.browser.buildProgressListener: ' + E + '\n');
-               }
-       },
-}
-
-dump('exiting util.browser.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/browser.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/browser.xul
deleted file mode 100644 (file)
index 2f70934..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Patron Display -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
-
-<window id="util_browser_win" 
-       onload="my_init()"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-        <script type="text/javascript">
-               var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
-               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-       </script>
-        <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
-       <script>
-       <![CDATA[
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('..');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_init() for util_browser.xul');
-
-                               g.cgi = new CGI();
-                               var name = g.cgi.param('name') || 'Browser';
-                               var session = g.cgi.param('session');
-                               var url; try { url = g.cgi.param('url') || xulG.url } catch(E) { dump(E + '\n'); };
-                               if (!url) url = urls.browser;
-
-                               JSAN.use('util.browser'); g.browser = new util.browser();
-
-                               g.browser.init( 
-                                       { 
-                                               'url' : url,
-                                               'session' : session,
-                                       } 
-                               );
-
-                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                       try { window.xulG.set_tab_name(name); } catch(E) { alert(E); }
-                               }
-                               if (typeof window.xulG && window.xulG.show_nav_buttons) {
-                                       document.getElementById('back').hidden = false;
-                                       document.getElementById('forward').hidden = false;
-                               }
-                               if (typeof window.xulG && window.xulG.show_print_button) {
-                                       document.getElementById('browser_print').hidden = false;
-                               }
-
-                       } catch(E) {
-                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
-                                       "system administrator or software developer the following:\n" + E + '\n';
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-
-       ]]>
-       </script>
-
-       <commandset id="util_browser_cmds">
-               <command id="cmd_broken" />
-               <command id="cmd_print" />
-               <command id="cmd_back" />
-               <command id="cmd_forward" />
-       </commandset>
-
-       <vbox flex="1">
-               <hbox>
-                       <button id="back" label="Go Back" command="cmd_back" accesskey="b" disabled="true" hidden="true"/>
-                       <button id="forward" label="Go Forward" command="cmd_forward" accesskey="d" disabled="true" hidden="true"/>
-                       <spacer flex="1"/>
-                       <button id="browser_print" label="Print Page" command="cmd_print" hidden="true"/>
-               </hbox>
-               <browser id="browser_browser" flex="1" type="content"/>
-       </vbox>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/controller.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/controller.js
deleted file mode 100644 (file)
index 06d9242..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-dump('entering util/controller.js\n');
-
-if (typeof util == 'undefined') util = {};
-util.controller = function () {
-
-       JSAN.use('util.error'); this.error = new util.error();
-
-       return this;
-};
-
-util.controller.prototype = {
-
-       'cmds' : {},
-
-       'init' : function (params) {
-
-               if (typeof params.control_map == 'undefined') throw('util.controller.init: No control_map');
-
-               this.control_map = params.control_map;
-               this.window_knows_me_by = params.window_knows_me_by;
-               this.render_list = [];
-               this.view = {};
-               
-               for (var i in this.control_map) {
-                       var cmd = document.getElementById(i);
-                       if (cmd) {
-                               for (var j in this.control_map[i][0]) {
-                                       if (this.control_map[i][1]) {
-                                               var ev_type = this.control_map[i][0][j];
-                                               switch(ev_type) {
-                                                       case 'render':
-                                                               this.render_list.push( [i, this.control_map[i][1](cmd)] ); 
-                                                       break;
-                                                       case 'oncommand':
-                                                               if (!this.window_knows_me_by) 
-                                                                       throw('util.controller: on_command requires window_knows_me_by');
-                                                               var s = 'try{'+this.window_knows_me_by+".cmds."+i+"();}catch(E){alert(E);}";
-                                                               cmd.setAttribute(ev_type, s);
-                                                               this.cmds[i] = this.control_map[i][1];
-                                                       break;
-                                                       default: cmd.addEventListener(ev_type,this.control_map[i][1],false);
-                                               }
-                                       }
-                               }
-                       }
-                       this.view[i] = cmd;
-               }
-       },
-
-       'render' : function(id) {
-               for (var i in this.render_list) {
-                       try {
-                               if (id) {
-                                       if (id == this.render_list[i][0]) this.render_list[i][1]();
-                               } else {
-                                       this.render_list[i][1]();
-                               }
-                       } catch(E) {
-                               var error = 'Problem in circ.checkout.render with\n' 
-                                       + this.render_list[i] + '\n\n' + js2JSON(E);
-                               this.error.sdump('D_ERROR',error);
-                       }
-               }
-       }
-}
-dump('exiting util/controller.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/date.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/date.js
deleted file mode 100644 (file)
index 387ad07..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-dump('entering util/date.js\n');
-
-if (typeof util == 'undefined') var util = {};
-util.date = {};
-
-util.date.EXPORT_OK    = [ 
-       'timer_init', 'timer_elapsed', 'db_date2Date', 'formatted_date', 'interval_to_seconds'
-];
-util.date.EXPORT_TAGS  = { ':all' : util.date.EXPORT_OK };
-
-util.date.timer_init = function (id) {
-       if (typeof util.date.timer_init.prototype.timer == 'undefined') {
-               util.date.timer_init.prototype.timer = {};
-       }
-       util.date.timer_init.prototype.timer[id] = (new Date).getTime();
-}
-
-util.date.timer_elapsed = function (id) {
-       if (! util.date.timer_init.prototype.timer[id]) { util.date.timer_init(id); }
-       var ms = (new Date).getTime() - util.date.timer_init.prototype.timer[id];
-       return( ms + 'ms (' + ms/1000 + 's)' );
-}
-
-util.date.db_date2Date = function (date) {
-       var y  = date.substr(0,4);
-       var mo = date.substr(5,2);
-       var d  = date.substr(8,2);
-       var h  = date.substr(11,2);
-       var mi = date.substr(14,2);
-       var s  = date.substr(17,2);
-       return new Date(y,mo,d,h,mi,s);
-}
-
-util.date.formatted_date = function (date,format) {
-       // pass in a Date object or epoch seconds or a postgres style date string (2005-07-19 10:38:25.211964-04)
-       if (typeof(date) == 'string') {
-               if (date.match(/:/) || date.match(/-/)) {
-                       date = util.date.db_date2Date(date);
-               } else {
-                       date = new Date( parseInt( date + '000' ) );
-               }
-       } else if (typeof(date) == 'undefined') {
-               date = new Date( parseInt( date + '000' ) );
-       }
-       var mm = date.getMonth() + 1; mm = mm.toString(); if (mm.length == 1) mm = '0' +mm;
-       var dd = date.getDate().toString(); if (dd.length == 1) dd = '0' +dd;
-       var yyyy = date.getFullYear().toString();
-       var yy = yyyy.substr(2);
-       var H = date.getHours(); H = H.toString(); if (H.length == 1) H = '0' + H;
-       var I = date.getHours(); if (I > 12) I -= 12; I = I.toString();
-       var M = date.getMinutes(); M = M.toString(); if (M.length == 1) M = '0' + M;
-       var s = format;
-       if (s == '') { s = '%F %H:%M'; }
-       s = s.replace( /%m/g, mm );
-       s = s.replace( /%d/g, dd );
-       s = s.replace( /%Y/g, yyyy );
-       s = s.replace( /%D/g, mm + '/' + dd + '/' + yy );
-       s = s.replace( /%F/g, yyyy + '-' + mm + '-' + dd );
-       s = s.replace( /%H/g, H );
-       s = s.replace( /%I/g, I );
-       s = s.replace( /%M/g, M );
-       return s;
-}
-
-util.date.interval_to_seconds = function ( $interval ) {
-
-        $interval = $interval.replace( /and/, ',' );
-        $interval = $interval.replace( /,/, ' ' );
-
-        var $amount = 0;
-       var results = $interval.match( /\s*\+?\s*(\d+)\s*(\w{1})\w*\s*/g);  
-       for (var i in results) {
-               var result = results[i].match( /\s*\+?\s*(\d+)\s*(\w{1})\w*\s*/ );
-               if (result[2] == 's') $amount += result[1] ;
-               if (result[2] == 'm') $amount += 60 * result[1] ;
-               if (result[2] == 'h') $amount += 60 * 60 * result[1] ;
-               if (result[2] == 'd') $amount += 60 * 60 * 24 * result[1] ;
-               if (result[2] == 'w') $amount += 60 * 60 * 24 * 7 * result[1] ;
-               if (result[2] == 'M') $amount += ((60 * 60 * 24 * 365)/12) * result[1] ;
-               if (result[2] == 'y') $amount += 60 * 60 * 24 * 365 * result[1] ;
-        }
-        return $amount;
-}
-
-dump('exiting util/date.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/deck.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/deck.js
deleted file mode 100644 (file)
index 7de70b3..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-dump('entering util/deck.js\n');
-
-if (typeof util == 'undefined') util = {};
-util.deck = function (id) {
-
-       this.node = document.getElementById(id);
-
-       JSAN.use('util.error'); this.error = new util.error();
-
-       if (!this.node) {
-               var error = 'util.deck: Could not find element ' + id;
-               this.error.sdump('D_ERROR',error);
-               throw(error);
-       }
-       if (this.node.nodeName != 'deck') {
-               var error = 'util.deck: ' + id + 'is not a deck' + "\nIt's a " + this.node.nodeName;
-               this.error.sdump('D_ERROR',error);
-               throw(error);
-       }
-
-       return this;
-};
-
-util.deck.prototype = {
-
-       'find_index' : function (url) {
-               var idx = -1;
-               var nodes = this.node.childNodes;
-               for (var i = 0; i < nodes.length; i++) {
-                       if (nodes[i].getAttribute('src') == url) idx = i;
-               }
-               return idx;
-       },
-
-       'set_iframe' : function (url,params,content_params) {
-               this.error.sdump('D_TRACE','util.deck.set_iframe: url = ' + url);
-               var idx = this.find_index(url);
-               if (idx>-1) {
-                       this.node.selectedIndex = idx;
-                       return this.node.childNodes[idx];
-               } else {
-                       return this.new_iframe(url,params,content_params);
-               }
-               
-               
-       },
-
-       'reset_iframe' : function (url,params,content_params) {
-               this.remove_iframe(url);
-               return this.new_iframe(url,params,content_params);
-       },
-
-       'new_iframe' : function (url,params,content_params) {
-               var idx = this.find_index(url);
-               if (idx>-1) throw('An iframe already exists in deck with url = ' + url);
-
-               var iframe = document.createElement('iframe');
-               iframe.setAttribute('src',url);
-               //iframe.setAttribute('flex','1');
-               //iframe.setAttribute('style','overflow: scroll');
-               //iframe.setAttribute('style','border: solid thin red');
-               this.node.appendChild( iframe );
-               this.node.selectedIndex = this.node.childNodes.length - 1;
-               if (content_params) {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               this.error.sdump('D_DECK', 'frame.contentWindow = ' + iframe.contentWindow + '\n');
-                               iframe.contentWindow.IAMXUL = true;
-                               iframe.contentWindow.xulG = content_params;
-                       } catch(E) {
-                               dump('E: ' + E + '\n');
-                       }
-               }
-               return iframe;
-       },
-
-       'remove_iframe' : function (url) {
-               var idx = this.find_index(url);
-               if (idx>-1) {
-                       this.node.removeChild( this.node.childNodes[ idx ] );
-               }
-       }
-}      
-
-dump('exiting util/deck.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/error.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/error.js
deleted file mode 100644 (file)
index 41df06c..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-dump('entering util/error.js\n');
-
-if (typeof util == 'undefined') util = {};
-util.error = function () {
-
-       try {
-               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-               this.consoleService = Components.classes['@mozilla.org/consoleservice;1']
-                       .getService(Components.interfaces.nsIConsoleService);
-       } catch(E) {
-               this.consoleDump = false;
-               dump('util.error constructor: ' + E + '\n');
-       }
-
-       this.sdump_last_time = new Date();
-
-       this.OpenILS = {};
-
-       return this;
-};
-
-util.error.prototype = {
-
-       'printDebug' : true,
-       'consoleDump' : true,
-       'debugDump' : true,
-       'arg_dump_full' : false,
-
-       'debug' : function(e){
-               dump('-----------------------------------------\n' 
-                       + e + '\n-----------------------------------------\n' );
-       },
-
-       'sdump_levels' : {
-
-               'D_NONE' : false, 'D_ALL' : false, 'D_ERROR' : true, 'D_DEBUG' : true, 'D_TRACE' :  true,
-               'D_TRACE_ENTER' :  false, 'D_TRACE_EXIT' :  false, 'D_TIMEOUT' :  false, 'D_FILTER' : false,
-               'D_CONSTRUCTOR' : false, 'D_FIREFOX' : false, 'D_LEGACY' : false, 'D_DATA' : true,
-
-               'D_CLAM' : false, 'D_PAGED_TREE' : false, 'D_GRID_LIST' : false, 'D_HTML_TABLE' : false,
-               'D_TAB' : false, 'D_LIST' : true,
-
-               'D_AUTH' : true, 'D_OPAC' : true, 'D_CAT' : true,
-
-               'D_PATRON_SEARCH' : false, 'D_PATRON_SEARCH_FORM' : false, 'D_PATRON_SEARCH_RESULTS' : false,
-
-               'D_PATRON_DISPLAY' : false, 'D_PATRON_DISPLAY_STATUS' : false, 'D_PATRON_DISPLAY_CONTACT' : false,
-
-               'D_PATRON_ITEMS' : false, 'D_PATRON_CHECKOUT_ITEMS' : false, 'D_PATRON_HOLDS' : false,
-               'D_PATRON_BILLS' : false, 'D_PATRON_EDIT' : false,
-
-               'D_CHECKIN' : false, 'D_CHECKIN_ITEMS' : false,
-
-               'D_HOLD_CAPTURE' : false, 'D_HOLD_CAPTURE_ITEMS' : false,
-
-               'D_PATRON_UTILS' : false, 'D_CIRC_UTILS' : false,
-
-               'D_FILE' : true, 'D_EXPLODE' : false, 'D_FM_UTILS' : false, 'D_PRINT' : false, 'D_SES' : true,
-               'D_SES_FUNC' : false, 'D_SES_RESULT' : true, 'D_SPAWN' : false, 'D_STRING' : false,
-               'D_UTIL' : false, 'D_WIN' : true, 'D_WIDGETS' : false
-       },
-
-       'filter_console_init' : function (p) {
-               this.sdump('D_FILTER',this.arg_dump(arguments,{0:true}));
-
-               var filterConsoleListener = {
-                       observe: function( msg ) {
-                               try {
-                                       p.observe_msg( msg );
-                               } catch(E) {
-                                       alert(E);
-                               }
-                       },
-                       QueryInterface: function (iid) {
-                               if (!iid.equals(Components.interfaces.nsIConsoleListener) &&
-                                       !iid.equals(Components.interfaces.nsISupports)) {
-                                               throw Components.results.NS_ERROR_NO_INTERFACE;
-                               }
-                               return this;
-                       }
-               };
-               try {
-                       this.consoleService.registerListener(filterConsoleListener);    
-               } catch(E) {
-                       alert(E);
-               }
-
-               this.sdump('D_TRACE_EXIT',this.arg_dump(arguments));
-       },
-
-       'sdump' : function (level,msg) {
-               try {
-                       var now = new Date();
-                       var message = now.valueOf() + '\tdelta = ' + (now.valueOf() - this.sdump_last_time.valueOf()) + '\t' + level + '\n' + msg;
-                       if (this.sdump_levels['D_NONE']) return null;
-                       if (this.sdump_levels[level]||this.sdump_levels['D_ALL']) {
-                               this.sdump_last_time = now;
-                               if (this.debugDump)
-                                       this.debug(message);
-                               if (this.consoleDump) {
-                                       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                       this.consoleService.logStringMessage(message);
-                               }
-                       }
-               } catch(E) {
-                       dump('Calling sdump but ' + E + '\n');
-               }
-       },
-
-       'arg_dump' : function (args,dump_these) {
-               var s = '*>*>*> Called function ';
-               try {
-                       if (!dump_these)
-                               dump_these = {};
-                       s += args.callee.toString().match(/\w+/g)[1] + ' : ';
-                       for (var i = 0; i < args.length; i++)
-                               s += typeof(args[i]) + ' ';
-                       s += '\n';
-                       for (var i = 0; i < args.length; i++)
-                               if (dump_these[i]) {
-
-                                       var arg = args[i];
-                                       //dump('dump_these[i] = ' + dump_these[i] + '  arg = ' + arg + '\n');
-
-                                       if (typeof(dump_these[i])=='string') {
-
-                                               if (dump_these[i].slice(0,1) == '.') {
-                                                       var cmd = 'arg' + dump_these[i];
-                                                       var result;
-                                                       try {
-                                                               result = eval( cmd );
-                                                       } catch(E) {
-                                                               result = cmd + ' ==> ' + E;
-                                                       }
-                                                       s += '\targ #' + i + ': ' + cmd + ' = ' + result;
-                                               } else {
-                                                       var result;
-                                                       try {
-                                                               result = eval( dump_these[i] );
-                                                       } catch(E) {
-                                                               result = dump_these[i] + ' ==> ' + E;
-                                                       }
-                                                       s += '\targ #' + i + ': ' + result;
-                                               }
-       
-                                       } else {
-                                               s += '\targ #' + i + ' = ';
-                                               try {
-                                                       //s += js2JSON( arg );
-                                                       s += arg;
-                                               } catch(E) {
-                                                       s += arg;
-                                               }
-                                       }
-       
-                                       s += '\n';
-                                       if (this.arg_dump_full)
-                                               s += 'Definition: ' + args.callee.toString() + '\n';
-       
-                               }
-                       return s;
-               } catch(E) {
-                       return s + '\nDEBUG ME: ' + js2JSON(E) + '\n';
-               }
-       },
-
-       'handle_error' : function (E,annoy) {
-               var s = '';
-               if (instanceOf(E,ex)) {
-                       s += E.err_msg();
-                       //s += '\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n';
-                       //s += 'This error was anticipated.\n\n';
-                       //s += js2JSON(E).substr(0,200) + '...\n\n';
-                       if (snd_bad) snd_bad();
-               } else {
-                       s += '\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n';
-                       s += 'This is a bug that we will fix later.\n\n';
-                       try {
-                               s += js2JSON(E).substr(0,1024) + '\n\n';
-                       } catch(E2) {
-                               try {
-                                       s += E.substr(0,1024) + '\n\n';
-                               } catch(E3) {
-                                       s += E + '\n\n';
-                               }
-                       }
-                       if (snd_really_bad) snd_really_bad();
-               }
-               sdump('D_ERROR',s);
-               if (annoy)
-                       this.s_alert(s);
-               else
-                       alert(s);
-       },
-
-       's_alert' : function (s) { alert(s); },
-
-       'get_ilsevent' : function(status) {
-               JSAN.use('OpenILS.data'); 
-               this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'});
-               return this.OpenILS.data.entities['ilsevent.'+status];
-       },
-
-       'yns_alert' : function (s,title,b1,b2,b3,c) {
-
-               /*
-                       s       = Message to display
-                       title   = Text in Title Bar
-                       b1      = Text for button 1
-                       b2      = Text for button 2
-                       b3      = Text for button 3
-                       c       = Text for confirmation checkbox.  null for no confirm
-               */
-
-               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
-               // get a reference to the prompt service component.
-               var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
-                       .getService(Components.interfaces.nsIPromptService);
-
-               // set the buttons that will appear on the dialog. It should be
-               // a set of constants multiplied by button position constants. In this case,
-               // three buttons appear, Save, Cancel and a custom button.
-               //var flags=promptService.BUTTON_TITLE_OK * promptService.BUTTON_POS_0 +
-               //      promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1 +
-               //      promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2;
-               var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +
-                       promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +
-                       promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2; 
-
-               // display the dialog box. The flags set above are passed
-               // as the fourth argument. The next three arguments are custom labels used for
-               // the buttons, which are used if BUTTON_TITLE_IS_STRING is assigned to a
-               // particular button. The last two arguments are for an optional check box.
-               var check = {};
-               var rv = promptService.confirmEx(window,title, s, flags, b1, b2, b3, c, check);
-               if (c && !check.value) {
-                       return this.yns_alert(s,title,b1,b2,b3,c);
-               }
-               return rv;
-       },
-}
-
-dump('exiting util/error.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/exec.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/exec.js
deleted file mode 100644 (file)
index 313afdc..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-dump('entering util/exec.js\n');
-
-if (typeof util == 'undefined') var util = {};
-util.exec = function() {
-       //JSAN.use('util.error'); this.error = new util.error();
-
-       return this;
-};
-
-util.exec.prototype = {
-       // This executes a series of functions, but tries to give other events/functions a chance to
-       // execute between each one.
-       'chain' : function () {
-               var args = [];
-               var obj = this;
-               for (var i = 0; i < arguments.length; i++) {
-                       var arg = arguments[i];
-                       switch(arg.constructor.name) {
-                               case 'Function' :
-                                       args.push( arg );
-                               break;
-                               case 'Array' :
-                                       for (var j = 0; j < arg.length; j++) {
-                                               if (typeof arg[j] == 'function') args.push( arg[j] );
-                                       }
-                               break;
-                               case 'Object' :
-                                       for (var j in arg) {
-                                               if (typeof arg[j] == 'function') args.push( arg[j] );
-                                       }
-                               break;
-                       }
-               }
-               if (args.length > 0) setTimeout(
-                       function() {
-                               try {
-                                       args[0]();
-                                       if (args.length > 1 ) obj.chain( args.slice(1) );
-                               } catch(E) {
-                                       dump('util.exec.chain error: ' + js2JSON(E) + '\n');
-                                       var keep_going = false;
-                                       if (typeof obj.on_error == 'function') {
-                                               keep_going = obj.on_error(E);
-                                       }
-                                       if (keep_going) {
-                                               dump('chain not broken\n');
-                                               try {
-                                                       if (args.length > 1 ) obj.chain( args.slice(1) );
-
-                                               } catch(E) {
-                                                       dump('another error: ' + js2JSON(E) + '\n');
-                                               }
-                                       } else {
-                                               dump('chain broken\n');
-                                       }
-                               }
-                       }, 0
-               );
-       }
-}
-
-dump('exiting util/exec.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/file.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/file.js
deleted file mode 100644 (file)
index 0604c74..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-dump('entering util/file.js\n');
-
-if (typeof util == 'undefined') util = {};
-util.file = function (fname) {
-
-       JSAN.use('util.error'); this.error = new util.error();
-
-       this.dirService = Components.classes["@mozilla.org/file/directory_service;1"].
-               getService( Components.interfaces.nsIProperties );
-
-       if (fname) this.get(fname);
-
-       return this;
-};
-
-util.file.prototype = {
-
-       'myPackageDir' : 'open_ils_staff_client',
-
-       'name' : '',
-       '_file' : null,
-       '_input_stream' : null,
-       '_output_stream' : null,
-
-       'get' : function( fname ) {
-               try {
-                       if (!fname) { fname = this.name; } else { this.name = fname; }
-                       if (!fname) throw('Must specify a filename.');
-
-                       this._file = this.dirService.get( "AChrom",  Components.interfaces.nsIFile );
-                       this._file.append(myPackageDir); 
-                       this._file.append("content"); 
-                       this._file.append("conf"); 
-                       this._file.append(fname);
-       
-                       this.error.sdump('D_FILE',this._file.path);
-
-                       return this._file;
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.file.get(): ' + E);
-                       throw(E);
-               }
-       },
-
-       'close' : function() {
-               try {
-                       if (!this._file) throw('Must .get() a file first.');
-                       if (this._input_stream) { this._input_stream.close(); this._input_stream = null; }
-                       if (this._output_stream) { this._output_stream.close(); this._output_stream = null; }
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.file.close(): ' + E);
-                       throw(E);
-               }
-       },
-
-       'set_object' : function(obj) {
-               try {
-                       if (!this._file) throw('Must .get() a file first.');
-                       if (this._input_stream || this._output_stream) throw('Must .close() first.');
-                       if (!obj) throw('Must specify an object.');
-
-                       var obj_json; 
-                       try { obj_json = js2JSON( obj ); } catch(E) { throw('Could not JSONify the object: ' + E); }
-
-                       this._create_output_stream();
-                       this._output_stream.write( obj_json, String( obj_json ).length );
-                       this.close();
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.file.set_object(): ' + E);
-                       throw(E);
-               }
-       },
-
-       'get_object' : function() {
-               try {
-                       if (!this._file) throw('Must .get() a file first.');
-                       if (!this._file.exists()) throw('File does not exist.');
-                       if (this._input_stream || this._output_stream) throw('Must .close() first.');
-                       
-                       this._create_input_stream();
-                       var data = this._input_stream.read(-1);
-                       this.close();
-       
-                       var obj; try { obj = JSON2js( data ); } catch(E) { throw('Could not js-ify the JSON: '+E); }
-       
-                       return obj;
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.file.get_object(): ' + E);
-                       throw(E);
-               }
-       },
-
-       '_create_input_stream' : function() {
-               try {
-                       if (!this._file) throw('Must .get() a file first.');
-                       if (this._input_stream || this._output_stream) throw('Must .close() first.');
-                       if (!this._file.exists()) throw('File does not exist.');
-       
-                       var f = Components.classes["@mozilla.org/network/file-input-stream;1"]
-                               .createInstance(Components.interfaces.nsIFileInputStream);
-                       f.init(this._file, 0x01, 0, 0);
-                       this._input_stream = Components.classes["@mozilla.org/scriptableinputstream;1"]
-                               .createInstance(Components.interfaces.nsIScriptableInputStream);
-                       if (f) {
-                               this._input_stream.init(f);
-                               return this._input_stream;
-                       } else {
-                               throw('Could not instantiate input stream.');
-                       }
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.file._create_input_stream(): ' + E);
-                       throw(E);
-               }
-       },
-
-       '_create_output_stream' : function() {
-               try {
-                       if (!this._file) throw('Must .get() a file first.');
-                       if (this._input_stream || this._output_stream) throw('Must .close() first.');
-
-                       if (! this._file.exists()) this._file.create( 0, 0640 );
-
-                       this._output_stream = Components.classes["@mozilla.org/network/file-output-stream;1"]
-                               .createInstance(Components.interfaces.nsIFileOutputStream);
-                       this._output_stream.init(this._file, 0x02 | 0x08 | 0x20, 0644, 0);
-
-                       return this._output_stream;
-
-               } catch(E) {
-                       this.error.sdump('D_ERROR','util.file._create_output_stream(): ' + E);
-                       throw(E);
-               }
-       }
-
-}
-
-dump('exiting util/file.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/fm_utils.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/fm_utils.js
deleted file mode 100644 (file)
index ee1f7eb..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-dump('entering util/fm_utils.js\n');
-
-if (typeof util == 'undefined') var util = {};
-util.fm_utils = {};
-
-util.fm_utils.EXPORT_OK        = [ 'flatten_ou_branch', 'find_ou' ];
-util.fm_utils.EXPORT_TAGS      = { ':all' : util.fm_utils.EXPORT_OK };
-
-util.fm_utils.flatten_ou_branch = function(branch) {
-       var my_array = new Array();
-       my_array.push( branch );
-       for (var i in branch.children() ) {
-               var child = branch.children()[i];
-               if (child != null) {
-                       var temp_array = util.fm_utils.flatten_ou_branch(child);
-                       for (var j in temp_array) {
-                               my_array.push( temp_array[j] );
-                       }
-               }
-       }
-       return my_array;
-}
-
-util.fm_utils.find_ou = function(tree,id) {
-       if (typeof(id)=='object') { id = id.id(); }
-       if (tree.id()==id) {
-               return tree;
-       }
-       for (var i in tree.children()) {
-               var child = tree.children()[i];
-               ou = util.fm_utils.find_ou( child, id );
-               if (ou) { return ou; }
-       }
-       return null;
-}
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/fm_view.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/fm_view.xul
deleted file mode 100644 (file)
index 996b37b..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: About -->
-
-<!-- Stylesheets -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- OVERLAYS -->
-<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
-
-<window id="fm_view_win" 
-       onload="try { my_init(); } catch(E) { dump(E+'\n'); alert(E); }"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-        <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
-        <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
-
-       <script>
-       <![CDATA[
-               var tree;
-               var mw = {
-                       'get_list_from_tree_selection' : function() {
-                               var d = document; var tree_w;
-                               if (arguments.length == 1) {
-                                       tree_w = arguments[0];
-                               } else {
-                                       d = arguments[0];
-                                       tree_w = arguments[1];
-                               }
-                               var hitlist;
-                               if (typeof(tree_w) != 'object') {
-                                       hitlist = d.getElementById(tree_w);
-                               } else {
-                                       hitlist = tree_w;
-                               }
-                               var list = [];
-                               var start = new Object();
-                               var end = new Object();
-                               var numRanges = hitlist.view.selection.getRangeCount();
-                               for (var t=0; t<numRanges; t++){
-                                       hitlist.view.selection.getRangeAt(t,start,end);
-                                       for (var v=start.value; v<=end.value; v++){
-                                               var i = hitlist.contentView.getItemAtIndex(v);
-                                               list.push( i );
-                                       }
-                               }
-                               return list;
-                       }
-               };
-
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('/xul/server/');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               JSAN.use('util.network'); g.network = new util.network();
-                               JSAN.use('util.window'); g.window = new util.window();
-                               JSAN.use('util.functional');
-                               g.error.sdump('D_TRACE','my_init() for fm_view.xul');
-
-                               var treechildren = window.document.getElementById('tc');
-                               var fm = g.network.request('open-ils.actor','opensrf.open-ils.system.fieldmapper',[]);
-                               var fma = []; var fmh = {} ; 
-                               for (var i in fm) { fmh[ fm[i].hint ] = fm[i]; fma.push( [ fm[i].hint, i ] ); }
-                               fma.sort();
-                               for (var i = 0; i < fma.length; i++) {
-                                       var hint = fma[i][0]; var name = fma[i][1]; var o = fmh[ hint ];
-                                       var ti = window.document.createElement('treeitem');
-                                       treechildren.appendChild( ti );
-                                       ti.setAttribute( 'container', 'true' );
-                                       var tr = window.document.createElement('treerow');
-                                       ti.appendChild( tr );
-                                       var tc = window.document.createElement('treecell');
-                                       tr.appendChild( tc );
-                                       tc.setAttribute('label',hint);
-                                       tc = window.document.createElement('treecell');
-                                       tr.appendChild( tc );
-                                       tc.setAttribute('label', name );
-                                       var _treechildren = window.document.createElement( 'treechildren' );
-                                       ti.appendChild( _treechildren );
-                                       for (var j in o.fields) {
-                                               var _ti = window.document.createElement( 'treeitem' );
-                                               _treechildren.appendChild( _ti );
-                                               _ti.setAttribute('fm_class',hint);
-                                               _ti.setAttribute('fm_field',j);
-                                               _ti.setAttribute('fm_virtual',o.fields[j].virtual);
-                                               _ti.setAttribute('fm_position',o.fields[j].position);
-                                               var _tr = window.document.createElement( 'treerow' );
-                                               _ti.appendChild( _tr );
-                                               var _tc = window.document.createElement( 'treecell' );
-                                               _tr.appendChild( _tc );
-                                               _tc.setAttribute('label',j);
-                                               _tc = window.document.createElement( 'treecell' );
-                                               _tr.appendChild( _tc );
-                                               _tc.setAttribute('label','\t         Position: ' + o.fields[j].position + '  Virtual: ' + o.fields[j].virtual);
-                                       }
-                               }
-                               tree = window.document.getElementById('t');
-                               tree.view.selection.select( 0 ); tree.focus();
-                       } catch(E) {
-                       }
-               }
-
-               function gen_cols() {
-                       var data_url = 'data:application/vnd.mozilla.xul+xml,<?xml version="1.0"?><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><?xml-stylesheet href="chrome://global/skin" type="text/css"?><vbox flex="1"><textbox id="desc" multiline="true" flex="1"/></vbox></window>';
-                       var w = g.window.SafeWindowOpen(data_url,'paged_tree cols','chrome,resizable,width=800,height=600');
-                       var css = '<?xml-stylesheet href="data:text/css,#a{-moz-box-flex:1;}"?>';
-                       var treeitems = mw.get_list_from_tree_selection( tree );
-                       setTimeout(
-                               function() {
-                                       var tb = w.document.getElementById('desc');
-                                       for (var i = 0; i < treeitems.length; i++) {
-                                               var hint = treeitems[i].getAttribute('fm_class');
-                                               var field = treeitems[i].getAttribute('fm_field');
-                                               var text = (
-                                                       "{\n\t'id' : '" + field + "', 'label' : getString('" + hint + "_" + 
-                                                       field + "_label'), 'flex' : 1,\n" + 
-                                                       "\t'primary' : false, 'hidden' : false, 'fm_class' : '" + hint + 
-                                                       "', 'fm_field_render' : '." + field + "()'\n},\n"
-                                               );
-                                               tb.value += text;
-                                       }
-                                       dump(tb.value + '\n');
-                               }, 0
-                       );
-               }
-
-               function gen_properties() {
-                       var data_url = 'data:application/vnd.mozilla.xul+xml,<?xml version="1.0"?><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><?xml-stylesheet href="chrome://global/skin" type="text/css"?><vbox flex="1"><textbox id="desc" multiline="true" flex="1"/></vbox></window>';
-                       var w = g.window.SafeWindowOpen(data_url,'paged_tree cols','chrome,resizable,width=800,height=600');
-                       var css = '<?xml-stylesheet href="data:text/css,#a{-moz-box-flex:1;}"?>';
-                       var treeitems = mw.get_list_from_tree_selection( tree );
-                       setTimeout(
-                               function() {
-                                       var tb = w.document.getElementById('desc');
-                                       for (var i = 0; i < treeitems.length; i++) {
-                                               var hint = treeitems[i].getAttribute('fm_class');
-                                               var field = treeitems[i].getAttribute('fm_field');
-                                               var pretty = util.functional.map_list(
-                                                       field.split('_'),
-                                                       function (s) {
-                                                               return s.substr(0,1).toUpperCase() + s.substr(1);
-                                                       }
-                                               ).join(' ');
-                                               var text = (
-                                                       hint + '_' + field + '_label=' + pretty + '\n'
-                                               );
-                                               tb.value += text;
-                                       }
-                                       dump(tb.value + '\n');
-                               }, 0
-                       );
-               }
-
-               function gen_wikitable() {
-                       var data_url = 'data:application/vnd.mozilla.xul+xml,<?xml version="1.0"?><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><?xml-stylesheet href="chrome://global/skin" type="text/css"?><vbox flex="1"><textbox id="desc" multiline="true" flex="1"/></vbox></window>';
-                       var w = g.window.SafeWindowOpen(data_url,'paged_tree cols','chrome,resizable,width=800,height=600');
-                       var css = '<?xml-stylesheet href="data:text/css,#a{-moz-box-flex:1;}"?>';
-                       var treeitems = mw.get_list_from_tree_selection( tree );
-                       setTimeout(
-                               function() {
-                                       var tb = w.document.getElementById('desc');
-                                       for (var i = 0; i < treeitems.length; i++) {
-                                               var hint = treeitems[i].getAttribute('fm_class');
-                                               var field = treeitems[i].getAttribute('fm_field');
-                                               var text = (
-                                                       '|' + hint + '|' + field
-                                               );
-                                       
-                                               if (treeitems[i].getAttribute('fm_virtual') == '1') text += ' * ';
-                                               text += '|\n'
-                                               tb.value += text;
-                                       }
-                                       dump(tb.value + '\n');
-                               }, 0
-                       );
-               }
-
-
-       ]]>
-       </script>
-
-       <vbox flex="1" class="my_overflow">
-               <groupbox orient="vertical" flex="1">
-                       <caption label="Fieldmapper Class Viewer"/>
-                       <hbox>
-                               <button label="Generate paged_tree cols for selected fields" accesskey="G" oncommand="gen_cols();"/>
-                               <button label="Generate string bundle properties for selected fields" accesskey="P" oncommand="gen_properties();"/>
-                               <button label="Generate dokuwiki table for selected fields" accesskey="P" oncommand="gen_wikitable();"/>
-                       </hbox>
-                       <tree id="t" flex="1">
-                               <treecols>
-                                       <treecol id="tcol1" label="opensrf.open-ils.system.fieldmapper" primary="true" flex="0"/>
-                                       <treecol id="tcol2" label="" flex="1"/>
-                               </treecols>
-                               <treechildren id="tc"/>
-                       </tree>
-               </groupbox>
-       </vbox>
-
-</window>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/functional.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/functional.js
deleted file mode 100644 (file)
index 84a74ce..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-dump('entering util/functional.js\n');
-
-if (typeof util == 'undefined') var util = {};
-util.functional = {};
-
-util.functional.EXPORT_OK      = [ 
-       'filter_list', 'filter_object', 'find_list', 'find_object', 'map_list', 'map_flat_list', 
-       'map_object', 'map_object_to_list', 'convert_object_list_to_hash', 'find_id_object_in_list', 
-       'find_attr_object_in_list' 
-];
-util.functional.EXPORT_TAGS    = { ':all' : util.functional.EXPORT_OK };
-
-util.functional.filter_list = function(list,f) {
-       var new_list = [];
-       for (var i in list) {
-               var t = f( list[i] );
-               if (t) new_list.push( list[i] );
-       }
-       return new_list;
-}
-
-util.functional.filter_object = function(obj,f) {
-       var new_obj = {};
-       for (var i in obj) {
-               var t = f( i, obj[i] );
-               if (t) new_obj[i] = obj[i];
-       }
-       return new_obj;
-}
-
-util.functional.find_list = function(list,f) {
-       for (var i in list) {
-               var t = f( list[i] );
-               if (t) return list[i];
-       }
-       return null;
-}
-
-util.functional.find_object = function(obj,f) {
-       for (var i in obj) {
-               var t = f( i, obj[i] );
-               if (t) return obj[i];
-       }
-       return null;
-}
-
-util.functional.map_list = function(list,f) {
-       var new_list = [];
-       for (var i in list) {
-               new_list.push( f( list[i] ) );
-       }
-       return new_list;
-}
-
-util.functional.map_flat_list = function(list,f) {
-       var new_list = [];
-       for (var i in list) {
-               new_list = new_list.concat( f( list[i] ) );
-       }
-       return new_list;
-}
-
-util.functional.map_object = function(obj,f) {
-       var new_obj = {};
-       for (var i in obj) {
-               new_obj[ f( i, obj[i] )[0] ] = f( i, obj[i] )[1];
-       }
-       return new_obj;
-}
-
-util.functional.map_object_to_list = function(obj,f) {
-       var new_list = [];
-       for (var i in obj) {
-               new_list.push( f( obj, i ) );
-       }
-       return new_list;
-}
-
-util.functional.convert_object_list_to_hash = function(list) {
-       var my_hash = new Object();
-       if (list) {
-               for (var i = 0; i < list.length; i++) {
-                       my_hash[ list[i].id() ] = list[i];
-               }
-       }
-       return my_hash;
-}
-
-util.functional.find_id_object_in_list = function(list,id) {
-       if (list) {
-               for (var i = 0; i < list.length; i++ ) {
-                       try {
-                               if ( list[i].id() == id ) {
-                                       return list[i];
-                               }
-                       } catch(E) {
-                               throw(E);
-                       }
-               }
-       }
-       return null;
-}
-
-util.functional.find_attr_object_in_list = function(list,attr,value) {
-       if (list) {
-               for (var i = 0; i < list.length; i++ ) {
-                       try {
-                               var command = 'list[' + i + '].'+attr+'() == ' + value;
-                               if ( eval(command) ) {
-                                       return list[i];
-                               }
-                       } catch(E) {
-                               throw(E);
-                       }
-               }
-       }
-       return null;
-}
-
-dump('exiting util/functional.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/list.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/list.js
deleted file mode 100644 (file)
index 69c3273..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-dump('entering util.list.js\n');
-
-if (typeof main == 'undefined') main = {};
-util.list = function (id) {
-
-       this.node = document.getElementById(id);
-
-       if (!this.node) throw('Could not find element ' + id);
-       switch(this.node.nodeName) {
-               case 'listbox' : 
-               case 'tree' : break;
-               case 'richlistbox' :
-                       throw(this.node.nodeName + ' not yet supported'); break;
-               default: throw(this.node.nodeName + ' not supported'); break;
-       }
-
-       JSAN.use('util.error'); this.error = new util.error();
-
-       return this;
-};
-
-util.list.prototype = {
-
-       'init' : function (params) {
-
-               if (typeof params.map_row_to_column == 'function') this.map_row_to_column = params.map_row_to_column;
-               if (typeof params.retrieve_row == 'function') this.retrieve_row = params.retrieve_row;
-
-               this.prebuilt = false;
-               if (typeof params.prebuilt != 'undefined') this.prebuilt = params.prebuilt;
-
-               if (typeof params.columns == 'undefined') throw('util.list.init: No columns');
-               this.columns = params.columns;
-
-               switch(this.node.nodeName) {
-                       case 'tree' : this._init_tree(params); break;
-                       case 'listbox' : this._init_listbox(params); break;
-                       default: throw('NYI: Need ._init() for ' + this.node.nodeName); break;
-               }
-       },
-
-       '_init_tree' : function (params) {
-               if (this.prebuilt) {
-               
-                       this.treechildren = this.node.lastChild;        
-               
-               } else {
-                       var treecols = document.createElement('treecols');
-                       this.node.appendChild(treecols);
-
-                       for (var i = 0; i < this.columns.length; i++) {
-                               var treecol = document.createElement('treecol');
-                               for (var j in this.columns[i]) {
-                                       treecol.setAttribute(j,this.columns[i][j]);
-                               }
-                               treecols.appendChild(treecol);
-                               var splitter = document.createElement('splitter');
-                               splitter.setAttribute('class','tree-splitter');
-                               treecols.appendChild(splitter);
-                       }
-
-                       var treechildren = document.createElement('treechildren');
-                       this.node.appendChild(treechildren);
-                       this.treechildren = treechildren;
-               }
-               if (typeof params.on_select == 'function') {
-                       this.node.addEventListener(
-                               'select',
-                               params.on_select,
-                               false
-                       );
-               }
-       },
-
-       '_init_listbox' : function (params) {
-               if (this.prebuilt) {
-               } else {
-                       var listhead = document.createElement('listhead');
-                       this.node.appendChild(listhead);
-
-                       var listcols = document.createElement('listcols');
-                       this.node.appendChild(listcols);
-
-                       for (var i = 0; i < this.columns.length; i++) {
-                               var listheader = document.createElement('listheader');
-                               listhead.appendChild(listheader);
-                               var listcol = document.createElement('listcol');
-                               listcols.appendChild(listcol);
-                               for (var j in this.columns[i]) {
-                                       listheader.setAttribute(j,this.columns[i][j]);
-                                       listcol.setAttribute(j,this.columns[i][j]);
-                               };
-                       }
-               }
-       },
-
-       'clear' : function (params) {
-               switch (this.node.nodeName) {
-                       case 'tree' : this._clear_tree(params); break;
-                       case 'listbox' : this._clear_listbox(params); break;
-                       default: throw('NYI: Need .clear() for ' + this.node.nodeName); break;
-               }
-               this.error.sdump('D_LIST','Clearing list ' + this.node.getAttribute('id') + '\n');
-       },
-
-       '_clear_tree' : function(params) {
-               while (this.treechildren.lastChild) this.treechildren.removeChild( this.treechildren.lastChild );
-       },
-
-       '_clear_listbox' : function(params) {
-               var items = [];
-               var nl = this.node.getElementsByTagName('listitem');
-               for (var i = 0; i < nl.length; i++) {
-                       items.push( nl[i] );
-               }
-               for (var i = 0; i < items.length; i++) {
-                       this.node.removeChild(items[i]);
-               }
-       },
-
-       'append' : function (params) {
-               var rnode;
-               switch (this.node.nodeName) {
-                       case 'tree' : rnode = this._append_to_tree(params); break;
-                       case 'listbox' : rnode = this._append_to_listbox(params); break;
-                       default: throw('NYI: Need .append() for ' + this.node.nodeName); break;
-               }
-               if (rnode && params.attributes) {
-                       for (var i in params.attributes) {
-                               rnode.setAttribute(i,params.attributes[i]);
-                       }
-               }
-               return rnode;
-       },
-
-       '_append_to_tree' : function (params) {
-
-               var obj = this;
-
-               if (typeof params.row == 'undefined') throw('util.list.append: Object must contain a row');
-
-               var s = ('util.list.append: params = ' + js2JSON(params) + '\n');
-
-               var treeitem = document.createElement('treeitem');
-               treeitem.setAttribute('retrieve_id',params.retrieve_id);
-               this.treechildren.appendChild( treeitem );
-               var treerow = document.createElement('treerow');
-               treeitem.appendChild( treerow );
-
-               s += ('tree = ' + this.node + '  treechildren = ' + this.treechildren + '\n');
-               s += ('treeitem = ' + treeitem + '  treerow = ' + treerow + '\n');
-
-               if (typeof params.retrieve_row == 'function' || typeof this.retrieve_row == 'function') {
-
-                       setTimeout(
-                               function() {
-                                       treerow.setAttribute('retrieve_id',params.retrieve_id);
-                                       //FIXME//Make async and fire when row is visible in list
-                                       var row;
-
-                                       params.row_node = treeitem;
-                                       params.on_retrieve = function(row) {
-                                               params.row = row;
-                                               obj._map_row_to_treecell(params,treerow);
-                                       }
-
-                                       if (typeof params.retrieve_row == 'function') {
-
-                                               row = params.retrieve_row( params );
-
-                                       } else {
-
-                                               if (typeof obj.retrieve_row == 'function') {
-
-                                                       row = obj.retrieve_row( params );
-
-                                               }
-                                       }
-                               }, 0
-                       );
-               } else {
-                       this._map_row_to_treecell(params,treerow);
-               }
-               this.error.sdump('D_LIST',s);
-
-               return treeitem;
-       },
-
-       '_append_to_listbox' : function (params) {
-
-               var obj = this;
-
-               if (typeof params.row == 'undefined') throw('util.list.append: Object must contain a row');
-
-               var s = ('util.list.append: params = ' + js2JSON(params) + '\n');
-
-               var listitem = document.createElement('listitem');
-
-               s += ('listbox = ' + this.node + '  listitem = ' + listitem + '\n');
-
-               if (typeof params.retrieve_row == 'function' || typeof this.retrieve_row == 'function') {
-
-                       setTimeout(
-                               function() {
-                                       listitem.setAttribute('retrieve_id',params.retrieve_id);
-                                       //FIXME//Make async and fire when row is visible in list
-                                       var row;
-
-                                       params.row_node = listitem;
-                                       params.on_retrieve = function(row) {
-                                               params.row = row;
-                                               obj._map_row_to_listcell(params,listitem);
-                                               obj.node.appendChild( listitem );
-                                       }
-
-                                       if (typeof params.retrieve_row == 'function') {
-
-                                               row = params.retrieve_row( params );
-
-                                       } else {
-
-                                               if (typeof obj.retrieve_row == 'function') {
-
-                                                       row = obj.retrieve_row( params );
-
-                                               }
-                                       }
-                               }, 0
-                       );
-               } else {
-                       this._map_row_to_listcell(params,listitem);
-                       this.node.appendChild( listitem );
-               }
-
-               this.error.sdump('D_LIST',s);
-               return listitem;
-
-       },
-
-       '_map_row_to_treecell' : function(params,treerow) {
-               var s = '';
-               for (var i = 0; i < this.columns.length; i++) {
-                       var treecell = document.createElement('treecell');
-                       var value = '';
-                       if (typeof params.map_row_to_column == 'function')  {
-
-                               label = params.map_row_to_column(params.row,this.columns[i]);
-
-                       } else {
-
-                               if (typeof this.map_row_to_column == 'function') {
-
-                                       label = this.map_row_to_column(params.row,this.columns[i]);
-                               }
-                       }
-                       treecell.setAttribute('label',label);
-                       treerow.appendChild( treecell );
-                       s += ('treecell = ' + treecell + ' with label = ' + label + '\n');
-               }
-               this.error.sdump('D_LIST',s);
-       },
-
-       '_map_row_to_listcell' : function(params,listitem) {
-               var s = '';
-               for (var i = 0; i < this.columns.length; i++) {
-                       var value = '';
-                       if (typeof params.map_row_to_column == 'function')  {
-
-                               value = params.map_row_to_column(params.row,this.columns[i]);
-
-                       } else {
-
-                               if (typeof this.map_row_to_column == 'function') {
-
-                                       value = this.map_row_to_column(params.row,this.columns[i]);
-                               }
-                       }
-                       if (typeof value == 'string' || typeof value == 'number') {
-                               var listcell = document.createElement('listcell');
-                               listcell.setAttribute('label',value);
-                               listitem.appendChild(listcell);
-                               s += ('listcell = ' + listcell + ' with label = ' + value + '\n');
-                       } else {
-                               listitem.appendChild(value);
-                               s += ('listcell = ' + value + ' is really a ' + value.nodeName + '\n');
-                       }
-               }
-               this.error.sdump('D_LIST',s);
-       },
-
-       'retrieve_selection' : function(params) {
-               switch(this.node.nodeName) {
-                       case 'tree' : return this._retrieve_selection_from_tree(params); break;
-                       default: throw('NYI: Need ._retrieve_selection_from_() for ' + this.node.nodeName); break;
-               }
-       },
-
-       '_retrieve_selection_from_tree' : function(params) {
-               var list = [];
-               var start = new Object();
-               var end = new Object();
-               var numRanges = this.node.view.selection.getRangeCount();
-               for (var t=0; t<numRanges; t++){
-                       this.node.view.selection.getRangeAt(t,start,end);
-                       for (var v=start.value; v<=end.value; v++){
-                               var i = this.node.contentView.getItemAtIndex(v);
-                               list.push( i );
-                       }
-               }
-               return list;
-       },
-}
-dump('exiting util.list.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/money.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/money.js
deleted file mode 100644 (file)
index 48b99ef..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-dump('entering util/money.js\n');
-
-if (typeof util == 'undefined') var util = {};
-util.money = {};
-
-util.money.EXPORT_OK   = [ 
-       'dollars_float_to_cents_integer', 'cents_as_dollars'
-];
-util.money.EXPORT_TAGS = { ':all' : util.money.EXPORT_OK };
-
-util.money.dollars_float_to_cents_integer = function( money ) {
-       // careful to avoid fractions of pennies
-       var money_s = money.toString();
-       // FIXME: strip miscellaneous characters
-       var marray = money_s.split(".");
-       var dollars = marray[0];
-       var cents = marray[1];
-       try {
-               if (cents.length < 2) {
-                       cents = cents + '0';
-               }
-       } catch(E) {
-       }
-       try {
-               if (cents.length > 2) {
-                       dump("util.money: We don't round money\n");
-                       cents = cents.substr(0,2);
-               }
-       } catch(E) {
-       }
-       var total = 0;
-       try {
-               if (parseInt(cents)) total += parseInt(cents);
-       } catch(E) {
-       }
-       try {
-               if (parseInt(dollars)) total += (parseInt(dollars) * 100);
-       } catch(E) {
-       }
-       return total;   
-}
-
-util.money.cents_as_dollars = function( cents ) {
-       cents = cents.toString(); 
-       // FIXME: strip miscellaneous characters
-       if (cents.match(/\./)) cents = util.money.dollars_float_to_cents_integer( cents ).toString();
-       try {
-               switch( cents.length ) {
-                       case 0: cents = '000'; break;
-                       case 1: cents = '00' + cents; break;
-               }
-       } catch(E) {
-       }
-       return cents.substr(0,cents.length-2) + '.' + cents.substr(cents.length - 2);
-}
-
-util.money.sanitize = function( money ) {
-       return util.money.cents_as_dollars( util.money.dollars_float_to_cents_integer( money ) );
-}
-
-
-dump('exiting util/money.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/network.js b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/network.js
deleted file mode 100644 (file)
index 024a36e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-dump('entering util/network.js\n');
-
-if (typeof util == 'undefined') util = {};
-util.network = function () {
-
-       JSAN.use('util.error'); this.error = new util.error();
-       // Place a test here for network connectivity
-       // this.offline = true;
-
-       return this;
-};
-
-util.network.prototype = {
-
-       // Flag for whether the staff client should act as if it were offline or not
-       'offline' : false,
-
-       'request' : function (app,name,params,f) {
-
-               try {
-
-                       this.error.sdump('D_SES','=-=-=-=-= user_request("'+app+'","'+name+'",'+js2JSON(params)+')\n');
-                       var request = new RemoteRequest( app, name );
-                       for(var index in params) {
-                               request.addParam(params[index]);
-                       }
-       
-                       if (f)  {
-                               request.setCompleteCallback(f);
-                               request.send(false);
-                               this.error.sdump('D_SES_RESULT','=-=-= result asynced\n');
-                               return null;
-                       } else {
-                               request.send(true);
-                               var result = request.getResultObject();
-                               this.error.sdump('D_SES_RESULT','=-=-= result = ' + js2JSON(result) + '\n');
-                               return result;
-                       }
-
-               } catch(E) {
-                       if (instanceOf(E,perm_ex)) {
-                               alert('permission exception: ' + js2JSON(E));
-                       }
-                       throw(E);
-               }
-       }
-}
-
-/*
-function sample_callback(request) {
-       var result = request.getResultObject();
-}
-*/
-
-dump('exiting util/network.js\n');
diff --git a/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/rbrowser.xul b/Open-ILS/xul/staff_client/chrome/content/OPEN_ILS_STAFF_CLIENT/util/rbrowser.xul
deleted file mode 100644 (file)
index fb16a5b..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Patron Display -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/open_ils_staff_client.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/open_ils_staff_client.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
-
-<window id="util_browser_win" 
-       onload="my_init()"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->