removing all the old web stuff, css, images, templates, etc.
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 21 Aug 2005 19:24:54 +0000 (19:24 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 21 Aug 2005 19:24:54 +0000 (19:24 +0000)
This all lives under Open-ILS/web/opac/* now

git-svn-id: svn://svn.open-ils.org/ILS/trunk@1684 dcc99617-32d9-48b4-a31d-7c20da2025e4

177 files changed:
Open-ILS/css/opac/dtree.css [deleted file]
Open-ILS/css/opac/opac.css [deleted file]
Open-ILS/images/bigpinesLogo.jpg [deleted file]
Open-ILS/images/down_arrow.gif [deleted file]
Open-ILS/images/office_xp_menu_left.png [deleted file]
Open-ILS/images/opac/main_logo.jpg [deleted file]
Open-ILS/images/opac/small_logo.jpg [deleted file]
Open-ILS/images/pics/audio.jpg [deleted file]
Open-ILS/images/pics/audiobook_icon.jpeg [deleted file]
Open-ILS/images/pics/book_icon.jpeg [deleted file]
Open-ILS/images/pics/camera.gif [deleted file]
Open-ILS/images/pics/computer.jpg [deleted file]
Open-ILS/images/pics/map.jpg [deleted file]
Open-ILS/images/pics/movie.jpg [deleted file]
Open-ILS/images/pics/movie_icon.jpg [deleted file]
Open-ILS/images/pics/music_icon.jpg [deleted file]
Open-ILS/images/pics/open_book.gif [deleted file]
Open-ILS/images/pics/speaker.gif [deleted file]
Open-ILS/images/smallpinesLogo.jpg [deleted file]
Open-ILS/images/up_arrow.gif [deleted file]
Open-ILS/images/xtree/I.png [deleted file]
Open-ILS/images/xtree/L.png [deleted file]
Open-ILS/images/xtree/Lminus.png [deleted file]
Open-ILS/images/xtree/Lplus.png [deleted file]
Open-ILS/images/xtree/T.png [deleted file]
Open-ILS/images/xtree/Tminus.png [deleted file]
Open-ILS/images/xtree/Tplus.png [deleted file]
Open-ILS/images/xtree/blank.png [deleted file]
Open-ILS/images/xtree/file.png [deleted file]
Open-ILS/images/xtree/foldericon.png [deleted file]
Open-ILS/images/xtree/new.png [deleted file]
Open-ILS/images/xtree/openfoldericon.png [deleted file]
Open-ILS/src/javascript/lib/js/opac/RemoteRequest.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/added_content.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/config.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/dtree.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/fmgen.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/init.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/mresult.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/opac_utils.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/result_common.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/rresult.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/search_bar.js [deleted file]
Open-ILS/src/javascript/lib/js/opac/sidebar.js [deleted file]
Open-ILS/src/javascript/lib/js/util/CGI.js [deleted file]
Open-ILS/src/javascript/lib/js/util/Cookie.js [deleted file]
Open-ILS/src/javascript/lib/js/util/utils.js [deleted file]
Open-ILS/src/javascript/opac/AboutPage.js [deleted file]
Open-ILS/src/javascript/opac/AbstractRecordResultPage.js [deleted file]
Open-ILS/src/javascript/opac/AdvancedSearchPage.js [deleted file]
Open-ILS/src/javascript/opac/GlobalInit.js [deleted file]
Open-ILS/src/javascript/opac/HTMLChunks.js [deleted file]
Open-ILS/src/javascript/opac/HoldsWindow.js [deleted file]
Open-ILS/src/javascript/opac/LocationTree.js [deleted file]
Open-ILS/src/javascript/opac/LoginDialog.js [deleted file]
Open-ILS/src/javascript/opac/LoginPage.js [deleted file]
Open-ILS/src/javascript/opac/LogoutPage.js [deleted file]
Open-ILS/src/javascript/opac/MRResultPage.js [deleted file]
Open-ILS/src/javascript/opac/MyOPACPage.js [deleted file]
Open-ILS/src/javascript/opac/MyOPACSPage.js [deleted file]
Open-ILS/src/javascript/opac/OPACStartPage.js [deleted file]
Open-ILS/src/javascript/opac/Page.js [deleted file]
Open-ILS/src/javascript/opac/RecordDetailPage.js [deleted file]
Open-ILS/src/javascript/opac/RecordResultPage.js [deleted file]
Open-ILS/src/javascript/opac/SearchBarChunk.js [deleted file]
Open-ILS/src/javascript/opac/SearchBarFormChunk.js [deleted file]
Open-ILS/src/javascript/opac/XULEvents.js [deleted file]
Open-ILS/src/javascript/util/Cookie.js [deleted file]
Open-ILS/src/javascript/util/RemoteRequest.js [deleted file]
Open-ILS/src/javascript/util/UserSession.js [deleted file]
Open-ILS/src/javascript/util/browser.js [deleted file]
Open-ILS/src/javascript/util/ex.js [deleted file]
Open-ILS/src/javascript/util/ils_utils.js [deleted file]
Open-ILS/src/javascript/util/webutils.js [deleted file]
Open-ILS/src/javascript/widgets/Box.js [deleted file]
Open-ILS/src/javascript/widgets/ListBox.js [deleted file]
Open-ILS/src/javascript/widgets/PopupBox.js [deleted file]
Open-ILS/src/javascript/widgets/ProgressBar.js [deleted file]
Open-ILS/src/javascript/widgets/SideBar.js [deleted file]
Open-ILS/src/javascript/widgets/Survey.js [deleted file]
Open-ILS/src/javascript/widgets/menu/ContextMenu.js [deleted file]
Open-ILS/src/javascript/widgets/menu/ContextMenuManager.js [deleted file]
Open-ILS/src/javascript/widgets/xtree.js [deleted file]
Open-ILS/src/templates/html/anchor [deleted file]
Open-ILS/src/templates/html/bar [deleted file]
Open-ILS/src/templates/html/body [deleted file]
Open-ILS/src/templates/html/bold [deleted file]
Open-ILS/src/templates/html/box [deleted file]
Open-ILS/src/templates/html/buffer [deleted file]
Open-ILS/src/templates/html/button [deleted file]
Open-ILS/src/templates/html/cell [deleted file]
Open-ILS/src/templates/html/center [deleted file]
Open-ILS/src/templates/html/col [deleted file]
Open-ILS/src/templates/html/concat [deleted file]
Open-ILS/src/templates/html/config [deleted file]
Open-ILS/src/templates/html/div [deleted file]
Open-ILS/src/templates/html/edge [deleted file]
Open-ILS/src/templates/html/edgebar [deleted file]
Open-ILS/src/templates/html/edgebox [deleted file]
Open-ILS/src/templates/html/footer [deleted file]
Open-ILS/src/templates/html/form [deleted file]
Open-ILS/src/templates/html/h [deleted file]
Open-ILS/src/templates/html/head [deleted file]
Open-ILS/src/templates/html/header [deleted file]
Open-ILS/src/templates/html/hr [deleted file]
Open-ILS/src/templates/html/html [deleted file]
Open-ILS/src/templates/html/html3.2 [deleted file]
Open-ILS/src/templates/html/iframe [deleted file]
Open-ILS/src/templates/html/img [deleted file]
Open-ILS/src/templates/html/indent [deleted file]
Open-ILS/src/templates/html/input [deleted file]
Open-ILS/src/templates/html/item [deleted file]
Open-ILS/src/templates/html/js [deleted file]
Open-ILS/src/templates/html/link [deleted file]
Open-ILS/src/templates/html/list [deleted file]
Open-ILS/src/templates/html/menu [deleted file]
Open-ILS/src/templates/html/menubar [deleted file]
Open-ILS/src/templates/html/option [deleted file]
Open-ILS/src/templates/html/page [deleted file]
Open-ILS/src/templates/html/rgb [deleted file]
Open-ILS/src/templates/html/row [deleted file]
Open-ILS/src/templates/html/select [deleted file]
Open-ILS/src/templates/html/space [deleted file]
Open-ILS/src/templates/html/span [deleted file]
Open-ILS/src/templates/html/table [deleted file]
Open-ILS/src/templates/html/thead [deleted file]
Open-ILS/src/templates/opac/conf/config.ttk [deleted file]
Open-ILS/src/templates/opac/conf/textmap_en_us.ttk [deleted file]
Open-ILS/src/templates/opac/logic/child_init.ttk [deleted file]
Open-ILS/src/templates/opac/logic/fastjs.ttk [deleted file]
Open-ILS/src/templates/opac/logic/page_init.ttk [deleted file]
Open-ILS/src/templates/opac/logic/page_router.ttk [deleted file]
Open-ILS/src/templates/opac/pages/about.ttk [deleted file]
Open-ILS/src/templates/opac/pages/advanced_search.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/adv_global_search.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/adv_location.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/adv_mixed_search.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/adv_refined_keyword.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/body_header.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/cgi_js_params.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/css_includes.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/css_js_includes.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/init.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/javascript.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/next_prev_box.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/opac_search_bar.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/org_tree.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/search_bar_form.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/sidebar.ttk [deleted file]
Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk [deleted file]
Open-ILS/src/templates/opac/pages/error.ttk [deleted file]
Open-ILS/src/templates/opac/pages/login.ttk [deleted file]
Open-ILS/src/templates/opac/pages/logout.ttk [deleted file]
Open-ILS/src/templates/opac/pages/main.ttk [deleted file]
Open-ILS/src/templates/opac/pages/my_opac.ttk [deleted file]
Open-ILS/src/templates/opac/pages/my_opac_secure.ttk [deleted file]
Open-ILS/src/templates/opac/pages/opac_start.ttk [deleted file]
Open-ILS/src/templates/opac/pages/record_detail.ttk [deleted file]
Open-ILS/src/templates/opac/pages/record_result.ttk [deleted file]
Open-ILS/src/webxml/advanced.xml [deleted file]
Open-ILS/src/webxml/altcanvas.xml [deleted file]
Open-ILS/src/webxml/css_common.xml [deleted file]
Open-ILS/src/webxml/header.xml [deleted file]
Open-ILS/src/webxml/index.xml [deleted file]
Open-ILS/src/webxml/js_common.xml [deleted file]
Open-ILS/src/webxml/locale/en-US/lang.dtd [deleted file]
Open-ILS/src/webxml/login.xml [deleted file]
Open-ILS/src/webxml/logo.xml [deleted file]
Open-ILS/src/webxml/mresult.xml [deleted file]
Open-ILS/src/webxml/myopac/index.xml [deleted file]
Open-ILS/src/webxml/rdetail.xml [deleted file]
Open-ILS/src/webxml/result_common.xml [deleted file]
Open-ILS/src/webxml/result_table.xml [deleted file]
Open-ILS/src/webxml/rresult.xml [deleted file]
Open-ILS/src/webxml/searchbar.xml [deleted file]
Open-ILS/src/webxml/sidebar.xml [deleted file]
Open-ILS/src/webxml/webprefs.xml [deleted file]

diff --git a/Open-ILS/css/opac/dtree.css b/Open-ILS/css/opac/dtree.css
deleted file mode 100644 (file)
index b201c2f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*--------------------------------------------------|
-| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
-|---------------------------------------------------|
-| Copyright (c) 2002-2003 Geir Landrö               |
-|--------------------------------------------------*/
-
-.dtree {
-       font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
-       font-size: 11px;
-       color: #666;
-       white-space: nowrap;
-}
-.dtree img {
-       border: 0px;
-       vertical-align: middle;
-}
-.dtree a {
-       color: #333;
-       text-decoration: none;
-}
-.dtree a.node, .dtree a.nodeSel {
-       white-space: nowrap;
-       padding: 1px 2px 1px 2px;
-}
-.dtree a.node:hover, .dtree a.nodeSel:hover {
-       color: #333;
-       text-decoration: underline;
-}
-.dtree a.nodeSel {
-       background-color: #c0d2ec;
-}
-.dtree .clip {
-       overflow: hidden;
-}
\ No newline at end of file
diff --git a/Open-ILS/css/opac/opac.css b/Open-ILS/css/opac/opac.css
deleted file mode 100644 (file)
index 27e5709..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-body                           { font-family: Helvetica, Arial, Tahoma, sans-serif; font-size: 75%; } 
-body a                 { color: black; }
-body a:visited { color: black; }
-body a:hover   { color: red; text-decoration: underline;}
-body table             { font-size: inherit; }
-* { -moz-user-select : normal };
-
-
-.main_header   { width: 100%; }
-.space                 { padding-right:5px; }
-.vert_space            { padding-top: 82px; width: 100%;}
-.right                 { position:absolute; right: 0px; }
-.hide_me                       {display:none; visibility: hidden;}
-.show_me                       {display:block; visibility: visible;}
-.show_me_inline        {display:inline; visibility: visible;}
-
-/* Our color scheme */
-
-.color_1 { background: #A7EA9D; color: #000000; }
-.color_2 { background: #64EA4F; color: #000000; }
-.color_3 { background: #D8B4BE; color: #000000; }
-
-/* ---------------------------------------------------------------------- */
-.canvas { float:right; width: 80%; text-align: left;}
-#loading_div { width: 100%;}
-
-.logo { height: 80px; width: 200px; position: absolute; top: 0px; left: 0px; }
-
-.org_tree { height: 500px; padding-left: 2px; padding-right: 2px;
-                                  overflow:-moz-scrollbars-vertical; overflow-y:scroll; overflow-x:hidden; }            
-
-.org_link { font-size: 92%; padding-right: 15px; }
-#org_link_container { margin-bottom: 5px; padding-left: 4px; padding-bottom: 3px; padding-top: 3px; width 100%; }
-
-/* ---------------------------------------------------------------------- */
-.sidebar_div { float: left; width: 19%; }
-.side_bar_item { padding-left: 15px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px; }
-.sidebar_chunk {border-right: 1px solid lightgrey; margin-bottom: 2px;}
-.sidebar_extra_item { font-size: 95%; padding: 2px; }
-.sidebar_extra_link { text-decoration: none; }
-.sidebar_header { margin-top: 10px; padding-left: 3px; }
-
-/* ---------------------------------------------------------------------- */
-#searchbar { position: absolute; text-align: right; top: 2px; right: 3px; }
-
-#searchbar_tag_on { color: red; }
-
-.searchbar_item { text-align: center; color: black; padding: 3px; } 
-
-.searchbar_tag { font-size: 90%; text-align: right;  
-       padding-left: 5px; padding-right: 5px; padding-bottom: 3px; } 
-
-#searchbar_main { text-align: right; 
-       padding-top: 2px; padding-bottom: 3px; padding-right: 2px; padding-left: 3px; }
-
-.searchbar_extra_td { padding-top: 10px; }
-#searchbar_table { border-collapse: collapse; }
-
-/* ---------------------------------------------------------------------- */
-#login_box { border-top: 1px solid #808080; 
-       border-bottom: 1px solid #808080; width: 60%; padding: 5px;}
-
-.login_text { margin-left: 8px; }
-
-/* ---------------------------------------------------------------------- */
-#result_table_div { text-align: left; width: 100%; }
-
-#search_nav_links { width: 100%; }
-#result_info_box { text-align: left; }
-#next_prev_links { text-align: right; padding-left: 2px; padding-right: 2px;}
-#goto_page_links { text-align: left; padding-left: 2px; padding-right: 2px;}
-
-#offset_start { font-weight: 600; }
-#offset_end { font-weight: 600; }
-#result_count { font-weight: 600; } 
-
-#next_prev_links_dead { color: #808080; text-decoration: 
-       none;padding-left: 5px; padding-right: 5px; color: #808080;}
-
-.nav_link_active { text-decoration: underline; font-weight: 600;}
-
-#res_table { width: 100%; }
-
-.search_link { text-decoration: none; }
-
-.result_table_pic_cell { width: 43px;}
-.result_table_pic { height: 50px; width: 40px; }
-.result_table_pic_header { width: 43px; }
-
-.result_table_row { text-align: left; }
-.result_table_subtable { width: 100%; border-top: 1px solid #E0E0E0; border-collapse: collapse;}
-.result_table_subtbody { height: 100%; width: 100%; }
-.result_table_title_cell { text-align: left; }
-
-.copy_count_cell { font-size: 80%; width: 8%; text-align: center; padding: 0px; margin: 0px;}
-.copy_count_cell_even { border: 1px solid #E0E0E0; }
-
-.search_page_nav_link { margin-right: 5px; }
-
-/* ---------------------------------------------------------------------- */
-
-
diff --git a/Open-ILS/images/bigpinesLogo.jpg b/Open-ILS/images/bigpinesLogo.jpg
deleted file mode 100644 (file)
index 7b77a0a..0000000
Binary files a/Open-ILS/images/bigpinesLogo.jpg and /dev/null differ
diff --git a/Open-ILS/images/down_arrow.gif b/Open-ILS/images/down_arrow.gif
deleted file mode 100644 (file)
index 0aa49e9..0000000
Binary files a/Open-ILS/images/down_arrow.gif and /dev/null differ
diff --git a/Open-ILS/images/office_xp_menu_left.png b/Open-ILS/images/office_xp_menu_left.png
deleted file mode 100644 (file)
index 185c8df..0000000
Binary files a/Open-ILS/images/office_xp_menu_left.png and /dev/null differ
diff --git a/Open-ILS/images/opac/main_logo.jpg b/Open-ILS/images/opac/main_logo.jpg
deleted file mode 100644 (file)
index 7b77a0a..0000000
Binary files a/Open-ILS/images/opac/main_logo.jpg and /dev/null differ
diff --git a/Open-ILS/images/opac/small_logo.jpg b/Open-ILS/images/opac/small_logo.jpg
deleted file mode 100644 (file)
index 8cf76e2..0000000
Binary files a/Open-ILS/images/opac/small_logo.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/audio.jpg b/Open-ILS/images/pics/audio.jpg
deleted file mode 100644 (file)
index 8e480ee..0000000
Binary files a/Open-ILS/images/pics/audio.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/audiobook_icon.jpeg b/Open-ILS/images/pics/audiobook_icon.jpeg
deleted file mode 100644 (file)
index ff5192d..0000000
Binary files a/Open-ILS/images/pics/audiobook_icon.jpeg and /dev/null differ
diff --git a/Open-ILS/images/pics/book_icon.jpeg b/Open-ILS/images/pics/book_icon.jpeg
deleted file mode 100644 (file)
index 4ee34ba..0000000
Binary files a/Open-ILS/images/pics/book_icon.jpeg and /dev/null differ
diff --git a/Open-ILS/images/pics/camera.gif b/Open-ILS/images/pics/camera.gif
deleted file mode 100644 (file)
index 77f6171..0000000
Binary files a/Open-ILS/images/pics/camera.gif and /dev/null differ
diff --git a/Open-ILS/images/pics/computer.jpg b/Open-ILS/images/pics/computer.jpg
deleted file mode 100644 (file)
index 7e34ec6..0000000
Binary files a/Open-ILS/images/pics/computer.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/map.jpg b/Open-ILS/images/pics/map.jpg
deleted file mode 100644 (file)
index 5bbeacc..0000000
Binary files a/Open-ILS/images/pics/map.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/movie.jpg b/Open-ILS/images/pics/movie.jpg
deleted file mode 100644 (file)
index a339a24..0000000
Binary files a/Open-ILS/images/pics/movie.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/movie_icon.jpg b/Open-ILS/images/pics/movie_icon.jpg
deleted file mode 100644 (file)
index 5c8ec5a..0000000
Binary files a/Open-ILS/images/pics/movie_icon.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/music_icon.jpg b/Open-ILS/images/pics/music_icon.jpg
deleted file mode 100644 (file)
index 4110c68..0000000
Binary files a/Open-ILS/images/pics/music_icon.jpg and /dev/null differ
diff --git a/Open-ILS/images/pics/open_book.gif b/Open-ILS/images/pics/open_book.gif
deleted file mode 100644 (file)
index bac8c57..0000000
Binary files a/Open-ILS/images/pics/open_book.gif and /dev/null differ
diff --git a/Open-ILS/images/pics/speaker.gif b/Open-ILS/images/pics/speaker.gif
deleted file mode 100644 (file)
index fd2232c..0000000
Binary files a/Open-ILS/images/pics/speaker.gif and /dev/null differ
diff --git a/Open-ILS/images/smallpinesLogo.jpg b/Open-ILS/images/smallpinesLogo.jpg
deleted file mode 100644 (file)
index 8cf76e2..0000000
Binary files a/Open-ILS/images/smallpinesLogo.jpg and /dev/null differ
diff --git a/Open-ILS/images/up_arrow.gif b/Open-ILS/images/up_arrow.gif
deleted file mode 100644 (file)
index a952640..0000000
Binary files a/Open-ILS/images/up_arrow.gif and /dev/null differ
diff --git a/Open-ILS/images/xtree/I.png b/Open-ILS/images/xtree/I.png
deleted file mode 100644 (file)
index 3cfc848..0000000
Binary files a/Open-ILS/images/xtree/I.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/L.png b/Open-ILS/images/xtree/L.png
deleted file mode 100644 (file)
index 970c84d..0000000
Binary files a/Open-ILS/images/xtree/L.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/Lminus.png b/Open-ILS/images/xtree/Lminus.png
deleted file mode 100644 (file)
index b389be7..0000000
Binary files a/Open-ILS/images/xtree/Lminus.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/Lplus.png b/Open-ILS/images/xtree/Lplus.png
deleted file mode 100644 (file)
index 1cadc42..0000000
Binary files a/Open-ILS/images/xtree/Lplus.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/T.png b/Open-ILS/images/xtree/T.png
deleted file mode 100644 (file)
index d7762e5..0000000
Binary files a/Open-ILS/images/xtree/T.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/Tminus.png b/Open-ILS/images/xtree/Tminus.png
deleted file mode 100644 (file)
index 3ec1e5a..0000000
Binary files a/Open-ILS/images/xtree/Tminus.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/Tplus.png b/Open-ILS/images/xtree/Tplus.png
deleted file mode 100644 (file)
index 2980d9e..0000000
Binary files a/Open-ILS/images/xtree/Tplus.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/blank.png b/Open-ILS/images/xtree/blank.png
deleted file mode 100644 (file)
index 99ebc57..0000000
Binary files a/Open-ILS/images/xtree/blank.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/file.png b/Open-ILS/images/xtree/file.png
deleted file mode 100644 (file)
index 601457f..0000000
Binary files a/Open-ILS/images/xtree/file.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/foldericon.png b/Open-ILS/images/xtree/foldericon.png
deleted file mode 100644 (file)
index fc076a1..0000000
Binary files a/Open-ILS/images/xtree/foldericon.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/new.png b/Open-ILS/images/xtree/new.png
deleted file mode 100644 (file)
index 601457f..0000000
Binary files a/Open-ILS/images/xtree/new.png and /dev/null differ
diff --git a/Open-ILS/images/xtree/openfoldericon.png b/Open-ILS/images/xtree/openfoldericon.png
deleted file mode 100644 (file)
index b7920f4..0000000
Binary files a/Open-ILS/images/xtree/openfoldericon.png and /dev/null differ
diff --git a/Open-ILS/src/javascript/lib/js/opac/RemoteRequest.js b/Open-ILS/src/javascript/lib/js/opac/RemoteRequest.js
deleted file mode 100644 (file)
index e7fff24..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-var XML_HTTP_GATEWAY = "gateway";
-var XML_HTTP_SERVER = "gapines.org";
-var XML_HTTP_MAX_TRIES = 3;
-
-var _allrequests = {};
-
-function cleanRemoteRequests() {
-       for( var i in _allrequests ) 
-               destroyRequest(_allrequests[i]);
-}
-
-function destroyRequest(r) {
-       if(r == null) return;
-       r.xmlhttp.onreadystatechange = function(){};
-       r.xmlhttp                               = null;
-       r.callback                              = null;
-       r.userdata                              = null;
-       _allrequests[r.id]      = null;
-}
-
-/* ----------------------------------------------------------------------- */
-/* Request object */
-function RemoteRequest( service, method ) {
-
-
-       this.service    = service;
-       this.method             = method;
-       this.xmlhttp    = false;
-       this.name               = null;
-       this.sendCount = 0;
-
-       this.type               = "POST"; /* default */
-       this.id                 = service + method + Math.random();
-       this.cancelled = false;
-
-       _allrequests[this.id] = this;
-
-       var i = 2;
-       this.params = ""; 
-
-       while(i < arguments.length) {
-               var object = js2JSON(arguments[i++]);
-               this.params += "&param=" + encodeURIComponent(object);
-       }
-
-       if(!this.params) { this.params = ""; }
-       this.param_string = "service=" + service + "&method=" + method + this.params;
-       if( this.buildXMLRequest() == null ) alert("Browser is not supported!");
-}
-
-/* constructs our XMLHTTPRequest object */
-RemoteRequest.prototype.buildXMLRequest = function() {
-
-       var x;
-       try { 
-               x = new ActiveXObject("Msxml2.XMLHTTP"); 
-       } catch (e) {
-               try { 
-                       x = new ActiveXObject("Microsoft.XMLHTTP"); 
-               } catch (E) {
-                       x = false;
-               }
-       }
-
-       if (!x && typeof XMLHttpRequest!='undefined') x = new XMLHttpRequest();
-
-       if(!x) {
-               alert("NEEDS NEWER JAVASCRIPT for XMLHTTPRequest()");
-               return null;
-       }
-
-       this.xmlhttp = x;
-       return true;
-}
-
-
-function _remoteRequestCallback(id) {
-
-       var object = _allrequests[id];
-       if(object.cancelled) return;
-
-       if( object.xmlhttp.readyState == 4 ) {
-               try {
-                       object.callback(object);
-               } catch(E) {
-
-                       /* if we receive a communication error, retry the request up
-                               to XML_HTTP_MAX_TRIES attempts */
-                       if( instanceOf(E, EXCommunication) ) {
-
-                               if(object.sendCount >= XML_HTTP_MAX_TRIES ) {
-                                       if(isXUL()) throw object;
-                                        else alert("Arrrgghh, Matey! Error communicating:\n" + E  + "\n" + object.param_string);
-                               } else {
-                                       object.buildXMLRequest();
-                                       object.send();
-                                       return;
-                               }
-                       } else { throw E; }
-
-               } finally { 
-                       destroyRequest(object); 
-                       object = null; 
-               }  
-       }
-}
-
-
-/* define the callback we use when this request has received
-       all of its data */
-RemoteRequest.prototype.setCompleteCallback = function(callback) {
-       if(this.cancelled) return;
-       this.callback = callback;
-       var id = this.id;
-       this.xmlhttp.onreadystatechange = function() { _remoteRequestCallback(id); }
-}
-
-
-/* http by default.  This makes it https. *ONLY works when
-       embedded in a XUL app. */
-RemoteRequest.prototype.setSecure = function(bool) {
-       this.secure = bool; 
-}
-
-RemoteRequest.prototype.send = function(blocking) {
-
-       if(this.cancelled) return;
-
-       /* determine the xmlhttp server dynamically */
-       var url = location.protocol + "//" + location.host + "/" + XML_HTTP_GATEWAY;
-
-       if(isXUL()) {
-               if(this.secure)
-                       url =   "https://" + XML_HTTP_SERVER + "/" + XML_HTTP_GATEWAY;
-               else
-                       url =   "http://" + XML_HTTP_SERVER + "/" + XML_HTTP_GATEWAY;
-       }
-
-       var data = null;
-
-       if( this.type == 'GET' ) { 
-               url +=  "?" + this.param_string; 
-       }
-
-       if(blocking) {
-               this.xmlhttp.open(this.type, url, false);
-       } else {
-               this.xmlhttp.open(this.type, url, true);
-       }
-
-
-       if( this.type == 'POST' ) {
-               data = this.param_string;
-               this.xmlhttp.setRequestHeader('Content-Type',
-                               'application/x-www-form-urlencoded');
-       }
-
-       this.xmlhttp.send( data );
-       this.sendCount += 1;
-       return this;
-}
-
-/* returns the actual response text from the request */
-RemoteRequest.prototype.getText = function() {
-       return this.xmlhttp.responseText;
-}
-
-RemoteRequest.prototype.isReady = function() {
-       return this.xmlhttp.readyState == 4;
-}
-
-
-/* returns the JSON->js result object  */
-RemoteRequest.prototype.getResultObject = function() {
-       if(this.cancelled) return null;
-
-       var text = this.xmlhttp.responseText;
-       var obj = JSON2js(text);
-
-       if(obj == null) return null;
-       if(obj.is_err)  throw new EXCommunication(obj.err_msg); 
-       if( obj[0] != null && obj[1] == null ) obj = obj[0];
-
-       /* these are user level exceptions from the server code */
-       if(instanceOf(obj, ex)) {
-               if(!isXUL()) alert(obj.err_msg());
-               throw obj;
-       }
-
-       if(instanceOf(obj, perm_ex)) {
-               /* the opac will go ahead and spit out the error msg */
-               if(!isXUL()) alert(obj.err_msg());
-               throw obj;
-       }
-
-       return obj;
-}
-
-/* adds a new parameter to the request */
-RemoteRequest.prototype.addParam = function(param) {
-       var string = encodeURIComponent(js2JSON(param));
-       this.param_string += "&param=" + string;
-}
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/added_content.js b/Open-ILS/src/javascript/lib/js/opac/added_content.js
deleted file mode 100644 (file)
index 38c0cdb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-function buildISBNSrc(isbn) {
-       return "http://www.thecontentserver.com/bin/cntsvr.dll?GetImage&SysID=Content&CustID=Cafe&Return=1&Type=S&Key=" + isbn ;
-}      
diff --git a/Open-ILS/src/javascript/lib/js/opac/config.js b/Open-ILS/src/javascript/lib/js/opac/config.js
deleted file mode 100644 (file)
index 70d72c4..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Export some constants  ----------------------------------------------------- */
-
-/* URL params */
-var PARAM_TERM                                 = "term";               /* search term */
-var PARAM_STYPE                                = "stype";              /* search type */
-var PARAM_LOCATION                     = "location"    /* current location */;
-var PARAM_DEPTH                                = "depth";              /* search depth */
-var PARAM_FORM                                 = "format";             /* search format */
-var PARAM_OFFSET                               = "offset";             /* search offset */
-var PARAM_COUNT                                = "count";              /* hits per page */
-var PARAM_HITCOUNT                     = "hitcount";   /* hits per page */
-var PARAM_RANKS                                = "hitcount";   /* hits per page */
-var PARAM_MRID                                 = "mrid";               /* metarecord id */
-var PARAM_RID                                  = "rid";                        /* metarecord id */
-
-/* cookies */
-var COOKIE_SB = "sbe";
-var COOKIE_SES = "ses";
-var COOKIE_IDS = "ids";
-
-/* these are the actual param values - set on page load */
-
-/* pages */
-var MRESULT            = "mresult";
-var RRESULT            = "rresult";
-var RDETAIL            = "rdetail";
-var MYOPAC             = "myopac";
-var ADVANCED   = "advanced";
-var HOME                       = "home";
-
-/* search type (STYPE) options */
-STYPE_AUTHOR   = "author";
-STYPE_TITLE            = "title";
-STYPE_SUBJECT  = "subject";
-STYPE_SERIES   = "series";
-STYPE_KEYWORD  = "keyword";
-
-
-/* container for global variables shared accross pages */
-var G          = {};
-G.user = null; /* global user object */
-G.ui           = {} /* cache of UI components */
-
-
-/* call me after page init and I will load references 
-       to all of the ui object id's defined below 
-       They will be stored in G.ui.<page>.<thingy>
- */
-function loadUIObjects() {
-       for( var p in config.ids ) {
-               G.ui[p] = {};
-               for( var o in config.ids[p] ) 
-                       G.ui[p][o] = getId(config.ids[p][o]);
-       }
-}
-
-/* try our best to free memory */
-function clearUIObjects() {
-       for( var p in config.ids ) {
-               for( var o in config.ids[p] ) {
-                       if(G.ui[p][o]) {
-                               G.ui[p][o].onclick = null;
-                               G.ui[p][o].onkeydown = null;
-                               G.ui[p][o] = null;
-                       }
-               }
-               G.ui[p] = null;
-       }
-}
-
-
-/* ---------------------------------------------------------------------------- */
-/* Set up ID's and CSS classes */
-/* ---------------------------------------------------------------------------- */
-
-var config = {};
-config.text = {};
-config.ids = {};
-config.names = {};
-
-config.ids.common = {};
-config.ids.common.loading              = "loading_div";                
-config.ids.common.canvas               = "canvas";                             
-config.ids.common.canvas_main  = "canvas_main";                
-config.ids.common.org_tree             = "org_tree";                   
-config.ids.common.org_container        = "org_container";
-
-config.css = {};
-config.css.hide_me = "hide_me";
-config.css.color_1 = "color_1";
-config.css.color_2 = "color_2";
-config.css.color_3 = "color_3";
-
-config.page = {};
-config.page[HOME]                      = "/webxml/index.xml";
-config.page[ADVANCED]  = "/webxml/advanced.xml";
-config.page[MRESULT]           = "/webxml/mresult.xml";
-config.page[RRESULT]           = "/webxml/rresult.xml";
-config.page[MYOPAC]            = "/webxml/myopac/index.xml";
-config.page[RDETAIL]           = "/webxml/rdetail.xml";
-
-/* mresult */
-config.ids.mresult = {};
-
-/* result */
-config.ids.result = {};
-config.css.result = {};
-config.names.result = {};
-config.ids.result.offset_start = "offset_start";
-config.ids.result.offset_end           = "offset_end";
-config.ids.result.result_count = "result_count";
-config.ids.result.next_link            = 'next_link';
-config.ids.result.prev_link            = 'prev_link';
-config.ids.result.home_link            = 'home_link';
-config.ids.result.end_link                     = 'end_link';
-config.ids.result.main_table           = 'result_table';
-config.ids.result.row_template = 'result_table_template';
-config.ids.result.num_pages            = 'num_pages';
-config.ids.result.current_page = 'current_page';
-config.css.result.nav_active           = "nav_link_active";
-config.ids.result.top_div                      = "result_table_div";
-config.ids.result.nav_links            = "search_nav_links";
-config.ids.result.info                         = "result_info_div";
-config.css.result.cc_cell_even = "copy_count_cell_even";
-
-config.names.result.item_jacket        = "item_jacket";
-config.names.result.item_title = "item_title";
-config.names.result.item_author        = "item_author";
-config.names.result.counts_row = "counts_row";
-config.names.result.count_cell = "copy_count_cell";
-
-/* login page */
-config.ids.login = {};
-config.css.login = {};
-config.ids.login.box                   = "login_box";
-config.ids.login.username      = "login_username";
-config.ids.login.password      = "login_password";
-config.ids.login.button                = "login_button";
-config.ids.login.cancel                = "login_cancel_button";
-
-
-/* searchbar ids and css */
-config.ids.searchbar = {};
-config.css.searchbar = {};
-config.ids.searchbar.text                              = 'search_box'; 
-config.ids.searchbar.submit                    = 'search_submit';      
-config.ids.searchbar.type_selector     = 'search_type_selector';
-config.ids.searchbar.depth_selector    = 'depth_selector';
-config.ids.searchbar.form_selector     = 'form_selector';
-config.ids.searchbar.extra_row         = 'searchbar_extra';
-config.ids.searchbar.main_row                  = 'searchbar_main_row';
-config.ids.searchbar.table                             = 'searchbar_table';
-config.ids.searchbar.tag                               = 'search_tag_link';
-config.ids.searchbar.tag_on                    = 'searchbar_tag_on';
-config.ids.searchbar.tag_off                   = 'searchbar_tag_off';
-config.ids.searchbar.location_tag      = 'search_location_tag_link';
-
-
-/*  sidebar */
-config.ids.sidebar = {};
-config.css.sidebar = {};
-config.names.sidebar = {};
-config.css.sidebar.item = {};
-config.ids.sidebar.home                                = 'home_link_div';
-config.ids.sidebar.advanced            = 'advanced_link_div';
-config.ids.sidebar.myopac                      = 'myopac_link_div';
-config.ids.sidebar.prefs                       = 'prefs_link_div';
-config.ids.sidebar.mresult                     = 'mresult_link_div';
-config.ids.sidebar.rresult                     = 'result_link_div';
-config.ids.sidebar.login                       = 'login_link';
-config.ids.sidebar.logout                      = 'logout_link';
-config.ids.sidebar.logoutbox           = 'logout_link_div';
-config.ids.sidebar.loginbox            = 'login_link_div';
-config.ids.sidebar.logged_in_as        = 'logged_in_as_div';
-config.ids.sidebar.username_dest       = 'username_dest';
-config.ids.sidebar.subject                     = 'subject_sidebar';
-config.ids.sidebar.subject_item        = 'subject_item';
-config.ids.sidebar.author                      = 'author_sidebar';
-config.ids.sidebar.author_item = 'author_item';
-config.ids.sidebar.series                      = 'series_sidebar';
-config.ids.sidebar.series_item = 'series_item';
-
-config.names.sidebar.subject_item      = 'subject_item';
-config.names.sidebar.author_item       = 'author_item';
-config.names.sidebar.series_item       = 'series_item';
-
-
-
-/* ---------------------------------------------------------------------------- */
-/* These are pages that may replace the canvas */
-/* ---------------------------------------------------------------------------- */
-config.ids.altcanvas = {};
-config.ids.altcanvas.login             = config.ids.login.box;
-config.ids.altcanvas.org_tree   = config.ids.common.org_container;
-
-
-
-/* ---------------------------------------------------------------------------- */
-/* Methods are defined as service:method 
-       An optional 3rd component is when a method is followed by a :1, such methods
-       have a staff counterpart and should have ".staff" appended to the method 
-       before the method is called when in XUL mode */
-
-var FETCH_MRCOUNT                              = "open-ils.search:open-ils.search.biblio.class.count:1";
-var FETCH_MRIDS                                = "open-ils.search:open-ils.search.biblio.class:1";
-var FETCH_MRIDS_FULL                   = "open-ils.search:open-ils.search.biblio.class.full:1";
-var FETCH_MRMODS                               = "open-ils.search:open-ils.search.biblio.metarecord.mods_slim.retrieve";
-var FETCH_MR_COPY_COUNTS       = "open-ils.search:open-ils.search.biblio.metarecord.copy_count:1";
-var FETCH_RIDS                                 = "open-ils.search:open-ils.search.biblio.metarecord_to_records:1";
-var FETCH_RMODS                                = "open-ils.search:open-ils.search.biblio.record.mods_slim.retrieve";
-var FETCH_R_COPY_COUNTS                = "open-ils.search:open-ils.search.biblio.record.copy_count";
-var FETCH_FLESHED_USER         = "open-ils.actor:open-ils.actor.user.fleshed.retrieve";
-var FETCH_SESSION                              = "open-ils.auth:open-ils.auth.session.retrieve";
-var LOGIN_INIT                                 = "open-ils.auth:open-ils.auth.authenticate.init";
-var LOGIN_COMPLETE                     = "open-ils.auth:open-ils.auth.authenticate.complete";
-var LOGIN_DELETE                               = "open-ils.auth:open-ils.auth.session.delete";
-/* ---------------------------------------------------------------------------- */
-
-
-
-/* ---------------------------------------------------------------------------- */
-/* event callback functions. Other functions may be appended to these vars to
-       for added functionality.  */
-
-function runEvent(evt, a, b, c, d, e, f, g) { /* if we need more args than 7, we'll add them ;) */
-       for( var i in evt ) evt[i](a, b, c, d, e, f, g);        
-}
-
-
-G.evt                          = {};
-G.evt.xul              = {};
-G.evt.mresult  = {};
-G.evt.rresult  = {};
-G.evt.result   = {};
-
-
-G.evt.mresult.idsReceived                      = []; /* f(ids) */
-G.evt.rresult.idsReceived                      = []; /* f(ids) */
-
-G.evt.result.hitCountReceived          = [];   /* f() : display hit info, pagination, etc. */
-G.evt.result.recordReceived            = []; /* f(mvr, pagePosition, isMr) : display the record*/
-G.evt.result.copyCountsReceived        = [];   /* f(mvr, pagePosition, copyCountInfo) : display copy counts*/
-G.evt.result.allRecordsReceived        = [];   /* f(mvrsArray) : add other page stuff, sidebars, etc.*/
-
-
-
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/dtree.js b/Open-ILS/src/javascript/lib/js/opac/dtree.js
deleted file mode 100644 (file)
index 5324b3e..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*--------------------------------------------------|
-| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
-|---------------------------------------------------|
-| Copyright (c) 2002-2003 Geir Landrö               |
-|                                                   |
-| This script can be used freely as long as all     |
-| copyright messages are intact.                    |
-|                                                   |
-| Updated: 17.04.2003                               |
-|--------------------------------------------------*/
-
-function Node(id, pid, name, url, title, target, icon, iconOpen, open) {
-       this.id = id;
-       this.pid = pid;
-       this.name = name;
-       this.url = url;
-       this.title = title;
-       this.target = target;
-       this.icon = icon;
-       this.iconOpen = iconOpen;
-       this._io = open || false;
-       this._is = false;
-       this._ls = false;
-       this._hc = false;
-       this._ai = 0;
-       this._p;
-};
-
-function dTree(objName) {
-       this.config = {
-               target                                  : null,
-               folderLinks                     : true,
-               useSelection            : true,
-               useCookies                      : true,
-               useLines                                : true,
-               useIcons                                : true,
-               useStatusText           : false,
-               closeSameLevel  : false,
-               inOrder                                 : false
-       }
-       this.icon = {
-               root                            : '/images/opac/orgtree/base.gif',
-               folder                  : '/images/opac/orgtree/folder.gif',
-               folderOpen              : '/images/opac/orgtree/folderopen.gif',
-               node                            : '/images/opac/orgtree/page.gif',
-               empty                           : '/images/opac/orgtree/empty.gif',
-               line                            : '/images/opac/orgtree/line.gif',
-               join                            : '/images/opac/orgtree/join.gif',
-               joinBottom              : '/images/opac/orgtree/joinbottom.gif',
-               plus                            : '/images/opac/orgtree/plus.gif',
-               plusBottom              : '/images/opac/orgtree/plusbottom.gif',
-               minus                           : '/images/opac/orgtree/minus.gif',
-               minusBottom             : '/images/opac/orgtree/minusbottom.gif',
-               nlPlus                  : '/images/opac/orgtree/nolines_plus.gif',
-               nlMinus                 : '/images/opac/orgtree/nolines_minus.gif'
-       };
-       this.obj = objName;
-       this.aNodes = [];
-       this.aIndent = [];
-       this.root = new Node(-1);
-       this.selectedNode = null;
-       this.selectedFound = false;
-       this.completed = false;
-};
-
-dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {
-       this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
-};
-
-dTree.prototype.openAll = function() {
-       this.oAll(true);
-};
-dTree.prototype.closeAll = function() {
-       this.oAll(false);
-};
-
-dTree.prototype.toString = function() {
-       var str = '<div class="dtree">\n';
-       if (document.getElementById) {
-               if (this.config.useCookies) this.selectedNode = this.getSelected();
-               str += this.addNode(this.root);
-       } else str += 'Browser not supported.';
-       str += '</div>';
-       if (!this.selectedFound) this.selectedNode = null;
-       this.completed = true;
-       return str;
-};
-
-dTree.prototype.addNode = function(pNode) {
-       var str = '';
-       var n=0;
-       if (this.config.inOrder) n = pNode._ai;
-       for (n; n<this.aNodes.length; n++) {
-               if (this.aNodes[n].pid == pNode.id) {
-                       var cn = this.aNodes[n];
-                       cn._p = pNode;
-                       cn._ai = n;
-                       this.setCS(cn);
-                       if (!cn.target && this.config.target) cn.target = this.config.target;
-                       if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
-                       if (!this.config.folderLinks && cn._hc) cn.url = null;
-                       if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
-                                       cn._is = true;
-                                       this.selectedNode = n;
-                                       this.selectedFound = true;
-                       }
-                       str += this.node(cn, n);
-                       if (cn._ls) break;
-               }
-       }
-       return str;
-};
-
-dTree.prototype.node = function(node, nodeId) {
-       var str = '<div class="dTreeNode">' + this.indent(node, nodeId);
-       if (this.config.useIcons) {
-               if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
-               if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
-               if (this.root.id == node.pid) {
-                       node.icon = this.icon.root;
-                       node.iconOpen = this.icon.root;
-               }
-               str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
-       }
-       if (node.url) {
-               str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
-               if (node.title) str += ' title="' + node.title + '"';
-               if (node.target) str += ' target="' + node.target + '"';
-               if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
-               if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
-                       str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
-               str += '>';
-       }
-       else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
-               str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
-       str += node.name;
-       if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
-       str += '</div>';
-       if (node._hc) {
-               str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
-               str += this.addNode(node);
-               str += '</div>';
-       }
-       this.aIndent.pop();
-       return str;
-};
-
-dTree.prototype.indent = function(node, nodeId) {
-       var str = '';
-       if (this.root.id != node.pid) {
-               for (var n=0; n<this.aIndent.length; n++)
-                       str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
-               (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
-               if (node._hc) {
-                       str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img  id="j' + this.obj + nodeId + '" src="';
-                       if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
-                       else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
-                       str += '" alt="" /></a>';
-               } else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';
-       }
-       return str;
-};
-
-dTree.prototype.setCS = function(node) {
-       var lastId;
-       for (var n=0; n<this.aNodes.length; n++) {
-               if (this.aNodes[n].pid == node.id) node._hc = true;
-               if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
-       }
-       if (lastId==node.id) node._ls = true;
-};
-
-dTree.prototype.getSelected = function() {
-       var sn = this.getCookie('cs' + this.obj);
-       return (sn) ? sn : null;
-};
-
-dTree.prototype.s = function(id) {
-       if (!this.config.useSelection) return;
-       var cn = this.aNodes[id];
-       if (cn._hc && !this.config.folderLinks) return;
-       if (this.selectedNode != id) {
-               if (this.selectedNode || this.selectedNode==0) {
-                       eOld = document.getElementById("s" + this.obj + this.selectedNode);
-                       eOld.className = "node";
-               }
-               eNew = document.getElementById("s" + this.obj + id);
-               eNew.className = "nodeSel";
-               this.selectedNode = id;
-               if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
-       }
-};
-
-dTree.prototype.o = function(id) {
-       var cn = this.aNodes[id];
-       this.nodeStatus(!cn._io, id, cn._ls);
-       cn._io = !cn._io;
-       if (this.config.closeSameLevel) this.closeLevel(cn);
-       if (this.config.useCookies) this.updateCookie();
-};
-
-dTree.prototype.oAll = function(status) {
-       for (var n=0; n<this.aNodes.length; n++) {
-               if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
-                       this.nodeStatus(status, n, this.aNodes[n]._ls)
-                       this.aNodes[n]._io = status;
-               }
-       }
-       if (this.config.useCookies) this.updateCookie();
-};
-
-dTree.prototype.openTo = function(nId, bSelect, bFirst) {
-       if (!bFirst) {
-               for (var n=0; n<this.aNodes.length; n++) {
-                       if (this.aNodes[n].id == nId) {
-                               nId=n;
-                               break;
-                       }
-               }
-       }
-       var cn=this.aNodes[nId];
-       if (cn.pid==this.root.id || !cn._p) return;
-       cn._io = true;
-       cn._is = bSelect;
-       if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
-       if (this.completed && bSelect) this.s(cn._ai);
-       else if (bSelect) this._sn=cn._ai;
-       this.openTo(cn._p._ai, false, true);
-};
-
-dTree.prototype.closeLevel = function(node) {
-       for (var n=0; n<this.aNodes.length; n++) {
-               if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
-                       this.nodeStatus(false, n, this.aNodes[n]._ls);
-                       this.aNodes[n]._io = false;
-                       this.closeAllChildren(this.aNodes[n]);
-               }
-       }
-}
-
-dTree.prototype.closeAllChildren = function(node) {
-       for (var n=0; n<this.aNodes.length; n++) {
-               if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
-                       if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
-                       this.aNodes[n]._io = false;
-                       this.closeAllChildren(this.aNodes[n]);          
-               }
-       }
-}
-
-dTree.prototype.nodeStatus = function(status, id, bottom) {
-       eDiv    = document.getElementById('d' + this.obj + id);
-       eJoin   = document.getElementById('j' + this.obj + id);
-       if (this.config.useIcons) {
-               eIcon   = document.getElementById('i' + this.obj + id);
-               eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
-       }
-       eJoin.src = (this.config.useLines)?
-       ((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
-       ((status)?this.icon.nlMinus:this.icon.nlPlus);
-       eDiv.style.display = (status) ? 'block': 'none';
-};
-
-
-dTree.prototype.clearCookie = function() {
-       var now = new Date();
-       var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
-       this.setCookie('co'+this.obj, 'cookieValue', yesterday);
-       this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
-};
-
-dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
-       document.cookie =
-               escape(cookieName) + '=' + escape(cookieValue)
-               + (expires ? '; expires=' + expires.toGMTString() : '')
-               + (path ? '; path=' + path : '')
-               + (domain ? '; domain=' + domain : '')
-               + (secure ? '; secure' : '');
-};
-
-dTree.prototype.getCookie = function(cookieName) {
-       var cookieValue = '';
-       var posName = document.cookie.indexOf(escape(cookieName) + '=');
-       if (posName != -1) {
-               var posValue = posName + (escape(cookieName) + '=').length;
-               var endPos = document.cookie.indexOf(';', posValue);
-               if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
-               else cookieValue = unescape(document.cookie.substring(posValue));
-       }
-       return (cookieValue);
-};
-
-dTree.prototype.updateCookie = function() {
-       var str = '';
-       for (var n=0; n<this.aNodes.length; n++) {
-               if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
-                       if (str) str += '.';
-                       str += this.aNodes[n].id;
-               }
-       }
-       this.setCookie('co' + this.obj, str);
-};
-
-dTree.prototype.isOpen = function(id) {
-       var aOpen = this.getCookie('co' + this.obj).split('.');
-       for (var n=0; n<aOpen.length; n++)
-               if (aOpen[n] == id) return true;
-       return false;
-};
-
-if (!Array.prototype.push) {
-       Array.prototype.push = function array_push() {
-               for(var i=0;i<arguments.length;i++)
-                       this[this.length]=arguments[i];
-               return this.length;
-       }
-};
-if (!Array.prototype.pop) {
-       Array.prototype.pop = function array_pop() {
-               lastElement = this[this.length-1];
-               this.length = Math.max(this.length-1,0);
-               return lastElement;
-       }
-};
diff --git a/Open-ILS/src/javascript/lib/js/opac/fmgen.js b/Open-ILS/src/javascript/lib/js/opac/fmgen.js
deleted file mode 100644 (file)
index 72886cc..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* generate fieldmapper javascript classes.  This expects a global variable
-       called 'fmclasses' to be fleshed with the classes we need to build */
-
-function Fieldmapper() {}
-
-var errorstr = "Attempt to build fieldmapper object with non-array";
-
-Fieldmapper.prototype.clone = function() {
-       var obj = new this.constructor();
-
-       for( var i in this.a ) {
-               var thing = this.a[i];
-               if(thing == null) continue;
-
-               if( thing._isfieldmapper ) {
-                       obj.a[i] = thing.clone();
-               } else {
-
-                       if(instanceOf(thing, Array)) {
-                               obj.a[i] = new Array();
-
-                               for( var j in thing ) {
-
-                                       if( thing[j]._isfieldmapper )
-                                               obj.a[i][j] = thing[j].clone();
-                                       else
-                                               obj.a[i][j] = thing[j];
-                               }
-                       } else {
-                               obj.a[i] = thing;
-                       }
-               }
-       }
-       return obj;
-}
-Fieldmapper.prototype.isnew = function(n) { if(arguments.length == 1) this.a[0] =n; return this.a[0]; }
-Fieldmapper.prototype.ischanged = function(n) { if(arguments.length == 1) this.a[1] =n; return this.a[1]; }
-Fieldmapper.prototype.isdeleted = function(a) { if(arguments.length == 1) this.a[2] =n; return this.a[2]; }
-function FMEX(message) { this.message = message; }
-FMEX.toString = function() { return "FieldmapperException: " + this.message + "\n"; }
-
-var string = "";
-for( var cl in fmclasses ) {
-       string += cl + ".prototype = new Fieldmapper(); " + 
-                                               cl + ".prototype.constructor = " + cl + ";" +
-                                               cl + ".baseClass = Fieldmapper.constructor;" +
-                                               "function " + cl + "(a) { " +
-                                                       "this.classname = \"" + cl + "\";" +
-                                                       "this._isfieldmapper = true;" +
-                                                       "if(a) { if(a.constructor == Array) this.a = a; else throw new FMEX(errorstr);} else this.a = []}"; 
-
-       string += cl + "._isfieldmapper=true;";
-
-       for( var pos in fmclasses[cl] ) {
-               var p = parseInt(pos) + 3;
-               var field = fmclasses[cl][pos];
-               string += cl + ".prototype." + field + 
-                       "=function(n){if(arguments.length == 1)this.a[" + 
-                       p + "]=n;return this.a[" + p + "];};";
-       }
-}
-eval(string);
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/init.js b/Open-ILS/src/javascript/lib/js/opac/init.js
deleted file mode 100644 (file)
index 21b841e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-
-function init() {
-
-       window.onunload = unload;
-
-       loadUIObjects();
-       initParams();
-       initSideBar();
-       searchBarInit();
-       G.ui.common.org_tree.innerHTML = buildOrgSelector().toString();
-
-       switch(findCurrentPage()) {
-               case MRESULT: mresultDoSearch(); break;
-               case RRESULT: rresultDoSearch(); break;
-       }
-}
-
-/* free whatever memory we can so IE doesn't die a slow dumb death */
-function unload() {
-       _tree_killer();
-       clearUIObjects();
-       cleanRemoteRequests();
-       try{mresultUnload();} catch(E){}
-       try{rresultUnload();} catch(E){}
-}
-
-
-/* sets all of the params values */
-var TERM,  STYPE,  LOCATION,  DEPTH,  FORM, OFFSET,  COUNT,  
-        HITCOUNT,  RANKS, SEARCHBAR_EXTRAS;
-
-function initParams() {
-       var cgi = new CGI();    
-
-       TERM    = cgi.param(PARAM_TERM);
-       STYPE   = cgi.param(PARAM_STYPE);
-       FORM    = cgi.param(PARAM_FORM);
-
-       LOCATION        = parseInt(cgi.param(PARAM_LOCATION));
-       DEPTH           = parseInt(cgi.param(PARAM_DEPTH));
-       OFFSET  = parseInt(cgi.param(PARAM_OFFSET));
-       COUNT           = parseInt(cgi.param(PARAM_COUNT));
-       HITCOUNT        = parseInt(cgi.param(PARAM_HITCOUNT));
-       MRID            = parseInt(cgi.param(PARAM_MRID));
-       RID             = parseInt(cgi.param(PARAM_RID));
-
-       /* set up some sane defaults */
-       if(isNaN(LOCATION))     LOCATION        = 1;
-       if(isNaN(DEPTH))                DEPTH           = 0;
-       if(isNaN(OFFSET))               OFFSET  = 0;
-       if(isNaN(COUNT))                COUNT           = 10;
-       if(isNaN(HITCOUNT))     HITCOUNT        = 0;
-       if(isNaN(SEARCHBAR_EXTRAS))     SEARCHBAR_EXTRAS        = 0;
-       if(isNaN(MRID))         MRID            = 0;
-       if(isNaN(RID))                  RID             = 0;
-}
-
-/* URL param accessors */
-function getTerm(){return TERM;}
-function getStype(){return STYPE;}
-function getLocation(){return LOCATION;}
-function getDepth(){return DEPTH;}
-function getForm(){return FORM;}
-function getOffset(){return OFFSET;}
-function getDisplayCount(){return COUNT;}
-function getHitCount(){return HITCOUNT;}
-function getSearchBarExtras(){return SEARCHBAR_EXTRAS;}
-function getMrid(){return MRID;};
-function getRid(){return RID;};
-
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/mresult.js b/Open-ILS/src/javascript/lib/js/opac/mresult.js
deleted file mode 100644 (file)
index a79872d..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-var records = {};
-var ranks = {};
-var table;
-var rowtemplate;
-var idsCookie = new cookieObject("ids", 1, "/", COOKIE_IDS);
-
-G.evt.mresult.idsReceived.push(mresultSetRecords, mresultCollectRecords); 
-
-function mresultUnload() { removeChildren(table); table = null;}
-
-function mresultDoSearch() {
-
-       table = G.ui.result.main_table;
-
-       hideMe(G.ui.result.row_template);
-       while( table.parentNode.rows.length <= getDisplayCount() )  /* add an extra row so IE and safari won't complain */
-               hideMe(table.appendChild(G.ui.result.row_template.cloneNode(true)));
-
-       if(getOffset() == 0 || getHitCount() == null ) {
-       //      mresultGetCount(); 
-               mresultCollectIds(FETCH_MRIDS_FULL); 
-       } else { 
-               runEvent(G.evt.result.hitCountReceived);
-               mresultCollectIds(FETCH_MRIDS);
-       }
-}
-
-function mresultGetCount() {
-       var form = (getForm() == "all") ? null : getForm();
-       var req = new Request(FETCH_MRCOUNT, 
-                       getStype(), getTerm(), getLocation(), getDepth(), form );
-       req.callback(mresultHandleCount);
-       req.send();
-}
-
-function mresultHandleCount(r) {
-       HITCOUNT = parseInt(r.getResultObject());
-       runEvent(G.evt.result.hitCountReceived);
-}
-
-
-/* performs the actual search */
-function mresultCollectIds(method) {
-
-       if(getOffset() == 0) {
-               idsCookie.put(COOKIE_IDS,"");
-               idsCookie.write();
-
-       } else {
-               var c = JSON2js(idsCookie.get(COOKIE_IDS));
-               if(c && c.recs) { records = c.recs; ranks = c.ranks; } 
-       }
-
-       if(     getOffset() != 0 && 
-                       records[getOffset()] != null && 
-                       records[resultFinalPageIndex()] != null) {
-                       mresultCollectRecords(); 
-
-       } else {
-
-               var req = new Request(method, getStype(), getTerm(), 
-                       getLocation(), getDepth(), getDisplayCount() * 10, getOffset(), getForm() );
-               req.callback(mresultHandleMRIds);
-               /* idsRetrieved */
-               req.send();
-       }
-}
-
-function mresultHandleMRIds(r) {
-       var res = r.getResultObject();
-
-       if(res.count != null) {
-               HITCOUNT = res.count;
-               runEvent(G.evt.result.hitCountReceived);
-       } 
-       runEvent(G.evt.mresult.idsReceived, res.ids);
-}
-
-function mresultSetRecords(idstruct) {
-       var o = getOffset();
-       for( var x = o; x < idstruct.length + o; x++ ) {
-               if(idstruct[x-o] == null) break;
-               records[x] = parseInt(idstruct[x - o][0]);
-               ranks[x] = parseFloat(idstruct[x - o][1]);
-       }
-       idsCookie.put(COOKIE_IDS, js2JSON({ recs: records, ranks : ranks }) );
-       idsCookie.write();
-}
-
-function mresultCollectRecords() {
-       var i = 0;
-       for( var x = getOffset(); x!= getDisplayCount() + getOffset(); x++ ) {
-               if(isNull(records[x])) break;
-               var req = new Request(FETCH_MRMODS, records[x]);
-               req.request.userdata = i++;
-               req.callback(mresultHandleMods);
-               req.send();
-       }
-}
-
-function mresultHandleMods(r) {
-       var rec = r.getResultObject();
-       var pagePosition = r.userdata;
-       runEvent(G.evt.result.recordReceived, rec, pagePosition, true);
-       resultCollectCopyCounts(rec, pagePosition, FETCH_MR_COPY_COUNTS);
-}
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/opac_utils.js b/Open-ILS/src/javascript/lib/js/opac/opac_utils.js
deleted file mode 100644 (file)
index 93eb77e..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-var IAMXUL = false;
-function isXUL() { return IAMXUL; }
-
-
-/* - Request ------------------------------------------------------------- */
-function Request(type) {
-       var s = type.split(":");
-       if(s[2] == "1" && isXUL()) s[1] += ".staff";
-       this.request = new RemoteRequest(s[0], s[1]);
-       for( var x = 1; x!= arguments.length; x++ ) 
-               this.request.addParam(arguments[x]);
-}
-
-Request.prototype.callback = function(cal) { this.request.setCompleteCallback(cal); }
-Request.prototype.send         = function(block){this.request.send(block);}
-Request.prototype.result       = function(){return this.request.getResultObject();}
-/* ----------------------------------------------------------------------- */
-
-function showCanvas() { setTimeout(_showCanvas, 200); }
-function _showCanvas() {
-       for( var x in G.ui.altcanvas ) {
-               hideMe(G.ui.altcanvas[x]);
-       }
-       hideMe(G.ui.common.loading);
-       unHideMe(G.ui.common.canvas_main);
-       G.ui.searchbar.text.focus(); 
-}
-
-var newCanvasNode;
-function swapCanvas(newNode) { newCanvasNode = newNode; setTimeout(_swapCanvas, 200); }
-function _swapCanvas() {
-       for( var x in G.ui.altcanvas ) 
-               hideMe(G.ui.altcanvas[x]);
-
-       hideMe(G.ui.common.loading);
-       hideMe(G.ui.common.canvas_main);
-       unHideMe(newCanvasNode);
-}
-
-/* finds the name of the current page */
-function findCurrentPage() {
-       for( var p in config.page ) {
-               var path = location.pathname;
-
-               if(!path.match(/.*\.xml$/))
-                       path += "index.xml"; /* in case they go to  / */
-
-               if( config.page[p] == path)
-                       return p;
-       }
-       return null;
-}
-
-
-/* builds an opac URL.  If no page is defined, the current page is used
-       if slim, then only everything after the ? is returned (no host portion) */
-function  buildOPACLink(args, slim) {
-
-       if(!args) args = {};
-
-       if(!slim) {
-               var string = location.protocol + "//" + location.host;
-               if(args.page) string += config.page[args.page];
-               else string += config.page[findCurrentPage()];
-       }
-
-       string += "?";
-
-       for( var x in args ) {
-               if(x == "page" || args[x] == null) continue;
-               string += "&" + x + "=" + encodeURIComponent(args[x]);
-       }
-
-       string += _appendParam(TERM,            PARAM_TERM, args, getTerm, string);
-       string += _appendParam(STYPE,           PARAM_STYPE, args, getStype, string);
-       string += _appendParam(LOCATION, PARAM_LOCATION, args, getLocation, string);
-       string += _appendParam(DEPTH,           PARAM_DEPTH, args, getDepth, string);
-       string += _appendParam(FORM,            PARAM_FORM, args, getForm, string);
-       string += _appendParam(OFFSET,  PARAM_OFFSET, args, getOffset, string);
-       string += _appendParam(COUNT,           PARAM_COUNT, args, getDisplayCount, string);
-       string += _appendParam(HITCOUNT, PARAM_HITCOUNT, args, getHitCount, string);
-       string += _appendParam(MRID,            PARAM_MRID, args, getMrid, string);
-       string += _appendParam(RID,             PARAM_RID, args, getRid, string);
-       return string.replace(/\&$/,'').replace(/\?\&/,"?");    
-}
-
-function _appendParam( fieldVar, fieldName, overrideArgs, getFunc, string ) {
-       var ret = "";
-       if( fieldVar != null && overrideArgs[fieldName] == null ) 
-               ret = "&" + fieldName + "=" + encodeURIComponent(getFunc());
-       return ret;
-}
-
-
-function EX(message) { this.init(message); }
-EX.prototype.init = function(message) { this.message = message; }
-EX.prototype.toString = function() { return "\n *** Exception Occured \n" + this.message; }  
-EXCommunication.prototype              = new EX();
-EXCommunication.prototype.constructor  = EXCommunication;
-EXCommunication.baseClass              = EX.prototype.constructor;
-function EXCommunication(message) { this.init("EXCommunication: " + message); }                          
-
-/* ----------------------------------------------------------------------- */
-function cleanISBN(isbn) {
-   if(isbn) {
-      isbn = isbn.toString().replace(/^\s+/,"");
-      var idx = isbn.indexOf(" ");
-      if(idx > -1) { isbn = isbn.substring(0, idx); }
-   } else isbn = "";
-   return isbn;
-}       
-
-
-
-
-/* builds a link that goes to the title listings for a metarecord */
-function buildTitleLink(rec, link) {
-       if(!rec) return;
-       link.appendChild(text(normalize(truncate(rec.title(), 65))));
-       var args = {};
-       args.page = RRESULT;
-       args[PARAM_OFFSET] = 0;
-       args[PARAM_MRID] = rec.doc_id();
-       link.setAttribute("href", buildOPACLink(args));
-}
-
-function buildTitleDetailLink(rec, link) {
-       if(!rec) return;
-       link.appendChild(text(normalize(truncate(rec.title(), 65))));
-       var args = {};
-       args.page = RDETAIL;
-       args[PARAM_OFFSET] = 0;
-       args[PARAM_RID] = rec.doc_id();
-       link.setAttribute("href", buildOPACLink(args));
-}
-
-/* 'type' is one of STYPE_AUTHOR, STYPE_SUBJECT, ... found in config.js 
-       'trunc' is the number of characters to show in the string, defaults to 65 */
-function buildSearchLink(type, string, linknode, trunc) {
-       if(!trunc) trunc = 65;
-       var args = {};
-       args.page = MRESULT;
-       args[PARAM_OFFSET] = 0;
-       args[PARAM_TERM] = string;
-       args[PARAM_STYPE] = type;
-       linknode.appendChild(text(normalize(truncate(string, trunc))));
-       linknode.setAttribute("href", buildOPACLink(args));
-}
-
-
-/* ----------------------------------------------------------------------- */
-/* user session handling */
-/* ----------------------------------------------------------------------- */
-
-/* session is the login session.  If no session is provided, we attempt
-       to find one in the cookies.  If 'force' is true we retrieve the 
-       user from the server even if there is already a global user present.
-       if ses != G.user.session, we also force a grab */
-var cookie = new cookieObject("ses", 1, "/", COOKIE_SES);
-function grabUser(ses, force) {
-
-       if(!ses) ses = cookie.get(COOKIE_SES);
-       if(!ses) return false;
-
-       if(!force) 
-               if(G.user && G.user.session == ses)
-                       return G.user;
-
-       /* first make sure the session is valid */
-       var request = new Request(FETCH_SESSION, ses );
-       request.send(true);
-       var user = request.result();
-       if( !(typeof user == 'object' && user._isfieldmapper) ) {
-               return false;
-       }
-
-       G.user = user;
-       G.user.fleshed = false;
-       G.user.session = ses;
-       cookie.put(COOKIE_SES, ses);
-       cookie.write();
-
-       return G.user;
-
-}
-
-function grabFleshedUser() {
-
-       if(!G.user || !G.user.session) {
-               grabUser();     
-               if(!G.user || !G.user.session) return null;
-       }
-
-       if(G.user.fleshed) return G.user;
-
-   var req = new Request(FETCH_FLESHED_USER, G.user.session);
-       req.send(true);
-
-       G.user = req.result();
-
-       if(!G.user || G.user.length == 0) { 
-               G.user = null; return false; 
-               cookie.remove(COOKIE_SES);
-       }
-
-       G.user.session = ses;
-       G.user.fleshed = true;
-
-       cookie.put(COOKIE_SES, ses); /*  update the cookie */
-       cookie.write();
-
-       return G.user;
-}
-
-
-/* returns a fleshed G.user on success, false on failure */
-function doLogin() {
-
-       var uname = G.ui.login.username.value;
-       var passwd = G.ui.login.password.value; 
-
-       var init_request = new Request( LOGIN_INIT, uname );
-   init_request.send(true);
-   var seed = init_request.result();
-
-   if( ! seed || seed == '0') {
-      alert( "Error Communicating with Authentication Server" );
-      return null;
-   }
-
-   var auth_request = new Request( LOGIN_COMPLETE, 
-               uname, hex_md5(seed + hex_md5(passwd)), "opac");
-
-   auth_request.send(true);
-   var auth_result = auth_request.result();
-
-   if(auth_result == '0' || auth_result == null || auth_result.length == 0) { return false; }
-
-       var u = grabUser(auth_result, true);
-       if(u) updateLoc(u.home_ou(), findOrgDepth(u.home_ou()));
-
-       return u;
-}
-
-function doLogout() {
-
-       /* be nice and delete the session from the server */
-       if(G.user && G.user.session) { 
-               var req = new Request(LOGIN_DELETE, G.user.session);
-      req.send(true);
-               try { req.result(); } catch(E){}
-    }
-
-       G.user = null;
-       cookie.remove(COOKIE_SES);
-
-       hideMe(G.ui.sidebar.logoutbox);
-       unHideMe(G.ui.sidebar.loginbox);
-       hideMe(G.ui.sidebar.logged_in_as);
-
-}
-
-
-function hideMe(obj) { addCSSClass(obj, config.css.hide_me); } 
-function unHideMe(obj) { removeCSSClass(obj, config.css.hide_me); }
-
-
-/* ----------------------------------------------------------------------- */
-/* build the org tree */
-/* ----------------------------------------------------------------------- */
-       
-var orgTreeSelector;
-function buildOrgSelector() {
-       var tree = new dTree("orgTreeSelector"); 
-       for( var i in orgArraySearcher ) { 
-               var node = orgArraySearcher[i];
-               if( node == null ) continue;
-               if(node.parent_ou() == null)
-                       tree.add(node.id(), -1, node.name(), 
-                               "javascript:orgSelect(" + node.id() + ");", node.name());
-               else {
-                       tree.add(node.id(), node.parent_ou().id(), node.name(), 
-                               "javascript:orgSelect(" + node.id() + ");", node.name());
-               }
-       }
-       orgTreeSelector = tree;
-       return tree;
-}
-
-function orgSelect(id) {
-       showCanvas();
-       updateLoc(id, findOrgDepth(id));
-}
-
-
-/* ------------------------------------------------------------------------------------------------------ */
-/* org tree utilities */
-/* ------------------------------------------------------------------------------------------------------ */
-
-/* takes an org unit or id and return the numeric depth */
-function findOrgDepth(org_id_or_node) {
-       return findOrgType(findOrgUnit(org_id_or_node).ou_type()).depth();
-}
-
-/* takes the org type id from orgunit.ou_type() field and returns
-       the org type object */
-function findOrgType(type_id) {
-       if(typeof type_id == 'object') return type_id;
-       for(var type in globalOrgTypes) {
-               var t =globalOrgTypes[type]; 
-               if( t.id() == type_id || t.id() == parseInt(type_id) ) 
-                       return t;
-       }
-       return null;
-}
-
-
-/* returns an org unit by id.  if an object is passed in as the id,
-       then the object is assumed to be an org unit and is returned */
-function findOrgUnit(org_id) {
-       return (typeof org_id == 'object') ? org_id : orgArraySearcher[org_id];
-}
-
-
-/* builds a trail from the top of the org tree to the node provide.
-       basically fleshes out 'my orgs' 
-       Returns an array of [org0, org1, ..., myorg] */
-function orgNodeTrail(node) {
-       var na = new Array();
-       while( node ) {
-               na.push(node);
-               node = findOrgUnit(node.parent_ou());
-       }
-       return na.reverse();
-}
-
-
-/* returns an array of sibling org units */
-function findSiblingOrgs(node) { return findOrgUnit(node.parent_ou()).children(); }
-/* ------------------------------------------------------------------------------------------------------ */
-
-
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/result_common.js b/Open-ILS/src/javascript/lib/js/opac/result_common.js
deleted file mode 100644 (file)
index e12c006..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-var subjectCache = {};
-var authorCache = {};
-var seriesCache = {};
-
-var recordsHandled = 0;
-var recordsCache = [];
-
-/* set up the event handlers */
-G.evt.result.hitCountReceived.push(resultSetHitInfo, resultPaginate);
-G.evt.result.recordReceived.push(resultDisplayRecord, resultAddCopyCounts);
-G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
-G.evt.result.allRecordsReceived.push(resultBuildCaches, resultDrawSubjects, resultDrawAuthors, resultDrawSeries);
-
-
-/* returns the last 'index' postion ocurring in this page */
-function resultFinalPageIndex() {
-       if(getHitCount() < (getOffset() + getDisplayCount())) 
-               return getHitCount() - 1;
-       return getOffset() + getDisplayCount() - 1;
-}
-
-/* set the search result info, number of hits, which results we're 
-       displaying, links to the next/prev pages, etc. */
-function resultSetHitInfo() { 
-       var c;  
-       if( getDisplayCount() > (getHitCount() - getOffset()))  c = getHitCount();
-       else c = getDisplayCount() + getOffset();
-
-       var pages = getHitCount() / getDisplayCount();
-       if(pages % 1) pages = parseInt(pages) + 1;
-
-       G.ui.result.current_page.appendChild(text( (getOffset()/getDisplayCount()) + 1));
-       G.ui.result.num_pages.appendChild(text(pages + ")")); /* the ) is dumb */
-
-       G.ui.result.offset_start.appendChild(text(getOffset() + 1));
-       G.ui.result.offset_end.appendChild(text(c));
-       G.ui.result.result_count.appendChild(text(getHitCount()));
-       unHideMe(G.ui.result.info);
-}
-
-
-function resultPaginate() {
-       var o = getOffset();
-
-       if( !((o + getDisplayCount()) >= getHitCount()) ) {
-
-               var args = {};
-               args[PARAM_OFFSET] = o + getDisplayCount();
-               G.ui.result.next_link.setAttribute("href", buildOPACLink(args)); 
-               addCSSClass(G.ui.result.next_link, config.css.result.nav_active);
-
-               args[PARAM_OFFSET] = getHitCount() - (getHitCount() % getDisplayCount());
-               G.ui.result.end_link.setAttribute("href", buildOPACLink(args)); 
-               addCSSClass(G.ui.result.end_link, config.css.result.nav_active);
-       }
-
-       if( o > 0 ) {
-
-               var args = {};
-               args[PARAM_OFFSET] = o - getDisplayCount();
-               G.ui.result.prev_link.setAttribute( "href", buildOPACLink(args)); 
-               addCSSClass(G.ui.result.prev_link, config.css.result.nav_active);
-
-               args[PARAM_OFFSET] = 0;
-               G.ui.result.home_link.setAttribute( "href", buildOPACLink(args)); 
-               addCSSClass(G.ui.result.home_link, config.css.result.nav_active);
-       }
-}
-
-
-/* display the record info in the record display table 'pos' is the 
-               zero based position the record should have in the display table */
-function resultDisplayRecord(rec, pos, is_mr) {
-
-       if(rec == null) rec = new mvr(); /* so the page won't die if there was an error */
-       recordsHandled++;
-       recordsCache.push(rec);
-
-       /* hide the 'now loading...' message */
-       hideMe(G.ui.common.loading);
-
-       var r = table.rows[pos];
-
-       var pic = findNodeByName(r, config.names.result.item_jacket);
-       pic.setAttribute("src", buildISBNSrc(cleanISBN(rec.isbn())));
-
-       var title_link = findNodeByName(r, config.names.result.item_title);
-       var author_link = findNodeByName(r, config.names.result.item_author);
-
-       if( is_mr )  buildTitleLink(rec, title_link); 
-       else  buildTitleDetailLink(rec, title_link); 
-       buildSearchLink(STYPE_AUTHOR, rec.author(), author_link);
-
-       findNodeByName(r, "result_table_title_cell").width = 
-               100 - (orgNodeTrail(findOrgUnit(getLocation())).length * 8) + "%";
-
-       unHideMe(r);
-
-       if(resultPageIsDone()) 
-               runEvent(G.evt.result.allRecordsReceived, recordsCache);
-}
-
-function resultPageIsDone(pos) {
-       return (recordsHandled == getDisplayCount() 
-               || recordsHandled + getOffset() == getHitCount());
-}
-
-/* -------------------------------------------------------------------- */
-/* dynamically add the copy count rows based on the org type 'countsrow' 
-       is the row into which we will add TD's to hold the copy counts 
-       This code generates copy count cells with an id of
-       'copy_count_cell_<depth>_<pagePosition>'  */
-function resultAddCopyCounts(rec, pagePosition) {
-
-       var r = table.rows[pagePosition];
-       var countsrow = findNodeByName(r, config.names.result.counts_row );
-       var ccell = findNodeByName(countsrow, config.names.result.count_cell);
-
-       var nodes = orgNodeTrail(findOrgUnit(getLocation()));
-       var node = nodes[0];
-       var type = findOrgType(node.ou_type());
-       ccell.id = "copy_count_cell_" + type.depth() + "_" + pagePosition;
-       ccell.title = type.opac_label();
-       addCSSClass(ccell, config.css.result.cc_cell_even);
-
-       var lastcell = ccell;
-
-       if(nodes[1]) {
-
-               var x = 1;
-               var d = findOrgDepth(nodes[1]);
-               var d2 = findOrgDepth(nodes[nodes.length -1]);
-
-               for( var i = d; i <= d2 ; i++ ) {
-       
-                       ccell = ccell.cloneNode(true);
-
-                       if((i % 2))
-                               removeCSSClass(ccell, "copy_count_cell_even");
-                       else
-                               addCSSClass(ccell, "copy_count_cell_even");
-
-                       var node = nodes[x++];
-                       var type = findOrgType(node.ou_type());
-       
-                       ccell.id = "copy_count_cell_" + type.depth() + "_" + pagePosition;
-                       ccell.title = type.opac_label();
-                       countsrow.insertBefore(ccell, lastcell);
-                       lastcell = ccell;
-               }
-       }
-}
-
-/* collect copy counts for a record using method 'methodName' */
-function resultCollectCopyCounts(rec, pagePosition, methodName) {
-       if(rec == null || rec.doc_id() == null) return;
-       var req = new Request(methodName, getLocation(), rec.doc_id() );
-       req.request.userdata = [ rec, pagePosition ];
-       req.callback(resultHandleCopyCounts);
-       req.send();
-}
-
-function resultHandleCopyCounts(r) {
-       runEvent(G.evt.result.copyCountsReceived, r.userdata[0], r.userdata[1], r.getResultObject()); 
-}
-
-
-/* display the collected copy counts */
-function resultDisplayCopyCounts(rec, pagePosition, copy_counts) {
-       if(copy_counts == null || rec == null) return;
-       var i = 0;
-       while(copy_counts[i] != null) {
-               var cell = getId("copy_count_cell_" + i +"_" + pagePosition);
-               cell.appendChild(text(copy_counts[i].available + " / " + copy_counts[i].count));
-               i++;
-       }
-}
-
-
-/* captures extraneous info from each record */
-function resultBuildCaches(records) {
-       for( var r in records ) {
-               var rec = records[r];
-               for( var s in rec.subject() ) 
-                       subjectCache[s] == null ? subjectCache[s] = 1 : subjectCache[s]++;
-               authorCache[rec.author()] = 1;
-               for( var s in rec.series() ) seriesCache[rec.series()[s]] = 1;
-       }
-}
-
-
-function resultSortSubjects(a, b) { return -(a.count - b.count); } /* sort in reverse */
-function resultDrawSubjects() {
-
-       var subjs = [];
-       for( var s in subjectCache )
-               subjs.push( { sub : s, count : subjectCache[s] } );
-       subjs.sort(resultSortSubjects);
-
-       var ss = [];
-       for( var s in subjs ) ss.push(subjs[s].sub);
-       resultDrawSidebarStuff(STYPE_SUBJECT, G.ui.sidebar.subject_item,  
-               config.names.sidebar.subject_item, ss, G.ui.sidebar.subject);
-}
-
-function resultDrawAuthors() {
-       var auths = new Array();
-       for( var s in authorCache ) auths.push(s);
-       resultDrawSidebarStuff(STYPE_AUTHOR, G.ui.sidebar.author_item,  
-               config.names.sidebar.author_item, auths.sort(), G.ui.sidebar.author);
-}
-
-function resultDrawSeries() {
-       var sers = new Array();
-       for( var s in seriesCache ) sers.push(s);
-       resultDrawSidebarStuff(STYPE_SERIES, G.ui.sidebar.series_item,  
-               config.names.sidebar.series_item, sers.sort(), G.ui.sidebar.series);
-}
-
-/* search type, template node, href link name, array of text, node to unhide */
-function resultDrawSidebarStuff(stype, node, linkname, items, wrapperNode) {
-       var parent = node.parentNode;
-       var template = parent.removeChild(node);
-       var x = 0;
-       var newnode = template.cloneNode(true);
-       var found = false;
-       for( var i in items ) {
-               if(isNull(items[i])) continue;
-               if(x++ > 7) break;
-               buildSearchLink(stype, items[i], findNodeByName(newnode, linkname), 100);
-               parent.appendChild(newnode);
-               newnode = template.cloneNode(true);
-               found = true;
-       }
-       if(found) unHideMe(wrapperNode);
-}
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/rresult.js b/Open-ILS/src/javascript/lib/js/opac/rresult.js
deleted file mode 100644 (file)
index b047181..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-var records = new Array();
-var table;
-var rowtemplate;
-
-G.evt.rresult.idsReceived.push(rresultCollectRecords); 
-
-function rresultUnload() { removeChildren(table); table = null;}
-
-function rresultDoSearch() {
-       table = G.ui.result.main_table;
-       hideMe(G.ui.result.row_template);
-       while( table.parentNode.rows.length < getDisplayCount() ) 
-               hideMe(table.appendChild(G.ui.result.row_template.cloneNode(true)));
-       rresultCollectIds();
-}
-
-function rresultCollectIds() {
-       var form = (getForm() == "all") ? null : getForm();
-       var req = new Request(FETCH_RIDS, getMrid(), form );
-       req.callback( rresultHandleRIds );
-       req.send();
-}
-
-function rresultHandleRIds(r) {
-       var res = r.getResultObject();
-       HITCOUNT = parseInt(res.count);
-       runEvent(G.evt.result.hitCountReceived);
-       runEvent(G.evt.rresult.idsReceived, res.ids);
-}
-
-function rresultCollectRecords(ids) {
-       var x = 0;
-       for( var i = getOffset(); i!= getDisplayCount() + getOffset(); i++ ) {
-               if(ids[i] == null) break;
-               var req = new Request(FETCH_RMODS, parseInt(ids[i]));
-               req.callback(rresultHandleMods);
-               req.request.userdata = x++;
-               req.send();
-       }
-}
-
-function rresultHandleMods(r) {
-       var rec = r.getResultObject();
-       runEvent(G.evt.result.recordReceived, rec, r.userdata, false);
-       resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS);
-}
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/search_bar.js b/Open-ILS/src/javascript/lib/js/opac/search_bar.js
deleted file mode 100644 (file)
index cf7ebf7..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-var searchBarExpanded = false;
-/* our search selector boxes */
-var _ts, _fs, _ds;
-
-
-/* if set by the org selector, this will be the location used the
-       next time the search is submitted */
-var newSearchLocation; 
-
-function searchBarInit() {
-
-       _ts = G.ui.searchbar.type_selector;
-       _ds = G.ui.searchbar.depth_selector;
-       _fs = G.ui.searchbar.form_selector;
-
-       G.ui.searchbar.text.focus();
-       G.ui.searchbar.text.onkeydown = 
-               function(evt) {if(userPressedEnter(evt)) searchBarSubmit();};
-
-       G.ui.searchbar.submit.onclick = searchBarSubmit;
-       G.ui.searchbar.tag.onclick = searchBarToggle;
-
-       /* set up the selector objects, etc */
-       G.ui.searchbar.text.value = (getTerm() != null) ? getTerm() : "";
-       setSelector(_ts,        getStype());
-       setSelector(_ds,        getDepth());
-       setSelector(_fs,        getForm());
-       G.ui.searchbar.location_tag.onclick = _opacHandleLocationTagClick;
-}
-
-function _opacHandleLocationTagClick() {
-       orgTreeSelector.openTo(  
-               (newSearchLocation != null) ? parseInt(newSearchLocation) : getLocation(), true );
-       swapCanvas(G.ui.common.org_container);
-}
-
-function updateLoc(location, depth) {
-       if( location != null )
-               newSearchLocation = location;
-       if( depth != null ) 
-               setSelector(G.ui.searchbar.depth_selector, depth);
-}
-function searchBarSubmit() {
-
-       var text = G.ui.searchbar.text.value;
-       if(!text || text == "") return;
-
-
-       var args = {};
-       args.page                               = MRESULT;
-       args[PARAM_OFFSET]      = 0;
-       args[PARAM_TERM]                = text;
-       args[PARAM_STYPE]               = _ts.options[_ts.selectedIndex].value;
-       args[PARAM_LOCATION] = newSearchLocation;
-       args[PARAM_DEPTH]               = parseInt(_ds.options[_ds.selectedIndex].value);
-       args[PARAM_FORM]                = _fs.options[_fs.selectedIndex].value;
-
-       goTo(buildOPACLink(args));
-}
-
-
-function searchBarToggle() {
-       if(searchBarExpanded) {
-               hideMe(G.ui.searchbar.extra_row);
-               hideMe(G.ui.searchbar.tag_on);
-               unHideMe(G.ui.searchbar.tag_off);
-       } else {
-               unHideMe(G.ui.searchbar.extra_row);
-               hideMe(G.ui.searchbar.tag_off);
-               unHideMe(G.ui.searchbar.tag_on);
-       }
-       searchBarExpanded = !searchBarExpanded;
-}
-
-
diff --git a/Open-ILS/src/javascript/lib/js/opac/sidebar.js b/Open-ILS/src/javascript/lib/js/opac/sidebar.js
deleted file mode 100644 (file)
index 37b5463..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* set up the colors in the sidebar 
-       Disables/Enables certain components based on various state data */
-function initSideBar() {
-
-       for( var p in G.ui.sidebar ) 
-               removeCSSClass(p, config.css.color_2);
-
-       var page = findCurrentPage();
-       unHideMe(G.ui.sidebar[page]);
-       addCSSClass(G.ui.sidebar[page], config.css.color_2);
-
-       /* if we're logged in, show it and replace the Login link with the Logout link */
-       if(grabUser()) {
-               G.ui.sidebar.username_dest.appendChild(text(G.user.usrname()));
-               unHideMe(G.ui.sidebar.logoutbox);
-               unHideMe(G.ui.sidebar.logged_in_as);
-               hideMe(G.ui.sidebar.loginbox);
-       }
-
-       if(G.ui.sidebar.login) G.ui.sidebar.login.onclick = initLogin;
-       if(G.ui.sidebar.logout) G.ui.sidebar.logout.onclick = doLogout; 
-
-}
-
-/* sets up the login ui components */
-var loginBoxVisible = false;
-function initLogin() {
-
-       var loginDance = function() {
-               if(doLogin()) {
-                       showCanvas();
-                       G.ui.sidebar.username_dest.appendChild(text(G.user.usrname()));
-                       unHideMe(G.ui.sidebar.logoutbox);
-                       unHideMe(G.ui.sidebar.logged_in_as);
-                       hideMe(G.ui.sidebar.loginbox);
-               }
-       }
-
-       G.ui.login.button.onclick = loginDance;
-       G.ui.login.username.onkeydown = 
-               function(evt) {if(userPressedEnter(evt)) loginDance();};
-       G.ui.login.password.onkeydown = 
-               function(evt) {if(userPressedEnter(evt)) loginDance();};
-
-       if(loginBoxVisible) {
-               showCanvas();
-       } else {
-               swapCanvas(G.ui.login.box);
-               G.ui.login.username.focus();
-       }
-       loginBoxVisible = !loginBoxVisible;
-       G.ui.login.cancel.onclick = showCanvas;
-}
-
-
diff --git a/Open-ILS/src/javascript/lib/js/util/CGI.js b/Open-ILS/src/javascript/lib/js/util/CGI.js
deleted file mode 100644 (file)
index 7d11096..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-function CGI() {
-       /* load up the url parameters */
-
-       this._keys = new Array();
-       this.data = new Object();
-
-       var string = location.search.replace(/^\?/,"");
-
-       var key = ""; 
-       var value = "";
-       var inkey = true;
-       var invalue = false;
-
-       for( var idx = 0; idx!= string.length; idx++ ) {
-
-               var c = string.charAt(idx);
-
-               if( c == "=" )  {
-                       invalue = true;
-                       inkey = false;
-                       continue;
-               } 
-
-               if(c == "&" || c == ";") {
-                       inkey = 1;
-                       invalue = 0;
-                       this.data[key] = decodeURIComponent(value);
-                       this._keys.push(key);
-                       key = ""; value = "";
-                       continue;
-               }
-
-               if(inkey) key += c;
-               else if(invalue) value += c;
-       }
-
-       this.data[key] = decodeURIComponent(value);
-       this._keys.push(key);
-}
-
-/* returns the value for the given param.  If there is only one value for the
-   given param, it returns that value.  Otherwise it returns an array of values
- */
-CGI.prototype.param = function(p) {
-       if(this.data[p] == null) return null;
-
-       if(this.data[p].length == 1)
-               return this.data[p][0];
-       return this.data[p];
-}
-
-/* returns an array of param names */
-CGI.prototype.keys = function() {
-       return this._keys;
-}
-
-/* debuggin method */
-CGI.prototype.toString = function() {
-       var string = "";
-       var keys = this.keys();
-
-       for( var k in keys ) {
-               string += keys[k] + " : ";
-               var params = this.param(keys[k]);
-
-               for( var p in params ) {
-                       string +=  params[p] + " ";
-               }
-               string += "\n";
-       }
-       return string;
-}
-
-
diff --git a/Open-ILS/src/javascript/lib/js/util/Cookie.js b/Open-ILS/src/javascript/lib/js/util/Cookie.js
deleted file mode 100644 (file)
index 8d4e6e3..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-
-DISCLAIMER: THESE JAVASCRIPT FUNCTIONS ARE SUPPLIED 'AS IS', WITH 
-NO WARRANTY EXPRESSED OR IMPLIED. YOU USE THEM AT YOUR OWN RISK. 
-PAUL STEPHENS DOES NOT ACCEPT ANY LIABILITY FOR 
-ANY LOSS OR DAMAGE RESULTING FROM THEIR USE, HOWEVER CAUSED. 
-
-Paul Stephens' cookie-handling object library
-
-Version 2.1
-2.0 - Introduces field names
-2.1 - Fixes bug where undefined embedded fields[] elements weren't written to disk
-
-www.paulspages.co.uk 
-
-TO USE THIS LIBRARY, INSERT ITS CONTENTS IN THE <HEAD> SECTION 
-OF YOUR WEB PAGE SOURCE, BEFORE ANY OTHER JAVASCRIPT ROUTINES.
-
-(C) Paul Stephens, 2001-2003. Feel free to use this code, but please leave this comment block in. This code must not be sold, either alone or as part of an application, without the consent of the author.
-*/
-
-function cookieObject(name, expires, accessPath) {
-var i, j
-this.name = name
-this.fieldSeparator = "#"
-this.found = false
-this.expires = expires
-this.accessPath = accessPath
-this.rawValue = ""
-this.fields = new Array()
-this.fieldnames = new Array() 
-if (arguments.length > 3) { // field name(s) specified
-  j = 0
-  for (i = 3; i < arguments.length; i++) {
-    this.fieldnames[j] = arguments[i]    
-    j++
-  }
-  this.fields.length = this.fieldnames.length 
-}
-this.read = ucRead
-
-this.write = ucWrite
-
-this.remove = ucDelete
-this.get = ucFieldGet
-this.put = ucFieldPut
-this.namepos = ucNamePos
-this.read()
-}
-
-
-function ucFieldGet(fieldname) {
-var i = this.namepos(fieldname)
-if (i >=0) {
-  return this.fields[i]
-} else {
-  return "BadFieldName!"
-}
-}
-
-function ucFieldPut (fieldname, fieldval) {
-var i = this.namepos(fieldname)
-
-if(i < 0) {
-       i = this.fieldnames.length;
-       this.fieldnames[i] = fieldname;
-}
-
-this.fields[i] = fieldval
-return true
-}
-
-function ucNamePos(fieldname) {
-var i 
-for (i = 0; i < this.fieldnames.length; i++) {
-  if (fieldname == this.fieldnames[i]) {
-    return i
-  }
-}
-return -1
-}
-
-
-function ucWrite() {      
-  var cookietext = this.name + "=" 
-
-// concatenate array elements into cookie string
-// Special case - single-field cookie, so write without # terminator
-if (this.fields.length == 1) {
-  cookietext += escape(this.fields[0])
-  } else { // multi-field cookie
-    for (i= 0; i < this.fields.length; i++) {
-      cookietext += escape(this.fields[i]) + this.fieldSeparator }
-  }
-
-
-// Set expiry parameter, if specified
-    if (this.expires != null) {  
-      if (typeof(this.expires) == "number") { // Expiry period in days specified  
-        var today=new Date()     
-        var expiredate = new Date()      
-        expiredate.setTime(today.getTime() + 1000*60*60*24*this.expires)
-        cookietext += "; expires=" + expiredate.toGMTString()
-      } else { // assume it's a date object
-        cookietext +=  "; expires=" + this.expires.toGMTString()
-      } // end of typeof(this.expires) if
-    } // end of this.expires != null if 
-   
-// add path, if specified
-   if (this.accessPath != null) {
-   cookietext += "; PATH="+this.accessPath }
-
-// write cookie
-   // alert("writing "+cookietext)
-   document.cookie = cookietext 
-   return null  
-}
-
-
-function ucRead() {
-  var search = this.name + "="                       
-  var CookieString = document.cookie            
-  if(CookieString == null) CookieString = "";
-  this.rawValue = null
-  this.found = false     
-  if (CookieString.length > 0) {                
-    offset = CookieString.indexOf(search)       
-    if (offset != -1) {                         
-      offset += search.length                   
-      end = CookieString.indexOf(";", offset)   
-      if (end == -1) {  // cookie is last item in the string, so no terminator                        
-       end = CookieString.length }              
-      this.rawValue = CookieString.substring(offset, end)                                   
-      this.found = true 
-      } 
-    }
-   
-if (this.rawValue != null) { // unpack into fields
-
-  var sl = this.rawValue.length
-  var startidx = 0
-  var endidx = 0
-  var i = 0
-
-// Special case - single-field cookies written by other functions,
-// so without a '#' terminator
-
-if (this.rawValue.substr(sl-1, 1) != this.fieldSeparator) {
-  this.fields[0] = unescape(this.rawValue)
-  } else { // separate fields
-
-  do  
-  {
-   endidx = this.rawValue.indexOf(this.fieldSeparator, startidx)
-   if (endidx !=-1) {
-     this.fields[i] = unescape(this.rawValue.substring(startidx, endidx))
-     i++
-     startidx = endidx + 1}
-  }
-  while (endidx !=-1 & endidx != (this.rawValue.length -1));
-}
-} // end of unpack into fields if block
-  return this.found
-} // end of function
-
-
-function ucDelete() {
-  this.expires = -10
-  this.write()
-  return this.read()
-}
-
-
diff --git a/Open-ILS/src/javascript/lib/js/util/utils.js b/Open-ILS/src/javascript/lib/js/util/utils.js
deleted file mode 100644 (file)
index e912329..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-function getId(id) {
-       return document.getElementById(id);
-}
-
-
-function addCSSClass(e,c) {
-       if(!e || !c) return;
-
-       var css_class_string = e.className;
-       var css_class_array;
-
-       if(css_class_string)
-               css_class_array = css_class_string.split(/\s+/);
-
-       var string_ip = ""; /*strip out nulls*/
-       for (var css_class in css_class_array) {
-               if (css_class_array[css_class] == c) { return; }
-               if(css_class_array[css_class] !=null)
-                       string_ip += css_class_array[css_class] + " ";
-       }
-       string_ip = string_ip + c;
-       e.className = string_ip;
-}
-
-function removeCSSClass(e, c) {
-       if(!e || !c) return;
-
-       var css_class_string = '';
-
-       var css_class_array = e.className;
-       if( css_class_array )
-               css_class_array = css_class_array.split(/\s+/);
-
-       var first = 1;
-       for (var css_class in css_class_array) {
-               if (css_class_array[css_class] != c) {
-                       if (first == 1) {
-                               css_class_string = css_class_array[css_class];
-                               first = 0;
-                       } else {
-                               css_class_string = css_class_string + ' ' +
-                                       css_class_array[css_class];
-                       }
-               }
-       }
-       e.className = css_class_string;
-}
-
-
-/*returns the character code pressed that caused the event */
-function grabCharCode(evt) {
-   evt = (evt) ? evt : ((window.event) ? event : null); 
-   if( evt ) {
-      return (evt.charCode ? evt.charCode : 
-         ((evt.which) ? evt.which : evt.keyCode ));
-   } else { return -1; }
-}       
-
-
-/* returns true if the user pressed enter */
-function userPressedEnter(evt) {
-   var code = grabCharCode(evt);
-   if(code==13||code==3) return true;
-   return false;
-}   
-
-
-function goTo(url) {location.href = url;}
-
-
-function removeChildren(dom) {
-       if(!dom) return;
-       while(dom.childNodes[0])
-               dom.removeChild(dom.childNodes[0]);
-}
-
-
-function instanceOf(object, constructorFunction) {
-
-   if(!IE) {
-      while (object != null) {
-         if (object == constructorFunction.prototype)
-            return true;
-         object = object.__proto__;
-      }
-   } else {
-      while(object != null) {
-         if( object instanceof constructorFunction )
-            return true;
-         object = object.__proto__;
-      }
-   }
-   return false;
-}         
-
-
-/* ------------------------------------------------------------------------------------------- */
-/* detect my browser */
-var isMac, NS, NS4, NS6, IE, IE4, IE4mac, IE4plus, IE5, IE5plus, IE6, IEMajor, ver4;
-function detect_browser() {       
-
-   isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
-   NS = (navigator.appName == "Netscape") ? true : false;
-   NS4 = (document.layers) ? true : false;
-   IE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
-   IEmac = ((document.all)&&(isMac)) ? true : false;
-   IE4plus = (document.all) ? true : false;
-   IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
-   IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
-   IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
-   ver4 = (NS4 || IE4plus) ? true : false;
-   NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;
-
-   IE5plus = IE5 || IE6;
-   IEMajor = 0;
-
-   if (IE4plus) {
-      var start = navigator.appVersion.indexOf("MSIE");
-      var end = navigator.appVersion.indexOf(".",start);
-      IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
-      IE5plus = (IEMajor>=5) ? true : false;
-   }
-}  
-detect_browser();
-/* ------------------------------------------------------------------------------------------- */
-
-
-function text(t) {
-       if(t == null) t = "";
-       return document.createTextNode(t);
-}
-
-function elem(name, attrs, text) {
-    var e = createAppElement(name);
-    if (attrs) {
-        for (key in attrs) {
-                         if( key == 'id') e.id = attrs[key];
-                         else e.setAttribute(key, attrs[key]);
-        }
-    }
-    if (text) e.appendChild(text(text));
-    return e;
-}                   
-
-
-/* sel is the selector object, sets selected on the 
-       option with the given value. case does not matter...*/
-function setSelector( sel, value ) {
-       if(sel && value != null) {
-               for( var i = 0; i!= sel.options.length; i++ ) { 
-                       if( sel.options[i] ) {
-                               var val = sel.options[i].value;
-                               value += ""; /* in case of number */ 
-                               if( val && val.toLowerCase() == value.toLowerCase() ) {
-                                       sel.selectedIndex = i;
-                                       sel.options[i].selected = true;
-                               }
-                       }
-               }
-       }
-}
-
-
-/* split on spaces.  capitalize the first /\w/ character in
-   each substring */
-function normalize(val) {
-
-   if(!val) return ""; 
-
-   var newVal = '';
-   try {val = val.split(' ');} catch(E) {return val;}
-   var reg = /\w/;
-
-   for( var c = 0; c < val.length; c++) {
-
-      var string = val[c];
-      var cap = false; 
-      for(var x = 0; x != string.length; x++) {
-
-         if(!cap) {
-            var ch = string.charAt(x);
-            if(reg.exec(ch + "")) {
-               newVal += string.charAt(x).toUpperCase();
-               cap = true;
-               continue;
-            }
-         }
-
-         newVal += string.charAt(x).toLowerCase();
-      }
-      if(c < (val.length-1)) newVal += " ";
-   }
-
-   newVal = newVal.replace(/\s*\.\s*$/,'');
-   newVal = newVal.replace(/\s*\/\s*\/\s*$/,' / ');
-   newVal = newVal.replace(/\s*\/\s*$/,'');
-
-   return newVal;
-}
-
-
-/* returns true if n is null or stringifies to 'undefined' */
-function isNull(n) {
-       if( n == null || n.toString().toLowerCase() == "undefined" 
-               || n.toString().toLowerCase() == "null" )
-               return true;
-       return false;
-}
-
-
-/* find nodes with an attribute of 'name' that equals nodeName */
-
-function findNodeByName(root, nodeName) {
-       if( !root || !nodeName) return null;
-
-       if(root.nodeType != 1) return null;
-
-       if(root.getAttribute("name") == nodeName ||
-                       root.name == nodeName ) {
-               return root;
-       }
-
-       var children = root.childNodes;
-
-       for( var i = 0; i != children.length; i++ ) {
-               var n = findNodeByName(children[i], nodeName);
-               if(n) return n;
-       }
-
-       return null;
-
-}
-
-
-/* truncates the string at 'size' characters and appends a '...' to the end */
-function truncate(string, size) {
-       if(string && size != null && 
-                       size > -1 && string.length > size) 
-               return string.substr(0, size) + "..."; 
-       return string;
-}
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/opac/AboutPage.js b/Open-ILS/src/javascript/opac/AboutPage.js
deleted file mode 100644 (file)
index 60291bc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-AboutPage.prototype                                    = new Page();
-AboutPage.prototype.constructor        = AboutPage;
-AboutPage.baseClass                                    = Page.constructor;
-
-function AboutPage() {
-       this.searchBarForm      = new SearchBarFormChunk();
-       this.searchBar                  = new SearchBarChunk();
-}
diff --git a/Open-ILS/src/javascript/opac/AbstractRecordResultPage.js b/Open-ILS/src/javascript/opac/AbstractRecordResultPage.js
deleted file mode 100644 (file)
index 3014de8..0000000
+++ /dev/null
@@ -1,815 +0,0 @@
-
-AbstractRecordResultPage.prototype                                     = new Page();
-AbstractRecordResultPage.prototype.constructor = AbstractRecordResultPage;
-AbstractRecordResultPage.baseClass                                     = Page.constructor;
-
-
-/* constructor for our singleton object */
-function AbstractRecordResultPage() {}
-
-
-/* initialize all of the UI components and set up data structures */
-AbstractRecordResultPage.prototype.init = function() {
-
-       debug( "Initing an AbstractRecordResultPage" );
-
-       /* included page chunks */
-       this.searchBar                  = new SearchBarChunk();
-
-       /* UI objects */
-       this.recordBox                  = getById("record_result_box");
-
-       this.authorBox = new Box();
-       this.authorBox.init("Relevant Authors", true, true, 15);
-       this.authorBox.sortByKey();
-
-       this.subjectBox = new Box();
-       this.subjectBox.init("Relevant Subjects", true, true, 15);
-       this.subjectBox.sortByCount();
-
-       this.seriesBox = new Box();
-       this.seriesBox.init("Relevant Series", true, true, 15);
-       this.seriesBox.sortByKey();
-
-       this.sidebarBox         = getById("record_sidebar_box");
-
-       this.sidebarBox.appendChild(this.buildNavBox());
-       this.sidebarBox.appendChild(elem("br"));
-
-       if(!this.hitsPerPage)
-               this.hitsPerPage                = 10;    /* how many hits are displayed per page */
-
-       this.resetPage();
-
-       this.statusBar                  = getById("top_status_bar_table");
-       this.theadDrawn         = false;
-       this.bigOlBox                   = getById("big_ol_box");
-
-}
-
-
-
-/** Resets data structures for a new search */
-AbstractRecordResultPage.prototype.resetPage = function() {
-       this.searchBar.reset();
-       var spot = getById("progress_bar_location");
-       var spot2 = getById("progress_bar_percent_location");
-       if(spot) {
-               while(spot.lastChild) 
-                       spot.removeChild(spot.lastChild);
-
-               /* progress items for each record and it's hit count listing */
-               this.progressBar = new ProgressBar(parseInt(this.hitsPerPage) * 2);
-               spot.appendChild(this.progressBar.getNode());
-       }
-       if(spot2 && this.progressBar)
-               spot2.appendChild(this.progressBar.percentDiv);
-       this.received = 0;
-
-       RemoteRequest.cancelAll();
-
-       this.requestBatch = new RequestBatch();
-       this.finalized = false;
-       this.builtLinks = false;
-
-       this.hitsPerPageSelector = getById('hits_per_page');
-
-       var obj = this;
-       this.hitsPerPageSelector.onchange = function() {
-
-               var hits;
-               var hits_obj = obj.hitsPerPageSelector.options[
-                       obj.hitsPerPageSelector.selectedIndex]; 
-
-               if(hits_obj == null)
-                       return;
-
-               hits = hits_obj.value
-
-               debug("Hits per page set to " + hits );
-
-               obj.hitsPerPage = parseInt(hits);       
-
-
-               var location = globalSelectedLocation;
-               if(location == null) location = globalLocation.id();
-
-               url_redirect(obj.URLRefresh());
-               obj = null;
-       }
-
-
-       for( var i in this.hitsPerPageSelector.options ) {
-
-               var hits_obj = obj.hitsPerPageSelector.options[i];
-               if(hits_obj == null) continue;
-               var hits = hits_obj.value;
-
-               if( this.hitsPerPage == parseInt(hits) ) 
-                       this.hitsPerPageSelector.options[i].selected = true;
-       }
-
-}
-
-
-AbstractRecordResultPage.prototype.resetSearch = function() {
-       this.recordIDs                          = new Array();
-       this.ranks                                      = new Array();
-       this.hitCount                           = 0;                                    /* hits for the current search */
-       this.searchOffset                       = 0;                                    /* the offset for the search display */
-       this.page                                       = 0;
-
-}
-
-AbstractRecordResultPage.prototype.gatherIDs = function(result) {
-       if(result == null) return;
-
-       this.hitCount = parseInt(result.count);
-
-       if(result.ids.length < 1) {
-               this.finalizePage();
-               return false;
-       }
-       
-
-       /* the 'ids' field consist of [record, rank] */
-       /* gather all of the ID's */
-       if( result.ids  && typeof result.ids == 'object' 
-                       && result.ids[0] != null
-                       && result.ids[0].constructor == Array ) {
-
-               for( var i in result.ids ) {
-                       if(result.ids[i]==null || result.ids[i][0] == null) break;
-                       var offset = parseInt(i) + parseInt(this.searchOffset);
-                       this.recordIDs[offset] = result.ids[i][0];
-                       var rank = parseFloat(result.ids[i][1]);
-                       if(rank == 0)
-                               rank = 0.00000001; /* protect divide by 0 */
-                       this.ranks[offset] =  rank;
-                       /*
-                       debug("adding ranks[" + offset + "] = " + result.ids[i][1] + 
-                                       "  \nrecordIDs["+offset+"], result.ids["+i+"][0]");
-                                       */
-               }
-
-       } else {
-
-               for( var i in result.ids ) {
-                       if(result.ids[i]==null) break;
-                       var offset = parseInt(i) + parseInt(this.searchOffset);
-                       this.recordIDs[offset] = result.ids[i];
-                       debug("adding recordIDs["+offset+"], result.ids["+i+"]");
-               }
-       }
-
-       return true;
-}
-
-
-
-AbstractRecordResultPage.prototype.complete = function() {
-
-}
-
-
-AbstractRecordResultPage.prototype.displayRecord = 
-       function( record, search_id, page_id ) {
-
-       if(record == null) return;
-
-       debug("Displaying record " + record.doc_id());
-
-       if(!instanceOf(record, Fieldmapper)) {
-               debug(" * Received bogus record " + js2JSON(record));
-               return;
-       }
-
-       if(page_id == 0)
-               this.buildNextLinks();
-
-       this.received += 1;
-
-       this.progressBar.manualNext();
-
-       var id = parseInt(page_id);
-       var title_row = table_row_find_or_create(this.recordBox, id * 3 + 1 );
-       var author_row = table_row_find_or_create(this.recordBox, id * 3 + 2 );
-       var misc_row = table_row_find_or_create(this.recordBox, id * 3 + 3 );
-
-       add_css_class(misc_row, "record_misc_row");
-       add_css_class(title_row, "record_title_row");
-
-
-       var c = misc_row.insertCell(0);
-
-       /* shove in a div for each of the types of resource */
-       for( var i = 0; i!= 9; i++) {
-               var div = createAppElement("div");
-               div.innerHTML = "&nbsp;";
-               add_css_class(div, "record_resource_div");
-               c.appendChild(div);
-       }
-       //var options_cell = misc_row.insertCell(1);
-
-       c.className = "record_misc_cell";
-       var resources = record.types_of_resource();
-
-       for( var i in resources ) {
-
-               var a;
-               if(instanceOf(this,MRResultPage)) {
-                       var prefix = "http://" + globalRootURL + ":" + globalPort + globalRootPath;
-                       var res = modsFormatToMARC(resources[i]);
-                       var a = elem("a", 
-                               {href: prefix + "?target=record_result&mrid=" +
-                               record.doc_id() + "&format=" + res +
-                               "&page=0&location=" + this.searchLocation +
-                               "&depth=" + this.searchDepth} );
-               }
-               this.buildResourcePic( c, resources[i], a);
-       }
-
-       author_row.id = "record_result_author_row_" + id;
-       title_row.id = "record_result_title_row_" + id;
-
-       /* build the appropriate context node for this result */
-       var menu_name = "record_result_row_" + page_id;
-       var menu = globalMenuManager.buildMenu(menu_name);
-
-       this.addMenuItems( menu, record );
-
-       globalMenuManager.setContext(title_row, menu);
-       globalMenuManager.setContext(author_row, menu);
-       globalMenuManager.setContext(misc_row, menu);
-
-       getDocument().body.appendChild(menu.getNode());
-
-       //var optionsLink = this.buildExtendedLinks(record, page_id);
-       //if(optionsLink)
-       //      options_cell.appendChild(optionsLink);
-       /* ------------------------------------ */
-
-
-       var pic_cell = title_row.insertCell(0);
-       this.buildRecordImage( pic_cell, record, page_id, record.title());
-
-       var title_cell = title_row.insertCell(title_row.cells.length);
-       title_cell.id = "record_result_title_box_" + id;
-       add_css_class( title_cell, "record_result_title_box");
-
-       var author_cell = author_row.insertCell(author_row.cells.length);
-       author_cell.id = "record_result_author_box_" + id;
-       add_css_class(author_cell, "record_result_author_box");
-
-
-       /* limit the length of the title and author lines */
-       var tlength = 80;
-
-       var title = "";
-       if( record.title() ) {
-               if(record.title().length > tlength) {
-                       record.title(record.title().substr(0,tlength));
-                       record.title(record.title() + "...");
-               }
-               title = normalize(record.title());
-       }
-
-
-       var author = "";
-       if( record.author() ) {
-               if(record.author().length > tlength) {
-                       record.author( record.author().substr(0,tlength));
-                       record.author(record.author() + "...");
-               }
-               author = normalize(record.author());
-       }
-
-       title_cell.appendChild(this.mkLink(record.doc_id(), "title", title, record.title() ));
-       author_cell.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
-       author_cell.appendChild(this.mkLink(record.doc_id(), "author", author ));
-
-       /*
-       var marcd = null;
-       if(instanceOf(this, RecordResultPage)) {
-               var span = createAppElement("span");
-               span.style.marginLeft = "10px";
-
-               if(record.pubdate() || record.edition())
-                       span.appendChild(createAppTextNode(" -- "));
-
-               if(record.pubdate())
-                       span.appendChild(createAppTextNode(" " + record.pubdate()));
-
-               if(record.edition())
-                       span.appendChild(createAppTextNode(" " + record.edition()));
-
-               author_cell.appendChild(span);
-
-               var marcb = elem( "a",
-                       {       href:"javascript:void(0)", 
-                               style: "text-decoration:underline;"
-                       }, null, "View MARC" );
-
-               debug("Setting up view marc callback with record " + record.doc_id());
-               var func = buildViewMARCWindow(record);
-               marcb.onclick = func;
-
-               marcd = elem( "div", { style: "float:right;font-size:x-small;" } );
-               marcd.appendChild(marcb);
-
-       }
-       */
-
-       var holddiv = null;
-       if(instanceOf(this, RecordResultPage)) {
-
-               var holds = elem( "a", 
-               { 
-                       href:"javascript:void(0)", 
-                       style: "text-decoration:underline" 
-               }, {}, "Place Hold" );
-       
-       
-               var type = "M";
-               if(instanceOf(this, RecordResultPage))
-                       type = "T";
-       
-               var win;
-               var user = UserSession.instance();
-               if(user.verifySession()) {
-                       win = new HoldsWindow(record.doc_id(), 
-                               type, user.userObject, user.userObject, user.session_id);
-               } else {
-                       win = new HoldsWindow(record.doc_id(), 
-                               type, null, null, null);
-               }
-       
-               
-               holds.onclick = function() { win.toggle(holds); }
-               holddiv = elem("div");
-       
-               holddiv.setAttribute("style", "float:right");
-               holddiv.appendChild(holds);
-       }
-       
-       var tab = elem("table",{style:"float:right"});
-       var tr = tab.insertRow(0);
-       var tc = tr.insertCell(0);
-       var tc2 = tr.insertCell(1);
-       var tc3 = tr.insertCell(2);
-       tc.setAttribute("nowrap", "nowrap");
-       tc3.setAttribute("nowrap", "nowrap");
-
-       if(holddiv) tc.appendChild(holddiv);
-       tc2.appendChild(mktext(" "));
-       //if(marcd) tc3.appendChild(marcd);
-
-       c.appendChild(tab);
-
-
-
-       var classname = "result_even";
-       if((page_id % 2) != 0) 
-               classname = "result_odd";
-
-       add_css_class(title_row, classname);
-       add_css_class(author_row, classname);
-       add_css_class(misc_row, classname);
-
-       /* now grab the record authors and subjects */
-       if( author ) {
-               this.authorBox.addItem( this.mkAuthorLink(author) , author);
-       }
-
-       /* gather the subjects.  subjects are either a string or an array of
-               [subject, broader topic].  currently, they're all just treated like
-               subjects */
-       var arr = record.subject();
-       var x = 0;
-       for( var sub in arr ) {
-               if(x++ > 5) break; /* too many subjects makes things real sluggish */
-
-               var ss = arr[sub];
-
-               /* only taking first part of subject (non-topic, etc.) */
-               if( ss.constructor == Array)
-                       ss = ss[0];
-
-               if( ss.constructor != Array )
-                       ss = [ss];
-
-               for( var i in ss ) {
-                       var s = normalize(ss[i]);
-                       this.subjectBox.addItem( this.mkSubjectLink(s), s );
-               }
-       }
-
-       var series = record.series();
-       for( var s in  series ) {
-               debug("Found series entry: " + series[s] );
-               var ss = normalize(series[s]);
-               this.seriesBox.addItem( this.mkSeriesLink(ss), ss );
-       }
-
-       /* requestBatch will only have one request in it when the current
-               record is the last record requested */
-       if( this.requestBatch.pending() < 2  )
-               this.finalizePage();
-
-       debug("Finished displaying record " + record.doc_id());
-}
-
-AbstractRecordResultPage.prototype.mkAuthorLink = function(auth) {
-       var href = createAppElement("a");
-       add_css_class(href,"record_result_sidebar_link");
-
-       href.setAttribute("href",
-               "?target=mr_result&mr_search_type=author&page=0&mr_search_query=" +
-               encodeURIComponent(auth) +
-               "&mr_search_depth=" + this.searchDepth +
-               "&mr_search_location=" + this.searchLocation +
-               "&location=" +  this.searchLocation +
-               "&format=" + this.format +
-               "&depth=" +  this.searchDepth);
-
-       href.appendChild(createAppTextNode(auth));
-       href.title = "Author search for " + auth;
-       return href;
-}
-
-AbstractRecordResultPage.prototype.mkSeriesLink = function(series) {
-       var href = createAppElement("a");
-       add_css_class(href,"record_result_sidebar_link");
-
-       debug("Series: " + series + " : " + encodeURIComponent(series));
-
-       href.setAttribute("href",
-               "?target=mr_result&mr_search_type=series&page=0&mr_search_query=" +
-               encodeURIComponent(series) +
-               "&mr_search_depth=" + this.searchDepth +
-               "&mr_search_location=" + this.searchLocation +
-               "&location=" +  this.searchLocation +
-               "&format=" + this.format +
-               "&depth=" +  this.searchDepth);
-
-       href.appendChild(createAppTextNode(series));
-       href.title = "Series search for " + series;
-       return href;
-}
-
-AbstractRecordResultPage.prototype.mkSubjectLink = function(sub) {
-       var href = createAppElement("a");
-       add_css_class(href,"record_result_sidebar_link");
-       href.setAttribute("href",
-               "?target=mr_result&mr_search_type=subject&page=0&mr_search_query=" +
-               encodeURIComponent(sub) + 
-               "&mr_search_depth=" + this.searchDepth +
-               "&mr_search_location=" + this.searchLocation +
-               "&location=" +  this.searchLocation +
-               "&format=" + this.format +
-               "&depth=" +  this.searchDepth);
-
-       href.appendChild(createAppTextNode(sub));
-       href.title = "Subject search for " + sub;
-       return href;
-}
-
-AbstractRecordResultPage.prototype.finalizePage = function() {
-
-       if( this.finalized )
-               return;
-       this.finalized = true;
-
-
-       this.subjectBox.finalize();
-       this.authorBox.finalize();
-       this.seriesBox.finalize();
-
-       this.sidebarBox.appendChild(this.subjectBox.getNode());
-       this.sidebarBox.appendChild(createAppElement("br"));
-
-       this.sidebarBox.appendChild(this.authorBox.getNode());
-       this.sidebarBox.appendChild(createAppElement("br"));
-
-       this.sidebarBox.appendChild(this.seriesBox.getNode());
-       this.sidebarBox.appendChild(createAppElement("br"));
-
-//     showMe(this.buttonsBox);
-
-       var ses = UserSession.instance().getSessionId();
-       var box = this.sidebarBox;
-
-       if(ses) {
-               Survey.retrieveOpacRandom(ses, 
-                       function(sur) { 
-                               sur.setSubmitCallback(
-                                       function() { alert("Thanks!"); return true; });
-                               box.appendChild( sur.getNode() ); 
-                               sur.setHidden(false);
-                       }
-               );
-       } else {
-               Survey.retrieveOpacRandomGlobal( 
-                       function(sur) { 
-                               sur.setSubmitCallback(
-                                       function() { alert("Thanks!"); return true; });
-                               box.appendChild( sur.getNode() ); 
-                               sur.setHidden(false);
-                       }
-               );
-       }
-
-
-       if(this.hitCount < 1) {
-               if(this.progressBar) this.progressBar.stop();
-       }
-
-       /* in case we're hidden */
-       showMe(this.bigOlBox);
-       showMe(getById("hit_count_cell_2"));
-
-}
-
-
-AbstractRecordResultPage.prototype.displayCopyCounts = 
-       function(copy_counts, search_id, page_id) {
-               
-       this.progressBar.manualNext();
-       var titlerow  = getById("record_result_title_row_" + page_id );
-       var authorrow  = getById("record_result_author_row_" + page_id );
-
-       var tcell = getById("record_result_title_box_" + page_id );
-
-       if(!this.theadDrawn) {
-               var trow = getById("record_result_thead_row");
-               for( var i in copy_counts) {
-                       var cell = trow.insertCell(trow.cells.length);
-                       add_css_class(cell,"record_result_thead_header");
-                       cell.innerHTML = 
-                               findOrgType(findOrgUnit(
-                                       copy_counts[i].org_unit).ou_type()).opac_label();
-               }
-               this.theadDrawn = true;
-       }
-
-       for( var i in copy_counts) {
-               var cell = createAppElement("td");
-               add_css_class(cell, "copy_count_cell");
-               cell.innerHTML = copy_counts[i].available + " / " + copy_counts[i].count;
-               cell.setAttribute("rowspan","3");
-               cell.rowSpan = 3;
-               cell.title = " Availabie Copies / Total Copies";
-               titlerow.appendChild(cell);
-       }
-
-       if(page_id  == (parseInt(this.hitsPerPage) - 1) ) {
-               if(this.progressBar) this.progressBar.stop();
-               if(this.hitCount < 1)
-                       this.noHits();
-       }
-
-       if( (page_id  == ((parseInt(this.hitCount) - 1 ) - parseInt(this.searchOffset))) ||
-                       (page_id == (parseInt(this.hitsPerPage) - 1) )) 
-               if(this.progressBar) this.progressBar.stop();
-}
-
-
-
-AbstractRecordResultPage.prototype.noHits = function() {
-       var hcell = getById("hit_count_cell");
-       //hcell.appendChild(createAppElement("br"));
-       hcell.appendChild(createAppTextNode("0 hits were returned for you search"));
-}
-
-
-AbstractRecordResultPage.prototype.buildNextLinks = function() {
-
-       if(this.builtLinks)
-               return;
-       this.builtLinks = true;
-
-       var obj = this;
-       var next;
-       var prev;
-
-       debug("Building links");
-       if( this.searchOffset < (parseInt(this.hitCount) - this.hitsPerPage)) {
-               next = createAppElement("a");
-               add_css_class(next,"record_next_button");
-               add_css_class(next,"record_next_button_active");
-               next.href = "javascript:globalPage.next();";
-       } else {
-               next = createAppElement("span");
-               add_css_class(next,"record_next_button_inactive");
-       }
-
-       if(this.searchOffset > 0) {
-               prev = createAppElement("a");
-               add_css_class(prev,"record_next_button");
-               add_css_class(prev,"record_next_button_active");
-               prev.href = "javascript:globalPage.prev();";
-       } else {
-               prev = createAppElement("span");
-               add_css_class(prev,"record_next_button_inactive");
-       }
-
-       next.appendChild(createAppTextNode("Next"));
-       prev.appendChild(createAppTextNode("Previous"));
-
-
-       var i = this.searchOffset;
-       var max = parseInt(i) + this.hitsPerPage;
-       if( max > this.hitCount )
-               max = this.hitCount;
-
-       var hcell = getById("hit_count_cell");
-       var hcell2 = getById("hit_count_cell_2");
-       hideMe(hcell2);
-
-       if(hcell) {
-
-               var ident = "Titles";
-               if(instanceOf(this, MRResultPage))
-                       ident = "Title Groups";
-       
-               hcell.appendChild(
-                       createAppTextNode( "Displaying " + ident + " " +
-                       ( parseInt(i) + 1 ) + " to " + max + " of " + this.hitCount));
-       
-               hcell.appendChild(createAppTextNode(" "));
-               hcell.appendChild(createAppTextNode(" "));
-               hcell.appendChild(createAppTextNode(" "));
-       
-               hcell.appendChild(prev);
-               var span = createAppElement("span");
-               span.appendChild(createAppTextNode(" ... "));
-               hcell.appendChild(span);
-               hcell.appendChild(next);
-       
-               hcell2.innerHTML = hcell.innerHTML;
-       
-       }
-       
-}
-
-
-AbstractRecordResultPage.prototype.buildResourcePic = function(c, resource, parent) {
-       return buildResourcePic(c, resource, parent);
-}
-
-function buildResourcePic(c, resource, parent) {
-
-       var pic = createAppElement("img");
-
-       if(resource.indexOf("sound recording") != -1) 
-               resource = "sound recording";
-       pic.setAttribute("src", "/images/" + resource + ".jpg");
-       pic.setAttribute("border", "0");
-       pic.className = "record_resource_pic";
-       pic.setAttribute("width", "20");
-       pic.setAttribute("height", "20");
-       pic.setAttribute("title", resource);
-
-
-       var index;
-
-       switch(resource) {
-
-               case "text":
-                       index = 0;
-                       break;
-
-               case "moving image":
-                       index = 1;
-                       break;
-
-               case "sound recording":
-                       index = 2;
-                       break;
-
-               case "software, multimedia":
-                       index = 3;
-                       break;
-
-               case "still images":
-                       index = 4;
-                       break;
-
-               case "cartographic":
-                       index = 5;
-                       break;
-
-               case "mixed material":
-                       index = 6;
-                       break;
-
-               case "notated music":
-                       index = 7;
-                       break;
-
-               case "three dimensional object":
-                       index = 8;
-                       break;
-
-               default:
-                       index = 0;
-       }
-
-       c.childNodes[index].innerHTML = "";
-
-       if(parent) {
-               parent.appendChild(pic);
-               c.childNodes[index].appendChild(parent);
-       } else {
-               c.childNodes[index].appendChild(pic);
-       }
-}
-
-AbstractRecordResultPage.prototype.buildRecordImage = function(pic_cell, record, page_id, title) {
-
-       debug("Building record image for " + page_id);
-
-       /*
-       var isbn = record.isbn();
-       if(isbn) {
-               isbn = isbn.replace(/^\s+/,"");
-               var idx = isbn.indexOf(" ");
-               if(idx > -1) {
-                       isbn = isbn.substring(0, idx);
-               }
-
-       } else isbn = "";
-       */
-
-       pic_cell.setAttribute("rowspan","3");
-       pic_cell.rowSpan = 3;
-
-       pic_cell.noWrap = 'nowrap';
-       pic_cell.setAttribute("nowrap", "nowrap");
-
-       pic_cell.width = "60";
-       pic_cell.className = "record_image_cell";
-
-
-       var rankBox;
-       if( this.ranks.length > 0 ) {
-               var x = (parseInt(this.page) * parseInt(this.hitsPerPage)) + parseInt(page_id);
-               var per = parseInt(this.ranks[x] / this.ranks[0] * 100.0);
-
-               debug("Per is " + per);
-               per = 100 - parseInt(per);
-
-               rankBox = createAppElement("div");
-               add_css_class(rankBox, "relevance_box");
-
-               var d = createAppElement("div");
-               d.setAttribute("height", per + "%");
-               d.style.height = per + "%";
-
-               add_css_class(d, "relevance");
-               rankBox.appendChild(d);
-
-               rankBox.setAttribute("title", parseInt((100 - parseInt(per))) + "% Relevant");
-       }
-
-       /* use amazon for now */
-       //var img_src = "http://images.amazon.com/images/P/" +isbn + ".01.MZZZZZZZ.jpg";
-       //var img_src = "http://www.thecontentserver.com/bin/cntsvr.dll?GetImage&SysID=Content&CustID=Cafe&Return=1&Type=S&Key=" + isbn ;
-
-       var img_src = buildISBNSrc(cleanISBN(record.isbn()));
-       var big_div = createAppElement("div");
-       add_css_class(big_div, "record_image_big hide_me");
-
-       var big_pic = createAppElement("img");
-       var pic = createAppElement("img");
-       
-       big_pic.setAttribute("src", img_src);
-       big_pic.setAttribute("border", "0");
-       pic.setAttribute("src", img_src);
-       add_css_class(big_pic, "record_image");
-       add_css_class(pic, "record_image");
-
-       pic.setAttribute("width", "45");
-       pic.setAttribute("height", "50");
-       pic.style.width = "45";
-       pic.style.height = "50";
-
-       if(IE) 
-               big_div.style.left = 0;
-
-
-       var anch = this.mkLink(record.doc_id(), "img", title );
-       anch.appendChild(big_pic);
-       big_div.appendChild(anch);
-       pic_cell.appendChild(big_div);
-
-       pic_cell.appendChild(pic);
-
-       if(rankBox)
-               pic_cell.appendChild(rankBox);
-
-       pic.onmouseover = function() {showMe(big_div);}
-       big_div.onmouseout = function(){hideMe(big_div);}
-
-}
-
diff --git a/Open-ILS/src/javascript/opac/AdvancedSearchPage.js b/Open-ILS/src/javascript/opac/AdvancedSearchPage.js
deleted file mode 100644 (file)
index 0f4d5a9..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-AdvancedSearchPage.prototype                                   = new Page();
-AdvancedSearchPage.prototype.constructor       = AdvancedSearchPage;
-AdvancedSearchPage.baseClass                                   = Page.constructor;
-
-
-var globalAdvancedSearchPage = null;
-
-// ---------------------------------------------------------------------------------
-// advanced search
-// ---------------------------------------------------------------------------------
-function AdvancedSearchPage() {
-
-       if(globalAdvancedSearchPage) 
-               return globalAdvancedSearchPage;
-
-       this.searchBar = new SearchBarChunk();
-       globalAdvancedSearchPage = this;
-}
-
-
-AdvancedSearchPage.prototype.init = function() {
-       this.searchBarForm      = new SearchBarFormChunk();
-       this.searchBar                  = new SearchBarChunk();
-
-       this.advISBN                    = getById("adv_isbn");
-
-       /* global search */
-       this.globalSearchButton = getById("adv_global_search_button");
-       this.tcnText                            = getById("adv_tcn_text");
-       this.ISBNText                           = getById("adv_isbn_text");
-       this.barcodeText                        = getById("adv_barcode_text");
-       var refinedButton                       = getById("adv_search_refined_submit");
-
-       this.globalSearchButton.onclick = doGlobalSearch;
-       refinedButton.onclick = doGlobalSearch;
-       this.buildNavBox();
-}
-
-/* resets the page */
-AdvancedSearchPage.prototype.reset = function() {
-       this.advISBN.focus();
-}
-
-AdvancedSearchPage.instance = function() {
-       if(globalAdvancedSearchPage) {
-               return globalAdvancedSearchPage;
-       }
-       return new AdvancedSearchPage();
-}
-
-function doGlobalSearch() {
-
-       var obj = AdvancedSearchPage.instance();
-
-       if( obj.ISBNText.value != null 
-                       && obj.ISBNText.value.length > 1 ) {
-               url_redirect( [ "target", "record_result", "page", "0",
-                               "search", "global", "isbn", obj.ISBNText.value ] );
-               /* do isbn search */
-       }
-
-       if( obj.tcnText.value != null 
-                       && obj.tcnText.value.length > 1 ) {
-               url_redirect( [ "target", "record_result", "page", "0", 
-                               "search", "global", "tcn", obj.tcnText.value ] );
-               return;
-       }
-       if( obj.barcodeText.value != null 
-                       && obj.barcodeText.value.length > 1 ) {
-               url_redirect( [ "target", "record_result", "page", "0", 
-                               "search", "global", "barcode", obj.barcodeText.value ] );
-               return;
-       }
-
-       var allWords = getById("adv_all_words").value;
-       var exactWords = getById("adv_exact_words").value;
-       var noneWords   = getById("adv_none_words").value;
-       var type = getById("adv_search_type").value;
-       if(allWords || exactWords || noneWords) {
-               var search_string = obj.buildRefinedSearch(allWords, exactWords, noneWords);
-               debug("Refined search string is [ " + search_string + " ] and type " + type);
-
-               url_redirect ([ 
-                               "target",                                       "mr_result",
-                               "mr_search_type",                       type,
-                               "mr_search_query",              search_string,
-                               "page",                                         0
-                               ]);
-
-       }
-
-}
-
-AdvancedSearchPage.prototype.buildRefinedSearch = 
-                       function(allWords, exactWords, noneWords) {
-       
-       var string = "";
-
-       if(allWords) {
-               string = allWords;
-       }
-
-       if(exactWords) {
-               if(exactWords.indexOf('"') > -1) 
-                       string += " " + exactWords;
-               else 
-                       string += " \"" + exactWords + "\"";
-               
-       }
-
-       if(noneWords) {
-               var words = noneWords.split(" ");
-               for(var i in words) 
-                       string += " -" + words[i];
-       }
-
-       return string;
-}
-               
-
diff --git a/Open-ILS/src/javascript/opac/GlobalInit.js b/Open-ILS/src/javascript/opac/GlobalInit.js
deleted file mode 100644 (file)
index f82cebe..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/* */
-
-var globalPage                                         = null; /* the current top level page object */
-var globalUser                                         = null; /* the user session */
-var globalOrgTreeWidget                        = null;
-var globalLocation                             = null;
-var globalOrgTreeWidgetBox             = null;
-var globalSelectedLocation             = null;
-var globalSearchDepth                  = null;
-var globalMenuManager                  = null;
-var globalCopyStatus                           = null;
-var locationStack                                      = new Array();
-var globalCopyLocations                        = null;
-
-var lastSearchString                           = null;
-var lastSearchType                             = null;
-
-/* this is true if we directed to the record detail page
-       becuase of only having one hit on the record result
-       page.  this allows us to back up from the detail
-       page to the mr_result page */
-var recordResultRedirect = false;
-
-var loaded = false;
-
-
-function addLocation(type, title) {
-       try { 
-               if(globalAppFrame) {
-                       var obj = new Object();
-                       obj.location = globalAppFrame.location.href;
-                       obj.title = title;
-                       locationStack[type] = obj;
-               }
-       } catch(E){}
-
-}
-
-function _test() {
-       debug("At: " + (new RegExp(".+").exec(
-                       arguments.callee.toString()))[0].replace("{", "") );
-}
-
-
-function globalInit() {
-
-
-       _test();
-       debug(" --- XUL IS " + isXUL() );
-
-
-       if( isXUL() && globalAppFrame )
-               globalAppFrame.document.body.style.background = "#FFF";
-
-       getDocument().body.onunload = cleanIEMemory;
-
-
-       var page_name = globalPageTarget;
-
-       if(!page_name) 
-               throw new EXArg("globalInit requires globalPageTarget to be set");
-
-       debug("globalInit init-ing page: " + page_name );
-
-       switch( page_name ) {
-
-               case "start":
-                       globalPage = new OPACStartPage();
-                       addLocation("start", "Home");
-                       locationStack["advanced_search"] = null;
-                       break;
-
-               case  "advanced_search":
-                       globalPage = new AdvancedSearchPage();
-                       addLocation("advanced_search", "Advanced Search");
-                       locationStack["start"] = null;
-                       break;
-
-               case  "mr_result":
-                       //globalPage = new MRResultPage();
-                       globalPage = MRResultPage.instance();
-                       addLocation("mr_result", "Title Group Results");
-                       break;
-
-               case  "record_result":
-                       //globalPage = new RecordResultPage();
-                       globalPage = RecordResultPage.instance();
-                       addLocation("record_result", "Title Results");
-                       break;
-
-               case  "login":
-                       globalPage = new LoginPage();
-                       break;
-
-               case  "logout":
-                       globalPage = new LogoutPage();
-                       break;
-
-               case  "my_opac":
-                       globalPage = new MyOPACPage();
-                       break;
-
-               case "record_detail":
-                       globalPage = new RecordDetailPage();
-                       addLocation("record_detail", "Title Details");
-                       break;
-
-               case  "about":
-                       globalPage = new AboutPage();
-                       break;
-
-               }
-
-       if( ! globalPage ) 
-               throw new EXArg(
-                       "globalInit requires a valid page target: " + page_name );
-
-       if(!loaded) { loaded = true; GlobalInitLoad(); }
-
-       globalMenuManager = new ContextMenuManager();
-
-       /* hide all context menus on body click */
-       getDocument().body.onclick = function() {
-                       globalMenuManager.hideAll(); 
-       }
-
-       globalPage.init();
-
-       if(paramObj.__location != null) {
-               debug("Someone passed us a location ID of " + paramObj.__location);
-
-               globalSelectedLocation = findOrgUnit(paramObj.__location);
-
-               if(paramObj.__depth == null) {
-                       paramObj.__depth = findOrgType(globalSelectedLocation.ou_type()).depth();
-               }
-
-               if(globalSelectedLocation == null) 
-                       debug("Invalid location in url : " + paramObj.__location);
-               else
-                       debug("Setting selected location to " + globalSelectedLocation.name() );
-
-       } else {
-               debug("No location provided in URL");
-       }
-
-
-       if(paramObj.__depth != null) {
-               debug("Passed in depth from search params: " + paramObj.__depth);
-               globalSearchDepth = parseInt(paramObj.__depth);
-               debug("Setting selected depth to " + globalSearchDepth );
-       }
-
-       globalPage.setLocDisplay();
-       globalPage.locationTree = globalOrgTreeWidget;
-       globalPage.setPageTrail();
-
-       if(globalSearchBarChunk)
-               globalSearchBarChunk.reset();
-       
-       if( globalSearchBarFormChunk != null)
-               globalSearchBarFormChunk.resetPage();
-
-
-
-}
-
-
-/* we only do this on loading of the outer frame (i.e. only once) */
-function GlobalInitLoad() {
-
-       debug("Global Init is doing its primary load");
-       globalOrgTreeWidget = new LocationTree(globalOrgTree);
-
-       var ses = null;
-       var org = null;
-
-       if(isXUL()) {
-               ses = G['auth_ses'][0]; /* G is shoved in by XUL */
-               org = G['user_ou']; /* the desired location of the user */
-       }
-
-       if(paramObj.__logout) {
-               doLogout();
-
-       } else {
-
-               globalUser = UserSession.instance();
-               if(globalUser.verifySession(ses)) {
-                       globalUser.grabOrgUnit(org);
-       
-               } else  {
-                       globalUser = null;
-                       globalLocation = globalOrgTree;
-                       if(globalSearchDepth == null)
-                               globalSearchDepth = findOrgDepth(globalOrgTree.ou_type());
-               }
-       }
-
-       grabCopyStatus();
-
-}
-
-function grabCopyStatus() {
-       if(globalCopyStatus) return;
-
-       debug("Grabbing copy statuses");
-       var req = new RemoteRequest(
-               "open-ils.search",
-               "open-ils.search.config.copy_status.retrieve.all" );
-
-
-       //if(paramObj.__sub_frame) {
-               req.send(true);
-               globalCopyStatus = req.getResultObject();
-               if(!globalCopyStatus) {
-                       userMessage("Retrieving copy statuses");
-               }
-
-               /*
-       } else {
-
-               req.setCompleteCallback(function(r) { 
-                       debug("Got globalCopyStatus");
-                       globalCopyStatus = r.getResultObject(); });
-       
-               req.send();
-       }
-       */
-}
-
-
-
diff --git a/Open-ILS/src/javascript/opac/HTMLChunks.js b/Open-ILS/src/javascript/opac/HTMLChunks.js
deleted file mode 100644 (file)
index 0ee13d0..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-
-function RecordResultRow(id) {
-
-       if(id==null)
-               throw new EXArg( "RecordResultRow required ID" );
-
-       var table       = createAppElement("table");
-       table.setAttribute("border","1");
-       var tbody       = createAppElement("tbody");
-       var thead       = createAppElement("thead");
-
-       add_css_class(table,"record_result_row_table");
-
-       var toptd       = createAppElement("td");
-       var td1         = createAppElement("td");
-       var td2         = createAppElement("td");
-       var td4         = createAppElement("td");
-
-       td1.id = "record_result_row_box_" + id;
-       add_css_class( td1, "record_result_row_box");
-
-       td2.id = "record_result_title_box_" + id;
-       add_css_class( td2, "record_result_title_box");
-
-       td4.id = "record_result_author_box_" + id;
-       add_css_class(td4, "record_result_author_box");
-
-       var row1                = createAppElement("tr");
-       var row2                = createAppElement("tr");
-       row2.id = "record_result_author_row_" + id;
-
-       row1.appendChild(td2);
-       row2.appendChild(td4);
-       tbody.appendChild(row1);
-       tbody.appendChild(row2);
-       table.appendChild(thead);
-       table.appendChild(tbody);
-       td1.appendChild(table);
-
-       this.obj = td1;
-
-}
-
-function addResultRow(row) {
-       td1 = row.appendChild( createAppElement("TD") );
-}
-
-
-
-RecordResultRow.prototype.toString = function() {
-       return this.obj.string;
-}
-
-function LineDiv(type) {
-       this.obj  = createAppElement("div");
-       if( type == "small")
-               add_css_class(this.obj,"small_line_div");
-       else {
-               if( type == "big") {
-               add_css_class(this.obj,"big_line_div");
-               } else 
-                       add_css_class(this.obj,"line_div");
-       }
-}
-
-LineDiv.prototype.toString = function() {
-       return this.obj.toString();
-}
-
diff --git a/Open-ILS/src/javascript/opac/HoldsWindow.js b/Open-ILS/src/javascript/opac/HoldsWindow.js
deleted file mode 100644 (file)
index 80d4274..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-
-/* 
-       @param record the id of the target item 
-       @param type is the hold level (M, T, V, C) for metarecord, title,
-               volume, and copy respectively.
-       @param requestor is the user object (fieldmapper) for the requestor
-       @param recipient is the user object (fieldmapper) for the hold recipient
-               role in the holds process 
-       @param requestor_login is the login session of the hold requestor
-       */
-function HoldsWindow(record, type, requestor, recipient, requestor_login) {
-
-       this.record = record;
-       this.div = elem("div");
-       this.requestor = requestor;
-       this.recipient  = recipient;
-       this.type = type;
-       this.session = requestor_login;
-       this.built = false;
-
-       add_css_class(this.div, "holds_window");
-       add_css_class(this.div, "hide_me");
-       getDocument().body.appendChild(this.div);
-}
-
-
-HoldsWindow.prototype.process = function() {
-
-       /* collect the checked items */
-       var formats = "";
-       if(this.type == "M") {
-               for(var idx in resourceFormats) {
-                       var form = resourceFormats[idx];
-                       var item = getById( form + "_hold_checkbox");
-                       if(item.checked) {
-                               formats += modsFormatToMARC(form);
-                       }
-               }
-               
-               if(formats.length == 0) {
-                       alert("Please select at least one item format");
-                       this.toggle();
-               }
-       } 
-
-       var sel = getById("holds_org_selector");
-       var orgNode = sel.options[sel.selectedIndex];
-       var org = findOrgUnit(orgNode.value);
-
-       /* for now... */
-       var email = this.recipient.email();
-       var phone = this.recipient.day_phone();
-
-       this.sendHoldsRequest(formats, org, email, phone);
-}
-
-/* formats is a string of format characters, org is the 
-       org unit used for delivery */
-HoldsWindow.prototype.sendHoldsRequest = function(formats, org, email, phone) {
-
-       if(isXUL()) { /* staff member entered barcode, now fetch the user */
-               var recip_barcode = getById("recipient_barcode").value;
-               if(!recip_barcode || recip_barcode == "") {
-                       alert("Please enter the user's barcode");
-               }
-               try {
-                       var r = grabUserByBarcode(this.session, recip_barcode);
-                       //debug("Done grabbing user");
-                       //alert(js2JSON(r));
-                       this.recipient = r;
-               } catch(E) { if(E.err_msg) alert(E.err_msg()); else alert(E); }
-       }
-
-       var hold = new ahr();
-       hold.pickup_lib(org.id());
-       hold.requestor(this.requestor.id());
-       hold.usr(this.recipient.id());
-       hold.hold_type(this.type);
-       hold.email_notify(email);
-       hold.phone_notify(phone);
-
-       if(this.type == "M") hold.holdable_formats(formats);
-       hold.target(this.record);
-
-       var req = new RemoteRequest(
-               "open-ils.circ",
-               "open-ils.circ.holds.create",
-               this.session, hold );
-
-       req.send(true);
-       var res = req.getResultObject();
-       if(res == 1) 
-               alert("Hold request was succesfully submitted");
-
-}
-
-/* returns false if we don't have a recipient for the hold */
-HoldsWindow.prototype.buildWindow = function(node) {
-
-       if(this.built) return true;
-       var d = elem("div");
-       var id = this.record;
-
-       var usr = this.recipient;
-       var barcodediv = null;
-
-       if(isXUL()) {
-               /* used by xul to enter the recipient barcode */
-               
-               var barcodediv = elem("div",{style:"margin-left: 10px"},null,"2. Enter User Barcode");
-               var barcodebox = elem("input",{style:"margin-left: 10px;", type:"text",id:"recipient_barcode"});
-               barcodediv.appendChild(barcodebox);
-               barcodediv.appendChild(elem("br"));
-
-       } else {
-
-               if(!usr) {
-                       var obj = this;
-                       var func = function(usr) { 
-                               obj.recipient = usr.userObject;
-                               obj.requestor = usr.userObject;
-                               obj.session = usr.session_id;
-                               obj.toggle();
-                       }
-                       var diag = new LoginDialog(func);
-                       diag.display(node);
-                       return false;
-               }
-       }
-
-
-
-       var org = usr.home_ou();
-       d.appendChild(this.buildPickuplibSelector(org));
-
-       if(this.type == "M")
-               d.appendChild(this.buildResourceSelector());
-
-       if(barcodediv) {
-               d.appendChild(elem("br"));
-               d.appendChild(barcodediv);
-       }
-
-       d.appendChild(this.buildSubmit());
-
-       this.div.appendChild(d);
-       this.built = true;
-       return true;
-}
-
-HoldsWindow.prototype.toggle = function(node) {
-
-       debug("Building window with node " + node);
-       if(!this.built) 
-               if(!this.buildWindow(node)) return;
-
-       swapClass( this.div, "hide_me", "show_me" );
-
-
-       /* workaround for IE select box widget bleed through, blegh... */
-       if(IE) {
-
-               var sels = getDocument().getElementsByTagName("select");
-               if(sels.length == 0) return true;
-
-               if(this.div.className.indexOf("hide_me") != -1)  {
-                       for(var i = 0; i!= sels.length; i++) {
-                               var s = sels[i];
-                               if(s && s.id != "holds_org_selector") {
-                                       remove_css_class(s, "invisible");
-                                       add_css_class(s, "visible");
-                               }
-                       }
-               }
-       
-               if(this.div.className.indexOf("show_me") != -1)  {
-                       for(var i = 0; i!= sels.length; i++) {
-                               var s = sels[i];
-                               if(s && s.id != "holds_org_selector") {
-                                       remove_css_class(s, "visible");
-                                       add_css_class(s, "invisible");
-                               }
-                       }
-               }
-       }
-
-       return true;
-}
-
-
-
-/*
-HoldsWindow.prototype.buildHoldsWindowCallback = function(type) {
-
-       var hwindow = this;
-       var func = function() {
-
-               var wrapper = elem("div");
-               var id = hwindow.record.doc_id();
-
-               var org = UserSession.instance().userObject.home_ou();
-               wrapper.appendChild(hwindow.buildPickuplibSelector(org));
-               if(type == "M")
-                       wrapper.appendChild(hwindow.buildResourceSelector());
-               wrapper.appendChild(hwindow.buildSubmit());
-
-               hwindow.win = window.open(null,"PLACE_HOLD_" + id,
-                       "location=0,menubar=0,status=0,resizeable,resize," +
-                       "outerHeight=500,outerWidth=500,height=500," +
-                       "width=500,scrollbars=1," +
-                       "alwaysraised, chrome" )
-       
-               hwindow.win.document.write("<html>" + wrapper.innerHTML + "</html>");
-               hwindow.win.document.close();
-               hwindow.win.document.title = "View MARC";
-               hwindow.win.focus();
-       }
-
-       return func;
-}
-*/
-
-HoldsWindow.prototype.buildSubmit = function() {
-       var div = elem("div");
-
-
-       /*
-       var bdiv = elem("div",  
-                       {style: 
-                               "border-top: 1px solid lightgrey;" +
-                               "border-bottom: 1px solid lightgrey;" +
-                               "width:100%;text-align:center;"});
-                               */
-
-       var bdiv = elem("div");  
-       add_css_class(bdiv, "holds_window_buttons");
-
-       var button = elem("input", 
-               {type:"submit", style:"margin-right: 10px;", value:"Place Hold"});
-
-       var cancel = elem("input", 
-               {type:"submit", style:"margin-left: 10px;",value:"Cancel"});
-       var obj = this;
-
-       cancel.onclick = function() { obj.toggle(); }
-       button.onclick = function() { obj.toggle(); obj.process(); }
-
-       div.appendChild(elem("br"));
-       bdiv.appendChild(button);
-       bdiv.appendChild(cancel);
-       div.appendChild(bdiv);
-
-       return div;
-}
-
-/* builds a selecor where the client can select the location to which
-       the item is sent */
-HoldsWindow.prototype.buildPickuplibSelector = function(selected_id) {
-
-       var div = elem("div");
-       var tdiv = elem("div",{style:"margin-left:10px"}, null,
-               "1. Select the location where the item(s) shall be delivered");
-
-       var sdiv = elem("div");
-       var selector = elem("select",{id:"holds_org_selector"});
-
-       /* this is not copied over... XXX fix me */
-       selector.onchange = function() {
-               var idx = selector.selectedIndex;
-               var option = selector.options[idx];
-               var org = findOrgUnit(option.value);
-
-               var d = getById("selector_error_div");
-               if(d) div.removeChild(d);
-
-               if(parseInt(findOrgType(org.ou_type()).depth()) < 2) {
-                       var err = elem("div",
-                               {id:"selector_error_div", style:"color:red"},null, 
-                               org.name() + " is a library system, please select a single branch");
-                       div.appendChild(err);
-               } else {
-               }
-       }
-
-       var center = elem("center");
-       center.appendChild(selector);
-       sdiv.appendChild(center);
-       _buildOrgList(selector, selected_id, null);
-
-       div.appendChild(elem("br"));
-       div.appendChild(tdiv);
-       div.appendChild(elem("br"));
-       div.appendChild(sdiv);
-       return div;
-}
-
-/* utility function for building a org list selector object */
-function _buildOrgList(selector, selected_id, org) {
-
-       if(selected_id == null) selected_id = -1;
-
-       if(org == null) {
-               org = globalOrgTree;
-
-       } else { /* add the org to the list */
-               var index = selector.options.length;
-               if(IE) {
-                       var node = elem("pre");
-                       for(var x=2; x <= findOrgType(org.ou_type()).depth(); x++) {
-                               node.appendChild(mktext("    "));
-                       }
-                       node.appendChild(mktext(org.name()));
-                       var select = new Option("", org.id());
-                       selector.options[index] = select;
-                       select.appendChild(node);
-       
-               } else {
-                       var pad = (findOrgType(org.ou_type()).depth() - 1) * 12;
-                       var select = new Option(org.name(), org.id());
-                       select.setAttribute("style", "padding-left: " + pad);
-                       selector.options[index] = select;
-               }
-
-               if(parseInt(org.id()) == parseInt(selected_id)) {
-                       selector.selectedIndex = index;
-                       selector.options[index].selected = true;
-               }
-       }
-
-       for(var idx in org.children()) 
-               _buildOrgList(selector, selected_id, org.children()[idx]);
-}
-
-HoldsWindow.prototype.buildResourceSelector = function() {
-
-       /* useful message */
-       var big_div = elem('div', {style:"margin-left: 10px;"});
-
-       var desc_div = elem("div",null, null, 
-               "2. Select all acceptible item formats");
-
-       
-       var table = elem("table");      
-
-       for( var idx in resourceFormats ) {
-               var row = table.insertRow(table.rows.length)
-       
-               var pic_cell = row.insertCell(0);
-               var name_cell = row.insertCell(1);
-               var box_cell = row.insertCell(2);
-               var box = elem("input", 
-                       {type:"checkbox", id: resourceFormats[idx] + "_hold_checkbox"}, null);
-
-               if(idx == 0) { /* select text by default */
-                       box.setAttribute("checked","checked");
-                       box.checked = true;
-               }
-               
-               pic_cell.appendChild(mkResourceImage(resourceFormats[idx]));
-               name_cell.appendChild(mktext(resourceFormats[idx]));
-               box_cell.appendChild(mktext(" "));
-               box_cell.appendChild(box);
-       }
-
-       big_div.appendChild(elem("br"));
-       big_div.appendChild(desc_div);
-       big_div.appendChild(elem("br"));
-       big_div.appendChild(table);
-       return big_div;
-
-}
-
-
-
-
diff --git a/Open-ILS/src/javascript/opac/LocationTree.js b/Open-ILS/src/javascript/opac/LocationTree.js
deleted file mode 100644 (file)
index 098e2a3..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/* */
-
-function LocationTree( tree, box_id, container_id ) {
-       this.orgTree = tree;
-
-       this.treeContainerBoxId = container_id;
-       this.treeBoxId = box_id;
-       this.setObjects();
-       this.treeBuilder = buildOrgTreeWidget;
-}
-
-
-LocationTree.prototype.setObjects = function() {
-       if(this.treeContainerBoxId)
-               this.treeContainerBox = getById(this.treeContainerBoxId);
-       else
-               this.treeContainerBox = getById("ot_nav_widget");
-
-       if(this.treeBoxId)
-               this.treeBox = getById(this.treeBoxId);
-       else
-               this.treeBox = getById("ot_nav_widget_box");
-
-}
-
-LocationTree.prototype.buildOrgTreeWidget = function() {
-
-       debug("Somebody called buildOrgTreeWidget on me...");
-       this.setObjects();
-       //this.widget = buildOrgTreeWidget(globalOrgTree, true);
-       this.widget = this.treeBuilder(globalOrgTree, true);
-}
-
-
-function buildOrgTreeWidget(org_node, root) {
-
-       var item;
-
-       if(root) {
-               item = new WebFXTree(org_node.name());
-               item.setBehavior('classic');
-       } else {
-               item = new WebFXTreeItem(org_node.name());
-       }
-
-       /* make org tree re-submit search on click */
-       item.action = 
-               "javascript:globalPage.updateSelectedLocation('" + org_node.id() + "');" +
-               "globalPage.locationTree.hide();"; 
-
-       for( var index in org_node.children()) {
-               var childorg = org_node.children()[index];
-               if( childorg != null ) {
-                       var tree_node = buildOrgTreeWidget(childorg);
-                       if(tree_node != null)
-                               item.add(tree_node);
-               }
-       }
-
-       return item;
-}
-
-
-LocationTree.prototype.hide = function() {
-       this.setObjects();
-       this.widget = this.treeBuilder(globalOrgTree, true);
-       if(this.treeContainerBox &&  
-                       this.treeContainerBox.className.indexOf("show_me") != -1 ) {
-               swapClass( this.treeContainerBox, "hide_me", "show_me" );
-       }
-}
-
-
-
-LocationTree.prototype.toggle = function(button_div, offsetx, offsety, relative) {
-
-       this.setObjects();
-       debug("Tree container " + this.treeContainerBox );
-       debug("Tree box " + this.treeBox );
-
-       swapClass( this.treeContainerBox, "hide_me", "show_me" );
-
-       var obj = this;
-       if( (this.treeBox && this.treeBox.firstChild && 
-                       this.treeBox.firstChild.nodeType == 3) ||
-                       (this.treeBox && !this.treeBox.firstChild)) {
-
-               debug("location tree has not been rendered... rendering..");
-               //setTimeout(function() { renderTree(obj); }, 5 );
-               renderTree(obj);
-       }
-
-       //alert(this.treeBox.firstChild.nodeType);
-
-       if( button_div && 
-                       ((offsetx == null && offsety == null) || relative) ) {
-
-               var x = findPosX(button_div);
-               var y = findPosY(button_div);
-               var height = getObjectHeight(button_div);
-               var xpos = x - getObjectWidth(this.treeBox) + getObjectWidth(button_div);
-
-               if(offsety == null) offsety = 0;
-               if(offsetx == null) offsetx = 0;
-
-               offsety = y + height + offsety;
-               offsetx = xpos + offsetx;       
-       }
-
-       if(IE) { /*HACK XXX*/
-               offsety = parseInt(offsety) + 15;
-               offsetx = parseInt(offsetx) + 8;
-       }
-
-
-       debug("TREE OFFSET y: " + offsety + " x: " + offsetx );
-
-       this.treeContainerBox.style.position = "absolute"; 
-       this.treeContainerBox.style.top = offsety; 
-       this.treeContainerBox.style.left = offsetx;
-}
-
-
-function renderTree(tree) {
-       tree.setObjects();
-       if(!tree.widget) tree.buildOrgTreeWidget(); 
-       /*
-       debug("Spitting tree out to the treeBox:\n" +
-                       tree.widget.toString() ); */
-       tree.treeBox.innerHTML = tree.widget.toString();
-}
-
-
-
-/* generates a new chunk within with the tree is inserted */
-LocationTree.prototype.newSpot = function(box_id, container_id) {
-
-       var cont                        = elem("div", { id : this.treeContainerBoxId } );
-       var box                         = elem("div", { id : this.treeBoxId } );
-       var expando_line        = elem("div");
-       var expando             = elem("div");
-       var expand_all          = elem("a", null, null, "Expand All");
-       var collapse_all        = elem("a", null, null, "Collapse All");
-
-       add_css_class(cont, "nav_widget");
-       add_css_class(cont, "hide_me");
-       add_css_class(box, "ot_nav_widget_box");
-       add_css_class(expando_line, "expando_links");
-       add_css_class(expando, "expando_links");
-
-
-       cont.appendChild(expando_line);
-       cont.appendChild(expando);
-       cont.appendChild(elem("br"));
-       cont.appendChild(box);
-
-       expando_line.appendChild(elem("br"));
-       var obj = this;
-       expand_all.onclick = function() { obj.widget.expandAll(); };
-       collapse_all.onclick = function() {
-       obj.widget.collapseAll();
-               obj.widget.expand();};
-
-       expando.appendChild(expand_all);
-       expando.appendChild(createAppTextNode(" "));
-       expando.appendChild(collapse_all);
-       expando.appendChild(createAppTextNode(" "));
-
-       return cont;
-
-}
diff --git a/Open-ILS/src/javascript/opac/LoginDialog.js b/Open-ILS/src/javascript/opac/LoginDialog.js
deleted file mode 100644 (file)
index edca0f0..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-var PopupBoxId = 0;
-
-
-function LoginDialog(logged_in_callback) {
-       this.callback = logged_in_callback;
-       this.rand = PopupBoxId++;
-}
-
-
-
-/* node is the element the dialog should popup under */
-LoginDialog.prototype.display = function(node) {
-
-       if(UserSession.instance().verifySession()) {
-               if(this.callback) this.callback(UserSession.instance());
-               return;
-       }
-
-       this.box = new PopupBox(node);
-       var box = this.box;
-       box.title("Login");
-
-       var ut = elem("input", {id:"login_uname_" + this.rand,type:"text",size:"16"});
-       var pw = elem("input",{id:"login_passwd_" + this.rand,type:"password",size:"16"});
-       ut.size = 16;
-       pw.size = 16;
-
-       var but = elem("input",
-               {style:"margin-right: 10px", type:"submit",value:"Login"});
-       var cancel = elem("input",
-               {style:"margin-left: 10px;",type:"submit",value:"Cancel"});
-
-
-       var obj = this;
-       var submitFunc = function() {
-               var uname = getById("login_uname_" + obj.rand).value;
-               var passwd = getById("login_passwd_" + obj.rand).value;
-
-               if(uname == null || uname == "") {
-                       alert("Please enter username");
-                       return;
-               }
-
-               if(passwd == null || passwd == "") {
-                       alert("Please enter password");
-                       return;
-               }
-
-               var ses = UserSession.instance();
-               if( ses.login(uname, passwd)) {
-                       /* now grab the org_unit associated with this user */
-                       ses.grabOrgUnit();
-                       ses.fleshMe(true); /* flesh the user */
-                       obj.hideMe();
-                       if(obj.callback) obj.callback(ses);
-               } else {
-                       alert("Password is incorrect");
-                       try{pw.focus();}catch(e){}
-               }
-       }
-
-       but.onclick = submitFunc;
-       ut.onkeyup = function(evt) { if(userPressedEnter(evt)) submitFunc(); }
-       pw.onkeyup = function(evt) { if(userPressedEnter(evt)) submitFunc(); }
-       cancel.onclick = function() { obj.hideMe(); }
-
-       box.addText("Username ");
-       box.addNode(ut);
-       box.lines();
-       box.addText("Passwod ");
-       box.addNode(pw);
-       box.lines();
-       box.makeGroup([but, cancel]);
-       
-       box.show();
-       try{ut.focus();}catch(E){}
-
-}
-
-function runLoginOnEnter(evt) {
-       var code = grabCharCode(evt); 
-       if(code==13||code==3) {  }
-}
-
-
-LoginDialog.prototype.hideMe = function() {
-       this.box.hide();
-}
-
-
diff --git a/Open-ILS/src/javascript/opac/LoginPage.js b/Open-ILS/src/javascript/opac/LoginPage.js
deleted file mode 100644 (file)
index c080033..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-LoginPage.prototype                                    = new Page();
-LoginPage.prototype.constructor        = LoginPage;
-LoginPage.baseClass                                    = Page.constructor;
-
-// ---------------------------------------------------------------------------------
-// login
-// ---------------------------------------------------------------------------------
-
-var globalLoginPage = null;
-
-function LoginPage() {
-
-       if(globalLoginPage != null) { 
-               globalLoginPage.init();
-               return globalLoginPage; 
-       }
-
-       this.searchBarForm      = new SearchBarFormChunk();
-       this.searchBar                  = new SearchBarChunk();
-
-       globalLoginPage = this;
-}
-
-LoginPage.prototype.init = function() {
-       this.searchBar.reset();
-       this.login_button               = getById("login_button");
-
-       this.login_button.onclick = loginShuffle;
-
-       this.username           = getById("login_username");
-       this.password           = getById("login_password");
-       this.result_field = getById("login_result_text");
-
-       this.session = UserSession.instance();
-       this.draw();
-
-}
-
-
-LoginPage.prototype.draw = function() {
-       try {this.username.focus();} catch(E) {}
-
-
-       if(IE) {
-
-               this.username.onkeyup = "window.event.cancelBubble = true"; 
-
-               this.password.onkeyup = 
-                       function() {
-                               getAppWindow().event.cancelBubble = true; 
-                               loginOnEnter; return true; 
-                       };
-
-       } else {
-               this.username.onkeyup = function(){};
-               this.password.onkeyup = loginOnEnter;
-       }
-       
-       this.login_success_msg = null;
-       this.login_failure_msg = null;
-}
-
-
-function loginShuffle() {
-       var obj = globalLoginPage;
-       var ses = UserSession.instance();
-       if( ses.login( obj.username.value, obj.password.value )) {
-               /* now grab the org_unit associated with this user */
-               ses.grabOrgUnit();
-               url_redirect( [ "target", "my_opac" ] ); /* redirect to the my opac page */
-               /*
-               obj.result_field.innerHTML = obj.login_success_msg;
-               obj.searchBar.reset();
-               */
-       } else {
-               obj.result_field.innerHTML = obj.login_failure_msg;
-       }
-}
-
-function loginOnEnter(evt) {
-       var code = grabCharCode(evt); 
-       if(code==13||code==3) { loginShuffle(); }
-}
-
-
-
diff --git a/Open-ILS/src/javascript/opac/LogoutPage.js b/Open-ILS/src/javascript/opac/LogoutPage.js
deleted file mode 100644 (file)
index bfe9001..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-LogoutPage.prototype                                   = new Page();
-LogoutPage.prototype.constructor       = LogoutPage;
-LogoutPage.baseClass                                   = Page.constructor;
-
-// ---------------------------------------------------------------------------------
-// logout
-// ---------------------------------------------------------------------------------
-
-var globalLogoutPage = null;
-
-function LogoutPage() {
-
-       if(globalLogoutPage != null) { return globalLogoutPage; }
-       this.session = UserSession.instance();
-       this.searchBarForm      =       new SearchBarFormChunk();
-       this.searchBar                  = new SearchBarChunk();
-       globalLogoutPage = this;
-}
-
-LogoutPage.prototype.doLogout = function() {
-
-       deleteCookie("ils_uname");
-       deleteCookie("ils_ses");
-
-       if( this.session.session_id ) {
-               var request = new RemoteRequest( "open-ils.auth",
-                       "open-ils.auth.session.delete", this.session.session_id );
-               request.send(true);
-               var response = request.getResultObject();
-               if(! response ) {
-                       //alert("error logging out"); /* exception */
-               }
-       }
-
-       this.session.destroy();
-
-       var message = getById("logout_msg");
-       message.innerHTML = this.logout_success_msg;
-       this.searchBar.reset();
-
-       return true;
-
-}
-
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/opac/MRResultPage.js b/Open-ILS/src/javascript/opac/MRResultPage.js
deleted file mode 100644 (file)
index afbf309..0000000
+++ /dev/null
@@ -1,555 +0,0 @@
-var globalMRResultPage = null;                                 /* our global object */
-
-MRResultPage.prototype                                 = new AbstractRecordResultPage();
-MRResultPage.prototype.constructor     = MRResultPage;
-MRResultPage.baseClass                                 = AbstractRecordResultPage.constructor;
-
-/* constructor for our singleton object */
-function MRResultPage() {
-       debug("MRResultPage()");
-       //this.searchBar = new SearchBarChunk();
-
-       if( globalMRResultPage != null ) {
-               debug("MRResultPage() exists, returning");
-               return globalMRResultPage;
-       }
-
-       //this.progressBar = new ProgressBar(getById('progress_bar'));
-       this.resetSearch();
-       globalMRResultPage = this;
-}
-
-
-/* returns the global instance. builds the instance if necessary.  All client
- * code should use this method */
-MRResultPage.instance = function() {
-       if( globalMRResultPage != null ) {
-               return globalMRResultPage;
-       } 
-       return new MRResultPage();
-}
-
-
-MRResultPage.buildExtendedLinks = function(record, page_id) {
-       return null;
-}
-
-
-MRResultPage.prototype.setPageTrail = function() {
-
-       var box = getById("page_trail");
-       if(!box) return;
-
-       var d = this.buildTrailLink("start",true);
-       if(d) {
-               box.appendChild(d);
-       } else {
-               d = this.buildTrailLink("advanced_search", true);
-               if(d)
-                       box.appendChild(d);
-       }
-
-       box.appendChild(this.buildDivider());
-       box.appendChild(
-                       this.buildTrailLink("mr_result", false));
-       
-}
-
-
-MRResultPage.prototype.next = function() {
-
-       var location = globalSelectedLocation;
-       if(location == null) 
-               location = globalLocation.id();
-       else
-               location = location.id();
-
-       /* if the user has changed the 'location' of the search, it will be
-               reflected when the user hits the next button.  the search depth
-               will not change, however, because that is a different search */
-       url_redirect( [ 
-                       "target",                                       "mr_result",
-                       "mr_search_type",                       this.stype,
-                       "mr_search_query",              this.string,
-                       "mr_search_location",   location,
-                       "mr_search_depth",              this.searchDepth,
-                       "format",                                       this.format, 
-                       "page",                                         this.page + 1   
-                       ] );
-}
-
-
-MRResultPage.prototype.prev = function() {
-       if(this.page == 0 ) return;
-
-
-       var depth = globalSearchDepth;
-       var location = globalSelectedLocation;
-       if(location == null) 
-               location = globalLocation.id();
-       else
-               location = location.id();
-
-       /* if the user has changed the 'location' of the search, it will be
-               reflected when the user hits this  button.  the search depth
-               will not change, however, because that is a different search */
-       url_redirect( [ 
-                       "target",                                       "mr_result",
-                       "mr_search_type",                       this.stype,
-                       "mr_search_query",              this.string,
-                       "mr_search_location",   location,
-                       "mr_search_depth",              this.searchDepth,
-                       "format",                                       this.format,
-                       "page",                                         this.page - 1   
-                       ] );
-}
-
-
-MRResultPage.prototype.addMenuItems = function(menu, record) {
-               menu.addItem("View Metarecord Details", 
-                                                       function() { alert(record.doc_id()); });
-               if(isXUL())
-                       xulEvtMRResultDisplayed( menu, record );
-}
-
-MRResultPage.prototype.URLRefresh = function() {
-
-       return [ 
-                               "target",                                       "mr_result",
-                               "mr_search_type",                       this.stype,
-                               "mr_search_query",              this.string,
-                               "mr_search_location",   this.searchLocation,
-                               "mr_search_depth",              this.searchDepth,       
-                               "format",                                       this.format,
-                               "page",                                         0
-                               ];
-}
-
-MRResultPage.prototype.mkLink = function(id, type, value, title) {
-
-       var href;
-
-       var t = title;
-       if(!t) t = value;
-
-       debug("Making link with title: " + t);
-
-       switch(type) {
-
-               case "title":
-                       href = createAppElement("a");
-                       add_css_class(href,"record_result_title_link");
-                       href.setAttribute("href",
-                               "?target=record_result&page=0&mrid=" + id + 
-                               "&hits_per_page=" + this.hitsPerPage +
-                               "&location=" + this.searchLocation +
-                               "&format=" + this.format + 
-                               "&depth=" + this.searchDepth );
-
-                       href.appendChild(createAppTextNode(value));
-                       href.title = "View titles for " + t + "";
-                       break;
-
-       case "img":
-                       href = createAppElement("a");
-                       add_css_class(href,"record_result_title_link");
-                       href.setAttribute("href",
-                               "?target=record_result&page=0&mrid=" + id +
-                               "&hits_per_page=" + this.hitsPerPage +
-                               "&location=" + this.searchLocation +
-                               "&format=" + this.format + 
-                               "&depth=" + this.searchDepth );
-
-                       href.title = "View titles for " + t + "";
-                       break;
-
-
-               case "author":
-                       href = createAppElement("a");
-                       add_css_class(href,"record_result_author_link");
-                       href.setAttribute("href",
-                               "?target=mr_result&mr_search_type=author&page=0&mr_search_query=" +
-                            encodeURIComponent(value) + 
-                                       "&format=" + this.format );
-
-                       href.appendChild(createAppTextNode(value));
-                       href.title = "Author search for " + t + "";
-                       break;
-
-               default:
-                       throw new EXArg("Unknown link type: " + type );
-       }
-
-       return href;
-}
-
-
-
-/* performs a new search */
-MRResultPage.prototype.doSearch = function() {
-
-
-       debug("XUL IS " + isXUL() );
-
-       var string                      = paramObj.__mr_search_query;
-       var stype                       = paramObj.__mr_search_type;
-       var location            = paramObj.__mr_search_location;
-       var depth                       = paramObj.__mr_search_depth;
-       var hitsper                     = paramObj.__hits_per_page;
-       var format                      = paramObj.__format;
-
-       lastSearchString = string;
-       lastSearchType = stype;
-
-       if(hitsper)
-               this.hitsPerPage = parseInt(hitsper);
-
-       debug("mr search params string " + string + " stype " + stype +
-                       " location " + location + " depth " + depth  + " format " + format);
-
-       if(depth == null || depth == "undefined")
-               depth = globalSearchDepth;
-
-       if(depth == null)
-               depth = findOrgDepth(globalLocation.ou_type());
-
-       if(location == null || location == "undefined") {
-               if(globalSelectedLocation)
-                       location = globalSelectedLocation.id();
-               else
-                       location = globalLocation.id();
-       }
-
-       if(!stype || !string) return;
-
-       if(this.searchDepth == null)
-               this.searchDepth = globalSearchDepth;
-
-       /* see if this is a new search */
-       if(     isXUL()                                                                 || /* don't cache client searches */
-                       string != this.string                           || 
-                       stype != this.stype                                     ||
-                       this.searchLocation != location ||
-                       this.format != format                           || 
-                       this.searchDepth != depth ) {
-               debug("Resetting MRSearch for search " + string);
-               this.resetSearch();
-
-       } else {
-               debug("Not Resetting MRSearch for search " + string);
-       }
-
-       this.searchDepth                = depth;
-       this.searchLocation     = location;
-       this.stype                              = stype;
-       this.string                             = string;
-       this.page                               = parseInt(paramObj.__page);
-       this.format                             = format;
-
-       if(this.page == null) this.page = 0;
-
-       this.searchOffset               = this.page * this.hitsPerPage;
-
-       this.resetPage();
-
-       var offset = parseInt(this.searchOffset);
-       var hitspp      = parseInt(this.hitsPerPage);
-
-       /* is this just a call to next/prev? */
-       if( this.recordIDs && this.recordIDs[offset] != null )  {
-               debug("We have the first part of the ID's");
-               if( this.recordIDs[offset + (hitspp -1 )] != null  ||
-                               this.recordIDs[this.hitCount - 1] != null ) {
-                       /* we already have all of the IDS */
-                       debug("We alread have the required mr " + 
-                                       "ids for the search: [" + this.string + "]");
-                       this.collectRecords();
-                       return;
-               }
-       }
-
-
-       debug("MRResultPage doSearch() with type: " 
-                       + this.stype + " and search [" + this.string + "]"
-                       + " and offset " + this.searchOffset  +
-                       " depth: " + depth + " location: " + location);
-
-       debug("gathering the search count\n");
-
-
-       if(this.searchOffset > 0 && this.hitCount > 0) {
-               this.buildNextLinks();
-               this.doMRSearch();
-
-       } else {
-
-               var method = "open-ils.search.biblio.class.count";
-               if(isXUL()) 
-                       method = method + ".staff";
-
-               debug("Method: " + method);
-               
-               if(isNaN(this.searchDepth)) this.searchDepth = 0;
-               if(isNaN(this.searchLocation)) this.searchLocation = 1;
-
-               var form = this.format;
-               if(this.format == "all") form = null;
-               var creq = new RemoteRequest(
-                       "open-ils.search", method,
-                       this.stype, this.string, this.searchLocation, this.searchDepth, form );
-       
-               /* this request grabs the search count.  When the counts come back
-                       the metarecord ids are collected */
-               var obj = this;
-               creq.setCompleteCallback(
-                       function(req) {
-
-                               try {
-                                       obj.hitCount = req.getResultObject();   
-                                       debug("Received hit count of " + obj.hitCount );
-
-                               } catch(E) {
-                                       if(instanceOf(E, ex)) {
-                                               alert(E.err_msg());
-                                               return;
-                                       }
-                                       else throw E;
-                               }
-                               
-                               /*
-                               var row = getById("hourglass_row");
-                               if(row) row.parentNode.removeChild(row);
-                               */
-
-                               if(obj.hitCount > 0) obj.buildNextLinks();
-
-                               /* do the spell check and make suggestion if possible */
-
-                               else { 
-                                       var row = getById("hourglass_row");
-                                       if(row) row.parentNode.removeChild(row);
-                                       obj.noHits(); 
-                                       obj.checkSpelling();
-                                       return; 
-                               }
-
-                               obj.checkSpelling();
-
-       //                      obj.doMRSearch();       
-                       }
-               );
-               creq.send();
-
-               this.doMRSearch();      
-       }
-}
-
-
-MRResultPage.prototype.checkSpelling = function() {
-       if(this.hitCount > 3) return;
-
-       debug("Checking spelling on " + this.string );
-
-       var request = new RemoteRequest(
-               "open-ils.search",
-               "open-ils.search.spell_check",
-               this.string );
-       request.send(true);
-
-       var response = request.getResultObject();
-       if(response && response != "0") {
-
-               debug("Received spell check response " + response );
-
-               var dymb = getById("did_you_mean_box");
-               dymb.appendChild(elem("br"));
-
-               var ref = elem("a", 
-                       {
-                               href: "?target=mr_result&mr_search_type=" + this.stype + 
-                                       "&page=0&mr_search_query=" + encodeURIComponent(response) +
-                                       "&format=" + this.format
-                       } 
-               );
-
-               add_css_class(ref,"record_result_author_link");
-               ref.appendChild(createAppTextNode(response));
-               ref.title = "Search for " + response + "";
-
-               dymb.appendChild(createAppTextNode("Did you mean "));
-               var ul = createAppElement("u");
-               dymb.appendChild(ul);
-               ul.appendChild(ref);
-               dymb.appendChild(createAppTextNode("?"));
-       }
-}
-
-/* expand search if results are too low... */
-MRResultPage.prototype.buildExpandSearchLinks = function() {
-
-       /*
-       var string                      = paramObj.__mr_search_query;
-       var stype                       = paramObj.__mr_search_type;
-       var location            = paramObj.__mr_search_location;
-       var depth                       = paramObj.__mr_search_depth;
-       */
-       
-       var div = elem("div");
-}
-
-
-MRResultPage.prototype.doMRSearch = function() {
-
-       var obj = this;
-       var method = "open-ils.search.biblio.class";
-
-       /* now the count and search are simultaneous 
-       if( this.hitCount > 5000 )
-               method = method + ".unordered";
-               */
-
-       if(isXUL())
-               method = method + ".staff";
-
-       debug("Search method is " + method);
-
-       var form = this.format;
-       if(this.format == "all") form = null;
-
-       var request = new RemoteRequest( 
-               "open-ils.search", method, obj.stype, obj.string, obj.searchLocation, 
-               obj.searchDepth, "50", obj.searchOffset, form );
-       
-       request.setCompleteCallback(
-               function(req) {
-
-                       var row = getById("hourglass_row");
-                       if(row)
-                               row.parentNode.removeChild(row);
-
-                       var result = req.getResultObject();
-                       if(result == null) return;
-                       result.count = obj.hitCount;
-                       obj.gatherIDs(result) 
-                       obj.collectRecords();
-                       obj.requestBatch.remove(req);
-               }
-       );
-       obj.requestBatch.add(request);
-       request.send();
-       debug("Sent mr id search");
-
-}
-
-MRResultPage.prototype.collectRecords = function() {
-
-       debug("Collecting records...");
-       var i = this.searchOffset;
-
-       var row = getById("hourglass_row");
-       if(row)
-               row.parentNode.removeChild(row);
-
-       /* ------------------------------------------------- */
-
-       /*
-       var ids = new Array();
-       while( i < (this.searchOffset + this.hitsPerPage) ) 
-               ids.push(this.recordIDs[i++]);
-
-       debug("Retrieving IDs " + ids);
-
-       var request = new RemoteRequest( "open-ils.search",
-               "open-ils.search.biblio.metarecord.mods_slim.batch.retrieve", ids );
-       this.requestBatch.add(request);
-       var obj = this;
-
-
-       request.setCompleteCallback(
-               function(req) {
-                       var records = req.getResultObject();
-                       //alert(records);
-
-                       for(var i = 0; i!= records.length; i++) {
-                               var rec = records[i];
-                               debug("Displaying recocord " + rec.doc_id());
-                               obj.displayRecord( rec, obj.searchOffset, i );
-                               obj.doCopyCount( rec, obj.searchOffset, i );
-                       }
-                       obj.requestBatch.remove(request);
-               }
-       );              
-       request.send();
-       return;
-       */
-       /* ------------------------------------------------- */
-
-
-       while( i < (this.searchOffset + this.hitsPerPage) ) {
-               var id = this.recordIDs[i];
-
-               if(id==null){ i++;  continue; }
-
-               var request = new RemoteRequest( "open-ils.search",
-                       "open-ils.search.biblio.metarecord.mods_slim.retrieve", id );
-               this.requestBatch.add(request);
-               debug( "Sending mods retrieval for metarecord " + id );
-
-               request.name = "record_request_" + i;
-               request.search_id = i;
-               request.page_id = parseInt(i) - parseInt(this.searchOffset);
-
-               /* define the callback for when we receive the record */
-               var obj = this;
-               request.setCompleteCallback(
-                       function(req) {
-                               var record = req.getResultObject();
-                               obj.displayRecord( record, req.search_id, req.page_id );
-                               obj.doCopyCount( record, req.search_id, req.page_id );
-                               obj.requestBatch.remove(req);
-                       }
-               );
-
-               debug("Sending mods retrieval request for " + id);
-               request.send();
-               i++;
-       }
-}
-
-
-
-MRResultPage.prototype.doCopyCount = function( record, search_id, page_id ) {
-
-       if(record==null || !record) return;
-
-       var copy_box    = getById("record_result_copy_count_box_" + page_id );
-
-       var orgunit = globalSelectedLocation;
-       if(!orgunit) orgunit = globalLocation;
-
-       var method = "open-ils.search.biblio.metarecord.copy_count";
-       if(isXUL())
-               method = method + ".staff";
-
-       var copy_request = new RemoteRequest( 
-               "open-ils.search", method,
-               this.searchLocation, record.doc_id() );
-
-       copy_request.search_id = search_id;
-       copy_request.name = "copy_request_" + (search_id+this.searchOffset);
-
-       var obj = this;
-       copy_request.setCompleteCallback( 
-               function(req) {
-                       try {   
-                               obj.displayCopyCounts(req.getResultObject(), search_id, page_id );
-                       } catch(E) { 
-                               debug("****** Copy Count Retrieval Error:\n" + E ); 
-                       }
-               }
-       );
-
-       copy_request.send();
-}
-
-
diff --git a/Open-ILS/src/javascript/opac/MyOPACPage.js b/Open-ILS/src/javascript/opac/MyOPACPage.js
deleted file mode 100644 (file)
index e143cea..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-MyOPACPage.prototype                                   = new Page();
-MyOPACPage.prototype.constructor       = MyOPACPage;
-MyOPACPage.baseClass                                   = Page.constructor;
-
-// ---------------------------------------------------------------------------------
-// my_opac
-// ---------------------------------------------------------------------------------
-function MyOPACPage() {
-       this.searhBarForm = new SearchBarFormChunk();
-       this.searchBar = new SearchBarChunk();
-}
-
-MyOPACPage.prototype.redirect = function() {
-       var frame = getById("my_opac_iframe");
-
-       var org = globalSelectedLocation;
-       if(org == null)
-               org = globalLocation;
-       org = org.id();
-       var depth = globalSearchDepth;
-
-       var source = "https://" + globalRootURL + globalRootPath 
-               + "?target=my_opac_secure" + "&location=" + org + "&depth=" + depth;
-
-       source += "&session=" + UserSession.instance().getSessionId();
-       frame.setAttribute("src",source);
-       return true;
-}
-
-
diff --git a/Open-ILS/src/javascript/opac/MyOPACSPage.js b/Open-ILS/src/javascript/opac/MyOPACSPage.js
deleted file mode 100644 (file)
index bce2e8e..0000000
+++ /dev/null
@@ -1,1552 +0,0 @@
-/* */
-
-MyOPACSPage.prototype                                  = new Page();
-MyOPACSPage.prototype.constructor      = Page;
-MyOPACSPage.baseClass                                  = Page.constructor;
-
-var globalmyopac = null;
-var globalinteger = 1;
-
-function MyOPACSPage() {
-       var session_id = location.search.substring(  
-                       location.search.indexOf("session") + 8 ); /*md5 session key*/
-
-       this.user = UserSession.instance();
-       this.user.verifySession(session_id);
-       globalmyopac = this;
-}
-
-MyOPACSPage.prototype.init = function() {
-       this.draw();
-}
-
-MyOPACSPage.prototype.draw = function(type) {
-
-       debug("Fleshing User");
-
-       this.infoPane = getById("my_opac_info_pane");
-       this.infoTable = getById("my_opac_info_table");
-
-       /*
-       removeChildren(this.infoPane);
-       removeChildren(this.infoTable);
-       this.infoPane.appendChild(this.infoTable);
-       */
-
-
-       this.buildNavBox(true);
-       
-       this.checkCell          = getById("my_opac_checked");
-       this.holdsCell          = getById("my_opac_holds");
-       this.profileCell        = getById("my_opac_profile");
-       this.finesCell          = getById("my_opac_fines");
-
-       check           = getById("my_opac_checked_link");
-       holds           = getById("my_opac_holds_link");
-       profile = getById("my_opac_profile_link");
-       fines           = getById("my_opac_fines_link");
-
-       var obj = this;
-       check.onclick           = function() { obj.drawCheckedOut(); };
-       holds.onclick           = function() { obj.drawHolds(); };
-       profile.onclick = function() { obj.drawProfile(); };
-       fines.onclick           = function() { obj.drawFines(); };
-
-       switch(type) {
-               case "holds": this.drawHolds(); break;
-               case "profile": this.drawProfile(); break;
-               case "fines": this.drawFines(); break;
-               case "checked": 
-               default:this.drawCheckedOut();
-       }
-}
-
-
-MyOPACSPage.prototype.setLink = function(cell) {
-       remove_css_class(this.checkCell,        "my_opac_link_cell_active");
-       remove_css_class(this.holdsCell,        "my_opac_link_cell_active");
-       remove_css_class(this.profileCell, "my_opac_link_cell_active");
-       remove_css_class(this.finesCell,        "my_opac_link_cell_active");
-       add_css_class(cell, "my_opac_link_cell_active");
-}
-
-MyOPACSPage.prototype.drawCheckedOut = function() {
-       removeChildren(this.infoTable);
-       removeChildren(this.infoPane);
-       this.infoPane.appendChild(this.infoTable);
-       this.setLink(this.checkCell);
-       this.getCheckedOut(_drawCheckedOut);
-}
-
-MyOPACSPage.prototype.drawHolds = function() {
-       removeChildren(this.infoTable);
-       removeChildren(this.infoPane);
-       this.infoPane.appendChild(this.infoTable);
-       this.setLink(this.holdsCell);
-       this._drawHolds();
-}
-
-MyOPACSPage.prototype.drawProfile = function() {
-       removeChildren(this.infoTable);
-       removeChildren(this.infoPane);
-       this.infoPane.appendChild(this.infoTable);
-       this.setLink(this.profileCell);
-       this._drawProfile();
-}
-
-MyOPACSPage.prototype.drawFines = function() {
-       removeChildren(this.infoTable);
-       removeChildren(this.infoPane);
-       this.infoPane.appendChild(this.infoTable);
-       this.setLink(this.finesCell);
-       this._drawFines();
-}
-
-function _drawCheckedOut(obj, data) {
-
-       if(data == null) return;
-       var circRow = obj.infoTable.insertRow(obj.infoTable.rows.length);
-
-       var dcell = circRow.insertCell(circRow.cells.length);
-       dcell.appendChild(mktext("Due Date"));
-       var tcell = circRow.insertCell(circRow.cells.length)
-       tcell.appendChild(mktext("Title"));
-       var drcell = circRow.insertCell(circRow.cells.length);
-       drcell.appendChild(mktext("Duration"));
-       var bcell = circRow.insertCell(circRow.cells.length);
-       bcell.appendChild(mktext("Barcode"));
-       var ccell = circRow.insertCell(circRow.cells.length);
-       ccell.appendChild(mktext("Circulating Library"));
-       var rcell = circRow.insertCell(circRow.cells.length);
-       rcell.appendChild(mktext("Renewals Remaining"));
-       var rbcell = circRow.insertCell(circRow.cells.length);
-       rbcell.appendChild(mktext("Renew?"));
-
-       add_css_class(tcell, "my_opac_info_table_header");
-       add_css_class(dcell, "my_opac_info_table_header");
-       add_css_class(drcell, "my_opac_info_table_header");
-       add_css_class(bcell, "my_opac_info_table_header");
-       add_css_class(ccell, "my_opac_info_table_header");
-       add_css_class(rcell, "my_opac_info_table_header");
-       add_css_class(rbcell, "my_opac_info_table_header");
-
-
-       if(data.length < 1) {
-               debug("No circs exist for this user");
-               circRow = obj.infoTable.insertRow(obj.infoTable.rows.length);
-               circRow.insertCell(0).appendChild(
-                       mktext("No items currently checked out"));
-               return;
-       }
-
-       for( var index in data ) {
-
-               var circ                = data[index].circ;
-               var record      = data[index].record;
-               var copy                = data[index].copy;
-               circRow = obj.infoTable.insertRow(obj.infoTable.rows.length);
-
-
-               var due = circ.due_date();
-               due = due.replace(/[0-9][0-9]:.*$/,"");
-
-               var title_href = createAppElement("a");
-               var prefix = "http://" + globalRootURL + ":" + globalPort + globalRootPath;
-               title_href.setAttribute("href", prefix + "?sub_frame=1&target=record_detail&record=" + record.doc_id() );
-               title_href.setAttribute("target","_top"); /* escape to the outermost frame */
-               title_href.appendChild(mktext(record.title()));
-
-               var renewboxlink = mktext("N/A");
-               if(parseInt(circ.renewal_remaining()) > 0)
-                       renewboxlink = buildRenewBoxLink(circ);
-
-               /* grab circ lib name */
-               var org = obj._getOrgUnit(copy.circ_lib());
-               org = org.name();
-
-               /* for each circulation, build a row of data */
-               var dueCell                             = circRow.insertCell(circRow.cells.length);
-               var titleCell                   = circRow.insertCell(circRow.cells.length);
-               var durationCell                = circRow.insertCell(circRow.cells.length);
-               var barcodeCell         = circRow.insertCell(circRow.cells.length);
-               var circLibCell         = circRow.insertCell(circRow.cells.length);
-               var renewRemainCell     = circRow.insertCell(circRow.cells.length);
-               var renewCell                   = circRow.insertCell(circRow.cells.length);
-
-               add_css_class(titleCell, "my_opac_profile_cell");
-               add_css_class(dueCell, "my_opac_profile_cell");
-               add_css_class(durationCell, "my_opac_profile_cell");
-               add_css_class(barcodeCell, "my_opac_profile_cell");
-               add_css_class(circLibCell, "my_opac_profile_cell");
-               add_css_class(renewRemainCell, "my_opac_profile_cell");
-               add_css_class(renewCell, "my_opac_profile_cell");
-
-               titleCell.appendChild(title_href);
-               dueCell.appendChild(mktext(due));
-               durationCell.appendChild(mktext(circ.duration()));
-               barcodeCell.appendChild(mktext(copy.barcode()));
-               circLibCell.appendChild(mktext(org));
-               renewRemainCell.appendChild(mktext(circ.renewal_remaining()));
-               renewCell.appendChild(renewboxlink);
-
-       }
-
-}
-
-function buildRenewBoxLink(circ) {
-
-       var a = elem("a", 
-               {href:"javascript:void(0);",style:"text-decoration:underline"}, null, "Renew");
-       var but = elem("input",{type:"submit",value:"Renew Circulation"});
-       var can = elem("input",{type:"submit",value:"Cancel"});
-
-       var box = new PopupBox(a);
-       a.onclick = function(){box.show();}
-       can.onclick = function(){box.hide();}
-       but.onclick = function(){renewCheckout(circ);box.hide();};
-       box.title("Renew Circulation");
-       box.addText("Are you sure you want to renew the circulation?");
-       box.makeGroup([but, can]);
-       return a;
-}
-
-function renewCheckout(circ) {
-       var req = new RemoteRequest(
-               "open-ils.circ", "open-ils.circ.renew",
-               globalmyopac.user.session_id, circ );
-       req.send(true);
-
-       try{req.getResultObject();}catch(E){return;}
-       alert("Renewal completed successfully");
-       globalmyopac.draw("checked");
-}
-
-
-MyOPACSPage.prototype.getCheckedOut = function(callback) {
-
-       /* grab our circs and records */
-       var request = new RemoteRequest(
-               "open-ils.circ",
-               "open-ils.circ.actor.user.checked_out",
-               this.user.getSessionId() );
-
-       var obj = this;
-       request.setCompleteCallback(
-               function(req) {
-                       if(callback)
-                               callback(obj, req.getResultObject());
-               }
-       );
-
-       request.send();
-}
-
-
-MyOPACSPage.prototype._drawProfile = function() {
-
-       this.user.fleshMe(true);
-       var infot = elem("table");
-       this.infoTable.insertRow(0).insertCell(0).appendChild(infot);
-       this.infoTable.insertRow(1).insertCell(0).appendChild(
-               elem("div",{id:"my_opac_update_info"}));
-
-       var urow = infot.insertRow(infot.rows.length);
-       var prow = infot.insertRow(infot.rows.length);
-       var erow = infot.insertRow(infot.rows.length);
-       var brow = infot.insertRow(infot.rows.length);
-       var arow = infot.insertRow(infot.rows.length);
-       var a2row = infot.insertRow(infot.rows.length);
-
-       var ucell       = urow.insertCell(urow.cells.length);
-       var ucell2      = urow.insertCell(urow.cells.length);
-       var ucell3      = urow.insertCell(urow.cells.length);
-
-       var pcell       = prow.insertCell(prow.cells.length);
-       var pcell2      = prow.insertCell(prow.cells.length);
-       var pcell3      = prow.insertCell(prow.cells.length);
-
-       var ecell       = erow.insertCell(erow.cells.length);
-       var ecell2      = erow.insertCell(erow.cells.length);
-       var ecell3      = erow.insertCell(erow.cells.length);
-
-       var bcell       = brow.insertCell(brow.cells.length);
-       var bcell2      = brow.insertCell(brow.cells.length);
-       var bcell3      = brow.insertCell(brow.cells.length);
-
-       add_css_class(ucell, "my_opac_info_table_header");
-       add_css_class(pcell, "my_opac_info_table_header");
-       add_css_class(ecell, "my_opac_info_table_header");
-       add_css_class(bcell, "my_opac_info_table_header");
-
-       add_css_class(ucell2, "my_opac_profile_cell");
-       add_css_class(pcell2, "my_opac_profile_cell");
-       add_css_class(ecell2, "my_opac_profile_cell");
-       add_css_class(bcell2, "my_opac_profile_cell");
-
-       add_css_class(ucell3, "my_opac_profile_cell");
-       add_css_class(pcell3, "my_opac_profile_cell");
-       add_css_class(ecell3, "my_opac_profile_cell");
-       add_css_class(bcell3, "my_opac_profile_cell");
-
-       var ubold       = elem("b");
-       var pbold       = elem("b");
-       var ebold       = elem("b");
-       var bbold       = elem("b");
-       var abold       = elem("b");
-
-       var uclick = elem("a", 
-               {id:"uname_link",href:"javascript:void(0);",
-               style:"text-decoration:underline;"}, null, "Change");
-
-       var pclick = elem("a", 
-               {id:"passwd_link",href:"javascript:void(0);",
-               style:"text-decoration:underline;"}, null, "Change");
-
-       var eclick = elem("a", 
-               {id:"email_link",href:"javascript:void(0);", 
-               style:"text-decoration:underline;"}, null, "Change");
-
-       var obj = this;
-       uclick.onclick = function() { obj.updateUsername(); }
-       pclick.onclick = function() { obj.updatePassword(); }
-       eclick.onclick = function() { obj.updateEmail(); }
-
-       ucell.appendChild(mktext("Username"));
-       ubold.appendChild(mktext(this.user.userObject.usrname()));
-       ucell2.appendChild(ubold);
-       ucell3.appendChild(uclick);
-
-       pcell.appendChild(mktext("Password"));
-       pbold.appendChild(mktext("N/A"));
-       pcell2.appendChild(pbold);
-       pcell3.appendChild(pclick);
-
-       ecell.appendChild(mktext("Email Address"));
-       ebold.appendChild(mktext(this.user.userObject.email()));
-       ecell2.appendChild(ebold);
-       ecell3.appendChild(eclick);
-
-       bcell.appendChild(mktext("Active Barcode"));
-       bbold.appendChild(mktext(this.user.userObject.card().barcode()));
-       bcell2.appendChild(bbold);
-       bcell3.appendChild(mktext(" "));
-
-       /*
-       var addrTable = elem("table");
-       add_css_class(addrTable, "my_opac_addr_table");
-
-       var row = addrTable.insertRow(0);
-       var mailing = row.insertCell(0);
-       var space = row.insertCell(1);
-       var billing = row.insertCell(2);
-       */
-
-       /*
-       space.setAttribute("style","width: 30px");
-       space.appendChild(mktext(" "));
-
-       appendChild(this.mkAddrTable(addrTable, this.userObject.addresses()[a]));
-
-       var addr = this.user.userObject.mailing_address();
-       mailing.appendChild(this.mkAddrTable("Mailing Address", addr));
-
-       addr = this.user.userObject.billing_address();
-       billing.appendChild(this.mkAddrTable("Billing Address", addr));
-
-       this.infoPane.appendChild(elem("br"));
-       */
-
-
-       this.infoPane.appendChild(elem("hr"));
-       this.infoPane.appendChild(elem("br"));
-       this.infoPane.appendChild(this.mkAddrTable(this.user.userObject.addresses()));
-
-}
-
-
-MyOPACSPage.prototype.mkAddrTable = function(addresses) {
-
-       var table = elem("table");
-       add_css_class(table, "my_opac_addr_table");
-
-       var row = table.insertRow(table.rows.length);
-       var cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Address Type"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Street"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("City"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("County"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("State"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Zip Code"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Valid"));
-
-       for( var a in addresses ) {
-               var addr = addresses[a];
-               var row = table.insertRow(table.rows.length);
-               var cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               cell.appendChild(mktext(addr.address_type()));
-       
-               cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               var st = addr.street1();
-               if(addr.street2()) st += ", " + addr.street2();
-               cell.appendChild(mktext(st));
-       
-               cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               cell.appendChild(mktext(addr.city()));
-
-               cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               cell.appendChild(mktext(addr.county()));
-       
-               cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               cell.appendChild(mktext(addr.state()));
-       
-               cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               cell.appendChild(mktext(addr.post_code()));
-
-               var v = "Yes";
-               if(addr.valid() != "1") v = "No";
-               cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "my_opac_profile_cell");
-               cell.appendChild(mktext(v));
-       
-       }
-
-       return table;
-}
-
-
-
-
-MyOPACSPage.prototype.__mkAddrTable = function(type, addr) {
-       var table = elem("table");
-
-       var header_row = table.insertRow(table.rows.length);
-       var header_cell = header_row.insertCell(0);
-       add_css_class(header_cell,"my_opac_info_table_header");
-       header_cell.id = "header_cell";
-       header_cell.colSpan = 2;        
-       header_cell.setAttribute("colspan", "2");
-       header_cell.appendChild(mktext(type));
-
-       var s1row = table.insertRow(table.rows.length);
-       var s2row = table.insertRow(table.rows.length);
-       var cityrow = table.insertRow(table.rows.length);
-       var ziprow = table.insertRow(table.rows.length);
-       var staterow = table.insertRow(table.rows.length);
-
-       var s1cell = s1row.insertCell(0);
-       var s2cell = s2row.insertCell(0);
-       var citycell = cityrow.insertCell(0);
-       var zipcell = ziprow.insertCell(0);
-       var statecell = staterow.insertCell(0);
-
-       add_css_class(s1cell, "my_opac_info_table_header");
-       add_css_class(s2cell, "my_opac_info_table_header");
-       add_css_class(citycell, "my_opac_info_table_header");
-       add_css_class(zipcell, "my_opac_info_table_header");
-       add_css_class(statecell, "my_opac_info_table_header");
-
-       s1cell.appendChild(mktext("Address 1"));
-       s2cell.appendChild(mktext("Address 2"));
-       citycell.appendChild(mktext("City"));
-       zipcell.appendChild(mktext("Zip"));
-       statecell.appendChild(mktext("State"));
-
-
-       s1cell = s1row.insertCell(1);
-       s2cell = s2row.insertCell(1);
-       citycell = cityrow.insertCell(1);
-       zipcell = ziprow.insertCell(1);
-       statecell = staterow.insertCell(1);
-
-       add_css_class(s1cell, "my_opac_profile_cell");
-       add_css_class(s2cell, "my_opac_profile_cell");
-       add_css_class(citycell, "my_opac_profile_cell");
-       add_css_class(zipcell, "my_opac_profile_cell");
-       add_css_class(statecell, "my_opac_profile_cell");
-
-
-       s1cell.appendChild(mktext(addr.street1()));
-       s2cell.appendChild(mktext(addr.street2()));
-       citycell.appendChild(mktext(addr.city()));
-       zipcell.appendChild(mktext(addr.post_code()));
-       statecell.appendChild(mktext(addr.state()));
-
-       return table;
-}
-
-
-MyOPACSPage.prototype.updateUsername = function() {
-       var div = getById("my_opac_update_info");
-
-       /* user clicks to close */
-       if(getById("my_opac_update_usrname")) {
-               removeChildren(div);
-               return;
-       }
-
-       removeChildren(div);
-
-       var ut = elem("input",{type:"text",id:"new_uname"});
-       var but = elem("input",{type:"submit",value:"Update"});
-       var table = elem("table");
-       table.id = "my_opac_update_usrname";
-       var row = table.insertRow(0);
-
-
-       add_css_class(table,"my_opac_update_table");
-
-       var c0 = row.insertCell(0);
-       var c1 = row.insertCell(1);
-       var c2 = row.insertCell(2);
-
-       c0.appendChild(mktext("Enter new username: " ));
-       c1.appendChild(ut);     
-       c2.appendChild(but);    
-
-       div.appendChild(elem("br"));
-       div.appendChild(table);
-
-       try{ut.focus();}catch(E){}
-
-       /* verify looks ok, send the update request */
-       var obj = this;
-       but.onclick = function() {
-               var uname = getById("new_uname").value;
-               if(uname == null || uname == "") {
-                       alert("Please enter a username");
-                       return;
-               }
-               var resp = obj.user.updateUsername(uname);
-               if(resp)  alert("Username updated successfully");
-               else{ alert("Username update failed"); return; }
-               obj.draw("profile");
-
-       }
-}
-
-MyOPACSPage.prototype.updatePassword = function() {
-       var div = getById("my_opac_update_info");
-
-       /* user clicks to close */
-       if(getById("my_opac_update_password")) {
-               removeChildren(div);
-               return;
-       }
-       removeChildren(div);
-
-       var ut = elem("input",{type:"password",size:"15",id:"old_password"});
-       var ut2 = elem("input",{type:"password",size:"15",id:"new_password_1"});
-       var ut3 = elem("input",{type:"password",size:"15",id:"new_password_2"});
-       var but = elem("input",{type:"submit",value:"Update"});
-
-       var table = elem("table");
-       table.id = "my_opac_update_password";
-       add_css_class(table,"my_opac_update_table");
-
-       var row = table.insertRow(0);
-
-       var c0 = row.insertCell(0);
-       var c1 = row.insertCell(1);
-       var c2 = row.insertCell(2);
-       var c3 = row.insertCell(3);
-       var c4 = row.insertCell(4);
-       var c5 = row.insertCell(5);
-       var c6 = row.insertCell(6);
-
-       c0.appendChild(mktext("Current password: " ));
-       c1.appendChild(ut);     
-
-       c2.appendChild(mktext("New password: " ));
-       c3.appendChild(ut2);    
-
-       c4.appendChild(mktext("Repeat new password: " ));
-       c5.appendChild(ut3);    
-       c6.appendChild(but);    
-
-       div.appendChild(elem("br"));
-       div.appendChild(table);
-
-
-       try{ut.focus();}catch(E){}
-
-       /* verify looks ok, send the update request */
-       var obj = this;
-       but.onclick = function() {
-
-               var old = getById("old_password").value;
-               var p1 = getById("new_password_1").value;
-               var p2 = getById("new_password_2").value;
-
-               if(!old || !p1 || !p2) {
-                       alert("Please fill in all fields");
-                       return;
-               }
-
-               if(p1 != p2) {
-                       alert("New passwords do not match");
-                       return;
-               }
-
-               var resp = obj.user.updatePassword(old, p1);
-               if(resp) alert("Password updated successfully"); 
-               else {alert("Password change failed"); return; }
-               obj.draw("profile");
-       }
-
-}
-
-
-MyOPACSPage.prototype.updateEmail = function(){
-       var div = getById("my_opac_update_info");
-
-       /* user clicks to close */
-       if(getById("my_opac_update_usrname")) {
-               removeChildren(div);
-               return;
-       }
-
-       removeChildren(div);
-
-       var ut = elem("input",{type:"text",id:"new_email"});
-       var but = elem("input",{type:"submit",value:"Update"});
-       var table = elem("table");
-       table.id = "my_opac_update_usrname";
-       var row = table.insertRow(0);
-
-       add_css_class(table,"my_opac_update_table");
-
-       var c0 = row.insertCell(0);
-       var c1 = row.insertCell(1);
-       var c2 = row.insertCell(2);
-
-       c0.appendChild(mktext("Enter new email address: " ));
-       c1.appendChild(ut);     
-       c2.appendChild(but);    
-
-       div.appendChild(elem("br"));
-       div.appendChild(table);
-
-       try{ut.focus();}catch(E){}
-
-       /* verify looks ok, send the update request */
-       var obj = this;
-       but.onclick = function() {
-               var uname = getById("new_email").value;
-               if(uname == null || uname == "") {
-                       alert("Please enter a valid email address");
-                       return;
-               }
-               var resp = obj.user.updateEmail(uname);
-               if(resp)  alert("Email updated successfully");
-               else{ alert("Email update failed"); return; }
-               obj.draw("profile");
-
-       }
-
-}
-
-MyOPACSPage.prototype._drawHolds = function() {
-
-       var table = this.infoTable;
-       var row = table.insertRow(table.rows.length);
-
-       var cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Request Date"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Title"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Author"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Format(s)"));
-
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Notify Email / Phone"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Status"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Pickup Location"));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_info_table_header");
-       cell.appendChild(mktext("Cancel"));
-
-       /* ---------------------------------------- */
-       row = table.insertRow(table.rows.length);
-       row.id = "holds_waiting";
-       cell = row.insertCell(row.cells.length);
-       cell.appendChild(mktext("Retrieving holds..."));
-       /* ---------------------------------------- */
-
-       var holds = this.grabHolds();
-
-       for( var idx = 0; idx != holds.length; idx++ ) {
-               var hold = holds[idx];
-               var r = table.insertRow(table.rows.length);
-               r.id = "hold_display_row_" + hold.id();
-               debug("Displaying hold " + hold.id());
-               _doCallbackDance(table, hold, this.user.session_id, this);
-       }
-
-       if(!holds || holds.length == 0) {
-               var z = getById("holds_waiting");
-               z.firstChild.innerHTML = "No holds currently placed";
-       }
-
-
-}
-
-function _doCallbackDance(table, hold, session_id, obj) {
-       if(hold == null) return;
-       debug("Setting holds callback with hold " + hold.id() );
-       var func = function(rec) {_drawHoldsRow(table, hold, rec, session_id, obj)};
-
-       /* grab the record that is held */
-       if(hold.hold_type() == "M")
-               fetchMetaRecord(hold.target(), func);
-
-       if(hold.hold_type() == "T")
-               fetchRecord(hold.target(), func);
-}
-
-
-function _drawHoldsRow(table, hold, record, session_id, obj) {
-
-       if(record == null || record.length == 0) return;
-       debug("In holds callback with hold " + hold );
-
-       //var row = table.insertRow(table.rows.length);
-       var row = getById("hold_display_row_" + hold.id());
-
-       var cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_profile_cell");
-       var t = hold.request_time().replace(/[0-9][0-9]:.*$/,"");
-       cell.appendChild(mktext(t));
-
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_profile_cell");
-       cell.style.width = "35%";
-
-       var prefix = "http://" + globalRootURL + ":" + globalPort + globalRootPath;
-       var tl = elem("a",
-                       {href:prefix + "?sub_frame=1&target=record_detail&record="+encodeURIComponent(record.doc_id())},
-                       null, record.title());
-       tl.setAttribute("target","_top");
-       cell.appendChild(tl);
-
-       cell = row.insertCell(row.cells.length);
-       var al = elem("a",
-                       {href:prefix + "?sub_frame=1&target=mr_result"+
-                               "&mr_search_query="+encodeURIComponent(record.author())+
-                               "&mr_search_type=author"},
-                       null, record.author());
-       al.setAttribute("target","_top");
-       add_css_class(cell, "my_opac_profile_cell");
-
-       cell.appendChild(al);
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_profile_cell");
-
-       var formats = hold.holdable_formats();
-       if(formats == null || formats == "") /* only metarecord holds have holdable_formats */
-               formats = modsFormatToMARC(record.types_of_resource()[0]);
-
-       cell.appendChild(_mkFormatList(formats));
-       cell.noWrap = "nowrap";
-       cell.setAttribute("nowrap", "nowrap");
-
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_profile_cell");
-       cell.appendChild(_buildChangeEmailNotify(hold));
-       cell.appendChild(elem("br"));
-       cell.appendChild(_buildChangePhoneNotify(hold));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_profile_cell");
-       var stat = _fetchHoldStatus(hold);
-       cell.appendChild(mktext(stat));
-
-       cell = row.insertCell(row.cells.length);
-       add_css_class(cell, "my_opac_profile_cell");
-       cell.appendChild(mktext(findOrgUnit(hold.pickup_lib()).name()));
-       
-       cell = row.insertCell(row.cells.length);
-       var a = elem("a",{href:"javascript:void(0);",
-                       style:"text-decoration:underline"},null, "Cancel");
-       a.onclick = function(){_cancelHoldRequest(hold, a, session_id, obj);};
-       add_css_class(cell, "my_opac_profile_cell");
-       cell.appendChild(a);
-
-       var z = getById("holds_waiting");
-       if(z) table.firstChild.removeChild(z);
-}
-
-function _fetchHoldStatus(hold) {
-       var req = new RemoteRequest(
-               "open-ils.circ",
-               "open-ils.circ.hold.status.retrieve",
-               globalmyopac.user.session_id, hold.id());
-       req.send(true);
-       var stat = req.getResultObject();
-       if(stat == "1") stat = "Waiting for available copy";
-       if(stat == "2") stat = "Copy found, waiting for capture";
-       if(stat == "3") stat = "In Transit";
-       if(stat == "4") stat = "Available";
-       return stat;
-}
-
-
-function _cancelHoldRequest(hold, node, session_id, obj) {
-       var box = new PopupBox(node);
-       box.title("Cancel Hold");
-       box.addText("Are you sure you wish to cancel the hold?");
-       var but = elem("input",{type:"submit",value:"Cancel Hold"});
-       var can = elem("input",{type:"submit",value:"Do not Cancel Hold"});
-       box.makeGroup([but, can]);
-       but.onclick = function(){
-               _cancelHold(hold, session_id); box.hide(); obj.draw("holds");};
-       can.onclick = function() { box.hide(); };
-       box.show();
-}
-
-function _cancelHold(hold, session_id) {
-       var req = new RemoteRequest(
-               "open-ils.circ", "open-ils.circ.hold.cancel", 
-               session_id, hold );
-
-       req.send(true);
-       if(req.getResultObject())
-               alert("Hold successfully cancelled");
-}
-
-
-
-function _buildChangeEmailNotify(hold) {
-       var em = hold.email_notify();
-       if(!em || em == "") em = "(no email provided)";
-       var a = elem("a",{href:"javascript:void(0);",
-                       style:"text-decoration:underline"},null, em);
-       var ourint = ++globalinteger;
-       var et1 = elem("input",{id:"update_email_1_" + ourint,type:"text",size:"20"});
-       var et2 = elem("input",{id:"update_email_2_" + ourint,type:"text",size:"20"});
-       var box = new PopupBox(a);
-       var but = elem("input",{type:"submit",value:"Submit"});
-       var can = elem("input",{type:"submit",value:"Cancel"});
-
-       but.onclick = function(){
-               var ret = _submitUpdateNotifyEmail(hold, ourint);
-               if(ret) {
-                       box.hide();
-                       globalmyopac.draw("holds");
-               }
-       }
-       can.onclick = function(){ box.hide(); };
-
-       box.title("Change Holds Notification Email");
-       box.addText("Enter new notification email");
-       box.addNode(et1);
-       box.lines(1);
-       box.addText("Repeat email");
-       box.addNode(et2);
-       box.lines();
-       box.makeGroup([ but, can ]);
-
-       a.onclick = function(){box.show(); et1.focus();}
-       return a;
-}
-
-/* return true to show success */
-function _submitUpdateNotifyEmail(hold, ourint) {
-
-       var e1 = getById("update_email_1_" + ourint).value;
-       var e2 = getById("update_email_2_" + ourint).value;
-
-       if(!e1 || !e2 || e1 == "" || e2 == "") {
-               alert("Enter and repeate new email address");
-               return false;
-       }
-       if( e1 != e2) {
-               alert("Email addresses do not match");
-               return false;
-       }
-
-       hold.email_notify(e1);
-       if(_updateHold(hold)) return true;
-}
-
-function _submitUpdateNotifyPhone(hold, ourint) {
-       var p = getById("update_phone_" + ourint).value;
-       if(!p || p == "") {
-               alert("Enter new phone number in the field provided");
-               return false;
-       }
-
-       hold.phone_notify(p);
-       if(_updateHold(hold)) return true;
-}
-
-
-function _updateHold(hold) {
-       var req = new RemoteRequest(
-               "open-ils.circ",
-               "open-ils.circ.hold.update",
-               globalmyopac.user.session_id, hold);
-       req.send(true);
-       if(req.getResultObject()) return true;
-}
-
-
-function _buildChangePhoneNotify(hold) {
-
-       var phone = hold.phone_notify();
-       if(!phone || phone == "") phone = "(no phone provided)";
-       var a = elem("a",{href:"javascript:void(0);",
-                       style:"text-decoration:underline"},null, phone);
-
-       var ourint = ++globalinteger;
-
-       var et1 = elem("input",{id:"update_phone_" + ourint,type:"text",size:"10"});
-       var box = new PopupBox(a);
-       var but = elem("input",{type:"submit",value:"Submit"});
-       var can = elem("input",{type:"submit",value:"Cancel"});
-
-       but.onclick = function(){
-               var ret = _submitUpdateNotifyPhone(hold, ourint);
-               if(ret) {
-                       box.hide();
-                       globalmyopac.draw("holds");
-               }
-       }
-       can.onclick = function(){ box.hide(); };
-
-       box.title("Change Holds Notification Phone Number");
-       box.addText("Enter new notification number");
-       box.addNode(et1);
-       box.lines();
-       box.makeGroup([ but, can ]);
-
-       a.onclick = function(){box.show(); et1.focus();}
-       return a;
-}
-
-
-function _mkFormatList(formats) {
-
-       var div = elem("div");
-       var seen = new Object();
-       for( var i = 0; i!= formats.length; i++ ) {
-               var form = MARCFormatToMods(formats.charAt(i));
-               if(seen[form]) continue;
-               div.appendChild(mkResourceImage(form));
-               seen[form] = true;
-       }
-       return div;
-}
-
-
-
-
-MyOPACSPage.prototype.grabHolds = function() {
-       this.user.fleshMe();
-       var req = new RemoteRequest(
-               "open-ils.circ",
-               "open-ils.circ.holds.retrieve",
-               this.user.session_id,
-               this.user.userObject.id() );
-       req.send(true);
-       return req.getResultObject();
-}
-
-
-
-
-
-
-
-
-
-
-/* ----------------------------------------------------------------- ========== ------------ */
-
-
-
-MyOPACSPage.prototype.drawPersonal = function() {
-       this.personalBox = new Box();
-       this.personalBox.init(
-               "Edit User Information", false, false);
-
-       var obj = this;
-
-       var uname_div = createAppElement("div");
-       var uname_href = createAppElement("a");
-       uname_href.onclick = function() {obj.buildUpdateUname();}
-       uname_href.setAttribute("href", "javascript:void(0)");
-       uname_href.appendChild(mktext("Change Username"));
-
-       uname_div.appendChild(mktext("Username is ")); 
-       var bold = createAppElement("b");
-       bold.appendChild(mktext(this.user.username));
-       uname_div.appendChild(bold);
-       uname_div.appendChild(createAppElement("br"));
-       uname_div.appendChild(uname_href);
-       this.personalBox.addItem( uname_div,"edit_username");
-
-       this.personalBox.addItem( createAppElement("hr"),"break");
-
-       var password_href = createAppElement("a");
-       password_href.setAttribute("href", "javascript:void(0)");
-       password_href.onclick = function() {obj.buildUpdatePassword();}
-       password_href.appendChild(mktext("Change Password"));
-       this.personalBox.addItem( password_href,"edit_password");
-
-       this.personalBox.addItem( createAppElement("hr"),"break2");
-
-       var email_div = createAppElement("div");
-       var email_href = createAppElement("a");
-       email_href.onclick = function() {obj.buildUpdateEmail();}
-       email_href.setAttribute("href", "javascript:void(0)");
-       email_href.appendChild(mktext("Change Email Address"));
-
-       var em = this.user.userObject.email();
-       if(!em) em = "[empty]";
-
-       email_div.appendChild(mktext("Email address is ")); 
-       var bold = createAppElement("b");
-       bold.appendChild(mktext(em));
-       email_div.appendChild(bold);
-       email_div.appendChild(createAppElement("br"));
-       email_div.appendChild(email_href);
-       this.personalBox.addItem( email_div,"edit_email");
-
-
-       this.personal.appendChild(this.personalBox.getNode());
-}
-
-
-MyOPACSPage.prototype.buildUpdateEmail = function() {
-       var item = this.personalBox.findByKey("edit_email");
-       var node = item.getNode();
-
-       if(node.childNodes.length > 1) {
-               node.removeChild(node.childNodes[1]);
-               return;
-       }
-
-       var newEmail = createAppElement("input");
-       newEmail.setAttribute("type", "text");
-       newEmail.id = "new_email";
-
-       var newEmail2 = createAppElement("input");
-       newEmail2.setAttribute("type", "text");
-       newEmail2.id = "new_email2";
-
-       var button = createAppElement("input");
-       button.setAttribute("type", "submit");
-       button.setAttribute("value", "Submit");
-
-       var obj = this;
-       button.onclick = function() { 
-
-               var em = getById("new_email").value;
-               var em2 = getById("new_email2").value;
-               if(em != em2) {
-                       alert("Email addresses do not match");
-                       return;
-               }
-               var resp = obj.user.updateEmail(em);
-               if(resp) { alert("Email updated successfully"); obj.draw();}
-               else { return; }
-
-               var node = obj.personalBox.findByKey("edit_email").getNode();
-               node.removeChild(node.childNodes[1]);
-       }
-
-
-       var chunk = createAppElement("div");
-       chunk.className = "edit_personal_active";
-
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext("Enter New Email:"));
-       chunk.appendChild(newEmail);
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext("Repeat New Email:"));
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(newEmail2);
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext(" "));
-
-       var center = createAppElement("center");
-       center.appendChild(button);
-       chunk.appendChild(center);
-
-       node.appendChild(chunk);
-       try { newEmail.focus(); } catch(E){}
-
-}
-
-MyOPACSPage.prototype.buildUpdateUname = function() {
-       var item = this.personalBox.findByKey("edit_username");
-       var node = item.getNode();
-
-       if(node.childNodes.length > 1) {
-               node.removeChild(node.childNodes[1]);
-               return;
-       }
-
-       var newName = createAppElement("input");
-       newName.setAttribute("type", "text");
-       newName.id = "new_uname";
-
-       var button = createAppElement("input");
-       button.setAttribute("type", "submit");
-       button.setAttribute("value", "Submit");
-
-       var obj = this;
-       button.onclick = function() { 
-
-               var resp = obj.user.updateUsername(getById("new_uname").value);
-               if(resp) { alert("Username updated successfully"); obj.draw()}
-               else { alert("Username update failed"); return; }
-
-               var node = obj.personalBox.findByKey("edit_username").getNode();
-               node.removeChild(node.childNodes[1]);
-       }
-
-
-       var chunk = createAppElement("div");
-       chunk.className = "edit_personal_active";
-
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext("Enter New Username:"));
-       chunk.appendChild(newName);
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext(" "));
-
-       var center = createAppElement("center");
-       center.appendChild(button);
-       chunk.appendChild(center);
-
-       //chunk.appendChild(createAppElement("br"));
-       //chunk.appendChild(createAppElement("br"));
-       node.appendChild(chunk);
-       try { newName.focus(); } catch(E){}
-}
-
-MyOPACSPage.prototype.buildUpdatePassword = function() {
-       var item = this.personalBox.findByKey("edit_password");
-       var node = item.getNode();
-       if(node.childNodes.length > 1) {
-               node.removeChild(node.childNodes[1]);
-               return;
-       }
-
-       var oldPassword = createAppElement("input");
-       oldPassword.setAttribute("type", "password");
-       oldPassword.id = "old_password";
-
-       var newPassword = createAppElement("input");
-       newPassword.setAttribute("type", "password");
-       newPassword.id = "new_password";
-
-       var newPassword2 = createAppElement("input");
-       newPassword2.setAttribute("type", "password");
-       newPassword2.id = "new_password2";
-
-
-       var button = createAppElement("input");
-       button.setAttribute("type", "submit");
-       button.setAttribute("value", "Submit");
-
-       var obj = this;
-       button.onclick = function() { 
-
-               var new1 = getById("new_password").value;
-               var new2 = getById("new_password2").value;
-               var old = getById("old_password").value;
-
-               if(new1 != new2) {
-                       alert("Passwords do not match");
-                       return;
-               }
-
-               var resp = obj.user.updatePassword(old, new1);
-               if(resp) { alert("Password updated successfully"); }
-               else { return; }
-
-               var node = obj.personalBox.findByKey("edit_password").getNode();
-               node.removeChild(node.childNodes[1]);
-       }
-
-       var chunk = createAppElement("div");
-       chunk.className = "edit_personal_active";
-
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext("Current Password:"));
-       chunk.appendChild(oldPassword);
-       chunk.appendChild(createAppElement("br"));
-
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext("Enter New Password:"));
-       chunk.appendChild(newPassword);
-       chunk.appendChild(createAppElement("br"));
-
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(mktext("Re-Enter New Password:"));
-       chunk.appendChild(newPassword2);
-       chunk.appendChild(createAppElement("br"));
-       chunk.appendChild(createAppElement("br"));
-
-       chunk.appendChild(mktext(" "));
-
-       var center = createAppElement("center");
-       center.appendChild(button);
-       chunk.appendChild(center);
-
-       //chunk.appendChild(createAppElement("br"));
-       node.appendChild(chunk);
-       try { newPassword.focus(); } catch(E){}
-
-}
-
-
-/*
-MyOPACSPage.prototype.getCheckedOut = function() {
-
-       this.checkedOutBox = new Box();
-       this.checkedOutBox.init(
-               "Items Checked Out", false, false);
-       this.checkedOutBox.sortByKey();
-
-
-       var request = new RemoteRequest(
-               "open-ils.circ",
-               "open-ils.circ.actor.user.checked_out",
-               this.user.getSessionId() );
-
-       var obj = this;
-       request.setCompleteCallback(
-               function(req) {
-                       obj._addCircs(req.getResultObject());
-               }
-       );
-
-       request.send();
-}
-*/
-
-
-MyOPACSPage.prototype._addCircs = function(data) {
-
-       if(data.length < 1) {
-               debug("No circs exist for this user");
-               this.checkedOutBox.addItem(
-                       mktext("No items currently checked out") );
-               return;
-       }
-
-       for( var index in data ) {
-
-               var circ                = data[index].circ;
-               var record      = data[index].record;
-               var copy                = data[index].copy;
-
-
-               var due = new Date(parseInt(circ.due_date() + "000")).toLocaleString();
-               due = due.replace(/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/,"");
-
-               var title_href = createAppElement("a");
-               var prefix = "http://" + globalRootURL + ":" + globalPort + globalRootPath;
-               title_href.setAttribute("href",prefix + "?sub_frame=1&target=record_detail&record=" + record.doc_id() );
-               title_href.setAttribute("target","_top"); /* escape to the outermost frame */
-               title_href.appendChild(mktext(record.title()));
-
-               /* grab circ lib name */
-               var org = this._getOrgUnit(copy.circ_lib());
-               org = org.name();
-
-               /* for each circulation, build a small table of data */
-               var table = createAppElement("table");
-               this._mkCircRow(table, "Due Date",      mktext(due));
-               this._mkCircRow(table, "Title",         title_href);
-               this._mkCircRow(table, "Duration",      mktext(circ.duration()));
-               this._mkCircRow(table, "Barcode",       mktext(copy.barcode()));
-               this._mkCircRow(table, "Circulating Library", mktext(org));
-
-
-               this.checkedOutBox.addItem(table);
-
-               if(index < data.length - 1) 
-                       this.checkedOutBox.addItem(createAppElement("hr"));
-       }
-
-}
-
-MyOPACSPage.prototype._mkCircRow = function(table, title, data) {
-       var row = table.insertRow(table.rows.length);
-       var cell = row.insertCell(row.cells.length);
-       cell.appendChild(mktext(title));
-       cell = row.insertCell(row.cells.length);
-       cell.appendChild(data);
-}
-
-
-MyOPACSPage.prototype._getOrgUnit = function(org_id) {
-       var request = new RemoteRequest(
-               "open-ils.actor",
-               "open-ils.actor.org_unit.retrieve",
-               this.user.getSessionId(),
-               org_id );
-       request.send(true);
-       return request.getResultObject();
-}
-
-
-var showTransactions = false;
-MyOPACSPage.prototype._drawFines = function() {
-       this.drawFinesSummary();
-       this.infoPane.appendChild(elem("hr"));
-       this.infoPane.appendChild(elem("br"));
-       if(showTransactions) this.drawTransactions();
-}
-
-
-MyOPACSPage.prototype.drawFinesSummary = function() {
-
-       var bigt = this.infoTable;
-       var table = elem("table");
-       bigt.insertRow(0).insertCell(0).appendChild(table);
-
-       var title = table.insertRow(table.rows.length);
-       var tcell = title.insertCell(0);
-       tcell.setAttribute("style", "font-weight: bolder");
-       tcell.appendChild(mktext("Fines Summary"));
-
-       var torow = table.insertRow(table.rows.length);
-       var tprow = table.insertRow(table.rows.length);
-       var borow = table.insertRow(table.rows.length);
-
-       var to = torow.insertCell(torow.cells.length);   
-       var tp = tprow.insertCell(tprow.cells.length);   
-       var bo = borow.insertCell(borow.cells.length);   
-
-       add_css_class(to, "my_opac_info_table_header");
-       add_css_class(tp, "my_opac_info_table_header");
-       add_css_class(bo, "my_opac_info_table_header");
-
-       to.appendChild(mktext("Total Amount Owed"));
-       tp.appendChild(mktext("Total Amoun Paid"));
-       bo.appendChild(mktext("* Balance Owed"));
-
-       to = torow.insertCell(torow.cells.length);       
-       tp = tprow.insertCell(tprow.cells.length);       
-       bo = borow.insertCell(borow.cells.length);       
-
-       add_css_class(to, "my_opac_profile_cell");
-       add_css_class(tp, "my_opac_profile_cell");
-       add_css_class(bo, "my_opac_profile_cell");
-       
-       var summary = grabUserFinesSummary(
-               globalmyopac.user.session_id, globalmyopac.user.userObject.id());
-
-       var owed; 
-       var paid; 
-       var bowed;
-
-       if(instanceOf(summary, mus)) {
-               showTransactions = true;
-               owed = _finesFormatNumber(summary.total_owed());
-               paid = _finesFormatNumber(summary.total_paid());
-               bowed = _finesFormatNumber(summary.balance_owed());
-
-       } else {
-               showTransactions = false;
-               owed = _finesFormatNumber("0.00");
-               paid = _finesFormatNumber("0.00");
-               bowed = _finesFormatNumber("0.00");
-       }
-
-       to.appendChild(mktext(owed));
-       tp.appendChild(mktext(paid));
-       bo.appendChild(mktext(bowed));
-
-}
-
-function _finesFormatNumber(num) {
-       if(num.length == "1" || !num.match(/\./)) num += ".00";
-       num = "$" + num;
-       return num;
-}
-
-
-MyOPACSPage.prototype.drawTransactions = function() {
-       var table = elem("table");
-       var d = elem("div", {style:"font-weight: bolder"}, null, "Summary of Charges");
-       this.infoPane.appendChild(d);
-       this.infoPane.appendChild(table);
-
-       var row = table.insertRow(table.rows.length);
-
-       var cella = row.insertCell(row.cells.length);
-       var cellb = row.insertCell(row.cells.length);
-       var cellc = row.insertCell(row.cells.length);
-       var celld = row.insertCell(row.cells.length);
-       var celle = row.insertCell(row.cells.length);
-       var cellf = row.insertCell(row.cells.length);
-       var cellg = row.insertCell(row.cells.length);
-       var cellh = row.insertCell(row.cells.length);
-
-       add_css_class(cella, "my_opac_info_table_header");
-       add_css_class(cellb, "my_opac_info_table_header");
-       add_css_class(cellc, "my_opac_info_table_header");
-       add_css_class(celld, "my_opac_info_table_header");
-       add_css_class(celle, "my_opac_info_table_header");
-       add_css_class(cellf, "my_opac_info_table_header");
-       add_css_class(cellg, "my_opac_info_table_header");
-       add_css_class(cellh, "my_opac_info_table_header");
-
-       cella.appendChild(mktext("Transaction Start Time"));
-       cellb.appendChild(mktext("Last Billing Time"));
-       cellc.appendChild(mktext("Last Payment Time"));
-       celld.appendChild(mktext("Initial Amount Owed"));
-       celle.appendChild(mktext("Total Amount Paid"));
-       cellf.appendChild(mktext("* Balance Owed"));
-       cellg.appendChild(mktext("Type"));
-       cellh.appendChild(mktext("Extra Info"));
-
-       var transactions = grabUserTransactions(
-                globalmyopac.user.session_id, globalmyopac.user.userObject.id());
-
-       for( var t in transactions ) _addTransactionRow(table, transactions[t]);
-
-}
-
-
-function _addTransactionRow(table, transaction) {
-
-       var trans = transaction.transaction;
-       var circ = transaction.circ;
-       var record = transaction.record;
-
-       var row = table.insertRow(table.rows.length);
-       var cella = row.insertCell(row.cells.length);
-       var cellb = row.insertCell(row.cells.length);
-       var cellc = row.insertCell(row.cells.length);
-       var celld = row.insertCell(row.cells.length);
-       var celle = row.insertCell(row.cells.length);
-       var cellf = row.insertCell(row.cells.length);
-       var cellg = row.insertCell(row.cells.length);
-       var cellh = row.insertCell(row.cells.length);
-
-       add_css_class(cella, "my_opac_profile_cell");
-       add_css_class(cellb, "my_opac_profile_cell");
-       add_css_class(cellc, "my_opac_profile_cell");
-       add_css_class(celld, "my_opac_profile_cell");
-       add_css_class(celle, "my_opac_profile_cell");
-       add_css_class(cellf, "my_opac_profile_cell");
-       add_css_class(cellg, "my_opac_profile_cell");
-       add_css_class(cellh, "my_opac_profile_cell");
-
-       var owed = _finesFormatNumber(trans.total_owed());
-       var paid = _finesFormatNumber(trans.total_paid());
-       var bowed = _finesFormatNumber(trans.balance_owed());
-
-       var stime = _trimSeconds(trans.xact_start());
-       var last_bill = _trimSeconds(trans.last_billing_ts());
-       var last_payment = _trimSeconds(trans.last_payment_ts());
-
-       cella.appendChild(mktext(stime));
-       cellb.appendChild(mktext(last_bill));
-       cellc.appendChild(mktext(last_payment));
-       celld.appendChild(mktext(owed));
-       celle.appendChild(mktext(paid));
-       cellf.appendChild(mktext(bowed));
-       cellg.appendChild(mktext(trans.xact_type()));
-       var extrainfo = "N/A";
-       if(trans.xact_type() == "circulation")
-               extrainfo = "Title: " + _grabTitleFromCircTransaction(trans);
-       cellh.appendChild(mktext(extrainfo));
-
-
-}
-
-function _grabTitleFromCircTransaction(trans) {
-       var req = new RemoteRequest(
-               "open-ils.circ", 
-               "open-ils.circ.circ_transaction.find_title",
-               globalmyopac.user.session_id, trans.id() );
-       req.send(true);
-       return req.getResultObject().title();
-
-}
-
-
-function _trimSeconds(time) { if(!time) return ""; return time.replace(/\..*/,""); }
-
-function grabUserTransactions(session, usrid) {
-       var req = new RemoteRequest(
-               "open-ils.actor",
-               "open-ils.actor.user.transactions.have_charge.fleshed",
-               session, usrid );
-       req.send(true);
-       return req.getResultObject();
-}
-
-
-function grabUserFinesSummary(session, usrid) {
-       var req = new RemoteRequest(
-               "open-ils.actor",
-               "open-ils.actor.user.fines.summary",
-               session, usrid );
-       req.send(true);
-       return req.getResultObject();
-}
-
-
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/opac/OPACStartPage.js b/Open-ILS/src/javascript/opac/OPACStartPage.js
deleted file mode 100644 (file)
index c224524..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-OPACStartPage.prototype                                        = new Page();
-OPACStartPage.prototype.constructor    = OPACStartPage;
-OPACStartPage.baseClass                                        = Page.constructor;
-
-try {
-       if(parent) 
-               parent.OPACStartPage = OPACStartPage;
-} catch(E){}
-
-try {
-       if(child)
-               child.OPACStartPage = OPACStartPage;
-} catch(E){}
-
-
-// ---------------------------------------------------------------------------------
-// opac_start
-// ---------------------------------------------------------------------------------
-
-var globalOPACStartPage = null;
-
-               
-function OPACStartPage() {
-
-       debug("In OPACStartPage()");
-       this.searchBrFormChunk = new SearchBarFormChunk();
-
-       if( globalOPACStartPage ) {
-               return globalOPACStartPage; 
-       }
-
-       this.init();
-       globalOPACStartPage = this;
-}
-
-OPACStartPage.prototype.instance = function() {
-       if( globalOPACStartPage ) 
-               return globalOPACStartPage; 
-
-       return new OPACStartPage();
-}
-
-OPACStartPage.prototype.init = function() {
-
-       globalSearchBarFormChunk.resetPage();
-       var login = getById("login_link");
-
-       if(!UserSession.instance().verifySession()) {
-               login.setAttribute("href","javascript:void(0);");
-               var func = function(){url_redirect(["target","my_opac"])};
-               var diag = new LoginDialog(func);
-               login.onclick = function(){diag.display(login);}
-       }
-}
-
-
-OPACStartPage.prototype.doSearch = function() {
-}
diff --git a/Open-ILS/src/javascript/opac/Page.js b/Open-ILS/src/javascript/opac/Page.js
deleted file mode 100644 (file)
index ea728d8..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-/* Top level page object.  All pages descend from this class */
-
-function Page() {}
-
-Page.prototype.init = function() {
-       debug("Falling back to Page.init()");
-}
-
-/* override me */
-Page.prototype.instance = function() {
-       throw new EXAbstract(
-                       "instance() must be overridden by all Page subclasses");
-}
-
-
-/* XXX move me to the status bar */
-Page.prototype.updateSelectedLocation = function(org) {
-       var node;
-       if( typeof org == 'object' ) node = org;
-       else node = getOrgById(org);
-       globalSelectedLocation = node;
-       globalSearchDepth = findOrgType(node.ou_type()).depth();
-       this.setLocDisplay();
-}
-
-Page.prototype.updateCurrentLocation = function(org) {
-       if( typeof org == 'object' ) node = org;
-       else node = getOrgById(orgid);
-       globalLocation = node;
-       this.setLocDisplay();
-}
-       
-
-/* tells the user where he is searching */
-Page.prototype.setLocDisplay = function(name) {
-
-       debug("Setting loc display on the status bar");
-       this.searchingCell = getById("now_searching_cell");
-
-       if( this.searchingCell == null ) return;
-       var name;
-       
-       var orgunit;
-       if( globalSelectedLocation )
-               orgunit = globalSelectedLocation;
-       else { orgunit = globalLocation; }
-
-       this.searchingCell.innerHTML = 
-               "Now Searching <span class='breadcrumb_label'>" + orgunit.name() + "</span>";
-
-       this.resetRange();
-       return;
-
-
-
-
-       var arr = orgNodeTrail(orgunit);
-
-       this.searchingCell.innerHTML = "";
-       var names = new Array()
-       for( var i in arr) 
-               names.push(arr[i].name());
-
-       this.searchingCell.innerHTML = 
-               "<span class='breadcrumb_label'>" + 
-               names.join("</span> / <span class='breadcrumb_label'>") + 
-               "</span>";
-
-       this.resetRange();
-
-}
-
-Page.prototype.resetRange = function() {
-
-       this.searchRange                        = getById("search_range_select");
-
-       while( this.searchRange.options.length ) {
-               this.searchRange.options[0] = null;
-       }
-
-       var orgunit = globalSelectedLocation;
-       if(!orgunit)
-               orgunit = globalLocation;
-
-       debug("Reseting search range with search location " + orgunit);
-       debug("Resetting search range with search depth " + globalSearchDepth );
-
-       var selectedOption = null;
-
-       if(this.searchRange) {
-
-               for( var index in globalOrgTypes ) {
-                       var otype = globalOrgTypes[index];
-
-                       if( otype.depth() > findOrgType(orgunit.ou_type()).depth() )
-                               continue;
-
-                       var select =  new Option(otype.opac_label(), otype.depth());
-                       this.searchRange.options[this.searchRange.options.length] = select;
-
-                       if( otype.depth() == globalSearchDepth ) {
-                               selectedOption = index;
-                       }
-               }
-       }
-
-       this.searchRange.selectedIndex = selectedOption;
-       var opt = this.searchRange.options[selectedOption];
-       if(opt) opt.selected = true;
-
-       if(this.searchRange.options.length == 1 ) 
-               hideMe(this.searchRange.parentNode);
-       else  {
-               this.searchRange.parentNode.style.visibility = "visible";
-               this.searchRange.parentNode.style.display = "inline";
-       }
-
-       if( instanceOf(this, AbstractRecordResultPage) ) {
-
-               /* submit the search when the search range is selected */
-               var obj = this;
-
-               debug("Setting onclick for selector");
-
-               var obj = this;
-               this.searchRange.onchange = function() {
-       
-                       var location = globalSelectedLocation;
-                       if(location == null) location = globalLocation.id();
-                       else location = location.id();
-                       globalSearchDepth = obj.searchRange.options[obj.searchRange.selectedIndex].value;       
-       
-                       url_redirect( [ 
-                                       "target",                                       "mr_result",
-                                       "mr_search_type",                       lastSearchType,
-                                       "mr_search_query",              lastSearchString,
-                                       "mr_search_location",   location,
-                                       "mr_search_depth",              globalSearchDepth,      
-                                       "format",                                       paramObj.__format, 
-                                       "page",                                         0
-                                       ] );
-               }
-       }
-}
-
-
-
-
-
-Page.prototype.setPageTrail = function() {
-       debug("Falling back to Page.setPageTrail");
-}
-
-
-Page.prototype.buildTrailLink = function(type, active) {
-
-       var obj = locationStack[type];
-       if(obj == null) return;
-
-       var div = createAppElement("div");
-
-       if(active) {
-               add_css_class(div,"page_trail_word");
-               var a = createAppElement("a");
-               a.setAttribute("href", obj.location);
-               a.appendChild(createAppTextNode(obj.title));
-               a.title = obj.title;
-               div.appendChild(a);
-
-       } else {
-               add_css_class(div,"page_trail_word_inactive");
-               div.appendChild(createAppTextNode(obj.title));
-       }
-
-       return div;
-}
-
-Page.prototype.buildDivider = function() {
-       var div = createAppElement("div");
-       div.className = "page_trail_divider";
-       var text =  createAppTextNode(" / ");
-       div.appendChild(text);
-       return div;
-}
-
-/* if 'full' add target=_top to break out of the page */
-Page.prototype.buildNavBox = function(full) {
-       Page.navBox = new Box();
-       Page.navBox.init("Navigation", false, false);
-       var table = elem("table");
-       add_css_class(table, "main_nav_table");
-
-       var arr = [];
-
-       /* location tree */
-       var loc = null;
-       try {
-               if(globalOrgTree)
-                       loc = elem("a", 
-                               {id:"location_nav_link", href:"javascript:void(0);"}, 
-                               null, "Change Search Location");
-
-               loc.onclick = function(evt) {
-                       globalPage.locationTree.toggle(getById("location_nav_link"));
-               }
-               arr.push(loc);
-       } catch(E){}
-
-       if(globalPort == "443") globalPort = "80";
-       var prefix = "http://" + globalRootURL + ":" + globalPort + globalRootPath;
-
-       arr.push(elem("a", {href: prefix + '?target=advanced_search'}, null, "Advanced Search"));
-
-
-       if(!isXUL()) {
-               var mylink = elem("a", {href: "?target=my_opac"}, null, "My OPAC");
-               arr.push(mylink);
-       }
-
-       /* if user is not logged in, popup the login dialog when they
-               select the myopac link */
-       if(!UserSession.instance().verifySession()) {
-               mylink.setAttribute("href","javascript:void(0);");
-               var func = function(){url_redirect(["target","my_opac"])};
-               var diag = new LoginDialog(func);
-               mylink.onclick = function(){diag.display(mylink);}
-       }
-
-
-       if(loc) arr.push(this.buildDeepLink());
-
-       if(UserSession.instance().verifySession() && !isXUL() ) {
-               var a = elem("a", {href:"http://" + globalRootURL + ":" 
-                               + globalPort + "/" + globalRootPath}, null, "Logout");
-               a.onclick = doLogout;
-               arr.push(a);
-       } 
-
-
-       for( var i in arr ) {
-               var row = table.insertRow(table.rows.length);
-               add_css_class(row, "main_nav_row");
-               var cell = row.insertCell(row.cells.length);
-               add_css_class(cell, "main_nav_cell");
-               cell.appendChild(arr[i]);
-               if(full) 
-                       arr[i].setAttribute("target", "_top");
-       }
-
-       /* append to the page */
-       Page.navBox.addItem(table);
-       Page.navBox.finalize();
-
-       var location = getById("main_page_nav_box");
-       if(location) {
-               removeChildren(location);
-               location.appendChild(Page.navBox.getNode());
-       }
-       
-
-       return Page.navBox.getNode();
-}
-
-Page.prototype.buildDeepLink = function() {
-       try {
-               if(!globalAppFrame)
-                       return elem("div");
-       } catch(E) { return elem("div"); }
-
-       var org = globalSelectedLocation;
-       if(org == null)
-               org = globalLocation;
-       if(org) org = org.id();
-
-       var depth = globalSearchDepth;
-
-       if(globalPort == "443") globalPort = "80";
-       var prefix = "http://" + globalRootURL + ":" + globalPort + globalRootPath;
-
-       var string =globalAppFrame.location.href;
-       if(!string.match(/sub_frame/))
-               string += "&sub_frame=1"
-
-       if(org) {
-               if(!string.match(/location/))
-               string += "&location=" + org;
-       }
-
-       if(depth) {
-               if(!string.match(/depth/))
-               string += "&depth=" + depth;
-       }
-
-       debug("Redirecting deep link to " + string );
-
-       var a = elem("a",
-               { href: prefix + string }, null, "Link to this page"
-       );
-
-       a.setAttribute("target", "_blank");
-       return a;
-}
-
-
-Page.prototype.destroy = function() { 
-       for( var x in this ){
-               this[x] = null;
-       }
-}
-
-
-
-
-
-
-
-
diff --git a/Open-ILS/src/javascript/opac/RecordDetailPage.js b/Open-ILS/src/javascript/opac/RecordDetailPage.js
deleted file mode 100644 (file)
index 29585d1..0000000
+++ /dev/null
@@ -1,692 +0,0 @@
-var globalRecordDetailPage = null;
-RecordDetailPage.prototype                                     = new Page();
-RecordDetailPage.prototype.constructor = RecordDetailPage;
-RecordDetailPage.baseClass                                     = Page.constructor;
-
-var globalDetailRecord;
-
-function RecordDetailPage() {
-       if( globalRecordDetailPage != null )
-               return globalRecordDetailPage;
-       this.searchBar  = new SearchBarChunk();
-}
-
-RecordDetailPage.prototype.setPageTrail = function() {
-       var box = getById("page_trail");
-       if(!box) return;
-
-       var d = this.buildTrailLink("start",true);
-       if(d) {
-               box.appendChild(d);
-       } else {
-               d = this.buildTrailLink("advanced_search",true);
-               if(d)
-                       box.appendChild(d);
-       }
-
-       var b = this.buildTrailLink("mr_result", true);
-
-       if(b) {
-               box.appendChild(this.buildDivider());
-               box.appendChild(b);
-       }
-
-       box.appendChild(this.buildDivider());
-       try {
-               box.appendChild(this.buildTrailLink("record_result", true));
-       } catch(E) {} /* doesn't work when deep linking */
-
-       box.appendChild(this.buildDivider());
-       box.appendChild(
-               this.buildTrailLink("record_detail",false));
-}
-
-
-RecordDetailPage.prototype.buildContextMenu = function(record) {
-
-       var menu_name = "record_detail_menu";
-       var menu = globalMenuManager.buildMenu(menu_name);
-
-       globalMenuManager.setContext(getById("record_detail_main_box"), menu);
-       var func = buildViewMARCWindow(record);
-       menu.addItem("View MARC", func);
-
-       if(isXUL())
-               xulEvtRecordDetailDisplayed( menu, record );
-       getDocument().body.appendChild(menu.getNode());
-}
-
-
-RecordDetailPage.instance = function() {
-       if( globalRecordDetailPage != null )
-               return globalRecordDetailPage;
-       return new RecordDetailPage();
-}
-
-RecordDetailPage.prototype.init = function() {
-       debug("Initing RecordDetailPage");
-       this.draw();
-}
-
-RecordDetailPage.prototype.draw = function() {
-
-       this.mainBox = getById("record_detail_copy_info");
-
-       this.copyLocationTree = elem("select");
-       var opt =  new Option(
-               "Select a location whose Volumes/Copies you wish to see");
-       this.copyLocationTree.options[this.copyLocationTree.options.length] = opt;
-       var tree = this.copyLocationTree;
-
-       var obj = this;
-
-       tree.onchange = function() {
-
-               var idx = tree.selectedIndex;
-               debug("INDEX is " + idx);
-               var org_id = tree.options[idx].value;   
-               if(org_id == null) return;
-               obj.drawCopyTrees(findOrgUnit(org_id), obj.record);
-
-               tree.selectedIndex = idx;
-               var opt = tree.options[idx];
-               if(opt) opt.selected = true;    
-
-               obj.displayParentLink(findOrgUnit(org_id), obj.record);
-               
-       }
-
-       var table = elem("table", { width: "100%" } );
-       table.width = "100%";
-
-       var linksDiv = table.insertRow(0);
-       var leftLink = linksDiv.insertCell(0);
-       var rightLink = linksDiv.insertCell(1);
-
-       leftLink.width = "50%";
-       rightLink.width = "50%";
-       leftLink.align = "left";
-       rightLink.align = "right";
-
-       this.parentLink = elem("a",
-               { href : "javascript:void(0)",
-                       id : "parent_link",
-                 style : "text-decoration:underline" } );
-
-       leftLink.appendChild(this.copyLocationTree);
-       rightLink.appendChild(this.parentLink);
-       this.mainBox.appendChild(table);
-       /* --------------------------------------------- */
-
-
-       this.treeDiv = elem("div");
-       this.mainBox.appendChild(this.treeDiv);
-
-       this.fetchRecord(paramObj.__record); /* sets this.record */
-       this.viewMarc = getById("record_detail_view_marc");
-
-       this.buildNavBox();
-       
-
-}
-
-
-RecordDetailPage.prototype.buildCustomOrgTree = function(record) {
-
-       var method = "open-ils.search.biblio.copy_counts.retrieve";
-
-       if(isXUL()) method += ".staff";
-
-       var req = new RemoteRequest(
-               "open-ils.search", method, record.doc_id() );
-
-       var obj = this;
-       req.setCompleteCallback(
-               function(req) {
-                       _fleshOrgTree(req.getResultObject(), obj.copyLocationTree);}
-       );
-       debug("Sending copy tree request");
-       req.send();
-}
-
-/* builds the select list with the appropriate org units */
-function _fleshOrgTree(org_array, selector) {
-
-       debug("Fleshing org tree selector with " + org_array);
-
-       for( var idx in org_array ) {
-               var slot = org_array[idx];
-               var org = findOrgUnit(slot[0]);
-               _addOrgAndParents(selector, org);
-       }
-
-       /* clear out the state flags we added after the tree is built */
-       setTimeout(function(){_clearOrgFlags();}, 500);
-
-       debug("Tree is built..");
-}
-
-function _clearOrgFlags(node) {
-       if(node == null)
-               node = globalOrgTree;
-       node.added = false;
-       for(var c in node.children()) 
-               _clearOrgFlags(node.children()[c]);
-}
-
-
-function _addOrgAndParents(selector, org) {
-
-       if(!org || org.added) return;
-
-       debug("Checking org " + org.name());
-
-       if(org.ou_type() == "1") {
-               org.added = true;
-               return;
-       }
-
-       var par = findOrgUnit(org.parent_ou());
-       if(par && !par.added)
-               _addOrgAndParents(selector, par);
-
-
-       /* build the selector text part */
-       if(IE) {
-               var node = elem("pre");
-               for(var x=2; x <= findOrgType(org.ou_type()).depth(); x++) {
-                       node.appendChild(mktext("   "));
-               }
-               node.appendChild(mktext(org.name()));
-
-               var select = new Option("", org.id());
-               selector.options[selector.options.length] = select;
-               select.appendChild(node);
-
-       } else {
-
-               var pad = (findOrgType(org.ou_type()).depth() - 1) * 10;
-               var select = new Option(org.name(), org.id());
-               select.setAttribute("style", "padding-left: " + pad);
-               selector.options[selector.options.length] = select;
-       }
-
-       org.added = true;
-}
-
-
-function _buildCustomOrgTree(org_node, root) {
-
-       var item;
-
-       if(root) {
-               item = new WebFXTree(org_node.name());
-               item.setBehavior('classic');
-       } else {
-               item = new WebFXTreeItem(org_node.name());
-       }
-
-       item.action = 
-               "javascript:globalPage.drawCopyTrees(" + 
-               org_node.id() + ", logicNode.globalDetailRecord );" +
-               "globalPage.copyLocationTree.hide();"; 
-               
-       
-       for( var index in org_node.children()) {
-               var childorg = org_node.children()[index];
-               if( childorg != null ) {
-                       var tree_node = buildCustomOrgTree(childorg);
-                       if(tree_node != null)
-                               item.add(tree_node);
-               }
-       }
-
-       return item;
-}
-
-
-RecordDetailPage.prototype.setViewMarc = function(record) {
-       var marcb = elem( "a", 
-               {       href:"javascript:void(0)", 
-                       style: "text-decoration:underline;color:#EFF;" }, 
-               {}, "View MARC" );
-
-       debug(".ou_type()Setting up view marc callback with record " + record.doc_id());
-
-       var func = buildViewMARCWindow(record);
-
-       marcb.onclick = func;
-       if(isXUL()) { xulEvtViewMARC(marcb, record); }
-       this.viewMarc.appendChild(marcb);
-}
-
-RecordDetailPage.prototype.setPlaceHold = function(record) {
-       var holds = elem( "a", 
-               { 
-                       href:"javascript:void(0)", 
-                       style: "text-decoration:underline;color:#EFF;" 
-               }, 
-               {}, "Place Hold" );
-
-       var user = UserSession.instance();
-       var win;
-       if(user.verifySession()) {
-               win = new HoldsWindow(record.doc_id(), 
-                       "T", user.userObject, user.userObject, user.session_id);
-       } else {
-               win = new HoldsWindow(record.doc_id(), 
-                       "T", null, null, null);
-       }
-       holds.onclick = function() { win.toggle(holds); }
-
-       var space = elem("span", {style:"padding:5px"},null, " ");
-       this.viewMarc.appendChild(space);
-       this.viewMarc.appendChild(holds);
-}
-
-
-RecordDetailPage.prototype.fetchRecord = function(id) {
-       if(!id) {
-               debug("No ID in fetchRecord");
-               return;
-       }
-
-       var req = new RemoteRequest(
-               "open-ils.search",
-               "open-ils.search.biblio.record.mods_slim.retrieve",
-               id );
-
-       var obj = this;
-       req.setCompleteCallback(
-               function() { 
-                       obj.record = req.getResultObject();
-                       globalDetailRecord = obj.record;
-                       obj.buildCustomOrgTree(obj.record);
-                       obj.drawRecord(obj.record); 
-                       obj.setViewMarc(obj.record);
-                       obj.setPlaceHold(obj.record);
-               } 
-       );
-
-       req.send();
-}
-
-
-RecordDetailPage.prototype.drawRecord = function(record) {
-
-       var title_cell                  = getById("record_detail_title_cell");
-       var author_cell         = getById("record_detail_author_cell");
-       var isbn_cell                   = getById("record_detail_isbn_cell");
-
-       var edition_cell                = getById("record_detail_edition_cell");
-       var pubdate_cell                = getById("record_detail_pubdate_cell");
-       var publisher_cell      = getById("record_detail_publisher_cell");
-
-       var subject_cell                = getById("record_detail_subject_cell");
-       var tcn_cell                    = getById("record_detail_tcn_cell");
-       var resource_cell               = getById("record_detail_resource_cell");
-       var pic_cell                    = getById("record_detail_pic_cell");
-       var abstract_cell               = getById("record_detail_abstract_cell");
-
-       add_css_class(title_cell,               "detail_item_cell");
-       add_css_class(author_cell,              "detail_item_cell");
-       add_css_class(isbn_cell,                "detail_item_cell");
-       add_css_class(edition_cell,     "detail_item_cell");
-       add_css_class(pubdate_cell,     "detail_item_cell");
-       add_css_class(publisher_cell, "detail_item_cell");
-       add_css_class(subject_cell,     "detail_item_cell");
-       add_css_class(tcn_cell,                 "detail_item_cell");
-       add_css_class(resource_cell,    "detail_item_cell");
-       add_css_class(abstract_cell,    "detail_item_cell");
-
-       title_cell.appendChild(
-               createAppTextNode(normalize(record.title())));
-       author_cell.appendChild(
-               createAppTextNode(normalize(record.author())));
-       isbn_cell.appendChild(
-               createAppTextNode(record.isbn()));
-
-       edition_cell.appendChild(
-               createAppTextNode(record.edition()));
-       pubdate_cell.appendChild(
-               createAppTextNode(record.pubdate()));
-       publisher_cell.appendChild(
-               createAppTextNode(record.publisher()));
-
-       subject_cell.appendChild(
-               createAppTextNode(record.subject()));
-       tcn_cell.appendChild(
-               createAppTextNode(record.tcn()));
-
-       var abs = record.synopsis();
-       if(abs == null || abs == "") abs = "N/A";
-       abstract_cell.appendChild(mktext(abs));
-
-
-
-       var resource = record.types_of_resource()[0];
-       if(resource.indexOf("sound recording") != -1) 
-               resource = "sound recording";
-       var r_pic = elem("img", 
-               { src: "/images/" + resource + ".jpg" } );
-       resource_cell.appendChild(r_pic);
-       resource_cell.appendChild(createAppTextNode(" "));
-
-       resource_cell.appendChild(
-               createAppTextNode(record.types_of_resource()));
-
-       pic_cell.appendChild(this.mkImage(record));
-
-
-       var locs = record.online_loc();
-       if(locs && locs.length > 0){ 
-               var tab = pic_cell.parentNode.parentNode;
-               var loc_row = tab.insertRow(tab.rows.length);
-               var desc_cell =loc_row.insertCell(0);
-               add_css_class(desc_cell, "detail_item_label");
-               desc_cell.appendChild(mktext("Other Resources"));
-               var links_cell =loc_row.insertCell(1);
-