little tweaks here and there
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 20 Nov 2005 21:56:56 +0000 (21:56 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 20 Nov 2005 21:56:56 +0000 (21:56 +0000)
getting rdetail more consistent with content and style

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

Open-ILS/web/opac/skin/default/css/layout.css
Open-ILS/web/opac/skin/default/js/rdetail.js
Open-ILS/web/opac/skin/default/xml/myopac_checked.xml
Open-ILS/web/opac/skin/default/xml/myopac_holds.xml
Open-ILS/web/opac/skin/default/xml/rdetail.xml
Open-ILS/web/opac/skin/default/xml/rdetail_altcanvas.xml
Open-ILS/web/opac/skin/default/xml/rdetail_copyinfo.xml
Open-ILS/web/opac/skin/default/xml/rdetail_extras.xml
Open-ILS/web/opac/skin/default/xml/result_table.xml
Open-ILS/web/opac/theme/default/css/colors.css

index 6287ad9..558bb17 100644 (file)
@@ -9,14 +9,13 @@ body { margin: 6px; }
 table { border-collapse: collapse; }
 
 /* generic CSS for a table with data */
-.data_grid { font-weight: 500; }
-/*.data_grid thead tr { background: #CCFFFF; color: #000000; border: 1px solid #808080; }*/
-.data_grid thead tr { background: #E0F0E0; color: #000000; border: 1px solid #808080; }
-.data_grid thead td { border-bottom: 1px solid #808080; padding-right: 5px; padding-left: 5px;}
+.data_grid { font-weight: 500; border-collapse: collapse;}
+.data_grid thead tr { background: #E0F0E0; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; padding-right: 5px; padding-left: 5px;}
 .data_grid tbody td { border: 1px solid #E0E0E0; padding: 5px; }
 
-.classic_link { text-decoration: underline; color: blue;}
-.classic_link:visited { text-decoration: underline; color: blue;}
+.classic_link { text-decoration: underline; color: black;}
+.classic_link:visited { text-decoration: underline; color: black;}
 
 
 
@@ -29,13 +28,6 @@ table { border-collapse: collapse; }
 #main_right_cell { height: 100%; width: 80%; vertical-align: top; margin: 0px; padding:0px;}
 
 
-/*.vertical {writing-mode: tb-rl; filter: flipv fliph; }*/
-
-/* ---------------------------------------------------------------------- */
-/*
-.canvas { float:right; width: 79%; text-align: left;}
-*/
-
 .canvas { min-height: 300px; }
 #not_the_canvas {}
 
@@ -65,15 +57,8 @@ table { border-collapse: collapse; }
 
 .sidebar_item_active { background: #A7EA9D; margin-right: 0px; }
 
-/*
-.sidebar_item_active { background: #035E47; margin-right: 0px; }
-*/
 .sidebar_chunk { width: 100%; }
 
-/*
-border-left: 1px solid #E0E0E0; border-top: 1px solid #E0E0E0; border-bottom: 1px solid #E0E0E0;}
-*/
-
 /* ---------------------------------------------------------------------- */
 
 #searchbar { margin-top: 18px; width: 100%; }
@@ -158,12 +143,15 @@ border-left: 1px solid #E0E0E0; border-top: 1px solid #E0E0E0; border-bottom: 1p
        padding-top: 8px; padding-bottom: 8px; }
 
 .rdetail_extras_div {
-       border-top: 2px solid #E0E0E0;
-}
+       border-top: 3px solid #E0E0E0;margin-top: 3px; padding-top: 5px;}
 
 .copy_info_region_row {
        padding: 6px;
        border: 2px solid #E0E0E0;
        font-weight: 600;
-       background: #E0F0E0;
+       /*background: #F0F0F0;*/
 }
+
+.rdetail_extras_td { padding-right: 15px; padding-left: 15px; border-right: 1px solid #888; }
+
+
index de4ff47..761b72e 100644 (file)
@@ -23,9 +23,6 @@ function rdetailDraw() {
 
        G.ui.rdetail.cp_info_local.onclick = rdetailShowLocalCopies;
        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);
@@ -35,16 +32,10 @@ function rdetailDraw() {
        req.send();
 }
 
-function rdetailViewMarc() {
-       if(!record) return;
-
-       if( G.ui.rdetail.view_marc_box.innerHTML.indexOf("style") == -1 ) {
-               var req = new Request( FETCH_MARC_HTML, record.doc_id() );
-               req.send(true);
-               var html = req.result();
-               G.ui.rdetail.view_marc_box.innerHTML = html;
-       }
-       swapCanvas(G.ui.rdetail.view_marc_div);
+var rdeatilMarcFetched = false;
+function rdetailViewMarc(r) {
+       hideMe($('rdetail_extras_loading'));
+       $('rdetail_view_marc_box').innerHTML = r.getResultObject();
 }
 
 
@@ -107,38 +98,64 @@ function _rdetailDraw(r) {
 
 }
 
+var rdetailTocFetched          = false;
+var rdetailReviewFetched       = false;
+var rdetailMarcFetched         = false;
+
 function rdetailShowExtra(type) {
 
        hideMe($('rdetail_copy_info_div'));
        hideMe($('rdetail_reviews_div'));
        hideMe($('rdetail_toc_div'));
+       hideMe($('rdetail_marc_div'));
 
+       var req;
        switch(type) {
-               case "copyinfo": unHideMe($('rdetail_copy_info_div')); break;
-               case "reviews": unHideMe($('rdetail_reviews_div')); break;
-               case "toc": unHideMe($('rdetail_toc_div')); break;
+               case "copyinfo": 
+                       unHideMe($('rdetail_copy_info_div')); 
+                       break;
+
+               case "reviews": 
+                       unHideMe($('rdetail_reviews_div')); 
+                       if(rdetailReviewFetched) break;
+                       unHideMe($('rdetail_extras_loading'));
+                       rdetailReviewFetched = true;
+                       req = new Request(FETCH_REVIEWS, cleanISBN(record.isbn()));
+                       req.callback(rdetailShowReviews);
+                       req.send();
+                       break;
+
+               case "toc": 
+                       unHideMe($('rdetail_toc_div'));
+                       if(rdetailTocFetched) break;
+                       unHideMe($('rdetail_extras_loading'));
+                       rdetailTocFetched = true;
+                       var req = new Request(FETCH_TOC, cleanISBN(record.isbn()));
+                       req.callback(rdetailShowTOC);
+                       req.send();
+                       break;
+
+               case "marc": 
+                       unHideMe($('rdetail_marc_div')); 
+                       if(rdetailMarcFetched) return;
+                       unHideMe($('rdetail_extras_loading'));
+                       rdetailMarcFetched = true;
+                       var req = new Request( FETCH_MARC_HTML, record.doc_id() );
+                       req.callback(rdetailViewMarc); 
+                       req.send();
+                       break;
        }
 }
 
 function rdetailHandleAddedContent(r) {
        var resp = r.getResultObject();
-
-       if( resp.Review == 'true' ) { 
-               var req = new Request(FETCH_REVIEWS, cleanISBN(record.isbn()));
-               req.callback(rdetailShowReviews);
-               req.send();
-       }
-
-       if( resp.TOC == 'true' ) { 
-               var req = new Request(FETCH_TOC, cleanISBN(record.isbn()));
-               req.callback(rdetailShowTOC);
-               req.send();
-       }
-
+       if( resp.Review == 'true' ) unHideMe($('rdetail_reviews_link'));
+       if( resp.TOC == 'true' ) unHideMe($('rdetail_toc_link'));
 }
 
 
 function rdetailShowReviews(r) {
+       hideMe($('rdetail_extras_loading'));
        var res = r.getResultObject();
        var par = $('rdetail_reviews_div');
        var template = par.removeChild($('rdetail_review_template'));
@@ -157,6 +174,7 @@ function rdetailShowReviews(r) {
 }
 
 function rdetailShowTOC(r) {
+       hideMe($('rdetail_extras_loading'));
        var resp = r.getResultObject();
        if(resp) {
                unHideMe($('rdetail_toc_link'));
@@ -193,7 +211,6 @@ function _rdetailRows(node) {
 
                        libtd.setAttribute("colspan", numStatuses + 2 );
                        libtd.colSpan = numStatuses + 2;
-                       //addCSSClass(row, config.css.color_3);
                        addCSSClass(row, 'copy_info_region_row');
                } 
        
index b081509..d65f1e4 100644 (file)
@@ -37,8 +37,8 @@
                                <td align='center' name='myopac_checked_renewals' class='light_border'> </td>
 
                                <td align='center' name='myopac_checked_renew' class='light_border'>
-                                       <a style='text-decoration:underline;' 
-                                               href='javascript:void(0);' name='myopac_checked_renew_link'>Renew</a>
+                                       <a style='text-decoration:underline;' href='javascript:void(0);' 
+                                               name='myopac_checked_renew_link' class='class_link'>Renew</a>
                                </td>
 
                        </tr>
index d221937..7f7379d 100644 (file)
@@ -46,7 +46,8 @@
                                </td>
 
                                <td align='center' name='myopac_holds_cancel' class='light_border'>
-                                       <a href='javascript:void(0);' name='myopac_holds_cancel_link'>Cancel</a>
+                                       <a href='javascript:void(0);' 
+                                               name='myopac_holds_cancel_link' class='classic_link'>Cancel</a>
                                </td>
 
                        </tr>
index c0f4600..2f1783a 100644 (file)
@@ -30,7 +30,6 @@
                                                        <xi:include href="searchbar.xml"/>
                                                        <xi:include href="statusbar.xml"/>
                                                        <xi:include href="altcanvas.xml"/>
-                                                       <xi:include href="rdetail_altcanvas.xml"/>
        
                                                        <div id='canvas_main'>
                                                                <table style='' class='rdetail_header color_1' width='100%'>
                                                                                                <span>&rdetail.detailMain.headerLabel;</span>
                                                                                        </td>
                                                                                        <td align='right' style='padding-right: 7px;'>
-                                                                                               <span style='padding-right: 15px;'>
+                                                                                               <span style='padding-right: 5px;'>
                                                                                                        <a id='rdetail_place_hold' class='classic_link'>Place Hold</a>
                                                                                                </span>
-                                                                                               <a href="javascript:void(0);" id='rdetail_view_marc'
-                                                                                                       class='classic_link'>&rdetail.detailMain.viewMarc;</a>
                                                                                        </td>
                                                                                </tr>
                                                                        </tbody>
                                                                </table>
                                                                <xi:include href="rdetail_summary.xml"/>
                                                                <br/><br/>
-                                                               <!--
-                                                               <xi:include href="rdetail_copyinfo.xml"/>
-                                                               -->
                                                                <xi:include href='rdetail_extras.xml'/>
                                                        </div>
                                                </div>
index 38a4841..5b14241 100644 (file)
@@ -3,6 +3,7 @@
 <!-- record details alternate canvases -->
 <div class=''>
 
+       <!--
        <script language='javascript'>
                config.ids.rdetail.view_marc_div = 'view_marc_div';
                config.ids.altcanvas.view_marc_div = config.ids.rdetail.view_marc_div; 
@@ -22,6 +23,7 @@
                <div id='rdetail_view_marc_box'> </div>
                <br/><br/>
        </div>
+       -->
        
 </div>
 
index f1ec94f..1e11391 100644 (file)
@@ -1,46 +1,37 @@
 <?xml version='1.0'?>
 
 <!-- This holds information for copies attached to this record -->
-<div id='rdetail_copy_info_div'>
-
-       <!-- header bar for the copy info table.  this allows you to select local
-                       or global copy information -->
-       <table class='rdetail_extras_div' width='100%' >
-               <tbody>
-                       <tr>
-                               <!--
-                               <td align='left'>&rdetail.copyInfo.headerLabel;</td>
-                               -->
-                               <td align='center' width=''>
-                                       <a href='javascript:void(0);' id='copy_info_local_link' 
-                                               class='rdetail_copy_nav_link hide_me classic_link'>&rdetail.copyInfo.local;</a>
-                               </td>
-                               <td align='center' width=''>
-                                       <a href='javascript:void(0);' id='copy_info_all_link' 
-                                               class='rdetail_copy_nav_link classic_link'>&rdetail.copyInfo.all;</a>
-                               </td>
-                       </tr>
-               </tbody>
-       </table>
-
-       <table id='rdetail_copy_info_table'>
-               <tbody>
+<div id='rdetail_copy_info_div' class='rdetail_extras_div'>
+
+       <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
+               <span>
+                       <a href='javascript:void(0);' id='copy_info_local_link' 
+                               class='rdetail_copy_nav_link hide_me classic_link'>&rdetail.copyInfo.local;</a>
+               </span>
+               <span width=''>
+                       <a href='javascript:void(0);' id='copy_info_all_link' 
+                               class='rdetail_copy_nav_link classic_link'>&rdetail.copyInfo.all;</a>
+               </span>
+       </div>
+
+       <table id='rdetail_copy_info_table' class='data_grid'>
+               <thead>
 
                        <tr>
                                <td  class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.library;</td>
                                <td  class='rdetail_copy_info_header_cell'>&rdetail.copyInfo.callnumber;</td>
                                <td  nowrap='nowarp' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'> 
                                        <div name='rdetail_status_cell'> </div>
-                                       <!--
-                                       <div name='rdetail_status_cell' style="width: 1em; overflow:auto;"> </div>
-                                       -->
                                </td>
                        </tr>
 
+               </thead>
+               <tbody>
                        <tr id='rdetail_copy_info_row' class='hide_me'>
                                <td name='rdetail_library_cell'> </td>
                                <td name='rdetail_callnumber_cell'> </td>
-                               <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' name='rdetail_copy_count_cell'> </td>
+                               <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' 
+                                       name='rdetail_copy_count_cell'> </td>
                        </tr>
 
                        <tr id='rdetail_copy_info_loading'><td>&rdetail.loading;</td></tr>
index 16e5bee..0baf742 100644 (file)
@@ -5,23 +5,36 @@
        <table class='data_grid'>
                <thead>
                        <tr>
-                               <td id='rdetail_copy_info_link' style='padding-right: 16px; padding-left: 15px;'>
-                                       <a href='javascript:rdetailShowExtra("copyinfo");' class='classic_link'>Copy Information</a>
+                               <td id='rdetail_copy_info_link' class='rdetail_extras_td' >
+                                       <a href='javascript:rdetailShowExtra("copyinfo");' 
+                                               class='classic_link'>Copy Information</a>
                                </td>
-                               <td id='rdetail_reviews_link' class='hide_me' style='padding-right: 15px; padding-left: 15px;'>
-                                       <a href='javascript:rdetailShowExtra("reviews");' class='classic_link'>Reviews</a>
+
+                               <td id='rdetail_reviews_link' class='hide_me' class='rdetail_extras_td'>
+                                       <a href='javascript:rdetailShowExtra("reviews");' 
+                                               class='classic_link'>Reviews</a>
+                               </td>
+
+                               <td id='rdetail_toc_link' class='hide_me' class='rdetail_extras_td'>
+                                       <a href='javascript:rdetailShowExtra("toc");' 
+                                               class='classic_link'>Table of Contents</a>
                                </td>
-                               <td id='rdetail_toc_link' class='hide_me' style='padding-right: 15px; padding-left: 15px;'>
-                                       <a href='javascript:rdetailShowExtra("toc");' class='classic_link'>Table of Contents</a>
+                               <td id='rdetail_annotation_link' class='hide_me' class='rdetail_extras_td'>
+                                       <a href='javascript:rdetailShowExtra("annotation");' 
+                                               class='classic_link'>Annotation</a>
                                </td>
-                               <td id='rdetail_annotation_link' class='hide_me' style='padding-right: 15px; padding-left: 15px;'>
-                                       <a href='javascript:rdetailShowExtra("annotation");' class='classic_link'>Annotation</a>
+
+                               <td id='rdetail_viewmarc_link' class='rdetail_extras_td'>
+                                       <a href='javascript:rdetailShowExtra("marc");' 
+                                               class='classic_link'>MARC Record</a>
                                </td>
                        </tr>
                </thead>
        </table>
 
        <div id='rdetail_extras_div'> 
+               <div id='rdetail_extras_loading' class='hide_me' 
+                       style='padding: 10px;'>Loading...</div>
                <xi:include href="rdetail_copyinfo.xml"/>
 
                <div id='rdetail_reviews_div' class='rdetail_extras_div hide_me'> 
                        </div>
                </div>
                
-               <div id='rdetail_toc_div' class='rdetail_extras_div hide_me'>
+               <div id='rdetail_toc_div' class='rdetail_extras_div hide_me'> </div>
+
+               <div id='rdetail_marc_div' class='rdetail_extras_div hide_me'> 
+                       <div id='rdetail_view_marc_box'> </div>
                </div>
-       </div>
 
+       </div>
 </div>
index 22bad9f..738a61e 100644 (file)
                                                                        </span>
 
                                                                        <span class='hide_me' name='place_hold_span'>
-                                                                               <a href='javascript:void(0);' name='place_hold_link'>Place Hold</a>
+                                                                               <a style='padding-left: 8px;' href='javascript:void(0);' 
+                                                                                       class='classic_link' name='place_hold_link'>Place Hold</a>
                                                                        </span>
 
                                                                </td>
index 53181ff..f26b637 100644 (file)
@@ -7,12 +7,6 @@ body a:hover   { color: red; text-decoration: underline;}
 .color_3 { background: #CCFFFF; color: #000000; }
 .color_4 { background: #E0F0E0; color: #000000; }
 
-/*
-.color_1 { background: #4D8444; color: #000000; }
-.color_2 { background: #168405; color: #000000; }
-.color_3 { background: #035E47; color: #000000; }
-*/
-
 /* ---------------------------------------------------------------------- */
 .sidebar_chunk {}
 .sidebar_extra_link { text-decoration: none; }
@@ -24,17 +18,12 @@ body a:hover        { color: red; text-decoration: underline;}
 .search_link { text-decoration: none; }
 .result_table_subtable { border-top: 1px solid #E0E0E0; }
 
-.copy_count_cell { border-right: 1px solid #E0E0E0; }
+.copy_count_cell { border-right: 1px solid #E0E0E0; } 
 .copy_count_div {      border-left: 2px solid #E0F6E0; border-right: 2px solid #E0F6E0; }
 
 .rdetail_desc { border: 1px solid #A7EA9D; }
 .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 {  }
-#rdetail_copy_info_table td { border: 1px solid #A7EA9D;}
-.rdetail_copy_info_header_cell { border: 1px solid #A7EA9D; }
-.rdetail_copy_info_alt { background: #A7EA9D; }
-/* ---------------------------------------------------------------------- */