[open-ils-commits] r686 - in conifer/trunk/web/opac/skin: . uwin uwin/css uwin/js uwin/local uwin/local/images uwin/local/locale uwin/local/locale/en-CA uwin/local/xml uwin/xml uwin/xml/advanced uwin/xml/common uwin/xml/home uwin/xml/myopac uwin/xml/rdetail uwin/xml/result (risard)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 29 07:23:10 EDT 2009
Author: risard
Date: 2009-09-29 07:23:09 -0400 (Tue, 29 Sep 2009)
New Revision: 686
Added:
conifer/trunk/web/opac/skin/uwin/
conifer/trunk/web/opac/skin/uwin/css/
conifer/trunk/web/opac/skin/uwin/css/colors.css
conifer/trunk/web/opac/skin/uwin/css/layout.css
conifer/trunk/web/opac/skin/uwin/js/
conifer/trunk/web/opac/skin/uwin/js/adv_global.js
conifer/trunk/web/opac/skin/uwin/js/advanced.js
conifer/trunk/web/opac/skin/uwin/js/cn_browse.js
conifer/trunk/web/opac/skin/uwin/js/container.js
conifer/trunk/web/opac/skin/uwin/js/copy_details.js
conifer/trunk/web/opac/skin/uwin/js/depth_selector.js
conifer/trunk/web/opac/skin/uwin/js/holds.js
conifer/trunk/web/opac/skin/uwin/js/mresult.js
conifer/trunk/web/opac/skin/uwin/js/myopac.js
conifer/trunk/web/opac/skin/uwin/js/rdetail.js
conifer/trunk/web/opac/skin/uwin/js/result_common.js
conifer/trunk/web/opac/skin/uwin/js/rresult.js
conifer/trunk/web/opac/skin/uwin/js/search_bar.js
conifer/trunk/web/opac/skin/uwin/js/sidebar.js
conifer/trunk/web/opac/skin/uwin/js/sidebar_extras.js
conifer/trunk/web/opac/skin/uwin/js/tips.js
conifer/trunk/web/opac/skin/uwin/local/
conifer/trunk/web/opac/skin/uwin/local/images/
conifer/trunk/web/opac/skin/uwin/local/images/uwin_main.png
conifer/trunk/web/opac/skin/uwin/local/images/uwin_small.png
conifer/trunk/web/opac/skin/uwin/local/locale/
conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/
conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac.dtd
conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac_conifer.dtd
conifer/trunk/web/opac/skin/uwin/local/xml/
conifer/trunk/web/opac/skin/uwin/local/xml/item_lang_options.xml
conifer/trunk/web/opac/skin/uwin/xml/
conifer/trunk/web/opac/skin/uwin/xml/advanced/
conifer/trunk/web/opac/skin/uwin/xml/advanced/adv_global_row.xml
conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_global.xml
conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_marc.xml
conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_quick.xml
conifer/trunk/web/opac/skin/uwin/xml/body.xml
conifer/trunk/web/opac/skin/uwin/xml/common/
conifer/trunk/web/opac/skin/uwin/xml/common/altcanvas.xml
conifer/trunk/web/opac/skin/uwin/xml/common/cn_browse.xml
conifer/trunk/web/opac/skin/uwin/xml/common/css_common.xml
conifer/trunk/web/opac/skin/uwin/xml/common/fonts.xml
conifer/trunk/web/opac/skin/uwin/xml/common/format_selector.xml
conifer/trunk/web/opac/skin/uwin/xml/common/holds.xml
conifer/trunk/web/opac/skin/uwin/xml/common/ilsevents.xml
conifer/trunk/web/opac/skin/uwin/xml/common/js_common.xml
conifer/trunk/web/opac/skin/uwin/xml/common/libselect.xml
conifer/trunk/web/opac/skin/uwin/xml/common/login.xml
conifer/trunk/web/opac/skin/uwin/xml/common/logo.xml
conifer/trunk/web/opac/skin/uwin/xml/common/orgtree.xml
conifer/trunk/web/opac/skin/uwin/xml/common/searchbar.xml
conifer/trunk/web/opac/skin/uwin/xml/common/sidebar.xml
conifer/trunk/web/opac/skin/uwin/xml/common/statusbar.xml
conifer/trunk/web/opac/skin/uwin/xml/common/stypes_selector.xml
conifer/trunk/web/opac/skin/uwin/xml/common/tips.xml
conifer/trunk/web/opac/skin/uwin/xml/footer.xml
conifer/trunk/web/opac/skin/uwin/xml/header.xml
conifer/trunk/web/opac/skin/uwin/xml/home/
conifer/trunk/web/opac/skin/uwin/xml/home/homesearch.xml
conifer/trunk/web/opac/skin/uwin/xml/home/index_body.xml
conifer/trunk/web/opac/skin/uwin/xml/html_xsl.xml
conifer/trunk/web/opac/skin/uwin/xml/index.xml
conifer/trunk/web/opac/skin/uwin/xml/myopac/
conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_bookbags.xml
conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_checked.xml
conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_fines.xml
conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_holds.xml
conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_prefs.xml
conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_summary.xml
conifer/trunk/web/opac/skin/uwin/xml/page_advanced.xml
conifer/trunk/web/opac/skin/uwin/xml/page_cnbrowse.xml
conifer/trunk/web/opac/skin/uwin/xml/page_mresult.xml
conifer/trunk/web/opac/skin/uwin/xml/page_myopac.xml
conifer/trunk/web/opac/skin/uwin/xml/page_rdetail.xml
conifer/trunk/web/opac/skin/uwin/xml/page_rresult.xml
conifer/trunk/web/opac/skin/uwin/xml/rdetail/
conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_altcanvas.xml
conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_cn_details.xml
conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_copyinfo.xml
conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_extras.xml
conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
conifer/trunk/web/opac/skin/uwin/xml/result/
conifer/trunk/web/opac/skin/uwin/xml/result/filtersort.xml
conifer/trunk/web/opac/skin/uwin/xml/result/result_common.xml
conifer/trunk/web/opac/skin/uwin/xml/result/result_info.xml
conifer/trunk/web/opac/skin/uwin/xml/result/result_lowhits.xml
conifer/trunk/web/opac/skin/uwin/xml/result/result_table.xml
conifer/trunk/web/opac/skin/uwin/xml/setenv.xml
Log:
At Windsors request moving their production skin into trac. They will use it as starting point to sort out problems with their skin.
Added: conifer/trunk/web/opac/skin/uwin/css/colors.css
===================================================================
--- conifer/trunk/web/opac/skin/uwin/css/colors.css (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/css/colors.css 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,105 @@
+body a { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover { color: red; text-decoration: underline;}
+
+
+/* the idea is to have 4 complimentary colors that
+ * are used throughout the opac. Edit those colors
+ * in this file
+ */
+
+.color_1 { background: #B2BB1E; color: #000000; }
+.color_2 { background: #B2BB1E; color: #000000; }
+.color_3 { background: #EEE; color: #000000; }
+.color_4 { background: #E7E0D5; color: #000000; }
+
+.border_1 { border: 1px solid #005595; }
+.border_2 { border: 1px solid #B2BB1E; }
+.border_3 { border: 1px solid #EEE; }
+.border_4 { border: 1px solid #E7E0D5; }
+
+.border_1_2 { border: 2px solid #B2BB1E; }
+.border_2_2 { border: 2px solid #B2BB1E; }
+.border_3_2 { border: 2px solid #EEE; }
+.border_4_2 { border: 2px solid #E7E0D5; }
+
+.border_1_3 { border: 3px solid #B2BB1E; }
+.border_2_3 { border: 3px solid #B2BB1E; }
+.border_3_3 { border: 3px solid #EEE; }
+.border_4_3 { border: 3px solid #E7E0D5; }
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+/*
+input:focus { background: #EEE; color: #000000;}
+a:focus { background: #E0F0E0; color: #000000;}
+*/
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+ border-left: 3px solid #005595;
+ border-bottom: 3px solid #005595;
+ border-top: 3px solid #005595;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #005595; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #005595; color: #EEE; }
+.sidebar_item_active a { background: #005595; color: #EEE; }
+.sidebar_item_active a:hover { background: #005595; color: #EEE; text-decoration: none; }
+/* #advanced_link { background: #005595; color: #EEE; } */
+#sidebar_results_wrapper { border-right: 0; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #CCC; }
+.rdetail_item { border: 1px solid #CCC; }
+.rdetails_extra_links { border: 1px solid #CCC; }
+.rdetail_extras_td { border: 1px solid #CCC; }
+.rdetail_extras_selected { background: #B2BB1E;}
+.rdetail_extras_selected a:hover { color: #FF0;}
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #CCC;}
+
+
+.data_grid thead tr { background: #E7E0D5; color: #000000; }
+.data_grid thead td { border: 1px solid #CCC; }
+.data_grid tbody td { border: 1px solid #CCC; }
+.data_grid_nb thead tr { background: #CCC; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+.copy_count_cell { border-right: 1px solid #CCC; }
+.copy_count_div { border-left: 2px solid #CCC; border-right: 2px solid #CCC; }
+
+.light_border { border: 1px solid #CCC; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #CCC;}
+
+.myopac_link_active { background: #B2BB1E; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; }
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; }
+.result_table_subtable { border-top: 1px solid #E0E0E0; }
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0E0; }
+
+.invalid_field { border: 3px solid red; }
+
+#lib_selector_link:hover { color: #FF0; }
+#adv_global_search #lib_selector_link:hover { color: red; }
+#rdetail_place_hold:hover { color: #FF0; }
+#home_adv_search_link:hover { color: #FF0; }
+#home_myopac_link:hover { color: #FF0; }
Added: conifer/trunk/web/opac/skin/uwin/css/layout.css
===================================================================
--- conifer/trunk/web/opac/skin/uwin/css/layout.css (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/css/layout.css 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,252 @@
+body { margin: 6px; }
+body { background-color: white; }
+
+.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; }
+
+table { border-collapse: collapse; }
+
+/* generic CSS for a table with data */
+.data_grid { font-weight: 500; border-collapse: collapse;}
+.data_grid thead tr { }
+.data_grid thead td { padding-right: 5px; padding-left: 5px;}
+.data_grid tbody td { padding: 5px; }
+.data_grid_center { text-align: center; }
+
+.data_grid_nb { font-weight: 500; border-collapse: collapse;}
+.data_grid_nb thead tr { color: #000000; }
+.data_grid_nb thead td { padding-right: 5px; padding-left: 5px;}
+.data_grid_nb tbody td { padding: 5px; }
+
+
+.classic_link { text-decoration: underline; color: black;}
+.classic_link:visited { text-decoration: underline; color: black;}
+.classic_link_col { text-decoration: underline; color: red;}
+
+.encircled { border: 1px solid black; }
+
+
+.adv_quick_search { padding: 3px;}
+.adv_quick_search_submit { padding: 3px;}
+
+.overdue { color: red; font-weight: bold;}
+
+#main_table { border-collapse: collapse; width: 100%; }
+#main_left_cell { width: 20%; vertical-align: top;margin: 0px; padding: 0px;}
+#main_right_cell { width: 80%; vertical-align: top; margin: 0px; padding:0px;}
+
+
+#content { min-height: 300px; }
+
+.canvas { min-height: 300px; padding-left: 4px; -moz-border-radius: 6px;}
+#canvas_main { padding-bottom: 4px; }
+
+#loading_div { width: 100%;}
+
+
+
+.shadowed { background: #F0F0E0; }
+.no_copies { background: #E0E0E0; }
+.overdue_circ { border: 2px dashed #F0D0E0; }
+
+.org_tree { padding-left: 2px; padding-right: 2px; }
+.org_link { padding-right: 15px; }
+#org_link_container { margin-bottom: 5px; padding-left: 4px; padding-bottom: 3px; padding-top: 3px; width: 100%; }
+#left_div { float:left; width: 20%; }
+#statusbar {}
+
+#frontsearch_table { }
+#frontsearch_table tr { margin: 6px; }
+
+/* ---------------------------------------------------------------------- */
+.sidebar_div { width: 100%; font-size: 9pt; margin-top: 12px; }
+.sidebar_header { margin-top: 10px; padding-left: 3px; margin-right: 6px; }
+
+.sidebar_extra_item { padding: 0px; margin-right: 8px;}
+.side_bar_item { padding-left: 8px; padding-right: 8px; padding-top: 4px; padding-bottom: 4px; margin-right: 8px; }
+
+.sidebar_item_active { margin-right: 0px; }
+
+.sidebar_chunk { width: 100%; }
+
+/* ---------------------------------------------------------------------- */
+
+#searchbar { margin-top: 22px; width: 100%; }
+#searchbar table tr td {font-weight: bold; font-size: 8pt; }
+#searchbar select, input { border-collapse: collapse; font-size: 9pt; }
+.searchbar_item { margin: 3px; font-size: 9pt; }
+.searchbar_label_span { font-size: 9pt; }
+#searchbar_table { border-collapse: collapse; }
+
+.search_box_container { width: 240px; padding: 3px; }/* border: 1px solid #A0A0A0;' class='color_2'>*/
+#search_box { width: 260px; }
+
+
+/* ---------------------------------------------------------------------- */
+#login_box { width: 70%; 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 { padding-left: 2px; padding-right: 2px; text-align: left;}
+#goto_page_links { text-align: left; padding-left: 2px; padding-right: 2px;}
+
+#next_prev_links_dead {padding-left: 5px; padding-right: 5px;}
+
+#res_table { width: 100%; }
+
+.result_table_pic_cell { width: 43px;}
+.result_table_pic { height: 50px; width: 40px; border: none;}
+.result_table_pic_header { width: 43px; }
+
+.result_table_row { text-align: left; width: 100%;}
+.result_table_subtable { width: 100%; border-collapse: collapse; vertical-align: top;}
+.result_table_subtbody { height: 100%; width: 100%; }
+.result_table_title_cell { text-align: left; }
+
+.copy_count_cell { width: 12%; vertical-align: middle; text-align: center; }
+.copy_count_div { width: 4em; height: 99%; vertical-align: middle; text-align: center; }
+
+.search_page_nav_link { margin-right: 5px; }
+
+.np_nav_link { margin-right: 5px; }
+
+/* ---------------------------------------------------------------------- */
+
+#rdetail_detail_main { width: 100%; }
+#rdetail_details_table { padding-top: 10px; width: 100%; padding: 30px; border-collapse: collapse;}
+.rdetail_header { padding: 3px; padding-left: 10px;}
+.rdetail_desc { padding: 2px; padding-left: 2px; padding-right: 2px;}
+.rdetail_item { width: 75%; padding-left: 10px; }
+#rdetail_image { padding-right: 10px; }
+#rdetail_copy_info_table { padding: 4px; width: 100%; border-collapse: collapse; }
+.rdetail_copy_info_header_cell { padding: 2px; }
+.rdetail_copy_count_cell { text-align: center; }
+
+
+.tor_pic { width: 17px; height: 17px; border: none;}
+
+.dim2_border { border: 1px solid #F06000; -moz-border-radius: 3px;}
+
+.dim2 {
+ filter:alpha(opacity=50);
+ -moz-opacity:0.5;
+ opacity: 0.5;
+ text-decoration: none; }
+
+.dim {
+ filter:alpha(opacity=10);
+ -moz-opacity:0.1;
+ opacity: 0.1;
+ text-decoration: none; }
+
+/* ---------------------------------------------------------------------- */
+
+.myopac_link { width: 12%; margin: 3px; padding: 3px; text-align: center; vertical-align: middle; }
+.myopac_link_active { font-weight: 700;}
+.myopac_table thead tr td { padding: 2px; font-weight: 500; border: 1px solid #808080;}
+.myopac_table td { padding: 3px; }
+.myopac_form_pic { width: 20px; height: 20px; }
+
+.tips { padding: 2px; text-align: center; border: solid #E0E0E0 3px; -moz-border-radius: 3px; width: 99%; }
+
+.holds_cell { border: 1px solid #E0E0E0; padding: 5px; width: 50%;}
+.myopac_update_cell { border: 3px solid #E0E0E0; width:100%; padding-top: 4px; padding-bottom: 4px;}
+.myopac_update_span { padding: 5px;}
+
+.lowhits_div { width: 100%; border-top: 1px solid #E0E0E0; text-align: center;
+ padding-top: 8px; padding-bottom: 8px; }
+
+.rdetail_extras_div {
+ border-top: 3px solid #E0E0E0;margin-top: 3px; padding-top: 5px; width: 100%;}
+
+.copy_info_region_row {
+ padding: 6px;
+ border: 2px solid #E0E0E0;
+ font-weight: 600;
+}
+
+.rdetail_extras_td { padding-right: 15px; padding-left: 15px; border-right: 1px solid #888; }
+.rdetails_extra_links { border: 1px solid #808080; padding-right: 5px; padding-left: 5px; }
+
+
+.cn_browse_item { height: 190px; }
+.cn_browse_info { padding: 4px; border-bottom: 1px dashed #E0E0E0;}
+
+.bookshelf {
+ /*background-image: url(http://10.4.0.10/woodgrain.jpeg);*/
+ /*
+ background-image: url(http://dev.gapines.org/opac/images/woodgrain.jpg);
+ background-repeat: repeat;
+ */
+ border-bottom: 1px solid black;
+}
+
+.cn_browse_loading { width: 95%; padding: 15px; text-align: center; background: #E0F0E0; }
+
+.cn_browse_home_cn { border: 2px solid #E0F0E0; background: green; font-weight: 700;}
+
+.rdetail_context_row { background: #F0E0E0; }
+
+.unadorned_link { text-decoration: none; vertical-align: bottom; }
+
+
+/* ie does not support disabling <option> elements */
+.disabled_option { color: #808080; }
+
+.copy_more_info { padding-left: 6px; color: #804070; }
+
+.invalid_hold { background: #F0F0D0; }
+.myopac_summary_table td { padding : 3px; }
+
+.jacket_attrib { font-size: 7pt; }
+
+/* block that contains footer links and copyright */
+#copyright_block {
+ width: 100%;
+ text-align: center;
+ vertical-align: bottom;
+ margin-top: 10px;
+}
+
+/* block that contains the footer links */
+#footer_links {
+ width: 80%;
+ text-align: center;
+ padding: 10px;
+ margin: auto;
+}
+
+/* span for each link in the footer */
+.footer-link {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+/* block that contains the copyright text */
+#copyright_text {
+ margin-top: 4px;
+}
+
+/* block that contains the logo */
+#footer_logo {
+ text-align: center;
+ margin: auto;
+}
+
+#opac.result.sort { margin-left: 5px; }
+
+#xul_recipient_me { margin-left: 25px; }
+#myopac_holds_thaw_date_form {padding: 10px; text-align: center;}
+#myopac_holds_freeze_select_thaw {margin-right: 100px; margin-left: 100px; }
+
+/* titles in result list */
+.result_table_title_cell .search_link {
+ font-weight: bold;
+}
\ No newline at end of file
Added: conifer/trunk/web/opac/skin/uwin/js/adv_global.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/adv_global.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/adv_global.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,338 @@
+
+attachEvt("common", "run", advgInit);
+attachEvt("common", "locationChanged", advSyncCopyLocLink );
+
+var COOKIE_NOGROUP_RECORDS = 'grpt';
+var advSelectedOrg = null;
+
+function advgInit() {
+
+ /* XXX */
+ if( cookieManager.read(COOKIE_NOGROUP_RECORDS) || SHOW_MR_DEFAULT )
+ $('adv_group_titles').checked = true;
+
+ $n($('adv_global_tbody'), 'term').focus();
+
+ var extras = [
+ FETCH_LIT_FORMS,
+ FETCH_ITEM_FORMS,
+ FETCH_ITEM_TYPES,
+ FETCH_AUDIENCES,
+ FETCH_BIB_LEVELS
+ ];
+
+ for( var x in extras ) {
+
+ var req = new Request(extras[x]);
+
+ if(x == 0) req.request.sel = $('adv_global_lit_form');
+ if(x == 1) req.request.sel = $('adv_global_item_form');
+ if(x == 2) req.request.sel = $('adv_global_item_type');
+ if(x == 3) req.request.sel = $('adv_global_audience');
+ if(x == 4) req.request.sel = $('adv_global_bib_level');
+
+ req.callback(advDrawBibExtras);
+ req.send();
+ }
+
+ var input = $n($('adv_global_trow'), 'term');
+ input.focus();
+ setEnterFunc(input, advSubmitGlobal);
+
+ if(getSort() && getSortDir()) {
+ setSelector($('adv_global_sort_by'), getSort());
+ setSelector($('adv_global_sort_dir'), getSortDir());
+ if(getSort() != 'rel')
+ $('adv_global_sort_dir').disabled = false;
+ }
+
+ if(getAvail())
+ $('opac.result.limit2avail').checked = true;
+
+ // not sure we want to propogate the pubdate filter,
+ // since other filters are not propogated
+ //advInitPubFilter();
+
+ if(!new CGI().param(PARAM_NOPERSIST_SEARCH))
+ initSearchBoxes();
+ advSyncCopyLocLink(getLocation());
+}
+
+function advInitPubFilter() {
+ var i1 = $('adv_global_pub_date_1');
+ var i2 = $('adv_global_pub_date_2');
+ var sel = $('adv_global_pub_date_type');
+ if(getPubdBefore()) {
+ i1.value = getPubdBefore();
+ setSelector(sel, 'before');
+ } else if(getPubdAfter()) {
+ i1.value = getPubdAfter();
+ setSelector(sel, 'after');
+ } else if(getPubdBetween()) {
+ var values = getPubdBetween().split(',');
+ i1.value = values[0]
+ if(values[0] == values[1]) {
+ setSelector(sel, 'equals');
+ } else {
+ setSelector(sel, 'between');
+ i2.value = values[1];
+ }
+ }
+}
+
+function advSyncCopyLocLink(org) {
+ // display the option to filter by copy location
+ advLocationsLoaded = false;
+ advSelectedOrg = org;
+ removeChildren($('adv_copy_location_filter_select'));
+
+ if(isTrue(findOrgType(findOrgUnit(org).ou_type()).can_have_vols())) {
+ unHideMe($('adv_copy_location_filter_row'));
+ advLoadCopyLocations(org);
+ } else {
+ hideMe($('adv_copy_location_filter_row'));
+ }
+
+}
+
+function clearSearchBoxes() {
+ var rows = $('adv_global_tbody').getElementsByTagName('tr');
+ for(var t = 0; t < rows.length; t++) {
+ if($n(rows[t], 'term')) {
+ $n(rows[t], 'term').value = '';
+ setSelector($n(rows[t], 'contains'), 'contains');
+ setSelector($n(rows[t], 'type'), 'keyword');
+ }
+ }
+ $n(rows[0], 'term').focus();
+}
+
+
+function initSearchBoxes() {
+ /* loads the compiled search from the search cookie
+ and sets the widgets accordingly */
+
+ search = cookieManager.read(COOKIE_SEARCH);
+ if(!search) return;
+ _debug("loaded compiled search cookie: " + search);
+
+ search = JSON2js(search);
+ if(!search) return;
+
+ var types = getObjectKeys(search.searches);
+
+ /* pre-add the needed rows */
+ while($('adv_global_tbody').getElementsByTagName('tr').length - 1 < types.length)
+ advAddGblRow();
+
+ var rows = $('adv_global_tbody').getElementsByTagName('tr');
+
+ for(var t = 0; t < types.length; t++) {
+ var row = rows[t];
+ setSelector($n(row, 'type'), types[t]);
+ var term = search.searches[types[t]].term;
+
+ /* if this is a single -<term> search, set the selector to nocontains */
+ if(match = term.match(/^-(\w+)$/)) {
+ term = match[1];
+ setSelector($n(row, 'contains'), 'nocontains');
+ }
+ $n(row, 'term').value = term;
+ }
+}
+
+function advAddGblRow() {
+ var tbody = $("adv_global_tbody");
+ var newrow = $("adv_global_trow").cloneNode(true);
+ tbody.insertBefore(newrow, $("adv_global_addrow"));
+ var input = $n(newrow, "term");
+ input.value = "";
+ setEnterFunc(input, advSubmitGlobal);
+ $n(newrow, 'type').focus();
+}
+
+function advDrawBibExtras(r) {
+ var data = r.getResultObject();
+ var sel = r.sel;
+
+ data = data.sort( /* sort alphabetically */
+ function(a,b) {
+ if( a.value() < b.value() ) return -1;
+ if( a.value() > b.value() ) return 1;
+ return 0;
+ }
+ );
+
+ for( var d = 0; d < data.length; d++ ) {
+ var thing = data[d];
+ var opt = insertSelectorVal( sel, -1, thing.value(), thing.code() );
+ opt.setAttribute('title', thing.value());
+ }
+}
+
+function advSelToStringList(sel) {
+ var list = getSelectedList(sel);
+ var vals = [];
+ for( var i = 0; i < list.length; i++ ) {
+ var str = list[i];
+ for( var j = 0; j < str.length; j++ ) {
+ //if(str.charAt(j) == ' ') continue;
+ vals.push(str.charAt(j));
+ }
+ }
+ return vals.toString();
+}
+
+function advGetVisSelectorVals(id) {
+ var basic = id + '_basic';
+ if(! $(id).className.match(/hide_me/))
+ return advSelToStringList($(id));
+ return advSelToStringList($(basic));
+}
+
+function advSubmitGlobal() {
+
+ var sortdir = getSelectorVal($('adv_global_sort_dir'));
+ var sortby = getSelectorVal($('adv_global_sort_by'));
+
+ var litforms = advGetVisSelectorVals('adv_global_lit_form');
+ var itemforms = advGetVisSelectorVals('adv_global_item_form');
+ var itemtypes = advGetVisSelectorVals('adv_global_item_type');
+ var audiences = advGetVisSelectorVals('adv_global_audience');
+ var biblevels = advGetVisSelectorVals('adv_global_bib_level');
+ var locations = getSelectedList($('adv_copy_location_filter_select')) + '';
+ var languages = getSelectedList($('adv_global_lang')) + '';
+ var limit2avail = $('opac.result.limit2avail').checked ? 1 : ''
+
+ var searches = advBuildSearchBlob();
+ if(!searches) return;
+
+ clearSearchParams();
+
+ var args = {};
+ args.page = MRESULT;
+ args[PARAM_ITEMFORM] = itemforms;
+ args[PARAM_ITEMTYPE] = itemtypes;
+ args[PARAM_BIBLEVEL] = biblevels;
+ args[PARAM_LITFORM] = litforms;
+ args[PARAM_AUDIENCE] = audiences;
+ args[PARAM_LANGUAGE] = languages;
+ args[PARAM_COPYLOCS] = locations;
+ //args[PARAM_SEARCHES] = js2JSON(searches); /* break these out */
+ args[PARAM_DEPTH] = depthSelGetDepth();
+ args[PARAM_LOCATION] = depthSelGetNewLoc();
+ args[PARAM_SORT] = sortby;
+ args[PARAM_SORT_DIR] = sortdir;
+ args[PARAM_ADVTYPE] = ADVTYPE_MULTI;
+ args[PARAM_STYPE] = "";
+ args[PARAM_TERM] = searches;
+ args[PARAM_AVAIL] = limit2avail;
+
+ // publicate year filtering
+ var pub1;
+ if( (pub1 = $('adv_global_pub_date_1').value) && (''+pub1).match(/\d{4}/)) {
+ switch(getSelectorVal($('adv_global_pub_date_type'))) {
+ case 'equals':
+ args[PARAM_PUBD_BETWEEN] = pub1+','+pub1;
+ break;
+ case 'before':
+ args[PARAM_PUBD_BEFORE] = pub1;
+ break;
+ case 'after':
+ args[PARAM_PUBD_AFTER] = pub1;
+ break;
+ case 'between':
+ var pub2 = $('adv_global_pub_date_2').value;
+ if((''+pub2).match(/\d{4}/))
+ args[PARAM_PUBD_BETWEEN] = pub1+','+pub2;
+ break;
+ }
+ }
+
+ /* pubdate sorting causes a record (not metarecord) search */
+ if( sortby == SORT_TYPE_PUBDATE || !$('adv_group_titles').checked ) {
+ args.page = RRESULT;
+ args[PARAM_RTYPE] = RTYPE_MULTI;
+ }
+
+ if($('adv_group_titles').checked )
+ cookieManager.write(COOKIE_NOGROUP_RECORDS,'1',-1);
+ else
+ cookieManager.write(COOKIE_NOGROUP_RECORDS,'');
+
+
+ goTo(buildOPACLink(args));
+}
+
+
+function advBuildSearchBlob() {
+
+ var searches = '';
+ var tbody = $('adv_global_tbody');
+ var rows = tbody.getElementsByTagName('tr');
+
+ for( var i = 0; i < rows.length; i++ ) {
+
+ var row = rows[i];
+ if(!(row && typeof row == 'object')) continue;
+ if(!row.getAttribute('type')) continue;
+
+ var stype = getSelectorVal($n(row, 'type'));
+ var contains = getSelectorVal($n(row, 'contains'));
+ var term = $n(row, 'term').value;
+ if(!term) continue;
+
+ var string = "";
+ switch(contains) {
+ case 'contains' :
+ string += " " + term;
+ break;
+
+ case 'nocontains' : {
+ var words = term.split(" ");
+ for( var j in words )
+ string += " -" + words[j];
+ }
+ break;
+
+ case 'exact' :
+ if(term.indexOf('"') > -1) string += " " + term;
+ else string += " \"" + term + "\"";
+ break;
+ }
+ if(string) {
+ string = string.replace(/'/g,' ');
+ string = string.replace(/\\/g,' ');
+ string = string.replace(/^\s*/,'');
+ string = string.replace(/\s*$/,'');
+ //searches[stype].term = string;
+ if(searches) searches += ' ';
+ searches += stype + ':'+ string;
+ }
+ }
+
+ _debug("created search query " + searches);
+ return searches;
+}
+
+
+// retrieves the shelving locations
+var advLocationsLoaded = false;
+function advLoadCopyLocations(org) {
+ if(org == null)
+ org = advSelectedOrg;
+ var req = new Request(FETCH_COPY_LOCATIONS, org);
+ req.callback(advShowCopyLocations);
+ req.send();
+ advLocationsLoaded = true;
+}
+
+// inserts the shelving locations into the multi-select
+function advShowCopyLocations(r) {
+ var locations = r.getResultObject();
+ var sel = $('adv_copy_location_filter_select');
+ for(var i = 0; i < locations.length; i++)
+ insertSelectorVal(sel, -1, locations[i].name(), locations[i].id());
+}
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/advanced.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/advanced.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/advanced.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,172 @@
+/* advanced search interface */
+
+attachEvt("common", "run", advInit);
+
+function advInit() {
+
+ /* propogate these? */
+
+ depthSelInit();
+ setEnterFunc( $n( $('advanced.marc.tbody'), 'advanced.marc.value'), advMARCRun );
+
+ unHideMe($('adv_quick_search_sidebar'));
+
+ /*
+ if(isXUL())
+ setSelector($('adv_quick_type'), 'tcn'); */
+
+ setEnterFunc($('adv_quick_text'), advGenericSearch);
+
+ unHideMe($('adv_marc_search_sidebar'));
+}
+
+
+function advAddMARC() {
+ var newt = $('adv_sdbar_table').cloneNode(true);
+ newt.id = "";
+ unHideMe($n(newt, 'crow'));
+ $n(newt, 'advanced.marc.tag').value = "";
+ $n(newt, 'advanced.marc.subfield').value = "";
+ $n(newt, 'advanced.marc.value').value = "";
+ $('adv_marc_search_sidebar').insertBefore(newt, $('adv_marc_submit'));
+}
+
+function advMARCRun() {
+
+ clearSearchParams();
+
+ var div = $('adv_marc_search_sidebar');
+ var tbodies = div.getElementsByTagName('tbody');
+ var searches = [];
+
+ for( var i = 0; i < tbodies.length; i++ ) {
+ var tbody = tbodies[i];
+ var val = advExtractMARC(tbody);
+ if(val) searches.push(val);
+ }
+
+ if(searches.length == 0) return;
+
+ var arg = {};
+ arg.page = RRESULT;
+ arg[PARAM_FORM] = 'all'
+ arg[PARAM_RTYPE] = RTYPE_MARC;
+ arg[PARAM_OFFSET] = 0;
+ arg[PARAM_DEPTH] = depthSelGetDepth();
+ arg[PARAM_LOCATION] = depthSelGetNewLoc();
+ arg[PARAM_SEARCHES] = js2JSON(searches);
+ arg[PARAM_ADVTYPE] = ADVTYPE_MARC;
+ arg[PARAM_TERM] = "";
+
+ goTo(buildOPACLink(arg));
+}
+
+
+/* EXAMPLE => {"term":"0516011901","restrict":[{"tag":"020","subfield":"a"}]} */
+function advExtractMARC(tbody) {
+ if(!tbody) return null;
+ var term = $n(tbody, 'advanced.marc.value').value;
+ if(!term) return null;
+
+ var subfield = $n(tbody, 'advanced.marc.subfield').value;
+ if(!subfield) subfield = "_";
+
+ var tag = $n(tbody, 'advanced.marc.tag').value;
+ if(!tag) return null;
+
+ return { 'term' : term.toLowerCase(), 'restrict' : [ { 'tag' : tag, 'subfield' : subfield } ] };
+}
+
+function advGenericSearch() {
+ clearSearchParams();
+ var type = getSelectorVal($('adv_quick_type'));
+
+ var term = $('adv_quick_text').value;
+ if(!term) return;
+
+ var arg = {};
+
+ switch(type) {
+
+ case 'isbn' :
+ arg.page = RRESULT;
+ arg[PARAM_STYPE] = "";
+ arg[PARAM_TERM] = "";
+ arg[PARAM_RTYPE] = RTYPE_ISBN;
+ arg[PARAM_OFFSET] = 0;
+ arg[PARAM_ADVTERM] = term.toLowerCase();
+ break;
+
+ case 'issn' :
+ arg.page = RRESULT;
+ arg[PARAM_STYPE] = "";
+ arg[PARAM_TERM] = "";
+ arg[PARAM_ADVTERM] = term.toLowerCase();
+ arg[PARAM_OFFSET] = 0;
+ arg[PARAM_RTYPE] = RTYPE_ISSN;
+ break;
+
+ case 'tcn' :
+ arg.page = RRESULT;
+ arg[PARAM_STYPE] = "";
+ arg[PARAM_TERM] = "";
+ arg[PARAM_ADVTERM] = term;
+ arg[PARAM_OFFSET] = 0;
+ arg[PARAM_RTYPE] = RTYPE_TCN;
+ break;
+
+ case 'barcode':
+ advFindBarcode(term);
+ break;
+
+
+ case 'cn':
+ arg.page = CNBROWSE;
+ arg[PARAM_CN] = term;
+ arg[PARAM_DEPTH] = depthSelGetDepth();
+ arg[PARAM_LOCATION] = depthSelGetNewLoc();
+ break;
+
+ case 'lccn':
+ arg.page = RRESULT;
+ arg[PARAM_FORM] = 'all'
+ arg[PARAM_RTYPE] = RTYPE_MARC;
+ arg[PARAM_OFFSET] = 0;
+ arg[PARAM_DEPTH] = depthSelGetDepth();
+ arg[PARAM_LOCATION] = depthSelGetNewLoc();
+ arg[PARAM_SEARCHES] = js2JSON([{ 'term' : term.toLowerCase(),
+ 'restrict' : [ { 'tag' : '010', 'subfield' : '_' } ] }]);
+ arg[PARAM_ADVTYPE] = ADVTYPE_MARC;
+ arg[PARAM_TERM] = "";
+ break;
+
+
+ default: alert('not done');
+ }
+
+ if(arg.page) goTo(buildOPACLink(arg));
+}
+
+
+function advFindBarcode(barcode) {
+ var req = new Request(FETCH_BIB_ID_BY_BARCODE, barcode);
+ req.callback(advDrawBarcode);
+ req.request.alertEvent = false;
+ req.send();
+}
+
+function advDrawBarcode(r) {
+ titleid = r.getResultObject();
+ if(checkILSEvent(titleid)) {
+ alertId('myopac.copy.not.found');
+ return;
+ }
+ if(!titleid) return;
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_RID] = titleid;
+ location.href = buildOPACLink(args);
+}
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/cn_browse.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/cn_browse.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/cn_browse.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,134 @@
+var cnOffset = 0;
+var cnCount = 9;
+var cnBrowseCN;
+var cnBrowseOrg;
+
+if( findCurrentPage() == CNBROWSE ) {
+ attachEvt("common", "run", cnBrowseLoadSearch);
+ attachEvt( "common", "locationUpdated", cnBrowseResubmit );
+ attachEvt( "common", "depthChanged", cnBrowseResubmit );
+}
+
+
+function cnBrowseLoadSearch() {
+ unHideMe($('cn_browse'));
+ cnBrowseGo(getCallnumber(), getLocation(), getDepth());
+}
+
+
+function cnBrowseResubmit() {
+ var args = {}
+ args[PARAM_CN] = cnBrowseCN;
+ args[PARAM_DEPTH] = depthSelGetDepth();
+ args[PARAM_LOCATION] = getNewSearchLocation();
+ goTo(buildOPACLink(args));
+}
+
+
+
+function cnBrowseGo(cn, org, depth) {
+ if(depth == null) depth = getDepth();
+
+ org = findOrgUnit(org);
+ cnOffset = 0;
+
+ do {
+ var t = findOrgType(org.ou_type());
+ if( t.depth() > depth )
+ org = findOrgUnit(org.parent_ou());
+ else break;
+ } while(true);
+
+ cnBrowseOrg = org;
+ cnBrowseCN = cn;
+
+ _cnBrowseGo( cn, org );
+ appendClear($('cn_browse_where'), text(org.name()));
+}
+
+
+function _cnBrowseGo( cn, org ) {
+ var req = new Request( FETCH_CNBROWSE, cn, org.id(), cnCount, cnOffset );
+ req.callback( cnBrowseDraw );
+ req.send();
+}
+
+function cnBrowseNext() {
+ cnOffset++;
+ _cnBrowseGo( cnBrowseCN, cnBrowseOrg );
+}
+
+function cnBrowsePrev() {
+ cnOffset--;
+ _cnBrowseGo( cnBrowseCN, cnBrowseOrg );
+}
+
+
+function cnBrowseDraw( r ) {
+ var list = r.getResultObject();
+ _cnBrowseDraw(list);
+}
+
+
+var cnTbody;
+var cnRowT;
+var cnTdT;
+function _cnBrowseDraw( list ) {
+
+ if(!cnTbody) {
+ cnTbody = $('cn_tbody');
+ cnRowT = $('cn_browse_row');
+ cnTdT = cnRowT.removeChild($('cn_browse_td'));
+ cnTbody.removeChild(cnRowT);
+ }
+ removeChildren(cnTbody);
+
+ var counter = 1;
+ var currentRow = cnRowT.cloneNode(true);
+ cnTbody.appendChild(currentRow);
+
+ for( var idx in list ) {
+
+
+ var currentTd = cnTdT.cloneNode(true);
+ currentRow.appendChild(currentTd);
+
+ var td = cnTdT.cloneNode(true);
+
+ var obj = list[idx];
+ var cn = obj.cn;
+ var mods = obj.mods;
+
+ var cn_td = $n(currentTd, 'cn_browse_cn');
+ var lib_td = $n(currentTd, 'cn_browse_lib');
+ var title_td = $n(currentTd, 'cn_browse_title');
+ var author_td = $n(currentTd, 'cn_browse_author');
+ var pic_td = $n(currentTd, 'cn_browse_pic');
+
+ cn_td.appendChild(text(cn.label()));
+ lib_td.appendChild(text(findOrgUnit(cn.owning_lib()).name()));
+ cnBrowseDrawTitle(mods, title_td, author_td, pic_td);
+
+ if( counter++ % 3 == 0 ) {
+ counter = 1;
+ currentRow = cnRowT.cloneNode(true);
+ cnTbody.appendChild(currentRow);
+ }
+ }
+}
+
+
+function cnBrowseDrawTitle(mods, title_td, author_td, pic_td) {
+
+ buildTitleDetailLink(mods, title_td);
+ buildSearchLink(STYPE_AUTHOR, mods.author(), author_td);
+ pic_td.setAttribute("src", buildISBNSrc(cleanISBN(mods.isbn())));
+
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = mods.doc_id();
+ args[PARAM_MRID] = 0;
+ pic_td.parentNode.setAttribute("href", buildOPACLink(args));
+}
+
Added: conifer/trunk/web/opac/skin/uwin/js/container.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/container.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/container.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,67 @@
+
+function containerDoRequest( req, callback, args ) {
+
+ if( callback ) {
+ req.callback( callback );
+ req.request.args = args;
+ req.send();
+ return null;
+ }
+
+ req.send(true);
+ return req.result();
+}
+
+
+function containerFetchAll( callback, args ) {
+ var req = new Request(
+ FETCH_CONTAINERS, G.user.session, G.user.id(), 'biblio', 'bookbag' );
+ return containerDoRequest( req, callback, args );
+}
+
+function containerFlesh( id, callback, args ) {
+ var req = new Request( FLESH_CONTAINER, G.user.session, 'biblio', id );
+ return containerDoRequest( req, callback, args );
+}
+
+function containerDelete( id, callback, args ) {
+ var req = new Request( DELETE_CONTAINER, G.user.session, 'biblio', id );
+ return containerDoRequest(req, callback, args );
+}
+
+
+function containerCreate( name, pub, callback, args ) {
+
+ var container = new cbreb();
+ container.btype('bookbag');
+ container.owner( G.user.id() );
+ container.name( name );
+ if(pub) container.pub('t');
+ else container.pub('f');
+
+ var req = new Request(
+ CREATE_CONTAINER, G.user.session, 'biblio', container );
+ return containerDoRequest( req, callback, args );
+}
+
+function containerUpdate( container, callback, args ) {
+ var req = new Request(UPDATE_CONTAINER, G.user.session, 'biblio', container);
+ return containerDoRequest(req, callback, args);
+}
+
+function containerCreateItem( containerId, target, callback, args ) {
+
+ var item = new cbrebi();
+ item.target_biblio_record_entry(target);
+ item.bucket(containerId);
+
+ var req = new Request( CREATE_CONTAINER_ITEM,
+ G.user.session, 'biblio', item );
+
+ return containerDoRequest( req, callback, args );
+}
+
+function containerRemoveItem( id, callback, args ) {
+ var req = new Request( DELETE_CONTAINER_ITEM, G.user.session, 'biblio', id );
+ return containerDoRequest( req, callback, args );
+}
Added: conifer/trunk/web/opac/skin/uwin/js/copy_details.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/copy_details.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/copy_details.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,352 @@
+var cpdTemplate;
+var cpdCounter = 0;
+var cpdNodes = {};
+
+function cpdBuild( contextTbody, contextRow, record, callnumber, orgid, depth, copy_location ) {
+var i = cpdCheckExisting(contextRow);
+ if(i) return i;
+
+ var counter = cpdCounter++;
+
+ /* yank out all of the template rows */
+ if(!cpdTemplate) cpdTemplate = $('rdetail_volume_details_row');
+ var templateRow = cpdTemplate.cloneNode(true);
+ templateRow.id = 'cpd_row_' + counter;
+
+ /* shove a dummy a tag in before the context previous sibling */
+ /*
+ contextTbody.insertBefore(
+ elem('a',{name:'slot_'+templateRow.id}), contextRow.previousSibling);
+ goTo('#slot_'+templateRow.id);
+ */
+
+ if(isXUL()) {
+ /* unhide before we unhide/clone the parent */
+ unHideMe($n(templateRow, 'age_protect_label'));
+ unHideMe($n(templateRow, 'create_date_label'));
+ unHideMe($n(templateRow, 'holdable_label'));
+ unHideMe($n(templateRow, 'due_date_label'));
+ }
+
+ unHideMe(templateRow);
+
+ var print = $n(templateRow,'print');
+ print.onclick = function() { cpdBuildPrintPane(
+ contextRow, record, callnumber, orgid, depth) };
+
+ var mainTbody = $n(templateRow, 'copies_tbody');
+ var extrasRow = mainTbody.removeChild($n(mainTbody, 'copy_extras_row'));
+
+ var req = new Request(FETCH_COPIES_FROM_VOLUME, record.doc_id(), callnumber, orgid);
+ req.callback(cpdDrawCopies);
+
+ req.request.args = {
+ contextTbody : contextTbody, /* tbody that holds the contextrow */
+ contextRow : contextRow, /* the row our new row will be inserted after */
+ record : record,
+ callnumber : callnumber,
+ orgid : orgid,
+ depth : depth,
+ templateRow : templateRow, /* contains everything */
+ copy_location : copy_location,
+ mainTbody : mainTbody, /* holds the copy rows */
+ extrasRow : extrasRow, /* wrapper row for all extras */
+ counter : counter
+ };
+
+ if( contextRow.nextSibling )
+ contextTbody.insertBefore( templateRow, contextRow.nextSibling );
+ else
+ contextTbody.appendChild( templateRow );
+
+ req.send();
+ _debug('creating new details row with id ' + templateRow.id);
+ cpdNodes[templateRow.id] = { templateRow : templateRow };
+ return templateRow.id;
+}
+
+
+function cpdBuildPrintWindow(record, orgid) {
+ var div = $('rdetail_print_details').cloneNode(true);
+ div.id = "";
+
+ $n(div, 'lib').appendChild(text(findOrgUnit(orgid).name()));
+ $n(div, 'title').appendChild(text(record.title()));
+ $n(div, 'author').appendChild(text(record.author()));
+ $n(div, 'edition').appendChild(text(record.edition()));
+ $n(div, 'pubdate').appendChild(text(record.pubdate()));
+ $n(div, 'publisher').appendChild(text(record.publisher()));
+ $n(div, 'phys').appendChild(text(record.physical_description()));
+
+ return div;
+}
+
+function cpdStylePopupWindow(div) {
+ var tds = div.getElementsByTagName('td');
+ for( var i = 0; i < tds.length ; i++ ) {
+ var td = tds[i];
+ var sty = td.getAttribute('style');
+ if(!sty) sty = "";
+ td.setAttribute('style', sty + 'padding: 2px; border: 1px solid #F0F0E0;');
+ if( td.className && td.className.match(/hide_me/) )
+ td.parentNode.removeChild(td);
+ }
+}
+
+
+/* builds a friendly print window for this CNs data */
+function cpdBuildPrintPane(contextRow, record, callnumber, orgid, depth) {
+
+ var div = cpdBuildPrintWindow( record, orgid);
+
+ $n(div, 'cn').appendChild(text(callnumber));
+
+ unHideMe($n(div, 'copy_header'));
+
+ var subtbody = $n(contextRow.nextSibling, 'copies_tbody');
+ var rows = subtbody.getElementsByTagName('tr');
+
+ for( var r = 0; r < rows.length; r++ ) {
+ var row = rows[r];
+ if(!row) continue;
+ var name = row.getAttribute('name');
+ if( name.match(/extras_row/) ) continue; /* hide the copy notes, stat-cats */
+ var clone = row.cloneNode(true);
+ var links = clone.getElementsByTagName('a');
+ for( var i = 0; i < links.length; i++ )
+ links[i].style.display = 'none';
+
+ $n(div, 'tbody').appendChild(clone);
+ }
+
+ cpdStylePopupWindow(div);
+ openWindow( div.innerHTML);
+}
+
+
+
+/* hide any open tables and if we've already
+ fleshed this cn, just unhide it */
+function cpdCheckExisting( contextRow ) {
+
+ var existingid;
+ var next = contextRow.nextSibling;
+
+ if( next && next.getAttribute('templateRow') ) {
+ var obj = cpdNodes[next.id];
+ if(obj.templateRow.className.match(/hide_me/))
+ unHideMe(obj.templateRow);
+ else hideMe(obj.templateRow);
+ existingid = next.id;
+ }
+
+ if(existingid) _debug('row exists with id ' + existingid);
+
+ for( var o in cpdNodes ) {
+ var node = cpdNodes[o];
+ if( existingid && o == existingid ) continue;
+ hideMe(node.templateRow);
+ removeCSSClass(node.templateRow.previousSibling, 'rdetail_context_row');
+ }
+
+ addCSSClass(contextRow, 'rdetail_context_row');
+ if(existingid) return existingid;
+ return null;
+}
+
+/*
+function cpdFetchCopies(r) {
+ var args = r.args;
+ args.cn = r.getResultObject();
+ var req = new Request(FETCH_COPIES_FROM_VOLUME, args.cn.id());
+ req.request.args = args;
+ req.callback(cpdDrawCopies);
+ req.send();
+}
+*/
+
+function cpdDrawCopies(r) {
+
+ var copies = r.getResultObject();
+ var args = r.args;
+ var copytbody = $n(args.templateRow, 'copies_tbody');
+ var copyrow = copytbody.removeChild($n(copytbody, 'copies_row'));
+
+ if(isXUL()) {
+ /* unhide before we unhide/clone the parent */
+ unHideMe($n(copyrow, 'age_protect_value'));
+ unHideMe($n(copyrow, 'create_date_value'));
+ unHideMe($n(copyrow, 'copy_holdable_td'));
+ unHideMe($n(copyrow, 'copy_due_date_td'));
+ }
+
+ for( var i = 0; i < copies.length; i++ ) {
+ var row = copyrow.cloneNode(true);
+ var copyid = copies[i];
+ var req = new Request(FETCH_FLESHED_COPY, copies[i]);
+ req.callback(cpdDrawCopy);
+ req.request.args = r.args;
+ req.request.row = row;
+ req.send();
+ copytbody.appendChild(row);
+ }
+}
+
+function cpdDrawCopy(r) {
+ var copy = r.getResultObject();
+ var row = r.row;
+
+ if (r.args.copy_location && copy.location().name() != r.args.copy_location) {
+ hideMe(row);
+ return;
+ }
+
+ $n(row, 'barcode').appendChild(text(copy.barcode()));
+ $n(row, 'location').appendChild(text(copy.location().name()));
+ $n(row, 'status').appendChild(text(copy.status().name()));
+
+ if(isXUL()) {
+ /* show the hold link */
+ var l = $n(row, 'copy_hold_link');
+ unHideMe(l);
+ l.onclick = function() {
+ holdsDrawEditor(
+ {
+ type : 'C',
+ copyObject : copy,
+ onComplete : function(){}
+ }
+ );
+ }
+
+ if( copy.age_protect() )
+ appendClear($n(row, 'age_protect_value'), text(copy.age_protect().name()));
+
+ var cd = copy.create_date();
+ cd = cd.replace(/T.*/, '');
+ $n(row, 'create_date_value').appendChild(text(cd));
+
+ var yes = $('rdetail.yes').innerHTML;
+ var no = $('rdetail.no').innerHTML;
+
+ if( isTrue(copy.holdable()) &&
+ isTrue(copy.location().holdable()) &&
+ isTrue(copy.status().holdable()) ) {
+ $n(row, 'copy_is_holdable').appendChild(text(yes));
+ } else {
+ $n(row, 'copy_is_holdable').appendChild(text(no));
+ }
+
+ var circ;
+ if( copy.circulations() ) {
+ circ = copy.circulations()[0];
+ if( circ ) {
+ $n(row, 'copy_due_date').appendChild(text(circ.due_date().replace(/[T ].*/,'')));
+ }
+ }
+
+ }
+
+ r.args.copy = copy;
+ r.args.copyrow = row;
+ cpdShowNotes(copy, r.args)
+ cpdShowStats(copy, r.args);
+
+}
+
+function _cpdExtrasInit(args) {
+
+ var newrid = 'extras_row_' + args.copy.barcode();
+ var newrow = $(newrid);
+ if(!newrow) newrow = args.extrasRow.cloneNode(true);
+ var tbody = $n(newrow, 'extras_tbody');
+ var rowt = $n(tbody, 'extras_row');
+ newrow.id = newrid;
+
+ var cr = args.copyrow;
+ var nr = cr.nextSibling;
+ var np = args.mainTbody;
+
+ /* insert the extras row into the main table */
+ if(nr) np.insertBefore( newrow, nr );
+ else np.appendChild(newrow);
+
+ var link = $n(args.copyrow, 'details_link');
+ var link2 = $n(args.copyrow, 'less_details_link');
+ var id = newrow.id;
+ link.id = id + '_morelink';
+ link2.id = id + '_lesslink';
+ unHideMe(link);
+ hideMe(link2);
+
+ link.setAttribute('href',
+ 'javascript:unHideMe($("'+link2.id+'")); hideMe($("'+link.id+'"));unHideMe($("'+newrow.id+'"));');
+
+ link2.setAttribute('href',
+ 'javascript:unHideMe($("'+link.id+'")); hideMe($("'+link2.id+'"));hideMe($("'+newrow.id+'"));');
+
+ return [ tbody, rowt ];
+}
+
+function cpdShowNotes(copy, args) {
+ var notes = copy.notes();
+ if(!notes || notes.length == 0) return;
+
+ var a = _cpdExtrasInit(args);
+ var tbody = a[0];
+ var rowt = a[1];
+
+ for( var n in notes ) {
+ var note = notes[n];
+ if(!isTrue(note.pub())) continue;
+ var row = rowt.cloneNode(true);
+ $n(row, 'key').appendChild(text(note.title()));
+ $n(row, 'value').appendChild(text(note.value()));
+ unHideMe($n(row, 'note'));
+ unHideMe(row);
+ tbody.appendChild(row);
+ }
+}
+
+
+function cpdShowStats(copy, args) {
+ var entries = copy.stat_cat_entry_copy_maps();
+ if(!entries || entries.length == 0) return;
+
+ var visibleStatCat = false;
+
+ /*
+ check all copy stat cats; if we find one that's OPAC visible,
+ set the flag and break the loop. If we've found one, or we're
+ in the staff client, build the table. if not, we return doing
+ nothing, as though the stat_cat_entry_copy_map was empty or null
+ */
+
+ for( var n in entries )
+ {
+ var entry = entries[n];
+ if(isTrue(entry.stat_cat().opac_visible()))
+ {
+ visibleStatCat = true;
+ break;
+ }
+ }
+
+ if(!(isXUL() || visibleStatCat)) return;
+
+ var a = _cpdExtrasInit(args);
+ var tbody = a[0];
+ var rowt = a[1];
+
+ for( var n in entries ) {
+ var entry = entries[n];
+ if(!(isXUL() || isTrue(entry.stat_cat().opac_visible()))) continue;
+ var row = rowt.cloneNode(true);
+ $n(row, 'key').appendChild(text(entry.stat_cat().name()));
+ $n(row, 'value').appendChild(text(entry.stat_cat_entry().value()));
+ unHideMe($n(row, 'cat'));
+ unHideMe(row);
+ tbody.appendChild(row);
+ }
+}
+
Added: conifer/trunk/web/opac/skin/uwin/js/depth_selector.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/depth_selector.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/depth_selector.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,122 @@
+
+attachEvt( "common", "locationChanged", updateLoc );
+
+var _ds;
+var _libselspan;
+var _libselslink;
+var _dselspan;
+var _newlocation = null;
+
+function depthSelInit() {
+ _ds = $('depth_selector');
+ _ds.onchange = depthSelectorChanged;
+ _libselspan = $('lib_selector_span');
+ _libsellink = $('lib_selector_link');
+ _dselspan = $('depth_selector_span');
+
+ if( getLocation() == globalOrgTree.id() ) {
+ unHideMe( _libselspan );
+ _libsellink.onclick = _opacHandleLocationTagClick;
+ } else {
+ unHideMe( _dselspan );
+ buildLocationSelector();
+ }
+
+ setSelector(_ds, getDepth());
+ _newlocation = getLocation();
+}
+
+
+var orgTreeIsBuilt = false;
+function _opacHandleLocationTagClick() {
+
+ swapCanvas(G.ui.common.org_container);
+
+ if(!orgTreeIsBuilt) {
+ drawOrgTree();
+ orgTreeIsBuilt = true;
+ }
+
+}
+
+function depthSelGetDepth() {
+ var depth = parseInt(_ds.options[_ds.selectedIndex].value);
+ if(isNaN(depth)) depth = 0;
+ return depth;
+}
+
+function depthSelectorChanged() {
+ var i = _ds.selectedIndex;
+ if( i == _ds.options.length - 1 ) {
+ setSelector( _ds, getDepth() );
+ _opacHandleLocationTagClick();
+ } else {
+ /* this re-submits the search when they change the search range
+ disabled for testing...
+ */
+ /*runEvt('common', 'depthChanged');*/
+ }
+}
+
+var chooseAnotherNode;
+function buildLocationSelector(newLoc) {
+
+ var loc;
+ if(newLoc != null) loc = newLoc;
+ else loc = getLocation();
+
+ if( loc == globalOrgTree.id() ) return;
+
+ var selector = _ds;
+ if(!chooseAnotherNode)
+ chooseAnotherNode = selector.removeChild(
+ selector.getElementsByTagName("option")[0]);
+ var node = chooseAnotherNode;
+ removeChildren(selector);
+
+ var location = findOrgUnit(loc);
+ var type;
+ if (location) type = findOrgType(location.ou_type());
+
+ while( type && location ) {
+ var n = node.cloneNode(true);
+ n.setAttribute("value", type.depth());
+ removeChildren(n);
+ n.appendChild(text(type.opac_label()));
+ selector.appendChild(n);
+ location = findOrgUnit(location.parent_ou());
+ if(location) type = findOrgType(location.ou_type());
+ else type = null;
+ }
+
+ selector.appendChild(node);
+}
+
+function getNewSearchDepth() { return newSearchDepth; }
+function getNewSearchLocation() { return (isNull(_newlocation)) ? LOCATION : _newlocation; }
+function depthSelGetNewLoc() { return getNewSearchLocation(); }
+
+function updateLoc(location, depth) {
+ if( depth != null ) {
+ if(depth != 0 ){
+ _libsellink.onclick = _opacHandleLocationTagClick;
+ if( location == globalOrgTree.id() ) {
+ hideMe( _dselspan );
+ unHideMe( _libselspan );
+ } else {
+ buildLocationSelector(location);
+ hideMe( _libselspan );
+ unHideMe( _dselspan );
+ }
+ }
+
+ setSelector(_ds, depth);
+ newSearchDepth = depth;
+ }
+
+ _newlocation = location;
+ runEvt('common','locationUpdated', location);
+}
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/holds.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/holds.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/holds.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,892 @@
+var holdsOrgSelectorBuilt = false;
+var holdArgs;
+
+/*
+note: metarecord holds have a holdable_formats field that contains
+item_type(s)-item_forms(s)-language
+item_form and language are optional - if language exist and no
+item_form is specified, use item_type(s)--language
+*/
+
+var noEmailMessage;
+var noEmailMessageXUL;
+
+function holdsHandleStaff() {
+
+ // if we know the recipient's barcode, use it
+ if(xulG.patron_barcode) return _holdsHandleStaff();
+
+ swapCanvas($('xulholds_box'));
+ $('xul_recipient_barcode').focus();
+ $('xul_recipient_barcode').onkeypress = function(evt)
+ {if(userPressedEnter(evt)) { _holdsHandleStaff(); } };
+ $('xul_recipient_barcode_submit').onclick = _holdsHandleStaff;
+ $('xul_recipient_me').onclick = _holdsHandleStaffMe;
+
+ $('xul_recipient_barcode').onkeyup = function(evt) {
+ if($('xul_recipient_barcode').value == '')
+ $('xul_recipient_me').disabled = false;
+ else
+ $('xul_recipient_me').disabled = true;
+ };
+}
+
+$('holds_frozen_thaw_input').onchange =
+ function(){holdsVerifyThawDateUI('holds_frozen_thaw_input');}
+$('holds_frozen_thaw_input').onkeyup =
+ function(){holdsVerifyThawDateUI('holds_frozen_thaw_input');}
+
+function _holdsHandleStaffMe() {
+ holdArgs.recipient = G.user;
+ holdsDrawEditor();
+}
+
+function _holdsHandleStaff() {
+ var barcode = xulG.patron_barcode || $('xul_recipient_barcode').value;
+ var user = grabUserByBarcode( G.user.session, barcode );
+
+ var evt;
+ if(evt = checkILSEvent(user)) {
+ alertILSEvent(user);
+ return;
+ }
+
+ if(!barcode || !user) {
+ alertId('holds_invalid_recipient', barcode);
+ return
+ }
+
+ holdArgs.recipient = user;
+ holdsDrawEditor();
+}
+
+
+
+/** args:
+ * record, volume, copy (ids)
+ * request, recipient, editHold (objects)
+ */
+
+function holdsDrawEditor(args) {
+
+ holdArgs = (args) ? args : holdArgs;
+
+ if(!noEmailMessage)
+ noEmailMessage = $('holds_email').removeChild($('holds.no_email'));
+
+ if(!noEmailMessageXUL)
+ noEmailMessageXUL = $('holds_email').removeChild($('holds.no_email.xul'));
+
+ if(isXUL() && holdArgs.recipient == null
+ && holdArgs.editHold == null) {
+ holdsHandleStaff();
+ return;
+ }
+
+ if(!holdArgs.recipient) holdArgs.recipient = G.user;
+ if(!holdArgs.requestor) holdArgs.requestor = G.user;
+
+ if(!(holdArgs.requestor && holdArgs.requestor.session)) {
+ detachAllEvt('common','locationChanged');
+ attachEvt('common','loggedIn', holdsDrawEditor)
+ initLogin();
+ return;
+ }
+
+ if(holdArgs.editHold) // flesh the args with the existing hold
+ holdArgsFromHold(holdArgs.editHold, holdArgs);
+
+ holdsDrawWindow();
+}
+
+
+// updates the edit window with the existing hold's data
+function _holdsUpdateEditHold() {
+
+ var hold = holdArgs.editHold;
+ var qstats = holdArgs.status;
+
+ var orgsel = $('holds_org_selector');
+ var frozenbox = $('holds_frozen_chkbox');
+
+ setSelector(orgsel, hold.pickup_lib());
+
+ if( hold.capture_time() || qstats.status > 2 ) {
+ frozenbox.disabled = true;
+ $('holds_frozen_thaw_input').disabled = true;
+ if(qstats.status == 3) {
+ // no pickup lib changes while in-transit
+ orgsel.disabled = true;
+ } else {
+ var orgs = fetchPermOrgs('UPDATE_PICKUP_LIB_FROM_HOLDS_SHELF');
+ if(orgs[0] == -1)
+ orgsel.disabled = true;
+ }
+ } else {
+ orgsel.disabled = false;
+ frozenbox.disabled = false;
+ }
+
+
+ $('holds_submit').onclick = holdsEditHold;
+ $('holds_update').onclick = holdsEditHold;
+
+ if(hold.phone_notify()) {
+ $('holds_enable_phone').checked = true;
+ $('holds_phone').value = hold.phone_notify();
+
+ } else {
+ $('holds_phone').disabled = true;
+ $('holds_enable_phone').checked = false;
+ }
+
+ if(isTrue(hold.email_notify())) {
+ $('holds_enable_email').checked = true;
+
+ } else {
+ $('holds_enable_email').checked = false;
+ }
+
+ dijit.byId('holds_expire_time').setValue(dojo.date.stamp.fromISOString(hold.expire_time()));
+
+ /* populate the hold freezing info */
+ if(!frozenbox.disabled && isTrue(hold.frozen())) {
+ frozenbox.checked = true;
+ unHideMe($('hold_frozen_thaw_row'));
+ if(hold.thaw_date()) {
+ dijit.byId('holds_frozen_thaw_input').setValue(dojo.date.stamp.fromISOString(hold.thaw_date()));
+ } else {
+ dijit.byId('holds_frozen_thaw_input').setValue('');
+ }
+ } else {
+ frozenbox.checked = false;
+ dijit.byId('holds_frozen_thaw_input').setValue('');
+ hideMe($('hold_frozen_thaw_row'));
+ }
+}
+
+function holdsEditHold() {
+ var hold = holdsBuildHoldFromWindow();
+ if(!hold) return;
+ holdsUpdate(hold);
+ showCanvas();
+ if(holdArgs.onComplete)
+ holdArgs.onComplete(hold);
+}
+
+function holdArgsFromHold(hold, oargs) {
+ var args = (oargs) ? oargs : {};
+ args.type = hold.hold_type();
+ var target = hold.target();
+
+ switch(args.type) {
+ case 'M':
+ args.metarecord = target;
+ break;
+ case 'T':
+ args.record = target;
+ break;
+ case 'V':
+ args.volume = target;
+ break;
+ case 'C':
+ args.copy = target;
+ break;
+ }
+ return args;
+}
+
+function holdFetchObjects(hold, doneCallback) {
+
+ var args = (hold) ? holdArgsFromHold(hold) : holdArgs;
+
+ var type = args.type;
+
+ if( type == 'C' ) {
+
+ if( args.copyObject ) {
+
+ args.copy = args.copyObject.id();
+ args.volume = args.copyObject.call_number();
+ _h_set_vol(args, doneCallback);
+
+ } else {
+ var creq = new Request(FETCH_COPY, args.copy);
+
+ creq.callback(
+ function(r) {
+ var cp = r.getResultObject();
+ args.copyObject = cp;
+ args.volume = args.copyObject.call_number();
+ _h_set_vol(args, doneCallback);
+ }
+ );
+ creq.send();
+ }
+ } else {
+ if( type == 'V' ) {
+ _h_set_vol(args, doneCallback);
+
+ } else {
+ if( type == 'T' ) {
+ _h_set_rec(args, doneCallback);
+ } else {
+ _h_set_rec_descriptors(args, doneCallback);
+ }
+ }
+ }
+
+ return args;
+}
+
+function _h_set_vol(args, doneCallback) {
+
+ if( args.volumeObject ) {
+ args.volume = args.volumeObject.id();
+ args.record = args.volumeObject.record();
+ _h_set_rec(args, doneCallback);
+
+ } else {
+
+ var vreq = new Request(FETCH_VOLUME, args.volume);
+ vreq.callback(
+ function(r) {
+ var vol = r.getResultObject();
+ args.volumeObject = vol;
+ args.record = vol.record();
+ _h_set_rec(args, doneCallback);
+ }
+ );
+ vreq.send();
+ }
+}
+
+function _h_set_rec(args, doneCallback) {
+
+ if(args.recordObject)
+ args.record = args.recordObject.doc_id();
+ else
+ args.recordObject = findRecord( args.record, 'T' );
+
+ if( args.type == 'T' || args.type == 'M' )
+ _h_set_rec_descriptors(args, doneCallback);
+ else
+ if(doneCallback) doneCallback(args);
+}
+
+
+function _h_set_rec_descriptors(args, doneCallback) {
+
+ // grab the list of record desciptors attached to this records metarecord
+ if( ! args.recordDescriptors ) {
+ var params = { record: args.record };
+
+ if( ! args.record ) {
+ if( args.metarecord )
+ params = { metarecord : args.metarecord };
+ else
+ params = { metarecord : args.metarecordObject.doc_id() };
+ }
+
+ var req = new Request(FETCH_MR_DESCRIPTORS, params );
+ req.callback(
+ function(r) {
+ var data = r.getResultObject();
+ args.recordDescriptors = data.descriptors;
+ args.metarecord = data.metarecord;
+ if( args.type == 'M' && ! args.metarecordObject)
+ args.metarecordObject = findRecord(args.metarecord, 'M');
+
+ if(doneCallback) doneCallback(args);
+ }
+ );
+ req.send();
+
+ } else {
+ if(doneCallback) doneCallback(args);
+ }
+
+ return args;
+}
+
+
+
+function holdsDrawWindow() {
+ swapCanvas($('holds_box'));
+ $('holds_cancel').onclick = function(){ runEvt('common', 'holdUpdateCanceled'), showCanvas() };
+ $('holds_submit').onclick = function(){holdsPlaceHold(holdsBuildHoldFromWindow())};
+ $('holds_update').onclick = function(){holdsPlaceHold(holdsBuildHoldFromWindow())};
+ holdFetchObjects(null,
+ function(){
+ __holdsDrawWindow();
+
+ if(holdArgs.editHold) {
+ hideMe($('holds_submit'));
+ unHideMe($('holds_update'));
+ var req = new Request(FETCH_HOLD_STATUS,
+ G.user.session, holdArgs.editHold.id());
+ req.send(true);
+ holdArgs.status = req.result();
+ _holdsUpdateEditHold();
+ }
+ }
+ );
+}
+
+function __holdsDrawWindow() {
+
+ var rec = holdArgs.recordObject;
+ var vol = holdArgs.volumeObject;
+ var copy = holdArgs.copyObject;
+ var mr = holdArgs.metarecordObject;
+
+ rec = (rec) ? rec : mr;
+
+ if(!holdsOrgSelectorBuilt) {
+ holdsBuildOrgSelector(null,0);
+ holdsOrgSelectorBuilt = true;
+ var selector = $('holds_org_selector');
+
+ /*
+ var o_loc = findOrgUnit(getOrigLocation());
+ var t = findOrgType(o_loc.ou_type());
+ if( t.can_have_users() )
+ setSelector(selector, o_loc.id());
+ else
+ */
+
+ setSelector(selector, holdArgs.recipient.home_ou());
+
+ }
+
+ /*
+ if(isXUL()) {
+ var dsel = $('holds_depth_selector');
+ unHideMe($('holds_depth_selector_row'));
+ if(dsel.getElementsByTagName('option').length == 0) {
+ var types = globalOrgTypes;
+ var depth = findOrgDepth(G.user.ws_ou());
+ iterate(types,
+ function(t) {
+ if(t.depth() > depth) return;
+ insertSelectorVal(dsel, -1, t.opac_label(), t.depth());
+ }
+ );
+ }
+ }
+ */
+
+ appendClear($('holds_recipient'), text(
+ holdArgs.recipient.family_name() + ', ' +
+ holdArgs.recipient.first_given_name()));
+ appendClear($('holds_title'), text(rec.title()));
+ appendClear($('holds_author'), text(rec.author()));
+
+ if( holdArgs.type == 'V' || holdArgs.type == 'C' ) {
+
+ unHideMe($('holds_type_row'));
+ unHideMe($('holds_cn_row'));
+ appendClear($('holds_cn'), text(holdArgs.volumeObject.label()));
+
+ if( holdArgs.type == 'V' ) {
+ unHideMe($('holds_is_cn'));
+ hideMe($('holds_is_copy'));
+
+ } else {
+ hideMe($('holds_is_cn'));
+ unHideMe($('holds_is_copy'));
+ unHideMe($('holds_copy_row'));
+ appendClear($('holds_copy'), text(holdArgs.copyObject.barcode()));
+ }
+
+ } else {
+ hideMe($('holds_type_row'));
+ hideMe($('holds_copy_row'));
+ hideMe($('holds_cn_row'));
+ }
+
+ removeChildren($('holds_format'));
+
+ var mods_formats = rec.types_of_resource();
+ var formats;
+
+ if(holdArgs.recordDescriptors)
+ formats = holdArgs.recordDescriptors[0].item_type();
+
+ if( holdArgs.type == 'T' ) {
+ var desc = grep( holdArgs.recordDescriptors,
+ function(i) {
+ return (i.record() == holdArgs.record);
+ }
+ );
+ formats = desc[0].item_type();
+ }
+
+ if( holdArgs.type == 'M' ) {
+ var data = holdsParseMRFormats(holdArgs.editHold.holdable_formats());
+ mods_formats = data.mods_formats;
+ formats = data.formats;
+ }
+
+
+ for( var i in mods_formats ) {
+ var res = mods_formats[i];
+ var img = elem("img");
+ setResourcePic(img, res);
+ $('holds_format').appendChild(img);
+ if(formats)
+ $('holds_format').appendChild(text(' '+ MARCTypeToFriendly(formats[i]) +' '));
+ else
+ $('holds_format').appendChild(text(' '+ mods_formats[i] +' '));
+ $('holds_format').appendChild(elem('br'));
+ }
+
+
+ $('holds_phone').value = holdArgs.recipient.day_phone();
+ appendClear( $('holds_email'), text(holdArgs.recipient.email()));
+
+ var pref = G.user.prefs[PREF_HOLD_NOTIFY];
+
+ if(pref) {
+ if( ! pref.match(/email/i) )
+ $('holds_enable_email').checked = false;
+
+ if( ! pref.match(/phone/i) ) {
+ $('holds_phone').disabled = true;
+ $('holds_enable_phone').checked = false;
+ }
+ }
+
+ if(!holdArgs.recipient.email()) {
+ $('holds_enable_email').checked = false;
+ $('holds_enable_email').disabled = true;
+ var message;
+ if(isXUL()) {
+ message = noEmailMessageXUL.cloneNode(true);
+ appendClear($('holds_email'), message);
+ } else {
+ message = noEmailMessage.cloneNode(true);
+ appendClear($('holds_email'), message);
+ $('holds.no_email.my_account').setAttribute('href', buildOPACLink({page:MYOPAC},null,true));
+ }
+ unHideMe(message);
+ }
+
+ if(!$('holds_phone').value)
+ $('holds_enable_phone').checked = false;
+
+ appendClear($('holds_physical_desc'), text(rec.physical_description()));
+
+ if(holdArgs.type == 'M') hideMe($('hold_physical_desc_row'));
+
+ holdsSetFormatSelector();
+
+ $('holds_frozen_chkbox').checked = false;
+ hideMe($('hold_frozen_thaw_row'));
+
+ var interval = fetchOrgSettingDefault(holdArgs.recipient.home_ou(), 'circ.hold_expire_interval');
+ var secs = 0;
+ if(interval) {
+ secs = interval_to_seconds(interval);
+ var expire = new Date();
+ expire.setTime(expire.getTime() + Number(secs + '000'));
+ dijit.byId('holds_expire_time').setValue(expire);
+ }
+}
+
+function holdsParseMRFormats(str) {
+ var data = str.split(/-/);
+
+ var formats = [];
+ var mods_formats = [];
+
+ for( var i = 0; i < data[0].length; i++ ) {
+ formats.push( data[0].charAt(i) );
+ mods_formats.push( MARCFormatToMods( formats[i] ) );
+ }
+
+ formats = uniquify(formats);
+ mods_formats = uniquify(mods_formats);
+
+ return {
+ formats : formats,
+ mods_formats : mods_formats,
+ lang : data[2],
+ largeprint : data[1]
+ };
+}
+
+
+function holdsSetFormatSelector() {
+ var type = holdArgs.type;
+ if( type == 'C' || type == 'V' || holdArgs.editHold ) return;
+
+ var data = holdsGetFormats();
+ var avail_formats = data.avail_formats;
+ var sel_formats = data.sel_formats;
+ holdArgs.language = data.lang;
+
+ unHideMe($('holds_alt_formats_row_extras'));
+ var selector = $('hold_alt_form_selector');
+
+ for( var i = 0; i < avail_formats.length; i++ ) {
+ var form = avail_formats[i];
+ unHideMe(findSelectorOptByValue(selector, form));
+ }
+}
+
+
+function holdsGetFormats() {
+
+ var lang;
+ var formats = [];
+ var sformats = []; // selected formats
+
+ var type = holdArgs.type;
+ var desc = holdArgs.recordDescriptors;
+ var rec = holdArgs.record;
+ var mrec = holdArgs.metarecord;
+
+ if( type == 'T' ) {
+
+ for( var i = 0; i < desc.length; i++ ) {
+ var d = desc[i];
+ if( d.record() == holdArgs.record ) {
+ lang = d.item_lang();
+ holdArgs.myFormat = _t_f_2_format(d.item_type(), d.item_form());
+ sformats.push(holdArgs.myFormat);
+ break;
+ }
+ }
+ }
+
+ for( var i = 0; i < desc.length; i++ ) {
+ var d = desc[i];
+ if( d.item_lang() != lang ) continue;
+ formats.push( _t_f_2_format(d.item_type(), d.item_form()));
+ }
+
+ formats = uniquify(formats);
+
+ return {
+ lang : lang,
+ avail_formats : formats,
+ sel_formats : sformats
+ };
+}
+
+
+
+function _t_f_2_format(type, form) {
+ if( form == 'd' ) return 'at-d';
+ return (type == 'a' || type == 't') ? 'at' :
+ ( type == 'i' || type == 'g' || type == 'j' ) ? type : null;
+}
+
+function holdsSetSelectedFormats() {
+
+ var cn = $('holds_alt_formats_row').className;
+ if( cn && cn.match(/hide_me/) ) return;
+
+ var selector = $('hold_alt_form_selector');
+ var vals = getSelectedList(selector);
+
+ if(vals.length == 0) return;
+
+ var fstring = "";
+
+ if( contains(vals, 'at-d') ) {
+ if( contains(vals, 'at') )
+ fstring = 'at';
+ else
+ fstring = 'at-d';
+ } else {
+ if( contains(vals, 'at') )
+ fstring = 'at';
+ }
+
+ for( var i = 0; i < vals.length; i++ ) {
+ var val = vals[i];
+ if( !val.match(/at/) ) fstring = val + fstring;
+ }
+
+ if( holdArgs.language ) {
+ if( fstring.match(/-/) )
+ fstring = fstring + '-' + holdArgs.language;
+ else
+ fstring = fstring + '--' + holdArgs.language;
+ }
+
+
+ return fstring;
+}
+
+
+function holdsCheckPossibility(pickuplib, hold, recurse) {
+
+ var args = {
+ titleid : holdArgs.record,
+ volume_id : holdArgs.volume,
+ copy_id : holdArgs.copy,
+ hold_type : holdArgs.type,
+ patronid : holdArgs.recipient.id(),
+ depth : 0,
+ pickup_lib : pickuplib
+ };
+
+ if(recurse) {
+ /* if we're calling create again (recursing),
+ we know that the hold possibility check already succeeded */
+ holdHandleCreateResponse({_recurse:true, _hold:hold}, true );
+
+ } else {
+ _debug("hold possible args = "+js2JSON(args));
+
+ var req = new Request(CHECK_HOLD_POSSIBLE, G.user.session, args );
+
+ req.request.alertEvent = false;
+ req.request._hold = hold;
+ req.request._recurse = recurse;
+ req.callback(holdHandleCreateResponse);
+ req.send();
+ }
+}
+
+
+function holdsBuildOrgSelector(node) {
+
+ if(!node) node = globalOrgTree;
+ if(!isTrue(node.opac_visible())) return;
+
+ var selector = $('holds_org_selector');
+ var index = selector.options.length;
+
+ var type = findOrgType(node.ou_type());
+ var indent = type.depth() - 1;
+ var opt = setSelectorVal( selector, index, node.name(), node.id(), null, indent );
+ if(!type.can_have_users()) {
+ opt.disabled = true;
+ addCSSClass(opt, 'disabled_option');
+ }
+
+ for( var i in node.children() ) {
+ var child = node.children()[i];
+ if(child) holdsBuildOrgSelector(child);
+ }
+}
+
+function holdsBuildHoldFromWindow() {
+
+ var org = getSelectorVal($('holds_org_selector'));
+ var node = findOrgUnit(org);
+ var ntype = findOrgType(node.ou_type());
+ if(!ntype.can_have_users()) {
+ alertId('holds_pick_good_org');
+ return;
+ }
+
+ var hold = new ahr();
+ if(holdArgs.editHold) {
+ hold = holdArgs.editHold;
+ holdArgs.editHold = null;
+ }
+
+ if( $('holds_enable_phone').checked ) {
+ var phone = $('holds_phone').value;
+ if( !phone || !phone.match(REGEX_PHONE) ) {
+ alert($('holds_bad_phone').innerHTML);
+ return null;
+ }
+ hold.phone_notify(phone);
+
+ } else {
+ hold.phone_notify("");
+ }
+
+ if( $('holds_enable_email').checked )
+ hold.email_notify(1);
+ else
+ hold.email_notify(0);
+
+ var target;
+
+ switch(holdArgs.type) {
+ case 'M':
+ target = holdArgs.metarecord; break;
+ case 'T':
+ target = holdArgs.record; break;
+ case 'V':
+ target = holdArgs.volume; break;
+ case 'C':
+ target = holdArgs.copy; break;
+ }
+
+
+
+ hold.pickup_lib(org);
+ //hold.request_lib(org);
+ hold.requestor(holdArgs.requestor.id());
+ hold.usr(holdArgs.recipient.id());
+ hold.target(target);
+ hold.hold_type(holdArgs.type);
+
+ var expDate = dijit.byId('holds_expire_time').getValue();
+ if(expDate) {
+ var expireDate = dojo.date.stamp.toISOString(expDate);
+ expireDate = holdsVerifyThawDate(expireDate);
+ if(expireDate)
+ hold.expire_time(expireDate);
+ else
+ return;
+ }
+
+ // see if this hold should be frozen and for how long
+ if($('holds_frozen_chkbox').checked) {
+ hold.frozen('t');
+ unHideMe($('hold_frozen_thaw_row'));
+ thawDate = dojo.date.stamp.toISOString(dijit.byId('holds_frozen_thaw_input').getValue());
+ if(thawDate) {
+ thawDate = holdsVerifyThawDate(thawDate);
+ if(thawDate)
+ hold.thaw_date(thawDate);
+ else
+ return;
+ } else {
+ hold.thaw_date(null);
+ }
+ } else {
+ hold.frozen('f');
+ hold.thaw_date(null);
+ }
+
+ //check for alternate hold formats
+ var fstring = holdsSetSelectedFormats();
+ if(fstring) {
+ hold.hold_type('M');
+ hold.holdable_formats(fstring);
+ hold.target(holdArgs.metarecord);
+ }
+ return hold;
+}
+
+function holdsPlaceHold(hold, recurse) {
+ if(!hold) return;
+ swapCanvas($('check_holds_box'));
+ holdsCheckPossibility(hold.pickup_lib(), hold, recurse);
+}
+
+
+function holdHandleCreateResponse(r, recurse) {
+
+ if(!recurse) {
+ var res = r.getResultObject();
+ if(checkILSEvent(res) || res.success != 1) {
+ if(res.success != 1) {
+ alert($('hold_not_allowed').innerHTML);
+ } else {
+ if( res.textcode == 'PATRON_BARRED' ) {
+ alertId('hold_failed_patron_barred');
+ } else {
+ alert($('hold_not_allowed').innerHTML);
+ }
+ }
+ swapCanvas($('holds_box'));
+ return;
+ }
+ r._hold.selection_depth(res.depth);
+ }
+
+ holdCreateHold(r._recurse, r._hold);
+}
+
+
+function holdCreateHold( recurse, hold ) {
+ var method = CREATE_HOLD;
+ if(recurse) method = CREATE_HOLD_OVERRIDE;
+ var req = new Request( method, holdArgs.requestor.session, hold );
+ req.request.alertEvent = false;
+ req.send(true);
+ var res = req.result();
+ holdProcessResult(hold, res, recurse);
+
+ showCanvas();
+
+ runEvt('common', 'holdUpdated');
+}
+
+
+function holdProcessResult( hold, res, recurse ) {
+
+ if( res == '1' ) {
+ alert($('holds_success').innerHTML);
+ holdArgs = null;
+
+ } else {
+
+ if( recurse ) {
+ alert($('holds_failure').innerHTML);
+ return;
+ }
+
+ if( grep(res, function(e) { return (e.textcode == 'HOLD_EXISTS'); }) ) {
+ if( fetchPermOrgs('HOLD_EXISTS.override')[0] != -1 ) {
+ if( confirm($('hold_dup_exists_override').innerHTML) ) {
+ return holdsPlaceHold(hold, true);
+ }
+
+ } else {
+ return alert($('hold_dup_exists').innerHTML);
+ }
+ }
+
+ alert($('holds_failure').innerHTML);
+ }
+}
+
+
+function holdsCancel(holdid, user) {
+ if(!user) user = G.user;
+ var req = new Request(CANCEL_HOLD, user.session, holdid, /* Patron via OPAC */ 6);
+ req.send(true);
+ return req.result();
+ runEvt('common', 'holdUpdated');
+}
+
+function holdsUpdate(hold, user) {
+ if(!user) user = G.user;
+ var req = new Request(UPDATE_HOLD, user.session, hold);
+ req.send(true);
+ var x = req.result(); // cause an exception if there is one
+ runEvt('common', 'holdUpdated');
+}
+
+/* verify that the thaw date is valid and after today */
+function holdsVerifyThawDate(dateString, isGreater) {
+ thawDate = dojo.date.stamp.fromISOString(dateString);
+ if(thawDate) {
+ if(isGreater) {
+ if(dojo.date.compare(thawDate) > 0) {
+ return dojo.date.stamp.toISOString(thawDate);
+ }
+ } else {
+ return dojo.date.stamp.toISOString(thawDate);
+ }
+ }
+ return null;
+}
+
+function holdsVerifyThawDateUI(element) {
+ value = dojo.date.stamp.toISOString(dijit.byId(element).getValue());
+
+ if(!value) {
+ removeCSSClass($(element), 'invalid_field');
+ return;
+ }
+
+ if(!holdsVerifyThawDate(value, true)) {
+ addCSSClass($(element), 'invalid_field');
+ } else {
+ removeCSSClass($(element), 'invalid_field');
+ }
+}
+
Added: conifer/trunk/web/opac/skin/uwin/js/mresult.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/mresult.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/mresult.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,121 @@
+//var records = {};
+var records = [];
+var ranks = [];
+var onlyrecord = {};
+var table;
+var mresultPreCache = 200;
+var searchTimer;
+
+attachEvt("common", "unload", mresultUnload);
+attachEvt("common", "run", mresultDoSearch);
+attachEvt("result", "idsReceived", mresultSetRecords);
+attachEvt("result", "idsReceived", mresultCollectRecords);
+
+function mresultUnload() { removeChildren(table); table = null;}
+
+hideMe($('copyright_block'));
+
+function mresultDoSearch() {
+
+
+ TFORM = null; /* clear the rresult tform var so it's not propogated */
+
+ swapCanvas($('loading_alt'));
+ table = G.ui.result.main_table;
+
+ while( table.parentNode.rows.length <= (getDisplayCount() + 1) )
+ table.appendChild(G.ui.result.row_template.cloneNode(true));
+
+ if( (getSearches() || getAdvTerm()) && !getTerm() ) {
+ if(getAdvType() == ADVTYPE_MULTI ) mresultCollectAdvIds();
+
+ } else {
+ _mresultCollectIds();
+ ADVTERM = "";
+ ADVTYPE = "";
+ }
+}
+
+function _mresultCollectIds() {
+ resultCollectSearchIds(true, SEARCH_MRS_QUERY, mresultHandleMRIds );
+}
+
+function mresultCollectAdvIds() {
+ resultCollectSearchIds(false, SEARCH_MRS_QUERY, mresultHandleMRIds );
+}
+
+
+function mresultHandleMRIds(r) {
+ var res = r.getResultObject();
+ resultCompiledSearch = res.compiled_search;
+ cookieManager.write(COOKIE_SEARCH, js2JSON(res.compiled_search), -1);
+ if(res.count != null) {
+ if( getOffset() == 0 ) HITCOUNT = res.count;
+ runEvt('result', 'hitCountReceived');
+ }
+ runEvt('result', 'idsReceived', res.ids);
+}
+
+
+
+function mresultSetRecords(idstruct) {
+ if(!idstruct) return;
+ var o = getOffset();
+ for( var x = o; x < idstruct.length + o; x++ ) {
+ if( idstruct[x-o] != null ) {
+ var r = parseInt(idstruct[x - o][0]);
+ var ra = parseFloat(idstruct[x - o][1]);
+ var or = parseInt(idstruct[x - o][2]);
+ if(!isNull(r) && !isNaN(r)) records[x] = r;
+ if(!isNull(ra) && !isNaN(ra)) ranks[x] = ra;
+ if(!isNull(or) && !isNaN(or)) onlyrecord[x] = or;
+ }
+ }
+
+ TOPRANK = ranks[getOffset()];
+}
+
+
+
+function mresultCollectRecords() {
+ if(getHitCount() > 0 ) runEvt("result", "preCollectRecords");
+ var i = 0;
+ for( var x = getOffset(); x!= getDisplayCount() + getOffset(); x++ ) {
+ if(isNull(records[x])) break;
+ if(isNaN(records[x])) continue;
+ var req = new Request(FETCH_MRMODS, records[x]);
+
+ req.request.userdata = i++;
+
+ /* wait at most 10 seconds for the mods rec to come back */
+ /* this needs more testing */
+ req.request.timeout(10);
+ req.request.abortCallback(
+ function(){
+ recordsHandled++;
+ if(resultPageIsDone()) {
+ runEvt('result', 'allRecordsReceived', recordsCache);
+ unHideMe($('copyright_block'));
+ }
+ }
+ );
+
+ req.callback(mresultHandleMods);
+ req.send();
+ }
+}
+
+function mresultHandleMods(r) {
+ var rec = r.getResultObject();
+ var pagePosition = r.userdata;
+ runEvt('result', 'recordReceived', rec, pagePosition, true);
+ if(rec) resultCollectCopyCounts(rec, pagePosition, FETCH_MR_COPY_COUNTS);
+ if(resultPageIsDone()) {
+ runEvt('result', 'allRecordsReceived', recordsCache);
+ unHideMe($('copyright_block')); /* *** */
+ }
+}
+
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/myopac.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/myopac.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/myopac.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,1715 @@
+
+attachEvt("common", "run", myOPACInit );
+//attachEvt("common", "loggedIn", myOPACInit );
+attachEvt('common','locationUpdated', myopacReload );
+
+var fleshedUser = null;
+var fleshedContainers = {};
+var holdCache = {};
+var holdStatusCache = {};
+var allowPendingAddr = false;
+
+function clearNodes( node, keepArray ) {
+ if(!node) return;
+ for( var n in keepArray ) node.removeChild(keepArray[n]);
+ removeChildren(node);
+ for( var n in keepArray ) node.appendChild(keepArray[n]);
+}
+
+function myOPACInit() {
+
+ if(!(G.user && G.user.session)) {
+ initLogin();
+
+ } else {
+
+ allowPendingAddr = fetchOrgSettingDefault(G.user.home_ou(), 'opac.allow_pending_address');
+ if(allowPendingAddr)
+ unHideMe($('myopac_pending_addr_td'));
+ myOPACChangePage( "summary" );
+ }
+
+ $('myopac_holds_thaw_date_input').onkeyup =
+ function(){holdsVerifyThawDateUI('myopac_holds_thaw_date_input'); }
+ $('myopac_holds_thaw_date_input').onchange =
+ function(){holdsVerifyThawDateUI('myopac_holds_thaw_date_input'); }
+
+}
+
+function myopacReload() {
+ //swapCanvas($('myopac_reloading'));
+ var a = {};
+ a[PARAM_LOCATION] = getNewSearchLocation();
+ a[PARAM_DEPTH] = getNewSearchDepth();
+ hideMe($('canvas_main'));
+ goTo(buildOPACLink(a, true));
+}
+
+
+function myOPACChangePage( page ) {
+ showCanvas();
+
+ var s = $("myopac_summary_td");
+ var c = $("myopac_checked_td");
+ var f = $("myopac_fines_td");
+ var h = $("myopac_holds_td");
+ var p = $("myopac_prefs_td");
+ var b = $('myopac_bookbag_td');
+
+ var ss = $("myopac_summary_div");
+ var cc = $("myopac_checked_div");
+ var ff = $("myopac_fines_div");
+ var hh = $("myopac_holds_div");
+ var pp = $("myopac_prefs_div");
+ var bb = $('myopac_bookbag_div');
+
+ var cls = "myopac_link";
+ var acls = "myopac_link_active";
+
+ hideMe(ss);
+ hideMe(cc); hideMe(ff);
+ hideMe(hh); hideMe(pp);
+ hideMe(bb);
+
+ removeCSSClass(s, acls );
+ removeCSSClass(c, acls );
+ removeCSSClass(f, acls );
+ removeCSSClass(h, acls );
+ removeCSSClass(p, acls );
+ removeCSSClass(b, acls );
+
+ switch( page ) {
+
+ case "summary":
+ unHideMe(ss);
+ addCSSClass(s, acls );
+ myOPACShowSummary();
+ break;
+
+ case "checked":
+ unHideMe(cc);
+ addCSSClass(c, acls );
+ myOPACShowChecked();
+ break;
+
+ case "holds":
+ unHideMe(hh);
+ addCSSClass(h, acls );
+ myOPACShowHolds();
+ break;
+
+ case "fines":
+ unHideMe(ff);
+ addCSSClass(f, acls );
+ myOPACShowFines();
+ break;
+
+ case "prefs":
+ unHideMe(pp);
+ addCSSClass(p, acls );
+ myOPACShowPrefs();
+ break;
+
+ case 'bookbag':
+ unHideMe(bb);
+ addCSSClass(b, acls);
+ myOPACShowBookbags();
+ break;
+ }
+}
+
+function myOPACShowChecked() {
+ if(checkedDrawn) return;
+ var req = new Request(FETCH_CHECKED_OUT_SUM, G.user.session, G.user.id());
+ req.callback(myOPACDrawCheckedOutSlim);
+ req.send();
+
+ var nreq = new Request(FETCH_NON_CAT_CIRCS, G.user.session);
+ nreq.callback(myOPACDrawNonCatCircs);
+ nreq.send();
+}
+
+
+var checkedRowTemplate;
+var circsCache = new Array();
+var checkedDrawn = false;
+
+function moClearCheckedTable() {
+ var tbody = $("myopac_checked_tbody");
+ var loading = $("myopac_checked_loading");
+ var none = $("myopac_checked_none");
+ clearNodes( tbody, [ loading, none ] );
+}
+
+var __can_renew_one = false;
+
+function myOPACDrawCheckedOutSlim(r) {
+
+ var checked = r.getResultObject();
+ var tbody = $("myopac_checked_tbody");
+ var loading = $("myopac_checked_loading");
+ var none = $("myopac_checked_none");
+
+ __can_renew_one = false;
+
+ if(checkedDrawn) return;
+ checkedDrawn = true;
+ if(!checkedRowTemplate)
+ checkedRowTemplate = tbody.removeChild($("myopac_checked_row"));
+
+ moClearCheckedTable();
+
+ hideMe(loading); /* remove all children and start over */
+ if(!(checked && (checked.out || checked.overdue))) {
+ unHideMe(none);
+ return;
+ }
+
+ for( var i = 0; i < checked.overdue.length; i++ ) {
+ var req = new Request(FETCH_CIRC_BY_ID, G.user.session, checked.overdue[i]);
+ req.request.tbody = tbody;
+ req.request.od = true;
+ req.callback(myOPACDrawCheckedItem);
+ req.send();
+ }
+
+
+ for( var i = 0; i < checked.out.length; i++ ) {
+ var req = new Request(FETCH_CIRC_BY_ID, G.user.session, checked.out[i]);
+ req.request.tbody = tbody;
+ req.callback(myOPACDrawCheckedItem);
+ req.send();
+ }
+
+ appendClear($('mo_items_out_count'),
+ text(new String( parseInt(checked.overdue.length) + parseInt(checked.out.length) )) );
+
+ if( checked.overdue.length > 0 ) {
+ addCSSClass($('mo_items_overdue_count'), 'overdue');
+ appendClear($('mo_items_overdue_count'),
+ text(new String( parseInt(checked.overdue.length) )) );
+ }
+
+}
+
+
+function myOPACDrawCheckedItem(r) {
+
+ var circ = r.getResultObject();
+ var tbody = r.tbody;
+ var row = checkedRowTemplate.cloneNode(true);
+ row.id = 'myopac_checked_row_ ' + circ.id();
+ row.setAttribute('circid', circ.id());
+
+ var due = _trimTime(circ.due_date());
+
+ var dlink = $n( row, "myopac_checked_due" );
+ var rlink = $n( row, "myopac_checked_renewals" );
+ //var rnlink = $n( row, "myopac_checked_renew_link" );
+
+ //if( r.od ) due = elem('b', {style:'color:red;font-size:110%'},due);
+ if( r.od ) {
+ due = elem('b', null, due);
+ addCSSClass(due, 'overdue');
+ } else {
+ due = text(due);
+ }
+
+ dlink.appendChild(due);
+ rlink.appendChild(text(circ.renewal_remaining()));
+ unHideMe(row);
+ //rnlink.setAttribute('href', 'javascript:myOPACRenewCirc("'+circ.id()+'");');
+ circsCache.push(circ);
+
+ if( circ.renewal_remaining() < 1 ) {
+ $n(row, 'selectme').disabled = true;
+ if(!__can_renew_one)
+ $('mo_renew_button').disabled = true;
+ } else {
+ __can_renew_one = true;
+ $('mo_renew_button').disabled = false;
+ $n(row, 'selectme').disabled = false;
+ }
+
+ tbody.appendChild(row);
+
+ var req = new Request(FETCH_MODS_FROM_COPY, circ.target_copy() );
+ req.request.alertEvent = false;
+ req.request.circ = circ.id();
+ req.request.copy = circ.target_copy();
+ req.callback(myOPACDrawCheckedTitle);
+ req.send();
+}
+
+var __circ_titles = {};
+
+function myOPACDrawCheckedTitle(r) {
+ var record = r.getResultObject();
+ var circid = r.circ;
+
+ if(!record || checkILSEvent(record)) {
+ var req = new Request( FETCH_COPY, r.copy );
+ req.request.circ = circid
+ req.callback(myOPACDrawNonCatalogedItem);
+ req.send();
+ return;
+ }
+
+ var row = $('myopac_checked_row_ ' + circid);
+ var tlink = $n( row, "myopac_checked_title_link" );
+ var alink = $n( row, "myopac_checked_author_link" );
+ buildTitleDetailLink(record, tlink);
+ buildSearchLink(STYPE_AUTHOR, record.author(), alink);
+ __circ_titles[circid] = record.title();
+}
+
+function myOPACDrawNonCatalogedItem(r) {
+ var copy = r.getResultObject();
+ var circid = r.circ;
+
+ var row = $('myopac_checked_row_ ' + circid);
+ var tlink = $n( row, "myopac_checked_title_link" );
+ var alink = $n( row, "myopac_checked_author_link" );
+
+ tlink.parentNode.appendChild(text(copy.dummy_title()));
+ alink.parentNode.appendChild(text(copy.dummy_author()));
+ __circ_titles[circid] = copy.dummy_title();
+}
+
+
+/*
+function myOPACRenewCirc(circid) {
+
+ var circ;
+ for( var i = 0; i != circsCache.length; i++ )
+ if(circsCache[i].id() == circid)
+ circ = circsCache[i];
+
+ if(!confirm($('myopac_renew_confirm').innerHTML)) return;
+
+ var req = new Request(RENEW_CIRC, G.user.session,
+ { patron : G.user.id(), copyid : circ.target_copy(), opac_renewal : 1 } );
+ req.request.alertEvent = false;
+ req.send(true);
+ var res = req.result();
+
+ if(checkILSEvent(res) || checkILSEvent(res[0])) {
+ alertId('myopac_renew_fail');
+ return;
+ }
+
+ alert($('myopac_renew_success').innerHTML);
+ checkedDrawn = false;
+ myOPACShowChecked();
+}
+*/
+
+
+
+function myOPACShowHolds() {
+ var req = new Request(FETCH_HOLDS, G.user.session, G.user.id());
+ req.callback(myOPACDrawHolds);
+ req.send();
+ $('myopac_holds_actions_none').selected = true;
+}
+
+var holdsTemplateRowOrig;
+var holdsTemplateRow;
+var myopacForceHoldsRedraw = false;
+function myOPACDrawHolds(r) {
+
+ var tbody = $("myopac_holds_tbody");
+ if(holdsTemplateRow && !myopacForceHoldsRedraw) return;
+ myopacForceHoldsRedraw = false;
+
+ if(holdsTemplateRowOrig) {
+ holdsTemplateRow = holdsTemplateRowOrig;
+ removeChildren(tbody);
+ } else {
+ holdsTemplateRow = tbody.removeChild($("myopac_holds_row"));
+ holdsTemplateRowOrig = holdsTemplateRow;
+ }
+
+ hideMe($('myopac_holds_loading'));
+
+ var holds = r.getResultObject();
+
+ if(!holds || holds.length < 1) unHideMe($('myopac_holds_none'));
+ for( var i = 0; i != holds.length; i++ ) {
+
+ var h = holds[i];
+ holdCache[h.id()] = h;
+
+ var row = holdsTemplateRow.cloneNode(true);
+ row.id = "myopac_holds_row_" + h.id();
+
+ var form = $n(row, "myopac_holds_formats");
+ form.id = "myopac_holds_form_" + h.id();
+
+ var orglink = $n(row, "myopac_holds_location");
+ orglink.appendChild(text(findOrgUnit(h.pickup_lib()).name()));
+
+ tbody.appendChild(row);
+
+ $n(row,'myopac_holds_edit_link').setAttribute(
+ 'href','javascript:myOPACEditHold("'+ h.id()+'");');
+
+ if(isTrue(h.frozen())) {
+ hideMe($n(row, 'myopac_hold_unfrozen_true'))
+ unHideMe($n(row, 'myopac_hold_unfrozen_false'))
+ if(h.thaw_date()) {
+ var d = dojo.date.stamp.fromISOString(h.thaw_date());
+ $n(row, 'myopac_holds_frozen_until').appendChild(text(dojo.date.locale.format(d, {selector: 'date', fullYear: true})));
+ }
+ } else {
+ unHideMe($n(row, 'myopac_hold_unfrozen_true'))
+ hideMe($n(row, 'myopac_hold_unfrozen_false'))
+ }
+
+ $n(row, 'myopac_holds_selected_chkbx').checked = false;
+
+ var exp_date;
+ if(h.expire_time()) {
+ exp_date = dojo.date.stamp.fromISOString(h.expire_time());
+ $n(row, 'myopac_hold_expire_time').appendChild(
+ text(dojo.date.locale.format(exp_date, {selector:'date'})));
+ }
+
+ unHideMe(row);
+
+ var interval = fetchOrgSettingDefault(G.user.home_ou(), 'circ.hold_expire_alert_interval');
+ if(interval && exp_date) {
+ secs = interval_to_seconds(interval) * 1000;
+ var diff = exp_date.getTime() - new Date().getTime();
+ if(diff < secs)
+ addCSSClass($n(row, 'myopac_hold_expire_time'), 'hold_expire_warning');
+ }
+
+ myOPACDrawHoldTitle(h);
+ myOPACDrawHoldStatus(h);
+ }
+}
+
+function myOPACEditHold(holdid) {
+ var hold = holdCache[holdid];
+
+ holdsDrawEditor(
+ {
+ editHold : hold,
+ onComplete : function(){
+ holdsTemplateRow = null;
+ myOPACShowHolds();
+ }
+ }
+ );
+}
+
+
+function myOPACDrawHoldStatus(hold) {
+ var req = new Request(FETCH_HOLD_STATUS, G.user.session, hold.id() );
+ req.callback(myOShowHoldStatus);
+ req.request.hold = hold;
+ req.send();
+}
+
+var myopacShowHoldEstimate = false;
+function myOShowHoldStatus(r) {
+
+ var hold = r.hold;
+ var qstats = r.getResultObject();
+ holdStatusCache[hold.id()] = qstats;
+
+ var row = $("myopac_holds_row_" + r.hold.id());
+
+ if(qstats.estimated_wait || myopacShowHoldEstimate) {
+ myopacShowHoldEstimate = true;
+ if(qstats.estimated_wait)
+ $n(row, 'myopac_holds_estimated_wait').appendChild(text(qstats.estimated_wait));
+ unHideMe($('myopac_holds_estimated_wait_column'));
+ unHideMe($n(row, 'myopac_holds_estimated_wait'));
+ }
+
+ if( qstats.status == 4 ) {
+ unHideMe($n(row, 'hold_status_available'));
+ hideMe($n(row, 'myopac_holds_cancel_link'));
+ }
+
+ if(false) {
+ var node = $n(row, 'hold_qstats');
+ // XXX best way to display this info + dojo i18n
+ node.appendChild(text('hold #' + qstats.queue_position+' of '+qstats.queue_position+' and '+qstats.potential_copies+' item(s)'));
+ unHideMe(node);
+
+ } else {
+ if( qstats.status < 3 )
+ unHideMe($n(row, 'hold_status_waiting'));
+
+ if( qstats.status == 3 )
+ unHideMe($n(row, 'hold_status_transit'));
+ }
+}
+
+
+function myOPACDrawHoldTitle(hold) {
+ var method;
+
+ if( hold.hold_type() == 'T' || hold.hold_type() == 'M' ) {
+ if(hold.hold_type() == "M") method = FETCH_MRMODS;
+ if(hold.hold_type() == "T") method = FETCH_RMODS;
+ var req = new Request(method, hold.target());
+ req.callback(myOPACFleshHoldTitle);
+ req.request.hold = hold;
+ req.request.alertEvent = false;
+ req.send();
+
+ } else {
+ holdFetchObjects(hold,
+ function(a) { _myOPACFleshHoldTitle(hold, a);});
+ }
+}
+
+function myOPACFleshHoldTitle(r) {
+ var rec = r.getResultObject();
+ _myOPACFleshHoldTitle(r.hold, {recordObject: rec});
+}
+
+function _myOPACFleshHoldTitle(hold, holdObjects) {
+
+ var record = holdObjects.recordObject;
+ var volume = holdObjects.volumeObject;
+ var copy = holdObjects.copyObject;
+
+ var row = $("myopac_holds_row_" + hold.id());
+ var title_link = $n(row, "myopac_holds_title_link");
+ var author_link = $n(row, "myopac_holds_author_link");
+
+ if(!record || checkILSEvent(record) ) {
+ addCSSClass(row, 'invalid_hold');
+ $n(row, 'myopac_holds_edit_link').setAttribute('href', 'javascript:void(0);');
+ $n(row, 'myopac_holds_edit_link').onclick = function(){alertId('invalid_hold');};
+ return;
+ }
+
+ buildTitleDetailLink(record, title_link);
+ buildSearchLink(STYPE_AUTHOR, record.author(), author_link);
+
+ if( volume ) {
+ $n(row, 'volume').appendChild(text(volume.label()));
+ unHideMe($n(row, 'vol_copy'));
+ if(copy) $n(row, 'copy').appendChild(text(copy.barcode()));
+ }
+
+ var form = $("myopac_holds_form_" + hold.id());
+
+ if(form) {
+ var mods_formats = record.types_of_resource();
+
+ if( hold.hold_type() == 'M' ) {
+ var data = holdsParseMRFormats(hold.holdable_formats());
+ mods_formats = data.mods_formats;
+ }
+
+ for( var i = 0; i < mods_formats.length; i++ ) {
+ var img = elem("img");
+ setResourcePic(img, mods_formats[i]);
+ form.appendChild(img);
+ }
+ }
+}
+
+var finesShown = false;
+function myOPACShowFines() {
+ if(finesShown) return; finesShown = true;
+ var req = new Request(FETCH_FINES_SUMMARY, G.user.session, G.user.id() );
+ req.callback(_myOPACShowFines);
+ req.send();
+}
+
+function _myOPACShowFines(r) {
+ hideMe($('myopac_fines_summary_loading'));
+ unHideMe($('myopac_fines_summary_row'));
+
+ var summary = r.getResultObject();
+ var total = "0.00"; /* localization? */
+ var paid = "0.00";
+ var balance = "0.00";
+ if( instanceOf(summary,mous) ) {
+
+ total = _finesFormatNumber(summary.total_owed());
+ paid = _finesFormatNumber(summary.total_paid());
+ balance = _finesFormatNumber(summary.balance_owed());
+
+ var req = new Request(FETCH_TRANSACTIONS, G.user.session, G.user.id() );
+ req.callback(myOPACShowTransactions);
+ req.send();
+ }
+
+ $('myopac_fines_summary_total').appendChild(text(total));
+ $('myopac_fines_summary_paid').appendChild(text(paid));
+ $('myopac_fines_summary_balance').appendChild(text(balance));
+}
+
+function _finesFormatNumber(num) {
+ if(isNull(num)) num = 0;
+ num = num + "";
+ if(num.length < 2 || !num.match(/\./)) num += ".00";
+ if(num.match(/\./) && num.charAt(num.length-2) == '.') num += "0";
+ return num;
+}
+
+//function _trimTime(time) { if(!time) return ""; return time.replace(/\ .*/,""); }
+function _trimTime(time) {
+ if(!time) return "";
+ var d = dojo.date.stamp.fromISOString(time);
+ if(!d) return ""; /* date parse failed */
+ return d.iso8601Format('YMD');
+}
+
+function _trimSeconds(time) {
+ if(!time) return "";
+ var d = dojo.date.stamp.fromISOString(time);
+ if(!d) return ""; /* date parse failed */
+ return d.iso8601Format('YMDHM',null,true,true);
+}
+
+function myOPACShowTransactions(r) {
+
+ if(myopacGenericTransTemplate || myopacCircTransTemplate) return;
+
+ var transactions = r.getResultObject();
+
+ for( var idx in transactions ) {
+
+ var trans = transactions[idx].transaction;
+ var record = transactions[idx].record;
+ var circ = transactions[idx].circ;
+
+ if(trans.xact_type() == 'circulation')
+ myOPACShowCircTransaction(trans, record, circ);
+
+ else if(trans.xact_type() == 'grocery' )
+ myopacShowGenericTransaction( trans );
+ }
+}
+
+var myopacGenericTransTemplate;
+function myopacShowGenericTransaction( trans ) {
+ var tbody = $('myopac_trans_tbody');
+
+ if(!myopacGenericTransTemplate) {
+ myopacGenericTransTemplate =
+ tbody.removeChild($('myopac_trans_row'));
+ removeChildren(tbody);
+ }
+
+ var row = myopacGenericTransTemplate.cloneNode(true);
+
+ $n(row,'myopac_trans_start').appendChild(
+ text(_trimSeconds(trans.xact_start())));
+
+ $n(row,'myopac_trans_last_payment').appendChild(
+ text(_trimSeconds(trans.last_payment_ts())));
+
+ $n(row,'myopac_trans_init_amount').appendChild(
+ text(_finesFormatNumber(trans.total_owed())));
+
+ $n(row,'myopac_trans_total_paid').appendChild(
+ text(_finesFormatNumber(trans.total_paid())));
+
+ $n(row,'myopac_trans_balance').appendChild(
+ text(_finesFormatNumber(trans.balance_owed())));
+
+ var req = new Request(FETCH_MONEY_BILLING, G.user.session, trans.id());
+ req.send(true);
+ var bills = req.result();
+ if(bills && bills[0])
+ $n(row,'myopac_trans_bill_type').appendChild(
+ text(bills[0].billing_type()));
+
+ tbody.appendChild(row);
+ unHideMe($('myopac_trans_div'));
+}
+
+
+
+/* draws a circulation transaction summary */
+var myopacCircTransTemplate;
+function myOPACShowCircTransaction(trans, record, circ) {
+ var tbody = $('myopac_circ_trans_tbody');
+
+ if(!myopacCircTransTemplate) {
+ myopacCircTransTemplate = tbody.removeChild($('myopac_circ_trans_row'));
+ removeChildren(tbody);
+ }
+
+ var row = myopacCircTransTemplate.cloneNode(true);
+
+ if(record) {
+ buildTitleDetailLink(record, $n(row,'myopac_circ_trans_title'));
+
+ $n(row,'myopac_circ_trans_author').appendChild(text(
+ normalize(truncate(record.author(), 65))));
+
+ } else {
+
+ var req = new Request( FETCH_COPY, circ.target_copy() );
+ req.alertEvents = false;
+ req.send(true);
+ var copy = req.result();
+ if( copy ) {
+ $n(row,'myopac_circ_trans_title').appendChild(text(copy.dummy_title()));
+ $n(row,'myopac_circ_trans_author').appendChild(text(copy.dummy_author()));
+ }
+ }
+
+
+ $n(row,'myopac_circ_trans_start').
+ appendChild(text(_trimTime(trans.xact_start())));
+
+ var due = _trimTime(circ.due_date());
+ var checkin = _trimTime(circ.stop_fines_time());
+
+ $n(row,'myopac_circ_trans_due').appendChild(text(due))
+ if(checkin)
+ appendClear($n(row,'myopac_circ_trans_finished'), text(checkin));
+ if(circ.stop_fines() == 'LOST')
+ appendClear($n(row,'myopac_circ_trans_finished'), text(circ.stop_fines()));
+ if(circ.stop_fines() == 'CLAIMSRETURNED')
+ appendClear($n(row,'myopac_circ_trans_finished'), text(""));
+
+
+ $n(row,'myopac_circ_trans_balance').
+ appendChild(text(_finesFormatNumber(trans.balance_owed())));
+
+ tbody.appendChild(row);
+ unHideMe($('myopac_circ_trans_div'));
+}
+
+
+function myOPACSavePrefs() {
+ G.user.prefs[PREF_HITS_PER] = getSelectorVal($('prefs_hits_per'));
+ G.user.prefs[PREF_DEF_FONT] = getSelectorVal($('prefs_def_font'));
+ G.user.prefs[PREF_HOLD_NOTIFY] = getSelectorVal($('prefs_hold_notify'));
+ G.user.prefs[PREF_DEF_DEPTH] = getSelectorVal($('prefs_def_range'));
+
+ if( $('myopac_pref_home_lib').checked == true )
+ G.user.prefs[PREF_DEF_LOCATION] = null;
+ else
+ G.user.prefs[PREF_DEF_LOCATION] = getSelectorVal($('prefs_def_location'));
+
+ if(commitUserPrefs())
+ alert($('prefs_update_success').innerHTML);
+ else alert($('prefs_update_failure').innerHTML);
+}
+
+
+function myOPACShowDefFont() {
+ var font;
+ if(G.user.prefs[PREF_DEF_FONT])
+ font = G.user.prefs[PREF_DEF_FONT];
+ else font = "regular";
+ setSelector($('prefs_def_font'), font);
+}
+
+function myOPACShowHoldNotify() {
+ var pref = G.user.prefs[PREF_HOLD_NOTIFY];
+
+ if(pref) {
+ if(pref.match(/email/i) && pref.match(/phone/i)) {
+ setSelector($('prefs_hold_notify'), 'phone:email');
+ } else if( pref.match(/email/i) ) {
+ setSelector($('prefs_hold_notify'), 'email');
+ } else if( pref.match(/phone/i) ) {
+ setSelector($('prefs_hold_notify'), 'phone');
+ }
+
+ } else {
+ setSelector($('prefs_hold_notify'), 'phone:email');
+ }
+}
+
+function myOPACShowPrefs() {
+ grabUserPrefs();
+ myOPACShowHitsPer();
+ myOPACShowDefFont();
+ myOPACShowHoldNotify();
+ myOPACShowDefLocation();
+ hideMe($('myopac_prefs_loading'));
+}
+
+var defSearchLocationDrawn = false;
+var defDepthIndex = 0;
+function myOPACShowDefLocation() {
+
+ var selector = $('prefs_def_location');
+ var rsel = $('prefs_def_range');
+
+ if(!defSearchLocationDrawn) {
+
+ defSearchLocationDrawn = true;
+
+ var org = G.user.prefs[PREF_DEF_LOCATION];
+
+ if(!org) {
+ $('myopac_pref_home_lib').checked = true;
+ $('prefs_def_location').disabled = true;
+ org = G.user.home_ou();
+ }
+
+ buildOrgSel(selector, globalOrgTree, 0);
+
+ globalOrgTypes = globalOrgTypes.sort(
+ function(a, b) {
+ if( a.depth() < b.depth() ) return -1;
+ return 1;
+ }
+ );
+
+ iterate(globalOrgTypes,
+ function(t) {
+ if( t.depth() <= findOrgDepth(org) ) {
+ setSelectorVal(rsel, defDepthIndex++, t.opac_label(), t.depth());
+ if( t.depth() == findOrgDepth(org) )
+ setSelector(rsel, t.depth());
+ }
+ }
+ );
+ }
+
+ setSelector(selector, org);
+}
+
+function myOPACShowHitsPer() {
+ var hits = 10;
+ if(G.user.prefs[PREF_HITS_PER])
+ hits = G.user.prefs[PREF_HITS_PER];
+ var hitsSel = $('prefs_hits_per');
+ setSelector(hitsSel, hits);
+}
+
+var userShown = false;
+function myOPACShowSummary() {
+ if(userShown) return; userShown = true;
+ var req = new Request(FETCH_FLESHED_USER,G.user.session, G.user.id());
+ req.callback(_myOPACSummaryShowUer);
+ req.send();
+}
+
+var addrRowTemplate;
+var notesTemplate;
+function _myOPACSummaryShowUer(r) {
+
+ var user = r.getResultObject();
+ fleshedUser = user;
+ if(!user) return;
+
+ var expireDate = dojo.date.stamp.fromISOString(user.expire_date());
+ if( expireDate < new Date() ) {
+ appendClear($('myopac.expired.date'), expireDate.iso8601Format('YMD'));
+ unHideMe($('myopac.expired.alert'));
+ }
+
+ var iv1 = user.ident_value()+'';
+ if (iv1.length > 4 && iv1.match(/\d{4}/)) iv1 = iv1.substring(0,4) + '***********';
+
+
+ appendClear($('myopac_summary_prefix'),text(user.prefix()));
+ appendClear($('myopac_summary_first'),text(user.first_given_name()));
+ appendClear($('myopac_summary_middle'),text(user.second_given_name()));
+ appendClear($('myopac_summary_dayphone'),text(user.day_phone()));
+ appendClear($('myopac_summary_eveningphone'),text(user.evening_phone()));
+ appendClear($('myopac_summary_otherphone'),text(user.other_phone()));
+ appendClear($('myopac_summary_last'),text(user.family_name()));
+ appendClear($('myopac_summary_suffix'),text(user.suffix()));
+ appendClear($('myopac_summary_username'),text(user.usrname()));
+ appendClear($('myopac_summary_email'),text(user.email()));
+ appendClear($('myopac_summary_barcode'),text(user.card().barcode()));
+ appendClear($('myopac_summary_ident1'),text(iv1));
+ appendClear($('myopac_summary_homelib'),text(findOrgUnit(user.home_ou()).name()));
+ appendClear($('myopac_summary_create_date'),text(_trimTime(user.create_date())));
+
+ var req = new Request(
+ FETCH_USER_NOTES, G.user.session, {pub:1, patronid:G.user.id()});
+ req.callback(myopacDrawNotes);
+ req.send();
+
+
+ var tbody = $('myopac_addr_tbody');
+ var template;
+
+ if(addrRowTemplate) {
+ template = addrRowTemplate;
+ } else {
+ template = tbody.removeChild($('myopac_addr_row'));
+ addrRowTemplate = template;
+ }
+ removeChildren(tbody);
+
+ var addrs = user.addresses();
+ for( var a in addrs ) {
+ var addr = addrs[a];
+ if(!allowPendingAddr && isTrue(addr.pending()))
+ continue;
+ if(addr.replaces() != null) continue;
+ var row = template.cloneNode(true);
+ myOPACDrawAddr(row, addr, addrs);
+ tbody.appendChild(row);
+ }
+}
+
+
+function myopacDrawNotes(r) {
+ var notes = r.getResultObject();
+ var tbody = $('myopac.notes.tbody');
+ if(!notesTemplate)
+ notesTemplate = tbody.removeChild($('myopac.notes.tr'));
+ removeChildren(tbody);
+
+ iterate(notes,
+ function(note) {
+ unHideMe($('myopac.notes.div'));
+ var row = notesTemplate.cloneNode(true);
+ $n(row, 'title').appendChild(text(note.title()));
+ $n(row, 'value').appendChild(text(note.value()));
+ tbody.appendChild(row);
+ }
+ );
+}
+
+
+
+function myOPACDrawAddr(row, addr, addrs) {
+ appendClear($n(row, 'myopac_addr_type'),text(addr.address_type()));
+ appendClear($n(row, 'myopac_addr_street'),text(addr.street1()));
+ appendClear($n(row, 'myopac_addr_street2'),text(addr.street2()));
+ appendClear($n(row, 'myopac_addr_city'),text(addr.city()));
+ appendClear($n(row, 'myopac_addr_county'),text(addr.county()));
+ appendClear($n(row, 'myopac_addr_state'),text(addr.state()));
+ appendClear($n(row, 'myopac_addr_country'),text(addr.country()));
+ appendClear($n(row, 'myopac_addr_zip'),text(addr.post_code()));
+
+ if(!allowPendingAddr) return;
+
+ $n(row, 'myopac_addr_edit_link').onclick = function(){myopacEditAddress(addr)};
+ unHideMe($n(row, 'myopac_addr_edit_td'));
+
+ /* if we have a replacement address, plop it into the table next to this addr */
+ var repl = grep(addrs,
+ function(a) {
+ return a.replaces() == addr.id();
+ }
+ );
+
+ $n(row, 'myopac_pending_addr_td').id = 'myopac_pending_addr_td_' + addr.id();
+
+ if(repl) {
+ hideMe($n(row, 'myopac_addr_edit_td')); // hide the edit link
+ repl = repl[0];
+ myopacSetAddrInputs(row, repl);
+ }
+}
+
+function myopacEditAddress(addr) {
+ var td = $('myopac_pending_addr_td_' + addr.id());
+ var row = td.parentNode;
+ myopacSetAddrInputs(row, addr);
+}
+
+function myopacSetAddrInputs(row, addr, prefix) {
+ unHideMe($n(row, 'myopac_pending_addr_td'));
+ $n(row, 'myopac_pending_addr_type').value = addr.address_type();
+ $n(row, 'myopac_pending_addr_street').value = addr.street1();
+ $n(row, 'myopac_pending_addr_street2').value = addr.street2();
+ $n(row, 'myopac_pending_addr_city').value = addr.city();
+ $n(row, 'myopac_pending_addr_county').value = addr.county();
+ $n(row, 'myopac_pending_addr_state').value = addr.state();
+ $n(row, 'myopac_pending_addr_country').value = addr.country();
+ $n(row, 'myopac_pending_addr_zip').value = addr.post_code();
+ $n(row, 'myopac_pending_addr_edit_link').onclick = function(){myopacSaveAddress(row, addr)};
+ $n(row, 'myopac_pending_addr_del_link').onclick = function(){myopacSaveAddress(row, addr, true)};
+}
+
+// if no pending addr exists, this is called with the original address
+function myopacSaveAddress(row, addr, deleteMe) {
+
+ if(addr.replaces() == null) {
+ // we are editing a non-pending address. create a pending address to manage that
+ var repl = new aua();
+ repl.usr(addr.usr());
+ repl.address_type(addr.address_type());
+ repl.within_city_limits(addr.within_city_limits());
+ repl.replaces(addr.id());
+ repl.pending('t');
+ repl.isnew(true);
+ repl.id(null);
+ addr = repl;
+ }
+
+ if(deleteMe) {
+ if(addr.id() == null) {
+ hideMe($n(row, 'myopac_pending_addr_td'));
+ return;
+ }
+ addr.isdeleted(true);
+ } else {
+ addr.address_type($n(row, 'myopac_pending_addr_type').value);
+ addr.street1($n(row, 'myopac_pending_addr_street').value);
+ addr.street2($n(row, 'myopac_pending_addr_street2').value);
+ addr.city($n(row, 'myopac_pending_addr_city').value);
+ addr.county($n(row, 'myopac_pending_addr_county').value);
+ addr.state($n(row, 'myopac_pending_addr_state').value);
+ addr.country($n(row, 'myopac_pending_addr_country').value);
+ addr.post_code($n(row, 'myopac_pending_addr_zip').value);
+ }
+
+ var req = new Request(
+ 'open-ils.actor:open-ils.actor.user.address.pending.cud',
+ G.user.session, addr);
+
+ req.callback(
+ function(r) {
+ var resp = r.getResultObject();
+
+ if(addr.isnew()) {
+ // new, add to list of addrs
+ addr.id(resp);
+ fleshedUser.addresses().push(addr);
+
+ } else {
+ // deleted, remove from list of addrs
+ if(addr.isdeleted()) {
+ hideMe($n(row, 'myopac_pending_addr_td'));
+ var addrs = [];
+ for(var i in fleshedUser.addresses()) {
+ var a = fleshedUser.addresses()[i];
+ if(a.id() != addr.id())
+ addrs.push(a);
+ }
+ fleshedUser.addresses(addrs);
+ }
+ }
+ alertId('myopac_addr_changes_saved');
+ }
+ );
+ req.send();
+};
+
+
+function myOPACUpdateUsername() {
+ var username = $('myopac_new_username').value;
+ if(username == null || username == "") {
+ alert($('myopac_username_error').innerHTML);
+ return;
+ }
+
+ if( username.match(/.*\s.*/) ) {
+ alert($('myopac_invalid_username').innerHTML);
+ return;
+ }
+
+ r = fetchOrgSettingDefault(globalOrgTree.id(), 'opac.barcode_regex');
+ if(r) REGEX_BARCODE = new RegExp(r);
+
+ if(username.match(REGEX_BARCODE)) {
+ alert($('myopac_invalid_username').innerHTML);
+ return;
+ }
+
+ /* first see if the requested username is taken */
+ var req = new Request(CHECK_USERNAME, G.user.session, username);
+ req.send(true);
+ var res = req.result();
+ /* If the username does not already exist, res will be null;
+ * we can move on to updating the username.
+ *
+ * If the username does exist, then res will be the user ID.
+ * G.user.id() gives us the currently authenticated user ID.
+ * If res == G.user.id(), we try to update the username anyways.
+ */
+ if( res !== null && res != G.user.id() ) {
+ alertId('myopac_username_dup');
+ return;
+ }
+
+ var req = new Request(UPDATE_USERNAME, G.user.session, username );
+ req.send(true);
+ if(req.result()) {
+
+ var evt;
+ var res = req.result();
+ if(evt = checkILSEvent(res)) {
+ alertILSEvent(res);
+ return;
+ }
+
+ G.user.usrname(username);
+ hideMe($('myopac_update_username_row'));
+ userShown = false;
+ alertId('myopac_username_success');
+ myOPACShowSummary();
+ return;
+ }
+
+ alert($('myopac_username_failure').innerHTML);
+}
+
+function myOPACUpdateEmail() {
+ var email = $('myopac_new_email').value;
+ if(email == null || email == "") {
+ alert($('myopac_email_error').innerHTML);
+ return;
+ }
+
+ var req = new Request(UPDATE_EMAIL, G.user.session, email );
+ req.send(true);
+ if(req.result()) {
+ G.user.usrname(email);
+ hideMe($('myopac_update_email_row'));
+ userShown = false;
+ alertId('myopac_email_success');
+ myOPACShowSummary();
+ return;
+ }
+
+ alert($('myopac_email_failure').innerHTML);
+}
+
+
+function myOPACUpdatePassword() {
+ var curpassword = $('myopac_current_password').value;
+ var password = $('myopac_new_password').value;
+ var password2 = $('myopac_new_password2').value;
+
+ if( curpassword == null || curpassword == "" ||
+ password == null || password == "" ||
+ password2 == null || password2 == "" || password != password2 ) {
+ alert($('myopac_password_error').innerHTML);
+ return;
+ }
+
+ if(!strongPassword(password, true)) return;
+
+ var req = new Request(UPDATE_PASSWORD, G.user.session, password, curpassword );
+ req.send(true);
+ if(req.result()) {
+ hideMe($('myopac_update_password_row'));
+ userShown = false;
+ alertId('myopac_password_success');
+ myOPACShowSummary();
+ return;
+ }
+
+ alert($('myopac_password_failure').innerHTML);
+}
+
+
+
+
+var containerTemplate;
+function myOPACShowBookbags(force) {
+
+ var tbody =$('myopac_bookbag_tbody') ;
+
+ if(!containerTemplate)
+ containerTemplate = tbody.removeChild($('myopac_bookbag_tr'));
+ else if(!force) return;
+
+ removeChildren(tbody);
+
+ var containers = containerFetchAll();
+
+ var found = false;
+ for( var i in containers ) {
+ found = true;
+ var cont = containers[i];
+ var row = containerTemplate.cloneNode(true);
+ row.id = 'myopac_bookbag_row_' + cont.id();
+ var link = $n(row, 'myopac_expand_bookbag');
+ var dlink = $n(row, 'myopac_container_delete');
+ link.appendChild( text(cont.name()) );
+ link.setAttribute('href',
+ 'javascript:myOPACExpandBookbag("' + cont.id() + '","' + cont.name() + '");');
+ myOPACFetchBBItems( cont.id(), row );
+ dlink.setAttribute('href', 'javascript:myOPACDeleteBookbag("'+cont.id()+'");');
+
+ if( isTrue(cont.pub()) ) {
+ unHideMe($n(row, 'myopac_bb_published_yes'));
+ var link = $n(row, 'myopac_bb_published_view');
+ link.setAttribute('href', buildExtrasLink( 'feed/bookbag/html-full/'+cont.id(), false));
+ link.setAttribute('target', '_blank' );
+ unHideMe(link);
+
+ link = $n(row, 'myopac_bb_published_atom');
+ link.setAttribute('href', buildExtrasLink( 'feed/bookbag/rss2-full/'+cont.id(), false));
+ link.setAttribute('target', '_blank' );
+ unHideMe(link);
+
+ link = $n(row, 'myopac_bb_make_unpublished');
+ link.setAttribute('href', 'javascript:myOPACMakeBBPublished("'+cont.id()+'", true);');
+ unHideMe(link);
+
+ } else {
+ unHideMe($n(row, 'myopac_bb_published_no'));
+ var link = $n(row, 'myopac_bb_make_published');
+ link.setAttribute('href', 'javascript:myOPACMakeBBPublished("'+cont.id()+'");');
+ unHideMe(link);
+ }
+
+ tbody.appendChild(row);
+ }
+
+ if(!found) unHideMe($('myopac_bookbags_none'));
+ else unHideMe($('myopac_bookbag_table'));
+}
+
+function myOPACMakeBBPublished(bbid, hideme) {
+
+ var bb = fleshedContainers[bbid];
+
+ if(hideme) {
+ if(!confirm($('myopac_make_unpublished_confirm').innerHTML)) return;
+ bb.pub('f');
+ } else {
+ if(!confirm($('myopac_make_published_confirm').innerHTML)) return;
+ bb.pub('t');
+ }
+
+ var result = containerUpdate(bb);
+
+ var code = checkILSEvent(result);
+ if(code) { alertILSEvent(result); return; }
+
+ alert($('myopac_bb_update_success').innerHTML);
+ myOPACShowBookbags(true);
+}
+
+
+
+function myOPACDeleteBookbag(id) {
+ if( confirm( $('myopac_delete_bookbag_warn').innerHTML ) ) {
+ var result = containerDelete(id);
+ var code = checkILSEvent(result);
+ if(code) { alertILSEvent(result); return; }
+ alert($('myopac_bb_update_success').innerHTML);
+ hideMe($('myopac_bookbag_items_table'));
+ hideMe($('myopac_bookbag_items_name'));
+ hideMe($('myopac_bookbag_no_items'));
+ myOPACShowBookbags(true);
+ }
+}
+
+function myOPACFetchBBItems( id, row, block ) {
+ if(!block) {
+ containerFlesh( id, _myOPACSetBBItems, { row: row } );
+ } else {
+ var cont = containerFlesh(id);
+ myOPACSetBBItems( cont, row );
+ }
+}
+
+function _myOPACSetBBItems(r) { myOPACSetBBItems( r.getResultObject(), r.args.row ); }
+
+function myOPACSetBBItems( container, row ) {
+ fleshedContainers[container.id()] = container;
+ var node = $n(row, 'myopac_bookbag_item_count');
+ removeChildren(node);
+ node.appendChild( text(container.items().length) );
+}
+
+var BBItemsRow;
+function myOPACExpandBookbag( id, name ) {
+
+ var tbody = $('myopac_bookbag_items_tbody');
+ if(!BBItemsRow) BBItemsRow = tbody.removeChild($('myopac_bookbag_items_row'));
+ removeChildren(tbody);
+ removeChildren($('myopac_bookbag_items_name'));
+
+ $('myopac_bookbag_items_name').appendChild(text(name));
+
+ if( fleshedContainers[id] ) {
+ var len = fleshedContainers[id].items().length;
+
+ if( len == 0 ) {
+ unHideMe($('myopac_bookbag_no_items'));
+ hideMe($('myopac_bookbag_items_table'));
+ return;
+ }
+
+ hideMe($('myopac_bookbag_no_items'));
+ unHideMe($('myopac_bookbag_items_table'));
+
+ for( var i = 0; i != len; i++ ) {
+ var row = BBItemsRow.cloneNode(true);
+ found = true;
+
+ var item = fleshedContainers[id].items()[i];
+ var tlink = $n(row,'myopac_bookbag_items_title');
+ var alink = $n(row,'myopac_bookbag_items_author');
+
+ var req = new Request( FETCH_RMODS, item.target_biblio_record_entry() );
+ req.request.tlink = tlink;
+ req.request.alink = alink;
+ req.callback(myOPACShowBBItem);
+ req.send();
+
+ var clink = $n(row, 'myopac_bookbag_items_remove');
+ clink.setAttribute('href', 'javascript:myOPACRemoveBBItem("'+item.id()+'","'+id+'","'+name+'");');
+
+ tbody.appendChild(row);
+ }
+ }
+}
+
+function myOPACRemoveBBItem( id, containerid, container_name ) {
+ if(!confirm($('myopac_remove_bb_item_confirm').innerHTML)) return;
+ var stat = containerRemoveItem( id );
+ if(stat) alert($('myopac_bb_update_success').innerHTML);
+ myOPACFetchBBItems( containerid, $('myopac_bookbag_row_' + containerid), true);
+ myOPACExpandBookbag( containerid, container_name );
+}
+
+function myOPACShowBBItem(r) {
+ var record = r.getResultObject();
+ buildTitleDetailLink(record, r.tlink);
+ buildSearchLink(STYPE_AUTHOR, record.author(), r.alink);
+}
+
+function myOPACCreateBookbag() {
+ var name = $('myopac_bookbag_new_name').value;
+ if(!name) return;
+
+ var exists = false;
+ for( var c in fleshedContainers ) { exists = true; break; }
+
+ /* let them know what they are getting into... */
+ if(!exists) if(!confirm($('bb_create_warning').innerHTML)) return;
+
+ var result = containerCreate( name, $('bb_public_yes').checked );
+ var code = checkILSEvent(result);
+ if(code) { alertILSEvent(result); return; }
+ if(result) alert($('myopac_bb_update_success').innerHTML);
+ myOPACShowBookbags(true);
+}
+
+
+/* ---------------------------------------------------------------------- */
+/* Non cat circs */
+/* ---------------------------------------------------------------------- */
+
+var nonCatCircIds;
+var nonCatTypes;
+/* if we have some circs, grab the non-cat types */
+function myOPACDrawNonCatCircs(r) {
+ var ids = r.getResultObject();
+ if(ids.length == 0) return;
+ nonCatCircIds = ids;
+ unHideMe($('non_cat_circs_div'));
+ var req = new Request(FETCH_NON_CAT_TYPES, G.user.home_ou());
+ req.callback(myOPACDrawNonCatCircs2);
+ req.send();
+}
+
+
+/* now we have circs and the types.. draw each one */
+var nonCatTbody;
+var nonCatRow;
+function myOPACDrawNonCatCircs2(r) {
+ nonCatTypes = r.getResultObject();
+ nonCatTbody = $('non_cat_circs_tbody');
+ if(!nonCatRow) nonCatRow =
+ nonCatTbody.removeChild($('non_cat_circs_row'));
+ removeChildren(nonCatTbody);
+ for( var i in nonCatCircIds ) {
+ var req = new Request(FETCH_NON_CAT_CIRC, G.user.session, nonCatCircIds[i]);
+ req.callback(myOPACDrawNonCatCirc);
+ req.send();
+ }
+}
+
+
+/* draw a single circ */
+function myOPACDrawNonCatCirc(r) {
+ var circ = r.getResultObject();
+
+
+ var type = grep(nonCatTypes,
+ function(i){
+ return (i.id() == circ.item_type());
+ }
+ )[0];
+
+
+ var row = nonCatTbody.appendChild(nonCatRow.cloneNode(true));
+ appendClear($n(row, 'circ_lib'), text(findOrgUnit(circ.circ_lib()).name()));
+ appendClear($n(row, 'item_type'), text(type.name()));
+
+ var duration = interval_to_seconds(type.circ_duration());
+ duration = parseInt(duration + '000');
+
+ var dtf = circ.circ_time();
+ var start = dojo.date.stamp.fromISOString(circ.circ_time());
+ var due = new Date( start.getTime() + duration );
+ appendClear($n(row, 'circ_time'), text(due.iso8601Format('YMDHM', null, true, true)));
+}
+
+
+
+
+function myopacSelectAllChecked() {
+ __myopacSelectChecked(true);
+}
+
+function myopacSelectNoneChecked() {
+ __myopacSelectChecked(false);
+}
+
+function __myopacSelectChecked(value) {
+ var rows = myopacGetCheckedOutRows();
+ for( var i = 0; i < rows.length; i++ ) {
+ var row = rows[i];
+ var box = $n(row, 'selectme');
+ if( box && ! box.disabled )
+ box.checked = value;
+ }
+}
+
+function myopacGetCheckedOutRows() {
+ var rows = [];
+ var tbody = $('myopac_checked_tbody');
+ var children = tbody.childNodes;
+ for( var i = 0; i < children.length; i++ ) {
+ var child = children[i];
+ if( child.nodeName.match(/^tr$/i) )
+ if( $n(child, 'selectme') )
+ rows.push(child);
+ }
+ return rows;
+}
+
+var __renew_circs = [];
+
+/* true if 1 renewal succeeded */
+var __success_count = 0;
+
+/*
+ holdBlock - checking for holds before allowing renewals
+
+*/
+function holdBlock(r) {
+ var rec = r.getResultObject();
+ var circ = r.circ;
+
+ //this may be inefficient, but go this route to snag needed title id
+ var new_req = new Request( FETCH_BIB_ID_BY_BARCODE, rec.barcode() );
+ new_req.send(true);
+
+ if (new_req) {
+ var record = new_req.result();
+
+ if (record){
+ //alert(HOLDSU + ' start for ' + circ.id() + ' - ' + rec.barcode());
+ /*
+ var init_request = new Request( LOGIN_INIT, HOLDSU );
+ init_request.send(true);
+ var seed = init_request.result();
+
+ var args = {
+ password : hex_md5(seed + hex_md5(HOLDSP)),
+ type : "opac",
+ org : getOrigLocation(),
+ username : HOLDSU
+ };
+
+ var auth_request = new Request( LOGIN_COMPLETE, args );
+
+ auth_request.request.alertEvent = false;
+ auth_request.send(true);
+ var auth_result = auth_request.result();
+
+ if(!auth_result) {
+ alertId('problem with renewing');
+ return null;
+ }
+
+ var temp_session = auth_result.payload.authtoken;
+ */
+
+ //if you needed a special session for this, would use the above
+ //and pass it in the call, however, this doesn't seem to matter
+ //for this call
+ /*
+ new_req = new Request( "open-ils.circ:open-ils.circ.open_holds.retrieve",
+ temp_session, record, 'T', getOrigLocation() );
+ */
+
+ //make the call with user's credentials
+ new_req = new Request( "open-ils.circ:open-ils.circ.open_holds.retrieve",
+ G.user.session, record, 'T', getOrigLocation() );
+
+ new_req.send(true);
+
+ //we would clean up session right away if we had created one
+ /*
+ var sess_req = new Request(LOGIN_DELETE, temp_session);
+ sess_req.send(true);
+ try { sess_req.result(); } catch(E){}
+ */
+
+ if (new_req) {
+ record = new_req.result();
+ if (record.length > 0) {
+ var renewTitle = __circ_titles[circ.id()];
+ if (renewTitle) {
+ alert('Sorry, someone has requested \"' + renewTitle +
+ '\", it can not be renewed, please return this title to the library.');
+ }//if renewTitle
+ return null;
+ } else {
+ //alert('renew for ' + circ.id());
+ moRenewCirc( circ.target_copy(), G.user.id(), circ );
+ }//if record
+ }//if new_req
+
+ }//if record
+ }//if new_req
+
+}//holdBlock
+
+
+/* renews all selected circulations */
+function myOPACRenewSelected() {
+
+ var rows = myopacGetCheckedOutRows();
+ if(!confirm($('myopac_renew_confirm').innerHTML)) return;
+ __success_count = 0;
+
+ for( var i = 0; i < rows.length; i++ ) {
+
+ var row = rows[i];
+ if( ! $n(row, 'selectme').checked ) continue;
+ var circ_id = row.getAttribute('circid');
+
+ var circ;
+ for( var j = 0; j != circsCache.length; j++ ) {
+ if(circsCache[j].id() == circ_id) {
+ circ = circsCache[j];
+ var cp = circ.target_copy();
+ if (cp) {
+ var hold_req = new Request(FETCH_FLESHED_COPY,
+ circ.target_copy() );
+ hold_req.request.circ = circ;
+ hold_req.callback(holdBlock);
+ hold_req.send();
+ }//if cp
+ }//if circsCache
+ }//for j
+ }//for i
+}//myOPACRenewSelected
+
+
+/* renews a single circulation */
+function moRenewCirc(copy_id, user_id, circ) {
+
+ _debug('renewing circ ' + circ.id() + ' with copy ' + copy_id);
+ var req = new Request(RENEW_CIRC, G.user.session,
+ { patron : user_id,
+ copyid : copy_id,
+ opac_renewal : 1
+ }
+ );
+
+ req.request.alertEvent = false;
+ req.callback(myHandleRenewResponse);
+ req.request.circ = circ;
+ req.send();
+}
+
+
+
+/* handles the circ renew results */
+function myHandleRenewResponse(r) {
+ var res = r.getResultObject();
+ var circ = r.circ;
+
+ /* remove this circ from the list of circs to renew */
+ __renew_circs = grep(__renew_circs, function(i) { return (i.id() != circ.id()); });
+
+ _debug("handling renew result for " + circ.id());
+
+ if(checkILSEvent(res) || checkILSEvent(res[0]))
+ alertIdText('myopac_renew_fail', __circ_titles[circ.id()]);
+ else __success_count++;
+
+ if(__renew_circs) return; /* more to come */
+
+ __renew_circs = [];
+
+ if( __success_count > 0 )
+ alertIdText('myopac_renew_success', __success_count);
+
+ hideMe($('my_renewing'));
+ checkedDrawn = false;
+ myOPACShowChecked();
+}
+
+/** ---- batch hold processing ------------ */
+
+
+/* myopac_holds_checkbx */
+function myopacSelectAllHolds() {
+ var rows = getTableRows($("myopac_holds_tbody"));
+ for(var i = 0; i < rows.length; i++) {
+ cb = $n(rows[i], 'myopac_holds_selected_chkbx');
+ if(cb) cb.checked = true;
+ }
+}
+
+function myopacSelectNoneHolds() {
+ var rows = getTableRows($("myopac_holds_tbody"));
+ for(var i = 0; i < rows.length; i++) {
+ cb = $n(rows[i], 'myopac_holds_selected_chkbx');
+ if(cb) cb.checked = false;
+ }
+}
+
+function myopacSelectedHoldsRows() {
+ var r = [];
+ var rows = getTableRows($("myopac_holds_tbody"));
+ for(var i = 0; i < rows.length; i++) {
+ cb = $n(rows[i], 'myopac_holds_selected_chkbx');
+ if(cb && cb.checked)
+ r.push(rows[i]);
+ }
+ return r;
+}
+
+var myopacProcessedHolds = 0;
+var myopacHoldsToProcess = 0;
+function myopacDoHoldAction() {
+
+ var selectedRows = myopacSelectedHoldsRows();
+ action = getSelectorVal($('myopac_holds_actions'));
+ $('myopac_holds_actions_none').selected = true;
+ if(selectedRows.length == 0) return;
+
+ myopacProcessedHolds = 0;
+
+ if(!confirmId('myopac.holds.'+action+'.confirm')) return;
+ myopacSelectNoneHolds(); /* clear the selection */
+
+
+ /* first, let's collect the holds that actually need processing and
+ collect the full process count while we're at it */
+ var holds = [];
+ for(var i = 0; i < selectedRows.length; i++) {
+ hold = holdCache[myopacHoldIDFromRow(selectedRows[i])];
+ var qstats = holdStatusCache[hold.id()];
+ switch(action) {
+ case 'cancel':
+ holds.push(hold);
+ break;
+ case 'thaw_date':
+ case 'thaw':
+ if(isTrue(hold.frozen()))
+ holds.push(hold);
+ break;
+ case 'freeze':
+ if(!isTrue(hold.frozen()) && qstats.status < 3)
+ holds.push(hold);
+ break;
+ }
+ }
+ myopacHoldsToProcess = holds;
+ if(myopacHoldsToProcess.length == 0) return;
+
+ if(action == 'thaw_date' || action == 'freeze')
+ myopacDrawHoldThawDateForm();
+ else
+ myopacProcessHolds(action);
+}
+
+
+function myopacProcessHolds(action, thawDate) {
+
+ myopacShowHoldProcessing();
+ /* now we process them */
+ for(var i = 0; i < myopacHoldsToProcess.length; i++) {
+
+ hold = myopacHoldsToProcess[i];
+
+ var req;
+ switch(action) {
+
+ case 'cancel':
+ req = new Request(CANCEL_HOLD, G.user.session, hold.id());
+ break;
+
+ case 'thaw':
+ hold.frozen('f');
+ hold.thaw_date(null);
+ req = new Request(UPDATE_HOLD, G.user.session, hold);
+ break;
+
+ case 'thaw_date':
+ case 'freeze':
+ hold.frozen('t');
+ hold.thaw_date(thawDate);
+ req = new Request(UPDATE_HOLD, G.user.session, hold);
+ break;
+ //thawDate = prompt($('myopac.holds.freeze.select_thaw').innerHTML);
+
+ }
+
+ req.callback(myopacBatchHoldCallback);
+ req.send();
+ req = null;
+ }
+}
+
+function myopacDrawHoldThawDateForm() {
+ hideMe($('myopac_holds_main_table'));
+ unHideMe($('myopac_holds_thaw_date_form'));
+ $('myopac_holds_thaw_date_input').focus();
+}
+
+function myopacApplyThawDate() {
+ var dateString = dijit.byId('myopac_holds_thaw_date_input').getValue();
+ if(dateString) {
+ dateString = dojo.date.stamp.toISOString(dateString);
+ if(dateString) {
+ dateString = holdsVerifyThawDate(dateString);
+ if(!dateString) return;
+ } else {
+ dateString = null;
+ }
+ }
+ myopacProcessHolds('freeze', dateString);
+}
+
+function myopacHoldIDFromRow(row) {
+ return row.id.replace(/.*_(\d+)$/, '$1');
+}
+
+function myopacShowHoldProcessing() {
+ unHideMe($('myopac_holds_processing'));
+ hideMe($('myopac_holds_main_table'));
+}
+
+function myopacHideHoldProcessing() {
+ hideMe($('myopac_holds_processing'));
+ unHideMe($('myopac_holds_main_table'));
+ hideMe($('myopac_holds_thaw_date_form'));
+}
+
+function myopacBatchHoldCallback(r) {
+ if(r) /* force load any exceptions */
+ r.getResultObject();
+ if(++myopacProcessedHolds >= myopacHoldsToProcess.length) {
+ myopacHideHoldProcessing();
+ holdCache = {};
+ holdStatusCache = {};
+ myopacForceHoldsRedraw = true;
+ myOPACShowHolds();
+ }
+}
+
Added: conifer/trunk/web/opac/skin/uwin/js/rdetail.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/rdetail.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/rdetail.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,1043 @@
+/* */
+
+detachAllEvt('common', 'run');
+attachEvt("common", "run", rdetailDraw);
+attachEvt("rdetail", "recordDrawn", rdetailBuildStatusColumns);
+attachEvt("rdetail", "recordDrawn", rdetailBuildInfoRows);
+attachEvt("rdetail", "recordDrawn", rdetailGetPageIds);
+
+/* Per-skin configuration settings */
+var rdetailLocalOnly = true;
+var rdetailShowLocal = true;
+var rdetailShowCopyLocation = true;
+var rdetailGoogleBookPreview = true;
+var rdetailDisplaySerialHoldings = true;
+var rdetailEnableRefWorks = true;
+var rdetailRefWorksHost = 'http://refworks.scholarsportal.info';
+
+/* vars vars vars */
+var record = null;
+var cp_statuses = null;
+var recordsCache = [];
+
+var copyRowParent = null;
+var copyRow = null;
+var statusRow = null;
+var numStatuses = null;
+var defaultCN;
+var callnumberCache = {};
+var globalCNCache = {};
+var localTOC;
+var cachedRecords;
+var _statusPositions = {};
+var opac_strings;
+
+var nextContainerIndex;
+
+var nextRecord;
+var prevRecord;
+
+var rdetailPrev = null;
+var rdetailNext = null;
+var rdetailStart = null;
+var rdetailEnd = null;
+
+/* serials are currently the only use of Dojo strings in the OPAC */
+if (rdetailDisplaySerialHoldings) {
+ dojo.requireLocalization("openils.opac", "opac");
+ opac_strings = dojo.i18n.getLocalization("openils.opac", "opac");
+}
+
+function rdetailReload() {
+ var args = {};
+ args[PARAM_LOCATION] = getNewSearchLocation();
+ args[PARAM_DEPTH] = depthSelGetDepth();
+ goTo(buildOPACLink(args));
+}
+
+/* looks to see if we have a next and/or previous record in the
+ record cache, if so, set up the nav links */
+function rdetailSetPaging(ids) {
+
+ cachedRecords = {};
+ cachedRecords.ids = ids;
+
+ for( var i = 0; i < cachedRecords.ids.length; i++ ) {
+ var rec = cachedRecords.ids[i];
+ if( rec == getRid() ) {
+ if( i > 0 ) prevRecord = cachedRecords.ids[i-1];
+ if( i < cachedRecords.ids.length - 1 )
+ nextRecord = cachedRecords.ids[i+1];
+ break;
+ }
+ }
+
+ $('np_offset').appendChild(text(i + 1));
+ $('np_count').appendChild(text(getHitCount()));
+
+ if(prevRecord) {
+ unHideMe($('np_table'));
+ unHideMe($('np_prev'));
+ unHideMe($('np_start'));
+ rdetailPrev = function() { _rdetailNav(prevRecord); };
+ rdetailStart = function() { _rdetailNav(cachedRecords.ids[0]); };
+ }
+
+ if(nextRecord) {
+ unHideMe($('np_table'));
+ unHideMe($('np_next'));
+ unHideMe($('np_end'));
+ rdetailNext = function() { _rdetailNav(nextRecord); };
+ rdetailEnd = function() { _rdetailNav(cachedRecords.ids[cachedRecords.ids.length-1]); };
+ }
+
+ runEvt('rdetail', 'nextPrevDrawn', i, cachedRecords.ids.length);
+}
+
+
+function _rdetailNav(id, offset) {
+ var args = {};
+ args[PARAM_RID] = id;
+ goTo(buildOPACLink(args));
+}
+
+function rdetailDraw() {
+
+ detachAllEvt('common','depthChanged');
+ detachAllEvt('common','locationUpdated');
+ attachEvt('common','depthChanged', rdetailReload);
+ attachEvt('common','locationUpdated', rdetailReload);
+ attachEvt('common','holdUpdated', rdetailReload);
+ attachEvt('common','holdUpdateCanceled', rdetailReload);
+
+ copyRowParent = G.ui.rdetail.cp_info_row.parentNode;
+ copyRow = copyRowParent.removeChild(G.ui.rdetail.cp_info_row);
+ statusRow = G.ui.rdetail.cp_status.parentNode;
+ statusRow.id = '__rdsrow';
+
+ G.ui.rdetail.cp_info_local.onclick = rdetailShowLocalCopies;
+ G.ui.rdetail.cp_info_all.onclick = rdetailShowAllCopies;
+
+ if(getLocation() == globalOrgTree.id())
+ hideMe(G.ui.rdetail.cp_info_all);
+
+ var req = new Request(FETCH_RMODS, getRid());
+ req.callback(_rdetailDraw);
+ req.send();
+
+ if (rdetailDisplaySerialHoldings) {
+ var req = new Request(FETCH_MFHD_SUMMARY, getRid());
+ req.callback(_holdingsDraw);
+ req.send();
+ }
+
+ detachAllEvt("result", "idsReceived");
+ G.evt.result.hitCountReceived = [];
+ G.evt.result.recordReceived = [];
+ G.evt.result.copyCountsReceived = [];
+ G.evt.result.allRecordsReceived = [];
+}
+
+function rdetailGetPageIds() {
+ attachEvt("result", "idsReceived", rdetailSetPaging );
+ resultFetchAllRecords = true;
+ rresultCollectIds(true);
+}
+
+
+function buildunAPISpan (span, type, id) {
+ var cgi = new CGI();
+ var d = new Date();
+
+ addCSSClass(span,'unapi-id');
+
+ span.setAttribute(
+ 'title', 'tag:' + cgi.server_name + ',' +
+ d.getFullYear() + ':' + type + '/' + id
+ );
+}
+
+function rdetailViewMarc(r,id) {
+ hideMe($('rdetail_extras_loading'));
+ $('rdetail_view_marc_box').innerHTML = r.getResultObject();
+
+ var div = elem('div', { "class" : 'hide_me' });
+ var span = div.appendChild( elem('abbr') );
+
+ buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+ $('rdetail_view_marc_box').insertBefore(span, $('rdetail_view_marc_box').firstChild);
+}
+
+
+function rdetailShowLocalCopies() {
+ rdetailShowLocal = true;
+ rdetailBuildInfoRows();
+ hideMe(G.ui.rdetail.cp_info_local);
+ unHideMe(G.ui.rdetail.cp_info_all);
+ hideMe(G.ui.rdetail.cp_info_none);
+}
+
+function rdetailShowAllCopies() {
+
+ rdetailShowLocal = false;
+ rdetailBuildInfoRows();
+ hideMe(G.ui.rdetail.cp_info_all);
+ unHideMe(G.ui.rdetail.cp_info_local);
+ hideMe(G.ui.rdetail.cp_info_none);
+}
+
+function OpenMarcEditWindow(pcrud, rec) {
+ /*
+ To run in Firefox directly, must set signed.applets.codebase_principal_support
+ to true in about:config
+ */
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+ dojo.require('openils.PermaCrud');
+
+ win.xulG = {
+ "record": {"marc": rec.marc()},
+ "save": {
+ "label": opac_strings.SAVE_MFHD_LABEL,
+ "func": function(xmlString) {
+ rec.marc(xmlString);
+ rec.ischanged(true);
+ pcrud.update(rec);
+ }
+ }
+ };
+}
+
+function loadMarcEditor(recId) {
+ var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
+ var rec = pcrud.retrieve("sre", recId);
+ if (rec) {
+ OpenMarcEditWindow(pcrud, rec);
+ }
+}
+
+/*
+ * This function could be written much more intelligently
+ * Limited brain power means that I'm brute-forcing it for now
+ */
+function _holdingsDraw(h) {
+ holdings = h.getResultObject();
+ if (!holdings) { return null; }
+
+ dojo.forEach(holdings, _holdingsDrawMFHD);
+}
+
+function _holdingsDrawMFHD(holdings, entryNum) {
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
+ if (!orgIsMine(findOrgUnit(here), findOrgUnit(holdings.owning_lib()))) {
+ return null;
+ }
+ }
+
+ var hh = holdings.holdings();
+ var hch = holdings.current_holdings();
+ var hs = holdings.supplements();
+ var hcs = holdings.current_supplements();
+ var hi = holdings.indexes();
+ var hci = holdings.current_indexes();
+ var ho = holdings.online();
+ var hm = holdings.missing();
+ var hinc = holdings.incomplete();
+ var hloc = holdings.location() || 'MFHD';
+
+ if ( hh.length == 0 && hch.length == 0 && hs.length == 0 &&
+ hcs.length == 0 && hi.length == 0 && hci.length == 0 &&
+ ho.length == 0 && hm.length == 0 && hinc.length == 0 && !isXUL()
+ ) {
+ return null;
+ }
+
+ dojo.place("<table style='width: 100%;'><caption id='mfhdHoldingsCaption' class='rdetail_header color_1'>" +
+ dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) +
+ "</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
+ "'></tbody></table>", "rdetail_details_table", "after"
+ );
+ if (hh.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.HOLDINGS, hh); }
+ if (hch.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.CURRENT_HOLDINGS, hch); }
+ if (hs.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.SUPPLEMENTS, hs); }
+ if (hcs.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.CURRENT_SUPPLEMENTS, hcs); }
+ if (hi.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INDEXES, hi); }
+ if (hci.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.CURRENT_INDEXES, hci); }
+ if (ho.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.ONLINE_VOLUMES, ho); }
+ if (hm.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.MISSING_VOLUMES, hm); }
+ if (hinc.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INCOMPLETE_VOLUMES, hinc); }
+
+ if (isXUL()) {
+ dojo.require('openils.Event');
+ dojo.require('openils.PermaCrud');
+ dojo.place("<span> - </span><a class='classic_link' href='javascript:loadMarcEditor(" +
+ holdings.id() + ")'>" + opac_strings.EDIT_LABEL + "</a>",
+ "mfhdHoldingsCaption", "last"
+ );
+ }
+}
+
+function _holdingsDrawMFHDEntry(entryNum, entryName, entry) {
+ var flatEntry = entry.toString().replace(/,/g, ', ');
+ dojo.place("<tr><td> </td><td nowrap='nowrap' class='rdetail_desc'>" + entryName + "</td><td class='rdetail_item'>" + flatEntry + "</td></tr>", "rdetail_holdings_tbody_" + entryNum, "last");
+}
+
+function _rdetailDraw(r) {
+ record = r.getResultObject();
+
+ runEvt('rdetail', 'recordRetrieved', record.doc_id());
+
+ G.ui.rdetail.title.appendChild(text(record.title()));
+ buildSearchLink(STYPE_AUTHOR, record.author(), G.ui.rdetail.author);
+ G.ui.rdetail.isbn.appendChild(text(cleanISBN(record.isbn())));
+ G.ui.rdetail.edition.appendChild(text(record.edition()));
+ G.ui.rdetail.pubdate.appendChild(text(record.pubdate()));
+ G.ui.rdetail.publisher.appendChild(text(record.publisher()));
+ $('rdetail_physical_desc').appendChild(text(record.physical_description()));
+ r = record.types_of_resource();
+ if(r) {
+ G.ui.rdetail.tor.appendChild(text(r[0]));
+ setResourcePic( G.ui.rdetail.tor_pic, r[0]);
+ }
+ G.ui.rdetail.abstr.appendChild(text(record.synopsis()));
+
+ try{
+ if(record.isbn()) {
+ if(ENABLE_ADDED_CONTENT_ATTRIB_LINKS) {
+ unHideMe($('rdetail.jacket_attrib_div'));
+ var href = $('rdetail.jacket_attrib_link').getAttribute('href') +cleanISBN(record.isbn());
+ $('rdetail.jacket_attrib_link').setAttribute('href', href);
+ }
+ rdetailCheckForGBPreview();
+
+ } else {
+ hideMe($("rdetail.jacket_attrib_div"));
+ hideMe($("rdetail_img_link"));
+ }
+ } catch(E) {}
+
+
+ // see if the record has any external links
+ var links = record.online_loc();
+ for( var i = 0; links && links.length > 0 && i < links.length; i = i + 3 ) {
+ var href = links[i];
+ // avoid matching "HTTP: The Complete Reference"
+ if( href.match(/https?:\/|ftps?:\/|mailto:/i) ) {
+ unHideMe($('rdetail_online_row'));
+ // MODS can contain a display label (used for the text of the link)
+ // as well as a note about the URL; many legacy systems conflate the
+ // two and generate MARC records that expect the note to be used as
+ // the text of the link, with no display label; here's the canonical
+ // format:
+ //
+ // 856 40 $uhttp://localhost$yDisplay label$zPublic note
+ //
+ // Note that the MARC21slim2MODS XSL concatenates $3 and $y together
+ // (as $y was defined later in MARC21's life as the display label)
+ var displayLabel = '' + links[i+1];
+ var note = '' + links[i+2];
+ if(!displayLabel || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) {
+ if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) {
+ displayLabel = href;
+ } else {
+ displayLabel = note;
+ }
+ }
+ $('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, displayLabel));
+ if (note && note != displayLabel) {
+ $('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
+ }
+ $('rdetail_online').appendChild(elem('br'));
+ }
+ }
+
+ // Fill in our unAPI ID, if anyone cares
+ var abbrs = document.getElementsByTagName('abbr');
+ var span;
+ for (var i = 0; i < abbrs.length; i = i + 1) {
+ if (abbrs[i].getAttribute('name') == 'unapi') {
+ span = abbrs[i];
+ break;
+ }
+ }
+ buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+ $('rdetail_place_hold').setAttribute(
+ 'href','javascript:holdsDrawEditor({record:"'+record.doc_id()+'",type:"T"});');
+
+ var RW = $('rdetail_exp_refworks');
+ if (RW && rdetailEnableRefWorks) {
+
+ var here = (findOrgUnit(getLocation())).name();
+ var org_name = here.replace(" ", "+");
+ var cgi = new CGI();
+
+ RW.setAttribute(
+ 'href',
+ rdetailRefWorksHost + '/express/expressimport.asp?vendor='
+ + org_name
+ + '&filter=MARC+Format&database=All+MARC+Formats&encoding=65001&url=http%3A%2F%2F'
+ + cgi.server_name + '/opac/extras/supercat/marctxt/record/'
+ + record.doc_id()
+ );
+
+ RW.setAttribute('target', 'RefWorksMain');
+ unHideMe($('rdetail_exp_refworks_span'));
+ }
+
+ $('rdetail_img_link').setAttribute('href', buildISBNSrc(cleanISBN(record.isbn()), 'large'));
+ G.ui.rdetail.image.setAttribute("src", buildISBNSrc(cleanISBN(record.isbn())));
+ runEvt("rdetail", "recordDrawn");
+ recordsCache.push(record);
+
+ rdetailSetExtrasSelector();
+
+ var breq = new Request(FETCH_BRE, [getRid()]);
+ breq.callback( rdetailCheckDeleted );
+ breq.send();
+
+ resultBuildCaches( [ record ] );
+ resultDrawSubjects();
+ resultDrawSeries();
+
+ // grab added content
+ acCollectData(cleanISBN(record.isbn()), rdetailhandleAC);
+}
+
+
+
+function rdetailCheckDeleted(r) {
+ var br = r.getResultObject()[0];
+ if( isTrue(br.deleted()) ) {
+ hideMe($('rdetail_place_hold'));
+ $('rdetail_more_actions_selector').disabled = true;
+ unHideMe($('rdetail_deleted_exp'));
+ }
+}
+
+function rdetailSetExtrasSelector() {
+ if(!grabUser()) return;
+ unHideMe($('rdetail_more_actions'));
+
+ var req = new Request(
+ FETCH_CONTAINERS, G.user.session, G.user.id(), 'biblio', 'bookbag' );
+ req.callback(rdetailAddBookbags);
+ req.send();
+}
+
+function rdetailAddBookbags(r) {
+
+ var containers = r.getResultObject();
+ var selector = $('rdetail_more_actions_selector');
+ var found = false;
+ var index = 3;
+ doSelectorActions(selector);
+
+ for( var i = 0; i != containers.length; i++ ) {
+ found = true;
+ var container = containers[i];
+ insertSelectorVal( selector, index++, container.name(),
+ "container_" + container.id(), rdetailAddToBookbag, 1 );
+ }
+
+ nextContainerIndex = index;
+}
+
+var _actions = {};
+function rdetailNewBookbag() {
+ var name = prompt($('rdetail_bb_new').innerHTML,"");
+ if(!name) return;
+
+ var id;
+ if( id = containerCreate( name ) ) {
+ alert($('rdetail_bb_success').innerHTML);
+ var selector = $('rdetail_more_actions_selector');
+ insertSelectorVal( selector, nextContainerIndex++, name,
+ "container_" + id, rdetailAddToBookbag, 1 );
+ setSelector( selector, 'start' );
+ }
+}
+
+
+function rdetailAddToBookbag() {
+ var selector = $('rdetail_more_actions_selector');
+ var id = selector.options[selector.selectedIndex].value;
+ setSelector( selector, 'start' );
+
+ if( containerCreateItem( id.substring(10), record.doc_id() )) {
+ alert($('rdetail_bb_item_success').innerHTML);
+ }
+}
+
+
+var rdetailMarcFetched = false;
+function rdetailShowExtra(type, args) {
+
+ hideMe($('rdetail_copy_info_div'));
+ hideMe($('rdetail_reviews_div'));
+ hideMe($('rdetail_toc_div'));
+ hideMe($('rdetail_anotes_div'));
+ hideMe($('rdetail_excerpt_div'));
+ hideMe($('rdetail_preview_div'));
+ hideMe($('rdetail_marc_div'));
+ hideMe($('cn_browse'));
+ hideMe($('rdetail_cn_browse_div'));
+ hideMe($('rdetail_notes_div'));
+
+ removeCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_preview_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_annotation_link'), 'rdetail_extras_selected');
+ removeCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+
+ switch(type) {
+
+ case "copyinfo":
+ unHideMe($('rdetail_copy_info_div'));
+ addCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+ break;
+
+ case "reviews":
+ addCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_reviews_div'));
+ break;
+
+ case "excerpt":
+ addCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_excerpt_div'));
+ break;
+
+ case "preview":
+ addCSSClass($('rdetail_preview_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_preview_div'));
+ rdetailDisplayGBPreview();
+ break;
+
+ case "anotes":
+ addCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_anotes_div'));
+ break;
+
+ case "toc":
+ addCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_toc_div'));
+ break;
+
+ case "marc":
+ addCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_marc_div'));
+ if(rdetailMarcFetched) return;
+ unHideMe($('rdetail_extras_loading'));
+ rdetailMarcFetched = true;
+ var req = new Request( FETCH_MARC_HTML, record.doc_id() );
+ req.callback(rdetailViewMarc);
+ req.send();
+ break;
+
+ case 'cn':
+ addCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+ unHideMe($('rdetail_cn_browse_div'));
+ rdetailShowCNBrowse(defaultCN, getLocation(), null, true);
+ break;
+
+ }
+}
+
+function rdetailVolumeDetails(args) {
+ var row = $(args.rowid);
+ var tbody = row.parentNode;
+ cpdBuild( tbody, row, record, args.cn, args.org, args.depth, args.copy_location );
+ return;
+}
+
+function rdetailBuildCNList() {
+
+ var select = $('cn_browse_selector');
+ var index = 0;
+ var arr = [];
+ for( var cn in callnumberCache ) arr.push( cn );
+ arr.sort();
+
+ if( arr.length == 0 ) {
+ hideMe($('rdetail_cn_browse_select_div'));
+ return;
+ }
+
+ for( var i in arr ) {
+ var cn = arr[i];
+ var opt = new Option(cn);
+ select.options[index++] = opt;
+ }
+ select.onchange = rdetailGatherCN;
+}
+
+function rdetailGatherCN() {
+ var cn = getSelectorVal($('cn_browse_selector'));
+ rdetailShowCNBrowse( cn, getLocation(), getDepth(), true );
+ setSelector( $('cn_browse_selector'), cn );
+}
+
+
+function rdetailShowCNBrowse( cn, loc, depth, fromOnclick ) {
+
+ if(!cn) {
+ unHideMe($('cn_browse_none'));
+ hideMe($('rdetail_cn_browse_select_div'));
+ return;
+ }
+
+ unHideMe($('rdetail_cn_browse_select_div'));
+ rdetailBuildCNList();
+ setSelector( $('cn_browse_selector'), cn );
+ hideMe($('rdetail_copy_info_div'));
+ hideMe($('rdetail_reviews_div'));
+ hideMe($('rdetail_toc_div'));
+ hideMe($('rdetail_marc_div'));
+ unHideMe($('rdetail_cn_browse_div'));
+ unHideMe($('cn_browse'));
+ if( !rdetailLocalOnly && ! fromOnclick ) depth = findOrgDepth(globalOrgTree);
+ cnBrowseGo(cn, loc, depth);
+}
+
+function rdetailhandleAC(data) {
+
+ if( data.reviews.html ) {
+ $('rdetail_review_container').innerHTML = data.reviews.html;
+ unHideMe($('rdetail_reviews_link'));
+ }
+
+ if( data.toc.html ) {
+ $('rdetail_toc_div').innerHTML = data.toc.html;
+ unHideMe($('rdetail_toc_link'));
+ }
+
+ if( data.excerpt.html ) {
+ $('rdetail_excerpt_div').innerHTML = data.excerpt.html;
+ unHideMe($('rdetail_excerpt_link'));
+ }
+
+ if( data.anotes.html ) {
+ $('rdetail_anotes_div').innerHTML = data.anotes.html;
+ unHideMe($('rdetail_anotes_link'));
+ }
+}
+
+function rdetailShowReviews(r) {
+ hideMe($('rdetail_extras_loading'));
+ var res = r.getResultObject();
+ var par = $('rdetail_reviews_div');
+ var template = par.removeChild($('rdetail_review_template'));
+ if( res && res.length > 0 ) {
+ unHideMe($('rdetail_reviews_link'));
+ for( var i = 0; i != res.length; i++ ) {
+ var rev = res[i];
+ if( rev.text && rev.info ) {
+ var node = template.cloneNode(true);
+ $n(node, 'review_header').appendChild(text(rev.info));
+ $n(node, 'review_text').appendChild(text(rev.text));
+ par.appendChild(node);
+ }
+ }
+ }
+}
+
+
+function rdetailShowTOC(r) {
+ hideMe($('rdetail_extras_loading'));
+ var resp = r.getResultObject();
+ if(resp) {
+ unHideMe($('rdetail_toc_link'));
+ $('rdetail_toc_div').innerHTML = resp;
+ }
+}
+
+function rdetailBuildInfoRows() {
+ var req;
+ var method = FETCH_COPY_COUNTS_SUMMARY;
+ if (rdetailShowCopyLocation)
+ method = FETCH_COPY_LOCATION_COUNTS_SUMMARY;
+
+ if( rdetailShowLocal )
+ req = new Request(method, record.doc_id(), getLocation(), getDepth())
+ else
+ req = new Request(method, record.doc_id());
+ req.callback(_rdetailBuildInfoRows);
+ req.send();
+}
+
+function _rdetailRows(node) {
+
+ if( rdetailShowLocal && getLocation() != globalOrgTree.id() ) {
+ var loc = findOrgUnit(getLocation());
+ if( node ) {
+ if( !orgIsMine(node, loc) && !orgIsMine(loc,node) ) return;
+ } else {
+ for( var i = 0; i < globalOrgTree.children().length; i++ ) {
+ var org = findOrgUnit(globalOrgTree.children()[i]);
+ if( orgIsMine(org, loc) ) {
+ node = org;
+ break;
+ }
+ }
+ }
+ }
+
+ if(!node && findOrgType(globalOrgTree.ou_type()).can_have_vols())
+ node = globalOrgTree;
+
+
+ /* don't show hidden orgs */
+
+ if(node) {
+
+ if(!isXUL() && !isTrue(node.opac_visible())) return;
+
+ var row = copyRow.cloneNode(true);
+ row.id = "cp_info_" + node.id();
+
+ var libtd = findNodeByName( row, config.names.rdetail.lib_cell );
+ var cntd = findNodeByName( row, config.names.rdetail.cn_cell );
+ var cpctd = findNodeByName( row, config.names.rdetail.cp_count_cell );
+ var actions = $n(row, 'rdetail_actions_cell');
+
+ var p = libtd.getElementsByTagName('a')[0];
+ libtd.insertBefore(text(node.name()), p);
+ libtd.setAttribute("style", "padding-left: " + ((findOrgDepth(node) - 1) * 9) + "px;");
+
+ if(!findOrgType(node.ou_type()).can_have_vols()) {
+
+ row.removeChild(cntd);
+ row.removeChild(cpctd);
+ row.removeChild(actions);
+ row.setAttribute('novols', '1');
+
+ libtd.setAttribute("colspan", numStatuses + 3 );
+ libtd.colSpan = numStatuses + 3;
+ addCSSClass(row, 'copy_info_region_row');
+ }
+
+ copyRowParent.appendChild(row);
+
+ } else { node = globalOrgTree; }
+
+ for( var c in node.children() )
+ _rdetailRows(node.children()[c]);
+}
+
+function rdetailCNPrint(orgid, cn) {
+ var div = cpdBuildPrintWindow( record, orgid);
+ var template = div.removeChild($n(div, 'cnrow'));
+ var rowNode = $("cp_info_" + orgid);
+ cpdStylePopupWindow(div);
+ openWindow(div.innerHTML);
+}
+
+var localCNFound = false;
+var ctr = 0;
+function _rdetailBuildInfoRows(r) {
+
+ if (rdetailShowCopyLocation)
+ unHideMe( $n( $('rdetail_copy_info_table'), 'rdetail_copylocation_header' ) );
+
+ removeChildren(copyRowParent);
+
+ _rdetailRows();
+
+ var summary = r.getResultObject();
+ if(!summary) return;
+ var cgi = new CGI();
+ var parm = cgi.param("cstart");
+ if (parm == undefined)
+ parm = 0;
+ var summaryStart = parseInt(parm);
+ parm = cgi.param("csize");
+ if (parm == undefined)
+ parm = 25;
+ var summarySize = parseInt(parm);
+
+ var found = false;
+ //for( var i = 0; i < summary.length; i++ ) {
+ for( var i = summaryStart; i < summary.length && i < summarySize; i++ ) {
+
+ var arr = summary[i];
+ globalCNCache[arr[1]] = 1;
+ var thisOrg = findOrgUnit(arr[0]);
+ var rowNode = $("cp_info_" + thisOrg.id());
+ if(!rowNode) continue;
+
+ if(rowNode.getAttribute("used")) {
+
+ if( rowNode.nextSibling ) {
+ sib = rowNode.nextSibling;
+ o ='cp_info_'+thisOrg.id()+'_';
+ /* push the new row on as the last row for this org unit */
+ while( sib && sib.id.match(o) ) {
+ sib = sib.nextSibling;
+ }
+ if(sib)
+ rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+ else
+ rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+ } else {
+ rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+ }
+
+ var n = findNodeByName( rowNode, config.names.rdetail.lib_cell );
+ n.appendChild(text(thisOrg.name()));
+ n.setAttribute("style", "padding-left: " + ((findOrgDepth(thisOrg) - 1) * 9) + "px;");
+ rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr);
+
+ } else {
+ rowNode.setAttribute("used", "1");
+ }
+
+ var cpc_temp = rowNode.removeChild(
+ findNodeByName(rowNode, config.names.rdetail.cp_count_cell));
+
+ var statuses = arr[2];
+ var cl = '';
+ if (rdetailShowCopyLocation) {
+ cl = arr[2];
+ statuses = arr[3];
+ }
+
+
+ rdetailApplyStatuses(rowNode, cpc_temp, statuses);
+
+ var isLocal = false;
+ if( orgIsMine( findOrgUnit(getLocation()), thisOrg ) ) {
+ found = true;
+ isLocal = true;
+ if(!localCNFound) {
+ localCNFound = true;
+ defaultCN = arr[1];
+ }
+ }
+
+ //if(isLocal) unHideMe(rowNode);
+ unHideMe(rowNode);
+
+ rdetailSetPath( thisOrg, isLocal );
+ rdetailBuildBrowseInfo( rowNode, arr[1], isLocal, thisOrg, cl );
+
+ if( i == summary.length - 1 && !defaultCN) defaultCN = arr[1];
+ }
+
+ if(!found) unHideMe(G.ui.rdetail.cp_info_none);
+}
+
+function rdetailBuildBrowseInfo(row, cn, local, orgNode, cl) {
+
+ if(local) {
+ var cache = callnumberCache[cn];
+ if( cache ) cache.count++;
+ else callnumberCache[cn] = { count : 1 };
+ }
+
+ var depth = getDepth();
+ if( !local ) depth = findOrgDepth(globalOrgTree);
+
+ $n(row, 'rdetail_callnumber_cell').appendChild(text(cn));
+
+ if (rdetailShowCopyLocation) {
+ var cl_cell = $n(row, 'rdetail_copylocation_cell');
+ cl_cell.appendChild(text(cl));
+ unHideMe(cl_cell);
+ }
+
+ _debug('setting action clicks for cn ' + cn);
+
+ var dHref = 'javascript:rdetailVolumeDetails('+
+ '{copy_location : "'+cl+'", rowid : "'+row.id+'", cn :"'+cn+'", depth:"'+depth+'", org:"'+orgNode.id()+'", local: '+local+'});';
+
+ var bHref = 'javascript:rdetailShowCNBrowse("' + cn + '", '+orgNode.id()+', "'+depth+'");';
+
+ unHideMe( $n(row, 'details') )
+ $n(row, 'details').setAttribute('href', dHref);
+ unHideMe( $n(row, 'browse') )
+ $n(row, 'browse').setAttribute('href', bHref);
+
+ if(isXUL()) {
+ unHideMe($n(row, 'hold_div'));
+ $n(row, 'hold').onclick = function() {
+ var req = new Request(FETCH_VOLUME_BY_INFO, cn, record.doc_id(), orgNode.id());
+ req.callback(
+ function(r) {
+ var vol = r.getResultObject();
+ holdsDrawEditor({type: 'V', volumeObject : vol});
+ }
+ );
+ req.send();
+ };
+ }
+}
+
+// sets the path to org as 'active' and displays the path if it's local
+function rdetailSetPath(org, local) {
+ if( findOrgDepth(org) == 0 ) return;
+ var row = $("cp_info_" + org.id());
+ row.setAttribute("hasinfo", "1");
+ unHideMe(row);
+ rdetailSetPath(findOrgUnit(org.parent_ou()), local);
+}
+
+//Append all the statuses for a given summary to the
+//copy summary table
+function rdetailApplyStatuses( row, template, statuses ) {
+ for( var j in _statusPositions ) {
+ var stat = _statusPositions[j];
+ var val = statuses[stat.id()];
+ var nn = template.cloneNode(true);
+ if(val) nn.appendChild(text(val));
+ else nn.appendChild(text(0));
+ row.appendChild(nn);
+ }
+}
+
+//Add one td (creating a new column) to the copy summary
+//table for each opac_visible copy status
+function rdetailBuildStatusColumns() {
+
+ rdetailGrabCopyStatuses();
+ var parent = statusRow;
+ var template = parent.removeChild(G.ui.rdetail.cp_status);
+
+ var i = 0;
+ for( i = 0; i < cp_statuses.length; i++ ) {
+
+ var c = cp_statuses[i];
+ if( c && isTrue(c.opac_visible()) ) {
+ var name = c.name();
+ _statusPositions[i] = c;
+ var node = template.cloneNode(true);
+ var data = findNodeByName( node, config.names.rdetail.cp_status);
+
+ data.appendChild(text(name));
+ parent.appendChild(node);
+ }
+ }
+
+ numStatuses = 0;
+ for(x in _statusPositions) numStatuses++;
+}
+
+function rdetailGrabCopyStatuses() {
+ if(cp_statuses) return cp_statuses;
+ var req = new Request(FETCH_COPY_STATUSES);
+ req.send(true);
+ cp_statuses = req.result();
+ cp_statuses = cp_statuses.sort(_rdetailSortStatuses);
+}
+
+function _rdetailSortStatuses(a, b) {
+ return parseInt(a.id()) - parseInt(b.id());
+}
+
+/**
+ * Check for a Google Book preview
+ */
+function rdetailCheckForGBPreview() {
+ if (!rdetailGoogleBookPreview) return;
+ searchForGBPreview( cleanISBN(record.isbn()) );
+}
+
+/**
+ *
+ * @param {DOM object} query The form element containing the
+ * input parameters "isbns"
+ */
+function searchForGBPreview( isbn ) {
+
+ // Delete any previous Google Booksearch JSON queries.
+ var GBPJsonScript = document.getElementById("GBPJsonScript");
+ if (GBPJsonScript) {
+ GBPJsonScript.parentNode.removeChild(GBPJsonScript);
+ }
+
+ // Add a script element with the src as the user's Google Booksearch query.
+ // JSON output is specified by including the alt=json-in-script argument
+ // and the callback function is also specified as a URI argument.
+ var GBPScriptElement = document.createElement("script");
+
+ GBPScriptElement.setAttribute("id", "GBPJsonScript");
+ GBPScriptElement.setAttribute("src",
+ "http://books.google.com/books?bibkeys=" +
+ isbn + "&jscmd=viewapi&callback=GBPreviewCallback");
+ GBPScriptElement.setAttribute("type", "text/javascript");
+
+ // make the request to Google booksearch
+ document.documentElement.firstChild.appendChild(GBPScriptElement);
+}
+
+/**
+ * This function is the call-back function for the JSON scripts which
+ * executes a Google book search response.
+ *
+ * XXX I18N of text needed
+ *
+ * @param {JSON} booksInfo is the JSON object pulled from the Google books service.
+ */
+function GBPreviewCallback(GBPBookInfo) {
+ var GBPreviewDiv = document.getElementById("rdetail_preview_div");
+ var GBPBook;
+
+ for ( i in GBPBookInfo ) {
+ GBPBook = GBPBookInfo[i];
+ }
+
+ if ( !GBPBook ) {
+ return;
+ }
+
+ if ( GBPBook.preview != "noview" ) {
+ if ( GBPBook.preview == 'full' ) {
+ setText( $('rdetail_preview_link'), $('rdetail_preview_full_text').innerHTML );
+ $('rdetail_preview_link_a').title = $('rdetail_preview_title').innerHTML;
+ }
+
+ // Add a button below the book cover image to load the preview.
+// GBPBadge = document.createElement( 'img' );
+// GBPBadge.src = 'http://books.google.com/intl/en/googlebooks/images/gbs_preview_button1.gif';
+// GBPBadge.title = $('rdetail_preview_badge').innerHTML;
+// GBPBadge.style.border = 0;
+// GBPBadgelink = document.createElement( 'a' );
+// GBPBadgelink.href = 'javascript:rdetailShowExtra("preview");';
+// GBPBadgelink.appendChild( GBPBadge );
+// $('rdetail_image_cell').appendChild( GBPBadgelink );
+// $('rdetail_preview_div').style.height = 600;
+
+ /* Display the "Preview" tab in the Extras section */
+ unHideMe( $('rdetail_preview_link' ) );
+ }
+}
+
+/**
+ * This is called when the user clicks on the 'Preview' link. We assume
+ * a preview is available from Google if this link was made visible.
+ *
+ * XXX I18N of Google Book Preview language attribute needed
+ */
+function rdetailDisplayGBPreview() {
+ unHideMe($('rdetail_extras_loading'));
+ GBPreviewPane = $('rdetail_preview_div');
+ if ( GBPreviewPane.getAttribute('loaded') == null ||
+ GBPreviewPane.getAttribute('loaded') == "false" ) {
+ google.load("books", "0", {"callback" : rdetailGBPViewerLoadCallback, "language": "en"} );
+ GBPreviewPane.setAttribute('loaded', 'true');
+ }
+}
+
+function rdetailGBPViewerLoadCallback() {
+ hideMe($('rdetail_extras_loading'));
+ var GBPViewer = new google.books.DefaultViewer(document.getElementById('rdetail_preview_div'));
+ GBPViewer.load('ISBN:' + cleanISBN(record.isbn()) );
+
+}
Added: conifer/trunk/web/opac/skin/uwin/js/result_common.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/result_common.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/result_common.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,770 @@
+
+var recordsHandled = 0;
+var recordsCache = [];
+var lowHitCount = 4;
+var isbnList = '';
+var googleBooksLink = false;
+var enableHoldsOnAvailable = false;
+
+var resultFetchAllRecords = false;
+var resultCompiledSearch = null;
+
+/* set up the event handlers */
+if( findCurrentPage() == MRESULT || findCurrentPage() == RRESULT ) {
+ G.evt.result.hitCountReceived.push(resultSetHitInfo);
+ G.evt.result.recordReceived.push(resultDisplayRecord, resultAddCopyCounts);
+ G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
+ G.evt.result.allRecordsReceived.push(resultBuildCaches, resultDrawSubjects,
+ resultDrawAuthors, resultDrawSeries, function(){unHideMe($('result_info_2'))},
+ fetchGoogleBooksLink);
+
+ attachEvt('result','lowHits',resultLowHits);
+ attachEvt('result','zeroHits',resultZeroHits);
+ attachEvt( "common", "locationUpdated", resultSBSubmit );
+ /* do this after we have ID's so the rank for mr pages will be correct */
+ attachEvt("result", "preCollectRecords", resultPaginate);
+}
+
+function resultSBSubmit(){searchBarSubmit();}
+
+/* returns the last 'index' postion ocurring in this page */
+function resultFinalPageIndex() {
+ if(getHitCount() < (getOffset() + getDisplayCount()))
+ return getHitCount() - 1;
+ return getOffset() + getDisplayCount() - 1;
+}
+
+
+
+
+/* generic search method */
+function resultCollectSearchIds( type, method, handler ) {
+
+ var sort = (getSort() == SORT_TYPE_REL) ? null : getSort();
+ var sortdir = (sort) ? ((getSortDir()) ? getSortDir() : SORT_DIR_ASC) : null;
+
+ var item_type;
+ var item_form;
+ var args = {};
+
+ if( type ) {
+ var form = parseForm(getForm());
+ item_type = form.item_type;
+ item_form = form.item_form;
+
+ } else {
+ item_type = (getItemType()) ? getItemType().split(/,/) : null;
+ item_form = (getItemForm()) ? getItemForm().split(/,/) : null;
+ }
+
+ var limit = (resultFetchAllRecords) ? 1000 : getDisplayCount();
+
+ if( getOffset() > 0 ) {
+ if( getHitCount() > 0 && (getOffset() + getDisplayCount()) > getHitCount() )
+ limit = getHitCount() - getOffset();
+ }
+
+ var lasso = getLasso();
+
+ if (lasso) args.org_unit = -lasso;
+ else args.org_unit = getLocation();
+
+ args.depth = getDepth();
+ args.limit = limit;
+ args.offset = getOffset();
+ args.visibility_limit = 3000;
+ args.default_class = getStype();
+
+ if(sort) args.sort = sort;
+ if(sortdir) args.sort_dir = sortdir;
+ if(item_type) args.item_type = item_type;
+ if(item_form) args.item_form = item_form;
+ if(getAvail()) args.available = 1;
+
+
+ if(getAudience()) args.audience = getAudience().split(/,/);
+ if(getLitForm()) args.lit_form = getLitForm().split(/,/);
+ if(getLanguage()) args.language = getLanguage().split(/,/);
+ if(getBibLevel()) args.bib_level = getBibLevel().split(/,/);
+ if(getCopyLocs()) args.locations = getCopyLocs().split(/,/);
+ if(getPubdBefore()) args.before = getPubdBefore();
+ else if(getPubdAfter()) args.after = getPubdAfter();
+ else if(getPubdBetween()) args.between = getPubdBetween().split(/,/);
+
+ _debug('Search args: ' + js2JSON(args));
+ _debug('Raw query: ' + getTerm());
+
+ var req = new Request(method, args, getTerm(), 1);
+ req.callback(handler);
+ req.send();
+}
+
+
+
+
+
+/* set the search result info, number of hits, which results we're
+ displaying, links to the next/prev pages, etc. */
+function resultSetHitInfo() {
+
+ var lasso = getLasso();
+ if (!lasso) {
+ /* tell the user where the results are coming from */
+ var baseorg = findOrgUnit(getLocation());
+ var depth = getDepth();
+ var mydepth = findOrgDepth(baseorg);
+ if( findOrgDepth(baseorg) != depth ) {
+ var tmporg = baseorg;
+ while( mydepth > depth ) {
+ mydepth--;
+ tmporg = findOrgUnit(tmporg.parent_ou());
+ }
+ unHideMe($('including_results_for'));
+ $('including_results_location').appendChild(text(tmporg.name()));
+ }
+ }
+
+
+ try{searchTimer.stop()}catch(e){}
+
+ //if( findCurrentPage() == MRESULT ) {
+ if( findCurrentPage() == MRESULT ||
+
+ (findCurrentPage() == RRESULT &&
+ (
+ getRtype() == RTYPE_TITLE ||
+ getRtype() == RTYPE_AUTHOR ||
+ getRtype() == RTYPE_SUBJECT ||
+ getRtype() == RTYPE_SERIES ||
+ getRtype() == RTYPE_KEYWORD
+ )
+
+ ) ) {
+
+ if(getHitCount() <= lowHitCount && getTerm())
+ runEvt('result', 'lowHits');
+ }
+
+ if(getHitCount() == 0) {
+ runEvt('result', 'zeroHits');
+ return;
+ }
+
+
+ var pages = getHitCount() / getDisplayCount();
+ if(pages % 1) pages = parseInt(pages) + 1;
+
+
+
+ var cpage = (getOffset()/getDisplayCount()) + 1;
+
+ G.ui.result.current_page.appendChild(text(cpage));
+ G.ui.result.num_pages.appendChild(text(pages + ")")); /* the ) is dumb */
+
+ $('current_page2').appendChild(text(cpage));
+ $('num_pages2').appendChild(text(pages + ")")); /* the ) is dumb */
+
+ /* set the offsets */
+ var offsetEnd = getDisplayCount() + getOffset();
+ if( getDisplayCount() > (getHitCount() - getOffset()))
+ offsetEnd = getHitCount();
+
+ G.ui.result.offset_end.appendChild(text(offsetEnd));
+ G.ui.result.offset_start.appendChild(text(getOffset() + 1));
+
+ $('offset_end2').appendChild(text(offsetEnd));
+ $('offset_start2').appendChild(text(getOffset() + 1));
+
+ G.ui.result.result_count.appendChild(text(getHitCount()));
+ unHideMe(G.ui.result.info);
+
+ $('result_count2').appendChild(text(getHitCount()));
+ unHideMe($('result_info_div2'));
+}
+
+function resultLowHits() {
+ showCanvas();
+ unHideMe($('result_low_hits'));
+ if(getHitCount() > 0)
+ unHideMe($('result_low_hits_msg'));
+
+ var words = [];
+ for(var key in resultCompiledSearch.searches)
+ words.push(resultCompiledSearch.searches[key].term);
+
+ var sreq = new Request(CHECK_SPELL, words.join(' '));
+ sreq.callback(resultSuggestSpelling);
+ sreq.send();
+
+ for(var key in resultCompiledSearch.searches) {
+ var areq = new Request(FETCH_CROSSREF, key, resultCompiledSearch.searches[key].term);
+ areq.callback(resultLowHitXRef);
+ areq.send();
+ }
+
+ if( !(getForm() == null || getForm() == 'all' || getForm() == "") ) {
+ var a = {};
+ a[PARAM_FORM] = "all";
+ $('low_hits_remove_format_link').setAttribute('href',buildOPACLink(a));
+ unHideMe($('low_hits_remove_format'));
+ }
+
+ resultSuggestSearchClass();
+
+ if(getTerm()) resultExpandSearch(); /* advanced search */
+}
+
+var lowHitsXRefSet = {};
+var lowHitsXRefLink;
+var lowHitsXRefLinkParent;
+function resultLowHitXRef(r) {
+ if(!lowHitsXRefLink){
+ lowHitsXRefLinkParent = $('low_hits_xref_link').parentNode;
+ lowHitsXRefLink = lowHitsXRefLinkParent.removeChild($('low_hits_xref_link'));
+ }
+ var res = r.getResultObject();
+ var arr = res.from;
+ arr.concat(res.also);
+ if(arr && arr.length > 0) {
+ unHideMe($('low_hits_cross_ref'));
+ var word;
+ var c = 0;
+ while( word = arr.shift() ) {
+
+ if (lowHitsXRefSet[word] == 1) continue;
+ lowHitsXRefSet[word] = 1;
+
+ if(c++ > 20) break;
+ var a = {};
+ a[PARAM_TERM] = word;
+ var template = lowHitsXRefLink.cloneNode(true);
+ template.setAttribute('href',buildOPACLink(a));
+ template.appendChild(text(word));
+ lowHitsXRefLinkParent.appendChild(template);
+ lowHitsXRefLinkParent.appendChild(text(' '));
+ }
+ }
+}
+
+function resultZeroHits() {
+ showCanvas();
+ unHideMe($('result_low_hits'));
+ unHideMe($('result_zero_hits_msg'));
+ //if(getTerm()) resultExpandSearch(); /* advanced search */
+}
+
+function resultExpandSearch() {
+ var top = findOrgDepth(globalOrgTree);
+ if(getDepth() == top) return;
+ unHideMe($('low_hits_expand_range'));
+ var par = $('low_hits_expand_link').parentNode;
+ var template = par.removeChild($('low_hits_expand_link'));
+
+ var bottom = getDepth();
+ while( top < bottom ) {
+ var a = {};
+ a[PARAM_DEPTH] = top;
+ var temp = template.cloneNode(true);
+ temp.appendChild(text(findOrgTypeFromDepth(top).opac_label()))
+ temp.setAttribute('href',buildOPACLink(a));
+ par.appendChild(temp);
+ top++;
+ }
+}
+
+function resultSuggestSearchClass() {
+ var stype = getStype();
+ if(stype == STYPE_KEYWORD) return;
+ var a = {}; var ref;
+ unHideMe($('low_hits_search_type'));
+ if(stype != STYPE_TITLE) {
+ ref = $('low_hits_title_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_TITLE;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_AUTHOR) {
+ ref = $('low_hits_author_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_AUTHOR;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_SUBJECT) {
+ ref = $('low_hits_subject_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_SUBJECT;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_KEYWORD) {
+ ref = $('low_hits_keyword_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_KEYWORD;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+ if(stype != STYPE_SERIES) {
+ ref = $('low_hits_series_search');
+ unHideMe(ref);
+ a[PARAM_STYPE] = STYPE_SERIES;
+ ref.setAttribute('href',buildOPACLink(a));
+ }
+}
+
+function resultSuggestSpelling(r) {
+ var res = r.getResultObject();
+ var phrase = getTerm();
+ var words = phrase.split(/ /);
+
+ var newterm = "";
+
+ for( var w = 0; w < words.length; w++ ) {
+ var word = words[w];
+ var blob = grep(res, function(i){return (i.word == word);});
+ if( blob ) blob = blob[0];
+ else continue;
+ if( blob.word == word ) {
+ if( blob.suggestions && blob.suggestions[0] ) {
+ newterm += " " + blob.suggestions[0];
+ unHideMe($('did_you_mean'));
+ } else {
+ newterm += " " + word;
+ }
+ }
+ }
+
+ var arg = {};
+ arg[PARAM_TERM] = newterm;
+ $('spell_check_link').setAttribute('href', buildOPACLink(arg));
+ $('spell_check_link').appendChild(text(newterm));
+}
+
+
+function resultPaginate() {
+ var o = getOffset();
+
+ if( !( ((o) + getDisplayCount()) >= getHitCount()) ) {
+
+ var args = {};
+ args[PARAM_OFFSET] = o + getDisplayCount();
+ args[PARAM_SORT] = SORT;
+ args[PARAM_SORT_DIR] = SORT_DIR;
+ args[PARAM_RLIST] = new CGI().param(PARAM_RLIST);
+
+ G.ui.result.next_link.setAttribute("href", buildOPACLink(args));
+ addCSSClass(G.ui.result.next_link, config.css.result.nav_active);
+
+ $('next_link2').setAttribute("href", buildOPACLink(args));
+ addCSSClass($('next_link2'), config.css.result.nav_active);
+
+ args[PARAM_OFFSET] = getHitCount() - (getHitCount() % getDisplayCount());
+
+ /* when hit count is divisible by display count, we have to adjust */
+ if( getHitCount() % getDisplayCount() == 0 )
+ args[PARAM_OFFSET] -= getDisplayCount();
+
+ /*
+ G.ui.result.end_link.setAttribute("href", buildOPACLink(args));
+ addCSSClass(G.ui.result.end_link, config.css.result.nav_active);
+
+ $('end_link2').setAttribute("href", buildOPACLink(args));
+ addCSSClass($('end_link2'), config.css.result.nav_active);
+ */
+ }
+
+ if( o > 0 ) {
+
+ var args = {};
+ args[PARAM_SORT] = SORT;
+ args[PARAM_SORT_DIR] = SORT_DIR;
+ args[PARAM_RLIST] = new CGI().param(PARAM_RLIST);
+
+ 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);
+
+ $('prev_link2').setAttribute( "href", buildOPACLink(args));
+ addCSSClass($('prev_link2'), 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);
+
+ $('search_home_link2').setAttribute( "href", buildOPACLink(args));
+ addCSSClass($('search_home_link2'), config.css.result.nav_active);
+ }
+
+ if(getDisplayCount() < getHitCount()) {
+ unHideMe($('start_end_links_span'));
+ unHideMe($('start_end_links_span2'));
+ }
+
+ showCanvas();
+ try{searchTimer.stop()}catch(e){}
+}
+
+function buildunAPISpan (span, type, id) {
+ var cgi = new CGI();
+ var d = new Date();
+
+ addCSSClass(span,'unapi-id');
+
+ span.setAttribute(
+ 'title',
+ 'tag:' + cgi.server_name + ',' +
+ d.getFullYear() +
+ ':' + type + '/' + id
+ );
+}
+
+function unhideGoogleBooksLink (data) {
+ for ( var i in data ) {
+ //if (data[i].preview == 'noview') continue;
+
+ var gbspan = $n(document.documentElement, 'googleBooksLink-' + i);
+ var gba = $n(gbspan, "googleBooks-link");
+
+ gba.setAttribute(
+ 'href',
+ data[i].info_url
+ );
+ removeCSSClass( gbspan, 'hide_me' );
+ }
+}
+
+/* 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);
+
+ var r = table.rows[pos + 1];
+ var currentISBN = cleanISBN(rec.isbn());
+
+ if (googleBooksLink) {
+ var gbspan = $n(r, "googleBooksLink");
+ if (currentISBN) {
+ gbspan.setAttribute(
+ 'name',
+ gbspan.getAttribute('name') + '-' + currentISBN
+ );
+
+ if (isbnList) isbnList += ', ';
+ isbnList += currentISBN;
+ }
+ }
+
+/*
+ try {
+ var rank = parseFloat(ranks[pos + getOffset()]);
+ rank = parseInt( rank * 100 );
+ var relspan = $n(r, "relevancy_span");
+ relspan.appendChild(text(rank));
+ unHideMe(relspan.parentNode);
+ } catch(e){ }
+*/
+
+ var pic = $n(r, config.names.result.item_jacket);
+ pic.setAttribute("src", buildISBNSrc(currentISBN));
+
+ var title_link = $n(r, config.names.result.item_title);
+ var author_link = $n(r, config.names.result.item_author);
+
+ if( is_mr ) {
+ var onlyrec = onlyrecord[ getOffset() + pos ];
+ if(onlyrec) {
+ buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', onlyrec);
+
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = onlyrec;
+ args[PARAM_MRID] = rec.doc_id();
+ pic.parentNode.setAttribute("href", buildOPACLink(args));
+ title_link.setAttribute("href", buildOPACLink(args));
+ title_link.appendChild(text(normalize(truncate(rec.title(), 65))));
+
+ } else {
+ buildunAPISpan($n(r,'unapi'), 'metabib-metarecord', rec.doc_id());
+
+ buildTitleLink(rec, title_link);
+ var args = {};
+ args.page = RRESULT;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_MRID] = rec.doc_id();
+ pic.parentNode.setAttribute("href", buildOPACLink(args));
+ }
+
+ } else {
+ buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', rec.doc_id());
+
+ buildTitleDetailLink(rec, title_link);
+ var args = {};
+ args.page = RDETAIL;
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_RID] = rec.doc_id();
+ pic.parentNode.setAttribute("href", buildOPACLink(args));
+
+ if (enableHoldsOnAvailable) {
+ unHideMe($n(r,'place_hold_span'));
+ }
+
+ $n(r,'place_hold_link').setAttribute(
+ 'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"T"});');
+ }
+
+ buildSearchLink(STYPE_AUTHOR, rec.author(), author_link);
+
+ if(! is_mr ) {
+
+ if(!isNull(rec.edition())) {
+ unHideMe( $n(r, "result_table_extra_span"));
+ $n(r, "result_table_edition_span").appendChild( text( rec.edition()) );
+ }
+ if(!isNull(rec.pubdate())) {
+ unHideMe( $n(r, "result_table_extra_span"));
+ unHideMe($n(r, "result_table_pub_span"));
+ $n(r, "result_table_pub_span").appendChild( text( rec.pubdate() ));
+ }
+ if(!isNull(rec.publisher()) ) {
+ unHideMe( $n(r, "result_table_extra_span"));
+ unHideMe($n(r, "result_table_pub_span"));
+ $n(r, "result_table_pub_span").appendChild( text( " " + rec.publisher() ));
+ }
+
+ if(!isNull(rec.physical_description()) ) {
+ unHideMe( $n(r, "result_table_extra_span"));
+ var t = " " + rec.physical_description();
+ //$n(r, "result_table_phys_span").appendChild( text(t.replace(/:.*/g,'')));
+ $n(r, "result_table_phys_span").appendChild( text(t));
+ }
+
+ }
+
+ resultBuildFormatIcons( r, rec, is_mr );
+
+ unHideMe(r);
+
+ runEvt("result", "recordDrawn", rec.doc_id(), title_link);
+
+ /*
+ if(resultPageIsDone()) {
+ runEvt('result', 'allRecordsReceived', recordsCache);
+ }
+ */
+}
+
+function _resultFindRec(id) {
+ for( var i = 0; i != recordsCache.length; i++ ) {
+ var rec = recordsCache[i];
+ if( rec && rec.doc_id() == id )
+ return rec;
+ }
+ return null;
+}
+
+
+function resultBuildFormatIcons( row, rec, is_mr ) {
+
+ var ress = rec.types_of_resource();
+
+ for( var i in ress ) {
+
+ var res = ress[i];
+ if(!res) continue;
+
+ var link = $n(row, res + "_link");
+ link.title = res;
+ var img = link.getElementsByTagName("img")[0];
+ removeCSSClass( img, config.css.dim );
+
+ var f = getForm();
+ if( f != "all" ) {
+ if( f == modsFormatToMARC(res) )
+ addCSSClass( img, "dim2_border");
+ }
+
+ var args = {};
+ args[PARAM_OFFSET] = 0;
+
+ if(is_mr) {
+ args.page = RRESULT;
+ args[PARAM_TFORM] = modsFormatToMARC(res);
+ args[PARAM_MRID] = rec.doc_id();
+
+ } else {
+ args.page = RDETAIL
+ args[PARAM_RID] = rec.doc_id();
+ }
+
+ link.setAttribute("href", buildOPACLink(args));
+
+ }
+}
+
+function fetchGoogleBooksLink () {
+ if (isbnList && googleBooksLink) {
+ var scriptElement = document.createElement("script");
+ scriptElement.setAttribute("id", "jsonScript");
+ scriptElement.setAttribute("src",
+ "http://books.google.com/books?bibkeys=" +
+ escape(isbnList) + "&jscmd=viewapi&callback=unhideGoogleBooksLink");
+ scriptElement.setAttribute("type", "text/javascript");
+ // make the request to Google Book Search
+ document.documentElement.firstChild.appendChild(scriptElement);
+ }
+}
+
+function resultPageIsDone(pos) {
+
+ return (recordsHandled == getDisplayCount()
+ || recordsHandled + getOffset() == getHitCount());
+}
+
+var resultCCHeaderApplied = false;
+
+/* -------------------------------------------------------------------- */
+/* dynamically add the copy count rows based on the org type 'countsrow'
+ is the row into which we will add TD's to hold the copy counts
+ This code generates copy count cells with an id of
+ 'copy_count_cell_<depth>_<pagePosition>' */
+function resultAddCopyCounts(rec, pagePosition) {
+
+ var r = table.rows[pagePosition + 1];
+ var countsrow = $n(r, config.names.result.counts_row );
+ var ccell = $n(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;
+ var lastheadcell = null;
+
+ var cchead = null;
+ var ccheadcell = null;
+ if(!resultCCHeaderApplied && !getLasso()) {
+ ccrow = $('result_thead_row');
+ ccheadcell = ccrow.removeChild($n(ccrow, "result_thead_ccell"));
+ var t = ccheadcell.cloneNode(true);
+ lastheadcell = t;
+ t.appendChild(text(type.opac_label()));
+ ccrow.appendChild(t);
+ resultCCHeaderApplied = true;
+ }
+
+ 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;
+
+ if(ccheadcell) {
+ var t = ccheadcell.cloneNode(true);
+ t.appendChild(text(type.opac_label()));
+ ccrow.insertBefore(t, lastheadcell);
+ lastheadcell = t;
+ }
+ }
+ }
+
+ unHideMe($("search_info_table"));
+}
+
+/* collect copy counts for a record using method 'methodName' */
+function resultCollectCopyCounts(rec, pagePosition, methodName) {
+ if(rec == null || rec.doc_id() == null) return;
+
+ var loc = getLasso();
+ if (loc) loc = -loc;
+ else loc= getLocation();
+
+ var req = new Request(methodName, loc, rec.doc_id(), getForm() );
+ req.request.userdata = [ rec, pagePosition ];
+ req.callback(resultHandleCopyCounts);
+ req.send();
+}
+
+function resultHandleCopyCounts(r) {
+ runEvt('result', 'copyCountsReceived', r.userdata[0], r.userdata[1], r.getResultObject());
+}
+
+
+/* XXX Needs to understand Lasso copy counts... */
+/* display the collected copy counts */
+function resultDisplayCopyCounts(rec, pagePosition, copy_counts) {
+ if(copy_counts == null || rec == null) return;
+
+ if (getLasso()) {
+ var copy_counts_lasso = {
+ transcendant : null,
+ count : 0,
+ unshadow : 0,
+ available : 0,
+ depth : -1,
+ org_unit : getLasso()
+ };
+
+ for (var i in copy_counts) {
+ copy_counts_lasso.transcendant = copy_counts[i].transcendant;
+ copy_counts_lasso.count += parseInt(copy_counts[i].count);
+ copy_counts_lasso.unshadow += parseInt(copy_counts[i].unshadow);
+ copy_counts_lasso.available += parseInt(copy_counts[i].available);
+ }
+
+ copy_counts = [ copy_counts_lasso ];
+ }
+
+ var i = 0;
+ var metarecords = (findCurrentPage() == MRESULT);
+ while(copy_counts[i] != null) {
+ var cell = $("copy_count_cell_" + i +"_" + pagePosition);
+ var cts = copy_counts[i];
+ cell.appendChild(text(cts.available + " / " + cts.count));
+
+ if (!enableHoldsOnAvailable && (i == (copy_counts.length - 1))) {
+ var resultTBody = findParentByNodeName(cell, 'TBODY');
+ if (cts.available == 0 && cts.count > 0 && !metarecords) {
+ dojo.query('[name="place_hold_span"]', resultTBody).removeClass('hide_me');
+ } else {
+ dojo.query('[name="place_hold_span"]', resultTBody).addClass('hide_me');
+ }
+ }
+
+ if(isXUL()) {
+ /* here we style opac-invisible records for xul */
+
+ if( cts.depth == 0 ) {
+ if(!cts.transcendant && !cts.unshadow) {
+ _debug("found an opac-shadowed record: " + rec.doc_id());
+ var row = cell.parentNode.parentNode.parentNode.parentNode.parentNode;
+ if( cts.count == 0 )
+ addCSSClass( row, 'no_copies' );
+ else
+ addCSSClass( row, 'shadowed' );
+ }
+ }
+ }
+ i++;
+ }
+}
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/rresult.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/rresult.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/rresult.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,323 @@
+var records = new Array();
+var table;
+var rowtemplate;
+var rresultLimit = 200;
+
+var rresultIsPaged = false;
+
+function rresultUnload() { removeChildren(table); table = null;}
+
+attachEvt("common", "unload", rresultUnload);
+attachEvt("common", "run", rresultDoSearch);
+attachEvt("result", "idsReceived", rresultCollectRecords);
+attachEvt("result", "recordDrawn", rresultLaunchDrawn);
+
+hideMe($('copyright_block'));
+
+function rresultDoSearch() {
+
+ swapCanvas($('loading_alt'));
+
+ table = G.ui.result.main_table;
+ hideMe(G.ui.result.row_template);
+ if( table && table.parentNode ) {
+ while( table.parentNode.rows.length <= (getDisplayCount() +1) )
+ hideMe(table.appendChild(G.ui.result.row_template.cloneNode(true)));
+ }
+ rresultCollectIds();
+}
+
+function rresultCollectIds() {
+ var ids;
+
+ switch(getRtype()) {
+
+ case RTYPE_COOKIE:
+ ids = JSON2js(cookieManager.read(COOKIE_RIDS));
+ _rresultHandleIds( ids, ids.length );
+ break;
+
+ case RTYPE_TITLE:
+ case RTYPE_AUTHOR:
+ case RTYPE_SUBJECT:
+ case RTYPE_SERIES:
+ case RTYPE_KEYWORD:
+ rresultDoRecordSearch();
+ break;
+
+ case RTYPE_MULTI:
+ rresultDoRecordMultiSearch();
+ break;
+
+ case RTYPE_LIST :
+ rresultHandleList();
+ break;
+
+ case RTYPE_MARC :
+ rresultCollectMARCIds();
+ break;
+
+ case RTYPE_ISBN :
+ rresultCollectISBNIds();
+ break;
+
+ case RTYPE_TCN :
+ rresultCollectTCNIds();
+ break;
+
+ case RTYPE_ISSN :
+ rresultCollectISSNIds();
+ break;
+
+
+ case RTYPE_MRID :
+ case null :
+ case "" :
+ default:
+ var form = rresultGetForm();
+ var args = { format : form, org : getLocation(), depth : rresultGetDepth() };
+
+ var lasso = getLasso();
+ if (lasso) args.org = -lasso;
+
+ var req = new Request(FETCH_RIDS, getMrid(), args);
+ req.callback( rresultHandleRIds );
+ req.send();
+
+ if( rresultGetDepth() != findOrgDepth(globalOrgTree) ) {
+ var link = $('rresult_show_all_link');
+ if(link) {
+ unHideMe($('rresult_show_all'));
+ link.appendChild( text(
+ findOrgType(globalOrgTree.ou_type()).opac_label()));
+ }
+
+ } else {
+ if( rresultGetDepth() != getDepth() ) { /* inside a limited display */
+ var link = $('rresult_show_here_link');
+ if(link) {
+ link.appendChild( text(
+ findOrgType(findOrgUnit(getLocation()).ou_type()).opac_label()));
+ unHideMe($('rresult_show_here'));
+ }
+ }
+ }
+ }
+}
+
+function rresultExpandSearch() {
+ var args = {};
+ args[PARAM_RDEPTH] = findOrgDepth(globalOrgTree);
+ goTo(buildOPACLink(args));
+}
+
+function rresultContractSearch() {
+ var args = {};
+ RDEPTH = null;
+ args[PARAM_OFFSET] = 0;
+ goTo(buildOPACLink(args));
+}
+
+
+function rresultGetDepth() {
+ if( getRdepth() != null) return getRdepth();
+ return getDepth();
+}
+
+
+function rresultGetForm() {
+ var form;
+
+ if(getTform()) /* did the user select a format from the icon list (temporary) */
+ form = (getTform() == 'all') ? null : getTform();
+ else /* did the use select a format from simple search dropdown */
+ form = (getForm() == 'all') ? null : getForm();
+
+ if(!form) { /* did the user select a format from the advanced search */
+ form = getItemType();
+ var f = getItemForm();
+
+ if(form) {
+ form = form.replace(/,/,'');
+ if(f) form += '-' + f;
+ } else {
+ if(f) form = '-' + f;
+ }
+ }
+
+ return form;
+}
+
+
+function rresultCollectMARCIds() {
+
+ var args = {};
+ args.searches = JSON2js(getSearches());
+ args.limit = 200;
+ args.org_unit = globalOrgTree.id();
+ args.depth = 0;
+
+ rresultIsPaged = true;
+ var req = new Request(FETCH_ADV_MARC_MRIDS, args, getDisplayCount(), getOffset());
+ req.callback(rresultHandleRIds);
+ req.request.noretry = true;
+ req.send();
+}
+
+
+function rresultCollectISBNIds() {
+ var req = new Request(FETCH_ADV_ISBN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ _rresultHandleIds(blob.ids, blob.count);
+ }
+ );
+ req.send();
+}
+
+function rresultCollectTCNIds() {
+ var req = new Request(FETCH_ADV_TCN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ _rresultHandleIds(blob.ids, blob.count);
+ }
+ );
+ req.send();
+}
+
+function rresultCollectISSNIds() {
+ var req = new Request(FETCH_ADV_ISSN_RIDS, getAdvTerm() );
+ req.callback(
+ function(r) {
+ var blob = r.getResultObject();
+ _rresultHandleIds(blob.ids, blob.count);
+ }
+ );
+ req.send();
+}
+
+function rresultHandleList() {
+ var ids = new CGI().param(PARAM_RLIST);
+ var count;
+ if(!dojo.isArray(ids)) {
+ count = 1;
+ ids = [ids];
+ } else {
+ count = ids.length;
+ }
+ if(ids) _rresultHandleIds(ids, count);
+}
+
+var rresultTries = 0;
+function rresultHandleRIds(r) {
+ var res = r.getResultObject();
+
+ if(!res) res = {count:0,ids:[]};
+
+ if( res.count == 0 && rresultTries == 0 && ! r.noretry) {
+
+ rresultTries++;
+ var form = rresultGetForm();
+ var args = { format : form, org : getLocation(), depth : findOrgDepth(globalOrgTree) };
+
+ var lasso = getLasso();
+ if (lasso) args.org = -lasso;
+
+ var req = new Request(FETCH_RIDS, getMrid(), args );
+ req.callback( rresultHandleRIds );
+ req.send();
+ unHideMe($('no_formats'));
+ hideMe($('rresult_show_all'));
+
+ } else {
+
+ _rresultHandleIds(res.ids, res.count);
+ }
+}
+
+function _rresultHandleIds(ids, count) {
+ //var json = js2JSON({ids:ids,count:count});
+ /*
+ cookieManager.write(COOKIE_SRIDS, json, '+1d');
+ */
+
+ HITCOUNT = parseInt(count);
+ runEvt('result', 'hitCountReceived');
+ runEvt('result', 'idsReceived', ids, getOffset());
+}
+
+/*
+function rresultCollectRecords(ids) {
+ runEvt("result", "preCollectRecords");
+ 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 rresultCollectRecords(ids, base) {
+ runEvt("result", "preCollectRecords");
+ var x = 0;
+
+ if (!base) base = 0;
+ if( rresultIsPaged ) base = 0;
+
+ for( var i = base; i!= getDisplayCount() + base; 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();
+ runEvt('result', 'recordReceived', rec, r.userdata, false);
+ resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS);
+ if(resultPageIsDone()) {
+ runEvt('result', 'allRecordsReceived', recordsCache);
+ unHideMe($('copyright_block'));
+ }
+}
+
+function rresultLaunchDrawn(id, node) {
+ runEvt("rresult", "recordDrawn", id, node);
+}
+
+
+function rresultDoRecordSearch() {
+ rresultIsPaged = true;
+ resultCollectSearchIds(true, SEARCH_RS_QUERY, rresultFilterSearchResults );
+}
+
+function rresultDoRecordMultiSearch() {
+ rresultIsPaged = true;
+ resultCollectSearchIds(false, SEARCH_RS_QUERY, rresultFilterSearchResults );
+}
+
+
+function rresultFilterSearchResults(r) {
+ var result = r.getResultObject();
+ var ids = [];
+ if( result.count > 0 ) {
+ for( var i = 0; i != result.ids.length; i++ )
+ ids.push(result.ids[i][0]);
+ }
+
+ resultCompiledSearch = result.compiled_search;
+ cookieManager.write(COOKIE_SEARCH, js2JSON(result.compiled_search), -1);
+ _rresultHandleIds( ids, result.count );
+}
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/search_bar.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/search_bar.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/search_bar.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,88 @@
+var searchBarExpanded = false;
+/* our search selector boxes */
+var _ts, _fs;
+
+
+var isFrontPage = false;
+
+
+G.evt.common.init.push(searchBarInit);
+
+/* if set by the org selector, this will be the location used the
+ next time the search is submitted */
+var newSearchLocation;
+var newSearchDepth = null;
+
+
+function searchBarInit() {
+
+ _ts = G.ui.searchbar.type_selector;
+ _fs = G.ui.searchbar.form_selector;
+
+ try{G.ui.searchbar.text.focus();}catch(e){}
+ G.ui.searchbar.text.onkeydown =
+ function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
+ _ts.onkeydown =
+ function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
+ _fs.onkeydown =
+ function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
+
+ G.ui.searchbar.submit.onclick = searchBarSubmit;
+
+ /* set up the selector objects, etc */
+ G.ui.searchbar.text.value = (getTerm() != null) ? getTerm() : "";
+ setSelector(_ts, getStype());
+ setSelector(_fs, getForm());
+
+ depthSelInit();
+
+
+ if(!isFrontPage && (findCurrentPage() != MYOPAC)) {
+ attachEvt('common','depthChanged', searchBarSubmit);
+ }
+
+ if( (limit = $('opac.result.limit2avail')) ) {
+ if(getAvail()) limit.checked = true;
+ if(getSort() && getSortDir())
+ setSelector($('opac.result.sort'), getSort()+'.'+getSortDir());
+ }
+}
+
+function searchBarSubmit(isFilterSort) {
+
+ var text = G.ui.searchbar.text.value;
+
+ clearSearchParams();
+
+ if(!text || text == "") return;
+
+ var d = (newSearchDepth != null) ? newSearchDepth : depthSelGetDepth();
+ if(isNaN(d)) d = 0;
+
+ var args = {};
+
+ if(SHOW_MR_DEFAULT || (isFilterSort && findCurrentPage() == MRESULT)) {
+ args.page = MRESULT;
+ } else {
+ args.page = RRESULT;
+ args[PARAM_RTYPE] = _ts.options[_ts.selectedIndex].value;
+ }
+
+ args[PARAM_STYPE] = _ts.options[_ts.selectedIndex].value;
+ args[PARAM_TERM] = text;
+ args[PARAM_LOCATION] = depthSelGetNewLoc();
+ args[PARAM_DEPTH] = d;
+ args[PARAM_FORM] = _fs.options[_fs.selectedIndex].value;
+
+ if($('opac.result.limit2avail')) {
+ args[PARAM_AVAIL] = ($('opac.result.limit2avail').checked) ? 1 : '';
+ if( (val = getSelectorVal($('opac.result.sort'))) ) {
+ args[PARAM_SORT] = val.split('.')[0]
+ args[PARAM_SORT_DIR] = val.split('.')[1]
+ }
+ }
+
+ goTo(buildOPACLink(args));
+}
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/sidebar.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/sidebar.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/sidebar.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,226 @@
+/* set up the colors in the sidebar
+ Disables/Enables certain components based on various state data */
+
+attachEvt("common", "init", initSideBar);
+attachEvt("common", "init", setSidebarLinks);
+
+attachEvt("common", "unload", sidebarTreesFree );
+
+function prevRResults() {
+ return buildOPACLink({ page : RRESULT });
+}
+
+function prevMResults() {
+ return buildOPACLink({ page : MRESULT });
+}
+
+function initSideBar() {
+ var page = findCurrentPage();
+
+ if( page == MRESULT )
+ unHideMe($("sidebar_results_wrapper"));
+
+ if( page == RRESULT ) {
+ unHideMe($("sidebar_results_wrapper"));
+ unHideMe(G.ui.sidebar[MRESULT]);
+ if( getRtype() == RTYPE_MRID )
+ $("sidebar_title_group_results").setAttribute("href", prevMResults());
+ else hideMe($("sidebar_title_group_results").parentNode);
+ }
+
+ if( page == RDETAIL ) {
+ unHideMe($("sidebar_results_wrapper"));
+
+
+ unHideMe(G.ui.sidebar[MRESULT]);
+ if(getRtype())
+ $("sidebar_title_results").setAttribute("href", prevRResults());
+ unHideMe(G.ui.sidebar[RRESULT]);
+
+ if( getRtype() == RTYPE_MRID )
+ $("sidebar_title_group_results").setAttribute("href", prevMResults());
+ else hideMe($("sidebar_title_group_results").parentNode);
+ }
+
+ unHideMe(G.ui.sidebar[page]);
+ addCSSClass(G.ui.sidebar[page], "sidebar_item_active");
+
+ /* 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;
+
+ if(isXUL()) hideMe( G.ui.sidebar.logoutbox );
+}
+
+/* sets up the login ui components */
+var loginBoxVisible = false;
+
+function loginDance() {
+
+ if(doLogin(true)) {
+
+ if(!strongPassword( G.ui.login.password.value ) ) {
+
+ cookieManager.write(COOKIE_SES, "");
+ hideMe($('login_table'));
+ unHideMe($('change_pw_table'));
+ $('change_pw_current').focus();
+ $('change_pw_button').onclick = changePassword;
+ setEnterFunc($('change_pw_2'), changePassword);
+
+ } else {
+ loggedInOK();
+ }
+ }
+}
+
+function loggedInOK() {
+ 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);
+ runEvt( 'common', 'loggedIn');
+
+ var org = G.user.prefs[PREF_DEF_LOCATION];
+ if(!org) org = G.user.home_ou();
+
+ var depth = G.user.prefs[PREF_DEF_DEPTH];
+ if(! ( depth && depth <= findOrgDepth(org)) )
+ depth = findOrgDepth(org);
+
+ runEvt( "common", "locationChanged", org, depth);
+}
+
+
+function changePassword() {
+
+ var pc = $('change_pw_current').value;
+ var p1 = $('change_pw_1').value;
+ var p2 = $('change_pw_2').value;
+
+ if( p1 != p2 ) {
+ alert($('pw_no_match').innerHTML);
+ return;
+ }
+
+ if(!strongPassword(p2, true) ) return;
+
+ var req = new Request(UPDATE_PASSWORD, G.user.session, p2, pc );
+ req.send(true);
+ if(req.result()) {
+ alert($('pw_update_successful').innerHTML);
+ loggedInOK();
+ }
+}
+
+var pwRegexSetting;
+function strongPassword(pass, alrt) {
+
+ /* first, let's see if there is a configured regex */
+ if(!pwRegexSetting) {
+ var regex = fetchOrgSettingDefault(G.user.home_ou(), 'global.password_regex');
+ if(regex) {
+ if(pass.match(new RegExp(regex))) {
+ return true;
+ } else {
+ if(alrt)
+ alert($('pw_not_strong').innerHTML);
+ return false;
+ }
+ }
+ }
+
+ /* no regex configured, use the default */
+
+ var good = false;
+
+ do {
+
+ if(pass.length < 7) break;
+ if(!pass.match(/.*\d+.*/)) break;
+ if(!pass.match(/.*[A-Za-z]+.*/)) break;
+ good = true;
+
+ } while(0);
+
+ if(!good && alrt) alert($('pw_not_strong').innerHTML);
+ return good;
+}
+
+function initLogin() {
+
+ 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);
+ try{G.ui.login.username.focus();}catch(e){}
+// }
+
+// loginBoxVisible = !loginBoxVisible;
+ G.ui.login.cancel.onclick = showCanvas;
+ if(findCurrentPage() == MYOPAC)
+ G.ui.login.cancel.onclick = goHome;
+}
+
+function setSidebarLinks() {
+ G.ui.sidebar.home_link.setAttribute("href", buildOPACLink({page:HOME}));
+ G.ui.sidebar.advanced_link.setAttribute("href", buildOPACLink({page:ADVANCED}));
+ G.ui.sidebar.myopac_link.setAttribute("href", buildOPACLink({page:MYOPAC}, false, true));
+}
+
+function sidebarTreesFree() {
+ removeChildren($(subjectSidebarTree.rootid));
+ removeChildren($(authorSidebarTree.rootid));
+ removeChildren($(seriesSidebarTree.rootid));
+ subjectSidebarTree = null;
+ authorSidebarTree = null;
+ seriesSidebarTree = null;
+}
+
+
+
+
+/* --------------------------------------------------------------------------------- */
+/* Code to support GALILEO links for PINES. Fails gracefully
+/* --------------------------------------------------------------------------------- */
+attachEvt('common', 'init', buildEGGalLink);
+function buildEGGalLink() {
+
+ /* we're in a lib, nothing to do here */
+ if( getOrigLocation() ) return;
+ if(!$('eg_gal_link')) return;
+
+ //var link = 'http://demo.galib.uga.edu/express?pinesid=';
+ var link = 'http://www.galileo.usg.edu/express?pinesid=';
+ if(grabUser()) {
+ $('eg_gal_link').setAttribute('href', link + G.user.session);
+ return;
+ }
+
+ $('eg_gal_link').setAttribute('href', 'javascript:void(0);');
+ $('eg_gal_link').setAttribute('target', '');
+ $('eg_gal_link').onclick = function() {
+ /* we're not logged in. go ahead and login */
+ detachAllEvt('common','locationChanged');
+ detachAllEvt('common','loggedIn');
+ attachEvt('common','loggedIn', function() { goTo(link + G.user.session); })
+ initLogin();
+ };
+}
+/* --------------------------------------------------------------------------------- */
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/sidebar_extras.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/sidebar_extras.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/sidebar_extras.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,243 @@
+
+/* captures extraneous info from each record */
+
+var subjectCache = {};
+var authorCache = {};
+var seriesCache = {};
+
+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);
+
+ resultDrawSidebarTrees(
+ STYPE_SUBJECT,
+ "subjectSidebarTree", ss,
+ $("subject_tree_sidebar"),
+ $("subject_sidebar_tree_div") );
+}
+
+function resultDrawAuthors() {
+ var auths = new Array();
+ for( var s in authorCache ) auths.push(s);
+
+ resultDrawSidebarTrees(
+ STYPE_AUTHOR,
+ "authorSidebarTree", auths.sort(),
+ $("author_tree_sidebar"),
+ $("author_sidebar_tree_div") );
+}
+
+function resultDrawSeries() {
+ var sers = new Array();
+ for( var s in seriesCache ) sers.push(s);
+ resultDrawSidebarTrees(
+ STYPE_SERIES,
+ "seriesSidebarTree", sers.sort(),
+ $("series_tree_sidebar"),
+ $("series_sidebar_tree_div") );
+}
+
+var IESux = true;
+
+function resultDrawSidebarTrees( stype, treeName, items, wrapperNode, destNode ) {
+ eval("tree = " + treeName);
+
+ var xrefCache = [];
+ var found = false;
+ var x = 0;
+ for( var i in items ) {
+
+ if(isNull(items[i])) continue;
+
+ /* again, IE is a turd */
+ if(IE) { if(x++ > 5) break; }
+ else { if(x++ > 7) break; }
+
+ found = true;
+
+ var item = normalize(truncate(items[i], 65));
+ var args = {};
+ var href = resultQuickLink( items[i], stype );
+ tree.addNode( stype + "_" + items[i], treeName + 'Root', item, href );
+
+// if( !IE ) resultFireXRefReq(treeName, stype, items[i]);
+
+ var a = {};
+ a.type = stype;
+ a.term = item;
+ xrefCache.push(a);
+ }
+
+ if(found) {
+ unHideMe(wrapperNode);
+// if(IE) resultFireXRefSingle(treeName, xrefCache, stype);
+ /* XXX */ // disabled auth lookups for now
+
+ if( DO_AUTHORITY_LOOKUPS ) {
+ resultFireXRefBatch(treeName, xrefCache, stype);
+ }
+ }
+}
+
+/* XXX */
+function resultFireXRefBatch(treeName, xrefCache, stype) {
+ var query = [];
+ for( var i = 0; i != xrefCache.length; i++ ) {
+ var topic = xrefCache[i];
+ query.push( [ topic.type, topic.term ] );
+ }
+ var req = new Request(FETCH_CROSSREF_BATCH, query);
+ var tree;
+ eval('tree=' + treeName);
+ req.request._tree = tree;
+ req.request._stype = stype;
+ req.callback(resultRenderXRefTree);
+ req.send();
+}
+
+var xrefCacheIndex = {};
+xrefCacheIndex['subject'] = 0;
+xrefCacheIndex['author'] = 0;
+xrefCacheIndex['series'] = 0;
+
+function resultHandleXRefResponse(r) {
+ resultFireXRefSingle( r._treename, r._cache, r._stype );
+ resultAppendCrossRef(r);
+}
+
+
+function resultFireXRefSingle( treeName, xrefCache, stype ) {
+ var i = xrefCacheIndex[stype]++;
+ if(xrefCache[i] == null) return;
+ var item = xrefCache[i].term;
+ var tree;
+ eval('tree=' + treeName);
+ var req = new Request(FETCH_CROSSREF, stype, item);
+ req.request._tree = tree;
+ req.request._item = item;
+ req.request._stype = stype;
+ req.request._cache = xrefCache;
+ req.request._treename = treeName;
+ req.callback(resultHandleXRefResponse);
+ req.send();
+}
+
+function resultFireXRefReq( treeName, stype, item ) {
+ var tree;
+ eval('tree=' + treeName);
+ var req = new Request(FETCH_CROSSREF, stype, item);
+ req.request._tree = tree;
+ req.request._item = item;
+ req.request._stype = stype;
+ req.callback(resultAppendCrossRef);
+ req.send();
+}
+
+
+function resultQuickLink( term, type ) {
+ var args = {};
+ if(SHOW_MR_DEFAULT) {
+ args.page = MRESULT;
+ } else {
+ args.page = RRESULT;
+ args[PARAM_RTYPE] = type;
+ }
+ args[PARAM_OFFSET] = 0;
+ args[PARAM_TERM] = term;
+ args[PARAM_STYPE] = type;
+ return buildOPACLink(args);
+}
+
+/* XXX */
+function resultRenderXRefTree(r) {
+ var tree = r._tree;
+ var res = r.getResultObject();
+ var stype = r._stype;
+
+ for( var c in res ) {
+ var cls = res[c];
+ for( var t in cls ) {
+ var term = res[c][t];
+ var froms = term['from'];
+ var alsos = term['also'];
+ var total = 0;
+
+ for( var i = 0; (total++ < 5 && i < froms.length); i++ ) {
+ var string = normalize(truncate(froms[i], 45));
+ if($(stype + '_' + froms[i])) continue;
+ tree.addNode(stype + '_' + froms[i],
+ stype + '_' + t, string, resultQuickLink(froms[i],stype));
+ }
+ for( var i = 0; (total++ < 10 && i < alsos.length); i++ ) {
+ var string = normalize(truncate(alsos[i], 45));
+ if($(stype + '_' + alsos[i])) continue;
+ tree.addNode(stype + '_' + alsos[i],
+ stype + '_' + t, string, resultQuickLink(alsos[i],stype));
+ }
+ }
+ }
+}
+
+
+/* Addes the see-from/see-also entries for this subject item */
+function resultAppendCrossRef(r) {
+ var tree = r._tree
+ var item = r._item
+ var stype = r._stype;
+ var result = r.getResultObject();
+ if(!result) return;
+ var froms = result['from'];
+ var alsos = result['also'];
+
+ var total = 0;
+
+ for( var i = 0; (total++ < 5 && i < froms.length); i++ )
+ resultAddXRefItem( tree, item, stype, froms, i );
+
+ for( var i = 0; (total++ < 10 && i < alsos.length); i++ )
+ resultAddXRefItem( tree, item, stype, alsos, i );
+}
+
+/**
+ * Adds a single entry into the see-from/also sidebar tree
+ */
+var collectedStrings = [];
+function resultAddXRefItem(tree, rootItem, stype, arr, idx) {
+
+ var string = normalize(truncate(arr[idx], 45));
+
+ if( string == rootItem ) return;
+
+ if( grep( collectedStrings,
+ function(a) { return (a == string); }) ) return;
+
+ if($(stype + '_' + arr[idx])) return;
+
+ tree.addNode(stype + '_' + arr[idx],
+ stype + '_' + rootItem, string, resultQuickLink(arr[idx],stype));
+
+ collectedStrings.push(string);
+}
+
+
+
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/js/tips.js
===================================================================
--- conifer/trunk/web/opac/skin/uwin/js/tips.js (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/js/tips.js 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,19 @@
+attachEvt('result', 'allRecordsReceived', insertTip);
+
+/*
+var user_tips = [
+ 'Click on a folder icon in the sidebar to access related quick searches',
+ "If you don't find what you want try expanding your search using the range selector at the right of the search bar"
+];
+*/
+
+function insertTip () {
+ var tip_div = document.getElementById('tips');
+ if (tip_div) {
+ var tips = tip_div.getElementsByTagName('div')[0].getElementsByTagName('span');
+ var index = Math.floor(Math.random() * tips.length);
+ tip_div.appendChild( tips[index] );
+ removeCSSClass(tip_div, 'hide_me');
+ }
+}
+
Added: conifer/trunk/web/opac/skin/uwin/local/images/uwin_main.png
===================================================================
(Binary files differ)
Property changes on: conifer/trunk/web/opac/skin/uwin/local/images/uwin_main.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: conifer/trunk/web/opac/skin/uwin/local/images/uwin_small.png
===================================================================
(Binary files differ)
Property changes on: conifer/trunk/web/opac/skin/uwin/local/images/uwin_small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac.dtd
===================================================================
--- conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac.dtd (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac.dtd 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,699 @@
+<!-- =================================================================
+ Some generic stuff
+ ================================================================= -->
+<!ENTITY lang.version "remote v1">
+<!ENTITY lang.description "English">
+<!ENTITY lang.author "PINES">
+<!ENTITY common.all "All">
+<!ENTITY common.currency "$">
+<!ENTITY common.language "Language: ">
+<!ENTITY common.name "Name">
+<!ENTITY common.none "None">
+<!ENTITY common.title "Title">
+<!ENTITY common.author "Author">
+<!ENTITY common.authors "Authors">
+<!ENTITY common.callnumber "Call Number">
+<!ENTITY common.edition "Edition">
+<!ENTITY common.subject "Subject">
+<!ENTITY common.series "Series">
+<!ENTITY common.keyword "Keyword">
+<!ENTITY common.type "Search Type">
+<!ENTITY common.isbn "ISBN">
+<!ENTITY common.format "Format">
+<!-- Message displayed while search results are loading -->
+<!ENTITY common.loading "Loading...">
+<!ENTITY common.login "Login">
+<!ENTITY common.logout "Log Out">
+<!ENTITY common.physical "Physical Description">
+<!ENTITY common.pubdate "Publication Date">
+<!ENTITY common.publisher "Publisher">
+<!ENTITY common.results "Results">
+<!ENTITY common.select "Select">
+<!ENTITY common.status "Status">
+<!ENTITY common.at "at">
+<!ENTITY common.of "of">
+<!ENTITY common.no "No">
+<!ENTITY common.yes "Yes">
+<!ENTITY common.cancel "Cancel">
+<!ENTITY common.library "Library">
+<!ENTITY common.username "Username">
+<!ENTITY common.password "Password">
+<!ENTITY common.submit "Submit">
+<!ENTITY common.close "close">
+<!ENTITY common.and "and">
+<!ENTITY common.user_not_found "User not found">
+<!ENTITY opac.advanced.wizard.title "Advanced Search">
+<!ENTITY common.nowSearching "Now searching ">
+<!ENTITY common.ofAtLeast " of about ">
+<!ENTITY common.relevancy "Match Score: ">
+<!ENTITY common.tips "Tips:">
+<!ENTITY common.tips.tip1 "Click on a folder icon in the sidebar to access related quick searches">
+<!ENTITY common.tips.tip2 "If you don't find what you want try expanding your search using the range selector at the right of the search bar">
+<!ENTITY common.org.openAll "Expand All">
+<!ENTITY common.org.closeAll "Close All">
+<!ENTITY common.org.cancel "Cancel">
+<!ENTITY common.org.loading "Loading library selector...">
+<!ENTITY common.org.note "Tip:">
+<!ENTITY common.org.notetext "Click on a location's name to select it. Click on the folder icons to expand a section.">
+<!ENTITY opac.login.login "">
+<!ENTITY opac.basic "Basic Catalogue (HTML only)">
+<!ENTITY common.password_criteria "The password must be at least 7 characters in length,
+ contain at least one letter (a-z/A-Z),
+ and contain at least one number.">
+<!ENTITY common.a2z.title "Title: A to Z">
+<!ENTITY common.z2a.title "Title: Z to A">
+<!ENTITY common.a2z.author "Author: A to Z">
+<!ENTITY common.z2a.author "Author: Z to A">
+<!ENTITY common.new2old.pubdate "Date: Newest to Oldest">
+<!ENTITY common.old2new.pubdate "Date: Oldest to Newest">
+
+<!ENTITY opac.style.reddish "Reddish">
+
+<!ENTITY holds.where_am_i "Holds lists are not as simple as
+ 'first come, first served.' A complex matrix combining
+ consideration of item ownership, patron home library, and item purchase
+ date determines priorities for holds; the list is dynamic, changing
+ with every hold placed. Therefore, any indication of a place in the
+ holds list would be inaccurate. The holds system is designed to
+ obtain a requested item in the fastest and most efficient way possible.
+ Your library will contact you when you hold items become
+ available.">
+
+<!ENTITY holds.advanced_options "If you wish to broaden the scope of your hold to include other
+ versions of this title, select the formats that would be acceptable.
+ The first available copy will be sent to you.">
+<!-- =================================================================
+ Events and Permissions
+ ================================================================= -->
+
+<!ENTITY ilsevent.0 "Operation Succeeded">
+<!ENTITY ilsevent.1000 "Login failed. The username or password entered was incorrect.">
+<!ENTITY ilsevent.1001 "Login session has timed out or does not exist">
+<!ENTITY ilsevent.1002 "User was not found in the database">
+<!ENTITY ilsevent.1200 "The given username already exists in the database">
+<!ENTITY ilsevent.5000 "Permission Denied">
+<!ENTITY ilsperm.CREATE_HOLD "User is not allowed to create holds for other users at this location">
+<!-- =================================================================
+ common/pages
+ ================================================================= -->
+
+
+<!ENTITY common.cn.loading "Loading Callnumber Page...">
+<!ENTITY common.cn.browsing "You are now browsing">
+<!ENTITY common.cn.previous "<< Previous Page">
+<!ENTITY common.cn.shelf "Shelf Browser">
+<!ENTITY common.cn.next "Next Page >>">
+
+<!ENTITY common.textsize.title "Text Size: ">
+<!ENTITY common.textsize.regular "Regular">
+<!-- Regular / Large -->
+<!ENTITY common.textsize.separator "/">
+<!ENTITY common.textsize.large "Large">
+
+<!ENTITY home.js.disabled "JavaScript must be enabled in order for you to use the regular Evergreen Catalogue.
+However, it seems JavaScript is either disabled or not supported by your browser.
+To use the regular Evergreen Catalogue, enable JavaScript by changing your browser options, then
+<a style='color: blue; text-decoration: underline;' href='/'>try again</a>.
+<br/><br/>Alternatively, you can use the basic HTML-only catalogue
+<a style='color: blue; text-decoration: underline;' href='/opac/extras/slimpac/start.html'>here</a>.">
+<!-- =================================================================
+ MyOPAC bookbag page
+ ================================================================= -->
+
+<!ENTITY myopac.delete.bookbag "This will remove the selected bookbag and all items contained within the bookbag.
+Are you sure you wish to continue?">
+<!ENTITY myopac.no.bookbags "You have not created any bookbags">
+<!ENTITY myopac.bookbags.title "My Bookbags">
+<!ENTITY myopac.bookbag.items "# Items">
+<!ENTITY myopac.bookbag.shared "Shared">
+<!ENTITY myopac.bookbag.toggle "Share / Hide">
+<!ENTITY myopac.bookbag.delete "Delete this bookbag?">
+<!ENTITY myopac.items "Items">
+<!ENTITY myopac.view "(View)">
+<!ENTITY myopac.atom.feed "ATOM Feed">
+<!ENTITY myopac.bookbag.hide "Hide">
+<!ENTITY myopac.delete "Delete">
+<!ENTITY myopac.bookbag.create "Create a new Bookbag">
+<!ENTITY myopac.bookbag.naming "Enter the name of the new Bookbag: ">
+<!ENTITY myopac.bookbag.share "Share this Bookbag">
+<!ENTITY myopac.bookbag.no.items "The selected bookbag contains no items...">
+<!ENTITY myopac.bookbag.remove "Remove this item?">
+<!ENTITY myopac.remove.link "remove">
+<!ENTITY myopac.publish.text 'Sharing a Bookbag means that the contents of the Bookbag will be visible to others.
+To see the public view of a shared Bookbag, click the "View" link in the
+"Shared" column of the Bookbag list at the top of this page.'>
+<!ENTITY myopac.item.confirm "Are you sure you wish to remove this bookbag item?">
+<!ENTITY myopac.publish.confirm "Sharing this bookbag will allow the contents
+of the bookback to be seen by others. Are you sure you wish to share this bookbag?">
+<!ENTITY myopac.unpublish.confirm "Are you sure you wish to hide this bookbag?">
+<!ENTITY myopac.update.success "The Bookbag was successfully updated.">
+<!ENTITY myopac.updated.success "Bookbag successfully updated">
+<!ENTITY myopac.create.warning "Warning: Adding items to a bookbag creates a link between you and the
+items in the database. The contents of the bookbag are NOT publicly
+viewable unless the bookbag is shared. However, if you prefer not to
+have any link between your patron record and a particular item or items,
+we suggest that you do not place said items in a bookbag or that you
+avoid using bookbags all together. Thank you.">
+<!ENTITY myopac.describe.bookbags "Bookbags are...">
+<!-- =================================================================
+ MyOPAC Checked Page
+ ================================================================= -->
+
+<!ENTITY myopac.checked.out "Total items out:">
+<!ENTITY myopac.checked.overdue "Total items overdue:">
+<!ENTITY myopac.checked.renew "Renew Selected Items">
+<!ENTITY myopac.checked.renewing "Renewing...">
+<!ENTITY myopac.checked.renew.remaining "Renewals Remaining">
+<!ENTITY myopac.checked.noitems "You have no items checked out at this time">
+<!ENTITY myopac.checked.other.circ "Other Circulations">
+<!ENTITY myopac.checked.circ.lib "Circulating Library">
+<!ENTITY myopac.checked.item.type "Circulation Type">
+<!ENTITY myopac.checked.circ.time "Please return by ...">
+<!ENTITY myopac.checked.renew.success "item(s) successfully renewed">
+<!ENTITY myopac.checked.renew.confirm "Are you sure you wish to renew the selected item(s)?">
+<!ENTITY myopac.checked.renew.fail "The system is unable to renew the selected item at this time. This usually means the item is needed to fulfill a hold. Please see a librarian for further help.">
+<!ENTITY myopac.checked.renew.fail2 "Library policy prevents the renewal of this item at this time. Please see a librarian for further details.">
+<!-- =================================================================
+ MyOPAC Fines Page
+ ================================================================= -->
+
+<!ENTITY myopac.fines.title "Summary">
+<!ENTITY myopac.fines.owed "Total Owed">
+<!ENTITY myopac.fines.paid "Total Paid">
+<!ENTITY myopac.fines.balance "Balance Owed">
+<!ENTITY myopac.fines.status "Loading...">
+<!ENTITY myopac.fines.overdue "Overdue Materials">
+<!ENTITY myopac.fines.checkout "Checkout Date">
+<!ENTITY myopac.fines.due "Due Date">
+<!ENTITY myopac.fines.returned "Date Returned">
+<!ENTITY myopac.fines.accruing "(fines accruing)">
+<!ENTITY myopac.fines.other "Other Fees">
+<!ENTITY myopac.fines.time.start "Transaction Start Time">
+<!ENTITY myopac.fines.time.paid "Last Payment Time">
+<!ENTITY myopac.fines.owed.initial "Initial Amount Owed">
+<!ENTITY myopac.fines.paid.amount "Total Amount Paid">
+<!ENTITY myopac.fines.type "Billing Type">
+<!-- =================================================================
+ MyOPAC Holds Page
+ ================================================================= -->
+
+<!ENTITY myopac.holds.formats "Formats">
+<!ENTITY myopac.holds.location "Pickup Location">
+<!ENTITY myopac.holds.edit "Edit">
+<!ENTITY myopac.holds.status.none "You have no items on hold at this time">
+<!ENTITY myopac.holds.status.waiting "Waiting for copy">
+<!ENTITY myopac.holds.status.intransit "In Transit">
+<!ENTITY myopac.holds.status.available "Ready for Pickup">
+<!ENTITY myopac.holds.cancel "Cancel">
+<!ENTITY myopac.holds.verify "If you wish to cancel the selected hold, click OK, otherwise click Cancel.">
+<!ENTITY myopac.holds.freeze_selected "Suspend">
+<!ENTITY myopac.holds.thaw_selected "Activate">
+<!ENTITY myopac.holds.thaw_date_selected "Set Active Date">
+<!ENTITY myopac.holds.cancel_selected "Cancel">
+<!ENTITY myopac.holds.processing "Processing holds... This may take a moment.">
+<!ENTITY myopac.holds.actions "Actions for selected holds">
+<!ENTITY myopac.holds.cancel.confirm "Are you sure you wish to cancel the selected holds?">
+<!ENTITY myopac.holds.freeze.confirm 'Are you sure you wish to suspend the selected holds?
+If an item has already been selected to fulfill the hold, it will not be suspended'>
+<!ENTITY myopac.holds.thaw.confirm 'Are you sure you wish to activate the selected holds?'>
+<!ENTITY myopac.holds.thaw_date.confirm 'Are you sure you wish to change the activate date for the selected holds?'>
+<!ENTITY myopac.holds.freeze.select_thaw "Select an automatic activation date. If no date is chosen, the holds will remain suspended until they are manually activated.">
+
+<!ENTITY opac.holds.freeze "Suspend this hold">
+<!ENTITY opac.holds.freeze.help "A suspended hold will retain its place in the queue, but will not be fulfilled until it has been activated.">
+<!ENTITY opac.holds.freeze.thaw_date "Automatically activate hold on:">
+<!ENTITY opac.holds.expire_time "Expiration date">
+<!ENTITY myopac.holds.estimated_wait "Estimated Wait (days)">
+<!-- =================================================================
+ MyOPAC Preferences Page
+ ================================================================= -->
+
+<!ENTITY myopac.prefs.title "Preferences">
+<!ENTITY myopac.prefs.hits "Search hits per page">
+<!ENTITY myopac.prefs.font "Default Font Size">
+<!ENTITY myopac.prefs.font.regular "Regular Font">
+<!ENTITY myopac.prefs.font.large "Large Font">
+<!ENTITY myopac.prefs.holds.notify "Default Hold Notification Method">
+<!ENTITY myopac.prefs.holds.both "Use Phone and Email">
+<!ENTITY myopac.prefs.holds.phone "Use Phone Only">
+<!ENTITY myopac.prefs.holds.email "Use Email Only">
+<!ENTITY myopac.prefs.search.location "Default Search Location">
+<!ENTITY myopac.prefs.search.home "Always search my home library by default.">
+<!ENTITY myopac.prefs.search.range "Default Search Range">
+<!ENTITY myopac.prefs.save "Save Preference Changes">
+<!ENTITY myopac.prefs.save.success "Preferences successfully updated">
+<!ENTITY myopac.prefs.save.failed "Preferences update failed!">
+<!ENTITY myopac.prefs.help "This setting defines how you will be notified of holds that are ready to be picked up from the library.
+By default, holds will use the notification style you choose here.
+However, you will still have the option to change individual holds regardless of this setting.">
+<!ENTITY myopac.holds.unfrozen "Active">
+<!ENTITY myopac.holds.frozen.until "Activate on...">
+<!-- =================================================================
+ MyOPAC Summary page
+ ================================================================= -->
+
+<!ENTITY myopac.summary.expired "Your account expired on <span id='myopac.expired.date'/>!
+Please see a librarian to renew your account.">
+<!ENTITY myopac.summary.notes "* Staff Notes *">
+<!ENTITY myopac.summary.phone.day "Day Phone">
+<!ENTITY myopac.summary.phone.evening "Evening Phone">
+<!ENTITY myopac.summary.phone.other "Other Phone">
+<!ENTITY myopac.summary.change "Change">
+<!ENTITY myopac.summary.username.enter "Enter new username:">
+<!ENTITY myopac.summary.password.text "(not shown)">
+<!ENTITY myopac.summary.password.current "Enter current password:">
+<!ENTITY myopac.summary.password.new "Enter new password:">
+<!ENTITY myopac.summary.password.reenter "Re-enter new password:">
+<!ENTITY myopac.summary.email "Email Address">
+<!ENTITY myopac.summary.email.new "Enter new email address:">
+<!ENTITY myopac.summary.id.primary "Primary Identification">
+<!ENTITY myopac.summary.barcode "Active Barcode">
+<!ENTITY myopac.summary.home "Home Library">
+<!ENTITY myopac.summary.genesis "Account Creation Date">
+<!ENTITY myopac.summary.addresses "Addresses">
+<!ENTITY myopac.summary.addresses.pending "Pending Addresses">
+<!ENTITY myopac.summary.address.type "Address Type">
+<!ENTITY myopac.summary.address.street "Street">
+<!ENTITY myopac.summary.address.city "City">
+<!ENTITY myopac.summary.address.county "County">
+<!ENTITY myopac.summary.address.state "Province">
+<!ENTITY myopac.summary.address.country "Country">
+<!ENTITY myopac.summary.address.zip "Postal Code">
+<!ENTITY myopac.summary.username.error "Please enter a username">
+<!ENTITY myopac.summary.username.dup "The requested username is not available. Please choose a different username.">
+<!ENTITY myopac.summary.username.success "Username successfully updated">
+<!ENTITY myopac.summary.username.failure "Username update failed">
+<!ENTITY myopac.summary.username.invalid "Username cannot contain spaces or have the same format as a barcode">
+<!ENTITY myopac.summary.email.error "Please enter a valid email address">
+<!ENTITY myopac.summary.email.success "Email address successfully updated">
+<!ENTITY myopac.summary.email.failed "Email address update failed">
+<!ENTITY myopac.summary.password.error "Passwords are empty or do not match">
+<!ENTITY myopac.summary.password.success "Password successfully updated">
+<!ENTITY myopac.summary.password.failure "Password update failed">
+<!-- =================================================================
+ Advanced Search Page
+ ================================================================= -->
+
+<!ENTITY opac.advanced.wizard.contains "Selected field contains the following words">
+<!ENTITY opac.advanced.wizard.nocontains "Selected field does <u>not</u> contain the following words">
+<!ENTITY opac.advanced.wizard.exact "Selected field contains the <u>exact</u> phrase">
+<!ENTITY opac.advanced.refined.title "Refined Advanced Search">
+<!ENTITY opac.advanced.refined.title_contains "Title contains the following words">
+<!ENTITY opac.advanced.refined.author_contains "Author contains the following words">
+<!ENTITY opac.advanced.refined.subject_contains "Subject contains the following words">
+<!ENTITY opac.advanced.refined.series_contains "Series contains the following words">
+<!ENTITY opac.advanced.refined.contains "Contains">
+<!ENTITY opac.advanced.refined.nocontains "Does not contain">
+<!ENTITY opac.advanced.refined.exact "Matches Exactly">
+<!ENTITY opac.advanced.marc.warning "For Librarians">
+<!ENTITY opac.advanced.marc.title "MARC Expert Search">
+<!ENTITY opac.advanced.marc.tag "MARC Tag">
+<!ENTITY opac.advanced.marc.ind1 "Indicator 1">
+<!ENTITY opac.advanced.marc.ind2 "Indicator 2">
+<!ENTITY opac.advanced.marc.subfield "Subfield">
+<!ENTITY opac.advanced.marc.value "Value">
+<!ENTITY opac.advanced.marc.addrow "Add a new row">
+<!ENTITY opac.advanced.quick.title "Quick Search">
+<!ENTITY opac.advanced.quick.isbn "ISBN">
+<!ENTITY opac.advanced.quick.issn "ISSN">
+<!ENTITY opac.advanced.quick.lccn "LCCN">
+<!-- title control number -->
+<!ENTITY opac.advanced.quick.tcn "TCN">
+<!ENTITY opac.advanced.quick.barcode "Item Barcode">
+<!ENTITY opac.advanced.quick.cn "Call Number">
+<!ENTITY opac.advanced.copy_loc_filter "Shelving Location">
+<!-- ==========================================================
+ MARC expert search
+ ========================================================== -->
+
+<!ENTITY search.marc "MARC Expert Search">
+<!ENTITY search.marc.tag "Tag:">
+<!ENTITY search.marc.subfield "Subfield:">
+<!ENTITY search.marc.value "Value:">
+<!ENTITY search.marc.add.row "Add Row">
+<!-- ==========================================================
+ Status bar
+ ========================================================== -->
+
+
+<!ENTITY status.results "Including results for">
+<!-- ==========================================================
+ Tips
+ ========================================================== -->
+
+
+<!ENTITY tips.label "Tip:">
+<!-- =================================================================
+ More generic stuff
+ ================================================================= -->
+
+<!ENTITY opac.session_expiring "Your login session will timeout in 1 minute unless there is activity.">
+<!ENTITY opac.session_expired "Your login session has expired">
+<!ENTITY navigate.home "Start over">
+<!ENTITY navigate.home.title "Go to the catalogue home page">
+<!ENTITY opac.navigate.advanced "Advanced Search">
+<!ENTITY opac.navigate.advanced.title "Go to the Advanced Search Page">
+<!ENTITY navigate.myopac "My Account">
+<!ENTITY opac.navigate.myopac "My Account">
+<!ENTITY navigate.myopac.title "Go to My OPAC">
+<!ENTITY navigate.login "Log in">
+<!ENTITY navigate.login.title "Log in for personalized features">
+<!ENTITY navigate.logout "Log out">
+<!ENTITY navigate.logout.title "Log out">
+<!ENTITY opac.navigate.selectNewOrg "Choose a different library">
+<!ENTITY opac.navigate.selectOrg "Choose a library to search">
+<!ENTITY navigate.loggedinas "You are logged in as ">
+<!ENTITY navigate.loggedinas.title "Logged in as...">
+<!ENTITY navigate.titleGroupResults "My Search Results">
+<!ENTITY navigate.titleResults "My Title Results">
+<!ENTITY navigate.title.details "My Title Details">
+<!ENTITY navigate.record.details "Record Details">
+<!-- =================================================================
+ Footer
+ ================================================================= -->
+
+<!ENTITY footer.basic "Basic Catalogue (HTML only)">
+<!ENTITY footer.find.library "Find a Library Near Me">
+<!ENTITY footer.find.url "http://www.georgialibraries.org/lib/directories/pineslibdir.html">
+<!ENTITY footer.help.url "http://open-ils.org/dokuwiki/doku.php?id=evergreen-user:opac_help">
+<!ENTITY footer.help "Help">
+<!ENTITY footer.library.url "http://www.georgialibraries.org/public/pines.html">
+<!ENTITY footer.library.about "About PINES">
+<!ENTITY footer.union.url "http://www.galileo.usg.edu/">
+<!ENTITY footer.union "GALILEO">
+<!ENTITY footer.copyright "Copyright © 2006-2008 Georgia Public Library Service">
+<!-- Introduces the logo for the project -->
+<!ENTITY footer.logo "Powered by">
+<!-- =================================================================
+ My OPAC
+ ================================================================= -->
+
+<!ENTITY myopac.account "Account Summary">
+<!ENTITY myopac.checkouts "Items Checked Out">
+<!ENTITY myopac.holds "Items on Hold">
+<!ENTITY myopac.fines "Fines">
+<!ENTITY myopac.preferences "Account Preferences">
+<!ENTITY myopac.bookbags "My Bookbags">
+<!-- =================================================================
+ Sidebar
+ ================================================================= -->
+
+<!ENTITY sidebar.relevantSubjects.headerLabel "Relevant Subjects">
+<!ENTITY sidebar.relevantAuthors.headerLabel "Relevant Authors">
+<!ENTITY sidebar.relevantSeries.headerLabel "Relevant Series">
+<!ENTITY sidebar.relevantReviews.headerLabel "Reviews">
+<!ENTITY sidebar.quick.search "Quick Search">
+<!ENTITY sidebar.copy.not.found "No copy with the requested barcode was found">
+<!-- =================================================================
+ Search formats
+ ================================================================= -->
+
+<!ENTITY opac.search.books "Books">
+<!ENTITY opac.search.allFormats "All Formats">
+<!ENTITY opac.search.largePrint "Large Print Books">
+<!ENTITY opac.search.audioBooks "Audiobooks">
+<!ENTITY opac.search.videoRecordings "Video Recordings">
+<!ENTITY opac.search.music "Music">
+<!ENTITY opac.search.electronic "Electronic Resources">
+<!ENTITY opac.search.nowSearching "Now Searching">
+<!-- =================================================================
+ Page Titles
+ ================================================================= -->
+
+
+<!ENTITY opac.title.home "Evergreen Home">
+<!ENTITY opac.title.mresult "Evergreen Title Groups">
+<!ENTITY opac.title.rresult "Evergreen Titles">
+<!ENTITY opac.title.myopac "Evergreen My Account">
+<!ENTITY opac.title.rdetail "Evergreen Title Details">
+<!ENTITY opac.title.advanced "Evergreen Advanced Search">
+<!ENTITY opac.title.reqitems "Evergreen Request Items">
+<!ENTITY opac.title.cnbrowse "Evergreen Call Number Browse">
+
+
+<!ENTITY opac.holds.forMe "Place this hold for myself">
+<!ENTITY opac.holds.xulRecipient "Enter recipient barcode">
+<!ENTITY opac.holds.recipient "Recipient">
+<!ENTITY opac.holds.placeHold "Place Hold">
+<!ENTITY opac.holds.contactPhone "Contact telephone number">
+<!ENTITY opac.holds.contactEmail "Contact email address">
+<!ENTITY opac.holds.pickupLocation "Pickup location">
+<!ENTITY opac.holds.success "Hold was successfully placed">
+<!ENTITY opac.holds.failure "Hold was not successfully placed">
+<!-- =================================================================
+ Advanced
+ ================================================================= -->
+<!ENTITY advanced.search.title "Search Input">
+<!ENTITY advanced.add.row "Add Search Row">
+<!ENTITY advanced.search.submit "Submit Search">
+<!ENTITY advanced.search.reset "Reset Form">
+<!ENTITY advanced.search.filters "Search Filters">
+<!ENTITY advanced.item.form "Item Form">
+<!ENTITY advanced.item.type "Item Type">
+<!ENTITY advanced.link "Advanced">
+<!ENTITY advanced.basic.link "Basic">
+<!ENTITY advanced.literary.form "Literary Form">
+<!ENTITY advanced.non.fiction "Non Fiction">
+<!ENTITY advanced.fiction "Fiction">
+<!ENTITY advanced.language "Language">
+<!ENTITY advanced.audience "Audience">
+<!ENTITY advanced.adult "Adult">
+<!ENTITY advanced.juvenile "Juvenile">
+<!ENTITY advanced.general "General">
+<!ENTITY advanced.sort.criteria "Sort Criteria">
+<!ENTITY advanced.search.library "Search Library">
+<!ENTITY advanced.relevance "Relevance">
+<!ENTITY advanced.pubdate "Publication date">
+<!ENTITY advanced.sort.asc "Ascending / A to Z">
+<!ENTITY advanced.sort.desc "Descending / Z to A">
+<!ENTITY advanced.frbrize "Group Formats and Editions">
+<!ENTITY advanced.go "Go">
+<!ENTITY advanced.biblevel "Bib Level">
+<!ENTITY advanced.filter.pubyear "Publication Year">
+<!ENTITY advanced.filter.pubyear.equals "Is">
+<!ENTITY advanced.filter.pubyear.before "Before">
+<!ENTITY advanced.filter.pubyear.after "After">
+<!ENTITY advanced.filter.pubyear.between "Between">
+<!-- =================================================================
+ Rdetail
+ ================================================================= -->
+
+<!ENTITY rdetail.print "print these details">
+<!ENTITY rdetail.cn.barcode "Barcode">
+<!ENTITY rdetail.cn.location "Location">
+<!ENTITY rdetail.cn.hold.age "Age Hold Protection">
+<!ENTITY rdetail.cn.genesis "Create Date">
+<!ENTITY rdetail.cn.holdable "Holdable">
+<!ENTITY rdetail.cn.due "Due Date">
+<!ENTITY rdetail.cn.more "more info...">
+<!ENTITY rdetail.cn.less "less info">
+<!ENTITY rdetail.cn.hold "place hold">
+<!ENTITY rdetail.cn.disabled "- Disabled -">
+<!ENTITY rdetail.cn.note "Copy Note">
+<!ENTITY rdetail.cn.category "Copy Category">
+<!ENTITY rdetail.cn.print "Print Page">
+<!ENTITY rdetail.page.results "First record">
+<!-- Result # &common.of; # -->
+<!ENTITY rdetail.result "Result">
+<!ENTITY rdetail.start "Start">
+<!ENTITY rdetail.page.previous "Previous record">
+<!ENTITY rdetail.page.next "Next record">
+<!ENTITY rdetail.page.last "Last record">
+<!ENTITY rdetail.end "End">
+<!ENTITY rdetail.more "Bookbags...">
+<!ENTITY rdetail.bookbag.add "Add to bookbag">
+<!ENTITY rdetail.bookbag.create "Create a new bookbag">
+<!ENTITY rdetail.record.deleted "This record has been deleted from the database.
+We recommend that you remove this title from any bookbags it may have been added to.">
+<!ENTITY rdetail.none "(none)">
+<!ENTITY rdetail.bookbag.add.success "Item successfully added to bookbag">
+<!ENTITY rdetail.bookbag.name "Enter the name of the new bookbag">
+<!ENTITY rdetail.bookbag.create.success "Bookbag successfully created">
+<!ENTITY rdetail.detailMain.headerLabel "Record Summary">
+<!ENTITY rdetail.detailMain.subjects "Subjects">
+<!ENTITY rdetail.detailMain.abstract "Abstract">
+<!ENTITY rdetail.detailMain.viewMarc "View MARC">
+<!ENTITY rdetail.detailMain.hideMarc "Return to title details">
+<!ENTITY rdetail.author.search "Perform an author search">
+<!ENTITY rdetail.copyInfo.headerLabel "Copy Information">
+<!ENTITY rdetail.copyInfo.library "Library">
+<!ENTITY rdetail.copyInfo.callnumber "Callnumber">
+<!ENTITY rdetail.copyInfo.copylocation "Copy Location">
+<!ENTITY rdetail.copyInfo.local "View Copy Information for this location only">
+<!ENTITY rdetail.copyInfo.all "View copy information for all libraries">
+<!ENTITY rdetail.copyInfo.actions "Actions">
+<!ENTITY rdetail.copyInfo.print "Print Call Numbers for this library">
+<!ENTITY rdetail.copyInfo.details "Copy Details">
+<!ENTITY rdetail.copyInfo.browse "Browse Call Numbers">
+<!ENTITY rdetail.copyInfo.hold "Place Hold">
+<!ENTITY rdetail.extras.summary "Copy Summary">
+<!ENTITY rdetail.extras.browser "Shelf Browser">
+<!ENTITY rdetail.extras.reviews "Reviews">
+<!ENTITY rdetail.extras.toc "Table of Contents">
+<!ENTITY rdetail.extras.excerpt "Excerpt">
+<!ENTITY rdetail.extras.preview "Preview">
+<!ENTITY rdetail.extras.author.notes "Author Notes">
+<!ENTITY rdetail.extras.annotation "Annotation">
+<!ENTITY rdetail.extras.marc "MARC Record">
+<!ENTITY rdetail.extras.call.null "There are no call numbers for this item at this location.">
+<!ENTITY rdetail.extras.call.local "Local Call Numbers:">
+<!ENTITY rdetail.extras.preview.fulltext "Full text">
+<!ENTITY rdetail.extras.preview.title "See the full text of this book.">
+<!ENTITY rdetail.extras.preview.badge "Show a preview of this book from Google Book Search">
+<!ENTITY rdetail.loading "Loading copy infomation...">
+<!ENTITY rdetail.noneAvailable " * There are no copies in this location">
+<!ENTITY rdetail.summary.online "Online Resources">
+
+<!ENTITY result.sort_by "Sort Results by Relevance">
+<!ENTITY result.sort_by.title "Sort Results by Title">
+<!ENTITY result.sort_by.author "Sort Results by Author">
+<!ENTITY result.sort_by.pubdate "Sort Results by Publication Date">
+
+<!ENTITY result.limit2avail "Limit to Available">
+<!ENTITY result.info.copies "Available copies / Total copies">
+<!ENTITY result.info.no.items "No items with the selected format were found in this location.">
+<!ENTITY result.info.format.items "Listed below are all items in the catalogue with the chosen format.">
+<!ENTITY result.info.show "Show records for">
+
+<!ENTITY result.lowhits.few "Few hits were returned for your search.">
+<!ENTITY result.lowhits.zero "Zero hits were returned for your search.">
+<!ENTITY result.lowhits.did.you.mean "Maybe you meant:">
+<!ENTITY result.lowhits.formats "You will find more hits when searching all item formats:">
+<!ENTITY result.lowhits.formats.search "Search again with all formats?">
+<!ENTITY result.lowhits.related "You may also like to try these related searches:">
+<!ENTITY result.lowhits.expand "You may also wish to expand your search range to:">
+<!ENTITY result.lowhits.class "You can try searching the same terms by:">
+<!ENTITY result.lowhits.title "title">
+<!ENTITY result.lowhits.author "author">
+<!ENTITY result.lowhits.subject "subject">
+<!ENTITY result.lowhits.series "series">
+<!ENTITY result.lowhits.keyword "keyword">
+
+<!ENTITY result.table.keyword "View titles for this record">
+<!ENTITY result.table.author "Perform an Author Search">
+<!ENTITY result.googleBooks.browse "Browse in Google Books Search">
+
+<!ENTITY common.call.number.label "Call Number:">
+<!ENTITY common.isbn.label "ISBN:">
+<!ENTITY common.issn.label "ISSN:">
+<!ENTITY common.copy.barcode.label "Copy Barcode:">
+<!ENTITY common.hold.place "Place hold for my account">
+<!ENTITY common.hold.check "Checking for possibility of hold fulfillment...">
+<!ENTITY common.hold.create "Create / Edit a Hold">
+<!ENTITY common.hold.update "Update Hold">
+<!ENTITY common.hold.type.label "Hold Type:">
+<!ENTITY common.hold.volume "Volume Hold">
+<!ENTITY common.hold.copy "Copy Hold">
+<!ENTITY common.hold.advanced "Advanced Hold Options">
+<!ENTITY common.hold.delivery "Please select a physical location where your hold can be delivered.">
+<!ENTITY common.hold.exists "A hold already exists on the requested item.">
+<!ENTITY common.hold.exists.override "A hold already exists on the requested
+item. Would you like to create the hold anyway?">
+<!ENTITY common.hold.barred 'PATRON BARRED. Please see any notes in the
+"Staff Notes" section of your "My Account" page or contact your local library.'>
+<!ENTITY common.hold.item.invalid "This hold is no longer valid. It's likely that the
+target for the hold was deleted from the system. Please cancel this hold and
+place a new one.">
+<!ENTITY common.hold.patron.invalid "The patron barcode entered as the hold recipient is invalid.">
+<!-- Was (??), perhaps change to a button or icon? -->
+<!ENTITY common.help "(Help)">
+<!ENTITY common.phone.format.help "The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ">
+<!ENTITY common.hold.failed "No items were found that could fulfill the requested holds.
+It's possible that choosing a different format will result in a successful hold.
+It is also possible that you have exceeded the number of allowable holds.
+For further information, please consult your local librarian.">
+<!ENTITY common.control.click "(control-click to select multiple formats)">
+<!ENTITY common.format.alternatives "Acceptable Alternative Formats:">
+<!ENTITY common.phone.format "(XXX-YYY-ZZZZ)">
+<!ENTITY common.phone.enable "Enable phone notifications for this hold?">
+<!ENTITY common.email.enable "Enable email notifications for this hold?">
+<!ENTITY common.email.none "(Patron has no configured email address)">
+<!ENTITY common.email.set "(See <a class='classic_link' id='holds.no_email.my_account'>My Account</a> for setting your email address)">
+<!ENTITY common.keywords.label "Keywords:">
+<!ENTITY common.physical.label "Physical Description:">
+<!ENTITY common.series.label "Series:">
+<!ENTITY common.subject.label "Subject:">
+<!ENTITY common.title.label "Title:">
+<!ENTITY common.author.label "Author:">
+<!ENTITY common.format.label "Format:">
+<!ENTITY library.select "Find results in">
+<!ENTITY library.select.label "Choose a different library...">
+<!ENTITY library.select.help "Choose a library to search">
+<!ENTITY login.username "Username">
+<!ENTITY login.password.change "Change Password">
+<!ENTITY login.first.time "This appears to be the first time you have logged in.
+You will need to change your password.">
+<!ENTITY login.password.current.enter "Enter your current password">
+<!ENTITY login.password.new.enter "Enter the new password">
+<!ENTITY login.password.new.reenter "Re-type the new password for verification">
+<!ENTITY login.password.update "Update Password">
+<!ENTITY login.password.nomatch "Passwords do not match">
+<!ENTITY login.password.success "Password successfully updated">
+<!ENTITY login.password.strength "The password provided is not strong enough.">
+<!ENTITY login.barcode.inactive "The barcode used to login is marked as inactive. Please contact your local library.">
+<!ENTITY login.account.inactive "This account has been deactivated. Please contact your local library.">
+<!ENTITY login.failed "Login failed. The username or password provided was not valid.
+Ensure Caps-Lock is off and try again or contact your local library.">
+<!ENTITY button.go "Go!">
+<!-- =================================================================
+ Slimpac Simple Search
+ ================================================================= -->
+
+<!ENTITY slimpac.language.select "Select language">
+
+<!ENTITY slimpac.start.title "Simple Search">
+<!ENTITY slimpac.start.nowSearching "Now searching: ">
+<!ENTITY slimpac.start.dynamic "Dynamic Catalogue">
+<!-- =================================================================
+ Slimpac Advanced Search
+ ================================================================= -->
+
+<!ENTITY slimpac.advanced.language "Item Language">
+<!ENTITY slimpac.advanced.create_date "Record Creation Date">
+<!ENTITY slimpac.advanced.edit_date "Record Edit Date">
+
+<!ENTITY opac.image_provided "Image provided by">
+<!ENTITY vendor.name "Amazon">
+<!ENTITY vendor.base_link "http://amazon.com/dp/">
+<!-- =================================================================
+ Selfcheck
+ ================================================================= -->
+
+<!ENTITY selfck.staff_login_label "Staff login">
+<!ENTITY selfck.staff_login "Library barcode or username">
+<!ENTITY selfck.staff_pw "Password">
+<!ENTITY selfck.submit "Submit">
+<!ENTITY selfck.clear "Clear">
+<!ENTITY selfck.patron_barcode_label "Please scan your library barcode">
+<!ENTITY selfck.item_barcode_label "Please scan an item to checkout or renew:">
+<!ENTITY selfck.barcode "Barcode">
+<!ENTITY selfck.title "Title">
+<!ENTITY selfck.author "Author">
+<!ENTITY selfck.due_date "Due Date">
+<!ENTITY selfck.remaining "Renewals Remaining">
+<!ENTITY selfck.cotype "Type">
+<!ENTITY selfck.cotype_co "Checkout">
+<!ENTITY selfck.cotype_rn "Renewal">
+<!ENTITY selfck.done "Done">
+<!ENTITY selfck.welcome "Welcome">
+<!ENTITY selfck.printing "Printing Receipt...">
+<!-- event messages -->
+
+<!ENTITY selfck.event.co_success "Check out succeeded">
+<!ENTITY selfck.event.co_unknown "An unknown event has occurred">
+<!ENTITY selfck.event.dupe_barcode "This item has already been checked out during this session">
+<!ENTITY selfck.event.patron_not_found "The patron barcode was not found">
+<!ENTITY selfck.event.item_noncat "The requested item is not in the catalogue">
+<!ENTITY selfck.event.item_nocirc "The requested item is not allowed to circulate">
+<!ENTITY selfck.event.already_out "The requested item is already checked out to another patron">
+<!ENTITY selfck.items_out "You checked out the following items">
+<!ENTITY selfck.org_hours "Hours of Operation">
+<!ENTITY selfck.org_phone "Library Phone Number">
+<!ENTITY selfck.day0 "Monday">
+<!ENTITY selfck.day1 "Tuesday">
+<!ENTITY selfck.day2 "Wednesday">
+<!ENTITY selfck.day3 "Thursday">
+<!ENTITY selfck.day4 "Friday">
+<!ENTITY selfck.day5 "Saturday">
+<!ENTITY selfck.day6 "Sunday">
+
Added: conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac_conifer.dtd
===================================================================
--- conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac_conifer.dtd (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/local/locale/en-CA/opac_conifer.dtd 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,40 @@
+<!-- Entities for detailed item page -->
+<!ENTITY common.alternate.title "Alternate title">
+<!ENTITY common.corporate.author "Corporate author">
+<!ENTITY common.meeting.name "Meeting name">
+<!ENTITY common.issn "ISSN">
+<!ENTITY common.subjects "Subjects">
+<!ENTITY common.general.note "General note">
+<!ENTITY common.contents.note "Contents note">
+<!ENTITY common.usage.restrictions "Usage restrictions">
+<!ENTITY common.performer.note "Performer note">
+<!ENTITY common.additional.authors "Additional authors">
+<!ENTITY common.preceding.entry "Preceding entry">
+<!ENTITY common.succeeding.entry "Succeeding entry">
+
+<!ENTITY rdetail.extras.preview "Preview">
+<!ENTITY rdetail.extras.performer.notes "Performer or Participant Notes">
+
+<!-- custom UWin login links -->
+<!ENTITY uwin.myopac.loginhelp.question "">
+<!ENTITY uwin.myopac.loginhelp.url "http://www.uwindsor.ca/units/leddy/leddy.nsf/LoggingIntoTheLibraryCatalogue!OpenForm">
+<!ENTITY uwin.myopac.loginhelp.url_text "Login help">
+
+<!-- custom UWin askON links -->
+<!ENTITY uwin.askON "AskON: online research help">
+<!ENTITY uwin.askON.title "Get live research help">
+<!ENTITY uwin.askON.div.id "askON_link_div">
+<!ENTITY uwin.askON.link.id "askON_link">
+<!ENTITY uwin.askON.url "http://infoservices.uwindsor.ca/askON/">
+
+<!-- custom UWin footer links -->
+<!ENTITY uwin.footer.databases "Find Journal Articles and Research Tools">
+<!ENTITY uwin.footer.databases.url "http://www.uwindsor.ca/units/leddy/leddy.nsf/JournalArticlesAndResearchToolsBySubject!OpenForm">
+<!ENTITY uwin.footer.help "Help">
+<!ENTITY uwin.footer.help.url "http://www.uwindsor.ca/units/leddy/leddy.nsf/SearchingTheCatalogue!OpenForm">
+<!ENTITY uwin.footer.home.leddy "Leddy Library">
+<!ENTITY uwin.footer.home.leddy.url "http://www.uwindsor.ca/library">
+<!ENTITY uwin.footer.home.law "Law Library">
+<!ENTITY uwin.footer.home.law.url "http://www.uwindsor.ca/units/law/PaulMartin.nsf">
+<!ENTITY uwin.footer.journals "Browse Journals">
+<!ENTITY uwin.footer.journals.url "http://sfx.scholarsportal.info/windsor/az">
Added: conifer/trunk/web/opac/skin/uwin/local/xml/item_lang_options.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/local/xml/item_lang_options.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/local/xml/item_lang_options.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,28 @@
+
+<!--
+Language otions for languages that exist in the catalog.
+This file should be updated on occasion.
+
+develooper=# select code,value from config.language_map m
+ join metabib.rec_descriptor r on (r.item_lang = m.code) group by 1,2;
+-->
+
+<option value='eng'>English</option>
+<option value='fre'>French</option>
+<option value='spa'>Spanish</option>
+<option value='ger'>German</option>
+<option value='ita'>Italian</option>
+<option value='chi'>Chinese</option>
+<option value='jpn'>Japanese</option>
+<option value='kor'>Korean</option>
+<option value='dut'>Dutch</option>
+<option value='gre'>Greek, Modern (1453- )</option>
+<option value='lat'>Latin</option>
+<option value='vie'>Vietnamese</option>
+<option value='rus'>Russian</option>
+<option value='nor'>Norwegian</option>
+<option value='wel'>Welsh</option>
+<option value='pau'>Palauan</option>
+<option value='swe'>Swedish</option>
+<option value='nav'>Navajo</option>
+<option value='und'>Undetermined</option>
Added: conifer/trunk/web/opac/skin/uwin/xml/advanced/adv_global_row.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/advanced/adv_global_row.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/advanced/adv_global_row.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,36 @@
+<!--
+<tr id='adv_global_trow' type='input'>
+-->
+<tr id='<!--#echo var="adv_global_row_id"-->' type='input'>
+ <td align='center' width='100%' nowrap='nowrap'>
+
+ <!-- select the search class -->
+ <select name='type' style='margin-right: 7px;'>
+ <option value='keyword' selected='selected'>&common.keyword;</option>
+ <option value='title'>&common.title;</option>
+ <option value='author'>&common.author;</option>
+ <option value='subject'>&common.subject;</option>
+ <option value='series'>&common.series;</option>
+ </select>
+
+ <!-- select how to treat the text -->
+ <select name='contains' style='margin-right: 7px;'>
+ <option value='contains'>&opac.advanced.refined.contains;</option>
+ <option value='nocontains'>&opac.advanced.refined.nocontains;</option>
+ <option value='exact'>&opac.advanced.refined.exact;</option>
+ </select>
+
+ <!-- search term -->
+ <input type='text' size='18' name='term' style='margin-right: 3px;' />
+
+ <!-- Remove this row -->
+ <button
+ onclick='
+ var row = this.parentNode.parentNode;
+ var tbody = row.parentNode;
+ if( tbody.getElementsByTagName("tr").length > 2 )
+ row.parentNode.removeChild(row);'>X</button>
+
+ </td>
+</tr>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_global.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_global.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_global.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,307 @@
+<table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
+
+ <style>
+ #adv_global_search select { width: 13em; }
+ #adv_global_input_table select { width: 7em; }
+ .adv_adv_link { font-size: 8pt; color: red; }
+ </style>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/adv_global.js'> </script>
+
+ <tr style='border-bottom: none;'>
+
+ <!-- Contains the user-addable(?) rows to define search class, containment and text -->
+ <td valign='top' width='65%' style='border-bottom: none;'>
+ <table width='100%' id='adv_global_input_table'>
+
+ <thead>
+ <tr><td colspan='2' align='center'>&advanced.search.title;</td></tr>
+ </thead>
+ <tbody id='adv_global_tbody'>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.common.now_searching = 'now_searching_location';
+ </script>
+
+ <!--#set var="adv_global_row_id" value="adv_global_trow"-->
+ <!--#include virtual="adv_global_row.xml"-->
+
+ <!--#set var="adv_global_row_id" value=""-->
+ <!--#include virtual="adv_global_row.xml"-->
+ <!--#include virtual="adv_global_row.xml"-->
+
+ <!-- add a new row -->
+ <tr id='adv_global_addrow'>
+ <td align='center'>
+ <button onclick='clearSearchBoxes();'>&advanced.search.reset;</button>
+ <span style='padding-left: 10px;'> </span>
+ <button id='myopac_new_global_row' onclick='advAddGblRow();'>&advanced.add.row;</button>
+ <span style='padding-left: 10px;'> </span>
+ <button onclick='advSubmitGlobal();'>&advanced.search.submit;</button>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ </td>
+
+
+ <td rowspan='2'>
+
+ <table width='100%'>
+ <thead>
+ <tr><td colspan='2' align='center'>&advanced.search.filters;</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.item.form;</span>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_item_form'>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.item.type;</span>
+ <a id='adv_global_item_type_link_adv' class='classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ hideMe($("adv_global_item_type_basic"));
+ unHideMe($("adv_global_item_type"));
+ hideMe(this);
+ unHideMe($("adv_global_item_type_link_basic"));
+ '>&advanced.link;</a>
+
+ <a id='adv_global_item_type_link_basic' class='hide_me classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ unHideMe($("adv_global_item_type_basic"));
+ hideMe($("adv_global_item_type"));
+ unHideMe($("adv_global_item_type_link_adv"));
+ hideMe(this);
+ '>&advanced.basic.link;</a>
+ </td>
+
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_item_type' class='hide_me'>
+ </select>
+ <select multiple='multiple' size='3' id='adv_global_item_type_basic'>
+ <option value='at'>&opac.search.books;</option>
+ <option value='i'>&opac.search.audioBooks;</option>
+ <option value='g'>&opac.search.videoRecordings;</option>
+ <option value='j'>&opac.search.music;</option>
+ <option value='m'>&opac.search.electronic;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.literary.form;</span>
+ <a id='adv_global_lit_form_link_adv' class='classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ hideMe($("adv_global_lit_form_basic"));
+ unHideMe($("adv_global_lit_form"));
+ hideMe(this);
+ unHideMe($("adv_global_lit_form_link_basic"));
+ '>&advanced.link;</a>
+
+ <a id='adv_global_lit_form_link_basic' class='hide_me classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ unHideMe($("adv_global_lit_form_basic"));
+ hideMe($("adv_global_lit_form"));
+ unHideMe($("adv_global_lit_form_link_adv"));
+ hideMe(this);
+ '>&advanced.basic.link;</a>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_lit_form' class='hide_me'>
+ </select>
+ <select multiple='multiple' size='3' id='adv_global_lit_form_basic'>
+ <option value='0 '>&advanced.non.fiction;</option>
+ <option value='1'>&advanced.fiction;</option>
+ </select>
+ </td>
+ </tr>
+
+
+ <!-- Language selector -->
+ <tr>
+ <td align='right'>
+ <span>&advanced.language;</span>
+ </td>
+
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_lang'>
+ <!--#include virtual="../../../../../common/xml/item_lang_options.xml"-->
+ </select>
+ </td>
+ </tr>
+
+ <!-- Audience selector -->
+ <tr>
+ <td align='right'>
+ <span>&advanced.audience;</span>
+
+ <a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ hideMe($("adv_global_audience_basic"));
+ unHideMe($("adv_global_audience"));
+ hideMe(this);
+ unHideMe($("adv_global_audience_link_basic"));
+ '>&advanced.link;</a>
+
+ <a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
+ href='javascript:void(0);' onclick='
+ unHideMe($("adv_global_audience_basic"));
+ hideMe($("adv_global_audience"));
+ unHideMe($("adv_global_audience_link_adv"));
+ hideMe(this);'>&advanced.basic.link;</a>
+ </td>
+
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_audience' class='hide_me'>
+ </select>
+ <select multiple='multiple' size='3' id='adv_global_audience_basic'>
+ <option value='e '>&advanced.adult;</option>
+ <option value='abcdj'>&advanced.juvenile;</option>
+ <option value='fg '>&advanced.general;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.biblevel;</span>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_bib_level'>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align='right'>
+ <span>&advanced.filter.pubyear;</span>
+ </td>
+ <td align='left'>
+ <select id='adv_global_pub_date_type' onchange='
+ if($("adv_global_pub_date_type").selectedIndex == 3)
+ unHideMe($("adv_global_pub_date_2_span"));
+ else
+ hideMe($("adv_global_pub_date_2_span"));'>
+ <option value='equals' selected='selected'>&advanced.filter.pubyear.equals;</option>
+ <option value='before'>&advanced.filter.pubyear.before;</option>
+ <option value='after'>&advanced.filter.pubyear.after;</option>
+ <option value='between'>&advanced.filter.pubyear.between;</option>
+ </select>
+ <div style='margin-top:5px;'>
+ <input id='adv_global_pub_date_1' type='text' size='4' maxlength='4'/>
+ <span id='adv_global_pub_date_2_span' class='hide_me'>
+ &common.and; <input id='adv_global_pub_date_2' type='text' size='4' maxlength='4'/>
+ </span>
+ </div>
+ </td>
+ </tr>
+
+
+ <!-- copy location selector -->
+ <tr id='adv_copy_location_filter_row' class='hide_me'>
+ <td align='right'>&opac.advanced.copy_loc_filter;</td>
+ <td align='left' id='adv_copy_location_filter_td'>
+ <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
+ </select>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr style='border-top: none;'>
+ <td align='center' valign='top' style='border-top: none;'>
+
+ <table style='border: none; width: 100%;'>
+ <tr>
+ <td align='center' width='100%'>
+ <table class='' width='100%'>
+
+ <thead>
+ <tr>
+ <td align='center' width='50%'>&advanced.sort.criteria;</td>
+ <td align='center'>&advanced.search.library;</td>
+ </tr>
+ </thead>
+
+ <tbody>
+ <tr>
+
+ <script language='javascript' type='text/javascript'>
+ function __setsortsel() {
+ var sel = $('adv_global_sort_by')
+ if(sel.selectedIndex == 0) {
+ $("adv_global_sort_dir").disabled = true;
+ $("adv_global_sort_dir").selectedIndex = 0;
+ } else $("adv_global_sort_dir").disabled = false;
+ }
+ </script>
+
+ <td align=''>
+ <select id='adv_global_sort_by' onchange='__setsortsel();'>
+ <option value='rel'>&advanced.relevance;</option>
+ <option value='title'>&common.title;</option>
+ <option value='author'>&common.author;</option>
+ <option value='pubdate'>&advanced.pubdate;</option>
+ </select>
+ </td>
+
+
+ <td align='center' width='100%' nowrap='nowrap'>
+ <b id='now_searching_location'> </b>
+ </td>
+
+ </tr>
+
+ <tr>
+
+ <td>
+ <select id='adv_global_sort_dir' disabled='disabled'>
+ <option value='asc'>&advanced.sort.asc;</option>
+ <option value='desc'>&advanced.sort.desc;</option>
+ </select>
+ </td>
+
+ <!-- force the enable/disable sort dir code to run -->
+ <script language='javascript' type='text/javascript'>__setsortsel();</script>
+
+ <td align='center'>
+ <!--#include virtual="../common/libselect.xml"-->
+ </td>
+
+ </tr>
+ <tr>
+ <td align='center'>
+ <span>&advanced.frbrize;</span>
+ <input id='adv_group_titles' type='checkbox' />
+ </td>
+ <td align='center'>
+ <span>&result.limit2avail;</span>
+ <input type='checkbox' id='opac.result.limit2avail'/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+
+ <tr class='border_4_2'>
+ <td colspan='2'><input type='submit' onclick='advSubmitGlobal();' value='&advanced.search.submit;'></input></td>
+ </tr>
+
+</table>
Added: conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_marc.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_marc.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_marc.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,46 @@
+<!--
+XXX Deprecate me
+-->
+
+<table class='data_grid' width='100%'>
+ <thead>
+ <tr>
+ <td colspan='6'>&opac.advanced.marc.title;</td>
+ </tr>
+ </thead>
+ <tbody id='advanced.marc.tbody'>
+ <tr id='advanced.marc.template'>
+ <td>
+ <span>&opac.advanced.marc.tag;: </span>
+ <input name='advanced.marc.tag' maxlength='3' size='3' />
+ </td>
+ <td>
+ <span>&opac.advanced.marc.subfield;: </span>
+ <input name='advanced.marc.subfield' maxlength='1' size='1' />
+ </td>
+ <td>
+ <span>&opac.advanced.marc.value;: </span>
+ <input name='advanced.marc.value' size='36' />
+ </td>
+
+ <td>
+ <input type='submit' value='X' onclick='
+ var row = this.parentNode.parentNode;
+ var tbody = row.parentNode;
+ if(tbody.getElementsByTagName("tr").length > 2)
+ tbody.removeChild(row);
+ ' />
+ </td>
+ </tr>
+ <tr id='advanced.marc.submit.row'>
+ <td colspan='4' align='center'>
+
+ <input name='advanced.marc.addrow' type='submit' onclick='advAddMARC();'
+ value='&opac.advanced.marc.addrow;' />
+
+ <input style='margin-left: 10px;'
+ onclick='advMARCRun();' type='submit' value='&common.submit;' />
+ </td>
+ </tr>
+ </tbody>
+</table>
Added: conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_quick.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_quick.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/advanced/advanced_quick.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,30 @@
+<!--
+XXX Deprecate me
+-->
+
+<table class='data_grid' width='95%'>
+ <thead>
+ <tr>
+ <td colspan='6'>&opac.advanced.quick.title;</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <span style='padding-right: 0px;'>&common.call.number.label;</span>
+ <input id='opac.advanced.quick.cn' style='margin: 2px;' type='text' size='12' />
+ <input type='submit' onclick='advCNRun();' value='&advanced.go;' />
+ </td>
+ <td>
+ <span style='padding-right: 0px;'>&common.isbn.label;</span>
+ <input id='opac.advanced.quick.isbn' style='margin: 2px;' type='text' size='13' maxlength='13' />
+ <input type='submit' onclick='advISBNRun();' value='&advanced.go;' />
+ </td>
+ <td>
+ <span style='padding-right: 0px;'>&common.issn.label;</span>
+ <input id='opac.advanced.quick.issn' style='margin: 2px;' type='text' size='9' maxlength='9' />
+ <input type='submit' onclick='advISSNRun();' value='&advanced.go;' />
+ </td>
+ </tr>
+ </tbody>
+</table>
Added: conifer/trunk/web/opac/skin/uwin/xml/body.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/body.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/body.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,30 @@
+<body class="tundra">
+ <table width='100%'>
+ <tbody>
+ <tr>
+ <td id='main_left_cell'>
+ <!--#include virtual="common/logo.xml"-->
+ <!--#include virtual="common/sidebar.xml"-->
+ </td>
+ <td id='main_right_cell'>
+ <div id='content' class=''>
+
+ <!--#if expr="$OILS_PAGE!='advanced.xml'"-->
+ <!--#include virtual="common/searchbar.xml"-->
+ <!--#include virtual="common/statusbar.xml"-->
+ <!--#endif-->
+
+ <!--#include virtual="common/fonts.xml"-->
+
+ <!--#include virtual="common/altcanvas.xml"-->
+ <!--#include virtual="common/ilsevents.xml"-->
+ <!--#include virtual="page_${OILS_PAGE}"-->
+ </div>
+ <br/>
+ <!--#include virtual="common/tips.xml"-->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!--#include virtual='footer.xml'-->
+</body>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/altcanvas.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/altcanvas.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/altcanvas.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,37 @@
+
+<!-- These are the UI components that may be needed on any given page. The must be
+ set to class += 'hide_me' by default -->
+
+<div id='not_the_canvas' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <!-- the login page -->
+ <!--#if expr="$FRONT_PAGE!='true'"-->
+ <!--#include virtual="login.xml"-->
+ <!--#endif-->
+
+ <!-- The org tree -->
+ <!--#include virtual="orgtree.xml"-->
+
+ <!-- ============================================================================= -->
+ <!-- Register the alternate canvases -->
+ <script language='javascript' type='text/javascript'>
+ config.ids.altcanvas.org_tree = config.ids.common.org_container;
+ config.ids.altcanvas.holds = 'holds_box';
+ config.ids.altcanvas.check_holds = 'check_holds_box';
+ config.ids.altcanvas.xulholds = 'xulholds_box';
+ config.ids.altcanvas.loading = 'loading_alt';
+ //config.ids.altcanvas.cnbrowse = 'cn_browse';
+ </script>
+
+ <!--#if expr="$FRONT_PAGE!='true'"-->
+ <!--#include virtual="holds.xml"-->
+ <!-- #include virtual="cn_browse.xml"-->
+ <!--#endif-->
+
+ <div id='loading_alt' class='hide_me canvas' style='margin-top: 6px;'>
+ <div style='margin-top: 30px; margin-bottom: 30px; text-align: center; font-weight: 700;' class='color_3'>
+ <img src='../../../../images/progressbar_green.gif' style='margin: 5px;' />
+ </div>
+ </div>
+
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/cn_browse.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/cn_browse.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/cn_browse.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,34 @@
+<div id='cn_browse' class='hide_me cn_browser'
+ style='width: 95%; text-align: center; padding: 15px;'>
+ <div id='cn_browse_loading' class='cn_browse_loading hide_me'>&common.cn.loading;</div>
+ <div id='cn_browse_div'>
+
+
+ <div style='width: 90%; text-align: center; margin: 10px;' class='color_4'>
+ <span>&common.cn.browsing;</span><b style='margin-left: 6px;' id='cn_browse_where'> </b>
+ </div>
+ <table class='data_grid bookshelf' width='100%'>
+ <thead>
+ <tr>
+ <td><a id='cn_browse_next' class='classic_link'
+ href='javascript:cnBrowsePrev();'><b>&common.cn.previous;</b></a></td>
+ <td colspan='1' align='center'>&common.cn.shelf;</td>
+ <td><a id='cn_browse_prev' class='classic_link'
+ href='javascript:cnBrowseNext();'><b>&common.cn.next;</b></a></td>
+ </tr>
+ </thead>
+ <tbody id='cn_tbody'>
+ <tr id='cn_browse_row'>
+ <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
+ <a><img height='60' width='50'
+ class='cn_browse_info' name='cn_browse_pic' border='0' /></a>
+ <div style='font-weight: bold;' class='cn_browse_info' name='cn_browse_cn'> </div>
+ <div class='cn_browse_info'><a name='cn_browse_title' class='classic_link'> </a></div>
+ <div class='cn_browse_info'><a name='cn_browse_author' class='classic_link'> </a></div>
+ <div class='cn_browse_info' name='cn_browse_lib'> </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/css_common.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/css_common.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/css_common.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,24 @@
+<!-- CSS shared across pages goes here -->
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/uwin/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_SKIN_BASE'-->/uwin/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+ rel='search' title="Laurentian Library Catalogue"
+ href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/LUSYS/LUSYS/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+ @import '/js/dojo/dojo/resources/dojo.css';
+ @import '/js/dojo/dijit/themes/tundra/tundra.css';
+ @import '/js/dojo/dijit/themes/tundra/tundra_rtl.css';
+</style>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/fonts.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/fonts.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/fonts.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,25 @@
+<div id='fonts_div'>
+
+ <div id='text_size_div' style='position:absolute; top: 2px; right: 6px;'>
+ <span style='vertical-align: top;'>&common.textsize.title;</span>
+ <span style='vertical-align: top;'><a href="javascript:void(0);" onclick="setFontSize('regular');"> &common.textsize.regular; </a></span>
+ <span style='vertical-align: top;'> &common.textsize.separator; </span>
+ <span style='vertical-align: top;'><a href="javascript:void(0);" onclick="setFontSize('large');"> &common.textsize.large; </a></span>
+<!-- <span style='vertical-align: top;'> <span style="font-weight:bold;">|</span> </span>
+ <span style='vertical-align: top;'>&common.language;</span>
+ <span id='translation_switch' dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore"
+ searchAttr="label" required="false" jsId='opacLocaleSelector'>
+ <script>
+ dojo.addOnLoad(function() {
+ opacLocaleSelector.setValue(locale);
+ dojo.connect(opacLocaleSelector, 'onChange',
+ function () {
+ location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+ }
+ );
+ });
+ </script>
+ </span> -->
+ </div>
+
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/format_selector.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/format_selector.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/format_selector.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,10 @@
+<select id='<!--#echo var="FORM_SEL_ID"-->' >
+ <option value=''>&opac.search.allFormats;</option>
+ <option value='at'>&opac.search.books;</option>
+ <option value='at-d'>&opac.search.largePrint;</option>
+ <option value='i'>&opac.search.audioBooks;</option>
+ <option value='g'>&opac.search.videoRecordings;</option>
+ <option value='j'>&opac.search.music;</option>
+ <option value='m'>&opac.search.electronic;</option>
+</select>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/holds.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/holds.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/holds.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,232 @@
+<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/DP_DateExtensions.js'></script>
+<div>
+ <div id='xulholds_box' class='hide_me canvas' style='margin-top: 6px;'>
+ <center>
+ <table class='data_grid' style='margin-top: 20px;'>
+ <tbody>
+ <tr>
+ <td>&opac.holds.xulRecipient;:</td>
+ <td><input type='text' id='xul_recipient_barcode' /></td>
+ <td><input type='submit' value='&common.submit;' id='xul_recipient_barcode_submit' /></td>
+ <td><input type='submit' value='&common.cancel;' onclick='showCanvas();' /></td>
+ <td><input type='submit' value='&common.hold.place;' id='xul_recipient_me' /></td>
+ </tr>
+ </tbody>
+ </table>
+ </center>
+ </div>
+
+ <div id='check_holds_box' class='hide_me canvas'
+ style='margin-top: 6px; width: 100%; text-align: center'>
+ <br/><br/><br/>
+ <b>&common.hold.check;</b>
+ </div>
+
+ <div id='holds_box' class='hide_me canvas' style='margin-top: 6px;'>
+
+ <br/>
+ <table width='90%'>
+ <tbody>
+ <tr>
+ <td class='holds_cell color_1'
+ align='center' colspan='2'>&common.hold.create;</td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&opac.holds.recipient;:</td>
+ <td class='holds_cell' id='holds_recipient'> </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.title.label;</td>
+ <td class='holds_cell' id='holds_title'> </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.author;</td>
+ <td class='holds_cell' id='holds_author'> </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.format;</td>
+ <td class='holds_cell' id='holds_format'> </td>
+ </tr>
+ <tr id='hold_physical_desc_row'>
+ <td class='holds_cell'>&common.physical.label;</td>
+ <td class='holds_cell' id='holds_physical_desc'> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_cn_row'>
+ <td class='holds_cell'>&common.call.number.label;</td>
+ <td class='holds_cell'><b id='holds_cn'/> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_copy_row'>
+ <td class='holds_cell'>&common.copy.barcode.label;</td>
+ <td class='holds_cell'><b id='holds_copy'/> </td>
+ </tr>
+
+ <tr class='hide_me' id='holds_type_row'>
+ <td class='holds_cell'>&common.hold.type.label;</td>
+ <td class='holds_cell hide_me' id='holds_is_cn'><b>&common.hold.volume;</b></td>
+ <td class='holds_cell hide_me' id='holds_is_copy'><b>&common.hold.copy;</b></td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>&opac.holds.contactPhone;:</td>
+ <td class='holds_cell'>
+ <input id='holds_phone' size='13' maxlength='12'/>
+ <span style='margin-left: 4px; font-size: 7pt;'>&common.phone.format;</span>
+ </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.phone.enable;</td>
+ <td class='holds_cell'>
+ <input type='checkbox' id='holds_enable_phone' checked='checked'
+ onchange='
+ if (this.checked) $("holds_phone").disabled=false;
+ else $("holds_phone").disabled = true;'/>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>&opac.holds.contactEmail;:</td>
+ <td class='holds_cell' id='holds_email'>
+ <span class='hide_me' id='holds.no_email'>
+ &common.email.none;<br/>
+ &common.email.set;
+ </span>
+ <span class='hide_me' id='holds.no_email.xul'>
+ &common.email.none;
+ </span>
+
+ </td>
+ </tr>
+ <tr>
+ <td class='holds_cell'>&common.email.enable;</td>
+ <td class='holds_cell'>
+ <input type='checkbox' id='holds_enable_email' checked='checked'/>
+ </td>
+ </tr>
+ <!--
+ <tr id='holds_depth_selector_row' class='hide_me'>
+ <td class='holds_cell'>Hold Range</td>
+ <td class='holds_cell'>
+ <select id='holds_depth_selector'></select>
+ </td>
+ </tr>
+ -->
+ <tr>
+ <td class='holds_cell'>&opac.holds.pickupLocation;</td>
+ <td class='holds_cell'>
+ <select id='holds_org_selector'> </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>&opac.holds.expire_time;</td>
+ <td class='holds_cell'>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' id='holds_expire_time' />
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell'>
+ &opac.holds.freeze;
+ <a class='classic_link' href='javascript:alert("&opac.holds.freeze.help;");'>&common.help;</a>
+ </td>
+ <td class='holds_cell'>
+ <input type='checkbox' id='holds_frozen_chkbox'
+ onchange='
+ if($("holds_frozen_chkbox").checked)
+ unHideMe($("hold_frozen_thaw_row"));
+ else
+ hideMe($("hold_frozen_thaw_row"));
+ ' />
+ </td>
+ </tr>
+
+ <tr id='hold_frozen_thaw_row' class='hide_me'>
+ <td class='holds_cell'>
+ <script language='javascript' type='text/javascript'> if($('holds_frozen_chkbox').checked) unHideMe($("hold_frozen_thaw_row"));</script>
+ &opac.holds.freeze.thaw_date;
+ </td>
+ <td class='holds_cell'>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' id='holds_frozen_thaw_input' />
+ </td>
+ </tr>
+
+ <tr id='holds_alt_formats_row_extras' class='hide_me'>
+ <td colspan='2' align='center'>
+ <div style='padding: 8px;'>
+ <a class='classic_link' href='javascript:void(0);' style='padding: 5px;'
+ onclick='unHideMe($("holds_alt_formats_row"));'>&common.hold.advanced;</a>
+ </div>
+ </td>
+ </tr>
+
+ <tr id='holds_alt_formats_row' class='hide_me'>
+
+ <td class='holds_cell'>
+ <div style='margin-bottom: 5px;'>
+ <span>&common.format.alternatives; </span>
+ <span> <a class='classic_link' style='color:red;' href='javascript:void(0);'
+ onclick='alert($("holds_explain_adv").innerHTML)'>&common.help;</a></span>
+ </div>
+ <div>&common.control.click;</div>
+ </td>
+
+ <td class='holds_cell'>
+ <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
+ <option value='at' class='hide_me'>&opac.search.books;</option>
+ <option value='at-d' class='hide_me'>&opac.search.largePrint;</option>
+ <option value='i' class='hide_me'>&opac.search.audioBooks;</option>
+ <option value='g' class='hide_me'>&opac.search.videoRecordings;</option>
+ <option value='j' class='hide_me'>&opac.search.music;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='holds_cell' align='center' colspan='2'>
+ <button id='holds_submit'>&opac.holds.placeHold;</button>
+ <button class='hide_me' id='holds_update'>&common.hold.update;</button>
+ <span style='padding: 20px;'> </span>
+ <button id='holds_cancel'>&common.cancel;</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class='hide_me' id='holds_success'>&opac.holds.success;</div>
+ <div class='hide_me' id='holds_failure'>&opac.holds.failure;</div>
+ <span class='hide_me' id='holds_bad_phone'>
+ &common.phone.format.help;
+ </span>
+
+ <span class='hide_me' id='hold_not_allowed'>
+ &common.hold.failed;
+ </span>
+
+ </div>
+
+ <span class='hide_me' id='format_words'>
+ <span name='at'>&opac.search.books;</span>
+ <span name='at-d'>&opac.search.largePrint;</span>
+ <span name='i'>&opac.search.audioBooks;</span>
+ <span name='g'>&opac.search.videoRecordings;</span>
+ <span name='j'>&opac.search.music;</span>
+ <span name='m'>&opac.search.electronic;</span>
+ </span>
+
+ <span class='hide_me' id='holds_explain_adv'>&holds.advanced_options;</span>
+
+ <span class='hide_me' id='holds_pick_good_org'>&common.hold.delivery;</span>
+
+ <span class='hide_me' id='hold_dup_exists'>&common.hold.exists;</span>
+
+ <span class='hide_me' id='hold_dup_exists_override'>&common.hold.exists.override;</span>
+
+ <span id='hold_failed_patron_barred' class='hide_me'>&common.hold.barred;</span>
+
+ <span id='invalid_hold' class='hide_me'>&common.hold.item.invalid;</span>
+
+ <span id='holds_invalid_recipient' class='hide_me'>&common.hold.patron.invalid;</span>
+
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/ilsevents.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/ilsevents.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/ilsevents.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,14 @@
+<span class='hide_me'>
+ <span id='ilsevent.1000'>&ilsevent.1000;</span>
+ <span id='ilsevent.1001'>&ilsevent.1001;</span>
+ <span id='ilsevent.1002'>&ilsevent.1002;</span>
+ <span id='ilsevent.1200'>&ilsevent.1200;</span>
+ <span id='ilsevent.5000'>&ilsevent.5000;</span>
+ <span id='ilsperm.CREATE_HOLD'>&ilsperm.CREATE_HOLD;</span>
+
+ <!-- Local OPAC Specific strings/events -->
+ <span id='auth_session_expiring'>&opac.session_expiring;</span>
+ <span id='auth_session_expired'>&opac.session_expired;</span>
+ <span id='user_not_found'>&common.user_not_found;</span>
+</span>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/js_common.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/js_common.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/js_common.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,77 @@
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/utils.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/config.js' type='text/javascript'></script>
+
+ <!-- overriding the default setting for metarecord grouping -->
+ <script language='javascript' type='text/javascript'>
+ SHOW_MR_DEFAULT = false;
+ </script>
+
+
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/CGI.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/Cookies.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/md5.js' type='text/javascript'></script>
+
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/slimtree.js' type='text/javascript'></script>
+
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/JSON_v1.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/fmcore.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/fmgen.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/opac_utils.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/<!--#echo var="locale"-->/OrgTree.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/OrgLasso.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/org_utils.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/RemoteRequest.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/init.js' type='text/javascript'></script>
+ <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/added_content.js' type='text/javascript'></script>
+
+ <!-- Some global js -->
+ <script language='javascript' type='text/javascript'>
+
+ config.css.color_1 = "color_1";
+ config.css.color_2 = "color_2";
+ config.css.color_3 = "color_3";
+
+
+ <!-- set up some global JS config variables, read from the Apache config -->
+ var OILS_OPAC_IMAGES_HOST = null;
+ <!--#if expr="$OILS_OPAC_IMAGES_HOST"-->
+ OILS_OPAC_IMAGES_HOST = '<!--#echo var="OILS_OPAC_IMAGES_HOST"-->extras/ac/jacket/';
+ <!--#endif -->
+ var OILS_OPAC_STATIC_PROTOCOL = null;
+ <!--#if expr="$OILS_OPAC_STATIC_PROTOCOL"-->
+ OILS_OPAC_STATIC_PROTOCOL = '<!--#echo var="OILS_OPAC_STATIC_PROTOCOL"-->';
+ <!--#endif -->
+
+ <!-- builds the "Now searching: <org_unit>" text on the home page -->
+ function home_init() {
+ getId("home_adv_search_link").setAttribute("href", buildOPACLink({page:ADVANCED}));
+ getId("home_myopac_link").setAttribute("href", buildOPACLink({page:MYOPAC}, false, true));
+ }
+ </script>
+
+ <!-- enable Dojo date picker -->
+ <script language='javascript' type="text/javascript">
+
+ var djConfig = {parseOnLoad: true, isDebug: false}, lang, bidi;
+
+ var locale = location.href.replace( /.+opac\/([^\/]+)\/skin.+/, '$1' );
+ if (!locale) locale = '<!--#echo var="locale"-->';
+
+ djConfig.locale = locale.toLowerCase();
+
+ </script>
+
+ <script type="text/javascript" src='/js/dojo/dojo/dojo.js'></script>
+ <script type="text/javascript" src='/js/dojo/dojo/openils_dojo.js'></script>
+ <script type="text/javascript" src='/js/dojo/opensrf/opensrf.js'></script>
+
+ <script language="javascript" type="text/javascript">
+ dojo.addOnLoad(init);
+ dojo.require("dijit._Calendar");
+ dojo.require("dijit.form.DateTextBox");
+ dojo.require("dijit.form.FilteringSelect");
+ dojo.require("dojo.date.locale");
+ dojo.require("dojo.date.stamp");
+ dojo.require("dojo.parser");
+ dojo.require("openils.I18N");
+ </script>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/libselect.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/libselect.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/libselect.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,15 @@
+<span>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js'></script>
+ <span class='hide_me' id='depth_selector_span'>
+ <!--#if expr="$SHOW_DEPTHSEL_TEXT='true'"-->
+ <span>&library.select; </span>
+ <!--#endif-->
+ <select id='depth_selector' >
+ <option value='new'>&library.select.label;</option>
+ </select>
+ </span>
+ <span class='hide_me' id='lib_selector_span'>
+ <a id='lib_selector_link' class='classic_link' href='javascript:void(0)'>&library.select.help;</a>
+ </span>
+</span>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/login.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/login.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/login.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,110 @@
+
+<div id='login_box' class='hide_me canvas' style='margin-top: 6px;'>
+
+ <script language='javascript' type='text/javascript'>
+ 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";
+ config.ids.altcanvas.login = config.ids.login.box;
+ </script>
+
+ <br/>
+
+ <div class='login_text color_1' style='padding: 4px; text-align: center;'>
+ <span>&uwin.myopac.loginhelp.question; <a class="classic_link" target="_blank" href="&uwin.myopac.loginhelp.url;">&uwin.myopac.loginhelp.url_text;</a></span>
+ </div>
+
+ <br/>
+
+ <table id='login_table' class='data_grid' style='margin-left: 20px;' width='95%'>
+ <tbody>
+ <tr>
+ <td><span class='login_text'>&login.username;</span></td>
+ <td>
+ <span class='login_text'>
+ <input id='login_username' type='text' size='32' />
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class='login_text'>&common.password;</span>
+ </td>
+ <td>
+ <span class='login_text'>
+ <input id='login_password' type='password' size='32' />
+ </span>
+ </td>
+ </tr>
+ <tr><td colspan="2" style="text-align: center;"></td></tr>
+ <tr class='color_1'>
+ <td colspan='2' align='center'>
+ <span class='login_text' style='margin-right: 20px;'>
+ <input type='submit' value='&common.login;' id='login_button'/>
+ </span>
+ <span class='login_text' style='margin-left: 20px;'>
+ <input type='submit' id='login_cancel_button' value='&common.cancel;'/>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
+ <thead>
+ <tr><td colspan='2' align='center'><b>&login.password;</b></td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td colspan='2' style='padding:10px;'>
+ &login.first.time;
+ &common.password_criteria;
+ </td>
+ </tr>
+
+ <tr>
+ <td>&login.password.current.enter;</td>
+ <td><input type='password' id='change_pw_current'/></td>
+ </tr>
+
+ <tr>
+ <td>&login.password.new.enter;</td>
+ <td><input type='password' id='change_pw_1'/></td>
+ </tr>
+ <tr>
+ <td>&login.password.new.reenter;</td>
+ <td><input type='password' id='change_pw_2'/></td>
+ </tr>
+ <tr><td><br/></td><td/></tr>
+ <tr class='color_1'>
+ <td colspan='2' align='center'>
+ <span class='login_text' style='margin-right: 20px;'>
+ <input type='submit' value='&login.password.update;' id='change_pw_button'/>
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <span id='pw_no_match' class='hide_me'>&login.password.nomatch;</span>
+ <span id='pw_update_successful' class='hide_me'>&login.password.success;</span>
+
+ <span id='pw_not_strong' class='hide_me'>
+ &login.password.strength;
+ &common.password_criteria;
+ </span>
+
+ <span id='patron_card_inactive_alert' class='hide_me'>&login.barcode.inactive;</span>
+
+ <span id='patron_inactive_alert' class='hide_me'>&login.account.inactive;</span>
+
+ <span id='patron_login_failed' class='hide_me'>&login.failed;</span>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/logo.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/logo.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/logo.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+ <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+ <img style='margin-right: 4px;' src='<!--#echo var="OILS_BASE"-->/skin/uwin/local/images/uwin_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/orgtree.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/orgtree.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/orgtree.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,27 @@
+
+<!-- the org tree -->
+<div id='org_container' class='hide_me canvas'>
+
+ <div id='org_link_container' class='color_1'>
+ <span class='org_link'>
+ <a onclick='orgTreeSelector.expandAll();'
+ href='javascript:void(0);'>&common.org.openAll;</a>
+ </span>
+ <span class='org_link'>
+ <a onclick='orgTreeSelector.closeAll();'
+ href='javascript:void(0);'>&common.org.closeAll;</a>
+ </span>
+ <span class='org_link'>
+ <a onclick='showCanvas();' href='javascript:void(0);'>&common.org.cancel;</a>
+ </span>
+ </div>
+
+ <div id='org_loading_div'><br/><span>&common.org.loading;</span></div>
+ <br/>
+ <div id='org_selector_tip' class='tips hide_me'><b>&common.org.note;</b>
+ <span>&common.org.notetext;</span>
+ </div>
+ <br/>
+ <div id='org_tree' class='org_tree'> </div>
+ <br/>
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/searchbar.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/searchbar.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/searchbar.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,64 @@
+
+<!-- Searchbar for doing metarecord searches -->
+
+<div id='searchbar'>
+
+ <!-- load my js -->
+ <script language='javascript' type='text/javascript'>
+ 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.location_tag = 'search_location_tag_link';
+ config.ids.searchbar.lib_sel_span = 'lib_selector_span';
+ config.ids.searchbar.lib_sel_link = 'lib_selector_link';
+ config.ids.searchbar.depth_sel_span = 'depth_selector_span';
+ </script>
+
+
+ <table class='color_1 color_border1' width='100%' style='border-collapse: collapse;'>
+ <tbody>
+ <tr>
+
+ <td nowrap='nowrap' align='center' class='search_box_container color_2'>
+
+ <input id='search_box' type='text' />
+ <span style='padding-left: 6px;'>
+ <input type='button' style='width: 40px;' id='search_submit' value='&button.go;' />
+ </span>
+ </td>
+
+ <td nowrap='nowrap' style='padding: 3px;' align='right' >
+
+ <span style='padding-right:9px;'>
+ <!--
+ <span>&common.type;: </span>
+ -->
+ <!--#include virtual="stypes_selector.xml"-->
+ </span>
+
+ <span style='padding-right:9px;'>
+ <!--#set var='FORM_SEL_ID' value='form_selector'-->
+ <!--#include virtual="format_selector.xml"-->
+ </span>
+
+ <!--#include virtual="libselect.xml"-->
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js'></script>
+</div>
+
+
+
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/sidebar.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/sidebar.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/sidebar.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,217 @@
+
+<!-- Navigation bar -->
+
+<div id="sidebar_div" class="sidebar_div" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <div class='sidebar_chunk'>
+
+ <div title="&navigate.home.title;"
+ id='home_link_div' class="side_bar_item ">
+ <a id='home_link' href='index.xml'>&navigate.home;</a>
+ </div>
+
+ <div title="&uwin.askON.title;"
+ id="&uwin.askON.div.id;" class="side_bar_item ">
+ <a id="&uwin.askON.link.id;" href="&uwin.askON.url;" target="_blank">&uwin.askON;</a>
+ </div>
+
+ <div title="&opac.navigate.advanced.title;"
+ id='advanced_link_div' class="side_bar_item ">
+ <a id='advanced_link' href='advanced.xml'>&opac.navigate.advanced;</a>
+ </div>
+
+ <div title="&navigate.myopac.title;"
+ id='myopac_link_div' class="side_bar_item ">
+ <a id='myopac_link' href='myopac/myopac.xml'>&navigate.myopac;</a>
+ </div>
+
+ <div title="&navigate.login.title;"
+ id='login_link_div' class="side_bar_item ">
+ <a id='login_link' href='javascript:void(0);'>&navigate.login;</a>
+ </div>
+
+ <div title="&navigate.logout.title;"
+ id='logout_link_div' class="side_bar_item hide_me ">
+ <a id='logout_link' href='javascript:void(0);'>&navigate.logout;</a>
+ </div>
+
+
+ <!-- Informational sidebar components -->
+
+ <div id='logged_in_as_div' title="&navigate.loggedinas.title;" class="side_bar_item hide_me">
+ <span>&navigate.loggedinas;<b id='username_dest'> </b></span>
+ </div>
+
+ <div id='sidebar_results_wrapper' class='hide_me border_1'>
+ <div title="&navigate.titleGroupResults;"
+ id='mresult_link_div' class="side_bar_item hide_me">
+ <a id='sidebar_title_group_results'>&navigate.titleGroupResults;</a>
+ </div>
+
+ <div title="&navigate.titleResults;"
+ id='result_link_div' class="side_bar_item hide_me">
+ <a id='sidebar_title_results'>&navigate.titleResults;</a>
+ </div>
+
+ <div title="&navigate.record.details;"
+ id='rdetail_link_div' class="side_bar_item hide_me">
+ <span>&navigate.title.details;</span>
+ </div>
+ </div>
+ </div>
+
+<!-- relevant subjects/authors/series commented out, cause they just don't work
+
+ <div id='subject_tree_sidebar' class='sidebar_chunk hide_me' style='margin-top: 12px;'>
+ <div id='subject_sidebar_tree_div'> </div>
+ <script language='javascript' type='text/javascript'>
+ removeChildren($('subject_sidebar_tree_div'));
+ var subjectSidebarTree = new SlimTree(
+ document.getElementById('subject_sidebar_tree_div'),
+ 'subjectSidebarTree', '../../../../images/slimtree/related.jpg');
+ subjectSidebarTree.addNode( 'subjectSidebarTreeRoot', -1,
+ "&sidebar.relevantSubjects.headerLabel;",
+ 'javascript:subjectSidebarTree.toggle(' +
+ '"subjectSidebarTreeRoot");');
+ </script>
+ </div>
+
+ <div id='author_tree_sidebar' class='sidebar_chunk hide_me'>
+ <hr/>
+ <div id='author_sidebar_tree_div'> </div>
+ <script language='javascript' type='text/javascript'>
+ removeChildren($('author_sidebar_tree_div'));
+ var authorSidebarTree = new SlimTree(
+ document.getElementById('author_sidebar_tree_div'),
+ 'authorSidebarTree','../../../../images/slimtree/people.jpg');
+ authorSidebarTree.addNode( 'authorSidebarTreeRoot', -1,
+ "&sidebar.relevantAuthors.headerLabel;",
+ 'javascript:authorSidebarTree.toggle(' +
+ '"authorSidebarTreeRoot");');
+ </script>
+ </div>
+
+ <div id='series_tree_sidebar' class='sidebar_chunk hide_me'>
+ <hr/>
+ <div id='series_sidebar_tree_div'> </div>
+ <script language='javascript' type='text/javascript'>
+ removeChildren($('series_sidebar_tree_div'));
+ var seriesSidebarTree = new SlimTree(
+ document.getElementById('series_sidebar_tree_div'),
+ 'seriesSidebarTree',
+ '../../../../images/slimtree/houses.jpg');
+ seriesSidebarTree.addNode( 'seriesSidebarTreeRoot', -1,
+ "&sidebar.relevantSeries.headerLabel;",
+ 'javascript:seriesSidebarTree.toggle(' +
+ '"seriesSidebarTreeRoot");');
+ </script>
+ </div>
+ -->
+ <div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'
+ style='text-align:center; margin-top: 20px;'>
+ <hr/>
+ <div id='adv_quick_search'>
+ <div class='adv_quick_search color_4'><b>&sidebar.quick.search;</b></div>
+ <div style='margin-top: 8px;'>
+ <table><tbody><tr>
+ <td>
+ <select id='adv_quick_type' style='width: 6em;'>
+ <option value='isbn'>&opac.advanced.quick.isbn;</option>
+ <option value='issn'>&opac.advanced.quick.issn;</option>
+ <option value='cn'>&opac.advanced.quick.cn;</option>
+ <option value='lccn'>&opac.advanced.quick.lccn;</option>
+ <option value='tcn'>&opac.advanced.quick.tcn;</option>
+ <option value='barcode'>&opac.advanced.quick.barcode;</option>
+ </select>
+ </td><td>
+ <input type='text' id='adv_quick_text' size='16' />
+ </td>
+ </tr></tbody></table>
+ </div>
+
+ <span class='hide_me' id='myopac.copy.not.found'>&sidebar.copy.not.found;</span>
+ <div style='margin-top: 8px;' class='adv_quick_search_submit'>
+ <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a>
+ </div>
+ </div>
+ </div>
+
+ <div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
+ style='text-align:center; margin-top: 20px;'>
+ <hr/>
+ <div class='adv_quick_search color_4'><b>&search.marc;</b></div>
+ <table style='margin: 3px; width: 100%;' id='adv_sdbar_table' class='border_4_3'>
+ <tbody>
+ <tr>
+ <td>&search.marc.tag;</td>
+ <td><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
+ <td>&search.marc.subfield;</td>
+ <td><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
+ </tr>
+ <tr>
+ <td>&search.marc.value;</td>
+ <td colspan='3'><input name='advanced.marc.value' size='18' /></td>
+ </tr>
+ <tr name='crow' class='hide_me'>
+ <td colspan='4' align='center'>
+ <a href='javascript:void(0);' class='classic_link'
+ onclick='
+ var div = $("adv_marc_search_sidebar");
+ if( div.getElementsByTagName("table").length > 1 )
+ div.removeChild(this.parentNode.parentNode.parentNode.parentNode);'>&common.close;</a>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ <div id='adv_marc_submit' class='adv_quick_search_submit'>
+ <a style='margin-right: 4px;' class='classic_link' href='javascript:advAddMARC();'>&search.marc.add.row;</a>
+ <a style='margin-left: 4px;' class='classic_link' href='javascript:advMARCRun();'>&common.submit;</a>
+ </div>
+ </div>
+
+
+
+
+ <!-- ============================================================================= -->
+ <!-- Our javascript -->
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/sidebar.js'></script>
+
+ <script language='javascript' type='text/javascript'>
+ 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.rdetail = "rdetail_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.ids.sidebar.home_link = 'home_link'
+ config.ids.sidebar.advanced_link = 'advanced_link'
+ config.ids.sidebar.myopac_link = 'myopac_link'
+
+ config.names.sidebar.subject_item = 'subject_item';
+ config.names.sidebar.author_item = 'author_item';
+ config.names.sidebar.series_item = 'series_item';
+
+ config.css.encircled = 'encircled';
+ </script>
+
+</div>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/statusbar.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/statusbar.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/statusbar.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,28 @@
+
+<div id='statusbar' style='margin-bottom: 6px; margin-top: 6px;'>
+
+ <table width='100%'>
+ <tbody>
+ <tr>
+ <td align='left'>
+ <b>
+ <span style='padding: 1px; ' id='now_searching_location'> </span>
+ </b>
+ <i id='including_results_for' class='hide_me'>
+ <span>&status.results;</span> <b id='including_results_location'> </b>
+ </i>
+ </td>
+ <td align='right'>
+ <!--#if expr="$OILS_PAGE='rresult.xml' || $OILS_PAGE='mresult.xml'"-->
+ <!--#include virtual="../result/filtersort.xml" -->
+ <!--#endif -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.common.now_searching = 'now_searching_location';
+ </script>
+
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/common/stypes_selector.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/stypes_selector.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/stypes_selector.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,8 @@
+<select id='search_type_selector'>
+ <option value='keyword' selected='selected'>&common.keyword;</option>
+ <option value='title'>&common.title;</option>
+ <option value='author'>&common.author;</option>
+ <option value='subject'>&common.subject;</option>
+ <option value='series'>&common.series;</option>
+</select>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/common/tips.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/common/tips.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/common/tips.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,8 @@
+
+<div id='tips' class='tips hide_me'>
+ <div class='hide_me'>
+ <span>&common.tips.tip1;</span>
+ <span>&common.tips.tip2;</span>
+ </div>
+ <span style="font-weight: bold;">&tips.label; </span>
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/footer.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/footer.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/footer.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,39 @@
+<div id='copyright_block'>
+ <div id='footer_links'>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='http://windsor.concat.ca/opac/en-CA/extras/slimpac/start.html'>Basic Catalogue (HTML only)</a>
+ </span>
+ <span> | </span>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='&uwin.footer.home.leddy.url;'>&uwin.footer.home.leddy;</a>
+ </span>
+ <span> | </span>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='&uwin.footer.home.law.url;'>&uwin.footer.home.law;</a>
+ </span>
+ <span> | </span>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='&uwin.footer.help.url;'>&uwin.footer.help;</a>
+ </span>
+ <span> | </span>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='&uwin.footer.journals.url;'>&uwin.footer.journals;</a>
+ </span>
+ <span> | </span>
+ <span class='footer_link'>
+ <a target='_blank' class='classic_link'
+ href='&uwin.footer.databases.url;'>&uwin.footer.databases;</a>
+ </span>
+ </div>
+ <div id='copyright_text'>
+ <span>&footer.copyright;</span>
+ </div>
+ <div id='footer_logo'>&footer.logo;
+ <a href='http://open-ils.org'><img style='border:none;' src='../../../../images/eg_tiny_logo.jpg'/></a>
+ </div>
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/header.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/header.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/header.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,13 @@
+<head>
+ <!-- Set the page title -->
+
+ <!--#include virtual="common/css_common.xml"-->
+
+ <title>&<!--#echo var="OILS_TITLE"-->;</title>
+ <link rel="unapi-server" type="application/xml" title="unAPI" href="http://<!--#echo var='HTTP_HOST'-->/opac/extras/unapi"/>
+
+ <!--#if expr="$slimpac!='true'"-->
+ <!--#include virtual="common/js_common.xml"-->
+ <!--#endif-->
+
+</head>
Added: conifer/trunk/web/opac/skin/uwin/xml/home/homesearch.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/home/homesearch.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/home/homesearch.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+ style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;'
+ xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <!-- load my js -->
+ <script language='javascript' type='text/javascript'
+ src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+ <script language='javascript' type='text/javascript'
+ src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+ <script language='javascript' type='text/javascript'>
+ 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.location_tag = 'search_location_tag_link';
+ config.ids.searchbar.lib_sel_span = 'lib_selector_span';
+ config.ids.searchbar.lib_sel_link = 'lib_selector_link';
+ config.ids.searchbar.depth_sel_span = 'depth_selector_span';
+ </script>
+
+
+ <div style='width: 100%; text-align: center'>
+ <img src='<!--#echo var="OILS_BASE"-->/skin/uwin/local/images/uwin_main.png' />
+ </div>
+
+ <style>.rowpad { height: 20px; }</style>
+
+ <table id='frontsearch_table' height='100%' width='100%'
+ style='margin-top: 10px; border-collapse: collapse;'>
+
+ <tbody>
+
+ <tr class='color_3'>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.common.now_searching = 'now_searching_location';
+ </script>
+
+ <td style='padding: 6px;' class='border_5' align='center'>
+ <span>&opac.search.nowSearching;</span>
+ <span style='padding: 1px;' id='now_searching_location'> </span>
+ </td>
+ </tr>
+
+
+ <tr class='rowpad'><td></td></tr>
+
+ <tr>
+ <td nowrap='nowrap' align='center' class='color_1 border_5'>
+ <input id='search_box' style='width: 300px;' type='text' />
+ <span style='padding-left: 6px;'>
+ <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+ </span>
+ </td>
+ </tr>
+
+ <tr class='rowpad'><td></td></tr>
+
+ <tr class='color_3 border_5'>
+
+ <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+ <span style='padding-right:40px;'>
+ <!--#include virtual="../common/stypes_selector.xml"-->
+ </span>
+
+ <span>
+ <!--
+ <span>&common.format;: </span>
+ -->
+ <!--#set var='FORM_SEL_ID' value='form_selector'-->
+ <!--#include virtual="../common/format_selector.xml"-->
+ </span>
+
+ </td>
+ </tr>
+
+ <tr class='rowpad'><td></td></tr>
+
+ <tr class='color_1 border_5'>
+ <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+ <span style='padding-right: 15px;'>
+ <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+ <span>
+ <span class='hide_me' id='depth_selector_span'>
+ <select id='depth_selector' >
+ <option value='new'>&opac.navigate.selectNewOrg;...</option>
+ </select>
+ </span>
+ <span class='hide_me' id='lib_selector_span'>
+ <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+ </span>
+ </span>
+ <span style='padding-left: 15px;'>
+ <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+ </span>
+ </td>
+ </tr>
+
+ <!-- locale picker -->
+ <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+<!-- <span style='vertical-align: top;'>&common.language;</span>
+ <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore"
+ searchAttr="label" required="false" jsId='opacLocaleSelector'>
+ <script>
+ dojo.addOnLoad(function() {
+ opacLocaleSelector.setValue(locale);
+ dojo.connect(opacLocaleSelector, 'onChange',
+ function () {
+ location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+ }
+ );
+ });
+ </script>
+ </span> -->
+ </td></tr>
+
+ </tbody>
+ </table>
+
+</div>
+
+
+
+
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/home/index_body.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/home/index_body.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/home/index_body.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,38 @@
+<body class="tundra">
+
+ <noscript>
+ <style type="text/css">#toptable { display: none; }</style>
+ <p style="font-size: 1.3em; padding: 3em; text-align: center;">
+ &home.js.disabled;
+ </p>
+ </noscript>
+
+ <table id='toptable' width='100%' style='border-collapse: collapse;'>
+ <tbody>
+ <tr>
+ <td width='10%'> </td>
+ <td width='80%'>
+ <div id='canvas'>
+ <!--#include virtual="../common/altcanvas.xml"-->
+ <!--#include virtual="homesearch.xml"-->
+ </div>
+ </td>
+ <td width='10%'> </td>
+ </tr>
+ </tbody>
+ </table>
+ <script language='javascript' type='text/javascript'>isFrontPage = true;</script>
+ <script language="javascript" type='text/javascript'>
+ dojo.addOnLoad(home_init);
+ try {
+ document.getElementById('toptable').style.display = 'table';
+ } catch(e) {
+ try {
+ document.getElementById('toptable').style.display = '';
+ } catch(ee) {}
+ }
+ </script>
+ <!--#include virtual='../footer.xml'-->
+</body>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/html_xsl.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/html_xsl.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/html_xsl.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,10 @@
+
+<xsl:stylesheet version="1.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output method="html" indent="yes" encoding="utf-8"/>
+ <xsl:template match="/">
+ <xsl:copy-of select='/*[local-name()="html"]'/>
+ </xsl:template>
+</xsl:stylesheet>
Added: conifer/trunk/web/opac/skin/uwin/xml/index.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/index.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/index.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Loads the environment -->
+<!--#include virtual="setenv.xml"-->
+
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+ <!--#include virtual="/opac/skin/uwin/local/locale/en-CA/opac.dtd"-->
+ <!--#include virtual="/opac/skin/uwin/local/locale/en-CA/opac_conifer.dtd"-->
+]>
+
+
+<html xmlns='http://www.w3.org/1999/xhtml'>
+ <!--#include virtual="header.xml"-->
+ <!--#if expr="$OILS_PAGE='index.xml'"-->
+ <!--#include virtual="home/index_body.xml"-->
+ <!--#else-->
+ <!--#include virtual="body.xml"-->
+ <!--#endif-->
+</html>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_bookbags.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_bookbags.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_bookbags.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,135 @@
+
+<div id='myopac_bookbag_div' class='hide_me' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/container.js'> </script>
+
+ <div id='myopac_delete_bookbag_warn' class='hide_me'>
+ &myopac.delete.bookbag;
+ </div>
+
+ <div style='text-align: center; font-weight: bold;'
+ class='hide_me' id='myopac_bookbags_none'>&myopac.no.bookbags;</div>
+
+ <div style='width: 99%; text-align: center; margin-bottom: 10px;'>
+ <b>&myopac.bookbags.title;</b>
+ <!--
+ <a class='classic_link' style='margin-left: 5px; font-size: 8pt;'
+ href='javascript:alert($("myopac_bb_what_are").innerHTML);'>(What are Bookbags?)</a>
+ -->
+ </div>
+
+ <table width='100%' class='data_grid data_grid_center hide_me' id='myopac_bookbag_table'>
+ <thead>
+ <tr><td>&common.name;</td><td>&myopac.bookbag.items;</td><td>&myopac.bookbag.shared;</td><td>&myopac.bookbag.toggle;</td><td>&myopac.bookbag.delete;</td></tr>
+ </thead>
+ <tbody id='myopac_bookbag_tbody'>
+ <tr id='myopac_bookbag_tr'>
+ <td>
+ <a href='javascript:void(0);' class='classic_link' name='myopac_expand_bookbag'> </a>
+ </td>
+ <td><span name='myopac_bookbag_item_count'> </span> <span> &myopac.items;</span></td>
+ <td>
+ <span name='myopac_bb_published_no' class='hide_me'>&common.no;</span>
+ <span name='myopac_bb_published_yes' class='hide_me'>&common.yes;</span>
+ <a name='myopac_bb_published_view' class='classic_link hide_me'>&myopac.view;</a>
+ <a name='myopac_bb_published_atom' class='unadorned_link hide_me'>
+ <img border="0" src="/opac/images/small-rss.png" title="&myopac.atom.feed;" alt="&myopac.atom.feed;"/>
+ </a>
+ </td>
+
+ <td>
+ <a name='myopac_bb_make_unpublished' class='classic_link hide_me'>&myopac.bookbag.hide;</a>
+ <a name='myopac_bb_make_published' class='classic_link hide_me'>&myopac.bookbag.share;</a>
+ </td>
+
+ <td>
+ <a class='classic_link' href='javascript:void(0);' name='myopac_container_delete'>&myopac.delete;</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table width='100%' class='data_grid data_grid_center' style='margin-top: 10px;'>
+ <thead>
+ <tr><td>&myopac.bookbag.create;</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <span style='padding-right: 5px;'>&myopac.bookbag.naming;</span>
+ <input id='myopac_bookbag_new_name' type='text' />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span style='padding: 5px;'>&myopac.bookbag.share;</span>
+ <a class='classic_link' href='javascript:alert($("bb_publish_text").innerHTML);'><b>&common.help;</b></a>
+ <span>&common.yes;</span> <input type='radio' name='bb_public' id='bb_public_yes'/>
+ <span>&common.no;</span> <input type='radio' name='bb_public' id='bb_public_no' checked='checked'/>
+ <input style='padding-left: 10px;' onclick='myOPACCreateBookbag();'
+ type='submit' value='&common.submit;' />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!--
+ <div style='overflow: auto; max-height: 200px;' class='hide_me'>
+ -->
+ <div style='width: 99%; text-align: center'> <b id='myopac_bookbag_items_name'> </b></div>
+
+ <div class='hide_me' style='width: 100%; text-align: center; font-weight: 700; margin-top: 10px;'
+ id='myopac_bookbag_no_items'>&myopac.bookbag.no.items;</div>
+
+ <table width='100%' class='hide_me data_grid data_grid_center' id='myopac_bookbag_items_table'>
+ <thead>
+ <tr> <td>&common.title;</td> <td>&common.authors;</td> <td>&myopac.bookbag.remove;</td> </tr>
+ </thead>
+ <tbody id='myopac_bookbag_items_tbody'>
+ <tr id='myopac_bookbag_items_row'>
+ <td> <a name='myopac_bookbag_items_title' class='classic_link'> </a> </td>
+ <!--
+ <td> <a name='myopac_bookbag_items_author' class='classic_link'> </a> </td>
+ -->
+ <td name='myopac_bookbag_items_author'> </td>
+ <td><a name='myopac_bookbag_items_remove' class='classic_link'>&myopac.remove.link;</a></td>
+ </tr>
+ </tbody>
+ </table>
+ <!--</div>-->
+
+ <span id='bb_publish_text' class='hide_me'>
+ &myopac.publish.text;
+ </span>
+
+ <span id='myopac_remove_bb_item_confirm' class='hide_me'>
+ &myopac.item.confirm;
+ </span>
+
+ <span id='myopac_make_published_confirm' class='hide_me'>
+ &myopac.publish.confirm;
+ </span>
+
+ <span id='myopac_make_unpublished_confirm' class='hide_me'>
+ &myopac.unpublish.confirm;
+ </span>
+
+ <span id='myopac_bb_update_success' class='hide_me'>
+ &myopac.update.success;
+ </span>
+
+ <span id='bb_create_warning' class='hide_me'>
+ &myopac.create.warning;
+ </span>
+
+ <span id='myopac_bb_what_are' class='hide_me'>
+ &myopac.describe.bookbags;
+ </span>
+
+ <span class='hide_me' id='bb_update_success'>
+ &myopac.updated.success;
+ </span>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_checked.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_checked.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_checked.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,107 @@
+
+<div id='myopac_checked_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <!--
+ <script language='javascript' type='text/javascript' src='<!||#echo var="OILS_JS_BASE"||>/Date.W3CDTF.js'/>
+ -->
+
+ <table width='100%'><tbody>
+ <tr>
+ <td aligh='left' class='data_grid'>
+ <!--
+ Total items out: <b id='mo_items_out_count' style='padding-right: 20px;'>0</b>
+ -->
+ &myopac.checked.out; <b id='mo_items_out_count' style='padding: 5px;'>0</b> /
+ &myopac.checked.overdue; <b id='mo_items_overdue_count' style='padding: 5px;'>0</b>
+ </td>
+ <td align='right'>
+ <button onclick='myOPACRenewSelected();' id='mo_renew_button' disabled='disabled'>&myopac.checked.renew;</button>
+ </td>
+ </tr>
+ <tr id='my_renewing' class='hide_me'><td align='center'><b>&myopac.checked.renewing;</b></td></tr>
+ </tbody></table>
+
+ <table width='100%' class='light_border data_grid'>
+
+ <thead class='color_3'>
+ <tr>
+ <td width='45%'>&common.title;</td>
+ <td width='20%'>&common.author;</td>
+ <td width='10%' nowrap='nowrap' align='center'>&myopac.fines.due;</td>
+ <td width='10%' nowrap='nowrap' align='center'>&myopac.checked.renew.remaining;</td>
+ <td width='15%'>&common.select;
+ (<a id='myopac_select_all_checked' onclick='myopacSelectAllChecked();'
+ class='classic_link' href='javascript:void(0);'>&common.all;</a>/<a id='myopac_select_none_checked'
+ onclick='myopacSelectNoneChecked();' class='classic_link' href='javascript:void(0);'>&common.none;</a>)
+ </td>
+ </tr>
+ </thead>
+
+
+ <tbody id='myopac_checked_tbody'>
+
+ <tr id='myopac_checked_none' class='hide_me'>
+ <td colspan='10' align='center'><b>&myopac.checked.noitems;</b></td>
+ </tr>
+
+
+ <tr id='myopac_checked_loading'><td>&common.loading;</td></tr>
+
+ <tr id='myopac_checked_row' class='light_border hide_me'>
+
+ <td name='myopac_checked_title' class='light_border'>
+ <a href='javascript:void(0);' name='myopac_checked_title_link'> </a>
+ </td>
+
+ <td name='myopac_checked_author' class='light_border'>
+ <a href='javascript:void(0);' name='myopac_checked_author_link'> </a>
+ </td>
+
+ <td align='center' name='myopac_checked_due' class='light_border'> </td>
+ <td align='center' name='myopac_checked_renewals' class='light_border'> </td>
+
+ <!--
+ <td align='center' name='myopac_checked_renew' class='light_border'>
+ <a style='text-decoration:underline;' href='javascript:void(0);'
+ name='myopac_checked_renew_link' class='class_link'>Renew</a>
+ </td>
+ -->
+
+ <td align='center'><input type='checkbox' name='selectme'/></td>
+
+ </tr>
+ </tbody>
+ </table>
+
+ <div id='non_cat_circs_div' class='hide_me'>
+ <br/>
+ <div style='text-align: center'><b>&myopac.common.other.circ;</b></div>
+ <table class='data_grid' width='100%'>
+ <thead>
+ <tr>
+ <td>&myopac.checked.circ.lib;</td>
+ <td>&myopac.checked.item.type;</td>
+ <td>&myopac.checked.circ.time;</td>
+ </tr>
+ </thead>
+ <tbody id='non_cat_circs_tbody'>
+ <tr id='non_cat_circs_row'>
+ <td name='circ_lib'/>
+ <td name='item_type'/>
+ <td name='circ_time'/>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id='myopac_renew_success' class='hide_me'>&myopac.checked.renew.success;</div>
+
+ <span class='hide_me' id='myopac_renew_confirm'>&myopac.checked.renew.confirm;</span>
+
+ <span class='hide_me' id='myopac_renew_fail'>&myopac.checked.renew.fail;</span>
+
+ <span class='hide_me' id='myopac_renew_fail2'>&myopac.checked.renew.fail2;</span>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_fines.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_fines.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_fines.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,101 @@
+
+<div id='myopac_fines_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <table width='100%' class='data_grid data_grid_center'>
+
+ <thead class='color_3'>
+ <tr><td colspan='3' style='padding: 6px'><b>&myopac.fines.title;</b></td></tr>
+ <tr>
+ <td width='33%'>&myopac.fines.owed;</td>
+ <td width='33%'>&myopac.fines.paid;</td>
+ <td width='33%'>&myopac.fines.balance;</td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_fines_summary_tbody'>
+ <tr id='myopac_fines_summary_loading'><td>&myopac.fines.status;</td></tr>
+ <tr id='myopac_fines_summary_row' class='hide_me'>
+ <td id='myopac_fines_summary_total' >&common.currency;</td>
+ <td id='myopac_fines_summary_paid' >&common.currency;</td>
+ <td id='myopac_fines_summary_balance' style='color:red;font-weight: bold;'>&common.currency;</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!--
+ <div id='accrue_explanation' class='hide_me'>
+ <span>Transactions whose balances are marked with a</span>
+ <span style='color:red; font-weight: bold'>*</span>
+ <span>will continue to accrue fines until the checked out item is returned.</span>
+ </div>
+ -->
+
+
+ <!-- Table for circulation transactions only -->
+ <div id='myopac_circ_trans_div' class='hide_me'>
+ <br/><hr/><br/>
+ <table width='100%' class='data_grid data_grid_center' id='myopac_circ_trans_table'>
+ <thead>
+ <tr><td colspan='10' style='padding: 6px'><b>&myopac.fines.overdue;</b></td></tr>
+ <tr>
+ <td>&common.title;</td>
+ <td>&common.author;</td>
+ <td>&myopac.fines.checkout;</td>
+ <td>&myopac.fines.due;</td>
+ <td>&myopac.fines.returned;</td>
+ <td>&myopac.fines.balance;</td>
+ </tr>
+ </thead>
+ <tbody id='myopac_circ_trans_tbody'>
+ <tr id='myopac_circ_trans_row'>
+ <td><a class='classic_link' name='myopac_circ_trans_title'> </a></td>
+ <td name='myopac_circ_trans_author'> </td>
+ <td name='myopac_circ_trans_start'> </td>
+ <td name='myopac_circ_trans_due'> </td>
+ <td name='myopac_circ_trans_finished'><span style='color:red;'>&myopac.fines.accruing;</span></td>
+ <td>
+ <span style='color: red; font-weight: bold;'
+ name='myopac_circ_trans_balance'>&common.currency;</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <!-- Table for all non-circulation transactions -->
+ <div id='myopac_trans_div' class='hide_me'>
+ <br/><hr/><br/>
+ <table width='100%' class='data_grid data_grid_center' id='myopac_trans_table'>
+ <thead>
+ <tr><td colspan='8' style='padding: 6px'><b>&myopac.fines.other;</b></td></tr>
+ <tr>
+ <td width='12%'>&myopac.fines.time.start;</td>
+ <td width='12%'>&myopac.fines.time.paid;</td>
+ <td width='12%'>&myopac.fines.owed.initial;</td>
+ <td width='12%'>&myopac.fines.paid.amount;</td>
+ <td width='12%'>&myopac.fines.balance;</td>
+ <td width='12%'>&myopac.fines.type;</td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_trans_tbody'>
+ <tr id='myopac_trans_row'>
+ <td name='myopac_trans_start'> </td>
+ <td name='myopac_trans_last_payment'> </td>
+ <td name='myopac_trans_init_amount'>&common.currency;</td>
+ <td name='myopac_trans_total_paid'>&common.currency;</td>
+ <td style='color:red; font-weight: bold;'>
+ <span name='myopac_trans_balance_recur' class='hide_me'> * </span>
+ <span name='myopac_trans_balance'>&common.currency;</span>
+ </td>
+ <td name='myopac_trans_bill_type'> </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <br/>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_holds.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_holds.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_holds.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,122 @@
+
+<div id='myopac_holds_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/holds.js'> </script>
+
+ <table width='100%'>
+ <tbody><tr><td width='100%' align='right'>
+ <select id='myopac_holds_actions' onchange='myopacDoHoldAction();'>
+ <option id='myopac_holds_actions_none' value=''>-- &myopac.holds.actions; --</option>
+ <option value='freeze'>&myopac.holds.freeze_selected;</option>
+ <option value='thaw'>&myopac.holds.thaw_selected;</option>
+ <option value='thaw_date'>&myopac.holds.thaw_date_selected;</option>
+ <option value='cancel'>&myopac.holds.cancel_selected;</option>
+ </select>
+ </td></tr></tbody>
+ <script language='javascript' type='text/javascript'>$('myopac_holds_actions_none').selected = true;</script>
+ </table>
+
+ <span id='myopac.holds.cancel.confirm' class='hide_me'>&myopac.holds.cancel.confirm;</span>
+ <span id='myopac.holds.freeze.confirm' class='hide_me'>&myopac.holds.freeze.confirm;</span>
+ <span id='myopac.holds.thaw.confirm' class='hide_me'>&myopac.holds.thaw.confirm;</span>
+ <span id='myopac.holds.thaw_date.confirm' class='hide_me'>&myopac.holds.thaw_date.confirm;</span>
+ <span id='myopac.holds.freeze.select_thaw' class='hide_me'>&myopac.holds.freeze.select_thaw;</span>
+
+ <table width='100%' id='myopac_holds_processing' class='hide_me'>
+ <tr><td>&myopac.holds.processing;</td></tr>
+ </table>
+
+ <div id='myopac_holds_thaw_date_form' class='hide_me'>
+ <div id='myopac_holds_freeze_select_thaw'>&myopac.holds.freeze.select_thaw;</div>
+ <p>
+ <input dojoType="dijit.form.DateTextBox" size='10' maxlength='10' type='text' id='myopac_holds_thaw_date_input' />
+ </p>
+ <p>
+ <button onclick='myopacApplyThawDate();'>&common.submit;</button>
+ </p>
+ </div>
+
+ <table width='100%' class='light_border data_grid data_grid_center' id='myopac_holds_main_table'>
+
+ <thead class='color_3'>
+ <tr>
+ <td width=''>&common.title;</td>
+ <td width=''>&common.author;</td>
+ <td>&myopac.holds.formats;</td>
+ <td>&myopac.holds.location;</td>
+ <td>&common.status;</td>
+ <td class='hide_me' id='myopac_holds_estimated_wait_column'>&myopac.holds.estimated_wait;</td>
+ <td>&myopac.holds.unfrozen;</td>
+ <td>&myopac.holds.frozen.until;</td>
+ <td>&opac.holds.expire_time;</td>
+ <td width=''>&common.select;
+ (<a id='myopac_select_all_holds' onclick='myopacSelectAllHolds();'
+ class='classic_link' href='javascript:void(0);'>&common.all;</a>/<a id='myopac_select_none_holds'
+ onclick='myopacSelectNoneHolds();' class='classic_link' href='javascript:void(0);'>&common.none;</a>)
+ </td>
+
+ <td>&myopac.holds.edit;</td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_holds_tbody'>
+
+ <tr id='myopac_holds_none' class='hide_me'>
+ <td colspan='10'><b>&myopac.holds.status.none;</b></td>
+ </tr>
+ <tr id='myopac_holds_loading'><td>&myopac.loading;</td></tr>
+
+ <tr id='myopac_holds_row' class='hide_me'>
+
+ <td name='myopac_holds_title'>
+ <a href='javascript:void(0);' name='myopac_holds_title_link'> </a>
+ <div name='vol_copy' style='border: 1px solid #808080; width:98%; margin-top: 2px;' class='hide_me'>
+ <div style='font-size: 90%' name='volume'/>
+ <div style='font-size: 90%' name='copy'/>
+ </div>
+ </td>
+
+ <td name='myopac_holds_author'>
+ <a href='javascript:void(0);' name='myopac_holds_author_link'> </a>
+ </td>
+
+ <td name='myopac_holds_formats'> </td>
+
+ <td name='myopac_holds_location'></td>
+ <td>
+ <span class='hide_me' name='hold_status_waiting'>&myopac.holds.status.waiting;</span>
+ <span class='hide_me' name='hold_status_transit'>&myopac.holds.status.intransit;</span>
+ <span class='hide_me' name='hold_status_available'><b style='color:red'>&myopac.holds.status.available;</b></span>
+ <span class='hide_me' name='hold_qstats'></span>
+ </td>
+ <td class='hide_me' name='myopac_holds_estimated_wait'/>
+
+ <td>
+ <!-- These characaters do not display in Internet Exploror, *sigh*
+ <span name='myopac_hold_unfrozen_false' class='x_mark'>✗</span>
+ <span name='myopac_hold_unfrozen_true' class='hide_me check_mark'>✓</span>
+ -->
+ <span name='myopac_hold_unfrozen_false' class='x_mark'>&common.no;</span>
+ <span name='myopac_hold_unfrozen_true' class='hide_me check_mark'>&common.yes;</span>
+ </td>
+
+
+ <td name='myopac_holds_frozen_until'></td>
+ <td name='myopac_hold_expire_time'></td>
+ <td><input type='checkbox' name='myopac_holds_selected_chkbx'/></td>
+
+ <td name='myopac_holds_cancel' style='border-left: 3px solid #E0E0E0; border-right: 3px solid #E0E0E0;'>
+ <a href='javascript:void(0);'
+ name='myopac_holds_edit_link' class='classic_link'>&myopac.holds.edit;</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <span class='hide_me' id='myopac_holds_cancel_verify'>
+ &myopac.holds.verify;
+ </span>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_prefs.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_prefs.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_prefs.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,105 @@
+
+<div id='myopac_prefs_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <table width='100%' class='data_grid'>
+
+ <thead>
+ <tr>
+ <td colspan='2' align='center'>
+ <b>&myopac.prefs.title;</b>
+ </td>
+ </tr>
+ </thead>
+
+ <tbody id='myopac_prefs_tbody'>
+ <tr id='myopac_prefs_loading'><td colspan='3'><b>&myopac.loading;</b></td></tr>
+ <tr id='myopac_prefs_row'>
+ <td width='50%'>&myopac.prefs.hits;</td>
+ <td>
+ <select id='prefs_hits_per'>
+ <option value='5'>5</option>
+ <option value='8'>8</option>
+ <option value='10'>10</option>
+ <option value='15'>15</option>
+ <option value='20'>20</option>
+ <option value='25'>25</option>
+ <option value='50'>50</option>
+ </select>
+ </td>
+ </tr>
+
+ <!-- FONT size preference -->
+ <tr>
+ <td>&myopac.prefs.font;</td>
+ <td>
+ <select id='prefs_def_font'>
+ <option value='regular'>&myopac.prefs.font.regular;</option>
+ <option value='large'>&myopac.prefs.font.large;</option>
+ </select>
+ </td>
+ </tr>
+
+ <!-- default hold notification type -->
+ <tr>
+ <td>
+ <span>&myopac.prefs.holds.notify;</span>
+ <a class='classic_link' href='javascript:void(0);'
+ onclick='alert($("myopac_pref_hold_notify_alert").textContent);' >&common.help;</a>
+ </td>
+ <td>
+ <select id='prefs_hold_notify'>
+ <option value='phone:email' selected='selected'>&myopac.prefs.holds.both;</option>
+ <option value='phone'>&myopac.prefs.holds.phone;</option>
+ <option value='email'>&myopac.prefs.holds.email;</option>
+ </select>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>&myopac.prefs.search.location;</td>
+ <td>
+ <div style='margin-bottom: 5px;'>
+ <input type='checkbox' id='myopac_pref_home_lib'
+ onclick='
+ if( this.checked ) $("prefs_def_location").disabled = true;
+ else $("prefs_def_location").disabled = false;
+ ' /> &myopac.prefs.search.home;
+ </div>
+ <select id='prefs_def_location'>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td>&myopac.prefs.search.range;</td>
+ <td>
+ <select id='prefs_def_range'>
+ </select>
+ </td>
+ </tr>
+
+
+
+ <!-- Save the preferences -->
+ <tr><td colspan='2'><br/></td></tr>
+
+ <tr>
+ <td align='center' class='color_3' colspan='2'>
+ <button onclick='myOPACSavePrefs();'
+ id='myopac_prefs_submit'>&myopac.prefs.save;</button>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <div class='hide_me' id='prefs_update_success'>&myopac.prefs.save.success;</div>
+ <div class='hide_me' id='prefs_update_failure'>&myopac.prefs.save.failed;</div>
+ <span class='hide_me' id='myopac_pref_hold_notify_alert'>
+ &myopac.prefs.help;
+ </span>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_summary.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_summary.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/myopac/myopac_summary.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,286 @@
+
+<div id='myopac_summary_div' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+
+ <div id='myopac.expired.alert' class='hide_me' style='margin-bottom: 20px;'>
+ <table class='data_grid' width='100%'>
+ <tbody>
+ <tr>
+ <td width='100%' style='color:red;'>
+ &myopac.summary.expired;
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id='myopac.notes.div' class='hide_me'>
+ <table class='data_grid' width='100%'>
+ <thead>
+ <tr>
+ <td colspan='2'><b> &myopac.summary.notes;</b></td>
+ </tr>
+ </thead>
+ <tbody id='myopac.notes.tbody'>
+ <tr id='myopac.notes.tr'>
+ <td>
+ <b name='title'/> : <span name='value'/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br/>
+ </div>
+
+ <table width='70%' class='light_border myopac_summary_table'>
+ <tbody id='myopac_summary_tbody'>
+ <tr>
+ <td width='30%' class='color_4 light_border'>&common.name;</td>
+ <td class='light_border'>
+ <span id='myopac_summary_prefix' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_first' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_middle' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_last' style='padding-right: 5px;'> </span>
+ <span id='myopac_summary_suffix'> </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.phone.day;</td>
+ <td class='light_border' id='myopac_summary_dayphone'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.phone.evening;</td>
+ <td class='light_border' id='myopac_summary_eveningphone'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.phone.other;</td>
+ <td class='light_border' id='myopac_summary_otherphone'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&common.username;</td>
+ <td class='light_border' id='myopac_summary_username'> </td>
+ <td class='light_border'><a href='javascript:void(0);'
+ onclick='unHideMe($("myopac_update_username_row"));$("myopac_new_username").focus();'
+ id='myopac_summary_username_change' style='text-decoration: underline;'>&myopac.summary.change;</a></td>
+ </tr>
+
+ <tr id='myopac_update_username_row' class='hide_me'>
+ <td class='myopac_update_cell' colspan='3'>
+ <span class='myopac_update_span'>&myopac.summary.username.enter; </span>
+ <input type='text' size='24' id='myopac_new_username'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdateUsername();' />
+ <span class='myopac_update_span'>
+ <button onclick='myOPACUpdateUsername();'>&common.submit;</button>
+ </span>
+ <span class='myopac_update_span'>
+ <button onclick='hideMe($("myopac_update_username_row"));'>&common.cancel;</button>
+ </span>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class='color_4 light_border'>&common.password;</td>
+ <td class='light_border' id='myopac_summary_password'>&myopac.summary.password.text;</td>
+ <td class='light_border'><a href='javascript:void(0);'
+ onclick='unHideMe($("myopac_update_password_row"));$("myopac_current_password").focus();'
+ id='myopac_summary_password_change' style='text-decoration: underline;'>&myopac.summary.change;</a></td>
+ </tr>
+
+ <tr id='myopac_update_password_row' class='hide_me'>
+ <td class='myopac_update_cell' colspan='3'>
+
+ <table><tbody>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.current; </span></td>
+ <td><input type='password' size='24' id='myopac_current_password'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+ </tr>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.new; </span></td>
+ <td><input type='password' size='24' id='myopac_new_password'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+ </tr>
+ <tr>
+ <td><span class='myopac_update_span'>&myopac.summary.password.reenter; </span></td>
+ <td><input type='password' size='24' id='myopac_new_password2'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdatePassword();' /></td>
+ </tr>
+ </tbody></table>
+
+ <span class='myopac_update_span'>
+ <button onclick='myOPACUpdatePassword();'>&common.submit;</button>
+ </span>
+ <span class='myopac_update_span'>
+ <button onclick='hideMe($("myopac_update_password_row"));'>&common.cancel;</button>
+ </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.email;</td>
+ <td class='light_border' id='myopac_summary_email'> </td>
+ <td class='light_border'><a href='javascript:void(0);'
+ onclick='unHideMe($("myopac_update_email_row"));$("myopac_new_email").focus();'
+ id='myopac_summary_email_change' style='text-decoration: underline;'>&myopac.summary.change;</a></td>
+ </tr>
+
+ <tr id='myopac_update_email_row' class='hide_me'>
+ <td class='myopac_update_cell' colspan='3'>
+ <span class='myopac_update_span'>&myopac.summary.email.new; </span>
+ <input type='text' size='24' id='myopac_new_email'
+ onkeydown='if(userPressedEnter(event)) myOPACUpdateEmail();' />
+ <span class='myopac_update_span'>
+ <button onclick='myOPACUpdateEmail();'>&common.submit;</button>
+ </span>
+ <span class='myopac_update_span'>
+ <button onclick='hideMe($("myopac_update_email_row"));'>&common.cancel;</button>
+ </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.id.primary;</td>
+ <td class='light_border' id='myopac_summary_ident1'> </td>
+ </tr>
+ <!--
+ <tr>
+ <td class='color_4 light_border'>Secondary Identification</td>
+ <td class='light_border' id='myopac_summary_ident2'> </td>
+ </tr>
+ -->
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.barcode;</td>
+ <td class='light_border' id='myopac_summary_barcode'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.home;</td>
+ <td class='light_border' id='myopac_summary_homelib'> </td>
+ </tr>
+ <tr>
+ <td class='color_4 light_border'>&myopac.summary.genesis;</td>
+ <td class='light_border' id='myopac_summary_create_date'> </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+ <br/><hr/><br/>
+
+ <table width='100%' class='light_border data_grid'>
+ <thead>
+ <tr>
+ <td>&myopac.summary.addresses;</td>
+ <td id='myopac_pending_addr_td' class='hide_me'>&myopac.summary.addresses.pending;</td>
+ </tr>
+ </thead>
+ <tbody id='myopac_addr_tbody'>
+ <tr id='myopac_addr_row' class='light_border'>
+ <td>
+ <table>
+ <tr>
+ <td>&myopac.summary.address.type;</td>
+ <td name='myopac_addr_type'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td name='myopac_addr_street'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td name='myopac_addr_street2'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.city;</td>
+ <td name='myopac_addr_city'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.county;</td>
+ <td name='myopac_addr_county'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.state;</td>
+ <td name='myopac_addr_state'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.country;</td>
+ <td name='myopac_addr_country'> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.zip;</td>
+ <td name='myopac_addr_zip'> </td>
+ </tr>
+ <tr>
+ <td name='myopac_addr_edit_td' colspan='2' class='hide_me'>
+ <a class='classic_link' name='myopac_addr_edit_link' href='javascript:void(0);'>Edit Address</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class='hide_me' name='myopac_pending_addr_td'>
+ <table>
+ <tr>
+ <td>&myopac.summary.address.type;</td>
+ <td><input name='myopac_pending_addr_type'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td><input name='myopac_pending_addr_street'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.street;</td>
+ <td><input name='myopac_pending_addr_street2'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.city;</td>
+ <td><input name='myopac_pending_addr_city'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.county;</td>
+ <td><input name='myopac_pending_addr_county'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.state;</td>
+ <td><input name='myopac_pending_addr_state'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.country;</td>
+ <td><input name='myopac_pending_addr_country'/> </td>
+ </tr>
+ <tr>
+ <td>&myopac.summary.address.zip;</td>
+ <td><input name='myopac_pending_addr_zip'/> </td>
+ </tr>
+ <tr>
+ <td name='myopac_addr_edit_td' colspan='2'>
+ <a class='classic_link' name='myopac_pending_addr_edit_link' href='javascript:void(0);'>Save Changes</a>
+ <a style='padding-left:10px;' class='classic_link' name='myopac_pending_addr_del_link' href='javascript:void(0);'>Discard Pending Address</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class='hide_me' id='myopac_username_error'>&myopac.summary.username.error;</div>
+ <div class='hide_me' id='myopac_username_dup'>
+ &myopac.summary.username.dup;
+ </div>
+ <div class='hide_me' id='myopac_username_success'>&myopac.summary.username.success;</div>
+ <div class='hide_me' id='myopac_username_failure'>&myopac.summary.username.failure;</div>
+
+ <div class='hide_me' id='myopac_email_error'>&myopac.summary.email.error;</div>
+ <div class='hide_me' id='myopac_email_success'>&myopac.summary.email.success;</div>
+ <div class='hide_me' id='myopac_email_failure'>&myopac.summary.email.failed;</div>
+
+ <div class='hide_me' id='myopac_password_error'>&myopac.summary.password.error;</div>
+ <div class='hide_me' id='myopac_password_success'>&myopac.summary.password.success;</div>
+ <div class='hide_me' id='myopac_password_failure'>&myopac.summary.password.failure;</div>
+ <span class='hide_me' id='myopac_invalid_username'>&myopac.summary.username.invalid;</span>
+ <span class='hide_me' id='myopac_addr_changes_saved'>Address Saved</span>
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/page_advanced.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/page_advanced.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/page_advanced.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,14 @@
+<div id='canvas_main' class='canvas' style='margin-top: 20px;'>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/advanced.js'></script>
+
+ <style type='text/css'>
+ .advanced_div { text-align: center; margin: 8px; margin-left: 2px; width: 95%; padding: 5px; }
+ </style>
+
+ <div class='advanced_div'>
+ <!--#include virtual="advanced/advanced_global.xml"-->
+ </div>
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/page_cnbrowse.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/page_cnbrowse.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/page_cnbrowse.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,6 @@
+<div id='canvas_main' class='canvas' style='margin-top: 20px;'>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/cn_browse.js'></script>
+ <!--#include virtual="common/cn_browse.xml"-->
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/page_mresult.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/page_mresult.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/page_mresult.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,9 @@
+<div>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/sidebar_extras.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/mresult.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/result_common.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/tips.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/holds.js'></script>
+ <!--#include virtual="result/result_common.xml"-->
+</div>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/page_myopac.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/page_myopac.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/page_myopac.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,68 @@
+<div id='canvas_main' class='canvas hide_me'>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/myopac.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/DP_DateExtensions.js'></script>
+
+ <script language='javascript' type='text/javascript'> config.ids.altcanvas.myopac_reload = 'myopac_reloading'; </script>
+ <div id='myopac_reloading' class='hide_me canvas'> &common.loading; </div>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.myopac = {};
+ config.css.myopac = {};
+ config.names.myopac = {};
+ </script>
+
+ <br/>
+ <table style='width: 98%; text-align: center;'>
+ <tbody>
+ <tr id='myopac_nav_row'>
+
+ <td class='myopac_link border_6' id='myopac_summary_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("summary");'>&myopac.account;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_checked_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("checked");'>&myopac.checkouts;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_holds_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("holds");'>&myopac.holds;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_fines_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("fines");'>&myopac.fines;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_prefs_td' >
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("prefs");'>&myopac.preferences;</a>
+ </td>
+
+ <td class='myopac_link border_6' id='myopac_bookbag_td' nowrap='nowrap'>
+ <a href='javascript:void(0);'
+ onclick='myOPACChangePage("bookbag");'>&myopac.bookbags;</a>
+
+ </td>
+
+ </tr>
+ </tbody>
+ </table>
+
+ <br/>
+
+ <div id='myopac_main_div'>
+ <!--#include virtual="myopac/myopac_summary.xml"-->
+ <!--#include virtual="myopac/myopac_checked.xml"-->
+ <!--#include virtual="myopac/myopac_holds.xml"-->
+ <!--#include virtual="myopac/myopac_fines.xml"-->
+ <!--#include virtual="myopac/myopac_prefs.xml"-->
+ <!--#include virtual="myopac/myopac_bookbags.xml"-->
+ </div>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/page_rdetail.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/page_rdetail.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/page_rdetail.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,90 @@
+<div id='canvas_main' class='canvas'>
+
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/sidebar_extras.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/result_common.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/rresult.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/rdetail.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/holds.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/cn_browse.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/container.js'></script>
+ <script src='http://www.google.com/jsapi' type='text/javascript' language='javascript'></script>
+ <script type='text/javascript' src='http://books.google.com/books/api.js?key=notsupplied&v=0&callback=google.loader.callbacks.books'></script>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.rdetail = {};
+ config.ids.rdetail.view_marc = "rdetail_view_marc";
+ </script>
+
+ <table width='100%' id='np_table' class='hide_me' style='margin-top: 3px;'>
+ <tbody>
+ <tr class='color_4' style='height: 1em;'>
+ <td style='vertical-align: top;'>
+
+ <span>
+ &rdetail.result; <span id='np_offset'> </span>
+ <span> &common.of; </span>
+ <span id='np_count'> </span>
+ </span>
+
+ <span style='padding-left: 40px;' >
+ <a class='np_nav_link classic_link hide_me' id='np_start'
+ href='javascript:rdetailStart();' title="&rdetail.page.results;">&rdetail.start;</a>
+ <a class='np_nav_link classic_link hide_me' id='np_prev'
+ href='javascript:rdetailPrev();' title='&rdetail.page.previous;'><<</a>
+ <span> </span>
+ <a class='np_nav_link classic_link hide_me' id='np_next'
+ href='javascript:rdetailNext();' title='&rdetail.page.next;'>>></a>
+ <a class='np_nav_link classic_link hide_me' id='np_end'
+ href='javascript:rdetailEnd();' title="&rdetail.page.last;">&rdetail.end;</a>
+ </span>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table style='' class='rdetail_header color_1' width='100%'>
+ <tbody>
+
+ <tr>
+ <td width='33%' align='left'>
+ <span>&rdetail.detailMain.headerLabel;</span>
+ </td>
+
+ <td align='right' style='padding-right: 7px;' width='33%'>
+ <span style='padding-right: 7px;' class='hide_me' id='rdetail_exp_refworks_span'>
+ <a id='rdetail_exp_refworks' class='classic_link'>Export to RefWorks</a>
+ </span>
+ <span style='padding-right: 7px;'>
+ <a id='rdetail_place_hold' class='classic_link'></a>
+ </span>
+ <span style='padding-right: 7px;' class='hide_me' id='rdetail_more_actions'>
+ <select id='rdetail_more_actions_selector' style='max-width: 11em;'>
+ <option value='start'>&rdetail.more;</option>
+ <option disabled='disabled'>--------------</option>
+ <option disabled='disabled'>&rdetail.bookbag.add;</option>
+ <option disabled='disabled'>--------------</option>
+ <option value='new_bookbag' onclick='rdetailNewBookbag();'>&rdetail.bookbag.create;</option>
+ </select>
+ </span>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
+ class='hide_me color_4' id='rdetail_deleted_exp'>
+ &rdetail.record.deleted;
+ </div>
+
+ <!--#include virtual="rdetail/rdetail_summary.xml"-->
+ <br/><br/>
+ <!--#include virtual="rdetail/rdetail_extras.xml"-->
+
+ <div class='hide_me' id='rdetail_bb_none'>&rdetail.none;</div>
+ <div class='hide_me' id='rdetail_bb_item_success'>&rdetail.bookbag.add.success;</div>
+ <div class='hide_me' id='rdetail_bb_new'>&rdetail.bookbag.name;</div>
+ <div class='hide_me' id='rdetail_bb_success'>&rdetail.bookbag.create.success;</div>
+
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/page_rresult.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/page_rresult.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/page_rresult.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,9 @@
+<div>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/sidebar_extras.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/rresult.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/result_common.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/tips.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/holds.js'></script>
+ <!--#include virtual="result/result_common.xml"-->
+</div>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_altcanvas.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_altcanvas.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_altcanvas.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,28 @@
+
+<!-- record details alternate canvases -->
+<div class=''>
+
+ <!--
+ <script language='javascript' type='text/javascript'>
+ config.ids.rdetail.view_marc_div = 'view_marc_div';
+ config.ids.altcanvas.view_marc_div = config.ids.rdetail.view_marc_div;
+ config.ids.rdetail.hide_marc = "rdetail_hide_marc";
+ config.ids.rdetail.view_marc_box = "rdetail_view_marc_box";
+ </script>
+
+ <div class='hide_me canvas' id='view_marc_div'>
+ <div>
+ <table width='100%'><tbody><tr>
+ <td class='color_1' align='left' style='padding-left: 7px;text-decoration: underline;'>
+ <a href="javascript:void(0);" id='rdetail_hide_marc'>&rdetail.detailMain.hideMarc;</a>
+ </td>
+ </tr></tbody></table>
+ </div>
+ <br/>
+ <div id='rdetail_view_marc_box'> </div>
+ <br/><br/>
+ </div>
+ -->
+
+</div>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_cn_details.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_cn_details.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_cn_details.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,103 @@
+<table class='hide_me'>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/copy_details.js'></script>
+ <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/Date.W3CDTF.js'></script>
+ <tbody>
+ <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row' templateRow='1'>
+ <td colspan='10'>
+ <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
+
+ <a name='print' href='javascript:void(0);' class='classic_link'>&rdetail.print;</a>
+ <table class='data_grid data_grid_center' style='width: 100%'>
+ <thead>
+ <tr>
+ <td width='33%'>&rdetail.cn.barcode;</td>
+ <td>&common.status;</td>
+ <td>&rdetail.cn.location;</td>
+ <td name='age_protect_label' class='hide_me'>&rdetail.cn.hold.age;</td>
+ <td name='create_date_label' class='hide_me'>&rdetail.cn.genesis;</td>
+ <td name='holdable_label' class='hide_me'>&rdetail.cn.holdable;</td>
+ <td name='due_date_label' class='hide_me'>&rdetail.cn.due;</td>
+ </tr>
+ </thead>
+ <tbody name='copies_tbody' class='copy_details_table' width='100%'>
+
+ <tr name='copies_row'>
+
+ <td>
+ <span name='barcode'> </span>
+ <a class='hide_me classic_link copy_more_info' name='details_link'>&rdetail.cn.more;</a>
+ <a class='hide_me classic_link copy_more_info' name='less_details_link'>&rdetail.cn.less;</a>
+ <a class='hide_me classic_link copy_more_info' name='copy_hold_link'
+ href='javascript:void(0);'>&rdetail.cn.hold;</a>
+ </td>
+
+ <td name='status'> </td>
+ <td name='location'> </td>
+ <td name='age_protect_value' class='hide_me'>&rdetail.cn.disabled;</td>
+ <td name='create_date_value' class='hide_me'> </td>
+
+ <td name='copy_holdable_td' class='hide_me'>
+ <span name='copy_is_holdable'> </span>
+ </td>
+
+ <td name='copy_due_date_td' class='hide_me'>
+ <span name='copy_due_date'> </span>
+ </td>
+
+ </tr>
+
+ <tr name='copy_extras_row' class='hide_me'>
+ <td colspan='10'>
+ <table width='100%' class='data_grid'>
+ <tbody name='extras_tbody'>
+ <tr name='extras_row' class='hide_me'>
+ <td name='type' width='20%'>
+ <span name='note' class='hide_me'><b>&rdetail.cn.note;</b></span>
+ <span name='cat' class='hide_me'><b>&rdetail.cn.category;</b></span>
+ </td>
+ <td>
+ <span name='key'> </span> : <span name='value'> </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<span class='hide_me' id='rdetail.yes'>&common.yes;</span>
+<span class='hide_me' id='rdetail.no'>&common.no;</span>
+
+
+<div id='rdetail_print_details' class='hide_me'>
+ <div style='text-align: center; padding: 20px; width: 100%'>
+ <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
+ <input type='submit' value='&rdetail.cn.print;' onclick='window.print();'> </input>
+ </div>
+ <div name='body'>
+ <table>
+ <tbody name='tbody'>
+ <tr><td>&common.library;</td><td colspan='2' name='lib'></td></tr>
+ <tr><td>&common.title;</td><td colspan='2' name='title'></td></tr>
+ <tr><td>&common.author;</td><td colspan='2' name='author'></td></tr>
+ <tr><td>&common.edition;</td><td colspan='2' name='edition'></td></tr>
+ <tr><td>&common.pubdate;</td><td colspan='2' name='pubdate'></td></tr>
+ <tr><td>&common.publisher;</td><td colspan='2' name='publisher'></td></tr>
+ <tr><td>&common.physical;</td><td colspan='2' name='phys'></td></tr>
+ <tr>
+ <td colspan='3' style='background: #E0F0E0;'> </td>
+ </tr>
+ <tr name='cnrow'><td><b>&common.callnumber;</b></td><td><b colspan='2' name='cn'></b></td></tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_copyinfo.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_copyinfo.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_copyinfo.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,93 @@
+
+<!-- This holds information for copies attached to this record -->
+<div id='rdetail_copy_info_div' class='rdetail_extras_div'>
+
+ <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
+ <span>
+ <a href='javascript:void(0);' id='copy_info_local_link'
+ class='rdetail_copy_nav_link hide_me classic_link'><b>&rdetail.copyInfo.local;</b></a>
+ </span>
+ <span width=''>
+ <a href='javascript:void(0);' id='copy_info_all_link'
+ class='rdetail_copy_nav_link classic_link'><b>&rdetail.copyInfo.all;</b></a>
+ </span>
+ </div>
+
+ <style>
+ #rdetail_copy_info_table { font-size: 8pt; }
+ #rdetail_copy_info_table td { padding: 3px; }
+ </style>
+ <table id='rdetail_copy_info_table' class='data_grid'>
+ <thead>
+
+ <tr>
+ <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.library;</td>
+ <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.callnumber;</td>
+ <td name='rdetail_copylocation_header' class='rdetail_copy_info_header_cell hide_me'>&rdetail.copyInfo.copylocation;</td>
+ <td class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.actions;</td>
+ <td nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'>
+ <div name='rdetail_status_cell'> </div>
+ </td>
+ </tr>
+
+ </thead>
+ <tbody id='rdetail_copy_info_tbody'>
+ <tr id='rdetail_copy_info_row' class='hide_me'>
+ <td name='rdetail_library_cell'>
+ <a name='lib_print_link' class='hide_me classic_link' style='font-size: 8pt; padding-left: 20px;'>
+ &rdetail.copyInfo.print;
+ </a>
+ </td>
+ <td name='rdetail_callnumber_cell'> </td>
+ <td class="hide_me" name='rdetail_copylocation_cell'> </td>
+ <td name='rdetail_actions_cell'>
+ <div style='padding-bottom: 1px;'>
+ <a style='font-size: 8pt;'
+ name='details' class='hide_me classic_link'>&rdetail.copyInfo.details;</a>
+ </div>
+ <div style='margin-top: 2px;'>
+ <a name='browse' style='font-size: 8pt;'
+ class='hide_me classic_link'><!-- &rdetail.copyInfo.browse; --></a>
+ </div>
+<!-- <div style='margin-top: 2px;' name='hold_div' class='hide_me'>
+ <a name='hold' style='font-size: 8pt;' href='javascript:void(0);'
+ class='classic_link'>&rdetail.copyInfo.hold;</a>
+ </div> -->
+ </td>
+ <td nowrap='nowrap' class='rdetail_copy_count_cell vertical'
+ name='rdetail_copy_count_cell'> </td>
+ </tr>
+
+ <tr id='rdetail_copy_info_loading'><td>&rdetail.loading;</td></tr>
+
+ </tbody>
+ </table>
+
+ <!--
+ <table class='hide_me'>
+ <tbody>
+ <tr style='border: 3px solid #E0E0E0;' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
+ </tbody>
+ </table>
+ -->
+
+ <br/><br/>
+
+ <div id='rdetail_copy_info_none' class='hide_me'>&rdetail.noneAvailable;</div>
+
+ <script language='javascript' type='text/javascript'>
+ config.ids.rdetail.cp_status = "rdetail_copy_info_status";
+ config.ids.rdetail.cp_info_row = "rdetail_copy_info_row";
+ config.ids.rdetail.cp_info_loading = "rdetail_copy_info_loading";
+ config.ids.rdetail.cp_info_local = "copy_info_local_link";
+ config.ids.rdetail.cp_info_all = "copy_info_all_link";
+ config.ids.rdetail.cp_info_none = "rdetail_copy_info_none";
+ config.names.rdetail.lib_cell = "rdetail_library_cell";
+ config.names.rdetail.cn_cell = "rdetail_callnumber_cell";
+ config.names.rdetail.cp_count_cell = "rdetail_copy_count_cell";
+ config.names.rdetail.cp_status = 'rdetail_status_cell';
+ </script>
+
+</div> <!-- copy info -->
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_extras.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_extras.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_extras.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,125 @@
+
+<div xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <table class='rdetails_extra_links'>
+ <thead>
+ <tr>
+ <td id='rdetail_copy_info_link' class='rdetail_extras_td rdetail_extras_selected'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("copyinfo");'
+ class='classic_link'>&rdetail.extras.summary;</a>
+ </td>
+
+ <td id='rdetail_viewcn_link' class='rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("cn");'
+ class='classic_link'>&rdetail.extras.browser;</a>
+ </td>
+
+ <td id='rdetail_reviews_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("reviews");'
+ class='classic_link'>&rdetail.extras.reviews;</a>
+ </td>
+
+ <td id='rdetail_toc_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("toc");'
+ class='classic_link'>&rdetail.extras.toc;</a>
+ </td>
+
+ <td id='rdetail_excerpt_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("excerpt");'
+ class='classic_link'>&rdetail.extras.excerpt;</a>
+ </td>
+
+ <td id='rdetail_preview_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("preview");'
+ class='classic_link'>&rdetail.extras.preview;</a>
+ </td>
+
+ <td id='rdetail_anotes_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("anotes");'
+ class='classic_link'>&rdetail.extras.author.notes;</a>
+ </td>
+
+ <td id='rdetail_performer_notes_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("performer_notes");'
+ class='classic_link'>&rdetail.extras.performer.notes;</a>
+ </td>
+
+
+ <td id='rdetail_annotation_link' class='hide_me rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("annotation");'
+ class='classic_link'>&rdetail.extras.annotation;</a>
+ </td>
+
+ <td id='rdetail_viewmarc_link' class='rdetail_extras_td'
+ style='padding-right: 15px; padding-left: 15px;' >
+ <a href='javascript:rdetailShowExtra("marc");'
+ class='classic_link'>&rdetail.extras.marc;</a>
+ </td>
+
+
+ </tr>
+ </thead>
+ </table>
+
+ <div id='rdetail_extras_div' style='width: 95%;'>
+ <div id='rdetail_extras_loading' class='hide_me'
+ style='padding: 10px;'>&common.loading;</div>
+ <!--#include virtual="rdetail_copyinfo.xml"-->
+
+ <div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'>
+ <div id='rdetail_review_container'/>
+ <!--
+ <div id='rdetail_review_template' style='width: 100%;'>
+ <div name='review_header' style='width: 100%; padding: 15px; border: 1px solid #E0E0E0;'> </div>
+ <div name='review_text' style='width: 100%; padding: 15px; border: 1px solid #E0E0E0;'> </div>
+ </div>
+ -->
+ </div>
+
+ <div id='rdetail_toc_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_excerpt_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_preview_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_anotes_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_performer_notes_div' class='rdetail_extras_div hide_me'> </div>
+
+ <div id='rdetail_marc_div' class='rdetail_extras_div hide_me'>
+ <div id='rdetail_view_marc_box'> </div>
+ </div>
+
+ <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
+
+ <div id='cn_browse_none' class='hide_me color_4' style='width: 90%; text-align: center; margin: 10px;'>
+ &rdetail.extras.call.null;
+ </div>
+
+ <div id='rdetail_cn_browse_select_div'
+ style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
+ <span>&rdetail.extras.call.local; </span>
+ <select id='cn_browse_selector'>
+ </select>
+ </div>
+
+ <!--#include virtual="../common/cn_browse.xml"-->
+ </div>
+
+ <!--#include virtual="rdetail_cn_details.xml"-->
+
+ </div>
+ <!-- Text for dynamic JavaScript -->
+ <div id='rdetail_preview_full_text' class='hide_me'>&rdetail.extras.preview.fulltext;</div>
+ <div id='rdetail_preview_title' class='hide_me'>&rdetail.extras.preview.title;</div>
+ <div id='rdetail_preview_badge' class='hide_me'>&rdetail.extras.preview.badge;</div>
+</div>
Added: conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,158 @@
+
+<abbr class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+ <table id='rdetail_details_table'>
+ <tbody id='rdetail_details_tbody'>
+
+ <tr>
+ <td id='rdetail_image_cell' rowspan='20'>
+ <a id='rdetail_img_link'>
+ <img style='border: none;' id='rdetail_image'
+ onerror='
+ hideMe($("rdetail.jacket_attrib_div"));
+ hideMe($("rdetail_img_link"));'/>
+ </a>
+ <!-- vendor attribution link -->
+ <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+ <div>&opac.image_provided;</div>
+ <div><a target='_blank' href='&vendor.base_link;'
+ class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+ </div>
+ </td>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with more and/or different information. In this case, the raw MARC 245. -->
+ <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item' id='rdetail_title'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+ <td class='rdetail_item'>
+ <a title='&rdetail.author.search;' id='rdetail_author'> </a>
+ </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>
+ <td class='rdetail_item' id='rdetail_isbn'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+ <td class='rdetail_item' id='rdetail_edition'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>
+ <td class='rdetail_item' id='rdetail_pubdate'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>
+ <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item' id='rdetail_publisher'> </td>
+ </tr>
+
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>
+ <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>
+ <td class='rdetail_item'>
+ <img id='rdetail_tor_pic' class='tor_pic' />
+ <span id='rdetail_tor' style='padding-left: 5px;'> </span>
+ </td>
+ </tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>
+ <td class='rdetail_item' id='rdetail_abstract'> </td>
+ </tr>
+
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with complex information, such as new search links on subjects. -->
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>Subjects</td>
+ <td type='opac/slot-data' query='datafield[tag^=65]' class='rdetail_item'>
+ <script type='opac/slot-format'><![CDATA[
+ var cgi = new CGI();
+ var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+ var total = '';
+ var output = [];
+ var list = dojo.query( 'subfield', item );
+ for (var i =0; i < list.length; i++) {
+ total += dojox.data.dom.textContent(list[i]) + ' ';
+ var current = '<a href="rresult.xml?rt=subject&t=' + total;
+ for (var p in other_params) {
+ if (cgi.param(other_params[p]))
+ current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+ }
+ current += '">' + dojox.data.dom.textContent(list[i]) + '</a>'
+ output.push(current);
+ }
+ return '<span>' + output.join(' -- ') + '</span><br/>';
+ ]]></script>
+ </td>
+ </tr>
+
+ <tr class='hide_me' id='rdetail_online_row'>
+ <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+ *** summary screen with complex information, such as location-specific URIs (856$9). -->
+ <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;
+ <span class='hide_me' type='opac/slot-data' query='datafield[tag=856] subfield[code=9]'>
+ <script type='opac/slot-format'><![CDATA[
+ // There exists at least one localized URI. Clear all links.
+ dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+ return '';
+ ]]></script>
+ </span>
+ </td>
+ <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes > volume > uris > uri' join=", ">
+ <script type='opac/slot-format'><![CDATA[
+ var link = '<a href="' + item.getAttribute('href') + '" class="classic_link">' + item.getAttribute('label') + '</a>';
+ if (item.getAttribute('use_restriction'))
+ link += ' (' + item.getAttribute('use_restriction') + ') <br />';
+ return link;
+ ]]></script>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <!-- Empty span used for creating unAPI links -->
+ <abbr name="unapi" class="unapi-id">
+ <!-- unAPI URI goes here -->
+ </abbr>
+
+ <script language='javascript' type='text/javascript'><![CDATA[
+
+ config.ids.rdetail.details_body = 'rdetail_details_body';
+ config.ids.rdetail.title = 'rdetail_title';
+ config.ids.rdetail.author = 'rdetail_author';
+ config.ids.rdetail.isbn = 'rdetail_isbn';
+ config.ids.rdetail.edition = 'rdetail_edition';
+ config.ids.rdetail.pubdate = 'rdetail_pubdate';
+ config.ids.rdetail.publisher = 'rdetail_publisher';
+ config.ids.rdetail.tor = 'rdetail_tor';
+ config.ids.rdetail.abstr = 'rdetail_abstract';
+ config.ids.rdetail.image = 'rdetail_image';
+ config.ids.rdetail.tor_pic = 'rdetail_tor_pic';
+
+ dojo.addOnLoad( function () {
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
+ }
+
+ dojo.require('openils.BibTemplate');
+ new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+ });
+ ]]></script>
+
+</div> <!-- details_body -->
+
Added: conifer/trunk/web/opac/skin/uwin/xml/result/filtersort.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/result/filtersort.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/result/filtersort.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,20 @@
+<span>
+ &result.limit2avail;<input type='checkbox' id='opac.result.limit2avail' onclick='searchBarSubmit(true);'/>
+ <select id='opac.result.sort' onchange='searchBarSubmit(true);'>
+ <option selected='selected' value=''>&result.sort_by;</option>
+ <optgroup label='&result.sort_by.title;'>
+ <option id='opac.result.title.a2z' label='&common.a2z.titla;' value='title.asc'>&common.a2z.title;</option>
+ <option id='opac.result.title.z2a' label='&common.z2a.titla;' value='title.desc'>&common.z2a.title;</option>
+ </optgroup>
+ <optgroup label='&result.sort_by.author;'>
+ <option id='opac.result.author.a2z' label='&common.a2z.author;' value='author.asc'>&common.a2z.author;</option>
+ <option id='opac.result.author.z2a' label='&common.z2a.author;' value='author.desc'>&common.z2a.author;</option>
+ </optgroup>
+ <optgroup label='&result.sort_by.pubdate;'>
+ <option id='opac.result.pubdate.new2old' label='&common.new2old.pubdate;'
+ value='pubdate.desc'>&common.new2old.pubdate;</option>
+ <option id='opac.result.pubdate.old2new' label='&common.old2new.pubdate;'
+ value='pubdate.asc'>&common.old2new.pubdate;</option>
+ </optgroup>
+ </select>
+</span>
Added: conifer/trunk/web/opac/skin/uwin/xml/result/result_common.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/result/result_common.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/result/result_common.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,36 @@
+
+<div id='canvas_main' class='canvas' xmlns:xi="http://www.w3.org/2001/XInclude" >
+
+ <script language='javascript' type='text/javascript'>
+ 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 = 'search_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";
+ </script>
+
+ <!--#include virtual="result_table.xml"-->
+ <!--#include virtual="result_lowhits.xml"-->
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/result/result_info.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/result/result_info.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/result/result_info.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,74 @@
+<table style='width: 100%;'>
+ <tbody>
+
+ <tr class='color_4' style='height: 1em;'>
+
+ <td style='vertical-align: top;' id='next_prev_links'>
+
+ <span class='hide_me' id='result_info_div' style='font-size: 9pt;'>
+ <span> &common.results; </span>
+ <span id='offset_start'> </span>
+ <span> - </span>
+ <span id='offset_end'> </span>
+ <span> &common.ofAtLeast; </span>
+ <span id='result_count'> </span>
+ <span style='padding-left: 6px;'> (page </span>
+ <span id='current_page'> </span>
+ <span> &common.of; </span>
+ <span id='num_pages'> </span>
+ </span>
+
+ <span id='start_end_links_span' class='hide_me'
+ style='padding-left: 40px;' >
+ <a class='search_page_nav_link' id='search_home_link'
+ title="&rdetail.page.results;">&rdetail.start;</a><a class='search_page_nav_link'
+ id='prev_link' title='&rdetail.page.previous;'>«</a>
+
+ <span class='search_page_nav_link' id='page_numbers'> </span>
+
+ <a class='search_page_nav_link' id='next_link'
+ title='&rdetail.page.next;'>»</a>
+ <!--
+ <a class='search_page_nav_link'
+ id='end_link' title="&rdetail.page.last;">&rdetail.end;</a>
+ -->
+ </span>
+
+ </td>
+
+ <td colspan='5'
+ style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+ <span id='search_info_table' class='hide_me' style='font-size: 8pt;'>
+ <b>&result.info.copies; </b>
+ </span>
+ </td>
+ </tr>
+
+ <tr style='height: 2em;' id='result_thead_row'>
+ <td>
+ <div class='hide_me' id='no_formats' style='padding: 4px;'>
+ <b>
+ <span style='color:red;'>*</span>
+ &result.info.no.items;
+ <div>&result.info.format.items;</div>
+ </b>
+ </div>
+
+ <div class='hide_me' id='rresult_show_all' style='padding: 4px;'>
+ <a href='javascript:rresultExpandSearch();' id='rresult_show_all_link'
+ class='classic_link'>&result.info.show; </a>
+ </div>
+
+ <div class='hide_me' id='rresult_show_here' style='padding: 4px;'>
+ <a href='javascript:rresultContractSearch();' id='rresult_show_here_link'
+ class='classic_link'>&result.info.show; </a>
+ </div>
+
+ </td>
+ <td rowspan='2' style='font-size: 8pt; padding-top: 4px;' class='copy_count_cell'
+ width='12%' align='center' name='result_thead_ccell'> </td>
+ </tr>
+
+ </tbody>
+</table>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/result/result_lowhits.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/result/result_lowhits.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/result/result_lowhits.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,49 @@
+
+<div id='result_low_hits' class='hide_me'>
+
+ <br/><br/><br/>
+
+ <div style='text-align: center; padding-bottom: 8px;'>
+ <div id='result_low_hits_msg' class='hide_me'>&result.lowhits.few;</div>
+ <div id='result_zero_hits_msg' class='hide_me'>&result.lowhits.zero;</div>
+ </div>
+
+ <!-- spell checker -->
+ <div id='did_you_mean' class='lowhits_div hide_me'>
+ <span>&result.lowhits.did.you.mean; </span>
+ <a class='classic_link' id='spell_check_link'> </a>
+ </div>
+
+ <div id='low_hits_remove_format' class='lowhits_div hide_me'>
+ <span>&result.lowhits.formats; </span>
+ <a id='low_hits_remove_format_link' class='classic_link'>&result.lowhits.formats.search;</a>
+ </div>
+
+ <div id='low_hits_cross_ref' class='lowhits_div hide_me'>
+ <span>&result.lowhits.related;</span>
+ <div style='padding: 5px;'>
+ <a id='low_hits_xref_link' class='classic_link' style='padding-right: 5px;'> </a>
+ </div>
+ </div>
+
+ <div id='low_hits_expand_range' class='lowhits_div hide_me'>
+ <span>&result.lowhits.expand; </span>
+ <a id='low_hits_expand_link' class='classic_link' style='padding-right: 5px;'> </a>
+ </div>
+
+ <div id='low_hits_search_type' class='lowhits_div hide_me'>
+ <span>&result.lowhits.class;</span>
+ <a id='low_hits_title_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.title;</a>
+ <a id='low_hits_author_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.author;</a>
+ <a id='low_hits_subject_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.subject;</a>
+ <a id='low_hits_series_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.series;</a>
+ <a id='low_hits_keyword_search' class='hide_me classic_link'
+ style='padding-right: 5px;'>&result.lowhits.keyword;</a>
+ </div>
+
+</div>
+
Added: conifer/trunk/web/opac/skin/uwin/xml/result/result_table.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/result/result_table.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/result/result_table.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,209 @@
+<!-- Search results are spit into this table -->
+
+<div id='result_table_div' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <table id='res_table'>
+
+ <!-- for some reason, this is the only way i can force the cell widths -->
+ <thead id='result_thead'>
+ <tr>
+ <td class='result_table_pic_header'></td>
+ <td> </td>
+ </tr>
+ </thead>
+
+ <tbody id='result_table'>
+ <tr>
+
+ <td class='result_table_row'>
+ <!--#include virtual="result_info.xml"-->
+ </td>
+ </tr>
+
+ <!-- Template for displaying a search result. This row template is cloned and inserted
+ for each result returned -->
+
+ <tr id='result_table_template' class='hide_me'>
+
+ <!-- Jacket image goes here -->
+
+ <td class='result_table_row' align='left'>
+ <table class='result_table_subtable'>
+ <tbody class='result_table_subtbody'>
+
+ <tr style='height: 1em' name='counts_row'>
+
+ <td rowspan='3' class='result_table_pic_header'>
+ <a><img name='item_jacket' class='result_table_pic'/></a>
+ </td>
+
+ <td class='result_table_title_cell' name='result_table_title_cell'>
+ <!-- Title goes here -->
+ <a title="&result.table.keyword;" name='item_title' class='search_link'>
+ <!-- Title goes here -->
+ </a>
+ </td>
+
+ <!-- Copy this td for each copy count appended -->
+ <td rowspan='3' nowrap='nowrap' name="copy_count_cell" class='copy_count_cell'>
+ </td>
+
+ </tr>
+
+ <tr style='height: 1em' >
+ <td class='result_table_author_cell'>
+ <a title="&result.table.author;" name='item_author' class='search_link'>
+ <!-- Author goes here -->
+ </a>
+ <div>
+ <span name='result_table_extra_span' class='hide_me'>
+ <span name='result_table_pub_box' style='padding-left: 10px;'>
+ <span name='result_table_edition_span' style='padding-left: 10px;'></span> |
+ <span name='result_table_pub_span'> </span> |
+ <span name='result_table_phys_span'> </span>
+ </span>
+ </span>
+ </div>
+ </td>
+ </tr>
+
+ <tr style='height:1em;' >
+ <td name='result_table_format_cell' class='result_table_format_cell'>
+
+ <a name='text_link' class='search_link'>
+ <img src='../../../../images/tor/text.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='sound recording-nonmusical_link' class='search_link'>
+ <img src='../../../../images/tor/sound recording-nonmusical.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='moving image_link' class='search_link'>
+ <img src='../../../../images/tor/moving image.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='software, multimedia_link' class='search_link'>
+ <img src='../../../../images/tor/software, multimedia.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='sound recording-musical_link' class='search_link'>
+ <img src='../../../../images/tor/sound recording-musical.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='cartographic_link' class='search_link'>
+ <img src='../../../../images/tor/cartographic.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='mixed material_link' class='search_link'>
+ <img src='../../../../images/tor/mixed material.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='notated music_link' class='search_link'>
+ <img src='../../../../images/tor/notated music.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='sound recording_link' class='search_link'>
+ <img src='../../../../images/tor/sound recording.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='still image_link' class='search_link'>
+ <img src='../../../../images/tor/still images.jpg' class='dim tor_pic' />
+ </a>
+
+ <a name='three dimensional object_link' class='search_link'>
+ <img src='../../../../images/tor/three dimensional object.jpg' class='dim tor_pic' />
+ </a>
+
+ <span class='hide_me'
+ style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'>
+ <span>&common.relevancy; </span><span name='relevancy_span'> </span>
+ </span>
+
+ <span class='hide_me' name='place_hold_span'>
+ <a style='padding-left: 8px;' href='javascript:void(0);'
+ class='classic_link' name='place_hold_link'></a>
+ </span>
+
+ <!-- Empty span used for creating unAPI links -->
+ <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+ <!-- unAPI URI goes here -->
+ </abbr>
+
+ <!-- Empty span used for creating Google Book Search-->
+ <span name="googleBooksLink" class="hide_me">
+ <a style='padding-left: 8px;' class='classic_link' name="googleBooks-link"></a>
+ </span>
+
+
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+
+ <!-- ====================== -->
+ <table style='width: 100%; margin-top: 12px;' id='result_info_2' class='hide_me'>
+ <tbody>
+
+ <tr class='color_4' style='height: 1em;'>
+
+ <td style='vertical-align: top;' id='next_prev_links2'>
+
+ <span class='hide_me' id='result_info_div2' style='font-size: 9pt;'>
+ <span> &common.results; </span>
+ <b id='offset_start2'> </b>
+ <span> - </span>
+ <b id='offset_end2'> </b>
+ <span> &common.ofAtLeast; </span>
+ <b id='result_count2'> </b>
+ <span style='padding-left: 6px;'> (page </span>
+ <span id='current_page2'> </span>
+ <span> &common.of; </span>
+ <span id='num_pages2'> </span>
+ </span>
+
+ <span id='start_end_links_span2' class='hide_me'
+ style='padding-left: 40px;' >
+ <a class='search_page_nav_link' id='search_home_link2'
+ title="&rdetail.page.results;">&rdetail.start;</a><a class='search_page_nav_link'
+ id='prev_link2' title='&rdetail.page.previous;'>«</a>
+
+ <span class='search_page_nav_link' id='page_numbers2'> </span>
+ <a class='search_page_nav_link' id='next_link2'
+ title='&rdetail.page.next;'>»</a>
+ <!--
+ <a class='search_page_nav_link'
+ id='end_link2' title="&rdetail.page.last;">&rdetail.end;</a>
+ -->
+ </span>
+
+ </td>
+
+ <td colspan='5'
+ style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+ <!--
+ <span id='search_info_table2' style='font-size: 8pt;'>
+ <b>Available copies / Total copies </b>
+ </span>
+ -->
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- ====================== -->
+
+
+ <script language='javascript' type='text/javascript'>
+ config.names.result.format_cell = 'result_table_format_cell';
+ config.names.result.format_link = 'resource_link'
+ config.names.result.format_pic = 'format_pic'
+ </script>
+
+</div>
+
+
Added: conifer/trunk/web/opac/skin/uwin/xml/setenv.xml
===================================================================
--- conifer/trunk/web/opac/skin/uwin/xml/setenv.xml (rev 0)
+++ conifer/trunk/web/opac/skin/uwin/xml/setenv.xml 2009-09-29 11:23:09 UTC (rev 686)
@@ -0,0 +1,62 @@
+<!-- Sets our environment variables for convenience and determining which page we're on -->
+
+<!--#set var='OILS_PAGE' value="$DOCUMENT_NAME"-->
+
+<!--#if expr="$DOCUMENT_NAME='index.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.home'-->
+ <!--#set var='FRONT_PAGE' value='true'-->
+
+<!--#elif expr="$DOCUMENT_NAME='mresult.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.mresult'-->
+
+
+<!--#elif expr="$DOCUMENT_NAME='rresult.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.rresult'-->
+
+<!--#elif expr="$DOCUMENT_NAME='rdetail.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.rdetail'-->
+
+<!--#elif expr="$DOCUMENT_NAME='myopac.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.myopac'-->
+
+<!--#elif expr="$DOCUMENT_NAME='advanced.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.advanced'-->
+
+<!--#elif expr="$DOCUMENT_NAME='reqitems.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.reqitems'-->
+
+<!--#elif expr="$DOCUMENT_NAME='cnbrowse.xml'"-->
+ <!--#set var='OILS_TITLE' value='opac.title.cnbrowse'-->
+
+<!--#endif-->
+
+
+<!--#set var="OILS_BASE" value="http://${SERVER_NAME}/${OILS_OPAC_BASE}"-->
+<!--#set var="OILS_BASE" value="${OILS_OPAC_BASE}"-->
+<!--#set var="OILS_XML_BASE" value="${OILS_BASE}/common/xml"-->
+
+
+<!-- Javascript host -->
+<!--#if expr="$OILS_OPAC_JS_HOST"-->
+ <!--#set var="OILS_OPAC_JS_HOST" value="http://${OILS_OPAC_JS_HOST}"-->
+ <!--#set var="OILS_OPAC_JS_HOST" value=""-->
+<!--#else -->
+ <!--#set var="OILS_OPAC_JS_HOST" value="$OILS_BASE"-->
+<!--#endif -->
+<!--#set var="OILS_JS_BASE" value="${OILS_OPAC_JS_HOST}/common/js"-->
+
+
+<!--#if expr="$OILS_OPAC_CSS_HOST"-->
+ <!--#set var="OILS_OPAC_CSS_HOST" value="http://${OILS_OPAC_CSS_HOST}"-->
+ <!--#set var="OILS_OPAC_CSS_HOST" value=""-->
+<!--#else -->
+ <!--#set var="OILS_OPAC_CSS_HOST" value="$OILS_BASE"-->
+<!--#endif -->
+<!--#set var="OILS_THEME_BASE" value="${OILS_OPAC_CSS_HOST}/theme"-->
+<!--#set var="OILS_SKIN_BASE" value="${OILS_OPAC_CSS_HOST}/skin"-->
+<!--#set var="OILS_CSS_BASE" value="${OILS_OPAC_CSS_HOST}/common/css"-->
+
+
+<!--#if expr="!$locale || $locale=''"-->
+ <!--#set var="locale" value="en-US"-->
+<!--#endif-->
More information about the open-ils-commits
mailing list