From 49abf4105b231ac487abc3da2eefce1a36c7c04e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 4 Jun 2012 16:17:59 -0400 Subject: [PATCH] kcls/kpac 2.2 initial css/js integration Signed-off-by: Bill Erickson --- .../web/css/skin/default/opac/contentslider.css | 39 ++ Open-ILS/web/css/skin/default/opac/semiauto.css | 159 ++++- Open-ILS/web/css/skin/default/opac/style.css | 724 +++++++-------------- Open-ILS/web/js/ui/default/opac/contentslider.js | 235 +++++++ Open-ILS/web/js/ui/default/opac/kcls.js | 36 + 5 files changed, 686 insertions(+), 507 deletions(-) create mode 100644 Open-ILS/web/css/skin/default/opac/contentslider.css create mode 100644 Open-ILS/web/js/ui/default/opac/contentslider.js create mode 100644 Open-ILS/web/js/ui/default/opac/kcls.js diff --git a/Open-ILS/web/css/skin/default/opac/contentslider.css b/Open-ILS/web/css/skin/default/opac/contentslider.css new file mode 100644 index 0000000000..64a6d25457 --- /dev/null +++ b/Open-ILS/web/css/skin/default/opac/contentslider.css @@ -0,0 +1,39 @@ +.sliderwrapper{ +position: relative; /*leave as is*/ +overflow: hidden; /*leave as is*/ +width: 675px; /*width of featured content slider*/ +height: 213px; +} + + + +.sliderwrapper .contentdiv{ +visibility: hidden; /*leave as is*/ +position: absolute; /*leave as is*/ +left: 0; /*leave as is*/ +top: 0; /*leave as is*/ +width: 675px; /*width of content DIVs within slider. Total width should equal slider's inner width (390+5+5=400) */ +height: 100%; +filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); +-moz-opacity: 1; +opacity: 1; +} + +.pagination{ +width: 400px; /*Width of pagination DIV. Total width should equal slider's outer width (400+10+10=420)*/ +text-align: right; +background-color: navy; +padding: 5px 10px; +} + +.pagination a{ +padding: 0 5px; +text-decoration: none; +color: #00007D; +background: white; +} + +.pagination a:hover, .pagination a.selected{ +color: #000; +background-color: #FEE496; +} \ No newline at end of file diff --git a/Open-ILS/web/css/skin/default/opac/semiauto.css b/Open-ILS/web/css/skin/default/opac/semiauto.css index bb2e1145be..e4e9eb74d9 100644 --- a/Open-ILS/web/css/skin/default/opac/semiauto.css +++ b/Open-ILS/web/css/skin/default/opac/semiauto.css @@ -1,36 +1,183 @@ /* once done renaming and everything, combine with style.css */ + +/* Verfied in-use classes --------------------------- */ +.opac-auto-004 { background: #E0F0E0; } +.opac-auto-009 { border: 3px solid #E0E0E0; } +.opac-auto-010 { border-bottom: 1px dotted #ccc; padding-top: 10px; } +.opac-auto-011 { border-bottom: 1px dotted #ccc; padding-top: 6px; } +.opac-auto-012 { border-bottom: none; } +.opac-auto-013 { border-bottom: none; *height: 0px; } +.opac-auto-015 { border-left: 1px solid #e9ebf3; padding-right: 27px; } +.opac-auto-017 { border: none; width: 100%; } +.opac-auto-018 { border-top: 1px dotted #ccc; padding-top: 17px; } +.clear-both { clear: both; } +.common-no-pad { clear: both; height: 0px; margin: 0px; padding: 0px; } +.common-full-pad { clear: both; height: 15px; } +.opac-auto-029 { color: #333; font-weight: bold; font-size: 13px; } +.opac-auto-030 { color: #545454; } +.opac-auto-031 { color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300; } +.red { color: red; } +.bold-red { color: red; font-weight: bold } +.pointer { cursor: pointer; } +/* ------------------------------------------- */ + + +#lib_selector_span { display: none } +.float-left { float: left; } +.bookbag-share { float: left; padding: 5px 0; } +.bookbag-controls { float: left; padding: 5px 0px 0px 10px; } .left-corner { float: left; width: 163px; height: 30px; background: url('/images/utils-corner-mid.png') repeat-x top; } +.float-right { float: right; } +.opac-auto-045 { float: right; margin-right: 17px; } +.opac-auto-046 { float: right; width: 214px; } +.opac-auto-047 { float: right; width: 353px; background: #ccc; padding: 10px; margin-top: 7px; } +.opac-auto-048 { float: right; width: 65px; } +#they_said_dont_touch { float: right; width: 675px; height: 213px; color: green; overflow: hidden; } +.opac-auto-050 { float: right; width: 85px; } +.ten-px { font-size: 10px; } +.eleven-px { font-size: 11px; } +.eight-pt { font-size: 8pt; } +.opac-auto-054 { font-size: 8pt; padding-left: 20px; } .bold { font-weight: bold; } +.opac-auto-057 { font-weight: bold; padding: 5px; margin: 5px; width: 100%; } +.opac-auto-058 { font-weight: bold; padding-left: 10px; } +#anon_list_name { font-weight: bold; padding-right: 10px; } +.opac-auto-060 { font-weight: normal; } +.opac-auto-061 { height: 0px; border-top: 1px solid #b7b7b7; border-bottom: 1px solid #d4d4d4; margin: 15px 0px; } +.small-height { height: 10px; } .normal-height { height: 15px; } .big-height { height: 20px; } .very-big-height { height: 30px; } -#gold-links-holder { height: 24px; background: #69a088; } +#gold-links-holder { height: 24px; background: #252525; } +.opac-auto-067 { margin: 3px; width: 100%; } .big-block { margin: auto; width: 974px; height: 0px; } -.qtype_selector_margin { margin-right: 7px; } -.warning_box { margin-top: 10px; } +.opac-auto-069 { margin-bottom: 10px; } +.opac-auto-070 { margin-bottom: 20px; } +.opac-auto-071 { margin-bottom: 5px; } +.opac-auto-072 { margin-left: 20px; } +.bookbag-list { margin-left: 5px; margin-top: 5px; width: 91%; border: 0;} +#cn_browse_where { margin-left: 6px; } +.opac-auto-075 { margin-right: 20px; } +.opac-auto-076 { margin-right: 3px; } +.opac-auto-077 { margin-right: 4px; position: relative; top: -10px; } +.opac-auto-078 { margin-right: 7px; } +.opac-auto-079 { margin-top: 10px; } +.opac-auto-080 { margin-top: 10px; margin-bottom: 10px; } +.opac-auto-081 { margin-top: 13px; } +.opac-auto-082 { margin-top: 29px; } +.opac-auto-083 { margin-top: 2px; } +.opac-auto-084 { margin-top: 5px; } +.opac-auto-085 { margin-top: 6px; margin-left: 20px; width: 250px; padding: 5px; } +.opac-auto-086 { margin-top: 8px; } +.opac-auto-087 { max-width: 11em; } +.opac-auto-088 { padding: 0px; } +.opac-auto-089 { padding: 0px 10px; } +.opac-auto-090 { padding: 10px; } +.opac-auto-091 { padding: 10px 0px; } +.opac-auto-092 { padding: 4px; text-align: center; } .pad-bottom-five { padding: 5px; } -.item_list_padding { padding: 8px 0px 6px 0px; border: 0; } +.opac-auto-094 { padding: 5px 7px 0px 0px; } +.opac-auto-095 { padding: 5px 7px 0px 0px; white-space: nowrap; } +.opac-auto-096 { padding: 6px } +.opac-auto-097 { padding: 8px 0px 6px 0px; width: 100%; border: 0; } +.opac-auto-097b { padding: 8px 0px 6px 0px; border: 0; } +.opac-auto-098 { padding-bottom: 10px; } +.opac-auto-099 { padding-bottom: 12px; color: #666; } +.opac-auto-100 { padding-bottom: 16px; } +.opac-auto-101 { padding-bottom: 1px; } .opac-auto-102 { padding-bottom: 7px; } +.opac-auto-103 { padding-left: 10px; } +.opac-auto-104 { padding-left: 11px; padding-right: 11px; } +.opac-auto-105 { padding-left: 11px; padding-right: 13px; } +.opac-auto-106 { padding-left: 15px; } +.opac-auto-107 { padding-left: 15px; padding-bottom: 10px; } .opac-auto-108 { padding-left: 5px; } +.opac-auto-109 { padding-left: 5px; padding-bottom: 10px; } +.opac-auto-110 { padding-left: 6px; } +.opac-auto-111 { padding-left: 8px; } +.opac-auto-112 { padding-left: 9px; } +.opac-auto-113 { padding-right: 10px; } +.opac-auto-114 { padding-right: 15px; padding-left: 15px; } +.opac-auto-115 { padding-right: 20px; } +.opac-auto-116 { padding-right: 5px; } +.opac-auto-117 { padding-right: 7px; } .pad-top-ten { padding-top: 10px; } +.opac-auto-119 { padding-top: 14px; } +.opac-auto-120 { padding-top: 5px; } .opac-auto-121 { padding-top: 6px; } +.opac-auto-122 { padding-top: 7px; } +.opac-auto-123 { padding-top: 8px; } +.pos-abs { position: absolute; } +#new_cat_link_holder { position: absolute; z-index: 101; } #new_cat_link_holder a { display: block; width: 675px; height: 213px; } .pos-rel { position: relative; } #search-box table { position: relative; left: -10px; } +.opac-auto-129 { position: relative; left: -19px; } +.opac-auto-130 { position: relative; left: 80px; } +.opac-auto-131 { position: relative; top: 0px; left: 55px; } +.opac-auto-132 { position: relative; top: 13px; } +.opac-auto-133 { position: relative; top: -13px; left: 2px; font-size: 10px; } +.opac-auto-134 { position: relative; top: -15px; left: 172px; } +.opac-auto-135 { position: relative; top: -15px; left: -23px; } +.opac-auto-136 { position: relative; top: 161px; left: 172px; } +.opac-auto-137 { position: relative; top: 161px; left: -23px; } #home_adv_search_link { position: relative; top: -1px; left: 10px; } #util_back_btn { position: relative; top: 1px; left: 10px; } +.opac-auto-140 { position: relative; top: -2px; } #util_help_btn { position: relative; top: 2px; left: 40px; } #util_forw_btn { position: relative; top: 2px; left: 50px; } +.opac-auto-143 { position: relative; top: -3px; } #util_home_btn { position: relative; top: 3px; left: 20px; } +.opac-auto-145 { position: relative; top: -3px; left: 3px; } +.opac-auto-146 { position: relative; top: -3px; left: -5px; } +.opac-auto-147 { position: relative; top: -5px; } .pos-rel-top-5 { position: relative; top: 5px; } +.opac-auto-149 { position: relative; top: 5px; left: 25px; } #util_print_btn { position: relative; top: 5px; left: 30px; } +.opac-auto-151 { position: relative; top: 75px; } +#adv_reset { position: relative; top: -9px; } +.opac-auto-153 { position: relative; z-index: 100; } +.text-center { text-align: center; } +.opac-auto-156 { text-align: center; font-weight: bold; } #adv_quick_search_sidebar { text-align: center; margin-top: 20px; width: 400px; } +.opac-auto-158 { text-align: center; margin-top: 6px; margin-bottom: 6px } +.opac-auto-159 { text-align: center; padding: 20px; width: 100% } +.opac-auto-160 { text-align: center; padding-bottom: 8px; } .opac-auto-161 { text-align: right; padding-right: 7px; width: 62px; } +.opac-auto-162 { vertical-align: top; } .nowrap { white-space: nowrap; } .opac-auto-164 { white-space: nowrap; padding-left: 5px; } .full-width { width: 100%; } +.opac-auto-167 { width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px; } +.opac-auto-168 { width: 100%; border: 2px solid #E0F0E0; margin-bottom: 20px; } +.opac-auto-169 { width: 100%; height: 100%; } +.opac-auto-170 { width: 100%; margin-top: 20px; border-top: 1px dotted #ccc; padding-top: 8px; } +.opac-auto-171 { font-size: 120%; text-align: center; font-style: italic; } +.opac-auto-172 { width: 100%; text-align: center; padding-bottom: 5px; } +.opac-auto-173 { width: 10px; } +.opac-auto-174 { width: 111px; height: 25px; } +.opac-auto-175 { width: 125px; height: 21px; } +.opac-auto-176 { width: 129px; } #search_box { width: 162px; } -.selector_actions_for_list { width: 175px; margin-right: 11px; } -.selector_actions_for_list_inner_option { margin-left: 2em; } /* XXX ".opac-auto-179 optgroup option" doesn't work!? */ +.opac-auto-178 { width: 174px; } +.opac-auto-179 { width: 175px; margin-right: 11px; } +.opac-auto-179 optgroup { margin-left: 1em; font-weight: normal; font-style: italic; } +.opac-auto-179-inner-option { margin-left: 2em; } /* XXX ".opac-auto-179 optgroup option" doesn't work!? */ +.opac-auto-180 { width: 182px; color: black; padding: 5px 25px; } +.opac-auto-181 { width: 195px; } +.opac-auto-182 { width: 230px; text-align: left; margin-top: 3px; } +.opac-auto-183 { width: 250px; text-align: left; } +.opac-auto-184 { width: 26px; height: 23px; margin-top: 6px; margin-bottom: 6px; } +.opac-auto-185 { width: 324px; } +.opac-auto-186 { width: 400px; margin-top: 20px; } +.opac-auto-187 { width: 662px; } +.opac-auto-188 { width: 700px; height: 30px; border: 1px solid red; } +.opac-auto-189 { width: 742px; float: left; } +.opac-auto-190 { width: 88px; } +.opac-auto-191 { width: 90px; } #cn_browse_div > div { width: 90%; text-align: center; margin: 10px; } +.opac-auto-193 { width: 91px; } #cn_browse { width: 95%; text-align: center; padding: 15px; } +.opac-auto-195 { width: 99%; text-align: center } +#homesearch_thing { width: 664px; height: 117px; background: #bda964; } +#mystery_thing { width: 664px; height: 35px; background: #ffffff; } diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 0a33df78f1..bd720997d8 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -2,35 +2,33 @@ body { margin:0; font-family: Arial, Helvetica, sans-serif; font-size: 12px; - background: #00593d; + background:#333; } img { border: none; } -#topnav_logo { - padding-bottom: 25px; -} - -#homesearch_main_logo { - padding-top: 60px; +a { + color: #003399; + text-decoration: none; } -a { - color: #00593d; +a:hover { + text-decoration: underline; } #search-wrapper input[type=text] { + border:none; margin:0; padding:0; } -#search-wrapper select, .results_header_lbl select { +#search-wrapper select { border:1px solid #e9ebf3; margin:0; padding:0; - width: 12em; + width:168px; } /* @@ -54,7 +52,9 @@ h1 { } h2 { - font-size: 16px; + margin:0; + margin-bottom: 5px; + font-size: 14px; font-weight:bold; } @@ -84,40 +84,21 @@ div.select-wrapper:hover { } #dash_wrapper { - position: relative; - top: -2em; -} - -#dash_wrapper div { - position: relative; - vertical-align: middle; - background: #00593d; - border-radius: 5px; - height: 3em; - padding: 0em 1em 0em 1em; -} - -span.dash_divider { - margin: 0em 1em 0em 1em; - position: relative; - top: 10px; - color: #007a54; + width:500px; + position:relative; + top:-26px; } #dashboard { clear:both; float:right; - margin-top: 1em; - background: #00593d; - border-radius: 5px; - height: 3em; + width:384px; } -#dashboard span.dash-align a { - font-weight: bold; - text-decoration: none; - position: relative; - top: 10px; +#dashboard span { + font-weight:bold; + position:relative; + left:-1px; } #dash_user { @@ -127,23 +108,46 @@ span.dash_divider { top: 10px; } +#dash_corner_mid1a { + vertical-align: top; + background: url('/images/dash-corner-mid1.png') repeat-x; + padding-left: 8px; +} +#dash_corner_mid1b { + background: url('/images/dash-corner-mid1.png') repeat-x; + padding: 0px 8px 0px 10px; +} +#dash_corner_mid1b img { position: relative; top: -1px; } +#dash_corner_mid1c { + background: url('/images/dash-corner-mid1.png') repeat-x; + vertical-align: top; +} +#dash_corner_mid2a { + vertical-align: top; + width: 372px; + background: url('/images/dash-corner-mid2.png') repeat-x; +} +.dash-pos-out { position: relative; left: 3px; } +.dash-pos-holds { position: relative; left: 100px; } +.dash-align-out { text-align: right; width: 86px; } +.dash-align-holds { text-align: right; width: 62px; } +.dash-pos-pickup { position: relative; left: 170px; } +.dash-align-pickup { text-align: right; width: 111px; } +.dash-pos-fines { position: relative; left: 284px; } +.dash-align-fines { text-align: right; width: 76px; } +.pos-rel-top4 { position: relative; top: 4px; } +#dash_number_row { position: relative; top: 6px; } #logout_link { left: 1px; } #dash_checked { color: #ffcc33; } #dash_holds { color: #ffcc33; } #dash_pickup { color: #1dd93c; } #dash_fines { color: #f41d36; } -#header-wrap { - background: linear-gradient(#00593d, #007a54); - background: -moz-linear-gradient(#00593d, #007a54); - background: -o-linear-gradient(#00593d, #007a54); - background: -webkit-linear-gradient(#00593d, #007a54); - background-color: #007a54; -} #header { color: #fff; - padding-top: 26px; - margin-left: 1em; + padding: 26px 0px 26px 0px; + width: 974px; + margin: auto; font-size:11px; } @@ -157,7 +161,7 @@ span.dash_divider { } #header-links { - color: white; + color: #afafaf; font-size: 11px; font-weight: bold; position: relative; @@ -166,16 +170,14 @@ span.dash_divider { } #header-links a { - color: white; + color: #afafaf; display: block; float:left; margin-right:22px; - text-decoration: none; } #header-links a:hover { color: white; - text-shadow: 0 0 0.2em #00593d, 0 0 0.2em #00593d; text-decoration: none; } @@ -199,22 +201,20 @@ span.dash_divider { } #gold-links { - margin-left: 1em; + margin:auto; + width:974px; padding-left:0px; } #gold-links-home { margin:auto; + width:694px; padding-left:0px; } -#gold-links-holder { - height: 24px; - background: #252525; -} - #util-bar { - margin-left: 1em; + margin:auto; + width:974px; padding-left:0px; height:0px; } @@ -225,8 +225,10 @@ span.dash_divider { background: white; } -.search_box_wrapper { - padding: 1px 1px 1px 3px; +#search_box_wrapper { + border:1px solid #e9ebf3; + padding: 1px; + padding-left: 3px; } #search-wrapper #breadcrumb { @@ -251,7 +253,8 @@ span.dash_divider { } #search-wrapper #search-box { - margin-left: 1em; + width:974px; + margin:auto; padding-left: 0px; } @@ -270,143 +273,130 @@ span.dash_divider { color: white; font-size: 10px; } - -#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #acct_holds_tabs, #acct_prefs_tabs, #results_header_inner{ - height: 40px; - margin-left: 1em; +#adv_search_tabs { + height:33px; + width:974px; + margin:auto; } -#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a, #acct_holds_tabs a, #acct_prefs_tabs a { - float: left; - text-align: center; - vertical-align: middle; - display: block; - margin: 10px 7px 10px 0px; - padding: 10px 0px 10px 0px; - -moz-border-radius: 10px 10px 0px 0px; - border-radius: 10px 10px 0px 0px; - font-weight: bold; - color: white; - background: #69A088; - font-weight: bold; - text-decoration: none; +#adv_search_tabs a { + float: left; + display: block; + height:33px; + margin-right:7px; } -#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a { - padding: 1em 1em 0.5em; +#adv_search { + width:156px; + background:url('/images/adv_search_off.gif') no-repeat bottom; } - -#adv_search_tabs a:hover, #acct_tabs a:hover, #acct_fines_tabs a:hover, #acct_checked_tabs a:hover, #acct_holds_tabs a:hover, #acct_prefs_tabs a:hover { - background: #00593d; - color: white; - text-decoration: none; +#adv_search.on { + background: url('/images/adv_search_on.gif') no-repeat bottom !important; } -#adv_search.on, #num_search.on, #expert_search.on { - color: #333333; - background: white; - text-decoration: none; +#num_search { + width:156px; + background:url('/images/num_search_off.gif') no-repeat bottom; } - -#adv_search_tabs a.acct-tab-on, #acct_tabs a.acct-tab-on, #acct_fines_tabs a.acct-tab-on { - color: #333333; - background: white; - text-decoration: none; +#num_search.on { + background: url('/images/num_search_on.gif') no-repeat bottom !important; } -.acct-tab-off { - background: #69A088; +#expert_search { + width:156px; + background:url('/images/expert_search_off.gif') no-repeat bottom; } - -#acct_checked_tabs a, #acct_holds_tabs a, #acct_prefs_tabs a { - margin-top: 0px; - font-size: 10px; - color: #333333; - padding: 10px 10px 10px 10px; +#expert_search.on { + background: url('/images/expert_search_on.gif') no-repeat bottom !important; } -#acct_checked_tabs div.selected a, #acct_holds_tabs div.selected a, #acct_prefs_tabs div.selected a { - background: #e1e1e1; - color: #333333; +#acct_tabs, #acct_fines_tabs { + height:33px; + width:974px; + margin:auto; } -#acct_checked_tabs, #acct_holds_tabs, #acct_prefs_tabs { - padding-bottom: 12px; - color: #666; +#acct_tabs a, #acct_fines_tabs a { + float: left; + display: block; + height:33px; + margin-right:7px; } -#rdetail_header { - padding: 5px 7px 6px 0px; - margin-left: 1em; - border-bottom: 1px dotted #ccc; +.acct-tab { + background-repeat: no-repeat; + background-position: bottom; + width:156px; } -#rdetail_results a { - color:#007a54; - font-weight:bold; - font-size: 1.2em; +.acct-main-off { + background-image:url('/images/acct_summary_off.gif'); } - -#rdetail_result_count { - color: black; - font-weight: normal; - padding-left: 1em; - display: inline-block; +.acct-main-on { + background-image:url('/images/acct_summary_on.gif'); } -#rdetail_result_nav { - font-weight:normal; - padding-left: 1em; - display: inline-block; +.acct-circs-off { + background-image:url('/images/acct_checked_out_off.gif'); +} +.acct-circs-on { + background-image:url('/images/acct_checked_out_on.gif'); } -#rdetail_details_table { - margin-top: 15px; +.acct-holds-off { + background-image:url('/images/acct_holds_off.gif'); +} +.acct-holds-on { + background-image:url('/images/acct_holds_on.gif'); } -#rdetail_image { border: none; } -#rdetail_image_cell { - padding-top: 3px; - padding-right: 10px; +.acct-prefs-off { + background-image:url('/images/acct_prefs_off.gif'); +} +.acct-prefs-on { + background-image:url('/images/acct_prefs_on.gif'); } -h2.rdetail_uris { - margin-top: 1em; +.acct-lists-off { + background-image:url('/images/acct_lists_off.gif'); } -div.rdetail_uris { - padding: 0.5em 1em 0.5em 1em; - background-color: lightGray; +.acct-lists-on { + background-image:url('/images/acct_lists_on.gif'); } -div.rdetail_uris ul li { - position: relative; - left: 1em; + +#rdetail_header { + font-size:14px; + font-weight:bold; + color:#074079; + padding: 5px 7px 6px 0px; + border-bottom: 1px dotted #ccc; } -div.rdetail_show_copies { - margin-top: 1em; +#rdetail_result_count { + color: black; + font-size: 11px; + font-weight: normal; + padding-left: 10px; } -div#rdetail_actions_div { - float: right; - background: white; +#rdetail_result_nav { + float:right; + font-size: 11px; + font-weight:normal; } -span#rdetail_copy_counts { - display: inline-block; - border-right: thin; - vertical-align: top; - margin-right: 1em; - padding-right: 1em; +#rdetail_details_table { + margin-top: 15px; } -span#rdetail_hold_counts { - display: inline-block; - vertical-align: top; +#rdetail_title { + font-size: 18px; } -#rdetail_image_div { - float: left; - margin-right: 1em; +#rdetail_image { border: none; } +#rdetail_image_cell { + padding-top: 3px; + padding-right: 10px; } .rdetail_aux_utils { @@ -416,24 +406,6 @@ span#rdetail_hold_counts { padding-right: 70px; } -div.place_hold { - border-bottom: 1px dotted #ccc; - padding-top: 10px; -} - -span.place_hold { - position:relative; - top:-3px; - left:3px; -} - -div.toggle_list { padding-top: 6px; } - -div.format_icon { - float: right; - margin-right: 17px; -} - .results_aux_utils { border-left:1px dotted #ccc; padding-left: 17px; @@ -441,42 +413,26 @@ div.format_icon { padding-right: 50px; } -.result_util { - border-bottom: 1px dotted #ccc; - padding-top: 6px; -} - -.results_reviews { - position: relative; - top: -5px; -} - -#rdetail_copies { - padding-top: 1.5em; -} - #rdetails_status td, #rdetails_status2 td { white-space:nowrap !important; padding: 7px 0px 3px 13px; } -#rdetails_status thead th { +#rdetails_status thead td { background-color: #d8d8d8; padding: 13px 0px 13px 13px; font-size: 10px; text-transform: uppercase; font-weight: bold; - text-align: left; } #rdetails_status tbody td { - padding-left: 13px; - text-align: left; + padding-left: 13px;; } .rdetail_extras { height: 29px; - background: #417860; + background: #9ad0f1; padding-top:1px; margin-bottom: 10px; margin-top: 10px; @@ -502,7 +458,6 @@ div.format_icon { position: relative; top: -4px; left: 7px; - color: white; } #paginate-homebanner a.toc { @@ -540,7 +495,8 @@ div.format_icon { #hp-buttons { margin: auto; margin-top: 6px; - margin-left: 1em; + /*width: 694px;*/ + width: 974px; } #hp-welcome { @@ -565,7 +521,9 @@ div.format_icon { } #hp-banner { - margin-left: 1em; + margin: auto; + /*width: 694px;*/ /* formerly 974px */ + width: 974px; height: 213px; } @@ -589,6 +547,7 @@ div.format_icon { } #hp-ql-bottom { + width: 640px; height: 31px; padding-left: 24px; padding-top: 13px; @@ -621,21 +580,8 @@ div.format_icon { .content-wrapper-record-page { top: -15px; position: relative; } -#main-content-home { - padding-left: 17px; - margin-left: 1em; -} -#main-content { - padding-left: 0px; - margin-left: 1em; -} - -#main-content-after-bar { - margin-left: 1em; - padding-left: 4px; -} - -#results-side-bar { float: left; width: 174px; margin-right: 5px; background: white; } +#main-content-home { width: 974px; margin: auto; padding-left: 0px; } +#main-content { width: 974px; margin:auto; padding-left: 0px; } #main-content .login_boxes { border: 1px solid #dedede; @@ -673,6 +619,7 @@ div.format_icon { } #home-buttons-inner { + width:664px; height:117px; background:#bda964; } @@ -685,14 +632,24 @@ div.format_icon { margin:0; } + + + #results_header_bar { background: #929292; border-top:1px solid #8b8b8b; } #results_header_inner { - height: 32px; - padding-top:6px; + height:32px; + width:974px; + margin:auto; + padding-top:6px; +} + +.results_header_btns { + float:left; + margin-right: 6px; } .cached_list_div { width: 111px; height: 25px; } @@ -711,13 +668,16 @@ div.format_icon { float: left; font-size: 11px; color: #191919; - background: #929292; + position: relative; + top: 5px; margin-right: 6px; } .results_header_sel { /* width: 88px; */ float:left; + position: relative; + top: 2px; margin:0; } @@ -729,61 +689,40 @@ div.format_icon { .results_header_nav1 .h1 { font-size:14px; font-weight:bold; - color:#007a54; + color:#074079; } .start_end_links_span { font-size: 11px; } -#result_table_div { - margin-top: 1em; -} - -tr.result_table_row > td.results_row_count, -tr.result_table_row > td.result_table_pic_header, -tr.result_table_row > td.result_table_title_cell { - vertical-align: top; -} - -tr.result_table_row:nth-child(n+2) > td { - border-top: 1px solid #d4d4d4; +.nav_arrow_fix { + font-size:8px; + position:relative; + top:-1px; } -tr.result_table_row > td.result_table_pic_header { - white-space: nowrap; - width: 78px; - padding-left: 1em; +#result_table_div { + margin-top: 20px; } .result_numbers { font-size: 11px; padding-left:15px; white-space: nowrap; width: 320px; } -.result_table_subtable { - width: 100%; - padding-top: 1em; -} +.result_table_subtable { width: 100%; border-collapse: collapse; border: 0; } -div.result_table_utils_cont { - width: 250px; - text-align:left; -} -div.result_table_utils { - float: right; -} -div.result_place_hold { - position: relative; - top: -3px; - left:3px; -} .icon_text { text-transform:capitalize; } +.result_table_title_cell { + padding-left: 7px; +} + #myopac_summary_div p { margin:0; margin-bottom: 10px; @@ -793,8 +732,7 @@ div.result_place_hold { padding-bottom:5px; } -.zero_search_hits_main { float:left; width:300px; margin-top: 2ex; } -.zero_search_hits_saved { float:left; width:200px; margin-top: 2ex; margin-right: 2em; } +#zero_search_hits div { float:left;width:300px;margin-top:20px; } #zero_search_hits p { margin-top:0; @@ -840,7 +778,7 @@ div.result_place_hold { height:22px; font-size:14px; font-weight:bold; - color:#007a54; + color:#074079; padding: 0px 7px 0px 0px; border-bottom: 1px dotted #ccc; } @@ -852,6 +790,7 @@ div.result_place_hold { .acct_sum_row { padding: 7px 15px; + width: 712px; background: #f0f0f0; margin-bottom: 2px; font-size: 10px; @@ -938,7 +877,8 @@ div.result_place_hold { } #myopac_tabs, #adv_search_parent, #fines_payments_wrapper { - background: #007a54; + background: #929292; + border-top:1px solid #8b8b8b; padding-top:5px; margin-bottom:20px; } @@ -1003,28 +943,19 @@ div.result_place_hold { .facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; } */ -div.facet_sidebar { - float: left; - border-right: 1px solid #F3F3F3; - margin-right: 1em; -} - .facet_box_temp { padding-bottom:3px; - width: 15em; + width:180px; overflow:hidden; } .facet_box_temp .header { + width:180px; height:31px; overflow:hidden; - background:#00593d; - -moz-border-top-left-radius: 5px; - border-top-left-radius: 5px; - -moz-border-top-right-radius: 5px; - border-top-right-radius: 5px; + background:url('/images/facet_box_bg.png') no-repeat; font-weight:bold; - color:white; + color:#074079; padding-top:4px; } @@ -1032,6 +963,7 @@ div.facet_sidebar { float:left; padding-top:6px; padding-left:12px; + width:134px; overflow:hidden; } @@ -1048,7 +980,7 @@ div.facet_sidebar { } .facet_box_wrapper .box_wrapper .box { - width: 14em; + width:166px; border-top:1px solid #7ebee5; border-left:1px solid #f3f3f3; border-right:1px solid #f3f3f3; @@ -1080,34 +1012,27 @@ div.facet_sidebar { background-color: #d7d7d7; } -.facet_border { - border-left: 1px solid #e9ebf3; - padding-right: 0.5em; -} - #footer-wrap { - background: linear-gradient(#007a54, #00593d); - background: -moz-linear-gradient(#007a54, #00593d); - background: -o-linear-gradient(#007a54, #00593d); - background: -webkit-linear-gradient(#007a54, #00593d); - background-color: #00593d; + background: linear-gradient(lightGreen, #252525); + background: -moz-linear-gradient(lightGreen, #252525); + background: -o-linear-gradient(lightGreen, #252525); + background: -webkit-linear-gradient(lightGreen, #252525); + background-color: lightGreen; } #footer { padding-top:5px; padding-bottom: 10px; - margin-left: 1em; + color: white; + margin: auto; + width: 974px; + color: #afafaf; font-size: 11px; } #footer a { color: white; - text-decoration: none; - text-shadow: 0 0 0.2em #00593d, 0 0 0.2em #00593d; -} - -#copyright_text, #footer_logo { - color: white; + color: #afafaf; } .color_4 { @@ -1121,6 +1046,12 @@ div.facet_sidebar { #adv_global_input_table select { width: 7em; } .adv_adv_link { font-size: 8pt; color: red; } #acct_prefs_header { float: left; } +#limit_to_available { + float: left; position: relative; top: 2px; + left: -2px; margin-right: 4px; +} +#rdetail_copy_info_table { font-size: 8pt; } +#rdetail_copy_info_table td { padding: 3px; } .search_page_nav_link { cursor: pointer; } #opac.result.sort { width: 160px; } .renew-summary { font-size: 125%; font-style: italic; margin: 0.5ex 0; } @@ -1134,7 +1065,7 @@ div.facet_sidebar { .row-remover { position: relative; top: 1px; vertical-align: middle; } .subtle-button { background-color: #ffffff; - color: #00593d; text-decoration: none; + color: #003399; text-decoration: none; font-size: 12px; padding: 0; border: 0; margin: 0; vertical-align: middle; @@ -1156,7 +1087,6 @@ a.dash-link:hover { text-decoration: underline !important; } } .list-create-table-buttons input[type=image] { margin-top: 2px; } .result_table_format_cell { padding: 0px 10px; text-align: center; } -.results_row_count { font-weight: bold; } #hold_editor h1 { font-size: 120%; font-weight: bold; } #hold_editor h2 { font-size: 111%; font-weight: normal; text-indent: 2em; font-style: italic; } #hold_editor h1, #hold_editor h2 { margin: 2px 0; } @@ -1168,7 +1098,6 @@ a.dash-link:hover { text-decoration: underline !important; } .hold-editor-controls a { padding-left: 2em; } .text-right { text-align: right; } -.text-right-top { text-align: right; vertical-align: top; } .rdetail-author-div { padding-bottom: 10px; } .invisible { visibility: hidden; } @@ -1190,60 +1119,6 @@ a.dash-link:hover { text-decoration: underline !important; } .big-strong {font-weight: bold; font-size: 120%; } -.results_header_btns, .results_header_sel { - float:left; - margin-right: 6px; - height: 26px; -} - -.opac-button, .results_header_btns, #simple-detail-view-links { - color: #FBF9F9; - font-weight: bold; - text-decoration: none; - text-shadow: 1px 1px 1px #555555; - cursor: pointer !important; - -moz-border-radius: 5px; - border-radius: 5px; - border: 1px solid #007a54; - background: linear-gradient(#007a54, #00593d); - background: -moz-linear-gradient(#007a54, #00593d); - background: -o-linear-gradient(#007a54, #00593d); - background: -webkit-linear-gradient(#007a54, #00593d); - background-color: #00593d; -} - -.opac-button-header { - background: #69A088; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); -} - -.results_header_btns a, #simple-detail-view-links a { - margin: 10px; - padding: 5px 10px 5px 10px; - color: white; - vertical-align: middle; - display: table-cell; -} - -a.opac-button:hover, .results_header_btns a:hover, #simple-detail-view-links a:hover { - background: #00593d; - text-decoration: none; -} - -a.opac-button { - margin: 10px; - padding: 5px 10px 5px 10px; -} - -#dash_wrapper .opac-button { - position: relative; - top: 10px; -} - -#myopac_checked_div { - padding: 0px; -} - .rdetail-mfhd-head { margin-top: 5px; padding-top: 5px; @@ -1259,175 +1134,22 @@ a.opac-button { width: 100%; } -#rdetail_record_details { - clear: both; - margin-top: 1em; +#myopac_checked_div { + padding: 0px; } -.rdetail_subject_type { - vertical-align: top; - font-weight: bold; -} .bookbag-item-row td { vertical-align: top; } .error { color: red; font-weight: bold; } .success { color: green; font-weight: bold; } -.rdetail_related_subjects { - margin-top: 1.5em; -} - -.rdetail_related_series { - margin-top: 1.5em; -} - -#rdetail_openurl { - margin-top: 1em; -} - -.rdetail_openurl_entry { - margin-left: 1em; - padding-left: 1em; -} -.bookbag-controls-holder { width: 100%; } -.bookbag-controls-holder:nth-child(odd) { background-color: #d7d7d7; } -.bookbag-controls-holder:nth-child(even) { background-color: #e3e3e3; } -.bookbag-controls-holder .most { - padding-left: 0; - margin-right: 5em; -} -h2.bookbag-name { margin-bottom: 0em; padding-bottom: 0em; } -.bookbag-share .fixed { min-width: 4em; } -.bookbag-specific { margin-left: 1em; } -.bookbag-specific div.sort { float: left; width: 45%; text-align: left; } -.bookbag-specific div.meta { float: right; width: 54%; text-align: right; } -#bbag-name-desc-form tr th { vertical-align: middle; } -#bbag-name-desc-form .saver { vertical-align: middle; text-align: center; } -.bookbag-description { - padding-top: 0em; - font-style: italic; - max-width: 40em; -} -#bbag-edit-description { width: 20em; } -#bbag-edit-name { width: 20em; } -textarea { font-family: sans-serif; } -table.bookbag-specific { - border-right: 1px solid #999; - border-bottom: 1px solid #666; - margin-bottom: 2ex; -} -.bookbag-share { - float: left; - padding: 5px 0; -} -.bookbag-controls { - float: left; - padding: 5px 0px 0px 10px; -} - -.bookbag-specific td.list_checkbox { - padding-left: 10px !important; -} -.bookbag-specific td.list_entry { - min-width: 10em; - padding-left: 5px !important; -} -.bookbag-specific td.list_actions { - white-space: nowrap !important; -} - -.list_is_empty { - padding: 8px 0px 6px 0px; - width: 100%; - border: 0; +#login-failed-message { + color: red; + font-weight: bold; font-size: 120%; - text-align: center; - font-style: italic; -} -.save-notes { padding-bottom: 1.5ex; } - -/* Moved from semiauto.css */ -.adv_global_input_container { border-bottom: none; } -.opac-auto-013 { - border-bottom: none; - *height: 0px; -} -.adv_global_filter_sort { - border: none; - width: 100%; -} -.clear-both { clear: both; } -.common-no-pad { - clear: both; - height: 0px; - margin: 0px; - padding: 0px; -} -.common-full-pad { - clear: both; - height: 15px; -} -.alert { color: red; } -.float-left { float: left; } -.float-right { float: right; } - -.saved-searches-header { width: 100%; font-weight: bold; font-size: 120%; } -.saved-searches-header .button { float: right; width: 28px; } -.saved-searches-header .text { float: left; padding-right: 1em; margin: 0.5ex 0;} -.saved-searches-header {font-weight: bold; font-size: 120%; } -.saved-searches { border-bottom: 1px solid #666; padding-right: 1em; } -#staff-saved-search { /* wraps .saved-searches-header and .saved-searches on the record page */ - border-right: 1px solid #333; + padding-top: 15px; } .result_item_circulated { padding-top: 4px; } - -.result_item_circulated span { - position: relative; - top:-3px; - left:3px; -} - -#search-only-bookbag-container { margin: 2ex 0; font-weight: bold; } -#result-bookbag-heading { text-align: center; margin: 2ex; } - -.result-bookbag-name { font-size: 140%; font-weight: bold; } -.result-bookbag-description { font-size: 120%; font-style: italic; } -.result-bookbag-item-note { font-style: italic; } -.lowhits-bookbag-name { font-weight: bold; } -.oils_AS { font-weight: bold; color: #c00; } -.oils_AS_match_term { text-align: left; color: #000; } -.oils_AS_match_field { - font-size: 75%; padding: 0.65em 0; - text-align: right; color: #666; -} -table.result_holdings_table { - margin-top: 1em; - margin-bottom: 1em; -} -table.result_holdings_table thead tr { - background: #D8D8D8; -} -table.result_holdings_table thead tr th { - font-weight: bold; -} -span.preflib { - margin: 0 2em 0 2em; -} -a.preflib_change { - vertical-align: super; - font-size: smaller; - line-height: normal; - text-decoration: none; -} -.rdetail-holding-group { margin-left: 1.5em; } -.rdetail-holding-group span { margin-left: 1.5em; } -.rdetail-holding-group .paging { margin-left: 1.5em; } -#rdetail_deleted_exp { - font-weight: bold; - padding: 1em; - margin: 1em; - border: thick solid red; -} diff --git a/Open-ILS/web/js/ui/default/opac/contentslider.js b/Open-ILS/web/js/ui/default/opac/contentslider.js new file mode 100644 index 0000000000..4231e80911 --- /dev/null +++ b/Open-ILS/web/js/ui/default/opac/contentslider.js @@ -0,0 +1,235 @@ +//** Featured Content Slider script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com. +//** May 2nd, 08'- Script rewritten and updated to 2.0. +//** June 12th, 08'- Script updated to v 2.3, which adds the following features: + //1) Changed behavior of script to actually collapse the previous content when the active one is shown, instead of just tucking it underneath the later. + //2) Added setting to reveal a content either via "click" or "mouseover" of pagination links (default is former). + //3) Added public function for jumping to a particular slide within a Featured Content instance using an arbitrary link, for example. + +//** July 11th, 08'- Script updated to v 2.4: + //1) Added ability to select a particular slide when the page first loads using a URL parameter (ie: mypage.htm?myslider=4 to select 4th slide in "myslider") + //2) Fixed bug where the first slide disappears when the mouse clicks or mouses over it when page first loads. + +var featuredcontentslider={ + +//3 variables below you can customize if desired: +ajaxloadingmsg: '', +bustajaxcache: true, //bust caching of external ajax page after 1st request? +enablepersist: true, //persist to last content viewed when returning to page? + +settingcaches: {}, //object to cache "setting" object of each script instance + +jumpTo:function(fcsid, pagenumber){ //public function to go to a slide manually. + this.turnpage(this.settingcaches[fcsid], pagenumber) +}, + +ajaxconnect:function(setting){ + var page_request = false + if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken) + try { + page_request = new ActiveXObject("Msxml2.XMLHTTP") + } + catch (e){ + try{ + page_request = new ActiveXObject("Microsoft.XMLHTTP") + } + catch (e){} + } + } + else if (window.XMLHttpRequest) // if Mozilla, Safari etc + page_request = new XMLHttpRequest() + else + return false + var pageurl=setting.contentsource[1] + page_request.onreadystatechange=function(){ + featuredcontentslider.ajaxpopulate(page_request, setting) + } + document.getElementById(setting.id).innerHTML=this.ajaxloadingmsg + var bustcache=(!this.bustajaxcache)? "" : (pageurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime() + page_request.open('GET', pageurl+bustcache, true) + page_request.send(null) +}, + +ajaxpopulate:function(page_request, setting){ + if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){ + document.getElementById(setting.id).innerHTML=page_request.responseText + this.buildpaginate(setting) + } +}, + +buildcontentdivs:function(setting){ + var alldivs=document.getElementById(setting.id).getElementsByTagName("div") + for (var i=0; i'+(typeof toc=="string"? toc.replace(/#increment/, i) : toc[i-1])+' ' + } + phtml=(nextprev[0]!=''? ' ' : '') + phtml + (nextprev[1]!=''? '' : '') + pdiv.innerHTML=phtml + } + var pdivlinks=pdiv.getElementsByTagName("a") + var toclinkscount=0 //var to keep track of actual # of toc links + for (var i=0; isetting.contentdivs.length-1){ //if this toc link is out of range (user defined more toc links then there are contents) + pdivlinks[i].style.display="none" //hide this toc link + continue + } + pdivlinks[i].setAttribute("rel", ++toclinkscount) //store page number inside toc link + pdivlinks[i][setting.revealtype]=function(){ + featuredcontentslider.turnpage(setting, this.getAttribute("rel")) + return false + } + setting.toclinks.push(pdivlinks[i]) + } + else if (this.css(pdivlinks[i], "prev", "check") || this.css(pdivlinks[i], "next", "check")){ //check for links with class "prev" or "next" + pdivlinks[i].onclick=function(){ + featuredcontentslider.turnpage(setting, this.className) + return false + } + } + } + this.turnpage(setting, setting.currentpage, true) + if (setting.autorotate[0]){ //if auto rotate enabled + pdiv[setting.revealtype]=function(){ + featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id]) + } + sliderdiv["onclick"]=function(){ //stop content slider when slides themselves are clicked on + featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id]) + } + setting.autorotate[1]=setting.autorotate[1]+(1/setting.enablefade[1]*50) //add time to run fade animation (roughly) to delay between rotation + this.autorotate(setting) + } +}, + +urlparamselect:function(fcsid){ + var result=window.location.search.match(new RegExp(fcsid+"=(\\d+)", "i")) //check for "?featuredcontentsliderid=2" in URL + return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index +}, + +turnpage:function(setting, thepage, autocall){ + var currentpage=setting.currentpage //current page # before change + var totalpages=setting.contentdivs.length + var turntopage=(/prev/i.test(thepage))? currentpage-1 : (/next/i.test(thepage))? currentpage+1 : parseInt(thepage) + turntopage=(turntopage<1)? totalpages : (turntopage>totalpages)? 1 : turntopage //test for out of bound and adjust + if (turntopage==setting.currentpage && typeof autocall=="undefined") //if a pagination link is clicked on repeatedly + return + setting.currentpage=turntopage + setting.contentdivs[turntopage-1].style.zIndex=++setting.topzindex + this.cleartimer(setting, window["fcsfade"+setting.id]) + setting.cacheprevpage=setting.prevpage + if (setting.enablefade[0]==true){ + setting.curopacity=0 + this.fadeup(setting) + } + if (setting.enablefade[0]==false){ //if fade is disabled, fire onChange event immediately (verus after fade is complete) + setting.contentdivs[setting.prevpage-1].style.display="none" //collapse last content div shown (it was set to "block") + setting.onChange(setting.prevpage, setting.currentpage) + } + setting.contentdivs[turntopage-1].style.visibility="visible" + setting.contentdivs[turntopage-1].style.display="block" + if (setting.prevpage<=setting.toclinks.length) //make sure pagination link exists (may not if manually defined via "markup", and user omitted) + this.css(setting.toclinks[setting.prevpage-1], "selected", "remove") + if (turntopage<=setting.toclinks.length) //make sure pagination link exists (may not if manually defined via "markup", and user omitted) + this.css(setting.toclinks[turntopage-1], "selected", "add") + setting.prevpage=turntopage + if (this.enablepersist) + this.setCookie("fcspersist"+setting.id, turntopage) +}, + +setopacity:function(setting, value){ //Sets the opacity of targetobject based on the passed in value setting (0 to 1 and in between) + var targetobject=setting.contentdivs[setting.currentpage-1] + if (targetobject.filters && targetobject.filters[0]){ //IE syntax + if (typeof targetobject.filters[0].opacity=="number") //IE6 + targetobject.filters[0].opacity=value*100 + else //IE 5.5 + targetobject.style.filter="alpha(opacity="+value*100+")" + } + else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax + targetobject.style.MozOpacity=value + else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax + targetobject.style.opacity=value + setting.curopacity=value +}, + +fadeup:function(setting){ + if (setting.curopacity<1){ + this.setopacity(setting, setting.curopacity+setting.enablefade[1]) + window["fcsfade"+setting.id]=setTimeout(function(){featuredcontentslider.fadeup(setting)}, 10) + } + else{ //when fade is complete + if (setting.cacheprevpage!=setting.currentpage) //if previous content isn't the same as the current shown div (happens the first time the page loads/ script is run) + setting.contentdivs[setting.cacheprevpage-1].style.display="none" //collapse last content div shown (it was set to "block") + setting.onChange(setting.cacheprevpage, setting.currentpage) + } +}, + +cleartimer:function(setting, timervar){ + if (typeof timervar!="undefined"){ + clearTimeout(timervar) + clearInterval(timervar) + if (setting.cacheprevpage!=setting.currentpage){ //if previous content isn't the same as the current shown div + setting.contentdivs[setting.cacheprevpage-1].style.display="none" + } + } +}, + +css:function(el, targetclass, action){ + var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig") + if (action=="check") + return needle.test(el.className) + else if (action=="remove") + el.className=el.className.replace(needle, "") + else if (action=="add") + el.className+=" "+targetclass +}, + +autorotate:function(setting){ + window["fcsautorun"+setting.id]=setInterval(function(){featuredcontentslider.turnpage(setting, "next")}, setting.autorotate[1]) +}, + +getCookie:function(Name){ + var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair + if (document.cookie.match(re)) //if cookie found + return document.cookie.match(re)[0].split("=")[1] //return its value + return null +}, + +setCookie:function(name, value){ + document.cookie = name+"="+value + +}, + + +init:function(setting){ + var persistedpage=this.getCookie("fcspersist"+setting.id) || 1 + var urlselectedpage=this.urlparamselect(setting.id) //returns null or index from: mypage.htm?featuredcontentsliderid=index + this.settingcaches[setting.id]=setting //cache "setting" object + setting.contentdivs=[] + setting.toclinks=[] + setting.topzindex=0 + setting.currentpage=urlselectedpage || ((this.enablepersist)? persistedpage : 1) + setting.prevpage=setting.currentpage + setting.revealtype="on"+(setting.revealtype || "click") + setting.curopacity=0 + setting.onChange=setting.onChange || function(){} + if (setting.contentsource[0]=="inline") + this.buildpaginate(setting) + if (setting.contentsource[0]=="ajax") + this.ajaxconnect(setting) +} + +} \ No newline at end of file diff --git a/Open-ILS/web/js/ui/default/opac/kcls.js b/Open-ILS/web/js/ui/default/opac/kcls.js new file mode 100644 index 0000000000..2f2b2d3df6 --- /dev/null +++ b/Open-ILS/web/js/ui/default/opac/kcls.js @@ -0,0 +1,36 @@ +function check_cc_params() { + var form = document.getElementById('cc-form'); + + // ensure required fields are filled in + + required = ['billing_first', 'billing_last', 'billing_address', + 'billing_city', 'billing_state', 'billing_zip', 'number', 'cvv2']; + + var exit = false; + for (var idx in required) { + if (!form[required[idx]].value) { + form[required[idx]].style.background = 'yellow'; + exit = true; + } else { + form[required[idx]].style.background = 'white'; + } + } + + if (exit) { + alert('Please enter values for required fields'); + return false; + } + + // ensure credit card expire date is not in the past + + var today = new Date(); + today = new Date(today.getFullYear(), today.getMonth()); // truncate the date and time; + var expire = new Date(Number(form.expire_year.value), Number(form.expire_month.value) - 1); + + if (expire < today) { + alert('Credit card expiration date is in the past.'); + return false; + } + + return true; +} -- 2.11.0