From a8659bf1eae9ccf70b0c050cb070635ec313f884 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 25 Jul 2011 11:38:17 -0400 Subject: [PATCH] Manage parts holds warning (and removal) w/ CSS Use add/removeCSSClass to apply and remove holds parts selector warning instead of inline style.border management, which (when using 'auto') causes problems in IE. Signed-off-by: Bill Erickson Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/web/opac/skin/default/js/holds.js | 4 ++-- Open-ILS/web/opac/theme/default/css/colors.css | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js index b6e17a249d..3bb583b300 100644 --- a/Open-ILS/web/opac/skin/default/js/holds.js +++ b/Open-ILS/web/opac/skin/default/js/holds.js @@ -109,7 +109,7 @@ function holdsDrawEditor(args) { if(holdArgs.editHold) // flesh the args with the existing hold holdArgsFromHold(holdArgs.editHold, holdArgs); -// $('holds_parts_selector').style.border = 'auto'; + removeCSSClass($('holds_parts_selector'), 'parts-warning'); holdArgs.partsSuggestionMade = false; holdsDrawWindow(); @@ -1009,7 +1009,7 @@ function holdHandleCreateResponse(r, recurse) { holdArgs.recordParts.length && holdArgs.type == 'T') { // T holds on records that have parts are OK, but if the record has no non-part // copies, the hold will ultimately fail. Suggest selecting a part to the user. - $('holds_parts_selector').style.border = '2px solid red'; + addCSSClass($('holds_parts_selector'), 'parts-warning'); holdArgs.partsSuggestionMade = true; alert($('hold_has_parts').innerHTML); } else { diff --git a/Open-ILS/web/opac/theme/default/css/colors.css b/Open-ILS/web/opac/theme/default/css/colors.css index db6ba1d962..7bd54ccb6a 100644 --- a/Open-ILS/web/opac/theme/default/css/colors.css +++ b/Open-ILS/web/opac/theme/default/css/colors.css @@ -135,3 +135,5 @@ a:focus { background: #E0F0E0; color: #000000;} .hold_expire_warning { color:red; } #result_low_hits { border-top: 2px solid #A7EA9D } + +.parts-warning { border: 2px solid red; } -- 2.11.0