From 9c7b6085bd9df826eca27ac76b55c801d63c04a4 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 16 Sep 2005 19:15:14 +0000 Subject: [PATCH] new front page various style, etc. tweaks sidebar shows the 'search trail' git-svn-id: svn://svn.open-ils.org/ILS/trunk@1833 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/init.js | 4 +- Open-ILS/web/opac/common/js/opac_utils.js | 3 ++ Open-ILS/web/opac/locale/en-US/lang.dtd | 6 +-- Open-ILS/web/opac/skin/default/css/layout.css | 8 +++- Open-ILS/web/opac/skin/default/js/mresult.js | 2 +- .../web/opac/skin/default/js/result_common.js | 11 +++++ Open-ILS/web/opac/skin/default/js/rresult.js | 2 +- .../web/opac/skin/default/js/search_bar.js | 34 +++++++++++++--- Open-ILS/web/opac/skin/default/js/sidebar.js | 18 +++++++++ Open-ILS/web/opac/skin/default/xml/index.xml | 40 +++++++++++-------- .../web/opac/skin/default/xml/rdetail.xml | 4 +- .../web/opac/skin/default/xml/sidebar.xml | 31 ++++++++------ .../web/opac/theme/default/css/colors.css | 2 +- 13 files changed, 118 insertions(+), 47 deletions(-) diff --git a/Open-ILS/web/opac/common/js/init.js b/Open-ILS/web/opac/common/js/init.js index 3fad7c8c5f..3be3658e19 100644 --- a/Open-ILS/web/opac/common/js/init.js +++ b/Open-ILS/web/opac/common/js/init.js @@ -9,12 +9,10 @@ attachEvt("common", "init", initCookies); attachEvt("common", "init", drawOrgTree); attachEvt("common", "unload", _tree_killer); -//attachEvt("common", "unload", clearUIObjects); -attachEvt("common", "unload", cleanRemoteRequests); +try{ attachEvt("common", "unload", cleanRemoteRequests);} catch(e){} function init() { runEvt('common','init'); - //setFontSize(getFontSize()); runEvt("common", "run"); checkUserSkin(); G.ui.common.now_searching.appendChild(text(findOrgUnit(getLocation()).name())); diff --git a/Open-ILS/web/opac/common/js/opac_utils.js b/Open-ILS/web/opac/common/js/opac_utils.js index 87b2c63235..a95a45c296 100644 --- a/Open-ILS/web/opac/common/js/opac_utils.js +++ b/Open-ILS/web/opac/common/js/opac_utils.js @@ -430,6 +430,9 @@ function buildOrgSelector() { function orgSelect(id) { showCanvas(); runEvt("common", "locationChanged", id, findOrgDepth(id) ); + + removeChildren(G.ui.common.now_searching); + G.ui.common.now_searching.appendChild(text(findOrgUnit(id).name())); } var fontCookie = new cookieObject("fonts", 1, "/", COOKIE_FONT); diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index cc457f856f..e67ed423bf 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -15,8 +15,8 @@ - - + + @@ -29,7 +29,7 @@ - + diff --git a/Open-ILS/web/opac/skin/default/css/layout.css b/Open-ILS/web/opac/skin/default/css/layout.css index fbd7421faa..b6be3739cc 100644 --- a/Open-ILS/web/opac/skin/default/css/layout.css +++ b/Open-ILS/web/opac/skin/default/css/layout.css @@ -25,10 +25,10 @@ table { border-collapse: collapse; } .canvas { min-height: 300px; } #not_the_canvas {} -#canvas_main {min-height: 300px; border-left: 3px solid #A7EA9D; border-bottom: 3px solid #A7EA9D; +#canvas_main { min-height: 300px; border-left: 3px solid #A7EA9D; border-bottom: 3px solid #A7EA9D; border-top: 3px solid #A7EA9D; padding-left: 6px; -moz-border-radius: 6px;} -.non_canvas { min-height: 300px; border-left: 3px solid #A7EA9D; border-top: 3px solid #A7EA9D; +.non_canvas { min-height: 300px; border-left: 3px solid #A7EA9D; border-top: 3px solid #A7EA9D; border-bottom: 3px solid #A7EA9D; padding-left: 6px; -moz-border-radius: 6px;} #loading_div { width: 100%;} @@ -39,6 +39,9 @@ table { border-collapse: collapse; } #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; } @@ -107,6 +110,7 @@ border-left: 1px solid #E0E0E0; border-top: 1px solid #E0E0E0; border-bottom: 1p .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; } diff --git a/Open-ILS/web/opac/skin/default/js/mresult.js b/Open-ILS/web/opac/skin/default/js/mresult.js index 43da813ea4..378090391a 100644 --- a/Open-ILS/web/opac/skin/default/js/mresult.js +++ b/Open-ILS/web/opac/skin/default/js/mresult.js @@ -16,7 +16,7 @@ function mresultDoSearch() { table = G.ui.result.main_table; - while( table.parentNode.rows.length <= getDisplayCount() + 1) /* add an extra row so IE and safari won't complain */ + while( table.parentNode.rows.length <= (getDisplayCount() + 1) ) /* add an extra row so IE and safari won't complain */ table.appendChild(G.ui.result.row_template.cloneNode(true)); if(getOffset() == 0 || getHitCount() == null ) { diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index c88c160eac..4d6e65227d 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -95,16 +95,21 @@ function resultDisplayRecord(rec, pos, is_mr) { if( is_mr ) { var onlyrec = onlyrecord[ getOffset() + pos ]; if(onlyrec) { + /* var id = rec.doc_id(); rec.doc_id(onlyrec); buildTitleDetailLink(rec, title_link); rec.doc_id(id); + */ 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 { buildTitleLink(rec, title_link); @@ -171,8 +176,14 @@ function resultBuildFormatIcons( row, rec ) { var f = getForm(); if( f != "all" ) { + /* if( f != modsFormatToMARC(res) ) addCSSClass( img, config.css.dim2); + else + addCSSClass( img, "dim2_border"); + */ + if( f == modsFormatToMARC(res) ) + addCSSClass( img, "dim2_border"); } diff --git a/Open-ILS/web/opac/skin/default/js/rresult.js b/Open-ILS/web/opac/skin/default/js/rresult.js index 78a3d69678..2b14daa042 100644 --- a/Open-ILS/web/opac/skin/default/js/rresult.js +++ b/Open-ILS/web/opac/skin/default/js/rresult.js @@ -12,7 +12,7 @@ attachEvt("result", "recordDrawn", rresultLaunchDrawn); function rresultDoSearch() { table = G.ui.result.main_table; hideMe(G.ui.result.row_template); - while( table.parentNode.rows.length < getDisplayCount() ) + while( table.parentNode.rows.length <= (getDisplayCount() +1) ) hideMe(table.appendChild(G.ui.result.row_template.cloneNode(true))); rresultCollectIds(); } diff --git a/Open-ILS/web/opac/skin/default/js/search_bar.js b/Open-ILS/web/opac/skin/default/js/search_bar.js index 671ed80ba8..062572f10c 100644 --- a/Open-ILS/web/opac/skin/default/js/search_bar.js +++ b/Open-ILS/web/opac/skin/default/js/search_bar.js @@ -4,6 +4,8 @@ var _ts, _fs, _ds; attachEvt( "common", "locationChanged", updateLoc ); +var isFrontPage = false; + G.evt.common.init.push(searchBarInit); @@ -54,18 +56,26 @@ function depthSelectorChanged() { setSelector( _ds, getDepth() ); _opacHandleLocationTagClick(); - } else searchBarSubmit(); + } else { + if(!isFrontPage) + searchBarSubmit(); + } } -function buildLocationSelector() { +function buildLocationSelector(newLoc) { - if( getLocation() == globalOrgTree.id() ) return; + var loc; + if(newLoc != null) loc = newLoc; + else loc = getLocation(); + + if( loc == globalOrgTree.id() ) return; var selector = G.ui.searchbar.depth_selector var node = selector.removeChild(selector.getElementsByTagName("option")[0]); + removeChildren(selector); - var location = findOrgUnit(getLocation()); + var location = findOrgUnit(loc); var type = findOrgType(location.ou_type()); while( type && location ) { @@ -85,11 +95,25 @@ function buildLocationSelector() { function updateLoc(location, depth) { if( location != null ) newSearchLocation = location; + if( depth != null ) { + if(depth != 0 ){ + G.ui.searchbar.lib_sel_link.onclick = _opacHandleLocationTagClick; + if( location == globalOrgTree.id() ) { + hideMe( G.ui.searchbar.depth_sel_span ); + unHideMe( G.ui.searchbar.lib_sel_span ); + } else { + buildLocationSelector(location); + hideMe( G.ui.searchbar.lib_sel_span ); + unHideMe( G.ui.searchbar.depth_sel_span ); + } + } + setSelector(G.ui.searchbar.depth_selector, depth); newSearchDepth = depth; } - searchBarSubmit(); + if(!isFrontPage) + searchBarSubmit(); } diff --git a/Open-ILS/web/opac/skin/default/js/sidebar.js b/Open-ILS/web/opac/skin/default/js/sidebar.js index c421ee1ba8..2ca5168a1c 100644 --- a/Open-ILS/web/opac/skin/default/js/sidebar.js +++ b/Open-ILS/web/opac/skin/default/js/sidebar.js @@ -6,6 +6,24 @@ attachEvt("common", "init", setSidebarLinks); function initSideBar() { var page = findCurrentPage(); + + if( page == MRESULT ) + unHideMe(getId("sidebar_results_wrapper")); + + if( page == RRESULT ) { + unHideMe(getId("sidebar_results_wrapper")); + unHideMe(G.ui.sidebar[MRESULT]); + getId("sidebar_title_group_results").setAttribute("href", buildOPACLink({ page: MRESULT })); + } + + if( page == RDETAIL ) { + unHideMe(getId("sidebar_results_wrapper")); + getId("sidebar_title_group_results").setAttribute("href", buildOPACLink({ page: MRESULT })); + unHideMe(G.ui.sidebar[MRESULT]); + getId("sidebar_title_results").setAttribute("href", buildOPACLink({ page : RRESULT })); + unHideMe(G.ui.sidebar[RRESULT]); + } + unHideMe(G.ui.sidebar[page]); //addCSSClass(G.ui.sidebar[page], config.css.color_2); diff --git a/Open-ILS/web/opac/skin/default/xml/index.xml b/Open-ILS/web/opac/skin/default/xml/index.xml index a55c6eef32..ce4b3b03f1 100644 --- a/Open-ILS/web/opac/skin/default/xml/index.xml +++ b/Open-ILS/web/opac/skin/default/xml/index.xml @@ -6,29 +6,37 @@ Evergreen: Home - + + + + + + + + + + + + + + - - + +
- - + +
- - - -
- - - -
Home is here, show something interesting...
-
+
+
+ + +
- - + diff --git a/Open-ILS/web/opac/skin/default/xml/rdetail.xml b/Open-ILS/web/opac/skin/default/xml/rdetail.xml index abca55495e..0314037929 100644 --- a/Open-ILS/web/opac/skin/default/xml/rdetail.xml +++ b/Open-ILS/web/opac/skin/default/xml/rdetail.xml @@ -33,13 +33,13 @@
- +
- diff --git a/Open-ILS/web/opac/skin/default/xml/sidebar.xml b/Open-ILS/web/opac/skin/default/xml/sidebar.xml index e22a263c08..a7a01e65d1 100644 --- a/Open-ILS/web/opac/skin/default/xml/sidebar.xml +++ b/Open-ILS/web/opac/skin/default/xml/sidebar.xml @@ -40,24 +40,29 @@ + + diff --git a/Open-ILS/web/opac/theme/default/css/colors.css b/Open-ILS/web/opac/theme/default/css/colors.css index 45787698e8..6a37fa0d74 100644 --- a/Open-ILS/web/opac/theme/default/css/colors.css +++ b/Open-ILS/web/opac/theme/default/css/colors.css @@ -24,7 +24,7 @@ body a:hover { color: red; text-decoration: underline;} .rdetail_item { border: 1px solid #A7EA9D; } #rdetail_details_table { border: 1px solid #A7EA9D; } #rdetail_image_cell { border: 1px solid white; border-right: 1px solid #A7EA9D;} -.rdetail_header { border: 1px solid #FCC; } +.rdetail_header { } #rdetail_copy_info_table td { border: 1px solid #A7EA9D;} .rdetail_copy_info_header_cell { border: 1px solid #A7EA9D; } .rdetail_copy_info_alt { background: #A7EA9D; } -- 2.43.2
&rdetail.detailMain.headerLabel; + &rdetail.detailMain.viewMarc;