showing a 'you are browsing..' thingy in the call number browser
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Mar 2006 15:49:42 +0000 (15:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Mar 2006 15:49:42 +0000 (15:49 +0000)
also hiding the 'local callnumbers' select dropdown where there
are no local callnumbers

git-svn-id: svn://svn.open-ils.org/ILS/trunk@3292 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/cn_browse.js
Open-ILS/web/opac/skin/default/js/rdetail.js
Open-ILS/web/opac/skin/default/xml/common/cn_browse.xml
Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml

index 0a7c048..9bdbe7d 100644 (file)
@@ -38,6 +38,15 @@ function cnBrowseGo(cn, depth) {
                'page_size', MAX_CN );
        req.callback( cnBrowseDraw );
        req.send();
+
+       var o = findOrgUnit(getLocation());
+       var d = findOrgDepth(o);
+       var x = 0;
+       while( d > depth ) {
+               o = findOrgUnit(o.parent_ou());
+               d = findOrgDepth(o);
+       }
+       appendClear($('cn_browse_where'), text(o.name()));
 }
 
 function cnBrowseNext() {
index 656b051..4e50256 100644 (file)
@@ -259,6 +259,11 @@ function rdetailBuildCNList() {
        for( var cn in callnumberCache ) arr.push( cn );
        arr.sort();
 
+       if( arr.length == 0 ) {
+               hideMe($('rdetail_cn_browse_select_div'));
+               return;
+       }
+
        for( var i in arr ) {
                var cn = arr[i];
                var opt = new Option(cn);
index 4444fa5..f2aec67 100644 (file)
@@ -6,6 +6,9 @@
        style='width: 95%; text-align: center; padding: 15px;'>
        <div id='cn_browse_loading'  class='cn_browse_loading hide_me'>Loading Callnumber Page...</div>
        <div id='cn_browse_div'> 
+               <div style='width: 90%; text-align: center; margin: 10px;' class='color_4'>
+                       <span>You are now browsing</span><b style='margin-left: 6px;' id='cn_browse_where'/>
+               </div>
                <table class='data_grid bookshelf' width='100%'>
                        <thead>
                                <tr>
index 37e4ead..c6071fc 100644 (file)
@@ -69,7 +69,8 @@
                </div>
 
                <div id='rdetail_cn_browse_div' style='text-align: center;' class='hide_me'>
-                       <div style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
+                       <div id='rdetail_cn_browse_select_div' 
+                               style='width: 100%; border: 1px solid black; padding: 6px; margin-top: 5px;'>
                                <span>Local Call Numbers: </span>
                                <select id='cn_browse_selector'>
                                </select>