[open-ils-commits] r998 - in conifer/branches/rel_1_6_1/web/opac/skin/uwin: css xml/rdetail xml/result (artunit)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 17 23:50:18 EDT 2010


Author: artunit
Date: 2010-09-17 23:50:15 -0400 (Fri, 17 Sep 2010)
New Revision: 998

Modified:
   conifer/branches/rel_1_6_1/web/opac/skin/uwin/css/layout.css
   conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
   conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/result/result_table.xml
Log:
shading sfx info, bringing status to results screen

Modified: conifer/branches/rel_1_6_1/web/opac/skin/uwin/css/layout.css
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/uwin/css/layout.css	2010-09-17 23:23:20 UTC (rev 997)
+++ conifer/branches/rel_1_6_1/web/opac/skin/uwin/css/layout.css	2010-09-18 03:50:15 UTC (rev 998)
@@ -112,6 +112,7 @@
 .result_table_subtbody { height: 100%; width: 100%; }
 /* make title slightly larger */
 .result_table_title_cell { font-weight: bold; text-align: left; }
+.result_table_sfx_cell {  background: #EBEBEB;  font-weight: bold; text-align: left; }
 .result_table_format_cell { font-size: medium; text-align: left;} 
 
 /* style dan's supercool live status stuff */

Modified: conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml	2010-09-17 23:23:20 UTC (rev 997)
+++ conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml	2010-09-18 03:50:15 UTC (rev 998)
@@ -91,7 +91,7 @@
 			</tr>
 			<tr class='hide_me' id='tag022'>
 				<td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>			
-				<td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
+				<td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_ite' id='rdetail_issn'>
 				    <script type='opac/slot-format'><![CDATA[
 					dojo.query('#tag022').removeClass('hide_me');
 					var issn_raw = dojo.trim(dojox.data.dom.textContent(item));
@@ -110,7 +110,7 @@
 							//uwin has a lot of duplicates for some reason
 							if (url_list.indexOf(resolverInfo) == -1) {
 								if (first_issn) {
-									dojo.query('#rdetail_online *').orphan();
+									dojo.query('#rdetail_sfx *').orphan();
 									first_issn = false;
 								}
 
@@ -119,8 +119,8 @@
 									+ '">' + entry.public_name + '</a> - '
 									+ entry.target_coverage 
 									+ (entry.target_embargo ? (' / ' + entry.target_embargo) : '') 
-									+ '</div>', 'rdetail_online');
-								dojo.query('#rdetail_online_row').removeClass('hide_me');
+									+ '</div>', 'rdetail_sfx');
+								dojo.query('#rdetail_sfx_row').removeClass('hide_me');
 								url_list += resolverInfo;
 							}//if url_list
 						});
@@ -366,6 +366,13 @@
 				]]></script>
 			</td>
 		</tr>
+                <tr id='rdetail_sfx_row' class="hide_me">
+				<td nowrap='nowrap' class='rdetail_desc'>SFX</td>
+                        <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                             *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                        <td class='rdetail_item result_table_sfx_cell' id='rdetail_sfx'>
+                        </td>
+                </tr>
 		<tr class='hide_me' id='rdetail_online_row'>
 			<!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
 			     *** summary screen with complex information, such as location-specific URIs (856$9). -->

Modified: conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/result/result_table.xml
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/result/result_table.xml	2010-09-17 23:23:20 UTC (rev 997)
+++ conifer/branches/rel_1_6_1/web/opac/skin/uwin/xml/result/result_table.xml	2010-09-18 03:50:15 UTC (rev 998)
@@ -67,16 +67,99 @@
 								</td>
 							</tr>
 
+
+                <tr id='rdetail_online_row' class="result_table_sfx_cell hide_me">
+                        <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                             *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                        <td class='rdetail_item' id='rdetail_online'> 
+                        </td>
+                </tr>
+
 		<tr name="local_callnumber_list" class="result_table_title_cell hide_me">
 			<td colspan="1">&result.localCallNumbers;
+				<span 
+					type='opac/slot-data' query='datafield[tag=022]' class='hide_me'>
+					<!--
+					type='opac/slot-data' query='datafield[tag=022]' class='hide_me'>
+					type='opac/slot-data' query='datafield[tag=022] subfield[code=a]'>
+					-->
+					<span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+						var output = dojo.create('span'); 
+                                		var list = dojo.query( 'subfield:[code=a]', item );
+						var text = '';
+                                		for (var i =0; i < list.length; i++) {
+                                        		//text += dojox.data.dom.textContent(list[i]) + ' ';
+                                        		var issn = dojox.data.dom.textContent(list[i]) + '';
+							issn = issn.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+							/*
+							*/
+							if (issn.length> 0) {
+                                        		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) {
+
+                                                	dojo.forEach(r.recv().content(), function(entry) {
+                                                        	var resolverInfo = entry.public_name + "_" + entry.target_coverage;
+                                                        	if (url_list.indexOf(resolverInfo) == -1) {
+                                                                	url_list += resolverInfo;
+								try {
+								/*
+                                                                dojo.place('<div style="width: 100%">'
+                                                                        + ' <a class="search_link" href="' + entry.target_url
+                                                                        + '">' + entry.public_name + '</a> - '
+                                                                        + entry.target_coverage
+                                                                        + (entry.target_embargo ? (' / ' + entry.target_embargo) : '')
+                                                                        + '</div>', 'rdetail_online');
+								*/
+								/*
+								dojo.create('div',{ innerHTML: ' <a class=\"search_link\" href=\"' + entry.target_url
+                                                                        + '\">' + entry.public_name + '</a> - '
+                                                                        + entry.target_coverage
+                                                                        + (entry.target_embargo ? (' / ' + entry.target_embargo) : '')
+									},'rdetail_online',"replace");
+								*/
+								var output = dojo.create('div',null,'rdetail_online',"first");
+                                        			var link = dojo.create('a', {"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);
+
+								
+								/*
+									},'rdetail_online',"first");
+                                                                dojo.query('#rdetail_online_row').removeClass('hide_me');
+								*/
+                                                                dojo.query('#rdetail_online_row').removeClass('hide_me');
+								} catch (e) {
+									alert("-> " + e);
+								}
+
+                                                        	}
+                                                	});
+                                        		}
+                                        		req.send();
+							}
+                                		}
+                                		return '<span> ' + issn + '</span><br/>';
+					]]></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;
 
-						var output = dojo.create('span'); 
 
+						/*
+						*/
+
+						/*
+						*/
 						dojo.query('volume', item).forEach(function(vol) {
 							if (item_cnt >= max_items) {
 								return output.innerHTML;
@@ -96,10 +179,6 @@
 												output);
 											vol_appended = true;
 										}
-										/*
-										var pfx = dojo.doc.createTextNode(' - ');
-										output.appendChild(pfx);
-										*/
 										dojo.create('span', { className: 'live_separator_cell',
 												"innerHTML": ' - '}, 
 											output);
@@ -127,7 +206,9 @@
 								}
 							});
 						});
-						return output.innerHTML;
+
+						//if (issn.length == 0)
+							return output.innerHTML;
 					]]></span>
 				</span>
 
@@ -297,6 +378,8 @@
 		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 = "";
+
 	</script>
 
 </div>



More information about the open-ils-commits mailing list