[open-ils-commits] r17802 - trunk/Open-ILS/web/opac/skin/default/js (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 17 21:47:17 EDT 2010


Author: dbs
Date: 2010-09-17 21:47:15 -0400 (Fri, 17 Sep 2010)
New Revision: 17802

Modified:
   trunk/Open-ILS/web/opac/skin/default/js/result_common.js
Log:
Expose an RSS (Atom, actually) feed in the dynamic OPAC for search results

I doubt most humans really care about RSS feeds, but this will make the
RSS feed icon highlight in Firefox and that should satisfy one of the
"requirements" for a Next Generation OPAC if that's the bar for research
papers these days.


Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js	2010-09-18 00:55:19 UTC (rev 17801)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js	2010-09-18 01:47:15 UTC (rev 17802)
@@ -93,6 +93,11 @@
 	_debug('Search args: ' + js2JSON(args));
 	_debug('Raw query: ' + getTerm());
 
+	var atomfeed = "/opac/extras/opensearch/1.1/" + findOrgUnit(args.org_unit).shortname() + "/atom-full/" + getStype() + '?searchTerms=' + getTerm();
+	if (sort) { atomfeed += '&searchSort=' + sort; }
+	if (sortdir) { atomfeed += '&searchSortDir=' + sortdir; }
+	dojo.create('link', {"rel":"alternate", "href":atomfeed, "type":"application/atom+xml"}, dojo.query('head')[0]);
+
 	var req = new Request(method, args, getTerm(), 1);
 	req.callback(handler);
 	req.send();



More information about the open-ils-commits mailing list