more fixes for myopac and record details
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 14 Oct 2005 16:07:36 +0000 (16:07 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 14 Oct 2005 16:07:36 +0000 (16:07 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1913 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/opac_utils.js
Open-ILS/web/opac/common/js/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/rdetail.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/myopac.xml
Open-ILS/web/opac/skin/default/xml/sidebar.xml

index 837d9b8..07779ee 100644 (file)
@@ -404,12 +404,6 @@ function doLogout() {
        args.page = "home";
 
        goTo(buildOPACLink(args));
-
-       /*
-       hideMe(G.ui.sidebar.logoutbox);
-       unHideMe(G.ui.sidebar.loginbox);
-       hideMe(G.ui.sidebar.logged_in_as);
-       */
 }
 
 
index 43398f5..f173ee4 100644 (file)
@@ -65,7 +65,10 @@ function userPressedEnter(evt) {
 }   
 
 
-function goTo(url) {location.href = url;}
+function goTo(url) {
+       /* setTimeout because ie sux */
+       setTimeout( function(){ location.href = url; }, 0 );
+}
 
 
 function removeChildren(dom) {
index e67ed42..f924732 100644 (file)
@@ -45,6 +45,6 @@
 <!ENTITY rdetail.copyInfo.local "View Copy Information for this location only">
 <!ENTITY rdetail.copyInfo.all "View copy information for all libraries">
 <!ENTITY rdetail.loading "Loading copy infomation...">
-<!ENTITY rdetail.noneAvailable " * There are no copies in this library">
+<!ENTITY rdetail.noneAvailable " * There are no copies in this location">
 <!ENTITY rdetail.detailMain.viewMarc "View MARC">
 <!ENTITY rdetail.detailMain.hideMarc "Return to title summary view">
index 22df586..b5d3ad6 100644 (file)
@@ -28,7 +28,7 @@ table { border-collapse: collapse; }
 #not_the_canvas {}
 
 #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;}
+       border-top: 3px solid #A7EA9D; padding-left: 6px; -moz-border-radius: 6px; padding-bottom: 10px; }
 
 .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;}
@@ -125,7 +125,7 @@ border-left: 1px solid #E0E0E0; border-top: 1px solid #E0E0E0; border-bottom: 1p
 
 .myopac_link { width: 25%; margin: 3px; padding: 3px; text-align: center; vertical-align: middle; }
 
-.myopac_table thead { padding: 2px; font-weight: 600;}
+.myopac_table thead tr td { padding: 2px; font-weight: 600; border: 1px solid #808080;}
 .myopac_table td { padding: 3px; };
 
 
index d56fb82..8d18919 100644 (file)
@@ -81,6 +81,7 @@ function mresultHandleMRIds(r) {
 }
 
 function mresultSetRecords(idstruct) {
+       if(!idstruct) return;
        var o = getOffset();
        for( var x = o; x < idstruct.length + o; x++ ) {
                if(idstruct[x-o] == null) break;
index d6ee3ce..962a4cb 100644 (file)
@@ -23,6 +23,11 @@ function rdetailDraw() {
        G.ui.rdetail.cp_info_all.onclick = rdetailShowAllCopies;
        G.ui.rdetail.view_marc.onclick = rdetailViewMarc;
        G.ui.rdetail.hide_marc.onclick = showCanvas;
+
+
+       if(getLocation() == globalOrgTree.id())
+               hideMe(G.ui.rdetail.cp_info_all);
+
        var req = new Request(FETCH_RMODS, getRid());
        req.callback(_rdetailDraw);
        req.send();
@@ -140,6 +145,7 @@ function _rdetailBuildInfoRows(r) {
        G.ui.rdetail.cp_info_loading.parentNode.removeChild(
                G.ui.rdetail.cp_info_loading);
 
+       var found = false;
        for( var i = 0; i < summary.length; i++ ) {
 
                var arr = summary[i];
@@ -166,11 +172,13 @@ function _rdetailBuildInfoRows(r) {
                rdetailApplyStatuses(rowNode, cpc_temp, arr[2]);
 
                var isLocal = false;
-               if( orgIsMine( findOrgUnit(getLocation()), thisOrg ) ) isLocal = true;
+               if( orgIsMine( findOrgUnit(getLocation()), thisOrg ) ) { found = true; isLocal = true; }
                rdetailSetPath( thisOrg, isLocal );
 
        }
 
+       if(!found) unHideMe(G.ui.rdetail.cp_info_none);
+
 }
 
 /* sets the path to org as 'active' and displays the 
index 9a0a383..139573d 100644 (file)
@@ -21,8 +21,9 @@ function searchBarInit() {
        _fs = G.ui.searchbar.form_selector;
 
        G.ui.searchbar.text.focus();
-       G.ui.searchbar.text.onkeypress = 
-               function(evt) {if(userPressedEnter(evt)) searchBarSubmit();};
+       //G.ui.searchbar.text.onkeypress = 
+       G.ui.searchbar.text.onkeydown = 
+               function(evt) {if(userPressedEnter(evt)) { searchBarSubmit(); } };
 
        G.ui.searchbar.submit.onclick = searchBarSubmit;
 
@@ -57,12 +58,14 @@ function depthSelectorChanged() {
                _opacHandleLocationTagClick();
 
        } else {
-               if(!isFrontPage)
+               if(!isFrontPage && (findCurrentPage() != MYOPAC)) {
                        searchBarSubmit();
+               }
        }
 
 }
 
+var chooseAnotherNode;
 function buildLocationSelector(newLoc) {
 
        var loc;
@@ -72,7 +75,9 @@ function buildLocationSelector(newLoc) {
        if( loc == globalOrgTree.id() ) return;
 
        var selector = G.ui.searchbar.depth_selector
-       var node = selector.removeChild(selector.getElementsByTagName("option")[0]);
+       if(!chooseAnotherNode) 
+               chooseAnotherNode = selector.removeChild(selector.getElementsByTagName("option")[0]);
+       var node = chooseAnotherNode;
        removeChildren(selector);
        
        var location = findOrgUnit(loc);
@@ -113,15 +118,10 @@ function updateLoc(location, depth) {
                newSearchDepth = depth;
        }
 
-       if(!isFrontPage && (findCurrentPage() != MYOPAC))
+       if(!isFrontPage && (findCurrentPage() != MYOPAC) 
+                               && (newSearchLocation != getLocation()) ) {
                searchBarSubmit();
-
-       alert(findCurrentPage());
-       /*
-       alert(MYOPAC);
-       alert(findCurrentPage() == MYOPAC);
-       */
-
+       }
 }
 
 
index 39e2219..dcb99aa 100644 (file)
@@ -25,9 +25,6 @@ function initSideBar() {
        }
 
        unHideMe(G.ui.sidebar[page]);
-
-       //addCSSClass(G.ui.sidebar[page], config.css.color_2);
-       //addCSSClass(G.ui.sidebar[page], config.css.encircled);
        addCSSClass(G.ui.sidebar[page], "sidebar_item_active");
 
        /* if we're logged in, show it and replace the Login link with the Logout link */
@@ -45,7 +42,6 @@ function initSideBar() {
 /* sets up the login ui components */
 var loginBoxVisible = false;
 
-/*
 function loginDance() {
        if(doLogin()) {
                showCanvas();
@@ -53,25 +49,12 @@ function loginDance() {
                unHideMe(G.ui.sidebar.logoutbox);
                unHideMe(G.ui.sidebar.logged_in_as);
                hideMe(G.ui.sidebar.loginbox);
-               return true;
+               runEvt("common", "loggedIn");
        }
-       return false;
 }
-*/
 
 function initLogin() {
 
-       var loginDance = function() {
-               if(doLogin()) {
-                       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");
-               }
-       }
-
        G.ui.login.button.onclick = loginDance;
        G.ui.login.username.onkeydown = 
                function(evt) {if(userPressedEnter(evt)) loginDance();};
index 5d8780e..40b39ad 100644 (file)
                <table width='100%'>
                        <tbody>
                                <tr>
-                                       <td valign='top' width='20%'>
+                                       <td id='main_left_cell'>
                                                <xi:include href="logo.xml"/>
                                                <xi:include href="sidebar.xml"/> 
                                        </td>
-                                       <td style='padding-left: 6px;' valign='top' width='80%'>
+                                       <td id='main_right_cell'>
 
                                                <div id='canvas' class='canvas'>
                                                        <xi:include href="searchbar.xml"/>
index a7a01e6..8babb11 100644 (file)
                </div>
 
 
-               <!--
-               <xi:include href="xulsidebar.xml"/>
-               -->
-
                <!-- 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">
@@ -66,13 +59,6 @@ style='border: 1px solid #A7EA9D;'
 
        </div>
 
-       <!--
-       <br/>
-       <div style='padding-top: 3px;'>
-               <xi:include href="searchbar.xml"/> 
-       </div>
-       -->
-
        <div id='subject_sidebar' class='sidebar_chunk hide_me'> 
                <div class='sidebar_header color_1'>&sidebar.relevantSubjects.headerLabel;</div>
                <ul style='margin-left: 1em; padding-left: 1em;'>