From 5af8f483ef5f29a177adad6428c642276ef41b23 Mon Sep 17 00:00:00 2001 From: erickson Date: Sun, 21 Aug 2005 19:24:54 +0000 Subject: [PATCH] removing all the old web stuff, css, images, templates, etc. 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 --- Open-ILS/css/opac/dtree.css | 34 - Open-ILS/css/opac/opac.css | 102 -- Open-ILS/images/bigpinesLogo.jpg | Bin 18309 -> 0 bytes Open-ILS/images/down_arrow.gif | Bin 394 -> 0 bytes Open-ILS/images/office_xp_menu_left.png | Bin 135 -> 0 bytes Open-ILS/images/opac/main_logo.jpg | Bin 18309 -> 0 bytes Open-ILS/images/opac/small_logo.jpg | Bin 2385 -> 0 bytes Open-ILS/images/pics/audio.jpg | Bin 410 -> 0 bytes Open-ILS/images/pics/audiobook_icon.jpeg | Bin 1931 -> 0 bytes Open-ILS/images/pics/book_icon.jpeg | Bin 1964 -> 0 bytes Open-ILS/images/pics/camera.gif | Bin 287 -> 0 bytes Open-ILS/images/pics/computer.jpg | Bin 442 -> 0 bytes Open-ILS/images/pics/map.jpg | Bin 690 -> 0 bytes Open-ILS/images/pics/movie.jpg | Bin 540 -> 0 bytes Open-ILS/images/pics/movie_icon.jpg | Bin 3521 -> 0 bytes Open-ILS/images/pics/music_icon.jpg | Bin 1826 -> 0 bytes Open-ILS/images/pics/open_book.gif | Bin 525 -> 0 bytes Open-ILS/images/pics/speaker.gif | Bin 168 -> 0 bytes Open-ILS/images/smallpinesLogo.jpg | Bin 2385 -> 0 bytes Open-ILS/images/up_arrow.gif | Bin 393 -> 0 bytes Open-ILS/images/xtree/I.png | Bin 147 -> 0 bytes Open-ILS/images/xtree/L.png | Bin 152 -> 0 bytes Open-ILS/images/xtree/Lminus.png | Bin 218 -> 0 bytes Open-ILS/images/xtree/Lplus.png | Bin 223 -> 0 bytes Open-ILS/images/xtree/T.png | Bin 151 -> 0 bytes Open-ILS/images/xtree/Tminus.png | Bin 206 -> 0 bytes Open-ILS/images/xtree/Tplus.png | Bin 221 -> 0 bytes Open-ILS/images/xtree/blank.png | Bin 143 -> 0 bytes Open-ILS/images/xtree/file.png | Bin 250 -> 0 bytes Open-ILS/images/xtree/foldericon.png | Bin 228 -> 0 bytes Open-ILS/images/xtree/new.png | Bin 250 -> 0 bytes Open-ILS/images/xtree/openfoldericon.png | Bin 231 -> 0 bytes .../javascript/lib/js/opac/RemoteRequest.js | 204 --- .../javascript/lib/js/opac/added_content.js | 3 - Open-ILS/src/javascript/lib/js/opac/config.js | 251 --- Open-ILS/src/javascript/lib/js/opac/dtree.js | 324 ---- Open-ILS/src/javascript/lib/js/opac/fmgen.js | 64 - Open-ILS/src/javascript/lib/js/opac/init.js | 72 - .../src/javascript/lib/js/opac/mresult.js | 108 -- .../src/javascript/lib/js/opac/opac_utils.js | 347 ---- .../javascript/lib/js/opac/result_common.js | 241 --- .../src/javascript/lib/js/opac/rresult.js | 47 - .../src/javascript/lib/js/opac/search_bar.js | 75 - .../src/javascript/lib/js/opac/sidebar.js | 55 - Open-ILS/src/javascript/lib/js/util/CGI.js | 74 - Open-ILS/src/javascript/lib/js/util/Cookie.js | 173 -- Open-ILS/src/javascript/lib/js/util/utils.js | 246 --- Open-ILS/src/javascript/opac/AboutPage.js | 8 - .../opac/AbstractRecordResultPage.js | 815 --------- .../src/javascript/opac/AdvancedSearchPage.js | 120 -- Open-ILS/src/javascript/opac/GlobalInit.js | 233 --- Open-ILS/src/javascript/opac/HTMLChunks.js | 69 - Open-ILS/src/javascript/opac/HoldsWindow.js | 375 ---- Open-ILS/src/javascript/opac/LocationTree.js | 171 -- Open-ILS/src/javascript/opac/LoginDialog.js | 90 - Open-ILS/src/javascript/opac/LoginPage.js | 86 - Open-ILS/src/javascript/opac/LogoutPage.js | 49 - Open-ILS/src/javascript/opac/MRResultPage.js | 555 ------ Open-ILS/src/javascript/opac/MyOPACPage.js | 30 - Open-ILS/src/javascript/opac/MyOPACSPage.js | 1552 ----------------- Open-ILS/src/javascript/opac/OPACStartPage.js | 58 - Open-ILS/src/javascript/opac/Page.js | 317 ---- .../src/javascript/opac/RecordDetailPage.js | 692 -------- .../src/javascript/opac/RecordResultPage.js | 442 ----- .../src/javascript/opac/SearchBarChunk.js | 54 - .../src/javascript/opac/SearchBarFormChunk.js | 96 - Open-ILS/src/javascript/opac/XULEvents.js | 12 - Open-ILS/src/javascript/util/Cookie.js | 252 --- Open-ILS/src/javascript/util/RemoteRequest.js | 332 ---- Open-ILS/src/javascript/util/UserSession.js | 262 --- Open-ILS/src/javascript/util/browser.js | 43 - Open-ILS/src/javascript/util/ex.js | 47 - Open-ILS/src/javascript/util/ils_utils.js | 357 ---- Open-ILS/src/javascript/util/webutils.js | 768 -------- Open-ILS/src/javascript/widgets/Box.js | 276 --- Open-ILS/src/javascript/widgets/ListBox.js | 100 -- Open-ILS/src/javascript/widgets/PopupBox.js | 105 -- .../src/javascript/widgets/ProgressBar.js | 76 - Open-ILS/src/javascript/widgets/SideBar.js | 62 - Open-ILS/src/javascript/widgets/Survey.js | 322 ---- .../javascript/widgets/menu/ContextMenu.js | 99 -- .../widgets/menu/ContextMenuManager.js | 69 - Open-ILS/src/javascript/widgets/xtree.js | 543 ------ Open-ILS/src/templates/html/anchor | 25 - Open-ILS/src/templates/html/bar | 7 - Open-ILS/src/templates/html/body | 25 - Open-ILS/src/templates/html/bold | 3 - Open-ILS/src/templates/html/box | 20 - Open-ILS/src/templates/html/buffer | 23 - Open-ILS/src/templates/html/button | 17 - Open-ILS/src/templates/html/cell | 23 - Open-ILS/src/templates/html/center | 6 - Open-ILS/src/templates/html/col | 14 - Open-ILS/src/templates/html/concat | 7 - Open-ILS/src/templates/html/config | 12 - Open-ILS/src/templates/html/div | 20 - Open-ILS/src/templates/html/edge | 28 - Open-ILS/src/templates/html/edgebar | 28 - Open-ILS/src/templates/html/edgebox | 9 - Open-ILS/src/templates/html/footer | 3 - Open-ILS/src/templates/html/form | 10 - Open-ILS/src/templates/html/h | 5 - Open-ILS/src/templates/html/head | 28 - Open-ILS/src/templates/html/header | 21 - Open-ILS/src/templates/html/hr | 3 - Open-ILS/src/templates/html/html | 6 - Open-ILS/src/templates/html/html3.2 | 4 - Open-ILS/src/templates/html/iframe | 13 - Open-ILS/src/templates/html/img | 18 - Open-ILS/src/templates/html/indent | 9 - Open-ILS/src/templates/html/input | 22 - Open-ILS/src/templates/html/item | 10 - Open-ILS/src/templates/html/js | 25 - Open-ILS/src/templates/html/link | 17 - Open-ILS/src/templates/html/list | 11 - Open-ILS/src/templates/html/menu | 19 - Open-ILS/src/templates/html/menubar | 17 - Open-ILS/src/templates/html/option | 15 - Open-ILS/src/templates/html/page | 11 - Open-ILS/src/templates/html/rgb | 76 - Open-ILS/src/templates/html/row | 16 - Open-ILS/src/templates/html/select | 16 - Open-ILS/src/templates/html/space | 17 - Open-ILS/src/templates/html/span | 20 - Open-ILS/src/templates/html/table | 18 - Open-ILS/src/templates/html/thead | 13 - Open-ILS/src/templates/opac/conf/config.ttk | 71 - .../src/templates/opac/conf/textmap_en_us.ttk | 47 - .../src/templates/opac/logic/child_init.ttk | 30 - Open-ILS/src/templates/opac/logic/fastjs.ttk | 14 - .../src/templates/opac/logic/page_init.ttk | 36 - .../src/templates/opac/logic/page_router.ttk | 46 - Open-ILS/src/templates/opac/pages/about.ttk | 27 - .../templates/opac/pages/advanced_search.ttk | 60 - .../opac/pages/chunks/adv_global_search.ttk | 35 - .../opac/pages/chunks/adv_location.ttk | 14 - .../opac/pages/chunks/adv_mixed_search.ttk | 53 - .../opac/pages/chunks/adv_refined_keyword.ttk | 64 - .../opac/pages/chunks/body_header.ttk | 19 - .../opac/pages/chunks/cgi_js_params.ttk | 14 - .../opac/pages/chunks/css_includes.ttk | 19 - .../opac/pages/chunks/css_js_includes.ttk | 94 - .../src/templates/opac/pages/chunks/init.ttk | 96 - .../opac/pages/chunks/javascript.ttk | 94 - .../opac/pages/chunks/next_prev_box.ttk | 18 - .../opac/pages/chunks/opac_search_bar.ttk | 105 -- .../templates/opac/pages/chunks/org_tree.ttk | 34 - .../opac/pages/chunks/search_bar_form.ttk | 61 - .../templates/opac/pages/chunks/sidebar.ttk | 7 - .../opac/pages/chunks/status_bar.ttk | 49 - Open-ILS/src/templates/opac/pages/error.ttk | 21 - Open-ILS/src/templates/opac/pages/login.ttk | 89 - Open-ILS/src/templates/opac/pages/logout.ttk | 36 - Open-ILS/src/templates/opac/pages/main.ttk | 57 - Open-ILS/src/templates/opac/pages/my_opac.ttk | 42 - .../templates/opac/pages/my_opac_secure.ttk | 107 -- .../src/templates/opac/pages/opac_start.ttk | 136 -- .../templates/opac/pages/record_detail.ttk | 116 -- .../templates/opac/pages/record_result.ttk | 73 - Open-ILS/src/webxml/advanced.xml | 23 - Open-ILS/src/webxml/altcanvas.xml | 21 - Open-ILS/src/webxml/css_common.xml | 8 - Open-ILS/src/webxml/header.xml | 8 - Open-ILS/src/webxml/index.xml | 22 - Open-ILS/src/webxml/js_common.xml | 28 - Open-ILS/src/webxml/locale/en-US/lang.dtd | 26 - Open-ILS/src/webxml/login.xml | 34 - Open-ILS/src/webxml/logo.xml | 8 - Open-ILS/src/webxml/mresult.xml | 23 - Open-ILS/src/webxml/myopac/index.xml | 21 - Open-ILS/src/webxml/rdetail.xml | 21 - Open-ILS/src/webxml/result_common.xml | 46 - Open-ILS/src/webxml/result_table.xml | 64 - Open-ILS/src/webxml/rresult.xml | 23 - Open-ILS/src/webxml/searchbar.xml | 104 -- Open-ILS/src/webxml/sidebar.xml | 77 - Open-ILS/src/webxml/webprefs.xml | 26 - 177 files changed, 15034 deletions(-) delete mode 100644 Open-ILS/css/opac/dtree.css delete mode 100644 Open-ILS/css/opac/opac.css delete mode 100644 Open-ILS/images/bigpinesLogo.jpg delete mode 100644 Open-ILS/images/down_arrow.gif delete mode 100644 Open-ILS/images/office_xp_menu_left.png delete mode 100644 Open-ILS/images/opac/main_logo.jpg delete mode 100644 Open-ILS/images/opac/small_logo.jpg delete mode 100644 Open-ILS/images/pics/audio.jpg delete mode 100644 Open-ILS/images/pics/audiobook_icon.jpeg delete mode 100644 Open-ILS/images/pics/book_icon.jpeg delete mode 100644 Open-ILS/images/pics/camera.gif delete mode 100644 Open-ILS/images/pics/computer.jpg delete mode 100644 Open-ILS/images/pics/map.jpg delete mode 100644 Open-ILS/images/pics/movie.jpg delete mode 100644 Open-ILS/images/pics/movie_icon.jpg delete mode 100644 Open-ILS/images/pics/music_icon.jpg delete mode 100644 Open-ILS/images/pics/open_book.gif delete mode 100644 Open-ILS/images/pics/speaker.gif delete mode 100644 Open-ILS/images/smallpinesLogo.jpg delete mode 100644 Open-ILS/images/up_arrow.gif delete mode 100644 Open-ILS/images/xtree/I.png delete mode 100644 Open-ILS/images/xtree/L.png delete mode 100644 Open-ILS/images/xtree/Lminus.png delete mode 100644 Open-ILS/images/xtree/Lplus.png delete mode 100644 Open-ILS/images/xtree/T.png delete mode 100644 Open-ILS/images/xtree/Tminus.png delete mode 100644 Open-ILS/images/xtree/Tplus.png delete mode 100644 Open-ILS/images/xtree/blank.png delete mode 100644 Open-ILS/images/xtree/file.png delete mode 100644 Open-ILS/images/xtree/foldericon.png delete mode 100644 Open-ILS/images/xtree/new.png delete mode 100644 Open-ILS/images/xtree/openfoldericon.png delete mode 100644 Open-ILS/src/javascript/lib/js/opac/RemoteRequest.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/added_content.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/config.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/dtree.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/fmgen.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/init.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/mresult.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/opac_utils.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/result_common.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/rresult.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/search_bar.js delete mode 100644 Open-ILS/src/javascript/lib/js/opac/sidebar.js delete mode 100644 Open-ILS/src/javascript/lib/js/util/CGI.js delete mode 100644 Open-ILS/src/javascript/lib/js/util/Cookie.js delete mode 100644 Open-ILS/src/javascript/lib/js/util/utils.js delete mode 100644 Open-ILS/src/javascript/opac/AboutPage.js delete mode 100644 Open-ILS/src/javascript/opac/AbstractRecordResultPage.js delete mode 100644 Open-ILS/src/javascript/opac/AdvancedSearchPage.js delete mode 100644 Open-ILS/src/javascript/opac/GlobalInit.js delete mode 100644 Open-ILS/src/javascript/opac/HTMLChunks.js delete mode 100644 Open-ILS/src/javascript/opac/HoldsWindow.js delete mode 100644 Open-ILS/src/javascript/opac/LocationTree.js delete mode 100644 Open-ILS/src/javascript/opac/LoginDialog.js delete mode 100644 Open-ILS/src/javascript/opac/LoginPage.js delete mode 100644 Open-ILS/src/javascript/opac/LogoutPage.js delete mode 100644 Open-ILS/src/javascript/opac/MRResultPage.js delete mode 100644 Open-ILS/src/javascript/opac/MyOPACPage.js delete mode 100644 Open-ILS/src/javascript/opac/MyOPACSPage.js delete mode 100644 Open-ILS/src/javascript/opac/OPACStartPage.js delete mode 100644 Open-ILS/src/javascript/opac/Page.js delete mode 100644 Open-ILS/src/javascript/opac/RecordDetailPage.js delete mode 100644 Open-ILS/src/javascript/opac/RecordResultPage.js delete mode 100644 Open-ILS/src/javascript/opac/SearchBarChunk.js delete mode 100644 Open-ILS/src/javascript/opac/SearchBarFormChunk.js delete mode 100644 Open-ILS/src/javascript/opac/XULEvents.js delete mode 100644 Open-ILS/src/javascript/util/Cookie.js delete mode 100644 Open-ILS/src/javascript/util/RemoteRequest.js delete mode 100644 Open-ILS/src/javascript/util/UserSession.js delete mode 100644 Open-ILS/src/javascript/util/browser.js delete mode 100644 Open-ILS/src/javascript/util/ex.js delete mode 100644 Open-ILS/src/javascript/util/ils_utils.js delete mode 100644 Open-ILS/src/javascript/util/webutils.js delete mode 100644 Open-ILS/src/javascript/widgets/Box.js delete mode 100644 Open-ILS/src/javascript/widgets/ListBox.js delete mode 100644 Open-ILS/src/javascript/widgets/PopupBox.js delete mode 100644 Open-ILS/src/javascript/widgets/ProgressBar.js delete mode 100644 Open-ILS/src/javascript/widgets/SideBar.js delete mode 100644 Open-ILS/src/javascript/widgets/Survey.js delete mode 100644 Open-ILS/src/javascript/widgets/menu/ContextMenu.js delete mode 100644 Open-ILS/src/javascript/widgets/menu/ContextMenuManager.js delete mode 100644 Open-ILS/src/javascript/widgets/xtree.js delete mode 100644 Open-ILS/src/templates/html/anchor delete mode 100644 Open-ILS/src/templates/html/bar delete mode 100644 Open-ILS/src/templates/html/body delete mode 100644 Open-ILS/src/templates/html/bold delete mode 100644 Open-ILS/src/templates/html/box delete mode 100644 Open-ILS/src/templates/html/buffer delete mode 100644 Open-ILS/src/templates/html/button delete mode 100644 Open-ILS/src/templates/html/cell delete mode 100644 Open-ILS/src/templates/html/center delete mode 100644 Open-ILS/src/templates/html/col delete mode 100644 Open-ILS/src/templates/html/concat delete mode 100644 Open-ILS/src/templates/html/config delete mode 100644 Open-ILS/src/templates/html/div delete mode 100644 Open-ILS/src/templates/html/edge delete mode 100644 Open-ILS/src/templates/html/edgebar delete mode 100644 Open-ILS/src/templates/html/edgebox delete mode 100644 Open-ILS/src/templates/html/footer delete mode 100644 Open-ILS/src/templates/html/form delete mode 100644 Open-ILS/src/templates/html/h delete mode 100644 Open-ILS/src/templates/html/head delete mode 100644 Open-ILS/src/templates/html/header delete mode 100644 Open-ILS/src/templates/html/hr delete mode 100644 Open-ILS/src/templates/html/html delete mode 100644 Open-ILS/src/templates/html/html3.2 delete mode 100644 Open-ILS/src/templates/html/iframe delete mode 100644 Open-ILS/src/templates/html/img delete mode 100644 Open-ILS/src/templates/html/indent delete mode 100644 Open-ILS/src/templates/html/input delete mode 100644 Open-ILS/src/templates/html/item delete mode 100644 Open-ILS/src/templates/html/js delete mode 100644 Open-ILS/src/templates/html/link delete mode 100644 Open-ILS/src/templates/html/list delete mode 100644 Open-ILS/src/templates/html/menu delete mode 100644 Open-ILS/src/templates/html/menubar delete mode 100644 Open-ILS/src/templates/html/option delete mode 100644 Open-ILS/src/templates/html/page delete mode 100644 Open-ILS/src/templates/html/rgb delete mode 100644 Open-ILS/src/templates/html/row delete mode 100644 Open-ILS/src/templates/html/select delete mode 100644 Open-ILS/src/templates/html/space delete mode 100644 Open-ILS/src/templates/html/span delete mode 100644 Open-ILS/src/templates/html/table delete mode 100644 Open-ILS/src/templates/html/thead delete mode 100644 Open-ILS/src/templates/opac/conf/config.ttk delete mode 100644 Open-ILS/src/templates/opac/conf/textmap_en_us.ttk delete mode 100644 Open-ILS/src/templates/opac/logic/child_init.ttk delete mode 100644 Open-ILS/src/templates/opac/logic/fastjs.ttk delete mode 100644 Open-ILS/src/templates/opac/logic/page_init.ttk delete mode 100644 Open-ILS/src/templates/opac/logic/page_router.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/about.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/advanced_search.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/adv_global_search.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/adv_location.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/adv_mixed_search.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/adv_refined_keyword.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/body_header.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/cgi_js_params.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/css_includes.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/css_js_includes.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/init.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/javascript.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/next_prev_box.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/opac_search_bar.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/org_tree.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/search_bar_form.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/sidebar.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/error.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/login.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/logout.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/main.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/my_opac.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/my_opac_secure.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/opac_start.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/record_detail.ttk delete mode 100644 Open-ILS/src/templates/opac/pages/record_result.ttk delete mode 100644 Open-ILS/src/webxml/advanced.xml delete mode 100644 Open-ILS/src/webxml/altcanvas.xml delete mode 100644 Open-ILS/src/webxml/css_common.xml delete mode 100644 Open-ILS/src/webxml/header.xml delete mode 100644 Open-ILS/src/webxml/index.xml delete mode 100644 Open-ILS/src/webxml/js_common.xml delete mode 100644 Open-ILS/src/webxml/locale/en-US/lang.dtd delete mode 100644 Open-ILS/src/webxml/login.xml delete mode 100644 Open-ILS/src/webxml/logo.xml delete mode 100644 Open-ILS/src/webxml/mresult.xml delete mode 100644 Open-ILS/src/webxml/myopac/index.xml delete mode 100644 Open-ILS/src/webxml/rdetail.xml delete mode 100644 Open-ILS/src/webxml/result_common.xml delete mode 100644 Open-ILS/src/webxml/result_table.xml delete mode 100644 Open-ILS/src/webxml/rresult.xml delete mode 100644 Open-ILS/src/webxml/searchbar.xml delete mode 100644 Open-ILS/src/webxml/sidebar.xml delete mode 100644 Open-ILS/src/webxml/webprefs.xml diff --git a/Open-ILS/css/opac/dtree.css b/Open-ILS/css/opac/dtree.css deleted file mode 100644 index b201c2fd60..0000000000 --- a/Open-ILS/css/opac/dtree.css +++ /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 index 27e57097b3..0000000000 --- a/Open-ILS/css/opac/opac.css +++ /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 index 7b77a0abb44b407d5aa7298b5e6fa8aadb6ab5ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18309 zcmce-WmKC%_b(cX)8f)X(E`P3OL2Dz9%yh{S||j!;Isvb6en154IU^E+@-h%5AN<( zpupih_q_67>-}=?I_o}}FS90@z4M#BXX|r6eZK@C0V=8}0x&Qz0RQ*^?q>mV030lA z9BeEc9Bdq1TpTeT+=oSe(uYL=78VvJ4i4u3!`45jlD@$vW0E1)HgkGW z-p1z_lQnvTL&3~1yZo`@_#O>-g8A?(QcO~S6rhR%&i?<;5P@^Z{N?~+|7);YbJi#Z zLML==(P)#=essd>X!ey+guI*J@tlsbEu0O%Rm=2U>cxi<;CH`)6+h_{#>v8afCfM0 znTwji!m-y2S}9IH#3w5%iO0FN`#qwcM>>;uLq@}R@}BL!+jmdbI0VOp$6JaEn=fer zT}u>WLeA&}?7}#mY9+^AS)D^e>&GHFdwZEXVcvfxP5pqN|LY?l85BngipvDWAEh2e z5njgkA~`I_-zvUzjnH=~;okx0@?P2jQSQ2wOpF1uv+t2RgOX)7zEv6bfP|>4q8Lsc zJM0$LaY2|zp(XXpdQ<(sQCn}~bnXGrdq7kExJ3CCZeHF|&fvgQ#OiE`Sy#G?sO(yV zsyTDu3fh+}<{ltWYATqKZzj6uL8b#uK)WY|*fUm7A3Cj*pe3w_{fbgp@r?qLc?nybt||oR>__hZoCJ?dkr79I2eq+ z*`aeNfr5U1>=$KCp#4puq^97Y9J>HoX`Qzv;&gXn^j@fZkt>l73F93u;al&o7vfvn zd3?#0n^-fsvBh%ClGb_LdY&#|xYWt*P=69ok&5YS?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UI#50m^=@tw->H^ zCF6BTgnyQskm@-{DlJU}%ckfpuE$p1Qv0X`%d4u`QXLcedp$FJaYWv(>F`Dom{!=^u~i1wj92+Zr{1vk6t}~`F{1DvoqHoTCwx=yN_SzZ#w$z$FHT^ zPcGVeeEZQW&OXKe!GM8up!k!8k%2*vK?kH24zz_6(``kOlRNN*BoU#mlW+wYYTEO67QkO`8=KZ`mXpue^KD z?)trZ1mjhY96hRY?3hfv=Gk-SFPzhg*SdP``i*N`@#=T)-G6Y8f6|<%&t~iBt$Dph I&ym3z0P4cTUjP6A diff --git a/Open-ILS/images/office_xp_menu_left.png b/Open-ILS/images/office_xp_menu_left.png deleted file mode 100644 index 185c8dfdfb4c3aa3e3d9251922b46d1a9bc9f1c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmeAS@N?&q;$mQ6;PUiv2?Ej*K+MR&1|*NH%UcbkSkfJR9T^xl_SO6joDAeEBzpw; zGB8xBGB7kWGcf%852Rl(Fq9fFFuY1&V6d9bz#yJKedWw6K()f2E{-7;bCPQQf4f)D eCdJgiz|4@)&AfY4r%)qMn!(f6&t;ucLK6UI!z4NY diff --git a/Open-ILS/images/opac/main_logo.jpg b/Open-ILS/images/opac/main_logo.jpg deleted file mode 100644 index 7b77a0abb44b407d5aa7298b5e6fa8aadb6ab5ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18309 zcmce-WmKC%_b(cX)8f)X(E`P3OL2Dz9%yh{S||j!;Isvb6en154IU^E+@-h%5AN<( zpupih_q_67>-}=?I_o}}FS90@z4M#BXX|r6eZK@C0V=8}0x&Qz0RQ*^?q>mV030lA z9BeEc9Bdq1TpTeT+=oSe(uYL=78VvJ4i4u3!`45jlD@$vW0E1)HgkGW z-p1z_lQnvTL&3~1yZo`@_#O>-g8A?(QcO~S6rhR%&i?<;5P@^Z{N?~+|7);YbJi#Z zLML==(P)#=essd>X!ey+guI*J@tlsbEu0O%Rm=2U>cxi<;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5%JhtBO#v`m{)+eQkJ?ZIqS^zE#HTV?O*x5uVmu3IKW@EQ6M9-EzB zspAsDr*1mxFYS`NT!6*pJ;%hCZ5{{c{V4o)O|bI`GSkvgTckd-Kg;Qs6S+!c#%iml zO@e|0*`au|ho*ZcYev ztQt^=e0qzEj5i8Z{c2}0p?qHPd8&3vDgu0E@N)?#{XBl0JJjNSn9ee(Nd?RO1iUjj zELZ6Q>=@urkx|Ur-ZSkjj!99KAyDULZ+1}~K^y-yk$1m+CA2R4d M9F6!tzzB!`20xEi761SM diff --git a/Open-ILS/images/pics/audio.jpg b/Open-ILS/images/pics/audio.jpg deleted file mode 100644 index 8e480ee77a9eccccf103396a0553d63a5f6041fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 410 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<W=16jCP7AKLB{__7{nPEm>C&R05c0aP(n$7fe8$lVUmnY z%z`YeLW&G*hK|C4i9j`?Aa9}oCT5_pgdhVGTo*(ds8#X*Ee0N-T}*<^f(-Tymkny~ zmdBl4f8aoy$Hw_HXD(x&EYRa1;>*{#fAXK-+m#bFXKqebk$9ZB_*JKCoxU{pV)xx2 znlBq{z5Pda+Lk(&_8HT}(h?3VW^gpiJMsF_{?OaTrmuEReCT%2%}L@yc;FF!_1~M0 M{M5{6TmJth06ZySkN^Mx diff --git a/Open-ILS/images/pics/audiobook_icon.jpeg b/Open-ILS/images/pics/audiobook_icon.jpeg deleted file mode 100644 index ff5192db123f996bdbbfee480b5a10d540b83b97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1931 zcmb7Dc{tRI8vf0U**#aIL6&KZv5X8c^RrA0Gi8g&>2zu|M=|bX4#HSka5ZBxNo6?{ zZql!0Ic-`DokJxeOEGHFpvW>*ClrcGT-|%0`<#F8`~C4f&-=aK`@R2s%j)G4UtypXqhMOG|WPCS)VX;_ky!IL#ZViKCLSg*hSZ)Le7$6nkAz%am zPJkf@u;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r4lSw=>~TvNxu(8R<@H|MiwR}W=5D4 zBNHMD1eC>C@dw&0Mv&p&M3qnDC}7H{}uxe&^#tVW>kX-!_iD`UrnEoN x4p_Eo)Aj0Ar*sNtdCqPrIInc_sDiUFdx&+I^$VdA8y~Gz&VpshXZ`=*1OTSYZms|T diff --git a/Open-ILS/images/pics/map.jpg b/Open-ILS/images/pics/map.jpg deleted file mode 100644 index 5bbeacca947ada005bb7e92d638e1a66746e97f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmex=SNlY@&#gqMe#n@3Vem|sLzN?uM@N=8OOMNeHpNk>^mM#EfF$H36U#6(`*($>Pr zM$g#92xJH&CnqNlH;)7_uY{4JjG__A;Qs*zK@J891_@?HB?cxzMrJ|A|3`p)pzDF| zM*{3@OdLQNEdd5bW+oO^7G{_%BNH#!>Y7B zS5{dVJowaesV`~T_s6N$H|9-OJDzvfKOxn?V(!eR{!x#w-kWjRE9kCQ=Gjk&Jf(t| z-1eQ`zJ9~6<2DXG>L1fm&DMPG?E55D#WruH%>v%3Z@;Rh-E%+p!^+nyEPnl}nZ8rb zw8>1ko$8gbMCaAU`_<**2j4!ne8!qtu&}{E%-nVn&%9mNj`upB+&l5?jup2V1e91R z&q)6I-u2~P&{^GQ5mM7G&75(|v2?4#vIloq8OoU+ys4_`7CQ2up{?k8z$4qp7wZ%Q zW;UNJcXzcs<2T8F$D0Ro?Dr%>nF}=QmN0+b`|DrhrIm@X)jM8%XFIWWS;dKf&r`}| z`B#YsXD&hP${~2a)I9#^r z{mpl`G@H77j)rc^^Ie{@N~4iIxKHa;ozwBPPb=*h-dNX8^5!uRODl@(nRO-n|4jfl Cj_6GQ diff --git a/Open-ILS/images/pics/movie.jpg b/Open-ILS/images/pics/movie.jpg deleted file mode 100644 index a339a2468a6d6a190fe1ebdca26d19b8ee76c84a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmV+%0^|Mv*#F=F5K2Z#MgRc;0RTtgv=4-_35A08bV92_7dE+-%&EF&BoC^soAFflYVG#@89JvcHvE;BST|G)qX2ml=b z9svOn0RO}Q82|tR0|5X40000000000000FB0|y8M|HJ?<5C8!K1OWp82MGWG00000 z009C61ONpF5g`W>F$fbEB0^!2GB-h1adUx`vj5ru2mt{A06ze;dWF;&m=(G+i;Cpg z($-NLD{9eM8rdgDLy`C$lS6P`sx_3{X4)>+r)<|~jhB|g$|MvICy)puVCatqmR|IM zK%DG|*u=-N=3Wf0;uJ?G!Pjnw9Dr57(ylmD7`VWXHYP&La)WhGA!h)Td%N{I=UnhEA5*Dg(JcFw7+Ds zF>jM|m2!2i?aGv`xV@5jKP~I{uDS3cT_C#(bav#$bZN$&PjXZ@zC{4`Z-stWwSQSP eEL;Z?gDt61aocM$8CY9xA%uk`L%{}^>;Ktqm&yGA diff --git a/Open-ILS/images/pics/movie_icon.jpg b/Open-ILS/images/pics/movie_icon.jpg deleted file mode 100644 index 5c8ec5a1c1cdba2f395c35e7b1cf5f939ace96a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3521 zcmb7^XE@sp_s4%pM2y&@_KH0#VpgbGd&Q==n2#N!DAkH;QLRm^-Zr6TDaEao)+|wK zlp3XGY0cIsDo>wR|Lgicub$6&_x+x8uJ3hT9Lg+Z8DKUsG&Tf4AP`{mrvS<&AYf*o zqc3FZ?dcng3&j1)&pTYmIM`EO$X-$Ysv>0`&;w|wsbSPm8W;>lOG`rsXJ>%Z)5E!0 z*_hb*c?1RcdHDE*MCB!fL}U?se3GhCvR4&RD3qXtI$8~>DX)Y={$~k@mX;Py59eZF z;6e)X2_ye!C?tS|2EYPX2#5s$vw$EhAW9#=3jkm+1O)sa5NawY00P7Qm>SFg7zC!G zfPE_mF2(HIRO4A0GI{B0%!v#7t~l7>HwoVX(?^M`ndHUs1@3nq%a*S+mh88p*BeY z#%wAf-;3A|9X3IxS^;SNRQ6xphiaQp#c|tnL*@B}lJ|g=rJjvrj#HIjbn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2!=#;=8q5cVB1tao%u_< z{QW1|yjUKk@59plm;B};LtRZaL&5BjW4BJtK`f4pRr|7yt0k}3yPw&T`uWd>0v#{t z=_x=#A}Fi6Sfk6&Z{w!*a1~b!3*MwSvox}-!5}jyko=EHMK;qfex`ns0k$H=X>J)h zE&9Y%5eOGuD1t*H<9Z7UQUmw|@_8{O(>vM{&{H zo&^r1NjZxWxH-J6MG`mU(HhH445(ZsF$OLgvMTnqBj#7~B`HEHPl#_z%DucQtr$AV zLl3%hp1o~x3c-r_aL1~rYCn{lj_)$+2@_bo+{0TnRS=%OVhEWKgR**m^5)$7)G&VG zionQ8i&#d> zakRe{?Qz4LHjYMC@^RSnoppFjpjHq*^ozQ$e~VXLrN@LxoNHSGjF-xHOv{jwkv%eFZs5DVd0F z`if@vLVC6o?F5cVR6b5#7X7V~JbFRqau!5%qhmIHsvr?#?d`v9D6|-aTo71J2)Wx# zm6Gc}bQZ(YwOiw;Bz)wM@%0yM5)@(HJKd(@|L!9}>5^T=kLe%&q-NOo@}IBgtlr{u zSd}cM`Mkvu=MfhbhI_To(Jk|~t~ZoC>UhNVp55rymQKLj$YGSk0p61oNBQ(`S649r diff --git a/Open-ILS/images/pics/music_icon.jpg b/Open-ILS/images/pics/music_icon.jpg deleted file mode 100644 index 4110c68830a328aaa01ff2a3fe7c74582fa18654..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1826 zcmb7@SyYqP7RSHv0SS_jq@YGfLLk`0q6{GnLIy(7fHY+m5Oq<50)YrJlp!FRxS)6i zLX=92BBLN}k%mDeU~yuoAcKHRL53_qKq;+d5~KmWFTGFqch1Y+`>eh8@IRXan_~d# z$YJNh00aU7oRkOH90tAwVCw2nbu}0i3f0hn?SShb;F_B7J)dbKb#S`+c$_X4OE5Aa z5e)Yeu~@S8zWrwAR4P@UbdYXCp_y1vDO*V(8X6jKO*jUDz)%dZ29*Ds%_aa111COV6M$_ z{|07AId?HjXD893;Gva+$0=b|xAm8iQPDAyU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open-ILS/images/pics/open_book.gif deleted file mode 100644 index bac8c57ac9ea1d5134039f66aceae8413a966f7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<QGdmM*F7SK$@1R^EK!QK<5*@(EY&{?I)=Q72KOW9hP4-=|%9y=335 zP7W>=2I>2?->Up}FX!BOT=eL-{3W+Tww1ozkSuZ1K=EeCwL8ass=aP-`~G~-@SXcfPlc6Gyl`l&di+opMinl z|9=n(2Z}#gz-%252{MC$CA8qA=jy!{{!7fYXE0MMXdk; diff --git a/Open-ILS/images/smallpinesLogo.jpg b/Open-ILS/images/smallpinesLogo.jpg deleted file mode 100644 index 8cf76e2de805a58f0d3a9f0426a1de68a6200941..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2385 zcmah~3pCSz8~<%%|hJ z(gMIR5CjGiwgSok0QsrnKMW!Q28nKjEaU)?2p|H1LZDE{uQ&(*Ltr9s1QN4{A+Kd( zN@ORUE#0i`=+(qC!v-biE{G~bZX_yg6#Ts;0D^!w0_w00H{>Vbzv)0=7!r=a>>&zA z04c}@0Sp2I9Dq7;N04OxNld?yW{&7NjF^{z5xP@F>DKKV7baE2m`Z{CGv7W0yUDvx zM{%m@s@J(RH453E|2#zzY7Mn+O%%qcx)*C5HJ<;gTaVHEf`CHsOTBZ-h z&o0<<+_j6nUj}ImlJXwS=dGuSy7-1=GfJZ0G7YIB2=RYF?1Nq^QL@QFU-DZ>Lu%5C zGK{0zLsY`x%y4hN(T7LUFZ)=mtmxeydz<}9RSU!_wZ9RGS8Gq~!#Q#diA_O7{vPsY z!q_EAo!a1veowq!%>zsuMeXwKcn|66M?QEp#u0W7&4nk&ptRr4>Jq?N2k_Hu+t=4J zsZS+5l{i)f>*YqVfTbW@a=d2vI^-c@%Ij(acbrS;RGaDLx>ztIX;&O4=zU*x#G(e6 z(zKg-xa+Bv^M@YPJQ0M?6iBD3)TbhV^Wt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B zspAsDr*1mxFYS`NT!6*pJ;%hCZ5{{c{V4o)O|bI`GSkvgTckd-Kg;Qs6S+!c#%iml zO@e|0*`au|ho*ZcYev ztQt^=e0qzEj5i8Z{c2}0p?qHPd8&3vDgu0E@N)?#{XBl0JJjNSn9ee(Nd?RO1iUjj zELZ6Q>=@urkx|Ur-ZSkjj!99KAyDULZ+1}~K^y-yk$1m+CA2R4d M9F6!tzzB!`20xEi761SM diff --git a/Open-ILS/images/up_arrow.gif b/Open-ILS/images/up_arrow.gif deleted file mode 100644 index a9526409896eb069bc0464b69bb9e155ba090ac4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 393 zcmZ?wbhEHb6lD-%xT?o+?#9DQx1St3ckBGkNBhs**n8^wj$>E$oV>p4#MNy_E-%=8 zZ0GT-D|emVclyTtr*CdPcyavlz2!SjZ9RPH)YS*`HXhk`>c)`^cQ)+5aPiiY-6yWC z-FI%+iEB%?oqYEC!Ho;sKrFz>3?$EST~h>7>?NMQuIv|hxENKnZvXla3KZfj z@Q5r1YWV=dj81DzW&j1*0(?STr}tI=|Nmb+Xo3e&gsCLRFZe&h)9nUcK%TIti(^Q| mt>ho^{~I3uuUAm(XJas{)_mB^ns^i_&EVKrFz>3?$EST~h>7>?NMQuIv|hxENKHt}0ff1BEyX zJR*yMT0Vd3!Az|Nj>cn&1HxVJZpo3;xgWbi08UkSF2k;uunK rEBQzK|AvSE>lKcgTe~DWM4f(lslQ diff --git a/Open-ILS/images/xtree/Lminus.png b/Open-ILS/images/xtree/Lminus.png deleted file mode 100644 index b389be7792a955206dbff4f810a70d5d894204ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmeAS@N?&q;$mQ6;PUiv2?El>KrFz*3?$iJMFs*X_7YEDSN01$T#Twxf0YmX1PXB$ zctjQhwR`|!MyE9Gjx|I_=bfed0mCA-COpgN|KAiv=M3{STkcma6^ zo-U3d6}OTFSeRS|6b~qHFbk-e1*$3pv>1pgdVMgEl#mbwf{wuM6umBKgBc7anLOs{ SOLngX+34x&=d#Wzp$P!iE-jJ( diff --git a/Open-ILS/images/xtree/Lplus.png b/Open-ILS/images/xtree/Lplus.png deleted file mode 100644 index 1cadc42c14e6230549fee0c63c2b7543a2d2bb9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 223 zcmeAS@N?&q;$mQ6;PUiv2?El>KrFz*3?$iJMFs*X_7YEDSN01$T#V}aGnb`B0EIXU zJR*yMT0Vd++1BKrFz>3?$EST~h>7>?NMQuIv|hxEPhKp9_?Ogg6U4 zB8!1qK7cTz(;AZ*KtZ+upAgsSebxW}{}&IM-~kk2Dhcun{?G7qyMY&wC+_Lu7*cU7 p`A7W!hKK*_6^^;KTRoV}&LE$!DSnpa>QKrFz*3?$iJMFs*X_7YEDSN01$T#RZ=N0Yd7fI^%F z9+AaBEgwLb(P@pz44|MvfKQ0)|NsA|_f-RVL;~pqEfb(p#*!evUCBA);J=d#Wz Gp$PyiuqxgF diff --git a/Open-ILS/images/xtree/Tplus.png b/Open-ILS/images/xtree/Tplus.png deleted file mode 100644 index 2980d9e739a27f9dfde19cc5845a2afbf29ca1f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 221 zcmeAS@N?&q;$mQ6;PUiv2?El>KrFz*3?$iJMFs*X_7YEDSN01$T#V{M2hVAF0);pW zJR*yMT0Vd++1BKrFz>3?$EST~h>7>?NMQuIv|hxESTNJ457l0fjgV zJR*yMT0Vd+9!-HyD|u zJ4w70b4qZFoLMaFqH^>o#~F|EMuSUt7xYXL(O}kKNNZW@D5<9x&}PWdAmNp8fPtOi XqK>R!($PchAe%j1{an^LB{Ts5JvB^9 diff --git a/Open-ILS/images/xtree/foldericon.png b/Open-ILS/images/xtree/foldericon.png deleted file mode 100644 index fc076a19f04b2b08e0cd90eea09f696630e97d73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 228 zcmeAS@N?&q;$mQ6;PUiv2?EjrAk4xHB;VeB1QK8`@$_|Nzre%AC~N4((CP#f;wK{Qv)d!jDsz zfO3o_L4Lsu4$p3+0XYGlE{-7;w~`YYnAKEO84aBG9z83dlaP~>vt-GV0|%ZkF*!J@ zZ8uTyXf--?NJz0KWQ9jWghb0kE>T9V7N)B^n0~HY*p|TD$dIu^fyE$!fnm`dad%M< RM-iae44$rjF6*2UngGbnOsN0> diff --git a/Open-ILS/images/xtree/new.png b/Open-ILS/images/xtree/new.png deleted file mode 100644 index 601457fa503029e5fea8eeb816d5eb60aab7edd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmeAS@N?&q;$mQ6;PUiv2?EjrAk4xHB;VeB1QK8`@$_|Nzre%AC}$z^F;5jJ#981G zSq#+j0fZTy)|kuy3K|6Xgt#*NXQ;2Q4+sc2fByV~2M_-L|Nr5`2Ou$j{(J)igNB9% zph9Gjx~)tD$Y(4G@(X5gcy=QV$O-gxaSW-rm7Ea6%EB!H1kQ~MIFE4X>+9!-HyD|u zJ4w70b4qZFoLMaFqH^>o#~F|EMuSUt7xYXL(O}kKNNZW@D5<9x&}PWdAmNp8fPtOi XqK>R!($PchAe%j1{an^LB{Ts5JvB^9 diff --git a/Open-ILS/images/xtree/openfoldericon.png b/Open-ILS/images/xtree/openfoldericon.png deleted file mode 100644 index b7920f42a555aca7e3eda93f2cf095119c6fbebe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmeAS@N?&q;$mQ6;PUiv2?EjrAk4xHB;VeB1QK8`@$_|Nzre%AC~N4((CP#f;w_(s6lE+4@(X5g zcy=QV$cglHaSW-rm3rnNSAzkELtsgBTvgsnHX(Bcb%ysdcKqiO%G&e8e?1G=hpkF} zJd36^-_3E(;Z**_Y0Q2muU*jJGRx`9nqv1I-y2qK`u-!J<)_w%d92eW9bC^o|A?@B TKhx}1pd}2Ru6{1-oD!M<5;am_ 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 index e7fff24c9b..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/RemoteRequest.js +++ /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 += "¶m=" + 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 += "¶m=" + 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 index 38c0cdb453..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/added_content.js +++ /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 index 70d72c4103..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/config.js +++ /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.. - */ -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 index 5324b3e75b..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/dtree.js +++ /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 = '

\n'; - if (document.getElementById) { - if (this.config.useCookies) this.selectedNode = this.getSelected(); - str += this.addNode(this.root); - } else str += 'Browser not supported.'; - str += '
'; - 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'; - } - if (node.url) { - str += ''; - str += node.name; - if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; - str += ''; - if (node._hc) { - str += '
'; - str += this.addNode(node); - str += '
'; - } - this.aIndent.pop(); - return str; -}; - -dTree.prototype.indent = function(node, nodeId) { - var str = ''; - if (this.root.id != node.pid) { - for (var n=0; n'; - (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); - if (node._hc) { - str += ''; - } else str += ''; - } - return str; -}; - -dTree.prototype.setCS = function(node) { - var lastId; - for (var n=0; n -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 index e12c006219..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/result_common.js +++ /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__' */ -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 index b047181295..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/rresult.js +++ /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 index cf7ebf73b7..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/search_bar.js +++ /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 index 37b546310f..0000000000 --- a/Open-ILS/src/javascript/lib/js/opac/sidebar.js +++ /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 index 7d11096f48..0000000000 --- a/Open-ILS/src/javascript/lib/js/util/CGI.js +++ /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 index 8d4e6e30c8..0000000000 --- a/Open-ILS/src/javascript/lib/js/util/Cookie.js +++ /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 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 index e912329c6c..0000000000 --- a/Open-ILS/src/javascript/lib/js/util/utils.js +++ /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 index 60291bc385..0000000000 --- a/Open-ILS/src/javascript/opac/AboutPage.js +++ /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 index 3014de8968..0000000000 --- a/Open-ILS/src/javascript/opac/AbstractRecordResultPage.js +++ /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 = " "; - 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 = "        "; - 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 index 0f4d5a9401..0000000000 --- a/Open-ILS/src/javascript/opac/AdvancedSearchPage.js +++ /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 index f82cebebe7..0000000000 --- a/Open-ILS/src/javascript/opac/GlobalInit.js +++ /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 index 0ee13d0f0f..0000000000 --- a/Open-ILS/src/javascript/opac/HTMLChunks.js +++ /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 index 80d4274bbf..0000000000 --- a/Open-ILS/src/javascript/opac/HoldsWindow.js +++ /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("" + wrapper.innerHTML + ""); - 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 index 098e2a3173..0000000000 --- a/Open-ILS/src/javascript/opac/LocationTree.js +++ /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 index edca0f013c..0000000000 --- a/Open-ILS/src/javascript/opac/LoginDialog.js +++ /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 index c080033af9..0000000000 --- a/Open-ILS/src/javascript/opac/LoginPage.js +++ /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 index bfe9001780..0000000000 --- a/Open-ILS/src/javascript/opac/LogoutPage.js +++ /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 index afbf3097a3..0000000000 --- a/Open-ILS/src/javascript/opac/MRResultPage.js +++ /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 index e143cea5f1..0000000000 --- a/Open-ILS/src/javascript/opac/MyOPACPage.js +++ /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 index bce2e8eb84..0000000000 --- a/Open-ILS/src/javascript/opac/MyOPACSPage.js +++ /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 index c2245244c1..0000000000 --- a/Open-ILS/src/javascript/opac/OPACStartPage.js +++ /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 index ea728d8c16..0000000000 --- a/Open-ILS/src/javascript/opac/Page.js +++ /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 " + orgunit.name() + ""; - - 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 = - "" + - names.join(" / ") + - ""; - - 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 index 29585d1ccf..0000000000 --- a/Open-ILS/src/javascript/opac/RecordDetailPage.js +++ /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); - - var found = new Array(); /* weed out duplicates */ - /* online location field is of the form [link, title, link, title, ...] */ - for(var i = 0; i!= locs.length; i++ ) { - var ref = locs[i++]; - var ttl = locs[i]; - if(find_list(found,function(f){return (f==ref);})) - continue; - found.push(ref); - var a = elem("a", {style:"text-decoration:underline", - target:"_blank",href:ref,title:ttl}, null, ttl); - links_cell.appendChild(a); - links_cell.appendChild(mktext(" ")); - } - } - - var orgUnit = globalSelectedLocation; - if(!orgUnit) orgUnit = globalLocation; - - this.drawCopyTrees(orgUnit, record); - this.buildContextMenu(record); -} - -/* sets up the cover art image */ -RecordDetailPage.prototype.mkImage = function(record) { - - var isbn = record.isbn(); - /* - if(isbn) isbn = isbn.replace(/\s+/,""); - else isbn = ""; - */ - - var big_pic = elem("a", { - href : "http://images.amazon.com/images/P/" + cleanISBN(isbn) + ".01.LZZZZZZZ.jpg", - title : "Click for larger image" } ); - - var img_src = buildISBNSrc(cleanISBN(record.isbn())); - //var img_src = "http://images.amazon.com/images/P/" +isbn + ".01.MZZZZZZZ.jpg"; - var pic = elem ( "img", { src : img_src }, { border : "0px none" }); - big_pic.appendChild(pic); - - return big_pic; -} - - -/* if sync, it is a synchronous call */ -RecordDetailPage.prototype.grabCopyTree = function(record, orgUnit, callback, sync) { - - var orgIds = new Array(); - if(orgUnit.constructor == Array) { - for(var x = 0; x < orgUnit.length; x++) { - orgIds.push(orgUnit[x].id()); - } - } else { - orgIds.push(orgUnit.id()); - } - - debug("Grabbing copy tree for " + orgIds); - - var req = new RemoteRequest( - "open-ils.cat", - "open-ils.cat.asset.copy_tree.retrieve", - null, record.doc_id(), orgIds ); - - var obj = this; - - if(sync) { /* synchronous call */ - req.send(true); - callback(req.getResultObject()); - - } else { - req.setCompleteCallback( - function(r) { callback(r.getResultObject()); }); - req.send(); - } -} - - -/* entry point for displaying the copy details pane */ -RecordDetailPage.prototype.drawCopyTrees = function(orgUnit, record) { - - debug("Got ORG unit " + orgUnit); - orgUnit = findOrgUnit(orgUnit); - if(orgUnit == null) return; - - debug("OrgUnit depth is: " + findOrgType(orgUnit.ou_type()).depth()); - removeChildren(this.treeDiv); - - /* display a 'hold on' message */ - this.treeDiv.appendChild(elem("br")); - this.treeDiv.appendChild(elem("br")); - - var depth = parseInt(findOrgType(orgUnit.ou_type()).depth()); - if(depth != 0) { - this.treeDiv.appendChild(elem("div", null, null, "Loading copy information...")); - if(parseInt(findOrgType(orgUnit.ou_type()).can_have_vols())) - this.displayParentLink(orgUnit, record); - this.displayTrees(orgUnit, record); - } -} - - -/* displays a link to view info for the parent org - if showMe == true, we don't search for the parent, - but use the given orgUnit as the link point */ -RecordDetailPage.prototype.displayParentLink = function(orgUnit, record) { - - var href = this.parentLink; - removeChildren(href); - var region = orgUnit; - if(region == null) return; - - var depth = parseInt(findOrgType(region.ou_type()).depth()); - - if(depth < 2) return; - - region = findOrgUnit(orgUnit.parent_ou()); - - href.appendChild(createAppTextNode( - "View Volumes/Copies for " + region.name())); - - var obj = this; - href.onclick = function() { - - removeChildren(obj.treeDiv); - obj.treeDiv.appendChild(elem("br")); - obj.treeDiv.appendChild(elem("br")); - obj.treeDiv.appendChild(elem("div", null, null, "Loading copy information...")); - - /* allows the above message to be displayed */ - setTimeout(function() { obj.displayTrees(region, record, true) }, 100); - - obj.displayParentLink(null); - } - - var reg_div = createAppElement("div"); - //reg_div.appendChild(href); - this.mainBox.insertBefore(reg_div, this.treeDiv); -} - -/* displays copy info for orgUnit and all of it's children. - if orgUnit is a region (depth == 1), then we just show - all of our children. if it's a branch, sub-branch, etc. - the current branch as well as all of it's children are displayed */ -RecordDetailPage.prototype.displayTrees = function(orgUnit, record, sync) { - var obj = this; - var orgs = orgUnit.children(); - if(!orgs) orgs = []; - - if(parseInt(findOrgType(orgUnit.ou_type()).can_have_vols())) - orgs.unshift(orgUnit); - - this.grabCopyTree(record, orgs, - function(tree) { - obj.displayCopyTree(tree, "Volumes/Copies for " + orgUnit.name() ); - }, sync ); -} - - -/* displays a single copy tree */ -RecordDetailPage.prototype.displayCopyTree = function(tree, title) { - - debug("Displaying copy tree for " + title); - - if(!globalCopyStatus) grabCopyStatus(); /* just to be safe */ - - var treeDiv = this.treeDiv; - removeChildren(treeDiv); - add_css_class( treeDiv, "copy_tree_div" ); - - var table = createAppElement("table"); - add_css_class(table, "copy_tree_table"); - var header_row = table.insertRow(table.rows.length); - add_css_class(header_row, "top_header_row"); - var header = header_row.insertCell(header_row.cells.length); - header.colSpan = 3; - header.setAttribute("colspan", 3); - var bold = createAppElement("b"); - bold.appendChild(createAppTextNode(title)); - header.appendChild(bold); - - var row2 = table.insertRow(table.rows.length); - var cell1 = row2.insertCell(row2.cells.length); - var cell2 = row2.insertCell(row2.cells.length); - var cell3 = row2.insertCell(row2.cells.length); - var cell4 = row2.insertCell(row2.cells.length); - var cell5 = row2.insertCell(row2.cells.length); - - cell1.appendChild(createAppTextNode("Library")); - cell2.appendChild(createAppTextNode("Callnumber")); - cell3.appendChild(createAppTextNode("Barcode(s)")); - cell4.appendChild(createAppTextNode("Location")); - cell5.appendChild(createAppTextNode("Availability")); - - add_css_class(cell1, "detail_header_cell"); - add_css_class(cell2, "detail_header_cell"); - add_css_class(cell3, "detail_header_cell"); - add_css_class(cell4, "detail_header_cell"); - add_css_class(cell5, "detail_header_cell"); - - if(tree.length == 0) { - var row = table.insertRow(table.rows.length); - row.insertCell(0).appendChild( - createAppTextNode("No copies available for this location")); - } - - var libsVisited = new Array(); - var x = 0; - for( var i in tree ) { - var row = table.insertRow(table.rows.length); - if(x%2) add_css_class(row, "copy_tree_row_highlight"); - var volume = tree[i]; - - var cell1 = row.insertCell(row.cells.length); - add_css_class(cell1, "detail_item_cell"); - - - /* here we don't want to repeat the same libs name */ - if(find_list( libsVisited, - function(name) { - - return (name == findOrgUnit(volume.owning_lib()).name()); })) { - cell1.appendChild(createAppTextNode(" ")); - - } else { - var name = findOrgUnit(volume.owning_lib()).name(); - cell1.appendChild(createAppTextNode(name)); - libsVisited.push(name); - } - - var cell2 = row.insertCell(row.cells.length); - add_css_class(cell2, "detail_item_cell"); - cell2.appendChild(createAppTextNode(volume.label())); - - var cell3 = row.insertCell(row.cells.length); - add_css_class(cell3, "detail_item_cell"); - cell3.appendChild(createAppTextNode(" ")); - - var cell4 = row.insertCell(row.cells.length); - add_css_class(cell4, "detail_item_cell"); - cell4.appendChild(createAppTextNode(" ")); - - var cell5 = row.insertCell(row.cells.length); - add_css_class(cell4, "detail_item_cell"); - cell5.appendChild(createAppTextNode(" ")); - - var copies = volume.copies(); - var c = 0; - - while(c < copies.length) { - - var copy = copies[c]; - var loc = findCopyLocation(copy.location()).name(); - - if(c == 0) { /* put the first barcode in the same row as the callnumber */ - - removeChildren(cell3); - cell3.appendChild(createAppTextNode(copy.barcode())); - - removeChildren(cell4); - cell4.appendChild(createAppTextNode(loc)); - - removeChildren(cell5); - var status = find_list(globalCopyStatus, - function(i) { return (i.id() == copy.status());} ); - - var sname = ""; - if(status) sname = status.name(); - cell5.appendChild(createAppTextNode(sname)); - - } else { - - var row = table.insertRow(table.rows.length); - if(x%2) add_css_class(row, "copy_tree_row_highlight"); - row.insertCell(0).appendChild(createAppTextNode(" ")); - row.insertCell(1).appendChild(createAppTextNode(" ")); - - var ce = row.insertCell(2); - var loc_cell = row.insertCell(3); - var status_cell = row.insertCell(4); - - add_css_class(ce, "detail_item_cell"); - add_css_class(loc_cell, "detail_item_cell"); - add_css_class(status_cell, "detail_item_cell"); - - ce.appendChild(createAppTextNode(copy.barcode())); - loc_cell.appendChild(createAppTextNode(loc)); - - var status = find_list(globalCopyStatus, - function(i) { return (i.id() == copy.status());} ); - var sname = ""; - if(status) sname = status.name(); - status_cell.appendChild(mktext(sname)) - } - - c++; - } - x++; - } - - treeDiv.appendChild(table); -} - - diff --git a/Open-ILS/src/javascript/opac/RecordResultPage.js b/Open-ILS/src/javascript/opac/RecordResultPage.js deleted file mode 100644 index 44c200dbb2..0000000000 --- a/Open-ILS/src/javascript/opac/RecordResultPage.js +++ /dev/null @@ -1,442 +0,0 @@ -var globalRecordResultPage = null; /* our global object */ - -RecordResultPage.prototype = new AbstractRecordResultPage(); -RecordResultPage.prototype.constructor = RecordResultPage; -RecordResultPage.baseClass = AbstractRecordResultPage.constructor; - -/* constructor for our singleton object */ -function RecordResultPage() { - - debug("in RecordResultPage()"); - - var row = getById("hourglass_row"); - if(row) - row.parentNode.removeChild(row); - - if( globalRecordResultPage != null ) { - debug("globalRecordResultPage already exists: " + - globalRecordResultPage.toString() ); - return globalRecordResultPage; - } - globalRecordResultPage = this; - this.resetSearch(); - debug("Built a new RecordResultPage()"); - - var row = getById("hourglass_row"); - if(row) - row.parentNode.removeChild(row); -} - - -RecordResultPage.buildExtendedLinks = function(record, page_id) { - return null; -} - -RecordResultPage.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()); - box.appendChild( - this.buildTrailLink("record_result",false)); -} - - - - - -/* returns the global instance. builds the instance if necessary. All client - * code should use this method */ -RecordResultPage.instance = function() { - - var row = getById("hourglass_row"); - if(row) - row.parentNode.removeChild(row); - - if( globalRecordResultPage != null ) { - return globalRecordResultPage; - } - return new RecordResultPage(); -} - -RecordResultPage.prototype.next = function() { - paramObj.__page = parseInt(paramObj.__page) + 1; - var paramArray = build_param_array(); - url_redirect( paramArray ) -} - - - -RecordResultPage.prototype.URLRefresh = function() { - paramObj.__page = 0; - return build_param_array(); -} - - - -RecordResultPage.prototype.prev = function() { - paramObj.__page = parseInt(paramObj.__page) - 1; - var paramArray = build_param_array(); - url_redirect( paramArray ) -} - - -RecordResultPage.prototype.addMenuItems = function(menu, record) { - - var func = buildViewMARCWindow(record); - menu.addItem("View MARC", func); - if(isXUL()) - xulEvtRecordResultDisplayed( menu, record ); -} - - -function buildViewMARCWindow(record) { - - debug("Setting up view marc with record " + record.doc_id()); - var func = function() { - var req = new RemoteRequest( - "open-ils.search", - "open-ils.search.biblio.record.html", - record.doc_id()); - req.send(true); - - var html = req.getResultObject(); - var id = record.doc_id(); - - //var win = window.open(null,"MARC_" + id, - var win = window.open("about:blank","MARC_" + id, - "location=0,menubar=0,status=0,resizeable,resize," + - "outerHeight=500,outerWidth=400,height=500," + - "width=400,scrollbars=1,screenX=100," + - "screenY=100,top=100,left=100,alwaysraised,chrome" ) - - win.document.write(html); - win.document.close(); - win.document.title = "View MARC"; - win.focus(); - } - - return func; -} - - -RecordResultPage.prototype.mkLink = function(id, type, value) { - - var href; - - var org = globalSelectedLocation; - if(org == null) - org = globalLocation; - - switch(type) { - - - case "title": - href = createAppElement("a"); - add_css_class(href,"record_result_title_link"); - href.setAttribute("href", - "?target=record_detail&record=" + id + - "&location=" + org.id() + - "&depth=" + globalSearchDepth ); - href.appendChild(createAppTextNode(value)); - href.title = "View title details for " + value; - 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)); - href.appendChild(createAppTextNode(value)); - href.title = "Author search for " + value + ""; - break; - - case "img": - href = createAppElement("a"); - add_css_class(href,"record_result_image_link"); - href.setAttribute("href", - "?target=record_detail&page=0&record=" + id + - "&location=" + org.id() + - "&depth=" + globalSearchDepth ); - href.title = "View title details for " + value; - break; - - default: - throw new EXArg("Unknown link type: " + type ); - } - - return href; - -} - -RecordResultPage.prototype.toString = function() { - - return "\nRecordResultPage:\n" + - "page: " + this.page + "\n" + - "searchOffset: " + this.searchOffset + "\n" + - "recordIDs: " + this.recordIDs + "\n" + - "hitCount: " + this.hitCount + "\n" + - "hitsPerPage: " + this.hitsPerPage + "\n"; - -} - - -RecordResultPage.prototype.isNewSearch = function() { - if(this.page == 0) - return true; - return false; - -} - -/* performs a new search */ -RecordResultPage.prototype.doSearch = function() { - - if(recordResultRedirect) { - /* if the user is just hitting the 'back' button */ - recordResultRedirect = false; - history.go(-1); - return; - } - - debug( "Key Value Array \n" + js2JSON( paramObj ) ); - - this.page = parseInt(paramObj.__page); - var hitsper = paramObj.__hits_per_page; - this.format = paramObj.__format; - if(!this.format) this.format = "all"; - - if(hitsper) - this.hitsPerPage = parseInt(hitsper); - - debug("******* Hits per = " + this.hitsPerPage); - - this.hitsPerPageSelector = getById('hits_per_page'); - for( var i in this.hitsPerPageSelector.options ) { - var hits_obj = this.hitsPerPageSelector.options[i]; - if(hits_obj == null) continue; - var hits = hits_obj.value; - debug(hits); - if( this.hitsPerPage == parseInt(hits) ) { - this.hitsPerPageSelector.options[i].selected = true; - debug("Setting selected on selector with hits " + hits); - } - } - - if(this.page == null) - this.page = 0; - - this.searchOffset = this.page * this.hitsPerPage; - - - if(this.isNewSearch()) { - debug("RecordResultPage resetting search.."); - this.resetSearch(); - } - - 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; - } - } - - - if( paramObj.__mrid != null ) { - this.mrSearch(paramObj.__mrid); - return; - } - - if( paramObj.__search == "global" ) { - - if( paramObj.__tcn != null ) { - this.globalSearch("tcn", paramObj.__tcn); - return; - } - - if( paramObj.__isbn != null ) { - this.globalSearch("isbn", paramObj.__isbn); - return; - } - if( paramObj.__barcode != null ) { - this.globalSearch("barcode", paramObj.__barcode); - return; - } - - } - -} - - -/* these are the simple global searches */ -RecordResultPage.prototype.globalSearch = function(type, term) { - - if( !term || term.length < 2 ) - throw new EXArg( "globalSearch needs valid term: " + term ); - - debug("Performing Global search [" + type + "] for term: " + term ); - - var method; - switch( type ) { - case "tcn": - method = "open-ils.search.biblio.tcn"; - break; - - case "isbn": - method = "open-ils.search.biblio.isbn"; - break; - - case "barcode": - method = "open-ils.search.biblio.find_by_barcode"; - break; - } - - var request = new RemoteRequest( "open-ils.search", method, term ); - - var obj = this; - request.setCompleteCallback( - function(req) { - try { - var result = req.getResultObject(); - debug( "Global Search returned: " + js2JSON(result) ); - obj.gatherIDs(result) - obj.collectRecords(); - } catch(E) { throw ("Search Error " + E ); } - } - ); - request.send(); -} - - -RecordResultPage.prototype.mrSearch = function(mrid) { - - var request; - var method = "open-ils.search.biblio.metarecord_to_records"; - if(isXUL()) method += ".staff"; - - if(this.format == "all") - request = new RemoteRequest("open-ils.search", method, mrid ); - else - request = new RemoteRequest("open-ils.search", method, mrid, this.format ); - - debug("Gathering doc ids for metarecord " + mrid ); - - var obj = this; - request.setCompleteCallback( - function(req) { - try{ - var ids = req.getResultObject(); - obj.gatherIDs(ids); - - if(!recordResultRedirect) { /* if the user isn't just hitting the 'back' button */ - if(parseInt(obj.hitCount) == 1) { - recordResultRedirect = true; - debug("Redirecting to record detail page with record " + obj.recordIDs[0] ); - url_redirect( [ - "goto", "-2", - "target", "record_detail", - "record", obj.recordIDs[0] ] ); - return; - } - } else { - recordResultRedirect = false; - history.go(-1); - } - - obj.collectRecords(); - } catch(E) { throw ("Search Error " + E ); } - } - ); - request.send(); -} - -RecordResultPage.prototype.collectRecords = function() { - - var i = this.searchOffset; - - 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.record.mods_slim.retrieve", 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 ); - } - ); - - request.send(); - i++; - } -} - -RecordResultPage.prototype.doCopyCount = function( record, search_id, page_id ) { - - var copy_box = getById("record_result_copy_count_box_" + page_id ); - - /* kick off the copy count search */ - var orgunit = globalSelectedLocation; - if(!orgunit) orgunit = globalLocation; - - var copy_request = new RemoteRequest( "open-ils.search", - "open-ils.search.biblio.record.copy_count", - orgunit.id(), record.doc_id() ); - - - copy_request.search_id = search_id; - copy_request.name = "copy_request_" + (search_id+this.searchOffset); - - debug("Sending copy request " + search_id + ":" + record.doc_id() ); - - 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/SearchBarChunk.js b/Open-ILS/src/javascript/opac/SearchBarChunk.js deleted file mode 100644 index bdab64161e..0000000000 --- a/Open-ILS/src/javascript/opac/SearchBarChunk.js +++ /dev/null @@ -1,54 +0,0 @@ -var globalSearchBarChunk = null; - -function SearchBarChunk() { - - debug("In SearchBarChunk()"); - - this.searchBarForm = new SearchBarFormChunk(); - - /* this links */ - this.search_link = getById("adv_search_link"); - this.login_link = getById("login_link"); - this.my_opac_link = getById("my_opac_link"); - this.about_link = getById("about_link"); - this.logout_link = getById("logout_link"); - - /* divs for the links */ - this.adv_search_link_div = getById("adv_search_link_div"); - this.my_opac_link_div = getById("my_opac_link_div"); - this.about_link_div = getById("about_link_div"); - this.login_div = getById("login_div"); - this.logout_div = getById("logout_div"); - - if(globalSearchBarChunk == null) - try { this.session = UserSession.instance(); } catch(E) {} - else - this.session = globalSearchBarChunk.session; - - this.reset(); - - globalSearchBarChunk = this; -} - - -SearchBarChunk.prototype.reset = function() { - - if( this.session.connected ) { - debug("session is connected"); - hideMe(this.login_div); - showMe(this.logout_div); - - } else { - debug("session is not connected"); - showMe(this.login_div); - hideMe(this.logout_div); - } - - if(isXUL()) { - debug("Hiding search bar links since we're XUL"); - hideMe(this.login_div); - hideMe(this.logout_div); - hideMe(this.my_opac_link_div); - hideMe(this.about_link_div); - } -} diff --git a/Open-ILS/src/javascript/opac/SearchBarFormChunk.js b/Open-ILS/src/javascript/opac/SearchBarFormChunk.js deleted file mode 100644 index 6b2d752f2c..0000000000 --- a/Open-ILS/src/javascript/opac/SearchBarFormChunk.js +++ /dev/null @@ -1,96 +0,0 @@ -/* */ - -var globalSearchBarFormChunk = null; - -function SearchBarFormChunk() { - this.init(); - globalSearchBarFormChunk = this; -} - - -SearchBarFormChunk.prototype.init = function() { - - debug("Initing searchBarFormchunk"); - this.search_query = getById("mr_search_query"); - this.search_type = getById("mr_search_type"); - this.search_button = getById("mr_search_button"); - this.setFormat(); -} - - -SearchBarFormChunk.prototype.setFormat = function() { - var fsel = getById("mr_search_format"); - var format = paramObj.__format; - for( var idx = 0; idx != fsel.options.length; idx++ ) { - var obj = fsel.options[idx]; - if(obj && obj.value == format) { - fsel.selectedIndex = idx; - obj.selected = true; - } - } - -} - -SearchBarFormChunk.prototype.resetPage = function() { - - this.init(); - - this.search_button.onclick = mrSearchSubmitForm; - this.search_query.onkeydown = mrSearchSubmitOnEnter; - this.search_type.onkeydown = mrSearchSubmitOnEnter; - - var s = paramObj.__mr_search_query; - if(!s) s = lastSearchString; - var t = paramObj.__mr_search_type; - if(!t) t = lastSearchType; - if(s) this.search_query.value = s; - if(t) this.search_type.value = t; - - try{ this.search_query.focus(); } catch(E) {} - -} - - - -function mrSearchSubmitForm() { - - var search_query = getById("mr_search_query").value; - var search_type = getById("mr_search_type").value; - var form = getById("mr_search_format").value - - if(search_query == null || search_query == "") - return false; - - var depth = globalSearchDepth; - var location = globalSelectedLocation; - if(location == null) - location = globalLocation.id(); - else - location = location.id(); - - url_redirect( [ - "target", "mr_result", - "mr_search_type", search_type, - "mr_search_query", search_query, - "mr_search_location", location, - "mr_search_depth", depth, - "format", form, - "page", 0 - ] ); -} - - -/* forces the submission of the search */ -function mrSearchSubmitOnEnter(evt) { - var win = getWindow(); - evt = (evt) ? evt : ((win.event) ? globalAppFrame.event : null); /* for mozilla and IE */ - var obj = globalSearchBarFormChunk; - var code = grabCharCode(evt); - if(code==13 || code==3) { - mrSearchSubmitForm(); - return false; - } -} - - - diff --git a/Open-ILS/src/javascript/opac/XULEvents.js b/Open-ILS/src/javascript/opac/XULEvents.js deleted file mode 100644 index 88758b081c..0000000000 --- a/Open-ILS/src/javascript/opac/XULEvents.js +++ /dev/null @@ -1,12 +0,0 @@ -/* -var XUL = new Object(); - -var xulEvtMRResultDisplayed = function( menu, record ) { -} - -var xulEvtRecordResultDisplayed = function( menu, record ) { -} - -var xulEvtPageLoaded = function(window) { -} -*/ diff --git a/Open-ILS/src/javascript/util/Cookie.js b/Open-ILS/src/javascript/util/Cookie.js deleted file mode 100644 index 8401cdfd4a..0000000000 --- a/Open-ILS/src/javascript/util/Cookie.js +++ /dev/null @@ -1,252 +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 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() -} - - - -/* -*********** IT'S OK TO REMOVE THE CODE BELOW HERE IF YOUR PAGE -DOESN'T USE cookieList() OBJECTS OR THE findCookieObject() FUNCTION. -*/ - - - - -function findCookieObject(cName, cObjArray) { -/* -This function finds a named cookie among the objects -pointed to by a cookieList array (see below). - -Parameters are the cookie name to search for (a string), and an array created with -the new cookieList() constructor (see below) - -NOTE - if you're only dealing with a specific, named cookie, then it's -more efficient to ceate a single cookieObject directly with that name, -and check its .found property to see if it already exists on this client. - -This function is for when you've created an all-cookies array anyway, -and now want to check whether a specific cookie is present. - -It returns a pointer to the cookieObject if found, or null if not found. -*/ - -var cpointer = null, i -for (i in cObjArray) { - if (cName == cObjArray[i].name) { - cpointer = cObjArray[i] - } -} -return cpointer -} - - -function cookieList() { -/* -This constructor function creates a cookieObject object (see below) -for each cookie in document.cookie, -and returns an array of pointers to the objects. - -You can use it to load all the cookies available to a page, then walk through them. - -Example usage: - -cookList = new cookieList() -for (i in cookList) { - document.write(cookList[i].name + " " + cookList[i].fields[0] + " -") -} - -*/ - -var i = 0, rawstring, offset = 0, start, newname -cpointers = new Array() -rawstring = document.cookie -if (rawstring.length > 0) { - do { - start = rawstring.indexOf("=", offset) - if (start != -1) { // another cookie found in string - // get cookie string up to end of current cookie name - newname = rawstring.substring(0, start) - if (offset > 0) { - // if not first cookie in string, remove previous cookie data from substring - // subsequent cookie names have a space before them (just a little browser foible!) - newname = newname.substring(newname.lastIndexOf(";")+2, start) - } - cpointers[i] = new cookieObject(newname) - offset = start + 1 - i++ - } - } while (start != -1) -} // end rawstring.length > 0 -return cpointers -} //end function - diff --git a/Open-ILS/src/javascript/util/RemoteRequest.js b/Open-ILS/src/javascript/util/RemoteRequest.js deleted file mode 100644 index 0f37d2b7ec..0000000000 --- a/Open-ILS/src/javascript/util/RemoteRequest.js +++ /dev/null @@ -1,332 +0,0 @@ - -var XML_HTTP_GATEWAY = "gateway"; -var XML_HTTP_SERVER = "gapines.org"; -var XML_HTTP_MAX_TRIES = 3; - - - -/* true if we've been absorbed by a XUL app */ -function isXUL() { - try { - if(IAMXUL) - return true; - } catch(E) { - return false; - } -} - - -/* ----------------------------------------------------------------------- */ -/* class methods */ - -/* keeping all requests in a global cache allows us to manage request - resends effectively */ - -/* Array of globally pending requests */ -RemoteRequest.pending = new Array(); - -/* cleans requests (and null entries) from the pending array */ -RemoteRequest.prunePending = function(id) { - var tmpArray = new Array(); - for( var x in RemoteRequest.pending ) { - if( RemoteRequest.pending[x] != null ) { - var req = RemoteRequest.pending[x]; - if( req.id != id ) - tmpArray.push(req); - else - req.clean(); - } - } - RemoteRequest.pending = tmpArray; -} - -/* returns the number of pending requests */ -RemoteRequest.numPending = function() { - return RemoteRequest.pending.length; -} - -RemoteRequest.cancelAll = function() { - for( var x in RemoteRequest.pending ) { - if( RemoteRequest.pending[x] != null ) { - debug("Cancelling request..."); - var req = RemoteRequest.pending[x]; - req.cancelled = true; - req.clean(); - } - } -} - - -/* ----------------------------------------------------------------------- */ -/* Generic request manager */ -function RequestBatch() { - this.requests = new Array(); -} -RequestBatch.prototype.add = function(request) { - this.requests.push(request); -} - -RequestBatch.prototype.remove = function(request) { - var newArray = new Array(); - for( var i in this.requests ) { - if( this.requests[i] != null && - this.requests[i].id != request.id ) - newArray.push(this.requests[i]); - } - this.requests = newArray; -} - -RequestBatch.prototype.pending = function() { - return this.requests.length; -} - -/* cancels all requests in this batch that have not already been sent */ -RequestBatch.prototype.cancel = function() { - for(var i in this.requests) { - if(this.requests[i] != null) - this.requests.cancelled = true; - } -} - -/* ----------------------------------------------------------------------- */ -/* 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; - - var i = 2; - this.params = ""; - - while(i < arguments.length) { - var object = js2JSON(arguments[i++]); - this.params += "¶m=" + encodeURIComponent(object); - debug("Remote Request adding param => " + object); - } - - if(!this.params) { this.params = ""; } - this.param_string = "service=" + service + "&method=" + method + this.params; - - if( ! this.type || ! this.service || ! this.method ) { - alert( "ERROR IN REQUEST PARAMS"); - return null; - } - - if( this.buildXMLRequest() == null ) - alert("NEWER BROWSER"); -} - -RemoteRequest.prototype.clean = function() { - this.xmlhttp.onreadystatechange = function(){}; - this.callback = null; -} - -/* constructs our XMLHTTPRequest object */ -RemoteRequest.prototype.buildXMLRequest = function() { - - try { - this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (E) { - this.xmlhttp = false; - } - } - - if (!this.xmlhttp && typeof XMLHttpRequest!='undefined') { - this.xmlhttp = new XMLHttpRequest(); - } - - if(!this.xmlhttp) { - alert("NEEDS NEWER JAVASCRIPT for XMLHTTPRequest()"); - return null; - } - - if( this.callback ) - this.setCompleteCallback( this.callback ); - - return true; -} - - -/* define the callback we use when this request has received - all of its data */ -RemoteRequest.prototype.setCompleteCallback = function(callback) { - - if(this.cancelled) return; - - var object = this; - var obj = this.xmlhttp; - this.callback = callback; - - this.xmlhttp.onreadystatechange = function() { - if( obj.readyState == 4 ) { - - try { - if(object.cancelled) return; - callback(object); - - } catch(E) { - - debug("Processing Error in complete callback: [" + E + "]"); - - /* if we receive a communication error, retry the request up - to XML_HTTP_MAX_TRIES attempts */ - if( instanceOf(E, EXCommunication) ) { - - debug("Communication Error: [" + E + "]"); - 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 { - /* any other exception is alerted for now */ - RemoteRequest.prunePending(object.id); - //alert("Exception: " + E); - throw E; - } - } - - /* on success, remove the request from the pending cache */ - RemoteRequest.prunePending(object.id); - } - } -} - - -/* http by default. This makes it https. *ONLY works when - embedded in a XUL app. */ -RemoteRequest.prototype.setSecure = function(bool) { - this.secure = bool; -} - -/** Send the request - * By default, all calls are asynchronous. if 'blocking' is - * set to true, then the call will block until a response - * is received. If blocking, callbacks will not be called. - * In other words, you can assume the data is avaiable - * (getResponseObject()) as soon as the send call returns. - */ -RemoteRequest.prototype.send = function(blocking) { - - if(this.cancelled) return; - - if( this.sendCount == 0) - RemoteRequest.pending.push(this); - else - debug("Resending request with id " + this.id - + " and send count " + this.sendCount); - - /* 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 + ":8080/" + XML_HTTP_GATEWAY; - 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'); - } - - //alert("Sending from " + location.href + " to " + url + " data [" + data + "]"); - this.xmlhttp.send( data ); - this.sendCount += 1; - debug("Remote Request done sending"); - 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) { - debug("received null response"); - return null; - } - - if(obj.is_err) { - if( obj.err_msg.match("OpenSRF::EX::User") ) { - alert("Session has timed out or cannot be authenticated.\nPlease log out and log back in if necessary."); - return; - } - - debug("Something's Wrong: " + js2JSON(obj)); - 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)) { - debug("Received user level exception: " + obj.err_msg()); - /* the opac will go ahead and spit out the error msg */ - if(!isXUL()) alert(obj.err_msg()); - throw obj; - } - - if(instanceOf(obj, perm_ex)) { - debug("Received permission error: " + obj.err_msg()); - /* 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 += "¶m=" + string; -} - diff --git a/Open-ILS/src/javascript/util/UserSession.js b/Open-ILS/src/javascript/util/UserSession.js deleted file mode 100644 index 0740959910..0000000000 --- a/Open-ILS/src/javascript/util/UserSession.js +++ /dev/null @@ -1,262 +0,0 @@ -var globalUserSession; - -/* cookie fields */ -UserSession.SES = 0; - - -function UserSession() { - this.cookie = new cookieObject("ses", 1, "/opac/", "ils_ses"); - this.connected = false; - globalUserSession = this; - this.fleshed = false; -} - -UserSession.prototype.destroy = function() { - debug("Removing user session"); - this.connected = false; - this.session_id = null; - this.username = null; - this.orgUnit = null; - this.cookie.remove(); -} - -UserSession.prototype.persist = function() { - - this.cookie = new cookieObject("ses", 1, "/opac/", "ils_ses"); - - if(!this.session_id) return; - - if( this.session_id ) - this.cookie.put("ils_ses", this.session_id); - - debug("Persisting session with session " + - this.session_id + " and uname " + this.username ); - - this.cookie.write(); - debug("Persisted session " + this.cookie.fields[UserSession.SES]); -} - - - -UserSession.prototype.verifySession = function(ses) { - - debug("Verifying session..."); - if(ses) - debug("Session key passed in [" + ses + "], verifying..."); - - if(ses != null) - this.session_id = ses; - else - this.session_id = this.cookie.fields[UserSession.SES]; - - if(this.session_id && this.userObject && this.username && this.connected) { - return true; - } - - if(this.session_id) { - debug("Retrieveing user info for session " + this.session_id); - - /* user is returning to the page with a session key */ - var request = new RemoteRequest("open-ils.auth", - "open-ils.auth.session.retrieve", this.session_id ); - - debug("1"); - request.send(true); - debug("2"); - var user = request.getResultObject(); - debug("3"); - - if( typeof user == 'object' && user._isfieldmapper) { - - debug("User retrieved, setting up user info"); - this.username = user.usrname(); - this.userObject = user; - this.connected = true; - this.persist(); - return true; - - } else { - debug("User session " + this.session_id + " is no longer valid"); - this.destroy(); - return false; - } - - } else { - debug("No session cookie found"); - this.destroy(); - return false; - } -} - - -UserSession.instance = function() { - if( globalUserSession ) - return globalUserSession; - return new UserSession(); -} - -UserSession.prototype.setSessionId = function( id ) { - debug("User session id " + id ); - this.session_id = id; -} - -UserSession.prototype.getSessionId = function() { - return this.session_id; -} - -UserSession.prototype.login = function( username, password ) { - - if(!username || !password) { return false; } - this.username = username; - - var init_request = new RemoteRequest( 'open-ils.auth', - 'open-ils.auth.authenticate.init', username ); - - init_request.send(true); - var seed = init_request.getResultObject(); - - if( ! seed || seed == '0') { - /* XXX should be an exception */ - alert( "Error Communicating with Authentication Server" ); - return null; - } - - var auth_request = new RemoteRequest( 'open-ils.auth', - 'open-ils.auth.authenticate.complete', username, - hex_md5(seed + hex_md5(password)), "opac"); - - auth_request.send(true); - var auth_result = auth_request.getResultObject(); - - if(auth_result == '0') { return false; } - - this.setSessionId(auth_result); - - this.connected = true; - - this.persist(); - - return true; -} - - - -/* grab this users org unit */ -/* if new_org_id is provided, it is used instead of the home_ou - of the user */ -UserSession.prototype.grabOrgUnit = function(org) { - var session = this.getSessionId(); - if(!session) { - throw new EXLogic( - "No session ID for user in grabOrgUnit()"); - } - - debug("Retrieving this users object"); - - var request = new RemoteRequest( - "open-ils.auth", - "open-ils.auth.session.retrieve", - this.session_id); - request.send(true); - this.userObject = request.getResultObject(); - - if(org) this.orgUnit = org; - else this.orgUnit = findOrgUnit(this.userObject.home_ou()); - - if(!paramObj.__depth && this.orgUnit) - globalSelectedDepth = findOrgDepth(this.orgUnit.ou_type()); - if(!paramObj.__location && this.orgUnit) - globalPage.updateSelectedLocation(this.orgUnit); - - globalPage.updateCurrentLocation(this.orgUnit); - - return; -} - - - - -UserSession.prototype.updatePassword = function(currentPassword, password) { - if(!password || !currentPassword) return null; - - var request = new RemoteRequest( - "open-ils.actor", - "open-ils.actor.user.password.update", - this.getSessionId(), - password, - currentPassword ); - - request.send(true); - var resp; - - try { resp = request.getResultObject(); } - catch(E) { - if(instanceOf(E, ex)) - alert(E.err_msg()); - else - alert(E); - return false; - } - - if(resp) { - this.password = password; - this.userObject.passwd(password); - return true; - } - - return false; -} - - -UserSession.prototype.updateUsername = function(username) { - if(!username) return null; - var request = new RemoteRequest( - "open-ils.actor", - "open-ils.actor.user.username.update", - this.getSessionId(), - username ); - request.send(true); - var resp = request.getResultObject(); - if(resp) { - this.username = username; - this.userObject.usrname(username); - return true; - } - return false; -} - -UserSession.prototype.updateEmail = function(email) { - if(!email) return null; - var request = new RemoteRequest( - "open-ils.actor", - "open-ils.actor.user.email.update", - this.getSessionId(), - email ); - request.send(true); - var resp = request.getResultObject(); - if(resp) { - this.userObject.email(email); - return true; - } - return false; -} - - -UserSession.prototype.fleshMe = function(force) { - if(this.fleshed && !force) return; - - var req = new RemoteRequest( - "open-ils.actor", - "open-ils.actor.user.fleshed.retrieve", - this.session_id, this.userObject.id()); - - req.send(true); - this.userObject = req.getResultObject(); - this.username = this.userObject.usrname(); - this.fleshed = true; -} - - - - - diff --git a/Open-ILS/src/javascript/util/browser.js b/Open-ILS/src/javascript/util/browser.js deleted file mode 100644 index 6a1a5ca080..0000000000 --- a/Open-ILS/src/javascript/util/browser.js +++ /dev/null @@ -1,43 +0,0 @@ -/* detect my browser */ - -var isMac -var NS; -var NS4; -var NS6; -var IE; -var IE4; -var IE4mac; -var IE4plus; -var IE5; -var IE5plus; -var IE6; -var IEMajor; -var 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(); - diff --git a/Open-ILS/src/javascript/util/ex.js b/Open-ILS/src/javascript/util/ex.js deleted file mode 100644 index 447fe90ff0..0000000000 --- a/Open-ILS/src/javascript/util/ex.js +++ /dev/null @@ -1,47 +0,0 @@ -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); -} - - -EXArg.prototype = new EX(); -EXArg.prototype.constructor = EXArg; -EXArg.baseClass = EX.prototype.constructor; - -function EXArg(message) { - this.init("EXArg: " + message); -} - - -EXAbstract.prototype = new EX(); -EXAbstract.prototype.constructor = EXAbstract; -EXAbstract.baseClass = EX.prototype.constructor; - -function EXAbstract(message) { - this.init("EXAbstract: " + message); -} - - - -EXLogic.prototype = new EX(); -EXLogic.prototype.constructor = EXLogic; -EXLogic.baseClass = EX.prototype.constructor; - -function EXLogic(message) { - this.init("EXLogic: " + message); -} diff --git a/Open-ILS/src/javascript/util/ils_utils.js b/Open-ILS/src/javascript/util/ils_utils.js deleted file mode 100644 index 3819d6e5f9..0000000000 --- a/Open-ILS/src/javascript/util/ils_utils.js +++ /dev/null @@ -1,357 +0,0 @@ -/* */ - - -/* these are the types of resource provided my MODS - used in virtual records */ -var resourceFormats = [ - "text", - "moving image", - "sound recording", - "software, multimedia", - "still images", - "cartographic", - "mixed material", - "notated music", - "three dimensional object" ]; - - - -function findOrgDepth(type_id) { - - if(type_id == null || globalOrgTypes == null) - return null; - - var t = findOrgType(type_id); - if(t != null) - return t.depth(); - - return null; -} - -function findOrgType(type_id) { - - if(type_id == null || globalOrgTypes == null) - return null; - - 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; -} - - -/* locates a specific org unit */ -var orgArraySearcher = null; - -/* flatten the org tree for faster searching */ -function _flattenOrgs(node) { - - if(node == null) { - node = globalOrgTree; - orgArraySearcher = new Object(); - } - - orgArraySearcher[node.id()] = node; - for(var idx in node.children()) { - _flattenOrgs(node.children()[idx]); - } -} - -var singleOrgCache = new Object(); -function findOrgUnit(org_id, branch) { - - if(org_id == null) return null; - if(typeof org_id == 'object') return org_id; - - /* if we don't have the global org tree, grab the org unit from the server */ - var tree_exists = false; - try{if(globalOrgTree != null) tree_exists = true;}catch(E){} - - if(!tree_exists) { - var org = singleOrgCache[org_id]; - if(org) return org; - var r = new RemoteRequest( - "open-ils.actor", - "open-ils.actor.org_unit.retrieve", null, org_id); - r.send(true); - return r.getResultObject(); - } - - if(orgArraySearcher == null) - _flattenOrgs(); - - return orgArraySearcher[org_id]; -} - - -function getOrgById(id, node) { - if(node == null) node = globalOrgTree; - if( node.id() == id) return node; - for( var ind in node.children() ) { - var ret = getOrgById(id, node.children()[ind] ); - if( ret != null ) - return ret; - } - return null; -} - - - -function orgNodeTrail(node) { - var nodeArray = new Array(); - while( node ) { - nodeArray.push(node); - node = findOrgUnit(node.parent_ou()); - } - nodeArray = nodeArray.reverse(); - return nodeArray; -} - -function findSiblingOrgs(node) { - return findOrgUnit(node.parent_ou()).children(); -} - - -function grabCopyLocations() { - - if(globalCopyLocations != null) return; - debug("Grabbing copy locations"); - - var req = new RemoteRequest( - "open-ils.search", - "open-ils.search.config.copy_location.retrieve.all" ); - - req.send(true); - globalCopyLocations = req.getResultObject(); - return globalCopyLocations; - -} - -function findCopyLocation(id) { - - grabCopyLocations(); - if(typeof id == 'object') return id; - - if(globalCopyLocations == null) - throw new EXLogic("globalCopyLocations is NULL"); - - for( var x = 0; x!= globalCopyLocations.length; x++) { - if(globalCopyLocations[x].id() == id) - return globalCopyLocations[x]; - } - return null; -} - - -function modsFormatToMARC(format) { - switch(format) { - case "text": - return "at"; - case "moving image": - return "g"; - case "sound recording": - return "ij"; - case "sound recording-nonmusical": - return "i"; - case "sound recording-musical": - return "j"; - case "software, multimedia": - return "m"; - case "still images": - return "k"; - case "cartographic": - return "ef"; - case "mixed material": - return "op"; - case "notated music": - return "cd"; - case "three dimensional object": - return "r"; - } - - return "at"; - //throw new EXLogic("Invalid format provided form modsFormatToMARC: " + format); -} - -function MARCFormatToMods(format) { - switch(format) { - - case "a": - case "t": - return "text"; - - case "g": - return "moving image"; - - case "i": - return "sound recording-nonmusical"; - - case "j": - return "sound recording-musical"; - - case "m": - return "software, multimedia"; - - case "k": - return "still images"; - - case "e": - case "f": - return "cartographic"; - - case "o": - case "p": - return "mixed material"; - - case "c": - case "d": - return "notated music"; - - case "r": - return "three dimensional object"; - } - - return "text"; - - //throw new EXLogic("Invalid format provided for MARCFormatToMods: " + format); -} - - - -/* if callback exists, call is asynchronous and - the returned item is passed to the callback... */ -function fetchRecord(id, callback) { - - var req = new RemoteRequest( - "open-ils.search", - "open-ils.search.biblio.record.mods_slim.retrieve", - id ); - - if(callback) { - req.setCompleteCallback( - function(req) {callback(req.getResultObject())}); - req.send(); - } else { - req.send(true); - return req.getResultObject(); - } -} - -/* if callback exists, call is asynchronous and - the returned item is passed to the callback... */ -function fetchMetaRecord(id, callback) { - var req = new RemoteRequest( - "open-ils.search", - "open-ils.search.biblio.metarecord.mods_slim.retrieve", - id ); - - if(callback) { - req.setCompleteCallback( - function(req) {callback(req.getResultObject())}); - req.send(); - } else { - req.send(true); - return req.getResultObject(); - } -} - -/* if callback exists, call is asynchronous and - the returned item is passed to the callback... */ -/* XXX no method yet... */ -function fetchVolume(id, callback) { - var req = new RemoteRequest( - "open-ils.search", - "open-ils.search.biblio.metarecord.mods_slim.retrieve", - id ); - - if(callback) { - req.setCompleteCallback( - function(req) {callback(req.getResultObject())}); - req.send(); - } else { - req.send(true); - return req.getResultObject(); - } -} - -/* if callback exists, call is asynchronous and - the returned item is passed to the callback... */ -function fetchCopy(id, callback) { - var req = new RemoteRequest( - "open-ils.search", - "open-ils.search.asset.copy.fleshed.retrieve", - id ); - - if(callback) { - req.setCompleteCallback( - function(req) {callback(req.getResultObject())}); - req.send(); - } else { - req.send(true); - return req.getResultObject(); - } -} - -function mkResourceImage(resource) { - var pic = elem("img"); - pic.setAttribute("src", "/images/" + resource + ".jpg"); - pic.setAttribute("width", "20"); - pic.setAttribute("height", "20"); - pic.setAttribute("title", resource); - return pic; -} - - - -function doLogout() { - - /* remove cookie so browser know's we're logged out */ - deleteCookie("ils_ses"); - - var user = UserSession.instance(); - if( user.session_id ) { - var request = new RemoteRequest( "open-ils.auth", - "open-ils.auth.session.delete", user.session_id ); - request.send(true); - var response = request.getResultObject(); - if(! response ) { - //alert("error logging out"); /* exception */ - } - } - - /* completely destroy this user object */ - user.destroy(); -} - - -function cleanISBN(isbn) { - if(isbn) { - isbn = isbn.replace(/^\s+/,""); - var idx = isbn.indexOf(" "); - if(idx > -1) { - isbn = isbn.substring(0, idx); - } - - } else isbn = ""; - return isbn - -} - - -function grabUserByBarcode(login, barcode) { - if(!barcode) return null; - var req = new RemoteRequest( - "open-ils.actor", - "open-ils.actor.user.fleshed.retrieve_by_barcode", - login, barcode ); - - req.send(true); - return req.getResultObject(); -} - - - diff --git a/Open-ILS/src/javascript/util/webutils.js b/Open-ILS/src/javascript/util/webutils.js deleted file mode 100644 index 9c866c05ab..0000000000 --- a/Open-ILS/src/javascript/util/webutils.js +++ /dev/null @@ -1,768 +0,0 @@ - -function cleanIEMemory() { - -// alert("here"); - - var a = [ "a", "div", "span", "select", "option", "img", "body", "iframe", "frame"]; - for( var index in a ) { - var nodes = getDocument().getElementsByTagName(a[index]); - var nodes2 = document.getElementsByTagName(a[index]); - - for( var n = 0; n!= nodes.length; n++ ) { - var node = nodes[n]; - node.onclick = null; - node.onchange = null; - node.onselect = null; - node.oncontextmenu = null; - } - - for( var n = 0; n!= nodes2.length; n++ ) { - var node = nodes2[n]; - node.onclick = null; - node.onchange = null; - node.onselect = null; - node.oncontextmenu = null; - } - nodes = null; - nodes2 = null; - } - - globalPage = null; - globalMenuManager = null; - - if(IE) { - window.CollectGarbage(); - getWindow().CollectGarbage(); - } - -} - - - - - -function hideMe(obj) { - if(!obj) return; - //remove_css_class( obj, "show_me"); - //add_css_class( obj, "hide_me"); - obj.style.visibility = "hidden"; - obj.style.display = "none"; -} - -function showMe(obj) { - if(!obj) return; - //remove_css_class( obj, "hide_me"); - //add_css_class( obj, "show_me"); - obj.style.visibility = "visible"; - obj.style.display = "block"; -} - - - -function grabCharCode(evt) { - evt = (evt) ? evt : ((window.event) ? event : null); /* for mozilla and IE */ - if( evt ) { - return (evt.charCode ? evt.charCode : - ((evt.which) ? evt.which : evt.keyCode )); - } else { - return -1; - } -} - -function getById(id) { - - var obj = document.getElementById(id); - if(obj != null) return obj; - - try { - if(globalAppFrame) { - obj = globalAppFrame.document.getElementById(id); - } - } catch(E) { - debug(" + + + getById() for " + id + " failed and we have no app frame...: " + E); - } - - return obj; -} - -function createAppElement(name) { - try { - if(globalAppFrame) - return globalAppFrame.document.createElement(name); - } catch(E) { - return document.createElement(name); - } -} - -function createAppTextNode(text) { - try { - if(globalAppFrame) - return globalAppFrame.document.createTextNode(text); - } catch(E) { - return document.createTextNode(text); - } -} - -function mktext(text) { return createAppTextNode(text); } - - - -/* 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; -} - - - - -var reg = /Mozilla/; -var ismoz = false; -if(reg.exec(navigator.userAgent)) - ismoz = true; - -var DEBUG = true; -var WIN_DEBUG = false; - - -var debugWindow; -function debug(message) { - if(DEBUG) { - try { - dump(" -|*|- Debug: " + message + "\n"); - } catch(E) {} - } - if(WIN_DEBUG) { - if(!debugWindow) { - debugWindow = window.open(null,"Debug", - "location=0,menubar=0,status=0,resizeable,resize," + - "outerHeight=900,outerWidth=700,height=900," + - "width=700,scrollbars=1,screenX=100," + - "screenY=100,top=100,left=100,alwaysraised" ) - } - debugWindow.document.write("
" + message); - } -} - - -/* finds or builds the requested row id, adding any intermediate rows along the way */ -function table_row_find_or_create( table, index ) { - - if(table == null || index == null || index < 0 || index > 10000 ) { - throw "table_row_find_or_create with invalid " + - "params. table: " + table + " index: " + index + "\n"; - } - - var tbody = table.getElementsByTagName("tbody")[0]; - - if(tbody == null) - tbody = table.appendChild(createAppElement("tbody")); - - - if(table.rows[index] != null) - return table.rows[index]; - - var row; - for( var x = 0; x <= index; x++ ) { - if(table.rows[x] == null) { - row = tbody.appendChild(createAppElement("tr")); - } - } - return row; -} - -/* finds or builds the requested cell, adding any intermediate cells along the way */ -function table_cell_find_or_create( row, index ) { - - if(row == null || index == null || index < 0 || index > 10000 ) { - throw "table_cell_find_or_create with invalid " + - "params. row: " + row + " index: " + index + "\n"; - } - - if(row.cells[index] != null) - return row.cells[index]; - - for( var x = 0; x!= index; x++ ) { - if(row.cells[x] == null) - row.insertCell(x); - } - - return row.insertCell(index); -} - - - -// ----------------------------------------------------------------------- -// Generic cookie libarary copied from -// http://webreference.com/js/column8/functions.html -// ----------------------------------------------------------------------- - -/* - name - name of the cookie - value - value of the cookie - [expires] - expiration date of the cookie - (defaults to end of current session) - [path] - path for which the cookie is valid - (defaults to path of calling document) - [domain] - domain for which the cookie is valid - (defaults to domain of calling document) - [secure] - Boolean value indicating if the cookie transmission requires - a secure transmission - * an argument defaults when it is assigned null as a placeholder - * a null placeholder is not required for trailing omitted arguments - */ - -function setCookie(name, value, expires, path, domain, secure) { - var curCookie = name + "=" + escape(value) + - ((expires) ? "; expires=" + expires.toGMTString() : "") + - ((path) ? "; path=" + path : "") + - ((domain) ? "; domain=" + domain : "") + - ((secure) ? "; secure" : ""); - document.cookie = curCookie; -} - - -/* - name - name of the desired cookie - return string containing value of specified cookie or null - if cookie does not exist -*/ - -function getCookie(name) { - var dc = document.cookie; - var prefix = name + "="; - var begin = dc.indexOf("; " + prefix); - if (begin == -1) { - begin = dc.indexOf(prefix); - if (begin != 0) return null; - } else { - begin += 2; - } - - var end = document.cookie.indexOf(";", begin); - if (end == -1) end = dc.length; - return unescape(dc.substring(begin + prefix.length, end)); -} - - -/* - name - name of the cookie - [path] - path of the cookie (must be same as path used to create cookie) - [domain] - domain of the cookie (must be same as domain used to - create cookie) - path and domain default if assigned null or omitted if no explicit - argument proceeds -*/ - -function deleteCookie(name, path, domain) { - if (getCookie(name)) { - var string = name + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; - debug("Delete cookie string: "+ string ); - document.cookie = string; - debug("Delete Cookie: " + document.cookie ); - /* - document.cookie = name + "=" + - ((path) ? "; path=" + path : "") + - ((domain) ? "; domain=" + domain : "") + - "; expires=Thu, 01-Jan-70 00:00:01 GMT"; - */ - } -} - -// date - any instance of the Date object -// * hand all instances of the Date object to this function for "repairs" - -function fixDate(date) { - var base = new Date(0); - var skew = base.getTime(); - if (skew > 0) - date.setTime(date.getTime() - skew); -} - -// ----------------------------------------------------------------------- - -var globalProgressBar = null; -function ProgressBar( div, color, interval ) { - - this.progressEnd = 9; - - if( color != null) - this.progressColor = color; - else - this.progressColor = 'blue'; - - if(interval != null) - this.progressInterval = interval; - else - this.progressInterval = 50; - - this.progressAt = this.progressEnd; - this.progressTimer; - - for( var x = 0; x!= this.progressEnd; x++ ) { - var newdiv = createAppElement("span"); - newdiv.id = "progress" + x; - newdiv.appendChild(document.createTextNode(" ")); - div.appendChild(newdiv); - } - globalProgressBar = this; -} - -ProgressBar.prototype.progressStart = function() { - this.progressUpdate(); -} - -ProgressBar.prototype.progressClear = function() { - for (var i = 0; i < this.progressEnd; i++) { - getById('progress' + i).style.backgroundColor = 'transparent'; - } - progressAt = 0; -} - -ProgressBar.prototype.progressUpdate = function() { - debug(" -3-3-3-3- Updating Progress Bar"); - this.progressAt++; - if (this.progressAt > this.progressEnd) - this.progressClear(); - else - getById('progress'+progressAt).style.backgroundColor = this.progressColor; - this.progressTimer = setTimeout('globalProgressBar.progressUpdate()', this.progressInterval); - debug("Timer is set at " + this.progressInterval); -} - -ProgressBar.prototype.progressStop = function() { - clearTimeout(this.progressTimer); - this.progressClear(); -} - -function add_css_class(w,c) { - var e; - if (typeof(w) == 'object') { - e = w; - } else { - e = getById(w); - } - if(!e) 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 remove_css_class(w,c) { - var e; - if(w==null) - return; - - if (typeof(w) == 'object') { - e = w; - } else { - e = getById(w); - } - if(!e) 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; -} - - - - -/* takes an array of the form [ key, value, key, value, ..] and - redirects the page to the current host/path plus the key - value pairs provided - */ -function url_redirect(key_value_array) { - - if( key_value_array == null || - (key_value_array.length %2)) { - throw new EXArg( - "AdvancedSearchPage.redirect has invalid args" ); - } - - var fullpath = globalRootPath; - var x = 0; - - debug("Redirecting..."); - - for( var x = 0; x!= key_value_array.length; x++ ) { - if( x == 0 ) - fullpath += "?" + encodeURIComponent(key_value_array[x]); - else { - if((x%2) == 0) - fullpath += "&" + encodeURIComponent(key_value_array[x]); - if((x%2) != 0) - fullpath += "=" + encodeURIComponent(key_value_array[x]); - } - } - - debug("Redirecting to " + fullpath ); - globalAppFrame.location.href = fullpath; - -} - - - -/* - the paramObj contains cgi params as object attributes - -> paramObj.__paramName - paramName is the name of the parameter. the '__' is there to - differentiate the paramName from other object attributes. - */ -function build_param_array() { - var paramArray = new Array(); - for( var p in paramObj ) { - if( p.substr(0,2) == "__" ) { - var name = p.substr(2,p.length - 1); - paramArray.push(name) - paramArray.push(paramObj[p]) - } - } - return paramArray; -} - - -var evtCache = new Object(); -function EventListener(bool_callback, done_callback, name, usr_object) { - this.bool_callback = bool_callback; - this.done_callback = done_callback; - this.interval = 100; - this.obj = usr_object; - this.complete = false; - evtCache["___" + name] = this; -} - - -//EventListener.prototype.poll = function() { -function eventPoll(name) { - var obj = evtCache["___" + name]; - if(obj == null) - throw "No Listener by that name"; - - obj.complete = obj.bool_callback(obj.obj); - if(obj.complete) - obj.done_callback(obj.obj); - else { - debug("Setting timeout for next poll.."); - setTimeout("eventPoll('" + name + "')", obj.interval ); - } -} - - - - -function swapClass(obj, class1, class2 ) { - if(obj == null) return; - if( obj.className.indexOf(class1) != -1 ) { - remove_css_class(obj, class1); - add_css_class(obj,class2); - } else { - remove_css_class(obj, class2); - add_css_class(obj,class1); - } -} - - - - - - -function findPosX(obj) -{ - var curleft = 0; - if (obj.offsetParent) - { - while (obj.offsetParent) - { - curleft += obj.offsetLeft - obj = obj.offsetParent; - } - } - else if (obj.x) - curleft += obj.x; - return curleft; -} - -function findPosY(obj) { - var curtop = 0; - - if (obj.offsetParent) { - while (obj.offsetParent) { - curtop += obj.offsetTop - obj = obj.offsetParent; - } - } else { - if (obj.y) - curtop += obj.y; - } - - return curtop; -} - - - -function getObjectHeight(obj) { - var elem = obj; - var result = 0; - if (elem.offsetHeight) { - result = elem.offsetHeight; - } else if (elem.clip && elem.clip.height) { - result = elem.clip.height; - } else if (elem.style && elem.style.pixelHeight) { - result = elem.style.pixelHeight; - } - return parseInt(result); -} - - -function getObjectWidth(obj) { - var elem = obj; - var result = 0; - if (elem.offsetWidth) { - result = elem.offsetWidth; - } else if (elem.clip && elem.clip.width) { - result = elem.clip.width; - } else if (elem.style && elem.style.pixelWidth) { - result = elem.style.pixelWidth; - } - return parseInt(result); -} - - - -function getAppWindow() { - if( globalAppFrame) - return globalAppFrame.window; - return window; -} - -function getDocument() { - if(globalAppFrame) - return globalAppFrame.document; - return document; -} - -function getWindow() { - if(globalAppFrame) - return globalAppFrame; - return window; -} - -/* returns [x, y] coords of the mouse */ -function getMousePos(e) { - - var posx = 0; - var posy = 0; - if (!e) e = getAppWindow().event; - if (e.pageX || e.pageY) { - posx = e.pageX; - posy = e.pageY; - } - else if (e.clientX || e.clientY) { - posx = e.clientX + getDocument().body.scrollLeft; - posy = e.clientY + getDocument().body.scrollTop; - } - - return [ posx, posy ]; -} - -function buildFunction(string) { - return eval("new Function(" + string + ")"); -} - - -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; -} - - -/* builds any element */ -function elem(name, attrs, style, text) { - var e = createAppElement(name); - if (attrs) { - for (key in attrs) { - if (key == 'class') { - e.className = attrs[key]; - } else if (key == 'id') { - e.id = attrs[key]; - } else { - e.setAttribute(key, attrs[key]); - } - } - } - if (style) { - for (key in style) { - e.style[key] = style[key]; - } - } - if (text) { - e.appendChild(createAppTextNode(text)); - } - return e; -} - -function filter_list(list,f) { - var new_list = []; - for (var i in list) { - var t = f( list[i] ); - if (t) new_list.push( list[i] ); - } - return new_list; -} - -function find_list(list,f) { - for (var i in list) { - var t = f( list[i] ); - if (t) return list[i]; - } - return null; -} - -function removeChildren(node) { - if(typeof node == 'object' && node != null) { - while(node.childNodes[0]) - node.removeChild(node.childNodes[0]); - } - return node; -} - - - -function userMessage(msg) { - alert("An unknown error occured during the following process: " + msg); -} - - - -/* returns [ xoffset, yoffset ] of the target node - object (if provided) is used as the box that will be displayed */ -function getXYOffsets(target, object) { - - var x = findPosX(target); - var y = findPosY(target); - var height = getObjectHeight(target); - var xpos; - - if(object) - xpos = x - getObjectWidth(object) + getObjectWidth(target); - else xpos = x; - - var offsety = y + height; - var offsetx = xpos; - - if(IE) offsety += 15; - - debug("getXYOffset y: " + offsety + " x: " + offsetx ); - return [offsetx, offsety]; -} - - - - -/* returns true if the user pressed enter */ -function userPressedEnter(evt) { - var code = grabCharCode(evt); - if(code==13||code==3) return true; - return false; -} - - -/* return [ x, y ] for the window */ -function getWindowSize() { - - var doc = getDocument(); - var win = getWindow(); - var x, y; - - if (IE) { - - if(doc.documentElement.offsetWidth != null) { /* IE 6 standards compliant */ - x = doc.documentElement.offsetWidth; - y = doc.documentElement.offsetHeight; - - } else { - x = doc.body.offsetWidth; - y = doc.body.offsetHeight; - } - - } else { - x = win.innerWidth; - y = win.innerHeight; - } - return [x, y]; -} - - - diff --git a/Open-ILS/src/javascript/widgets/Box.js b/Open-ILS/src/javascript/widgets/Box.js deleted file mode 100644 index 3bcbb6267e..0000000000 --- a/Open-ILS/src/javascript/widgets/Box.js +++ /dev/null @@ -1,276 +0,0 @@ -/* Top level widget class */ - -/* Generic HTML container box. */ - -function Box() {} - -/* default to no sorting and allowing dups */ -Box.prototype.init = function(title, hidden, noDups, maxItems) { - - this.node = createAppElement("div"); - this.contentNode = createAppElement("div"); - this.title(title); - - add_css_class(this.node, "box"); - add_css_class(this.contentNode, "box_content"); - this.node.appendChild(this.contentNode); - - this.items = new Array(); - this.itemCount = new Array(); - this.sortCounts = false; - this.sortKeys = false; - this.dup = true; - - this.noDup(noDups); - this.setMax(maxItems); - this.setHidden(hidden); -} - -/* top level box title */ -Box.prototype.title = function(title) { - if(title == null) return; - this.titleNode = createAppElement("div"); - add_css_class(this.titleNode, "box_title"); - this.titleNode.appendChild(createAppTextNode(title)); - this.node.insertBefore(this.titleNode, this.node.firstChild); - return this; -} - -Box.prototype.hideOnEmpty = function() { - this.hideOnEmpty = true; -} - -Box.prototype.addFooter = function(domItem) { - this.footerNode = createAppElement("div") - add_css_class(this.footerNode, "box_footer"); - this.footerNode.appendChild(domItem); - this.contentNode.appendChild(this.footerNode); -} - -/* add a caption below the title */ -Box.prototype.addCaption = function(caption) { - alert(this.node.name); - if(caption == null) return; - var captionNode = createAppElement("div"); - add_css_class(captionNode, "box_caption"); - captionNode.appendChild(createAppTextNode(caption)); - this.node.insertBefore(captionNode, this.contentNode); -} - - -Box.prototype.setHidden = function(bool) { - this.hidden = bool; - if( bool ) { - add_css_class( this.node, "hide_me" ); - remove_css_class( this.node, "show_me" ); - } else { - add_css_class( this.node, "show_me" ); - remove_css_class( this.node, "hide_me" ); - } -} - - -Box.prototype.addItem = function(domItem, key) { - var boxItem = new BoxItem(); - boxItem.init(domItem, key); - this.addRestrictDups(boxItem,key); -} - -/* only restricts dups if necessary. */ -Box.prototype.addRestrictDups = function(boxItem, key) { - - if(key) { /* check for dups */ - - if(this.itemCount[key] == null) - this.itemCount[key] = 0; - this.itemCount[key] += 1; - - var found = false; - - /* uniquify */ - if(!this.dup) { - for( var index in this.items ) { - if(this.items[index].key == key) { - found = true; break; - } - } - } - - /* append the new item */ - if(!found) - this.append(boxItem.getNode()); - this.items.push(boxItem); - - } else { - /* just append it */ - this.append(boxItem.getNode()); - } - -} - -Box.prototype.append = function(domItem) { - this.contentNode.appendChild(domItem); -} - -Box.prototype.remove = function(domItem) { - this.contentNode.removeChild(domItem); -} - - -Box.prototype.sortByCount = function() { - this.sortCounts = true; - this.sortKeys = false; -} - -Box.prototype.sortByKey = function() { - this.sortCounts = false; - this.sortKeys = true; -} - -Box.prototype.noDup = function() { - this.dup = false; -} - -Box.prototype.getNode = function() { - return this.node; -} - -Box.prototype.setMax = function(max) { - if(max != null && max > -1) - this.max = max; - else - this.max = null; -} - -Box.prototype.sortMyKeys = function() { - - var keys = new Array(); - - for( var i in this.items) - keys.push(this.items[i].getKey()); - - keys = keys.sort(); - debug("Keys: " + keys); - - /* drop all of the children */ - while(this.contentNode.childNodes.length > 0 ) - this.contentNode.removeChild( - this.contentNode.lastChild); - - for(var k in keys) { - var node = this.findByKey(keys[k]); - if(node) - this.contentNode.appendChild(node.getNode()); - } - -} - - -Box.prototype.sortMyCounts = function() { - - var counts = new Array(); - for( var x in this.itemCount) { - counts.push(this.itemCount[x]); - } - - - /* remove all of the divs */ - while(this.contentNode.childNodes.length > 0 ) - this.contentNode.removeChild( - this.contentNode.lastChild); - - /* then re-insert in order of the sorted counts array*/ - counts = counts.sort().reverse(); - for(var i in counts) { - for( var c in this.itemCount ) { - if(this.itemCount[c] == counts[i]) { - var item = this.findByKey(c); - this.contentNode.appendChild(item.getNode()); - } - } - } - -} - - -Box.prototype.sortMyBoth = function() { -} - -Box.prototype.findByKey = function(key) { - for( var i in this.items) { - if( this.items[i] && this.items[i].getKey() == key) - return this.items[i]; - } - return null; -} - -/* removes the given item from this box and returns the item */ -Box.prototype.removeItem = function(key) { - for( var i in this.items) { - if( this.items[i] && this.items[i].getKey() == key) { - var obj = this.items[i]; - this.remove(obj.getNode()); - - /* scooch all the other items down by one */ - for( var j = i; j!= this.items.length; j++ ) { - this.items[j] = this.items[j+1]; - } - return obj; - } - } - return null; -} - -/* checks for sorting order/max items and does the final - div drawing. Sets hidden to false */ -Box.prototype.finalize = function() { - - /* first sort if necessary */ - - if(this.sortCounts && this.sortKeys) - this.sortMyBoth(); - - else if(this.sortKeys) - this.sortMyKeys(); - - else if(this.sortCounts) - this.sortMyCounts(); - - /* then trim */ - if( this.max ) { - while(this.contentNode.childNodes.length > this.max ) - this.contentNode.removeChild(this.contentNode.lastChild); - } - - /* only display the box if there is data inside */ - //if(this.contentNode.childNodes.length > 0) - if( this.items.length > 0 ) - this.setHidden(false); -} - - -/* ---------------------------------------------------- */ -function BoxItem() {} - -/* if listItem, we put everything into an 'li' block */ -BoxItem.prototype.init = function(domItem, key) { - - this.item = domItem; - this.key = key; - - this.node = createAppElement("div"); - this.node.appendChild(domItem); - - add_css_class( this.node, "box_item" ); -} - -BoxItem.prototype.getNode = function() { - return this.node; -} - -BoxItem.prototype.getKey = function() { - return this.key; -} - - - diff --git a/Open-ILS/src/javascript/widgets/ListBox.js b/Open-ILS/src/javascript/widgets/ListBox.js deleted file mode 100644 index ae273f1559..0000000000 --- a/Open-ILS/src/javascript/widgets/ListBox.js +++ /dev/null @@ -1,100 +0,0 @@ -/* Top level widget class */ - -/* Generic HTML container box. */ - -ListBox.prototype = new Box(); -ListBox.prototype.constructor = ListBox; -ListBox.baseClass = Box.constructor; - -function ListBox() {} - -/* default to no sorting and allowing dups */ -ListBox.prototype.listBoxInit = - function(ordered, title, hidden, noDups, maxItems) { - - this.ordered = ordered; - this.node = createAppElement("div"); - this.contentWrapperNode = createAppElement("div"); - this.node.name = "anode"; - - if(this.ordered) - this.contentNode = createAppElement("ol"); - else - this.contentNode = createAppElement("ul"); - - - add_css_class(this.node, "box"); - add_css_class(this.node, "list_box"); - add_css_class(this.contentWrapperNode, "box_content"); - add_css_class(this.contentWrapperNode, "list_box_content"); - - this.node.appendChild(this.contentWrapperNode); - this.contentWrapperNode.appendChild(this.contentNode); - - this.items = new Array(); - this.itemCount = new Array(); - this.sortCounts = false; - this.sortKeys = false; - this.dup = true; - - this.title(title); - this.noDup(noDups); - this.setMax(maxItems); - this.setHidden(hidden); -} - -/* add a caption below the title */ -ListBox.prototype.addCaption = function(caption) { - if(caption == null) return; - var captionNode = createAppElement("div"); - add_css_class(captionNode, "box_caption"); - captionNode.appendChild(createAppTextNode(caption)); - this.node.insertBefore(captionNode, this.contentWrapperNode); -} - - - -ListBox.prototype.addItem = function(domItem, key) { - var boxItem = new ListBoxItem(); - boxItem.init(domItem, key); - this.addRestrictDups(boxItem, key); -} - - -ListBox.prototype.addFooter = function(domItem) { - this.footerNode = createAppElement("div"); - add_css_class(this.footerNode, "box_footer"); - this.footerNode.appendChild(domItem); - this.contentWrapperNode.appendChild(this.footerNode); -} - -ListBox.prototype.removeFooter = function() { - if( this.footerNode != null ) - this.contentWrapperNode.removeChild( - this.footerNode ); -} - - -/* ---------------------------------------------------- */ - -ListBoxItem.prototype = new BoxItem(); -ListBoxItem.prototype.constructor = ListBoxItem; -ListBoxItem.baseClass = BoxItem.constructor; - -function ListBoxItem() {} - -ListBoxItem.prototype.init = function(domItem, key) { - - this.item = domItem; - this.key = key; - - this.node = createAppElement("li"); - this.contentNode = createAppElement("div"); - this.contentNode.appendChild(domItem); - this.node.appendChild(this.contentNode); - - add_css_class( this.node, "list_box_list" ); - add_css_class( this.contentNode, "box_item" ); - add_css_class( this.contentNode, "list_box_item" ); -} - diff --git a/Open-ILS/src/javascript/widgets/PopupBox.js b/Open-ILS/src/javascript/widgets/PopupBox.js deleted file mode 100644 index c3268fe19c..0000000000 --- a/Open-ILS/src/javascript/widgets/PopupBox.js +++ /dev/null @@ -1,105 +0,0 @@ -/* @target is the object next to which the box should pop up. - */ -function PopupBox(target, body) { - this.target = target; - this.div = elem("div"); - add_css_class(this.div,"popup_box"); - add_css_class(this.div,"hide_me"); - if(body) this.div.appendChild(body); - getDocument().body.appendChild(this.div); -} - -PopupBox.prototype.setBody = function(body) { - if(body) this.div.appendChild(body); -} - -PopupBox.prototype.addNode = function(node) { - if(node) { - this.div.appendChild(node); - this.lines(); - } -} - -PopupBox.prototype.addText = function(text) { - if(text) { - this.div.appendChild(mktext(text)); - this.lines(); - } -} - -PopupBox.prototype.lines = function(count) { - if(count == null) count = 1; - for( var x = 0; x < count; x++ ) { - this.div.appendChild(elem("br")); - } -} - -PopupBox.prototype.title = function(title) { - - if(title != null) { - - var div = elem("div"); - add_css_class(div, "popup_box_title"); - div.appendChild(mktext(title)); - this.lines(); - - if(this.div.firstChild) - this.div.insertBefore(div, this.div.firstChild); - else - this.div.appendChild(div); - } -} - - -PopupBox.prototype.show = function() { - - remove_css_class(this.div,"hide_me"); - - var A = getXYOffsets(this.target, this.div); - var newx = A[0]; - var newy = A[1]; - - var W = getWindowSize(); - var wx = W[0]; - var wy = W[1]; - - var x = getObjectWidth(this.div); - var y = getObjectHeight(this.div); - - //alert(wx + " : " + wy + " : " + x + " : " + y + " : " + newx + " : " + newy); - - if( (newx + x) > wx ) - newx = newx - x; - - if( (newy + y) > wy ) - newy = newy - y - getObjectHeight(this.target); - - this.div.style.left = newx; - this.div.style.top = newy; - - add_css_class(this.div,"show_me"); -} - -PopupBox.prototype.hide = function() { - remove_css_class(this.div,"show_me"); - add_css_class(this.div,"hide_me"); -} - -/* pass in an array of DOM nodes and they will - be displayed as a group along the box */ -PopupBox.prototype.makeGroup = function(group) { - - var center = elem("center"); - var table = elem("table"); - center.appendChild(table); - add_css_class(table, "popup_box_group"); - var row = table.insertRow(0); - - for(var i = 0; i!= group.length; i++) { - var cell = row.insertCell(row.cells.length); - cell.appendChild(group[i]); - } - - this.div.appendChild(elem("br")); - this.div.appendChild(center); -} diff --git a/Open-ILS/src/javascript/widgets/ProgressBar.js b/Open-ILS/src/javascript/widgets/ProgressBar.js deleted file mode 100644 index ab86b7aaef..0000000000 --- a/Open-ILS/src/javascript/widgets/ProgressBar.js +++ /dev/null @@ -1,76 +0,0 @@ -function ProgressBar(size,interval) { - - if(interval == null) interval = 100; - if(size == null) size = 10; - this.is_running = false; - - this.size = size; - this.interval = interval; - - this.div = createAppElement("div"); - this.div.className = "progress_bar"; - this.current = 0; - this.timeoutId; - - this.percentDiv = createAppElement("div"); - add_css_class(this.percentDiv, "progress_percent"); - - var divWidth = parseInt(100 / parseInt(size)); - for( i = 0; i!= size; i++ ) { - var div = createAppElement("div"); - div.className = "progress_bar_chunk"; - div.style.width = "" + divWidth + "%"; - this.div.appendChild(div); - } -} - -ProgressBar.prototype.running = function() { - return this.is_running; -} - -ProgressBar.prototype.getNode = function() { - return this.div; -} - -ProgressBar.prototype.next = function() { - this.manualNext(); - var obj = this; - this.timeoutId = setTimeout( function(){ obj.next(); }, this.interval ); -} - -ProgressBar.prototype.start = function() { - this.is_running = true; - this.next(); -} - -ProgressBar.prototype.stop = function() { - this.is_running = false; - this.current = this.size; - clearTimeout(this.timeoutId); - /* - for(var i in this.div.childNodes) { - this.div.childNodes[i].className = "progress_bar_chunk_active"; - } - */ - add_css_class(this.percentDiv, "hide_me"); - add_css_class(this.div, "progress_bar_done"); - this.percentDiv.innerHTML = ""; -} - - - -ProgressBar.prototype.manualNext = function() { - if( this.current == this.size ) { - for( var i in this.div.childNodes ) { - if(!this.div.childNodes[i]) - this.div.childNodes[i].className = "progress_bar_chunk"; - } - this.current = 0; - } else { - var node = this.div.childNodes[this.current]; - node.className = "progress_bar_chunk_active"; - this.current = parseInt(this.current) + 1; - } - - this.percentDiv.innerHTML = parseInt((parseInt(this.current) / parseInt(this.size) * 100)) + "%"; -} diff --git a/Open-ILS/src/javascript/widgets/SideBar.js b/Open-ILS/src/javascript/widgets/SideBar.js deleted file mode 100644 index 5c26f2437d..0000000000 --- a/Open-ILS/src/javascript/widgets/SideBar.js +++ /dev/null @@ -1,62 +0,0 @@ -SidebarBox.prototype = new Box(); -SidebarBox.prototype.constructor = SidebarBox; -SidebarBox.baseClass = Box.constructor; - -function SidebarBoxItem(domItem) { - this.node = createAppElement("div"); - var br = createAppElement("br"); - add_css_class(this.node, "sibebar_item"); - this.node.appendChild(domItem); - this.node.appendChild(br); -} - -SidebarBoxItem.prototype.getNode = function() { - return this.node; -} - -/* --------------------------------------------------------- */ - -function SidebarBox(title) { - this.node = createAppElement("div"); - this.contentNode = createAppElement("div"); - this.titleNode = createAppElement("div"); - - add_css_class(this.node, "sidebar_box"); - add_css_class(this.contentNode, "sidebar_content_box"); - add_css_class(this.titleNode, "sidebar_title_box"); - - /* push the title in */ - this.titleNode.appendChild(createAppTextNode(title)); - this.titleNode.appendChild(createAppElement("br")); - - this.node.appendChild(this.titleNode); - this.node.appendChild(this.contentNode); -} - -SidebarBox.prototype.addItem = function(domItem) { - this.contentNode.appendChild(new SidebarBoxItem(domItem).getNode()); -} - -SidebarBox.prototype.getNode = function() { - return this.node; -} - - -/* --------------------------------------------------------- */ - -Sidebar.prototype = new Box(); -Sidebar.prototype.constructor = Sidebar; -Sidebar.baseClass = Box.constructor; - -function Sidebar() { - this.boxinit(); -} - -Sidebar.prototype.addItem = function(sidebarBox) { - this.node.appendChild(sidebarBox.getNode()); - this.node.innerHTML += "
"; -} - -Sidebar.prototype.getNode = function() { - return this.node; -} diff --git a/Open-ILS/src/javascript/widgets/Survey.js b/Open-ILS/src/javascript/widgets/Survey.js deleted file mode 100644 index 7539142e10..0000000000 --- a/Open-ILS/src/javascript/widgets/Survey.js +++ /dev/null @@ -1,322 +0,0 @@ -/* */ - - -function SurveyQuestion(question, poll) { - debug("Creating new survey question " + question.question() ); - this.question = question; - this.node = createAppElement("div"); - this.node.id = "survey_question_" + question.id(); - add_css_class( this.node, "survey_question" ); - var div = createAppElement("div"); - add_css_class(div, "survey_question_question"); - div.appendChild( - createAppTextNode(question.question())); - this.node.appendChild(div); - - if(poll) { - this.selector = createAppElement("div"); - } else { - this.selector = createAppElement("select"); - } - - add_css_class( this.selector, "survey_answer_selector" ); - this.selector.name = "survey_question_" + question.id(); - this.selector.value = "survey_question_" + question.id(); - this.node.appendChild(this.selector); - this.answers = new Array(); -} - - -SurveyQuestion.prototype.getNode = function() { - return this.node; -} - -SurveyQuestion.prototype.addAnswer = function(answer,poll) { - if(poll) { - var ans = new SurveyAnswer(answer, this.question.id(), poll); - this.answers.push(ans); - - this.selector.appendChild(ans.getNode()); - this.selector.appendChild(createAppTextNode(answer.answer())); - this.selector.appendChild(createAppElement("br")); - - } else { - var ans = new SurveyAnswer(answer, this.question.id()); - this.answers.push(ans); - this.selector.options[ this.selector.options.length ] = ans.getNode(); - } -} - - -function SurveyAnswer(answer,qid, poll) { - this.answer = answer; - - if(poll) { - - if(IE) { - this.node = createAppElement( - "" ); - } else { - - this.node = createAppElement("input"); - this.node.setAttribute("type", "radio"); - this.node.setAttribute("name", "survey_answer_" + qid); - this.node.setAttribute("value", answer.id()); - } - - } else { - this.node = new Option( answer.answer(), answer.id() ); - } - - add_css_class( this.node, "survey_answer" ); -} - -SurveyAnswer.prototype.getNode = function() { - return this.node; -} - - - - -Survey.prototype = new ListBox(); -Survey.prototype.constructor = Survey; -Survey.baseClass = ListBox.constructor; - -function Survey(survey, onclick) { - - this.survey = survey; - debug("Creating new survey " + survey.name() ); - - if( survey.poll() == 0 ) survey.poll(false); - if( survey.poll() == 1 ) survey.poll(true); - - if( survey.poll() ) - this.listBoxInit( false, survey.name(), true, false ); - else - this.listBoxInit( true, survey.name(), true, false ); - - - this.questions = new Array(); - - this.addCaption( survey.description() ); - - for( var i in survey.questions() ) { - this.addQuestion( survey.questions()[i] ); - } - - - this.button = createAppElement("input"); - this.button.setAttribute("type", "submit"); - this.button.value = "Submit Survey"; - - if(onclick) - this.button.onclick = onclick; - this.addFooter(this.button); - - var obj = this; - this.setAction( function() { obj.submit(); }); -} - -Survey.prototype.setUserSession = function(userSession) { - this.userSession = userSession; -} - -Survey.prototype.setAnswerDate = function(date) { - this.answerDate = date; -} - -Survey.prototype.setEffectiveDate = function(date) { - this.effectiveDate = date; -} - -Survey.prototype.setAction = function(onclick) { - this.button.onclick = onclick; -} - -Survey.prototype.getName = function() { - debug("getting name for " + this.survey.name() ); - return this.survey.name(); -} - -Survey.prototype.addQuestion = function(question) { - var questionObj = new SurveyQuestion(question, this.survey.poll()); - this.questions.push(questionObj); - for( var i in question.answers() ) { - questionObj.addAnswer(question.answers()[i], this.survey.poll()); - } - - this.addItem(questionObj.getNode()); -} - -Survey.prototype.setUser = function(userid) { - this.userId = userid; -} - -Survey.prototype.setSubmitCallback = function(callback) { - this.submitCallback = callback; -} - -Survey.prototype.submit = function() { - - var responses = this.buildSurveyResponse(); - - if( this.commitCallback) { - this.commitCallback(responses); - - } else { - this.commit(responses); - } - - var bool = true; - if( this.submitCallback ) - bool = this.submitCallback(this); - - this.removeFooter(); - -} - -Survey.prototype.commit = function(responses) { - var method; - if( this.userId ) - method = "open-ils.circ.survey.submit.user_id"; - else { - if( this.userSession ) - method = "open-ils.circ.survey.submit.session"; - else - method = "open-ils.circ.survey.submit.anon"; - } - - var request = new RemoteRequest( - "open-ils.circ", method, responses ); - request.send(true); - - /* there is nothing to return, just check for exceptions */ - request.getResultObject(); -} - - -Survey.prototype.buildSurveyResponse = function() { - - var responses = new Array(); - - for( var index in this.questions ) { - var que = this.questions[index]; - var ans = null; - for( var ansindex in que.answers ) { - ansobj = que.answers[ansindex]; - if( ansobj.getNode().selected || ansobj.getNode().checked ) { - ans = ansobj.answer.id(); - debug("User selected answer " + ans ); - break; - } - } - var qid = que.question.id() - var sur = new asvr(); - if( this.userId ) - sur.usr(this.userId); - else - sur.usr(this.userSession); - sur.survey(this.survey.id()); - sur.question(qid); - sur.answer(ans); - sur.answer_date(this.answerDate); - sur.effective_date(this.effectiveDate); - responses.push(sur); - } - - return responses; -} - -/* Global survey retrieval functions. In each case, if recvCallback - is not null, the retrieval will be asynchronous and will - call recvCallback(survey) on each survey retrieved. Otherwise - an array of surveys is returned. - */ - -Survey._retrieve = function(request, surveyTaker, recvCallback) { - - - if( recvCallback ) { - - debug("Retrieving random survey asynchronously"); - var c = function(req) { - var surveys = req.getResultObject(); - if(!surveys) return null; - - if( typeof surveys != 'object' || - surveys.constructor != Array ) - surveys = [surveys]; - - for( var i in surveys ) { - var s = surveys[i]; - debug("Retrieved survey " + s.name() ); - var surv = new Survey(s); - surv.setUserSession(surveyTaker); - recvCallback(surv); - } - } - - request.setCompleteCallback(c); - request.send(); - - } else { - - request.send(true); - var surveys = new Array(); - var results = request.getResultObject(); - for(var index in results) { - var s = results[index]; - debug("Retrieved survey " + s.name()); - var surv = new Survey(s); - surv.setUserSession(surveyTaker); - surveys.push(surv); - } - return surveys; - } - -} - -/* this needs a different method for retrieving the correct survey */ -Survey.retrieveOpacRandom = function(user_session, recvCallback) { - - var request = new RemoteRequest( - "open-ils.circ", - "open-ils.circ.survey.retrieve.opac.random", - user_session ); - return Survey._retrieve(request, user_session, recvCallback ); -} - - -Survey.retrieveAll = function(user_session, recvCallback) { - var request = new RemoteRequest( - "open-ils.circ", - "open-ils.circ.survey.retrieve.all", - user_session ); - return Survey._retrieve(request, user_session, recvCallback ); -} - - -Survey.retrieveRequired = function(user_session, recvCallback) { - var request = new RemoteRequest( - "open-ils.circ", - "open-ils.circ.survey.retrieve.required", - user_session ); - return Survey._retrieve(request, user_session, recvCallback ); -} - -Survey.retrieveById = function(user_session, id, recvCallback) { - var request = new RemoteRequest( - "open-ils.circ", - "open-ils.circ.survey.fleshed.retrieve", - id ); - return Survey._retrieve(request, user_session, recvCallback ); -} - -Survey.retrieveOpacRandomGlobal = function(recvCallback) { - var request = new RemoteRequest( - "open-ils.circ", - "open-ils.circ.survey.retrieve.opac.random.global"); - return Survey._retrieve(request, null, recvCallback ); -} - - diff --git a/Open-ILS/src/javascript/widgets/menu/ContextMenu.js b/Open-ILS/src/javascript/widgets/menu/ContextMenu.js deleted file mode 100644 index 4113014d83..0000000000 --- a/Open-ILS/src/javascript/widgets/menu/ContextMenu.js +++ /dev/null @@ -1,99 +0,0 @@ -/* */ - -/* menu item class */ -function ContextMenuItem(text,onclick) { - this.onclick = onclick; - this.div = createAppElement("div"); - this.div.appendChild(createAppTextNode(text)); - this.div.onclick = this.onclick; - this.div.className = "context_menu_item"; - - - /* add mouseover effects */ - var div = this.div; - this.div.onmouseover = function() { - add_css_class(div,"context_menu_item_hover"); - } - this.div.onmouseout = function() { - remove_css_class(div,"context_menu_item_hover"); - } - -} - - -/* returns the DOM object (div) this item sits in */ -ContextMenuItem.prototype.getNode = function() { - return this.div; -} - -/* put an image to the left of the menu item */ -ContextMenuItem.prototype.addIcon= function(url) { - var img = createAppElement("img"); - add_css_class( img, "context_menu_item_img"); - img.setAttribute("src", url); - this.div.insertBefore( img, this.div.firstChild ) -} - - -/* context menu class */ -function ContextMenu(name) { - this.div = createAppElement("div"); - this.wrapperDiv = createAppElement("div"); - this.wrapperDiv.appendChild(this.div); - this.div.className = "context_menu hide_me"; - this.name = name; - this.items = new Array(); -} - - -/* onclick is an actual function(){...} function */ -ContextMenu.prototype.addItem = function(text,onclick) { - var item = new ContextMenuItem(text, onclick); - this.items.push(item) - this.div.appendChild(item.getNode()); -} - -/* returns the DOM object (div) this menu sits in */ -ContextMenu.prototype.getNode = function() { - return this.div; -} - -/* hides this context menu */ -ContextMenu.prototype.hideMe = function() { - if( this.div.className.indexOf("show_me") != -1 ) { - swapClass(this.div,"show_me", "hide_me"); - } -} - -/* displays this context menu */ -ContextMenu.prototype.showMe = function() { - if( this.div.className.indexOf("hide_me") != -1 ) { - swapClass(this.div,"show_me", "hide_me"); - } -} - - -/* if hidden, displays, and vice versa */ -ContextMenu.prototype.toggle = function() { - - var mousepos = getMousePos(); - this.div.style.position = "absolute"; - this.div.style.left = mousepos[0]; - this.div.style.top = mousepos[1]; - debug("Toggling menu " + this.name + " : " + this.div.className); - swapClass(this.div,"show_me", "hide_me"); - - debug("After Toggling menu " + this.name + " : " + this.div.className); -} - -/* returns the menu as an HTML string */ -ContextMenu.prototype.toSring = function() { - return this.wrapperDiv.innerHTML; -} - -/* returns an array of ContextMenuItem objects */ -ContextMenu.prototype.getItems = function() { - return this.items; -} - - diff --git a/Open-ILS/src/javascript/widgets/menu/ContextMenuManager.js b/Open-ILS/src/javascript/widgets/menu/ContextMenuManager.js deleted file mode 100644 index 07a0aab227..0000000000 --- a/Open-ILS/src/javascript/widgets/menu/ContextMenuManager.js +++ /dev/null @@ -1,69 +0,0 @@ -/* */ - -function ContextMenuManager() {} - -/* builds a new menu and stores it */ -ContextMenuManager.prototype.buildMenu = function(name) { - - if(!this.menus) { - this.menus = new Array(); - /* here we hijack the body onclick to - hide menus that may be visible */ - getDocument().body.onclick = function() { - globalMenuManager.hideAll(); - } - } - - if(name == null) name = new Date().getTime(); - this.menus[name] = new ContextMenu(name); - return this.menus[name]; -} - -/* returns the menu with the given name */ -ContextMenuManager.prototype.getMenu = function(name) { - return this.menus[name]; -} - -/* hides all visible menus and brings the - selected menu to the front */ -ContextMenuManager.prototype.toggle = function(name, evt) { - - if(evt) { - var win = getAppWindow(); - win.event = evt; - /* - if(!win.event) win.event = evt; - if(!IE) win.event.preventDefault(); - else win.event.cancellBubble = true; - */ - } - - this.hideAll(); - debug("Toggling context menu " + name ); - this.getMenu(name).toggle(); -} - -/* hides all menues */ -ContextMenuManager.prototype.hideAll = function() { - for( var index in this.menus) { - this.menus[index].hideMe(); - } -} - -/* sets a context object for the given menu. When a user clicks - in the context area, the menu appears */ -ContextMenuManager.prototype.setContext = function(node, menu) { - - var obj = this; - node.oncontextmenu = function(evt) { - - var win = getAppWindow(); - if(!win.event) win.event = evt; - if(!IE) win.event.preventDefault(); - else win.event.cancellBubble = true; - - obj.toggle(menu.name); - return false; - } - -} diff --git a/Open-ILS/src/javascript/widgets/xtree.js b/Open-ILS/src/javascript/widgets/xtree.js deleted file mode 100644 index 31ad82221b..0000000000 --- a/Open-ILS/src/javascript/widgets/xtree.js +++ /dev/null @@ -1,543 +0,0 @@ -/*----------------------------------------------------------------------------\ -| Cross Browser Tree Widget 1.17 | -|-----------------------------------------------------------------------------| -| Created by Emil A Eklund | -| (http://webfx.eae.net/contact.html#emil) | -| For WebFX (http://webfx.eae.net/) | -|-----------------------------------------------------------------------------| -| An object based tree widget, emulating the one found in microsoft windows, | -| with persistence using cookies. Works in IE 5+, Mozilla and konqueror 3. | -|-----------------------------------------------------------------------------| -| Copyright (c) 1999 - 2002 Emil A Eklund | -|-----------------------------------------------------------------------------| -| This software is provided "as is", without warranty of any kind, express or | -| implied, including but not limited to the warranties of merchantability, | -| fitness for a particular purpose and noninfringement. In no event shall the | -| authors or copyright holders be liable for any claim, damages or other | -| liability, whether in an action of contract, tort or otherwise, arising | -| from, out of or in connection with the software or the use or other | -| dealings in the software. | -| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | -| This software is available under the three different licenses mentioned | -| below. To use this software you must chose, and qualify, for one of those. | -| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | -| The WebFX Non-Commercial License http://webfx.eae.net/license.html | -| Permits anyone the right to use the software in a non-commercial context | -| free of charge. | -| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | -| The WebFX Commercial license http://webfx.eae.net/commercial.html | -| Permits the license holder the right to use the software in a commercial | -| context. Such license must be specifically obtained, however it's valid for | -| any number of implementations of the licensed software. | -| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | -| GPL - The GNU General Public License http://www.gnu.org/licenses/gpl.txt | -| Permits anyone the right to use and modify the software without limitations | -| as long as proper credits are given and the original and modified source | -| code are included. Requires that the final product, software derivate from | -| the original source or any software utilizing a GPL component, such as | -| this, is also licensed under the GPL license. | -|-----------------------------------------------------------------------------| -| Dependencies: xtree.css (To set up the CSS of the tree classes) | -|-----------------------------------------------------------------------------| -| 2001-01-10 | Original Version Posted. | -| 2001-03-18 | Added getSelected and get/setBehavior that can make it behave | -| | more like windows explorer, check usage for more information. | -| 2001-09-23 | Version 1.1 - New features included keyboard navigation (ie) | -| | and the ability to add and remove nodes dynamically and some | -| | other small tweaks and fixes. | -| 2002-01-27 | Version 1.11 - Bug fixes and improved mozilla support. | -| 2002-06-11 | Version 1.12 - Fixed a bug that prevented the indentation line | -| | from updating correctly under some circumstances. This bug | -| | happened when removing the last item in a subtree and items in | -| | siblings to the remove subtree where not correctly updated. | -| 2002-06-13 | Fixed a few minor bugs cased by the 1.12 bug-fix. | -| 2002-08-20 | Added usePersistence flag to allow disable of cookies. | -| 2002-10-23 | (1.14) Fixed a plus icon issue | -| 2002-10-29 | (1.15) Last changes broke more than they fixed. This version | -| | is based on 1.13 and fixes the bugs 1.14 fixed withou breaking | -| | lots of other things. | -| 2003-02-15 | The selected node can now be made visible even when the tree | -| | control loses focus. It uses a new class declaration in the | -| | css file '.webfx-tree-item a.selected-inactive', by default it | -| | puts a light-gray rectangle around the selected node. | -| 2003-03-16 | Adding target support after lots of lobbying... | -|-----------------------------------------------------------------------------| -| Created 2000-12-11 | All changes are in the log above. | Updated 2003-03-16 | -\----------------------------------------------------------------------------*/ - -var webFXTreeConfig = { - rootIcon : '/images/xtree/foldericon.png', - openRootIcon : '/images/xtree/openfoldericon.png', - folderIcon : '/images/xtree/foldericon.png', - openFolderIcon : '/images/xtree/openfoldericon.png', - fileIcon : '/images/xtree/file.png', - iIcon : '/images/xtree/I.png', - lIcon : '/images/xtree/L.png', - lMinusIcon : '/images/xtree/Lminus.png', - lPlusIcon : '/images/xtree/Lplus.png', - tIcon : '/images/xtree/T.png', - tMinusIcon : '/images/xtree/Tminus.png', - tPlusIcon : '/images/xtree/Tplus.png', - blankIcon : '/images/xtree/blank.png', - defaultText : 'Tree Item', - defaultAction : 'javascript:void(0);', - defaultBehavior : 'classic', - usePersistence : true -}; - -var webFXTreeHandler = { - idCounter : 0, - idPrefix : "webfx-tree-object-", - all : {}, - behavior : null, - selected : null, - onSelect : null, /* should be part of tree, not handler */ - getId : function() { return this.idPrefix + this.idCounter++; }, - toggle : function (oItem) { this.all[oItem.id.replace('-plus','')].toggle(); }, - select : function (oItem) { this.all[oItem.id.replace('-icon','')].select(); }, - focus : function (oItem) { this.all[oItem.id.replace('-anchor','')].focus(); }, - blur : function (oItem) { this.all[oItem.id.replace('-anchor','')].blur(); }, - keydown : function (oItem, e) { return this.all[oItem.id].keydown(e.keyCode); }, - cookies : new WebFXCookie(), - insertHTMLBeforeEnd : function (oElement, sHTML) { - if (oElement.insertAdjacentHTML != null) { - oElement.insertAdjacentHTML("BeforeEnd", sHTML) - return; - } - var df; // DocumentFragment - var r = oElement.ownerDocument.createRange(); - r.selectNodeContents(oElement); - r.collapse(false); - df = r.createContextualFragment(sHTML); - oElement.appendChild(df); - } -}; - -/* - * WebFXCookie class - */ - -function WebFXCookie() { - if (document.cookie.length) { this.cookies = ' ' + document.cookie; } -} - -WebFXCookie.prototype.setCookie = function (key, value) { - document.cookie = key + "=" + escape(value); -} - -WebFXCookie.prototype.getCookie = function (key) { - if (this.cookies) { - var start = this.cookies.indexOf(' ' + key + '='); - if (start == -1) { return null; } - var end = this.cookies.indexOf(";", start); - if (end == -1) { end = this.cookies.length; } - end -= start; - var cookie = this.cookies.substr(start,end); - return unescape(cookie.substr(cookie.indexOf('=') + 1, cookie.length - cookie.indexOf('=') + 1)); - } - else { return null; } -} - -/* - * WebFXTreeAbstractNode class - */ - -function WebFXTreeAbstractNode(sText, sAction) { - this.childNodes = []; - this.id = webFXTreeHandler.getId(); - this.text = sText || webFXTreeConfig.defaultText; - this.action = sAction || webFXTreeConfig.defaultAction; - this._last = false; - webFXTreeHandler.all[this.id] = this; -} - -/* - * To speed thing up if you're adding multiple nodes at once (after load) - * use the bNoIdent parameter to prevent automatic re-indentation and call - * the obj.ident() method manually once all nodes has been added. - */ - -WebFXTreeAbstractNode.prototype.add = function (node, bNoIdent) { - node.parentNode = this; - this.childNodes[this.childNodes.length] = node; - var root = this; - if (this.childNodes.length >= 2) { - this.childNodes[this.childNodes.length - 2]._last = false; - } - while (root.parentNode) { root = root.parentNode; } - if (root.rendered) { - if (this.childNodes.length >= 2) { - getById(this.childNodes[this.childNodes.length - 2].id + '-plus').src = ((this.childNodes[this.childNodes.length -2].folder)?((this.childNodes[this.childNodes.length -2].open)?webFXTreeConfig.tMinusIcon:webFXTreeConfig.tPlusIcon):webFXTreeConfig.tIcon); - this.childNodes[this.childNodes.length - 2].plusIcon = webFXTreeConfig.tPlusIcon; - this.childNodes[this.childNodes.length - 2].minusIcon = webFXTreeConfig.tMinusIcon; - this.childNodes[this.childNodes.length - 2]._last = false; - } - this._last = true; - var foo = this; - while (foo.parentNode) { - for (var i = 0; i < foo.parentNode.childNodes.length; i++) { - if (foo.id == foo.parentNode.childNodes[i].id) { break; } - } - if (i == foo.parentNode.childNodes.length - 1) { foo.parentNode._last = true; } - else { foo.parentNode._last = false; } - foo = foo.parentNode; - } - webFXTreeHandler.insertHTMLBeforeEnd(getById(this.id + '-cont'), node.toString()); - if ((!this.folder) && (!this.openIcon)) { - this.icon = webFXTreeConfig.folderIcon; - this.openIcon = webFXTreeConfig.openFolderIcon; - } - if (!this.folder) { this.folder = true; this.collapse(true); } - if (!bNoIdent) { this.indent(); } - } - return node; -} - -WebFXTreeAbstractNode.prototype.toggle = function() { - if (this.folder) { - if (this.open) { this.collapse(); } - else { this.expand(); } -} } - -WebFXTreeAbstractNode.prototype.select = function() { - var a = getById(this.id + '-anchor'); - if(a) a.focus(); -} - -WebFXTreeAbstractNode.prototype.deSelect = function() { - var a = getById(this.id + '-anchor'); - if(a) a.className = ''; - webFXTreeHandler.selected = null; -} - -WebFXTreeAbstractNode.prototype.focus = function() { - if ((webFXTreeHandler.selected) && (webFXTreeHandler.selected != this)) { webFXTreeHandler.selected.deSelect(); } - webFXTreeHandler.selected = this; - if ((this.openIcon) && (webFXTreeHandler.behavior != 'classic')) { getById(this.id + '-icon').src = this.openIcon; } - getById(this.id + '-anchor').className = 'selected'; - getById(this.id + '-anchor').focus(); - if (webFXTreeHandler.onSelect) { webFXTreeHandler.onSelect(this); } -} - -WebFXTreeAbstractNode.prototype.blur = function() { - if ((this.openIcon) && (webFXTreeHandler.behavior != 'classic')) { getById(this.id + '-icon').src = this.icon; } - getById(this.id + '-anchor').className = 'selected-inactive'; -} - -WebFXTreeAbstractNode.prototype.doExpand = function() { - if (webFXTreeHandler.behavior == 'classic') { getById(this.id + '-icon').src = this.openIcon; } - if (this.childNodes.length) { getById(this.id + '-cont').style.display = 'block'; } - this.open = true; - if (webFXTreeConfig.usePersistence) { - webFXTreeHandler.cookies.setCookie(this.id.substr(18,this.id.length - 18), '1'); -} } - -WebFXTreeAbstractNode.prototype.doCollapse = function() { - if (webFXTreeHandler.behavior == 'classic') { getById(this.id + '-icon').src = this.icon; } - if (this.childNodes.length) { getById(this.id + '-cont').style.display = 'none'; } - this.open = false; - if (webFXTreeConfig.usePersistence) { - webFXTreeHandler.cookies.setCookie(this.id.substr(18,this.id.length - 18), '0'); -} } - -WebFXTreeAbstractNode.prototype.expandAll = function() { - this.expandChildren(); - if ((this.folder) && (!this.open)) { this.expand(); } -} - -WebFXTreeAbstractNode.prototype.expandChildren = function() { - for (var i = 0; i < this.childNodes.length; i++) { - this.childNodes[i].expandAll(); -} } - -WebFXTreeAbstractNode.prototype.collapseAll = function() { - this.collapseChildren(); - if ((this.folder) && (this.open)) { this.collapse(true); } -} - -WebFXTreeAbstractNode.prototype.collapseChildren = function() { - for (var i = 0; i < this.childNodes.length; i++) { - this.childNodes[i].collapseAll(); -} } - -WebFXTreeAbstractNode.prototype.indent = function(lvl, del, last, level, nodesLeft) { - /* - * Since we only want to modify items one level below ourself, - * and since the rightmost indentation position is occupied by - * the plus icon we set this to -2 - */ - if (lvl == null) { lvl = -2; } - var state = 0; - for (var i = this.childNodes.length - 1; i >= 0 ; i--) { - state = this.childNodes[i].indent(lvl + 1, del, last, level); - if (state) { return; } - } - if (del) { - if ((level >= this._level) && (getById(this.id + '-plus'))) { - if (this.folder) { - getById(this.id + '-plus').src = (this.open)?webFXTreeConfig.lMinusIcon:webFXTreeConfig.lPlusIcon; - this.plusIcon = webFXTreeConfig.lPlusIcon; - this.minusIcon = webFXTreeConfig.lMinusIcon; - } - else if (nodesLeft) { getById(this.id + '-plus').src = webFXTreeConfig.lIcon; } - return 1; - } } - var foo = getById(this.id + '-indent-' + lvl); - if (foo) { - if ((foo._last) || ((del) && (last))) { foo.src = webFXTreeConfig.blankIcon; } - else { foo.src = webFXTreeConfig.iIcon; } - } - return 0; -} - -/* - * WebFXTree class - */ - -function WebFXTree(sText, sAction, sBehavior, sIcon, sOpenIcon) { - this.base = WebFXTreeAbstractNode; - this.base(sText, sAction); - this.icon = sIcon || webFXTreeConfig.rootIcon; - this.openIcon = sOpenIcon || webFXTreeConfig.openRootIcon; - /* Defaults to open */ - if (webFXTreeConfig.usePersistence) { - this.open = (webFXTreeHandler.cookies.getCookie(this.id.substr(18,this.id.length - 18)) == '0')?false:true; - } else { this.open = true; } - this.folder = true; - this.rendered = false; - this.onSelect = null; - if (!webFXTreeHandler.behavior) { webFXTreeHandler.behavior = sBehavior || webFXTreeConfig.defaultBehavior; } -} - -WebFXTree.prototype = new WebFXTreeAbstractNode; - -WebFXTree.prototype.setBehavior = function (sBehavior) { - webFXTreeHandler.behavior = sBehavior; -}; - -WebFXTree.prototype.getBehavior = function (sBehavior) { - return webFXTreeHandler.behavior; -}; - -WebFXTree.prototype.getSelected = function() { - if (webFXTreeHandler.selected) { return webFXTreeHandler.selected; } - else { return null; } -} - -WebFXTree.prototype.remove = function() { } - -WebFXTree.prototype.expand = function() { - this.doExpand(); -} - -WebFXTree.prototype.collapse = function(b) { - if (!b) { this.focus(); } - this.doCollapse(); -} - -WebFXTree.prototype.getFirst = function() { - return null; -} - -WebFXTree.prototype.getLast = function() { - return null; -} - -WebFXTree.prototype.getNextSibling = function() { - return null; -} - -WebFXTree.prototype.getPreviousSibling = function() { - return null; -} - -WebFXTree.prototype.keydown = function(key) { - if (key == 39) { - if (!this.open) { this.expand(); } - else if (this.childNodes.length) { this.childNodes[0].select(); } - return false; - } - if (key == 37) { this.collapse(); return false; } - if ((key == 40) && (this.open) && (this.childNodes.length)) { this.childNodes[0].select(); return false; } - return true; -} - -WebFXTree.prototype.toString = function() { - var str = "
" + - "" + - "" + this.text + "
" + - "
"; - var sb = []; - for (var i = 0; i < this.childNodes.length; i++) { - sb[i] = this.childNodes[i].toString(i, this.childNodes.length); - } - this.rendered = true; - return str + sb.join("") + "
"; -}; - -/* - * WebFXTreeItem class - */ - -function WebFXTreeItem(sText, sAction, eParent, sIcon, sOpenIcon) { - this.base = WebFXTreeAbstractNode; - this.base(sText, sAction); - /* Defaults to close */ - if (webFXTreeConfig.usePersistence) { - this.open = (webFXTreeHandler.cookies.getCookie(this.id.substr(18,this.id.length - 18)) == '1')?true:false; - } else { this.open = false; } - if (sIcon) { this.icon = sIcon; } - if (sOpenIcon) { this.openIcon = sOpenIcon; } - if (eParent) { eParent.add(this); } -} - -WebFXTreeItem.prototype = new WebFXTreeAbstractNode; - -WebFXTreeItem.prototype.remove = function() { - var iconSrc = getById(this.id + '-plus').src; - var parentNode = this.parentNode; - var prevSibling = this.getPreviousSibling(true); - var nextSibling = this.getNextSibling(true); - var folder = this.parentNode.folder; - var last = ((nextSibling) && (nextSibling.parentNode) && (nextSibling.parentNode.id == parentNode.id))?false:true; - this.getPreviousSibling().focus(); - this._remove(); - if (parentNode.childNodes.length == 0) { - getById(parentNode.id + '-cont').style.display = 'none'; - parentNode.doCollapse(); - parentNode.folder = false; - parentNode.open = false; - } - if (!nextSibling || last) { parentNode.indent(null, true, last, this._level, parentNode.childNodes.length); } - if ((prevSibling == parentNode) && !(parentNode.childNodes.length)) { - prevSibling.folder = false; - prevSibling.open = false; - iconSrc = getById(prevSibling.id + '-plus').src; - iconSrc = iconSrc.replace('minus', '').replace('plus', ''); - getById(prevSibling.id + '-plus').src = iconSrc; - getById(prevSibling.id + '-icon').src = webFXTreeConfig.fileIcon; - } - if (getById(prevSibling.id + '-plus')) { - if (parentNode == prevSibling.parentNode) { - iconSrc = iconSrc.replace('minus', '').replace('plus', ''); - getById(prevSibling.id + '-plus').src = iconSrc; -} } } - -WebFXTreeItem.prototype._remove = function() { - for (var i = this.childNodes.length - 1; i >= 0; i--) { - this.childNodes[i]._remove(); - } - for (var i = 0; i < this.parentNode.childNodes.length; i++) { - if (this == this.parentNode.childNodes[i]) { - for (var j = i; j < this.parentNode.childNodes.length; j++) { - this.parentNode.childNodes[j] = this.parentNode.childNodes[j+1]; - } - this.parentNode.childNodes.length -= 1; - if (i + 1 == this.parentNode.childNodes.length) { this.parentNode._last = true; } - break; - } } - webFXTreeHandler.all[this.id] = null; - var tmp = getById(this.id); - if (tmp) { tmp.parentNode.removeChild(tmp); } - tmp = getById(this.id + '-cont'); - if (tmp) { tmp.parentNode.removeChild(tmp); } -} - -WebFXTreeItem.prototype.expand = function() { - this.doExpand(); - getById(this.id + '-plus').src = this.minusIcon; -} - -WebFXTreeItem.prototype.collapse = function(b) { - if (!b) { this.focus(); } - this.doCollapse(); - getById(this.id + '-plus').src = this.plusIcon; -} - -WebFXTreeItem.prototype.getFirst = function() { - return this.childNodes[0]; -} - -WebFXTreeItem.prototype.getLast = function() { - if (this.childNodes[this.childNodes.length - 1].open) { return this.childNodes[this.childNodes.length - 1].getLast(); } - else { return this.childNodes[this.childNodes.length - 1]; } -} - -WebFXTreeItem.prototype.getNextSibling = function() { - for (var i = 0; i < this.parentNode.childNodes.length; i++) { - if (this == this.parentNode.childNodes[i]) { break; } - } - if (++i == this.parentNode.childNodes.length) { return this.parentNode.getNextSibling(); } - else { return this.parentNode.childNodes[i]; } -} - -WebFXTreeItem.prototype.getPreviousSibling = function(b) { - for (var i = 0; i < this.parentNode.childNodes.length; i++) { - if (this == this.parentNode.childNodes[i]) { break; } - } - if (i == 0) { return this.parentNode; } - else { - if ((this.parentNode.childNodes[--i].open) || (b && this.parentNode.childNodes[i].folder)) { return this.parentNode.childNodes[i].getLast(); } - else { return this.parentNode.childNodes[i]; } -} } - -WebFXTreeItem.prototype.keydown = function(key) { - if ((key == 39) && (this.folder)) { - if (!this.open) { this.expand(); } - else { this.getFirst().select(); } - return false; - } - else if (key == 37) { - if (this.open) { this.collapse(); } - else { this.parentNode.select(); } - return false; - } - else if (key == 40) { - if (this.open) { this.getFirst().select(); } - else { - var sib = this.getNextSibling(); - if (sib) { sib.select(); } - } - return false; - } - else if (key == 38) { this.getPreviousSibling().select(); return false; } - return true; -} - -WebFXTreeItem.prototype.toString = function (nItem, nItemCount) { - var foo = this.parentNode; - var indent = ''; - if (nItem + 1 == nItemCount) { this.parentNode._last = true; } - var i = 0; - while (foo.parentNode) { - foo = foo.parentNode; - indent = "" + indent; - i++; - } - this._level = i; - if (this.childNodes.length) { this.folder = 1; } - else { this.open = false; } - if ((this.folder) || (webFXTreeHandler.behavior != 'classic')) { - if (!this.icon) { this.icon = webFXTreeConfig.folderIcon; } - if (!this.openIcon) { this.openIcon = webFXTreeConfig.openFolderIcon; } - } - else if (!this.icon) { this.icon = webFXTreeConfig.fileIcon; } - var label = this.text.replace(//g, '>'); - var str = "
" + - indent + - "" + - "" + - "" + label + "
" + - "
"; - var sb = []; - for (var i = 0; i < this.childNodes.length; i++) { - sb[i] = this.childNodes[i].toString(i,this.childNodes.length); - } - this.plusIcon = ((this.parentNode._last)?webFXTreeConfig.lPlusIcon:webFXTreeConfig.tPlusIcon); - this.minusIcon = ((this.parentNode._last)?webFXTreeConfig.lMinusIcon:webFXTreeConfig.tMinusIcon); - return str + sb.join("") + "
"; -} diff --git a/Open-ILS/src/templates/html/anchor b/Open-ILS/src/templates/html/anchor deleted file mode 100644 index 682fb76243..0000000000 --- a/Open-ILS/src/templates/html/anchor +++ /dev/null @@ -1,25 +0,0 @@ -[%# ARGS --%] - - -[% ""; - text; - " "; - content; - "\n"; - ELSE; - "/>\n"; - END; - -%] diff --git a/Open-ILS/src/templates/html/bar b/Open-ILS/src/templates/html/bar deleted file mode 100644 index 51331fab2b..0000000000 --- a/Open-ILS/src/templates/html/bar +++ /dev/null @@ -1,7 +0,0 @@ -[%# html/bar: table containing a single row - # ARGS: - # as per html/table and html/row --%] -[% WRAPPER html/table + html/row %] -[% content %] -[% END %] \ No newline at end of file diff --git a/Open-ILS/src/templates/html/body b/Open-ILS/src/templates/html/body deleted file mode 100644 index 9593f6da15..0000000000 --- a/Open-ILS/src/templates/html/body +++ /dev/null @@ -1,25 +0,0 @@ -[% - - #--------------------------------------------------------------------------------- - #html/body: ... element for HTML pages - # - # ARGS: - # - # content # body content - #--------------------------------------------------------------------------------- - - ""; - - content; - - ""; - -%] diff --git a/Open-ILS/src/templates/html/bold b/Open-ILS/src/templates/html/bold deleted file mode 100644 index 5aec9b95d8..0000000000 --- a/Open-ILS/src/templates/html/bold +++ /dev/null @@ -1,3 +0,0 @@ -[% - ""; text; ""; -%] diff --git a/Open-ILS/src/templates/html/box b/Open-ILS/src/templates/html/box deleted file mode 100644 index 0cfa9c8c71..0000000000 --- a/Open-ILS/src/templates/html/box +++ /dev/null @@ -1,20 +0,0 @@ -[% - ""; - content; - ""; -%] - diff --git a/Open-ILS/src/templates/html/buffer b/Open-ILS/src/templates/html/buffer deleted file mode 100644 index 7a16f0752a..0000000000 --- a/Open-ILS/src/templates/html/buffer +++ /dev/null @@ -1,23 +0,0 @@ -[% - - # -------------------------------------------------------- - # Inserts whitespace into a page. - # 'size' is the number of lines to output - # -------------------------------------------------------- - - IF size; - - x=0; - - WHILE x < size; - "
"; - x = x + 1; - END; - - ELSE; - - "
"; - END -%] - - diff --git a/Open-ILS/src/templates/html/button b/Open-ILS/src/templates/html/button deleted file mode 100644 index e5e833d0e1..0000000000 --- a/Open-ILS/src/templates/html/button +++ /dev/null @@ -1,17 +0,0 @@ -[%# html/button: simple text button with a link like "[ this ]" - # ARGS: - # text # button text - # link # button link url - # select # flag to select item (set bold) - # left # flag to add left arrow head (e.g. prev. item) - # right # flag to add right arrow head (e.g. next item) -%] -[%- '<-' IF left %] -[%- select ? '[' : '[' -%] -  -[%- IF link %][% END %] -[%- text | replace('\s', ' ') %] -[%- IF link %][% END -%] -  -[%- select ? ']' : ']' %] -[%- '->' IF right -%] diff --git a/Open-ILS/src/templates/html/cell b/Open-ILS/src/templates/html/cell deleted file mode 100644 index dcc395d568..0000000000 --- a/Open-ILS/src/templates/html/cell +++ /dev/null @@ -1,23 +0,0 @@ -[%# html/cell: an empty and orphaned HTML table cell, . . . - # ARGS: - # col # background colour (default: none) - # align # horizontal alignment (default: none) - # valign # vertical alignment (default: none) - # colspan # span multiple columns (defualt: none) - # rowspan # span multiple rows (defualt: none) - # content # box content --%] - - -[%- content -%] - diff --git a/Open-ILS/src/templates/html/center b/Open-ILS/src/templates/html/center deleted file mode 100644 index 6a9f1912d0..0000000000 --- a/Open-ILS/src/templates/html/center +++ /dev/null @@ -1,6 +0,0 @@ -[% - "
"; - content; - "
"; -%] - diff --git a/Open-ILS/src/templates/html/col b/Open-ILS/src/templates/html/col deleted file mode 100644 index 3a1570c0af..0000000000 --- a/Open-ILS/src/templates/html/col +++ /dev/null @@ -1,14 +0,0 @@ -[% - - ""; - IF content; content; END; - ""; -%] diff --git a/Open-ILS/src/templates/html/concat b/Open-ILS/src/templates/html/concat deleted file mode 100644 index 70aab0224d..0000000000 --- a/Open-ILS/src/templates/html/concat +++ /dev/null @@ -1,7 +0,0 @@ -[% - string = ""; - FOR word IN strings; - string = string _ word; - END; - string; -%] diff --git a/Open-ILS/src/templates/html/config b/Open-ILS/src/templates/html/config deleted file mode 100644 index b839f47389..0000000000 --- a/Open-ILS/src/templates/html/config +++ /dev/null @@ -1,12 +0,0 @@ -[% USE HTML; - html = { - dtd = '-//W3C//DTD HTML 3.2 Final//EN' - - # plus various other HTML element/attributes - # body = { - # bgcolor = '#ffffff' - # } - # etc... - }; --%] - diff --git a/Open-ILS/src/templates/html/div b/Open-ILS/src/templates/html/div deleted file mode 100644 index 0cfa9c8c71..0000000000 --- a/Open-ILS/src/templates/html/div +++ /dev/null @@ -1,20 +0,0 @@ -[% - ""; - content; - ""; -%] - diff --git a/Open-ILS/src/templates/html/edge b/Open-ILS/src/templates/html/edge deleted file mode 100644 index b2e8316167..0000000000 --- a/Open-ILS/src/templates/html/edge +++ /dev/null @@ -1,28 +0,0 @@ -[%# html/edge: an empty table with an edged outline - # ARGS: - # edge # edge colour (default: black, '#000000') - # fill # fill colour (default: white, '#ffffff') - # border # border width (default: 2) - # content # bar content - # + other args as per html/table --%] -[% DEFAULT - edge = '#000000' - fill = '#ffffff' - border = 2 --%] -[% WRAPPER html/box - col = edge - pad = border - border = 0 - space = 0 ; - inwidth = width ? '100%' : '' ; - WRAPPER html/table - col = fill - space = 0 - border = 0 - width = inwidth ; - content ; - END ; - END -%] diff --git a/Open-ILS/src/templates/html/edgebar b/Open-ILS/src/templates/html/edgebar deleted file mode 100644 index 0b9b545107..0000000000 --- a/Open-ILS/src/templates/html/edgebar +++ /dev/null @@ -1,28 +0,0 @@ -[%# html/edgebar: a single row table with an edged outline - # ARGS: - # edge # edge colour (default: black, '#000000') - # fill # fill colour (default: white, '#ffffff') - # border # border width (default: 2) - # content # bar content - # + other args as per html/bar --%] -[% DEFAULT - edge = '#000000' - fill = '#ffffff' - border = 2 --%] -[% WRAPPER html/box - col = edge - pad = border - border = 0 - space = 0 ; - inwidth = width ? '100%' : '' ; - WRAPPER html/bar - col = fill - space = 0 - border = 0 - width = inwidth ; - content ; - END ; - END -%] diff --git a/Open-ILS/src/templates/html/edgebox b/Open-ILS/src/templates/html/edgebox deleted file mode 100644 index 71e1172f70..0000000000 --- a/Open-ILS/src/templates/html/edgebox +++ /dev/null @@ -1,9 +0,0 @@ -[%# html/edgebox: a single row, single cell table with an edge - # ARGS: - # content # box content - # + other args as per html/edgebar and html/cell --%] -[% WRAPPER html/edgebar + html/cell %] -[% content %] -[% END %] - diff --git a/Open-ILS/src/templates/html/footer b/Open-ILS/src/templates/html/footer deleted file mode 100644 index 003633f4da..0000000000 --- a/Open-ILS/src/templates/html/footer +++ /dev/null @@ -1,3 +0,0 @@ -[%# html/footer: standard footer for HTML pages -%] - - \ No newline at end of file diff --git a/Open-ILS/src/templates/html/form b/Open-ILS/src/templates/html/form deleted file mode 100644 index da718dad1f..0000000000 --- a/Open-ILS/src/templates/html/form +++ /dev/null @@ -1,10 +0,0 @@ -[% - "\n
"; - content; - "
" -%] diff --git a/Open-ILS/src/templates/html/h b/Open-ILS/src/templates/html/h deleted file mode 100644 index fd3110baf2..0000000000 --- a/Open-ILS/src/templates/html/h +++ /dev/null @@ -1,5 +0,0 @@ -[% - ""; - text; - ""; -%] diff --git a/Open-ILS/src/templates/html/head b/Open-ILS/src/templates/html/head deleted file mode 100644 index 731b4043fe..0000000000 --- a/Open-ILS/src/templates/html/head +++ /dev/null @@ -1,28 +0,0 @@ -[%# html/head: ... element for HTML pages - # - # ARGS: - # - html.head.title # page title - # - html.head.meta # hash of metadata - # - html.headers # additional HTML headers - # TODO: - # - various other header items are not currently handled, - # e.g. base, xbase, target, script, noscript, etc., but - # you can set 'html.headers' as a general work-around - # to put extra stuff in the ... element --%] -[% - "\n"; - - IF title; - "" _ title _ ""; - END; - - FOREACH item = html.head.meta; - ""; - END; - html.headers; - content; - ""; - -%] - diff --git a/Open-ILS/src/templates/html/header b/Open-ILS/src/templates/html/header deleted file mode 100644 index a5fd0f7886..0000000000 --- a/Open-ILS/src/templates/html/header +++ /dev/null @@ -1,21 +0,0 @@ -[%# NOTE: this may soon be deprecated in favour of the new - # separate html/html, html/head and html/body templates - # - # html/header: standard header for HTML pages - # ARGS: - # bgcol # background colour (default: #ffffff) - # title # page title - # headers # additional HTML headers --%] -[% DEFAULT bgcol = '#ffffff' -%] - - - - - -[% title %] -[% headers -%] - - - diff --git a/Open-ILS/src/templates/html/hr b/Open-ILS/src/templates/html/hr deleted file mode 100644 index 0cb011e39c..0000000000 --- a/Open-ILS/src/templates/html/hr +++ /dev/null @@ -1,3 +0,0 @@ -[% - "
"; -%] diff --git a/Open-ILS/src/templates/html/html b/Open-ILS/src/templates/html/html deleted file mode 100644 index 20f02456ee..0000000000 --- a/Open-ILS/src/templates/html/html +++ /dev/null @@ -1,6 +0,0 @@ - - - -[% "\n" _ content _ "\n" %] - diff --git a/Open-ILS/src/templates/html/html3.2 b/Open-ILS/src/templates/html/html3.2 deleted file mode 100644 index b9cad4b05a..0000000000 --- a/Open-ILS/src/templates/html/html3.2 +++ /dev/null @@ -1,4 +0,0 @@ - - -[% content %] - diff --git a/Open-ILS/src/templates/html/iframe b/Open-ILS/src/templates/html/iframe deleted file mode 100644 index a0aabe62fe..0000000000 --- a/Open-ILS/src/templates/html/iframe +++ /dev/null @@ -1,13 +0,0 @@ -[% - ""; -%] diff --git a/Open-ILS/src/templates/html/img b/Open-ILS/src/templates/html/img deleted file mode 100644 index ccdb9e4eb3..0000000000 --- a/Open-ILS/src/templates/html/img +++ /dev/null @@ -1,18 +0,0 @@ -[% - - ""; -%] - diff --git a/Open-ILS/src/templates/html/indent b/Open-ILS/src/templates/html/indent deleted file mode 100644 index 1e1dc3b865..0000000000 --- a/Open-ILS/src/templates/html/indent +++ /dev/null @@ -1,9 +0,0 @@ -[%# html/indent: an indented box - # ARGS: - # width # width of table (default: 95%) - # + other args as per html/box --%] -
-[% DEFAULT width="95%" -%] -[% INCLUDE html/box %] -
diff --git a/Open-ILS/src/templates/html/input b/Open-ILS/src/templates/html/input deleted file mode 100644 index dfefd0b5c2..0000000000 --- a/Open-ILS/src/templates/html/input +++ /dev/null @@ -1,22 +0,0 @@ - -[% - - ""; - IF content; - content; - ""; - END; - -%] - diff --git a/Open-ILS/src/templates/html/item b/Open-ILS/src/templates/html/item deleted file mode 100644 index 72c2e152bf..0000000000 --- a/Open-ILS/src/templates/html/item +++ /dev/null @@ -1,10 +0,0 @@ -[%# item: an item in a list - # ARGS: - # title # title for item - # content # item content --%] -
  • [%- IF title && title != '*' -%] -[% title %][% "
    \n" IF content -%] -[% END -%] -[% content -%] - diff --git a/Open-ILS/src/templates/html/js b/Open-ILS/src/templates/html/js deleted file mode 100644 index d431ae3f38..0000000000 --- a/Open-ILS/src/templates/html/js +++ /dev/null @@ -1,25 +0,0 @@ -[%# html/js - # - # ARGS: - # - content # javascript content --%] - -[% - - ""; - - ELSE; - ">"; - END; - - -%] - diff --git a/Open-ILS/src/templates/html/link b/Open-ILS/src/templates/html/link deleted file mode 100644 index dc7f9cda28..0000000000 --- a/Open-ILS/src/templates/html/link +++ /dev/null @@ -1,17 +0,0 @@ -[%# ARGS --%] - - -[% ""; - - IF text; - text; - END; - - "\n"; - -%] diff --git a/Open-ILS/src/templates/html/list b/Open-ILS/src/templates/html/list deleted file mode 100644 index b37165372b..0000000000 --- a/Open-ILS/src/templates/html/list +++ /dev/null @@ -1,11 +0,0 @@ -[%# list: a list of items - # ARGS: - # title # title for list - # content # list content --%] -[% IF title -%] -[% title %] -[% END -%] -
      -[% content -%] -
    diff --git a/Open-ILS/src/templates/html/menu b/Open-ILS/src/templates/html/menu deleted file mode 100644 index 70150d0914..0000000000 --- a/Open-ILS/src/templates/html/menu +++ /dev/null @@ -1,19 +0,0 @@ -[%# menu: generate sequence of buttons with optional left/right/select - # ARGS: - # buttons = [ # list of buttons - # { link => 'page1.html', text => 'First Page' }, - # { link => 'page2.html', text => 'Second Page' }, - # ... - # ], - # select # item to select in range 1 to n (0: none) - # left # add left arrowhead to first item - # right # add right arrowhead to last item --%] -[% INCLUDE html/button - link = b.link - text = b.text - left = loop.first ? left : 0 - right = loop.last ? right : 0 - select = (select == loop.count) ? select : 0 - FOREACH b = buttons --%] diff --git a/Open-ILS/src/templates/html/menubar b/Open-ILS/src/templates/html/menubar deleted file mode 100644 index 85d83b7b6c..0000000000 --- a/Open-ILS/src/templates/html/menubar +++ /dev/null @@ -1,17 +0,0 @@ -[%# menubar: create 2 cell edgebox with content on left and menu on right - # ARGS: - # edge # edge colour - # fill # fill colour - # border # border (edge) width - # content # menu bar content (e.g. title text) - # menu # structure for menu items, as per html/menu --%] -[% DEFAULT content = ' ' -%] -[% WRAPPER html/edgebar -%] - -[% content %] - - - [% INCLUDE html/menu -%] - -[%- END %] diff --git a/Open-ILS/src/templates/html/option b/Open-ILS/src/templates/html/option deleted file mode 100644 index 5b039916d7..0000000000 --- a/Open-ILS/src/templates/html/option +++ /dev/null @@ -1,15 +0,0 @@ -[% - - ""; - IF content; - content; - ""; - END; - -%] - diff --git a/Open-ILS/src/templates/html/page b/Open-ILS/src/templates/html/page deleted file mode 100644 index 4d7685f0d0..0000000000 --- a/Open-ILS/src/templates/html/page +++ /dev/null @@ -1,11 +0,0 @@ -[%# html/page: and ... element wrapper - # - # ARGS: - # - html.dtd # Document Type Definition - # - content # html content --%] -[% DEFAULT html.dtd = '-//W3C//DTD HTML 3.2 Final//EN' -%] - - -[% PROCESS html/head + html/body %] - diff --git a/Open-ILS/src/templates/html/rgb b/Open-ILS/src/templates/html/rgb deleted file mode 100644 index 85fdcadff3..0000000000 --- a/Open-ILS/src/templates/html/rgb +++ /dev/null @@ -1,76 +0,0 @@ -[%# html/rgb: define 'rgb' containing RGB triples for various colours -%] -[% rgb = { - # the mono crowd - black => '#000000' - grey25 => '#404040' - grey50 => '#808080' - grey75 => '#c0c0c0' - white => '#ffffff' - - red => '#ff0000' - red25 => '#400000' - red50 => '#800000' - red75 => '#c00000' - - green => '#00ff00' - green25 => '#004000' - green50 => '#008000' - green75 => '#00c000' - - blue => '#0000ff' - blue25 => '#000040' - blue50 => '#000080' - blue75 => '#0000c0' - - # v0.01 cols follow - # reds - blood => '#800000' - scarlet => '#c04040' - rose => '#f08080' - orange => '#fe7202' - - # greens - leaf => '#006400' - bud => '#66aa66' - mint => '#aaffaa' - - # blues - navy => '#202080' - marine => '#0066cc' - aqua => '#3399cc' - sky => '#66ccff' - - # lavender blues - purple => '#404080' - mauve => '#6666cc' - lilac => '#9797ff' - - } - - # sets of dark/mid/light colours - rgb.shade.grey = { - dark => rgb.grey25, - mid => rgb.grey50, - light => rgb.grey75, - } - rgb.shade.red = { - dark => rgb.red25, - mid => rgb.red50, - light => rgb.red75, - } - rgb.shade.green = { - dark => rgb.green25, - mid => rgb.green50, - light => rgb.green75, - } - rgb.shade.blue = { - dark => rgb.blue25, - mid => rgb.blue50, - light => rgb.blue75, - } - rgb.shade.lavender = { - dark => rgb.purple, - mid => rgb.mauve, - light => rgb.lilac, - } --%] diff --git a/Open-ILS/src/templates/html/row b/Open-ILS/src/templates/html/row deleted file mode 100644 index 545bde8374..0000000000 --- a/Open-ILS/src/templates/html/row +++ /dev/null @@ -1,16 +0,0 @@ -[%# row: an empty and orphaned HTML table row, . . . - # ARGS: - # col # background colour (default: none) - # valign # vertical alignment (default: none) - # align # horizontal alignment (default: none) - # content # box content --%] - - -[%- content -%] - diff --git a/Open-ILS/src/templates/html/select b/Open-ILS/src/templates/html/select deleted file mode 100644 index 8c0b2ab999..0000000000 --- a/Open-ILS/src/templates/html/select +++ /dev/null @@ -1,16 +0,0 @@ - -[% - - ""; - - IF content; content; END; - - ""; - -%] - diff --git a/Open-ILS/src/templates/html/space b/Open-ILS/src/templates/html/space deleted file mode 100644 index 4a576e0abb..0000000000 --- a/Open-ILS/src/templates/html/space +++ /dev/null @@ -1,17 +0,0 @@ -[% - - # -------------------------------------------------------- - # Inserts whitespace into a page. - # 'size' is the number of lines to output - # -------------------------------------------------------- - - IF size; - x=0; - WHILE x < size; - " "; - x = x + 1; - END; - END; -%] - - diff --git a/Open-ILS/src/templates/html/span b/Open-ILS/src/templates/html/span deleted file mode 100644 index 87db071758..0000000000 --- a/Open-ILS/src/templates/html/span +++ /dev/null @@ -1,20 +0,0 @@ -[% - ""; - content; - ""; -%] - diff --git a/Open-ILS/src/templates/html/table b/Open-ILS/src/templates/html/table deleted file mode 100644 index 7b0095941a..0000000000 --- a/Open-ILS/src/templates/html/table +++ /dev/null @@ -1,18 +0,0 @@ -[%# table: an empty HTML table . . .
    - # ARGS: - # border # border width (default: 0) - # col # background colour (default: none) - # width # width of box (default: none, grow to fit content) - # pad # cellpadding (default: none) - # cellspace # cellspacing (default: none) - # content # box content --%] - -[%- content -%] -
    diff --git a/Open-ILS/src/templates/html/thead b/Open-ILS/src/templates/html/thead deleted file mode 100644 index 724a2a4144..0000000000 --- a/Open-ILS/src/templates/html/thead +++ /dev/null @@ -1,13 +0,0 @@ -[%# thead: an empty and orphaned HTML table thead, . . . - # ARGS: - # col # background colour (default: none) - # valign # vertical alignment (default: none) - # align # horizontal alignment (default: none) - # content # box content --%] - - -[%- content -%] - diff --git a/Open-ILS/src/templates/opac/conf/config.ttk b/Open-ILS/src/templates/opac/conf/config.ttk deleted file mode 100644 index cef6b1416a..0000000000 --- a/Open-ILS/src/templates/opac/conf/config.ttk +++ /dev/null @@ -1,71 +0,0 @@ -[% - - #--------------------------------------------------------------------------------- - # Top Level Web Config File - #--------------------------------------------------------------------------------- - - - # --------------------------------------------------------------------------------- - # Bootstrap config file - # --------------------------------------------------------------------------------- - global.config.bootstrap = "/pines/conf/web_bootstrap.conf"; - - global.config.root_url = "/opac/"; - - # --------------------------------------------------------------------------------- - # User session timeout. * This will need to match (or be shorter than) the - # session timeout provided by the web auth server - # --------------------------------------------------------------------------------- - global.config.session_timeout = 14; #days - - # --------------------------------------------------------------------------------- - # Apps - # --------------------------------------------------------------------------------- - global.config.app.math = "opensrf.math"; - global.config.app.auth = "open-ils.auth"; - global.config.app.opac = "open-ils.opac"; - global.config.app.storage = "open-ils.storage"; - global.config.app.cat = "open-ils.cat"; - global.config.app.search = "open-ils.search"; - - - - # --------------------------------------------------------------------------------- - # Potentially useful macros - # --------------------------------------------------------------------------------- - MACRO html WRAPPER html/html; content; END; - MACRO head WRAPPER head/head; content; END; - MACRO body WRAPPER html/body; content; END; - #MACRO table WRAPPER html/table; '' _ content _ ""; END; - MACRO table WRAPPER html/table; content; END; - MACRO row WRAPPER html/row; content; END; - MACRO cell WRAPPER html/cell; content; END; - MACRO form WRAPPER html/form; content; END; - MACRO input WRAPPER html/input; content; END; - MACRO option WRAPPER html/option; content; END; - MACRO lines(n) WRAPPER html/buffer size=n; END; - MACRO concat WRAPPER html/concat; END; - MACRO img WRAPPER html/img; END; - MACRO space(n) WRAPPER html/space; size=n; END; - MACRO link WRAPPER html/link; END; - MACRO anchor WRAPPER html/anchor; END; - MACRO js WRAPPER html/js; content; END; - MACRO hr WRAPPER html/hr; END; - MACRO b(n) WRAPPER html/bold; text=n; END; - MACRO h(n,t) WRAPPER html/h size=n text=t; END; - MACRO center WRAPPER html/center; content; END; - MACRO box WRAPPER html/div; content; END; - MACRO span WRAPPER html/span; content; END; - - MACRO cellbox WRAPPER html/cell; - WRAPPER html/div; content; END; - END; - - MACRO rowbox(i,c,text) WRAPPER html/row; - WRAPPER html/cell; - WRAPPER html/div; id=_id; class=_class; text; END; - END; - END; - -%] - diff --git a/Open-ILS/src/templates/opac/conf/textmap_en_us.ttk b/Open-ILS/src/templates/opac/conf/textmap_en_us.ttk deleted file mode 100644 index d8aa107c9c..0000000000 --- a/Open-ILS/src/templates/opac/conf/textmap_en_us.ttk +++ /dev/null @@ -1,47 +0,0 @@ -[% - # --------------------------------------------------------------------------------- - # Text Map - Defines all of the static text - # The basic layout: - # global.textmap.opac.$page.$field = $value; - # --------------------------------------------------------------------------------- - - - # --------------------------------------------------------------------------------- - # Change to suit orginization - # --------------------------------------------------------------------------------- - global.textmap.opac.basic_search.page_title = "Evergreen OPAC"; - global.textmap.opac.advanced_search.page_title = "Evergreen Advanced Search"; - global.textmap.opac.mr_result.page_title = "Evergreen Search Results"; - global.textmap.opac.search_bar.about = "About PINES" - - # --------------------------------------------------------------------------------- - # Basic English text by page - # --------------------------------------------------------------------------------- - - - # search_bar ---------------------------------------------------------------------- - global.textmap.opac.search_bar.title = "Title"; - global.textmap.opac.search_bar.author = "Author"; - global.textmap.opac.search_bar.subject = "Subject"; - global.textmap.opac.search_bar.keyword = "Keyword"; - global.textmap.opac.search_bar.search = "Search"; - global.textmap.opac.search_bar.text_area = "Basic Search"; - global.textmap.opac.search_bar.advanced = "Advanced Search"; - global.textmap.opac.search_bar.my_opac = "My OPAC"; - global.textmap.opac.search_bar.login = "Login"; - global.textmap.opac.search_bar.logout = "Logout"; - - # mr_result ---------------------------------------------------------------------- - global.textmap.opac.mr_result.hit_count = "Hits: "; - - # login -------------------------------------------------------------------------- - global.textmap.opac.login.username = "User Barcode"; - global.textmap.opac.login.password = "Password"; - global.textmap.opac.login.login = "Login"; - global.textmap.opac.login.success = "Login Succeeded"; - global.textmap.opac.login.failure = "Login Failed"; - global.textmap.opac.login.logout_success = "You have been successfully logged out."; - global.textmap.opac.login.remember = "Remember me"; - -%] - diff --git a/Open-ILS/src/templates/opac/logic/child_init.ttk b/Open-ILS/src/templates/opac/logic/child_init.ttk deleted file mode 100644 index 14a93dff63..0000000000 --- a/Open-ILS/src/templates/opac/logic/child_init.ttk +++ /dev/null @@ -1,30 +0,0 @@ -[% - - # --------------------------------------------------------------------------------- - # Any code here is run on Apache child process init. Variables created that need - # to live longer than this template must be added to the global cache: - # websession.add_cache( $key, $value ); - # --------------------------------------------------------------------------------- - - # --------------------------------------------------------------------------------- - # Bring in the config variables - # --------------------------------------------------------------------------------- - PROCESS "opac/conf/config.ttk"; - - # --------------------------------------------------------------------------------- - # Connect to transport - # --------------------------------------------------------------------------------- - - IF ! global.config.bootstrap; - THROW PANIC "No Bootstrap Config Found in Config"; - END; - - USE websession = WebSession(); - x = websession.bootstrap_client(global.config.bootstrap) - - # --------------------------------------------------------------------------------- - # Load any necessary config info from storage, etc. - # --------------------------------------------------------------------------------- - -%] - diff --git a/Open-ILS/src/templates/opac/logic/fastjs.ttk b/Open-ILS/src/templates/opac/logic/fastjs.ttk deleted file mode 100644 index 31e7858b77..0000000000 --- a/Open-ILS/src/templates/opac/logic/fastjs.ttk +++ /dev/null @@ -1,14 +0,0 @@ -[%- - # gathers javascript files into a single blob of stripped text - - FOR file IN files; - file = doc_root _ "/" _ file; - INCLUDE $file | - replace('(?gm:^\s*)','') | - replace('(?gm:(?"; - - END; # - body - END; # - html - -%] - - - - - diff --git a/Open-ILS/src/templates/opac/pages/advanced_search.ttk b/Open-ILS/src/templates/opac/pages/advanced_search.ttk deleted file mode 100644 index d036288309..0000000000 --- a/Open-ILS/src/templates/opac/pages/advanced_search.ttk +++ /dev/null @@ -1,60 +0,0 @@ - -[% - tm = global.textmap.opac; - - WRAPPER html/html; - - WRAPPER html/head title="Advanced Search"; - INCLUDE opac/pages/chunks/css_includes.ttk; - END; - - WRAPPER html/body onload='pageInit();'; - - INCLUDE opac/pages/chunks/body_header.ttk hide_hits_per=1; - - WRAPPER html/table width="100%"; - - WRAPPER html/row; - WRAPPER html/cell colspan='2'; - box(id='adv_search_main_header', content="Advanced Search"); - END; - WRAPPER html/cell valign='top' rowspan='2'; - box(id='main_page_nav_box', class='nav_box_box'); - END; - END; - - - WRAPPER html/row; - - WRAPPER html/cell; - WRAPPER html/div class='adv_search_left_box'; - WRAPPER html/div class='adv_search_quick_box'; - INCLUDE opac/pages/chunks/adv_global_search.ttk; - END; - END; # left box - END; - - - WRAPPER html/cell; - WRAPPER html/div class='adv_search_big_box'; - #INCLUDE opac/pages/chunks/adv_mixed_search.ttk; - INCLUDE opac/pages/chunks/adv_refined_keyword.ttk; - END; - END; - - END; - END; #table - - lines(5); - "
    More to come... ...
    "; - - INCLUDE opac/pages/chunks/org_tree.ttk; - - - END; # - body - END; # - html - -%] - - - diff --git a/Open-ILS/src/templates/opac/pages/chunks/adv_global_search.ttk b/Open-ILS/src/templates/opac/pages/chunks/adv_global_search.ttk deleted file mode 100644 index 6c98255d33..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/adv_global_search.ttk +++ /dev/null @@ -1,35 +0,0 @@ -[% - - WRAPPER html/div id='adv_global_search_div' class='adv_search_chunk_box'; - - - box(class='adv_search_header', content="Quick Search"); - - WRAPPER html/div class='adv_dashed_box'; - box(class='adv_search_left_item' content="ISBN"); - box(class='adv_search_left_item' content= - input(type='text', size='12', id='adv_isbn_text')); - - lines(1); - - box(class='adv_search_left_item' content="TCN"); - box(class='adv_search_left_item' content= - input(type='text', size='12', id='adv_tcn_text')); - - lines(1); - - box(class='adv_search_left_item' content="Barcode"); - box(class='adv_search_left_item' content= - input(type='text', size='12', id='adv_barcode_text')); - - lines(1); - - box(class='adv_search_left_item' content= - input(type='submit', value='Search', id='adv_global_search_button')); - - lines(1); - END; - - END; # div - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/adv_location.ttk b/Open-ILS/src/templates/opac/pages/chunks/adv_location.ttk deleted file mode 100644 index 506d0da211..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/adv_location.ttk +++ /dev/null @@ -1,14 +0,0 @@ -[% - WRAPPER html/div class='adv_search_chunk_box'; - - box(class='adv_search_header', content="Change Location?"); - box(class='big_line_div'); - - WRAPPER html/select name='adv_search_location' id='adv_search_location'; - option(value='choose', content="Load Me From DB", selected='selected'); - END; - - box(class='big_line_div'); - END; - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/adv_mixed_search.ttk b/Open-ILS/src/templates/opac/pages/chunks/adv_mixed_search.ttk deleted file mode 100644 index 8c82c759eb..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/adv_mixed_search.ttk +++ /dev/null @@ -1,53 +0,0 @@ -[% - - WRAPPER html/div id='adv_mixed_search_div' class='adv_search_chunk_box'; - - WRAPPER html/div class='adv_search_header'; - "Mixed Search";; - END; - - WRAPPER html/div class='adv_dashed_box'; - WRAPPER html/table; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left' width="25%" content= "Title includes: "); - cell(align='left' content=input(type='text' size='24' id='adv_search_mixed_title')); - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left' width="25%" content= "Author includes: "); - cell(align='left' content=input(type='text' size='24' id='adv_search_mixed_author')); - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left' width="25%" content= "Subject includes: "); - cell(align='left' content=input(type='text' size='24' id='adv_search_mixed_subject')); - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell( content="Form of Material" ); - WRAPPER html/cell; - WRAPPER html/select name='adv_search_format' id='adv_search_format'; - option(value='choose', content="All", selected='selected'); - option(value='blank', content="--------------"); - option(value='ugh', content="Get me from the db..."); - END; - END; - END; - - row(content = cell(content = lines(1))); - - END; - END; - - END; - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/adv_refined_keyword.ttk b/Open-ILS/src/templates/opac/pages/chunks/adv_refined_keyword.ttk deleted file mode 100644 index 25023a7855..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/adv_refined_keyword.ttk +++ /dev/null @@ -1,64 +0,0 @@ -[% - - WRAPPER html/div id='adv_refined_search_div' class='adv_search_chunk_box'; - - WRAPPER html/div class='adv_search_header'; - "Refined Search";; - END; - - WRAPPER html/div class='adv_dashed_box'; - - WRAPPER html/table; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left', content="Search Type"); - WRAPPER html/cell align='left'; - WRAPPER html/select name='adv_search_type' id='adv_search_type'; - option(value='title', content="Title"); - option(value='author', content="Author"); - option(value='subject', content="Subject"); - option(value='keyword', selected='selected', content="Keyword"); - option(value='series', content="Series"); - END; - END; - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left' , content= "Find results with all words:"); - cell(align='left' , content=input(type='text' size='34' id='adv_all_words')); - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left' content= "Find results with the exact phrase:"); - cell(align='left' content=input(type='text' size='34' id='adv_exact_words')); - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - cell(align='left' content= "Find results with none of these words:"); - cell(align='left' content=input(type='text' size='34' id='adv_none_words')); - END; - - row(content = cell(content = lines(1))); - - WRAPPER html/row; - WRAPPER html/cell colspan='4'; - WRAPPER html/center; - input( type='submit', value='Search', id="adv_search_refined_submit"); - END; - END; - END; - - END; # table - END; # table - - END; # div - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk b/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk deleted file mode 100644 index 23e333a820..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/body_header.ttk +++ /dev/null @@ -1,19 +0,0 @@ -[% - box(id='progress_bar_location'); - INCLUDE opac/pages/chunks/opac_search_bar.ttk; - - #WRAPPER html/div id='deep_link_div';END; - - #INCLUDE opac/pages/chunks/status_bar.ttk; - - WRAPPER html/center; - WRAPPER html/div class='hit_count_selector_div' width="100%"; - box(id='hit_count_cell', class='hit_count_cell'); - box(id='progress_bar_percent_location'); - box(id='now_searching_cell', class='now_searching_cell', style="float:right;"); - END; - END; - - #box(id='page_trail', style="float:left;"); - #INCLUDE opac/pages/chunks/org_tree.ttk; -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/cgi_js_params.ttk b/Open-ILS/src/templates/opac/pages/chunks/cgi_js_params.ttk deleted file mode 100644 index 608aa33cb9..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/cgi_js_params.ttk +++ /dev/null @@ -1,14 +0,0 @@ -[% - # --------------------------------------------------------------------------------- - # Gather all of the CGI params and put them into a global variable paramObj - # --------------------------------------------------------------------------------- - - WRAPPER html/js; - 'parent.paramObj = new Object();'; - FOR pname IN cgi.param(); - 'parent.paramObj["'; pname; '"] = "'; cgi.param(pname); '";'; "\n"; - END; - END; - -%] - diff --git a/Open-ILS/src/templates/opac/pages/chunks/css_includes.ttk b/Open-ILS/src/templates/opac/pages/chunks/css_includes.ttk deleted file mode 100644 index a37336832e..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/css_includes.ttk +++ /dev/null @@ -1,19 +0,0 @@ -[% - - # --------------------------------------------------------------------------------- - # All of the css files we might need - # --------------------------------------------------------------------------------- - link(rel="stylesheet", href="/css/opac_main.css", type="text/css"); - link(rel="stylesheet", href="/css/nav_bar.css", type="text/css"); - link(rel="stylesheet", href="/css/record_result.css", type="text/css"); - link(rel="stylesheet", href="/css/record_detail.css", type="text/css"); - link(rel="stylesheet", href="/css/adv_search.css", type="text/css"); - link(rel="stylesheet", href="/css/xtree.css", type="text/css"); - link(rel="stylesheet", href="/css/context_menu.css" type="text/css"); - link(rel="stylesheet", href="/css/survey.css" type="text/css"); - link(rel="stylesheet", href="/css/progress_bar.css" type="text/css"); - link(rel="stylesheet", href="/css/box.css" type="text/css"); - - INCLUDE opac/pages/chunks/init.ttk; - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/css_js_includes.ttk b/Open-ILS/src/templates/opac/pages/chunks/css_js_includes.ttk deleted file mode 100644 index 29de2d1d8a..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/css_js_includes.ttk +++ /dev/null @@ -1,94 +0,0 @@ -[% - - url = cgi.server_name(); - port = cgi.server_port(); - target = cgi.param("target"); - - # --------------------------------------------------------------------------------- - # All of the css files we might need - # --------------------------------------------------------------------------------- - link(rel="stylesheet", href="/css/opac_main.css", type="text/css"); - link(rel="stylesheet", href="/css/record_result.css", type="text/css"); - link(rel="stylesheet", href="/css/adv_search.css", type="text/css"); - link(rel="stylesheet", href="/css/search_bar.css", type="text/css"); - - js( content=' - var static = parent.static_window; - static.globalPageTarget = "' _ target _ '"; - - if(!static.globalPageTarget) - static.globalPageTarget = "start"; - - function pageInit() { - while(!static.globalInit){alert("hi");} - alert(static.globalPageTarget); - static.globalInit(); - } - - - ' - - ); - -%] - -[%# - - # --------------------------------------------------------------------------------- - # All the javascript files we migh need - # --------------------------------------------------------------------------------- - - INCLUDE opac/pages/chunks/cgi_js_params.ttk; - - IF ! target; target = "start"; END; - - js( content = ' - var globalPageTarget = "' _ target _ '"; - var globalRootURL = "' _ url _ '"; - var globalPort = "' _ port _ '"; - var globalRootPath = "/opac/"; - '); - - # --------------------------------------------------------------------------------- - # Utility files - # --------------------------------------------------------------------------------- - js(src="/js/util/fieldmapper.js"); - js(src="/js/util/JSON.js"); - js(src="/js/util/RemoteRequest.js"); - js(src="/js/util/UserSession.js"); - js(src="/js/util/md5.js"); - js(src="/js/util/webutils.js"); - js(src="/js/util/ex.js"); - - - # --------------------------------------------------------------------------------- - # Chunks - # --------------------------------------------------------------------------------- - js(src="/js/opac/SearchBarFormChunk.js"); - js(src="/js/opac/SearchBarChunk.js"); - js(src="/js/opac/HTMLChunks.js"); - - - # --------------------------------------------------------------------------------- - # Pages - # --------------------------------------------------------------------------------- - js(src="/js/opac/XULEvents.js"); - js(src="/js/opac/Page.js"); - - js(src="/js/opac/AbstractRecordResultPage.js"); - js(src="/js/opac/MRResultPage.js"); - js(src="/js/opac/RecordResultPage.js"); - - js(src="/js/opac/LoginPage.js"); - js(src="/js/opac/LogoutPage.js"); - js(src="/js/opac/AboutPage.js"); - js(src="/js/opac/AdvancedSearchPage.js"); - js(src="/js/opac/MyOPACPage.js"); - js(src="/js/opac/OPACStartPage.js"); - - js(src="/js/opac/GlobalInit.js"); - - -%] - - diff --git a/Open-ILS/src/templates/opac/pages/chunks/init.ttk b/Open-ILS/src/templates/opac/pages/chunks/init.ttk deleted file mode 100644 index e66edb10b1..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/init.ttk +++ /dev/null @@ -1,96 +0,0 @@ -[% - url = cgi.server_name(); - port = cgi.server_port(); - target = cgi.param("target"); - ssl = cgi.https; - - IF !target; target = "start"; END; - - # --------------------------------------------------------------------------------- - # push the cgi params into the javascript - # --------------------------------------------------------------------------------- - #js( src='/js/util/webutils.js' ); - - IF cgi.param("no_frame"); - PROCESS opac/pages/chunks/javascript.ttk; - INCLUDE ALL_JS; - END; - - WRAPPER html/js; - ' - if(!parent || !parent.frames["appframe"]) { - /* redirect to the outer frame */ - location.href = location.href + "&sub_frame=1"; - } - - logicNode = parent; - logicNode.paramObj = new Object(); - '; - FOR pname IN cgi.param(); - param = cgi.param(pname).replace("\"","\\\""); - 'logicNode.paramObj["__' _ pname _ '"] = decodeURIComponent("'; param; '");'; "\n"; - END; - END; - - - # --------------------------------------------------------------------------------- - # Load up the necessary global variables - # --------------------------------------------------------------------------------- - WRAPPER html/js; - ' - var globalPage; - var globalAppFrame; - var webFXTreeHandler = logicNode.webFXTreeHandler; - - function pageInit() { - - if(logicNode) { /* defined above */ - - if(logicNode.paramObj["__no_frame"]) - logicNode.globalAppFrame = logicNode; - else - logicNode.globalAppFrame = logicNode.frames["appframe"]; - - if(logicNode.globalAppFrame) { - logicNode.globalRootURL = "' _ url _ '"; - logicNode.globalRootPath = "/opac/"; - logicNode.globalPort = "' _ port _ '"; - logicNode.globalPageTarget = "' _ target _ '"; - logicNode.isSSL = "' _ ssl _ '"; - logicNode.globalInit(); - } else { - alert("logicNode.globalAppFrame is undefined. Why?"); - } - } else { - alert("Something is really broken. No logicNode"); - } - - globalAppFrame = window; - globalPage = logicNode.globalPage; - //setDeepLink(); - } - - function setDeepLink() { - var node = document.getElementById("deep_link_div"); - if(node) { - var org = logicNode.globalSelectedLocation; - if(org == null) - org = logicNode.globalLocation; - org = org.id(); - - var depth = logicNode.globalSearchDepth; - - var a = document.createElement("a"); - a.setAttribute("href", location.href + - "&sub_frame=1&location=" + org + "&depth=" + depth); - - a.setAttribute("target", "_blank"); - a.appendChild(document.createTextNode("Link to this page")); - node.appendChild(a); - } - } - '; - END; - -%] - diff --git a/Open-ILS/src/templates/opac/pages/chunks/javascript.ttk b/Open-ILS/src/templates/opac/pages/chunks/javascript.ttk deleted file mode 100644 index 73e1e337db..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/javascript.ttk +++ /dev/null @@ -1,94 +0,0 @@ -[% - - util_batch = [ - "js/util/md5.js", - "js/util/webutils.js", - "js/util/Cookie.js", - "js/util/browser.js", - ]; - - ils_batch = [ - "js/util/web_fieldmapper.js", - "js/util/ils_utils.js", - "js/util/RemoteRequest.js" - "js/util/ex.js", - "js/util/UserSession.js", - ]; - - widget_batch = [ - "js/widgets/xtree.js", - "js/widgets/menu/ContextMenu.js", - "js/widgets/menu/ContextMenuManager.js", - "js/widgets/ProgressBar.js", - "js/widgets/Box.js", - "js/widgets/ListBox.js", - "js/widgets/SideBar.js", - "js/widgets/Survey.js", - "js/opac/HoldsWindow.js", - "js/opac/LoginDialog.js", - "js/widgets/PopupBox.js", - ]; - - page_batch = [ - "js/opac/Page.js", - "js/opac/GlobalInit.js", - "js/opac/SearchBarFormChunk.js", - "js/opac/SearchBarChunk.js", - "js/opac/LocationTree.js", - - "js/opac/OPACStartPage.js", - "js/opac/LoginPage.js", - "js/opac/AbstractRecordResultPage.js", - "js/opac/MRResultPage.js", - "js/opac/RecordResultPage.js", - "js/opac/RecordDetailPage.js", - "js/opac/LogoutPage.js", - "js/opac/AboutPage.js", - "js/opac/AdvancedSearchPage.js", - "js/opac/MyOPACPage.js", - - "js/opac/AddedContent.js", - ]; - - -%] - -[% BLOCK FASTJS; - ""; - END; -%] - -[% BLOCK JS; - FOR file IN batch; - ""; - END; - END; -%] - -[% BLOCK ALL_JS %] - - - [% - IF 0; #cgi.user_agent("MSIE"); - INCLUDE FASTJS batch=ils_batch; - INCLUDE FASTJS batch=util_batch; - INCLUDE FASTJS batch=widget_batch; - INCLUDE FASTJS batch=page_batch; - - ELSE; - INCLUDE JS batch=util_batch; - INCLUDE JS batch=ils_batch; - INCLUDE JS batch=widget_batch; - INCLUDE JS batch=page_batch; - END; - %] - - - -[% END; %] - diff --git a/Open-ILS/src/templates/opac/pages/chunks/next_prev_box.ttk b/Open-ILS/src/templates/opac/pages/chunks/next_prev_box.ttk deleted file mode 100644 index adae481774..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/next_prev_box.ttk +++ /dev/null @@ -1,18 +0,0 @@ -[% - - WRAPPER html/div class='record_next_prev_links_box' id="record_next_prev_links_box_$count"; - - WRAPPER html/div class='record_prev_button hide_me' id="record_prev_button_$count"; - anchor(text="Prev", href="javascript:globalPage.prev()"); - END; - - box(id='space_link'); - - WRAPPER html/div class='record_next_button hide_me' id="record_next_button_$count"; - anchor(text="Next", href="javascript:globalPage.next()"); - END; - - END; - - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/opac_search_bar.ttk b/Open-ILS/src/templates/opac/pages/chunks/opac_search_bar.ttk deleted file mode 100644 index 56ddf307b1..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/opac_search_bar.ttk +++ /dev/null @@ -1,105 +0,0 @@ -[% - # --------------------------------------------------------------------------------- - # OPAC Search bar that appears at the top of each page - # Submission of the search calls the 'mr_basic_search()' function which expects a - # table called 'mr_results_table' to be available for population. - # - # if the 'js_only' variable is set to true, then the search form will do all of - # the work locally (javascript) instead of reloading the current page - # --------------------------------------------------------------------------------- - - # grab the textmap info for this page - tm = global.textmap.opac.search_bar; - - WRAPPER html/div id='opac_search_bar_box'; - - WRAPPER html/table border='0' width='100%'; - WRAPPER html/row; - - WRAPPER html/cell nowrap='nowrap' valign='middle' align='left'; - INCLUDE opac/pages/chunks/search_bar_form.ttk; - END; - - %] - - - [% - - - WRAPPER html/cell nowrap='nowrap'; - WRAPPER html/span; - space(3); - "Expand search to "; - space(1); - - WRAPPER html/select - name='search_range_select' - id='search_range_select' - onchange='logicNode.globalSearchDepth = this.options[this.selectedIndex].value;'; - END; - END; - END; - %] - - - - [%# ------- - - WRAPPER html/cell align='center'; - - WRAPPER html/div class='text_link_div' id='login_div'; - anchor( id='login_link', href='?target=login', text = tm.login ); - END; - - WRAPPER html/div style="display:none;visibility:hidden" class='text_link_div' id='logout_div'; - anchor( id='logout_link', href='?target=logout', text = tm.logout ); - END; - - END; - - WRAPPER html/cell align='center'; - WRAPPER html/div class="text_link_div" id='adv_search_link_div'; - anchor( id='adv_search_link', href='?target=advanced_search', text = tm.advanced ); - END; - END; - - - WRAPPER html/cell align='center'; - WRAPPER html/div class='text_link_div' id='my_opac_link_div'; - anchor( id='my_opac_link', href='?target=my_opac', text = tm.my_opac ); - END; - END; - - - WRAPPER html/cell align='center'; - WRAPPER html/div class='text_link_div' id='about_link_div'; - anchor( id='about_link', href='?target=about', text = tm.about ); - END; - END; - - %] - - - - [% - - WRAPPER html/cell valign='bottom' align='right'; - WRAPPER html/div id='small_logo_div'; - WRAPPER html/anchor href=global.config.root_url; - img(src = "/images/small_logo.jpg", title="Home", border="0", width='30', height='30'); - END; # - anchor - END; # - div - END; # - cell - - cell( content = space(2) ); - - END; # - row - END; # - table - END; # - div - -%] - - - - - diff --git a/Open-ILS/src/templates/opac/pages/chunks/org_tree.ttk b/Open-ILS/src/templates/opac/pages/chunks/org_tree.ttk deleted file mode 100644 index fc21d135b7..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/org_tree.ttk +++ /dev/null @@ -1,34 +0,0 @@ -[% - - WRAPPER html/div id='ot_wrapper_box' class='nav_wrapper_box'; - - WRAPPER html/div id='ot_nav_widget' class='nav_widget hide_me' ; - - WRAPPER html/div class='expando_links'; - lines(1); - END; - - WRAPPER html/div class='expando_links'; - - anchor(text="Expand All", onclick="globalPage.locationTree.widget.expandAll();"); - space(3); - anchor(text="Collapse All", - onclick=" - globalPage.locationTree.widget.collapseAll(); - globalPage.locationTree.widget.expand(); - "); - space(3); - - END; - - lines(1); - - WRAPPER html/div class='ot_nav_widget_box' id='ot_nav_widget_box'; - "Loading Tree..."; - END; - - END; - - END; - -%] diff --git a/Open-ILS/src/templates/opac/pages/chunks/search_bar_form.ttk b/Open-ILS/src/templates/opac/pages/chunks/search_bar_form.ttk deleted file mode 100644 index b6ffbdbb69..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/search_bar_form.ttk +++ /dev/null @@ -1,61 +0,0 @@ -[% - WRAPPER html/div id='search_bar_form'; - - # our text map - tm = global.textmap.opac.search_bar; - - space(2); - input( type='hidden', name='target', value='mr_result'); - input( type='hidden', name='page', value='0'); - - input(id='mr_search_query', name='mr_search_query', - type='textarea', size='28'); - - space(1); - - WRAPPER html/select name='mr_search_type' id='mr_search_type'; - option(value='title', selected='selected', content=tm.title); - option(value='author', content=tm.author); - option(value='subject', content=tm.subject); - option(value='keyword', content=tm.keyword); - option(value='series', content="Series"); - END; - - WRAPPER html/select name='format' id='mr_search_format'; - option(value='all', selected='selected', content="All Formats"); - option(value='at', content="Books"); - option(value='at-d', content="Large Print Books"); - option(value='i', content="Audiobooks"); - option(value='g', content="Video Recording"); - option(value='j', content="Music"); - option(value='m', content="Electronic Resources"); - END; - - - space(1); - - input(type='submit', id='mr_search_button', - value=tm.search, onclick='alert("help");' ); - - space(1); - %] - - [% - "Hits per page "; - WRAPPER html/select name='hits_per_page' id='hits_per_page'; - option(value='5', content="5"); - option(value='10', selected='selected', content="10"); - option(value='15', content="15"); - option(value='25', content="25"); - option(value='50', content="50"); - END; - %] - - - - - [% - END; - -%] - diff --git a/Open-ILS/src/templates/opac/pages/chunks/sidebar.ttk b/Open-ILS/src/templates/opac/pages/chunks/sidebar.ttk deleted file mode 100644 index 3ef3006306..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/sidebar.ttk +++ /dev/null @@ -1,7 +0,0 @@ -[% - WRAPPER html/div class='sidebar_box'; - box(id="record_" _ type _ "_sidebar_box_label", class="sidebar_label hide_me", content = label ); - box(id="record_" _ type _ "_sidebar_box", class="record_sidebar_content_box hide_me"); - END; -%] - diff --git a/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk b/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk deleted file mode 100644 index 4ee1be44e4..0000000000 --- a/Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk +++ /dev/null @@ -1,49 +0,0 @@ -[% - WRAPPER html/div; - - - WRAPPER html/table + html/row id='top_status_bar' class='status_bar'; - - #cell(id='now_searching_cell', class='now_searching_cell'); - - #WRAPPER html/cell class='search_range_cell' nowrap='nowrap'; - - - - %] - [%# - WRAPPER html/span; - space(3); - "Expand search to "; - space(1); - - WRAPPER html/select - name='search_range_select' - id='search_range_select' - onchange='logicNode.globalSearchDepth = this.options[this.selectedIndex].value;'; - END; - END; - %] - - - [%# - - input( type='submit', value="Location", id='location_select_button' - onclick=' - var evt = event; - evt = (evt) ? evt : ((window.event) ? event : null); - var target = (evt.target) ? evt.target : evt.srcElement; - if(evt) - globalPage.locationTree.toggle(target);' - ); - %] - - [% - - - -# END; - - END; - END; -%] diff --git a/Open-ILS/src/templates/opac/pages/error.ttk b/Open-ILS/src/templates/opac/pages/error.ttk deleted file mode 100644 index 9d31c19e53..0000000000 --- a/Open-ILS/src/templates/opac/pages/error.ttk +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - Evergreen Error - - -

    AHHHHHHHHHHH!!!!!!!!!!!

    -

    AHHHHHHHHHHH!!!!!!!!!!!

    -

    AHHHHHHHHHHH!!!!!!!!!!!

    -

    AHHHHHHHHHHH!!!!!!!!!!!

    -

    AHHHHHHHHHHH!!!!!!!!!!!

    -
    -
    -

    [%error%]

    - - diff --git a/Open-ILS/src/templates/opac/pages/login.ttk b/Open-ILS/src/templates/opac/pages/login.ttk deleted file mode 100644 index d5632f8255..0000000000 --- a/Open-ILS/src/templates/opac/pages/login.ttk +++ /dev/null @@ -1,89 +0,0 @@ - -[% - tm = global.textmap.opac.login; - - WRAPPER html/html; - - WRAPPER html/head title=tm.basic_search.page_title; - INCLUDE opac/pages/chunks/css_includes.ttk; - END; - - WRAPPER html/body onload=' - pageInit(); - globalPage.session.exp_days = "' _ global.config.session_timeout _ '"; - globalPage.login_success_msg = "' _ tm.success _ '"; - globalPage.login_failure_msg = "' _ tm.failure _ '"; - document.getElementById("login_username").focus(); - '; - - # here, this just provides the color backdrop for the search bar - INCLUDE opac/pages/chunks/body_header.ttk hide_hits_per='1'; - - lines(3); - - WRAPPER html/center; - - WRAPPER html/table width='100%'; - - - WRAPPER html/row; - cell(width='42%', align='right', content = "Username"); - cell(width='3%'); - cell(width='55%', align='left', - content = input( type='textarea', id='login_username', name='username', size='16' )); - END; - - row(content = cell(colspan='3', content = lines(2))); - - WRAPPER html/row; - cell(width='42%', align='right', content = "Password"); - cell( width='3%'); - cell(width='55%', align='left', - content = input( type='password', id='login_password', name='password', size='16' )); - END; - END; - - lines(1); - - WRAPPER html/table id='login_result' width='100%'; - WRAPPER html/row; - WRAPPER html/cell align='center'; - input( type='submit', id='login_button', value=tm.login ); # xxx Login - END; - - row(content = cell(content = lines(2))); - row(content = cell( width='100%', align='center', id = 'login_result_text')); - - END; - - END; # - table - END; # - center - - %] - - - - - [% - - - - END; # - body - END; # - html - -%] - - - - - diff --git a/Open-ILS/src/templates/opac/pages/logout.ttk b/Open-ILS/src/templates/opac/pages/logout.ttk deleted file mode 100644 index c26d2e1f88..0000000000 --- a/Open-ILS/src/templates/opac/pages/logout.ttk +++ /dev/null @@ -1,36 +0,0 @@ - -[% - tm = global.textmap.opac.login; - - WRAPPER html/html; - - WRAPPER html/head title=tm.basic_search.page_title; - INCLUDE opac/pages/chunks/css_includes.ttk; - END; - - WRAPPER html/body onload=' - pageInit(); - globalPage.logout_success_msg = "' _ tm.logout_success _ '"; - globalPage.doLogout(); - '; - - INCLUDE opac/pages/chunks/body_header.ttk hide_hits_per='1'; - - lines(3); - - WRAPPER html/center; - WRAPPER html/table width='100%'; - WRAPPER html/row; - cell(align='middle', id='logout_msg'); - END; - END; - END; # - center - END; # - body - END; # - html - -%] - - - - - diff --git a/Open-ILS/src/templates/opac/pages/main.ttk b/Open-ILS/src/templates/opac/pages/main.ttk deleted file mode 100644 index 7ed0744b33..0000000000 --- a/Open-ILS/src/templates/opac/pages/main.ttk +++ /dev/null @@ -1,57 +0,0 @@ -[% PROCESS opac/pages/chunks/javascript.ttk %] -[%# PROCESS gives us the blocks defined in javascript.ttk %] - - - - Evergreen - - [% INCLUDE ALL_JS; %] - - [% - top_target = cgi.param("top_target"); - sub_frame = cgi.param("sub_frame"); - location = cgi.param("location"); - %] - - - - - - - - - - - - - diff --git a/Open-ILS/src/templates/opac/pages/my_opac.ttk b/Open-ILS/src/templates/opac/pages/my_opac.ttk deleted file mode 100644 index 5fecfbfb19..0000000000 --- a/Open-ILS/src/templates/opac/pages/my_opac.ttk +++ /dev/null @@ -1,42 +0,0 @@ - -[% - tm = global.textmap.opac; - - WRAPPER html/html; - - WRAPPER html/head title=tm.basic_search.page_title; - INCLUDE opac/pages/chunks/css_includes.ttk; - - WRAPPER html/js; - ' - if(!logicNode.UserSession.instance().verifySession()) { - location.href="/opac/?target=login"; - } - '; - END; - END; - - WRAPPER html/body onload='pageInit(); globalPage.redirect()'; - INCLUDE opac/pages/chunks/body_header.ttk hide_hits_per=1; - - WRAPPER html/iframe - frameborder = '0' - style = 'border:none; overflow:auto' - scrolling = 'yes' - width = '100%' - #height = '500' - height = '90%' - name = 'my_oac_iframe' - #src = 'https://gapines.org/opac/?target=my_opac_secure' - id = 'my_opac_iframe'; - END; - - END; # - body - END; # - html - -%] - - - - - diff --git a/Open-ILS/src/templates/opac/pages/my_opac_secure.ttk b/Open-ILS/src/templates/opac/pages/my_opac_secure.ttk deleted file mode 100644 index 72d8910d90..0000000000 --- a/Open-ILS/src/templates/opac/pages/my_opac_secure.ttk +++ /dev/null @@ -1,107 +0,0 @@ -[% - url = cgi.server_name(); - port = cgi.server_port(); - - WRAPPER html/html; - - WRAPPER html/head title="My OPAC"; - link(rel="stylesheet", href="/css/my_opac.css" type="text/css"); - link(rel="stylesheet", href="/css/box.css" type="text/css"); - link(rel="stylesheet", href="/css/opac_main.css" type="text/css"); - - js( src='http://gapines.org/js/util/JSON.js' ); - js( src='http://gapines.org/js/opac/Page.js' ); - js( src='http://gapines.org/js/opac/MyOPACSPage.js' ); - js( src='http://gapines.org/js/opac/LoginDialog.js' ); - js( src='http://gapines.org/js/util/RemoteRequest.js' ); - js( src='http://gapines.org/js/util/webutils.js' ); - js( src='http://gapines.org/js/util/ils_utils.js' ); - js( src='http://gapines.org/js/util/UserSession.js' ); - js( src='http://gapines.org/js/util/Cookie.js' ); - js( src='http://gapines.org/js/util/ex.js' ); - js( src='http://gapines.org/js/widgets/Box.js' ); - js( src='http://gapines.org/js/util/web_fieldmapper.js' ); - js( src='http://gapines.org/js/util/browser.js' ); - js( src='http://gapines.org/js/widgets/PopupBox.js' ); - - WRAPPER html/js; - ' - var globalSelectedLocation = null; - var globalLocation = null; - var globalSearchDepth = null; - - var globalAppFrame = window; - var globalPage = new MyOPACSPage(); - var globalRootURL = "' _ url _ '"; - var globalRootPath = "/opac/"; - var globalPort = "' _ port _ '"; - '; - END; - - - END; - - - WRAPPER html/body class='no_border_body' onload='globalPage.init();'; - - WRAPPER html/table width="100%"; - - WRAPPER html/row; - - WRAPPER html/cell width="70%"; - WRAPPER html/box id='my_opac_nav_bar'; - WRAPPER html/center; - WRAPPER html/table id='my_opac_nav_table'; - WRAPPER html/row; - cell(class='my_opac_link_cell', width="25%", id='my_opac_checked', - content=anchor(id='my_opac_checked_link', - text="Checked Out", href="javascript:void(0);")); - - cell(class='my_opac_link_cell', width="25%", id='my_opac_holds', - content=anchor(id='my_opac_holds_link', - text="Holds", href="javascript:void(0);")); - - cell(class='my_opac_link_cell', width="25%", id='my_opac_profile', - content=anchor(id='my_opac_profile_link', - text="My Profile", href="javascript:void(0);")); - - cell(class='my_opac_link_cell', width="25%", id='my_opac_fines', - content=anchor(id='my_opac_fines_link', - text="Fines", href="javascript:void(0);")); - END; - END; - END; - END; - END; # cell - - WRAPPER html/cell; - box(id='main_page_nav_box', class='nav_box_box'); - END; - - END; #row - END; # table - - - - lines(1); - - WRAPPER html/box id='my_opac_info_pane'; - WRAPPER html/center; - WRAPPER html/table id='my_opac_info_table' width="80%"; - END; - END; - END; - - WRAPPER html/box id='my_opac_main_box'; - box(id='my_opac_edit_personal'); - box(id='my_opac_checked_out'); - END; - - END; # - body - END; # - html -%] - - - - - diff --git a/Open-ILS/src/templates/opac/pages/opac_start.ttk b/Open-ILS/src/templates/opac/pages/opac_start.ttk deleted file mode 100644 index 259f966cd5..0000000000 --- a/Open-ILS/src/templates/opac/pages/opac_start.ttk +++ /dev/null @@ -1,136 +0,0 @@ - -[% - WRAPPER html/html; - - - WRAPPER html/head title='Evergreen'; - INCLUDE opac/pages/chunks/css_includes.ttk; - #""; - END; - - - WRAPPER html/body id='body' onload='pageInit();'; - - WRAPPER html/center; - lines(2); - img( src='/images/main_logo.jpg'); - lines(4); - PROCESS front_search; - END; - INCLUDE opac/pages/chunks/org_tree.ttk; - - END; - END; - - # --------------------------------------------------------------------------- - # main search form - # --------------------------------------------------------------------------- - BLOCK front_search; - - WRAPPER html/div id='front_search_form'; - - span(id='now_searching_cell', class='front_now_searching'); - - lines(3); - - input( type='hidden', name='target', value='mr_result'); - input( type='hidden', name='page', value='0'); - - input(id='mr_search_query', name='mr_search_query', - type='textarea', size='54' ); -#onkeydown='logicNode.mrSearchSubmitOnEnter(event); event.preventDefault = true; event.cancelBubble=true;'); # overwite this onkeydown if !IE XXX - - #space(1); - lines(2); - PROCESS stype_selector; - space(2); - PROCESS location_input; - space(2); - PROCESS search_range; - - lines(2); - input(type='submit', id='mr_search_button', - value="Search", onclick='alert("help");' ); - - - space(3); - - space(3); - - lines(3); - anchor( id='login_link', href='?target=my_opac', text = "My OPAC" ); - space(3); - anchor( id='adv_search_link', href='?target=advanced_search', text = "Advanced Search" ); - - END; - END; - - - # --------------------------------------------------------------------------- - # search type - # --------------------------------------------------------------------------- - BLOCK stype_selector; - WRAPPER html/select name='mr_search_type' id='mr_search_type'; - option(value='title', selected='selected', content="Title"); - option(value='author', content='Author'); - option(value='subject', content='Subject'); - option(value='keyword', content='Keyword'); - option(value='series', content='Series'); - END; - - space(2); - WRAPPER html/select name='format' id='mr_search_format'; - option(value='all', selected='selected', content="All Formats"); - option(value='at', content="Books"); - option(value='at-d', content="Large Print Books"); - option(value='i', content="Audiobooks"); - option(value='g', content="Video Recording"); - option(value='j', content="Music"); - option(value='m', content="Electronic Resources"); - END; - - END; - - - - # --------------------------------------------------------------------------- - # location button - # --------------------------------------------------------------------------- - BLOCK location_input; - input( type='submit', name='tree_button', value="Location", id='location_select_button'); - END; - - - # --------------------------------------------------------------------------- - # search range - # --------------------------------------------------------------------------- - BLOCK search_range; - WRAPPER html/span; - "Expand search to "; - space(2); - WRAPPER html/select - name='search_range_select' - id='search_range_select' - onchange='logicNode.globalSearchDepth = this.options[this.selectedIndex].value;'; - END; - END; - END; - -%] - - - - - - - - - diff --git a/Open-ILS/src/templates/opac/pages/record_detail.ttk b/Open-ILS/src/templates/opac/pages/record_detail.ttk deleted file mode 100644 index 320d58d137..0000000000 --- a/Open-ILS/src/templates/opac/pages/record_detail.ttk +++ /dev/null @@ -1,116 +0,0 @@ -[% - - # --------------------------------------------------------------------------------- - # This page will display a list of metarecord search results - # --------------------------------------------------------------------------------- - tm = global.textmap.opac.mr_result; - - WRAPPER html/html; - - WRAPPER html/head title="Record Detail Page"; - INCLUDE opac/pages/chunks/css_includes.ttk; - END; - - - - WRAPPER html/body onload='pageInit();'; - - INCLUDE opac/pages/chunks/body_header.ttk hide_hits_per=1; - #WRAPPER html/div id='page_trail';END; - - # --------------------------------------------------------------------------------- - # Display record detail info - # --------------------------------------------------------------------------------- - - WRAPPER html/box id='record_detail_main_box'; - - WRAPPER html/box id='detail_items_div'; - - WRAPPER html/table width="100%"; - WRAPPER html/row; - WRAPPER html/cell width="70%"; - WRAPPER html/table id='record_detail_table'; - - WRAPPER html/row; - cell(content="Record Details", nowrap='nowrap', class="detail_header_cell"); - cell(id='record_detail_view_marc', class="detail_header_cell"); - cell(id='record_detail_pic_cell', rowspan='10'); - END; - - - WRAPPER html/row class='detail_item_row'; - cell(content="Title", nowrap='nowrap', class='detail_item_label'); - cell(id='record_detail_title_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Author", class='detail_item_label'); - cell(id='record_detail_author_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="ISBN", class='detail_item_label'); - cell(id='record_detail_isbn_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Edition", class='detail_item_label'); - cell(id='record_detail_edition_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Publication Date", class='detail_item_label'); - cell(id='record_detail_pubdate_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Publisher", class='detail_item_label'); - cell(id='record_detail_publisher_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Title Control Number", nowrap='nowrap', class='detail_item_label'); - cell(id='record_detail_tcn_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Type of Resource", class='detail_item_label'); - cell(id='record_detail_resource_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Subjects", class='detail_item_label'); - cell(id='record_detail_subject_cell'); - END; - - WRAPPER html/row class='detail_item_row'; - cell(content="Abstract", class='detail_item_label'); - cell(id='record_detail_abstract_cell'); - END; - - END; # table - END; - - WRAPPER html/cell valign='top' width="30%"; - box(id='main_page_nav_box', style="width:200px; float:right;"); - END; - - END; #row - END; # table - - END; # detail_items_div - - - END; - - lines(1); - box(id='record_detail_copy_info'); - - - INCLUDE opac/pages/chunks/org_tree.ttk; - END; # body - - END; # html - -%] - diff --git a/Open-ILS/src/templates/opac/pages/record_result.ttk b/Open-ILS/src/templates/opac/pages/record_result.ttk deleted file mode 100644 index 702430d360..0000000000 --- a/Open-ILS/src/templates/opac/pages/record_result.ttk +++ /dev/null @@ -1,73 +0,0 @@ -[% - - # --------------------------------------------------------------------------------- - # This page will display a list of metarecord search results - # --------------------------------------------------------------------------------- - tm = global.textmap.opac.mr_result; - - WRAPPER html/html; - - WRAPPER html/head title="Record Result Page"; - INCLUDE opac/pages/chunks/css_includes.ttk; - END; - - - - WRAPPER html/body onload='pageInit(); globalPage.doSearch();'; - - INCLUDE opac/pages/chunks/body_header.ttk; - - #WRAPPER html/div id='page_trail';END; - - - # --------------------------------------------------------------------------------- - # search results are spit out into this table - # --------------------------------------------------------------------------------- - box(id="did_you_mean_box", style="margin-left:20px;width:100%;text-align:left"); - - WRAPPER html/table class='big_ol_box' id='big_ol_box'; - - - WRAPPER html/row; - - WRAPPER html/cell class='record_result_cell'; - WRAPPER html/table class='record_result_box', id='record_result_box'; - WRAPPER html/thead class='record_result_thead'; - WRAPPER html/row id='record_result_thead_row'; - cell(nowrap='nowrap', colspan='2', - #content="Title / Author", class='record_box_descriptor' ); - content=" ", class='record_box_descriptor' ); - END; - END; - END; - - END; - - - WRAPPER html/cell class='record_sidebar_cell' id='record_sidebar_cell' valign="top"; - box( id='record_sidebar_box' ); - END; - - END; - - WRAPPER html/row id='hourglass_row'; - cell(style="text-align:center", content=img(src="http://www.filleacgil.it/Animate/book_b.gif")); - #cell(style="text-align:center", content=img(src="/images/computer.gif")); - END; - - - END; - - lines(2); - WRAPPER html/div class='hit_count_cell' id='hit_count_cell_2'; - END; - lines(1); - - INCLUDE opac/pages/chunks/org_tree.ttk; - - END; # body - - END; # html - -%] - diff --git a/Open-ILS/src/webxml/advanced.xml b/Open-ILS/src/webxml/advanced.xml deleted file mode 100644 index 860d27ab78..0000000000 --- a/Open-ILS/src/webxml/advanced.xml +++ /dev/null @@ -1,23 +0,0 @@ - - %ent; ] > - - - - - - - Evergreen: Advanced Search - - - - - - -
    - -
    Advanced Search Goes Here
    -
    - - - diff --git a/Open-ILS/src/webxml/altcanvas.xml b/Open-ILS/src/webxml/altcanvas.xml deleted file mode 100644 index 60bd607b9b..0000000000 --- a/Open-ILS/src/webxml/altcanvas.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - -
    - - - - - - - -
    diff --git a/Open-ILS/src/webxml/css_common.xml b/Open-ILS/src/webxml/css_common.xml deleted file mode 100644 index b7fd153953..0000000000 --- a/Open-ILS/src/webxml/css_common.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/Open-ILS/src/webxml/header.xml b/Open-ILS/src/webxml/header.xml deleted file mode 100644 index 2e48e0eb7a..0000000000 --- a/Open-ILS/src/webxml/header.xml +++ /dev/null @@ -1,8 +0,0 @@ - - -
    - - -
    - -
    diff --git a/Open-ILS/src/webxml/index.xml b/Open-ILS/src/webxml/index.xml deleted file mode 100644 index 5b81359017..0000000000 --- a/Open-ILS/src/webxml/index.xml +++ /dev/null @@ -1,22 +0,0 @@ - - %ent; ] > - - - - - Evergreen: Home - - - - - - - -
    - -
    Home is here, show something interesting...
    -
    - - - - diff --git a/Open-ILS/src/webxml/js_common.xml b/Open-ILS/src/webxml/js_common.xml deleted file mode 100644 index eb34e28e1c..0000000000 --- a/Open-ILS/src/webxml/js_common.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    - diff --git a/Open-ILS/src/webxml/locale/en-US/lang.dtd b/Open-ILS/src/webxml/locale/en-US/lang.dtd deleted file mode 100644 index 8f7c5f43eb..0000000000 --- a/Open-ILS/src/webxml/locale/en-US/lang.dtd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Open-ILS/src/webxml/login.xml b/Open-ILS/src/webxml/login.xml deleted file mode 100644 index 4bfd039850..0000000000 --- a/Open-ILS/src/webxml/login.xml +++ /dev/null @@ -1,34 +0,0 @@ - - %ent; ] > - - -
    - - - -
    - -
    - - -
    - -
    - -
    - - -
    - -
    - - - -
    - - diff --git a/Open-ILS/src/webxml/logo.xml b/Open-ILS/src/webxml/logo.xml deleted file mode 100644 index f91f396b34..0000000000 --- a/Open-ILS/src/webxml/logo.xml +++ /dev/null @@ -1,8 +0,0 @@ - -
    - - - - - -
    diff --git a/Open-ILS/src/webxml/mresult.xml b/Open-ILS/src/webxml/mresult.xml deleted file mode 100644 index 833ac41b6c..0000000000 --- a/Open-ILS/src/webxml/mresult.xml +++ /dev/null @@ -1,23 +0,0 @@ - - %ent; ] > - - - - - Evergreen: Title Groups - - - - - - - - -
    - - -
    - - - diff --git a/Open-ILS/src/webxml/myopac/index.xml b/Open-ILS/src/webxml/myopac/index.xml deleted file mode 100644 index 24a1522018..0000000000 --- a/Open-ILS/src/webxml/myopac/index.xml +++ /dev/null @@ -1,21 +0,0 @@ - - %ent; ] > - - - - - Evergreen: My OPAC - - - - - - -
    - -
    My OPAC Goes Here
    -
    - - - diff --git a/Open-ILS/src/webxml/rdetail.xml b/Open-ILS/src/webxml/rdetail.xml deleted file mode 100644 index 44bff28b15..0000000000 --- a/Open-ILS/src/webxml/rdetail.xml +++ /dev/null @@ -1,21 +0,0 @@ - - %ent; ] > - - - - - Evergreen: Titles - - - - - - -
    - - -
    - - - diff --git a/Open-ILS/src/webxml/result_common.xml b/Open-ILS/src/webxml/result_common.xml deleted file mode 100644 index cc421ebe23..0000000000 --- a/Open-ILS/src/webxml/result_common.xml +++ /dev/null @@ -1,46 +0,0 @@ - - %ent; ] > - -
    - - - - - - - - - - - - - - - - - - -
    Loading Results...
    - -
    - - diff --git a/Open-ILS/src/webxml/result_table.xml b/Open-ILS/src/webxml/result_table.xml deleted file mode 100644 index 94f3d22846..0000000000 --- a/Open-ILS/src/webxml/result_table.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - -
    - - - -
    -
    -
    - - diff --git a/Open-ILS/src/webxml/rresult.xml b/Open-ILS/src/webxml/rresult.xml deleted file mode 100644 index 9b05ab4e55..0000000000 --- a/Open-ILS/src/webxml/rresult.xml +++ /dev/null @@ -1,23 +0,0 @@ - - %ent; ] > - - - - - Evergreen: Titles - - - - - - - - -
    - - -
    - - - diff --git a/Open-ILS/src/webxml/searchbar.xml b/Open-ILS/src/webxml/searchbar.xml deleted file mode 100644 index 78c68ea86f..0000000000 --- a/Open-ILS/src/webxml/searchbar.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - diff --git a/Open-ILS/src/webxml/sidebar.xml b/Open-ILS/src/webxml/sidebar.xml deleted file mode 100644 index 1e351fc8ac..0000000000 --- a/Open-ILS/src/webxml/sidebar.xml +++ /dev/null @@ -1,77 +0,0 @@ - - %ent; ] > - - - - - diff --git a/Open-ILS/src/webxml/webprefs.xml b/Open-ILS/src/webxml/webprefs.xml deleted file mode 100644 index cfce5c991c..0000000000 --- a/Open-ILS/src/webxml/webprefs.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - Evergreen: Web Preferences - - - - - - - -
    - - -
    - Browser display preferences -
    - - - - -- 2.43.2