[open-ils-commits] r1382 - in conifer/branches/rel_2_0/web/opac/skin/uwin/xml: . common result (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 18 13:44:50 EDT 2011


Author: dbs
Date: 2011-04-18 13:44:46 -0400 (Mon, 18 Apr 2011)
New Revision: 1382

Added:
   conifer/branches/rel_2_0/web/opac/skin/uwin/xml/common/libselect.xml
   conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/
   conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_info.xml
   conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_table.xml
Log:
A few more uwin-specific pieces into play


Copied: conifer/branches/rel_2_0/web/opac/skin/uwin/xml/common/libselect.xml (from rev 1295, conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/common/libselect.xml)
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/uwin/xml/common/libselect.xml	                        (rev 0)
+++ conifer/branches/rel_2_0/web/opac/skin/uwin/xml/common/libselect.xml	2011-04-18 17:44:46 UTC (rev 1382)
@@ -0,0 +1,15 @@
+<span>
+	<script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/depth_selector.js'></script>
+	<span class='hide_me' id='depth_selector_span'>
+		<!--#if expr="$SHOW_DEPTHSEL_TEXT='true'"-->
+		<span>&library.select; </span>
+		<!--#endif-->
+		<select id='depth_selector' class='libselect'>
+			<option value='new'>&library.select.label;</option>
+		</select>
+	</span>
+	<span class='hide_me' id='lib_selector_span'>
+		<a id='lib_selector_link' class='classic_link' href='javascript:void(0)'>&library.select.help;</a>
+	</span>
+</span>
+

Copied: conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_info.xml (from rev 1295, conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/result/result_info.xml)
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_info.xml	                        (rev 0)
+++ conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_info.xml	2011-04-18 17:44:46 UTC (rev 1382)
@@ -0,0 +1,80 @@
+<table style='width: 100%;'>
+	<tbody>
+
+		<tr class='color_4' style='height: 1em;'>
+
+			<td style='vertical-align: top;'  id='next_prev_links'>
+
+				<span class='hide_me' id='result_info_div' style='font-size: 9pt;'>
+					<span> &common.results; </span> 
+					<span id='offset_start'></span>
+					<!-- IE runs everything together so we force a character -->
+					<span style='font-size: 2pt; visibility: hidden;'>-</span>
+					<span>-</span>
+					<span style='font-size: 2pt; visibility: hidden;'>-</span>
+					<span id='offset_end'></span>
+					<span style='font-size: 2pt; visibility: hidden;'>-</span>
+					<span>&common.ofAtLeast;</span>
+					<span id='result_count'> </span>
+					<span style='padding-left: 6px;'> (page </span>
+					<span id='current_page'></span>
+					<span style='font-size: 2pt; visibility: hidden;'>-</span>
+					<span>&common.of;</span>
+					<span style='font-size: 2pt; visibility: hidden;'>-</span>
+					<span id='num_pages'> </span>
+				</span>
+
+				<span id='start_end_links_span' class='hide_me' 
+						style='padding-left: 40px;' >
+					<a class='search_link' id='search_home_link' 
+						title="&rdetail.page.results;" style='padding-left: 1em;'>&rdetail.start;</a><a class='search_link' 
+							id='prev_link' title='&rdetail.page.previous;' style='padding-left: 1em;'>&common.cn.previous;</a>
+
+					<span class='search_page_nav_link' id='page_numbers'> </span>
+
+					<a  class='search_link' id='next_link' 
+						title='&rdetail.page.next;' style='padding-left: 1em;'>&common.cn.next;</a>
+                        <!--
+                        <a class='search_page_nav_link' 
+							id='end_link' title="&rdetail.page.last;">&rdetail.end;</a>
+                            -->
+				</span>
+
+			</td>
+
+			<td  colspan='5' 
+				style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+					<span id='search_info_table' class='hide_me' style='font-size: 8pt;'>
+						<b>&result.info.copies; </b>
+					</span>
+			</td>
+		</tr>
+
+		<tr style='height: 2em;' id='result_thead_row'>
+			<td> 
+				<div class='hide_me' id='no_formats' style='padding: 4px;'>
+					<b>
+						<span style='color:red;'>*</span>
+						&result.info.no.items;
+						<div>&result.info.format.items;</div>
+					</b>
+				</div>
+
+				<div class='hide_me' id='rresult_show_all' style='padding: 4px;'>
+					<a href='javascript:rresultExpandSearch();' id='rresult_show_all_link' 
+						class='classic_link'>&result.info.show; </a>
+				</div>
+
+				<div class='hide_me' id='rresult_show_here' style='padding: 4px;'>
+					<a href='javascript:rresultContractSearch();' id='rresult_show_here_link' 
+						class='classic_link'>&result.info.show; </a>
+				</div>
+
+			</td>
+			<td rowspan='2' style='font-size: 8pt; padding-top: 4px;' class='copy_count_cell' 
+				width='12%' align='center' name='result_thead_ccell'> </td>
+		</tr>
+
+	</tbody>
+</table>
+

Copied: conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_table.xml (from rev 1380, conifer/branches/rel_2_0/web/opac/skin/lul/xml/result/result_table.xml)
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_table.xml	                        (rev 0)
+++ conifer/branches/rel_2_0/web/opac/skin/uwin/xml/result/result_table.xml	2011-04-18 17:44:46 UTC (rev 1382)
@@ -0,0 +1,430 @@
+<!-- Search results are spit into this table -->
+
+<div id='result_table_div' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <table id='res_table'> 
+
+        <!-- for some reason, this is the only way i can force the cell widths -->
+        <thead id='result_thead'>
+            <tr>
+                <td class='result_table_pic_header'></td>
+                <td> </td>
+            </tr>
+        </thead>
+
+        <tbody id='result_table'>
+            <tr>
+
+                <td class='result_table_row'>
+                    <!--#include virtual="result_info.xml"-->
+                </td>
+            </tr>
+
+            <!-- Template for displaying a search result.  This row template is cloned and inserted
+                    for each result returned -->
+
+            <tr id='result_table_template' class='hide_me'>
+
+                <!-- Jacket image goes here -->
+
+                <td class='result_table_row' align='left'>
+                    <table class='result_table_subtable'>
+						<tbody align='left' class='result_table_subtbody'>
+
+                            <tr style='height: 1em' name='counts_row'>
+
+                                <td  rowspan='6' class='result_table_pic_header'>
+                                    <a><img name='item_jacket' class='result_table_pic'/></a>
+                                </td>
+
+								<td align='left' class='result_table_title_cell' name='result_table_title_cell'>
+                                    <!-- Title goes here -->
+                                    <a title="&result.table.keyword;" name='item_title' class='search_link'> 
+                                        <!-- Title goes here -->
+                                    </a>
+                                </td>
+
+                                <!-- Copy this td for each copy count appended -->
+                                <td  rowspan='5' nowrap='nowrap' name="copy_count_cell" class='copy_count_cell'> 
+                                </td>
+
+                            </tr>
+        
+                            <tr style='height: 1em' >
+                                <td class='result_table_author_cell'>
+                                    <a title="&result.table.author;" name='item_author' class='search_link'> 
+                                        <!-- Author goes here -->
+                                    </a>
+                                    <div>
+                                    <span name='result_table_extra_span' class='hide_me'>
+                                        <span name='result_table_pub_box' style='padding-left: 10px;'> 
+                                            <span name='result_table_edition_span' style='padding-left: 10px;'></span> |
+                                            <span name='result_table_pub_span'> </span> |
+                                            <span name='result_table_phys_span'> </span>
+                                        </span>
+                                    </span>
+                                    </div>
+                                </td>
+                            </tr>
+
+
+                            <!--
+                                there is probably a more elegant way to achieve this but what
+                                happens here is that the record id is used to place resolver
+                                info in the correct place in the results list - the id is
+                                placed here from the js layer
+                            -->
+                            <tr id='result_table_recid' class='result_table_title_cell hide_me'>
+								<td class='sfx_display'> 
+									<span class='sfx_image'>
+									<img src='../local/images/sfxinfo.gif' alt=''/>
+									<i>SFX E-Journals</i>
+									</span>
+									<span id='result_table_recid_span' name='result_table_recid_span' class='recid'>
+                                    <span name='result_table_recid_span' class='recid'>
+                                        <span name='recid_holder' class='hide_me'></span>
+                                    </span>
+                                </td>
+								<td class='sfx_right'></td>
+                            </tr>
+
+                            <tr name="local_callnumber_list" class="result_table_title_cell">
+                                <td>
+                                <!--
+                                    we snag the record id from the 901 field, and then use it
+                                    for lining up the resolver content
+                                -->
+                                <span 
+                                    type='opac/slot-data' query='datafield[tag="901"] subfield[code="c"]' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    curr_title_id = dojo.trim(dojox.data.dom.textContent(item));
+                                ]]></span>
+                                </span>
+                                <!--
+                                    this is very close to the layout in rdetail, we need to find the
+                                    record id in order to place the resolver info in the right spot
+                                -->
+                                <span 
+                                    type='opac/slot-data' query='datafield[tag="022"] subfield' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var this_title_id = curr_title_id;
+                                    var issn = '';
+                                    issn = dojox.data.dom.textContent(item) + '';
+                                    issn = issn.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+                                    if (issn.length > 0) {
+                                        try {
+                                            var ses = new OpenSRF.ClientSession('open-ils.resolver');
+                                            var req = ses.request('open-ils.resolver.resolve_holdings.raw',
+                                                                        			'issn', issn, 'http://sfx.scholarsportal.info/windsor');
+                                            req.oncomplete = function(r) {
+                                                var resolverInfo = "";
+                                                dojo.forEach(r.recv().content(), function(entry) {
+                                                    resolverInfo = entry.public_name + "_" + entry.target_coverage;
+                                                    if (title_list.indexOf(this_title_id) == -1) {
+                                                        url_list = "";
+                                                    }
+                                                    if (url_list.indexOf(resolverInfo) == -1) {
+                                                        var resolverNode = null;
+                                                        dojo.query('.recid').forEach(function(recinfo) {
+                                                            if (parseFloat(dojo.trim(dojox.data.dom.textContent(recinfo))) == parseFloat(this_title_id)) {
+                                                                resolverNode = recinfo;
+                                                            }
+                                                        });
+                                                        url_list += resolverInfo;
+                                                        var output = null;
+                                                        if (resolverNode != null) {
+                                                            var parent = resolverNode.parentNode;
+                                                            if (parent) {
+                                                                parent = parent.parentNode;
+                                                            }
+                                                            if (parent) {
+                                                                dojo.removeClass(parent,'hide_me');
+                                                            }
+                                                            output = dojo.create('div',{"style":"background-color:#EEFFEE;"},resolverNode,"last");
+                                                            dojo.addClass(output,"result_table_sfx_cell");
+                                                            title_list += this_title_id;
+                                                            var link = dojo.create('a',  {"style": "margin-left: 1em;", "class":"search_link", "href":  entry.target_url});
+                                                            var link_text = dojo.doc.createTextNode( entry.public_name);
+                                                            link.appendChild(link_text);
+                                                            output.appendChild(link);
+                                                            var coverage_text = dojo.doc.createTextNode(' - ' + entry.target_coverage
+                                                                    + (entry.target_embargo ? (' / ' + entry.target_embargo) : ''));
+                                                            output.appendChild(coverage_text);
+                                                            resolved[this_title_id] = true;
+                                                        }
+                                                    }
+                                                });
+                                            };
+                                            req.send();
+                                        } catch (err) { alert(err.message);}
+                                    }
+                                ]]></span>
+                                </span>
+                                <!-- Prevent records with dozens of items attached from filling the screen -->
+                                <span type='opac/slot-data+marcxml-full' query='volumes'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var output = dojo.create('span'); 
+
+                                    var item_cnt = 0;
+                                    var max_items = 4;
+
+
+                                    dojo.query('volume', item).forEach(function(vol) {
+                                        if (item_cnt >= max_items) {
+                                            return output.innerHTML;
+                                        }
+                                        dojo.query('copy', vol).forEach(function (cp) {
+                                            if (cp.getAttribute('deleted') == 't') {
+                                                return;
+                                            }
+											if (cp.getAttribute('opac_visible') == 'f') {
+												return;
+											}
+                                            var cp_entry = dojo.create('div');
+                                            var loc_id;
+                                            var vol_appended = false;
+                                            dojo.query('location', cp).forEach(function (location) {
+                                                loc_id = parseInt(location.getAttribute('ident'));
+                                                if (loc_id != 8 && loc_id != 20 && loc_id != 185 && loc_id != 156) {
+                                                    if (!vol_appended) {
+                                                        var cn = dojo.create('span', { style: "font-weight: bold;" }, cp_entry);
+                                                        var cn_txt = dojo.doc.createTextNode(vol.getAttribute('label'));
+                                                        cn.appendChild(cn_txt);
+                                                        vol_appended = true;
+                                                    }
+                                                    var loc = dojo.create('span', { "style": "font-weight: bold;"}, cp_entry);
+                                                    var loc_txt = dojo.doc.createTextNode(' - ' + dojox.xml.parser.textContent(location));
+                                                    loc.appendChild(loc_txt);
+                                                }
+                                            });
+                                            if (loc_id == 8 || loc_id == 20 || loc_id == 80) {
+                                                return;
+                                            }
+                                            dojo.query('circ_lib', cp).forEach(function (circ_lib) {
+                                                var cp_lib = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry, "first");
+                                                var cp_lib_txt = dojo.doc.createTextNode(circ_lib.getAttribute('name') + ' - ');
+                                                cp_lib.appendChild(cp_lib_txt);
+                                            });
+                                            dojo.query('status', cp).forEach(function (status) {
+                                                var cp_status = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry);
+                                                var cp_status_txt = dojo.doc.createTextNode(' (' + dojox.xml.parser.textContent(status) + ')');
+                                                cp_status.appendChild(cp_status_txt);
+                                            });
+
+                                            item_cnt++;
+                                            if (item_cnt >= max_items) {
+                                                dojo.create('br', null, cp_entry);
+                                                cp_entry.appendChild(dojo.doc.createTextNode('... more print items listed in full record'));
+                                            }
+                                            output.appendChild(cp_entry);
+                                        });
+                                    });
+
+                                return output.innerHTML;
+                                ]]></span>
+                                </span>
+
+                                <!-- Be lenient in what we accept; disabled until we figure out how to prevent both URIs and SFX -->
+                                <span type='opac/slot-data+marcxml-full' query='record'>
+                                    <span class='hide_me' type='opac/slot-format'><![CDATA[
+                                        var found_issn = false;
+                                        dojo.query('datafield[tag="022"]', item).forEach(function(issn) {
+                                            found_issn = true;
+                                        });
+                                        if (found_issn) { return; }
+
+                                        var output = dojo.create('span'); 
+                                        dojo.query('volumes volume uris uri', item).forEach(function(xitem) {
+                                            var this_title_id = curr_title_id;
+                                            if (resolved[this_title_id]) { return; }
+                                            var uri = new Object;
+                                            uri.href = xitem.getAttribute('href');
+                                            uri.label = xitem.getAttribute('label');
+                                            uri.use = xitem.getAttribute('use_restriction');
+                                            if (uri.href == uri.label) {
+                                                if (uri.use && uri.use != uri.label) {
+                                                    uri.label = uri.use;
+                                                    uri.use = null;
+                                                }
+                                            }
+                                            var link = dojo.create('a', {"class":"search_link", "href": uri.href});
+                                            var link_text = dojo.doc.createTextNode(uri.label);
+                                            link.appendChild(link_text);
+                                            output.appendChild(link);
+                            
+                                            if (uri.use) {
+                                                var use_text = dojo.doc.createTextNode(' (' + uri.use + ')');
+                                                output.appendChild(use_text);
+                                            }
+                                            dojo.create('br', null, output);
+                                        });
+                                        return output.innerHTML;
+                                    ]]></span>
+                                </span>
+                                </td>
+                            </tr>
+
+                            <tr style='height:1em;' >
+                                <td name='result_table_format_cell' class='result_table_format_cell'>
+
+                                    <a name='text_link' class='search_link'> 
+                                        <img src='../../../../images/tor/text.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-nonmusical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-nonmusical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='moving image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/moving image.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='software, multimedia_link' class='search_link'> 
+                                        <img src='../../../../images/tor/software, multimedia.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-musical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-musical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='cartographic_link' class='search_link'> 
+                                        <img src='../../../../images/tor/cartographic.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='mixed material_link' class='search_link'> 
+                                        <img src='../../../../images/tor/mixed material.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='notated music_link' class='search_link'> 
+                                        <img src='../../../../images/tor/notated music.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='still image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/still images.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='three dimensional object_link' class='search_link'> 
+                                        <img src='../../../../images/tor/three dimensional object.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <span class='hide_me' 
+                                        style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                        <span>&common.relevancy; </span><span name='relevancy_span'> </span>
+                                    </span>
+
+                                    <span class='hide_me' name='place_hold_span'>
+                                        <a style='padding-left: 8px;' href='javascript:void(0);' 
+                                            class='classic_link' name='place_hold_link'>&opac.holds.placeHold;</a>
+                                    </span>
+
+                                    <!-- Empty span used for creating unAPI links -->
+                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+                                        <!-- unAPI URI goes here -->
+                                    </abbr>
+
+                                    <!-- Empty span used for creating Google Book Search-->
+                                    <span name="googleBooksLink" class="hide_me">
+                                        <a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
+                                    </span>
+
+
+                                </td>
+                            </tr>
+
+                        </tbody>
+                    </table>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+
+
+   <!-- ====================== -->
+   <table style='width: 100%; margin-top: 12px;' id='result_info_2' class='hide_me'>
+      <tbody>
+               
+          <tr class='color_4' style='height: 1em;'>
+                     
+             <td style='vertical-align: top;'  id='next_prev_links2'>
+                        
+                <span class='hide_me' id='result_info_div2' style='font-size: 9pt;'>
+                   <span> &common.results; </span> 
+                   <b id='offset_start2'> </b>
+				<!-- IE runs everything together so we force a character -->
+				<span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span> - </span>
+				<span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <b id='offset_end2'> </b>
+				<span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span> &common.ofAtLeast; </span>
+                   <b id='result_count2'> </b>
+                   <span style='padding-left: 6px;'> (page </span>
+                   <span id='current_page2'> </span>
+				<span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span> &common.of; </span>
+				<span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span id='num_pages2'> </span>
+                </span>
+                           
+                <span id='start_end_links_span2' class='hide_me' 
+                   style='padding-left: 40px;' >
+                <a class='search_page_nav_link' id='search_home_link2' 
+                   title="&rdetail.page.results;" style='padding-left: 1em;'>&rdetail.start;</a><a class='search_page_nav_link' 
+                   id='prev_link2' title='&rdetail.page.previous;' style='padding-left: 1em;'>&rdetail.page.previous.symbol;</a>
+            
+                <span class='search_page_nav_link' id='page_numbers2'> </span>
+                   <a  class='search_page_nav_link' id='next_link2' 
+                      title='&rdetail.page.next;' style='padding-left: 1em;'>&rdetail.page.next.symbol;</a>
+                      <!--
+                      <a class='search_page_nav_link' 
+                      id='end_link2' title="&rdetail.page.last;">&rdetail.end;</a>
+                      -->
+                </span>
+                        
+             </td>
+                        
+             <td  colspan='5' 
+                style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+               <!--
+                <span id='search_info_table2' style='font-size: 8pt;'>
+                <b>Available copies / Total copies </b>
+                </span>
+               -->
+             </td>
+          </tr>
+      </tbody>
+   </table>
+   <!-- ====================== -->
+
+
+    <script language='javascript' type='text/javascript'>
+        config.names.result.format_cell = 'result_table_format_cell';
+        config.names.result.format_link = 'resource_link'
+        config.names.result.format_pic = 'format_pic'
+        var url_list = "";
+        var title_list = "";
+        var curr_title_id = "";
+        var resolved = {};
+    </script>
+
+    <!-- ChiliFresh setup -->
+    <script language='javascript' type='text/javascript'>
+        var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+        if (chilifresh=='(none)') { chilifresh = false; }
+    </script>
+    <!--if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
+        <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+            value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+        <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+            value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+        <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+        <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+        <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+    <!--endif-->
+
+</div>
+



More information about the open-ils-commits mailing list