moved cn browse to be a sibling of reviews, marc record, etc on the record detail...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 2 Jan 2006 16:34:10 +0000 (16:34 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 2 Jan 2006 16:34:10 +0000 (16:34 +0000)
gave cn browse cells a fixed height of 190px so the page won't shift when browsing...

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

Open-ILS/web/opac/skin/default/css/layout.css
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/altcanvas.xml
Open-ILS/web/opac/skin/default/xml/common/cn_browse.xml
Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_copyinfo.xml
Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_extras.xml

index 8a9acce..9339a53 100644 (file)
@@ -168,14 +168,20 @@ table { border-collapse: collapse; }
 
 .rdetail_extras_td { padding-right: 15px; padding-left: 15px; border-right: 1px solid #888; }
 
-.cn_browse_item { }
+.cn_browse_item { height: 190px; }
 .cn_browse_info { padding: 4px; border-bottom: 1px dashed #E0E0E0;}
 
 .bookshelf {
         /*background-image: url(http://10.4.0.10/woodgrain.jpeg);*/
+        /*
         background-image: url(http://dev.gapines.org/opac/images/woodgrain.jpg);
         background-repeat: repeat;
+        */
         border-bottom: 1px solid black;
 }
 
+.cn_browse_loading { width: 95%; padding: 15px; text-align: center; background: #E0F0E0; }
+
+.cn_browse_home_cn { border: 2px solid #E0F0E0; background: green; font-weight: 700;}
+
 
index ddb0846..856a92d 100644 (file)
@@ -7,6 +7,7 @@ var MAX_CN = 9;
 
 function cnBrowseGo(cn) { 
        cnBrowseCurrent = cn;
+       //unHideMe($('cn_browse_loading'));
        var req = new Request( FETCH_CNBROWSE_TARGET, 
                'org_unit', getLocation(), 
                'depth', getDepth(), 
@@ -17,6 +18,7 @@ function cnBrowseGo(cn) {
 }
 
 function cnBrowseNext() {
+       //unHideMe($('cn_browse_loading'));
        var req = new Request( FETCH_CNBROWSE_NEXT, 
                'org_unit', getLocation(), 
                'depth', getDepth(), 
@@ -28,6 +30,7 @@ function cnBrowseNext() {
 }
 
 function cnBrowsePrev() {
+       //unHideMe($('cn_browse_loading'));
        var req = new Request( FETCH_CNBROWSE_PREV,
                'org_unit', getLocation(), 
                'depth', getDepth(), 
@@ -44,7 +47,6 @@ var cnRowT;
 var cnTdT;
 
 function cnBrowseDraw( r ) {
-       swapCanvas($('cn_browse'));
        var list = r.getResultObject();
 
        if(!cnTbody) {
@@ -71,13 +73,20 @@ function cnBrowseDraw( r ) {
                var record      = list[idx][2];
                var id          = list[idx][3];
 
+               /*
+               if( label != cnBrowseCurrent ) {
+                       removeCSSClass( td, 'cn_browse_home_cn' );
+               }
+               */
 
                if( idx == 0 ) {
                        cnBrowseTopCn = label;
                        cnBrowseTopId = id;
-               } else if( idx == MAX_CN - 1 ) {
+                       //alert('top cn: ' + cnBrowseTopCn + ' : top id : ' + cnBrowseTopId );
+               } else {
                        cnBrowseBottomCn = label;
                        cnBrowseBottomId = id;
+                       //alert('bottom cn: ' + cnBrowseBottomCn + ' : bottom id : ' + cnBrowseBottomId );
                }
 
                var cn_td                       = $n(currentTd, 'cn_browse_cn');
index 2e5f92b..9a49d89 100644 (file)
@@ -113,6 +113,8 @@ function rdetailShowExtra(type) {
        hideMe($('rdetail_reviews_div'));
        hideMe($('rdetail_toc_div'));
        hideMe($('rdetail_marc_div'));
+       hideMe($('cn_browse'));
+       hideMe($('rdetail_viewcn_link'));
 
        var req;
        switch(type) {
@@ -152,6 +154,16 @@ function rdetailShowExtra(type) {
        }
 }
 
+function rdetailShowCNBrowse( cn ) {
+       hideMe($('rdetail_copy_info_div'));
+       hideMe($('rdetail_reviews_div'));
+       hideMe($('rdetail_toc_div'));
+       hideMe($('rdetail_marc_div'));
+       unHideMe($('rdetail_viewcn_link'));
+       unHideMe($('cn_browse'));
+       cnBrowseGo(cn);
+}
+
 function rdetailHandleAddedContent(r) {
        var resp = r.getResultObject();
        if( resp.Review == 'true' ) unHideMe($('rdetail_reviews_link'));
@@ -257,7 +269,8 @@ function _rdetailBuildInfoRows(r) {
 
                } else rowNode.setAttribute("used", "1");
 
-               var a = elem("a", {href:'javascript:cnBrowseGo("' + arr[1] + '");' }, arr[1]);
+               //var a = elem("a", {href:'javascript:cnBrowseGo("' + arr[1] + '");' }, arr[1]);
+               var a = elem("a", {href:'javascript:rdetailShowCNBrowse("' + arr[1] + '");' }, arr[1]);
                addCSSClass(a, 'classic_link');
                findNodeByName( rowNode, config.names.rdetail.cn_cell ).appendChild(a);
                
index 61cf2a0..0f4fb02 100644 (file)
                config.ids.altcanvas.holds                      = 'holds_box';
                config.ids.altcanvas.xulholds           = 'xulholds_box';
                config.ids.altcanvas.loading            = 'loading_alt';
-               config.ids.altcanvas.cnbrowse           = 'cn_browse';
+               //config.ids.altcanvas.cnbrowse         = 'cn_browse';
        </script>
 
        <!--#if expr="$FRONT_PAGE!='true'"-->
                <!--#include virtual="holds.xml"-->
-               <!--#include virtual="cn_browse.xml"-->
+               <!-- #include virtual="cn_browse.xml"-->
        <!--#endif-->
 
        <div id='loading_alt' class='hide_me non_canvas' style='margin-top: 6px;'>
index 7ecc4d6..7d339e8 100644 (file)
@@ -1,4 +1,10 @@
-<div id='cn_browse' class='hide_me non_canvas cn_browser' style='width: 90%; text-align: center; padding: 15px;'>
+<!--
+<div id='cn_browse' class='hide_me non_canvas cn_browser' 
+       style='width: 90%; text-align: center; padding: 15px;'>
+       -->
+<div id='cn_browse' class='hide_me cn_browser' 
+       style='width: 99%; 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'> 
                <table class='data_grid bookshelf' width='100%'>
                        <thead>
@@ -13,7 +19,8 @@
                        <tbody id='cn_tbody'>
                                <tr id='cn_browse_row'>
                                        <td id='cn_browse_td' class='cn_browse_item' width='25%' valign='top'>
-                                               <a><img height='60' width='50' class='cn_browse_info' name='cn_browse_pic' border='0'> </img></a>
+                                               <a><img height='60' width='50' src='blah' 
+                                                       class='cn_browse_info' name='cn_browse_pic' border='0'> </img></a>
                                                <div style='font-weight: bold;' class='cn_browse_info' name='cn_browse_cn'>  </div>
                                                <div class='cn_browse_info'><a name='cn_browse_title' class='classic_link'> </a></div>
                                                <div class='cn_browse_info'><a name='cn_browse_author' class='classic_link'>  </a></div>
index c78659b..48d031d 100644 (file)
@@ -28,7 +28,7 @@
                <tbody>
                        <tr id='rdetail_copy_info_row' class='hide_me'>
                                <td name='rdetail_library_cell'> </td>
-                               <td name='rdetail_callnumber_cell'> </td>
+                               <td name='rdetail_callnumber_cell' title='Launch Callnumber Browse'> </td>
                                <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' 
                                        name='rdetail_copy_count_cell'> </td>
                        </tr>
index 3ecdc8e..bb7451f 100644 (file)
                                        <a href='javascript:rdetailShowExtra("marc");' 
                                                class='classic_link'>MARC Record</a>
                                </td>
+
+                               <td id='rdetail_viewcn_link' class='rdetail_extras_td hide_me'
+                                       style='padding-right: 15px; padding-left: 15px;' >
+                                       <span>Callnumber Browse</span>
+                               </td>
+
                        </tr>
                </thead>
        </table>
@@ -54,5 +60,7 @@
                        <div id='rdetail_view_marc_box'> </div>
                </div>
 
+               <!--#include virtual="../common/cn_browse.xml"-->
+
        </div>
 </div>