new front page
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 16 Sep 2005 19:15:14 +0000 (19:15 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 16 Sep 2005 19:15:14 +0000 (19:15 +0000)
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

13 files changed:
Open-ILS/web/opac/common/js/init.js
Open-ILS/web/opac/common/js/opac_utils.js
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/web/opac/skin/default/css/layout.css
Open-ILS/web/opac/skin/default/js/mresult.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/js/rresult.js
Open-ILS/web/opac/skin/default/js/search_bar.js
Open-ILS/web/opac/skin/default/js/sidebar.js
Open-ILS/web/opac/skin/default/xml/index.xml
Open-ILS/web/opac/skin/default/xml/rdetail.xml
Open-ILS/web/opac/skin/default/xml/sidebar.xml
Open-ILS/web/opac/theme/default/css/colors.css

index 3fad7c8..3be3658 100644 (file)
@@ -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()));
index 87b2c63..a95a45c 100644 (file)
@@ -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);
index cc457f8..e67ed42 100644 (file)
@@ -15,8 +15,8 @@
 <!-- Informational items -->
 <!ENTITY navigate.loggedinas "You are logged in as ">
 <!ENTITY navigate.loggedinas.title "Logged in as...">
-<!ENTITY navigate.titleGroupResults "Title Group Results">
-<!ENTITY navigate.titleResults "Title Results">
+<!ENTITY navigate.titleGroupResults "My Search Results">
+<!ENTITY navigate.titleResults "My Title Results">
 
 <!ENTITY common.nowSearching "Now searching ">
 <!ENTITY common.at " at ">
@@ -29,7 +29,7 @@
 
 
 <!-- Record Details -->
-<!ENTITY rdetail.detailMain.headerLabel "Record Details">
+<!ENTITY rdetail.detailMain.headerLabel "Title Details">
 <!ENTITY rdetail.detailMain.title "Title">
 <!ENTITY rdetail.detailMain.author "Author">
 <!ENTITY rdetail.detailMain.isbn "ISBN">
index fbd7421..b6be373 100644 (file)
@@ -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; }
 
index 43da813..3780903 100644 (file)
@@ -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 ) {
index c88c160..4d6e652 100644 (file)
@@ -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");
                }
 
 
index 78a3d69..2b14daa 100644 (file)
@@ -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();
 }
index 671ed80..062572f 100644 (file)
@@ -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();
 }
 
 
index c421ee1..2ca5168 100644 (file)
@@ -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);
index a55c6ee..ce4b3b0 100644 (file)
@@ -6,29 +6,37 @@
        <head>
                <title>Evergreen: Home</title>
                <xi:include href="css_common.xml#xpointer(//link)"/>
-               <xi:include href="js_common.xml#xpointer(//script)"/>
+               <script language='javascript' src='../../../common/js/utils.js'> </script>
+               <script language='javascript' src='../../../common/js//config.js'> </script>
+               <script language='javascript' src='../../../common/js/CGI.js'> </script>
+               <script language='javascript' src='../../../common/js/Cookie.js'> </script>
+
+               <script language='javascript' src='../../../common/js/dtree.js'> </script>
+               <script language='javascript' src='../../../common/js/JSON.js'> </script>
+               <script language='javascript' src='../../../common/js/fmcore.js'> </script>
+               <script language='javascript' src='../../../common/js/fmgen.js'> </script>
+               <script language='javascript' src='../../../common/js/opac_utils.js'> </script>
+               <script language='javascript' src='../../../common/js/OrgTree.js'> </script>
+               <script language='javascript' src='../../../common/js/org_utils.js'> </script>
+               <script language='javascript' src='../../../common/js/init.js'> </script>
+
        </head>
 
-       <body onload="init();">
-               <table width='100%'>
+       <body onload='init();'>
+               <table width='100%' style='border-collapse: collapse;'>
                        <tbody>
                                <tr>
-                                       <td id='main_left_cell'>
-                                               <xi:include href="logo.xml"/>
-                                               <xi:include href="sidebar.xml"/> 
-                                       </td>
-                                       <td id='main_right_cell'>
-                                               <div id='canvas' class='canvas'>
-                                               <xi:include href="searchbar.xml"/>
-                                               <xi:include href="statusbar.xml"/>
-                                               <xi:include href="altcanvas.xml"/>
-                                               <div id='canvas_main'>Home is here, show something interesting...</div>
-                                       </div>
+                                       <td width='10%'> </td>
+                                       <td width='80%'>
+                                               <div id='canvas'>
+                                                       <xi:include href="altcanvas.xml"/>
+                                                       <xi:include href="homesearch.xml"/>
+                                               </div>
                                        </td>
+                                       <td width='10%'> </td>
                                </tr>
                        </tbody>
                </table>
        </body>
-
-
+       <script language='javascript'>isFrontPage = true;</script>
 </html>
index abca554..0314037 100644 (file)
                                                        <xi:include href="rdetail_altcanvas.xml"/>
        
                                                        <div id='canvas_main'>
-                                                               <table style='margin-top: 10px;' class='rdetail_header color_1' width='100%'>
+                                                               <table style='' class='rdetail_header color_1' width='100%'>
                                                                        <tbody>
                                                                                <tr>
                                                                                        <td>
                                                                                                <span>&rdetail.detailMain.headerLabel;</span>
                                                                                        </td>
-                                                                                       <td align='right'>
+                                                                                       <td align='right' style='padding-right: 7px;'>
                                                                                                <a href="javascript:void(0);" id='rdetail_view_marc'>&rdetail.detailMain.viewMarc;</a>
                                                                                        </td>
                                                                                </tr>
index e22a263..a7a01e6 100644 (file)
                <!-- 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>
+                       <span>&navigate.loggedinas; <b id='username_dest'> </b></span>
                </div>
 
+<!--
+style='border: 1px solid #A7EA9D;'
+-->
+               <div id='sidebar_results_wrapper' class='hide_me'  style='border: 1px solid #A7EA9D;'>
+                       <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.titleResults;"
-                       id='result_link_div' class="side_bar_item hide_me">
-                       <span>&navigate.titleResults;</span>
-               </div>
-
-               <div title="Record Details"
-                       id='rdetail_link_div' class="side_bar_item hide_me">
-                       <span>Record Details</span>
+                       <div title="Record Details"
+                               id='rdetail_link_div' class="side_bar_item hide_me">
+                               <span>My Title Details</span>
+                       </div>
                </div>
 
-               <div title="&navigate.titleGroupResults;" 
-                       id='mresult_link_div' class="side_bar_item hide_me">
-                       <span>&navigate.titleGroupResults;</span>
-               </div>
 
        </div>
 
index 4578769..6a37fa0 100644 (file)
@@ -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; }