[open-ils-commits] r9229 - in trunk/Open-ILS:
src/perlmods/OpenILS/Application/Search web/opac/common/js
web/opac/skin/default/js web/opac/skin/default/xml/advanced
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 4 12:07:18 EDT 2008
Author: miker
Date: 2008-04-04 11:30:43 -0400 (Fri, 04 Apr 2008)
New Revision: 9229
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
trunk/Open-ILS/web/opac/common/js/config.js
trunk/Open-ILS/web/opac/common/js/opac_utils.js
trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
trunk/Open-ILS/web/opac/skin/default/js/result_common.js
trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml
Log:
adding bib_level filter to the advanced search
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2008-04-04 15:07:36 UTC (rev 9228)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2008-04-04 15:30:43 UTC (rev 9229)
@@ -1543,6 +1543,9 @@
api_name => 'open-ils.search.biblio.item_type_map.retrieve.all');
__PACKAGE__->register_method (
method => 'bib_extras',
+ api_name => 'open-ils.search.biblio.bib_level_map.retrieve.all');
+__PACKAGE__->register_method (
+ method => 'bib_extras',
api_name => 'open-ils.search.biblio.audience_map.retrieve.all');
sub bib_extras {
@@ -1559,6 +1562,9 @@
return $e->retrieve_all_config_item_type_map()
if( $self->api_name =~ /item_type_map/ );
+ return $e->retrieve_all_config_bib_level_map()
+ if( $self->api_name =~ /bib_level_map/ );
+
return $e->retrieve_all_config_audience_map()
if( $self->api_name =~ /audience_map/ );
Modified: trunk/Open-ILS/web/opac/common/js/config.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/config.js 2008-04-04 15:07:36 UTC (rev 9228)
+++ trunk/Open-ILS/web/opac/common/js/config.js 2008-04-04 15:30:43 UTC (rev 9229)
@@ -29,6 +29,7 @@
var PARAM_LITFORM = 'lf';
var PARAM_ITEMFORM = 'if';
var PARAM_ITEMTYPE = 'it';
+var PARAM_BIBLEVEL = 'bl';
var PARAM_AUDIENCE = 'a';
var PARAM_SEARCHES = 'ss';
var PARAM_LANGUAGE = 'la';
@@ -63,6 +64,7 @@
var LITFORM;
var ITEMFORM;
var ITEMTYPE;
+var BIBLEVEL;
var AUDIENCE;
var SEARCHES;
var LANGUAGE;
@@ -338,6 +340,7 @@
var FETCH_LIT_FORMS = 'open-ils.search:open-ils.search.biblio.lit_form_map.retrieve.all';
var FETCH_ITEM_FORMS = 'open-ils.search:open-ils.search.biblio.item_form_map.retrieve.all';
var FETCH_ITEM_TYPES = 'open-ils.search:open-ils.search.biblio.item_type_map.retrieve.all';
+var FETCH_BIB_LEVELS = 'open-ils.search:open-ils.search.biblio.bib_level_map.retrieve.all';
var FETCH_AUDIENCES = 'open-ils.search:open-ils.search.biblio.audience_map.retrieve.all';
var FETCH_HOLD_STATUS = 'open-ils.circ:open-ils.circ.hold.status.retrieve';
var FETCH_NON_CAT_CIRCS = 'open-ils.circ:open-ils.circ.open_non_cataloged_circulation.user';
Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-04-04 15:07:36 UTC (rev 9228)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-04-04 15:30:43 UTC (rev 9229)
@@ -148,6 +148,7 @@
LITFORM = cgi.param(PARAM_LITFORM);
ITEMFORM = cgi.param(PARAM_ITEMFORM);
ITEMTYPE = cgi.param(PARAM_ITEMTYPE);
+ BIBLEVEL = cgi.param(PARAM_BIBLEVEL);
AUDIENCE = cgi.param(PARAM_AUDIENCE);
SEARCHES = cgi.param(PARAM_SEARCHES);
LANGUAGE = cgi.param(PARAM_LANGUAGE);
@@ -187,6 +188,7 @@
LITFORM = null;
ITEMFORM = null;
ITEMTYPE = null;
+ BIBLEVEL = null;
AUDIENCE = null;
SEARCHES = null;
LANGUAGE = null;
@@ -234,6 +236,7 @@
function getLitForm() { return LITFORM; }
function getItemForm() { return ITEMFORM; }
function getItemType() { return ITEMTYPE; }
+function getBibLevel() { return BIBLEVEL; }
function getAudience() { return AUDIENCE; }
function getSearches() { return SEARCHES; }
function getLanguage() { return LANGUAGE; }
@@ -371,6 +374,8 @@
string += _appendParam(ITEMFORM, PARAM_ITEMFORM, args, getItemForm, string);
if(getItemType())
string += _appendParam(ITEMTYPE, PARAM_ITEMTYPE, args, getItemType, string);
+ if(getBibLevel())
+ string += _appendParam(BIBLEVEL, PARAM_BIBLEVEL, args, getBibLevel, string);
if(getLitForm())
string += _appendParam(LITFORM, PARAM_LITFORM, args, getLitForm, string);
if(getAudience())
Modified: trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2008-04-04 15:07:36 UTC (rev 9228)
+++ trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2008-04-04 15:30:43 UTC (rev 9229)
@@ -15,7 +15,9 @@
FETCH_LIT_FORMS,
FETCH_ITEM_FORMS,
FETCH_ITEM_TYPES,
- FETCH_AUDIENCES ];
+ FETCH_AUDIENCES,
+ FETCH_BIB_LEVELS
+ ];
for( var x in extras ) {
@@ -25,6 +27,7 @@
if(x == 1) req.request.sel = $('adv_global_item_form');
if(x == 2) req.request.sel = $('adv_global_item_type');
if(x == 3) req.request.sel = $('adv_global_audience');
+ if(x == 4) req.request.sel = $('adv_global_bib_level');
req.callback(advDrawBibExtras);
req.send();
@@ -137,6 +140,7 @@
var itemforms = advGetVisSelectorVals('adv_global_item_form');
var itemtypes = advGetVisSelectorVals('adv_global_item_type');
var audiences = advGetVisSelectorVals('adv_global_audience');
+ var biblevels = advGetVisSelectorVals('adv_global_bib_level');
var languages = getSelectedList($('adv_global_lang')) + '';
var limit2avail = $('opac.result.limit2avail').checked ? 1 : ''
@@ -149,6 +153,7 @@
args.page = MRESULT;
args[PARAM_ITEMFORM] = itemforms;
args[PARAM_ITEMTYPE] = itemtypes;
+ args[PARAM_BIBLEVEL] = biblevels;
args[PARAM_LITFORM] = litforms;
args[PARAM_AUDIENCE] = audiences;
args[PARAM_LANGUAGE] = languages;
Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-04-04 15:07:36 UTC (rev 9228)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-04-04 15:30:43 UTC (rev 9229)
@@ -80,6 +80,7 @@
if(getAudience()) args.audience = getAudience().split(/,/);
if(getLitForm()) args.lit_form = getLitForm().split(/,/);
if(getLanguage()) args.language = getLanguage().split(/,/);
+ if(getBibLevel()) args.bib_level = getBibLevel().split(/,/);
_debug('Search args: ' + js2JSON(args));
_debug('Raw query: ' + getTerm());
Modified: trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml 2008-04-04 15:07:36 UTC (rev 9228)
+++ trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml 2008-04-04 15:30:43 UTC (rev 9229)
@@ -169,6 +169,17 @@
</select>
</td>
</tr>
+
+ <tr>
+ <td align='right'>
+ <span>Bib Level</span>
+ </td>
+ <td align='left'>
+ <select multiple='multiple' size='3' id='adv_global_bib_level'>
+ </select>
+ </td>
+ </tr>
+
</tbody>
</table>
</td>
More information about the open-ils-commits
mailing list