[open-ils-commits] r19726 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/patron (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 13 18:02:26 EDT 2011
Author: dbs
Date: 2011-03-13 18:02:19 -0400 (Sun, 13 Mar 2011)
New Revision: 19726
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/patron/search_form.js
trunk/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul
trunk/Open-ILS/xul/staff_client/server/patron/search_result.js
Log:
Apply patch to add a patron profile filter to the "Search for Patrons" UI
Thanks to Michael Peters <mrpeters at library.in.gov> and
Thomas Berezansky <tsbere at mvlc.org> for their work on this additional
functionality to the patron search UI, supplied as a patch in LP# 715837.
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2011-03-13 04:38:04 UTC (rev 19725)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2011-03-13 22:02:19 UTC (rev 19726)
@@ -1563,6 +1563,8 @@
<!ENTITY staff.patron_search_form.phone.label 'Phone:'>
<!ENTITY staff.patron_search_form.post_code.accesskey ''>
<!ENTITY staff.patron_search_form.post_code.label 'ZIP:'>
+<!ENTITY staff.patron_search_form.profile.accesskey ''>
+<!ENTITY staff.patron_search_form.profile.label 'Filter by Permission Profile:'>
<!ENTITY staff.patron_search_form.search.accesskey 'S'>
<!ENTITY staff.patron_search_form.search.label 'Search'>
<!ENTITY staff.patron_search_form.second_given_name.accesskey ''>
Modified: trunk/Open-ILS/xul/staff_client/server/patron/search_form.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/search_form.js 2011-03-13 04:38:04 UTC (rev 19725)
+++ trunk/Open-ILS/xul/staff_client/server/patron/search_form.js 2011-03-13 22:02:19 UTC (rev 19726)
@@ -232,6 +232,10 @@
};
}
],
+ 'profile' : [ ['render'],function(e) {
+ return function() {};
+ }
+ ],
'inactive' : [ ['render'], function(e) {
return function() {};
}
@@ -295,6 +299,14 @@
);
cb.checked = cb.getAttribute('value') == "true" ? true : false;
+ var menupopup = document.getElementById('profile').firstChild;
+ for (var i = 0; i < obj.OpenILS.data.list.pgt.length; i++) {
+ var my_pgt = obj.OpenILS.data.list.pgt[i];
+ var menuitem = document.createElement('menuitem');
+ menuitem.setAttribute('label',my_pgt.name());
+ menuitem.setAttribute('value',my_pgt.id());
+ menupopup.appendChild(menuitem);
+ };
},
'on_submit' : function(q) {
@@ -313,6 +325,9 @@
if (id == 'inactive') {
query[id] = node.getAttribute('value');
obj.error.sdump('D_DEBUG','id = ' + id + ' value = ' + node.getAttribute('value') + '\n');
+ } else if (id == 'profile') {
+ query[id] = node.selectedItem.getAttribute('value');
+ obj.error.sdump('D_DEBUG','id = ' + id + ' value = ' + node.getAttribute('value') + '\n');
} else {
if (id == 'search_depth') {
query[id] = node.firstChild.getAttribute('value');
@@ -331,7 +346,7 @@
obj.error.sdump('D_DEBUG','id = ' + id + ' value = ' + value + '\n');
}
}
- }
+ }
}
}
if (typeof obj.on_submit == 'function') {
Modified: trunk/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul 2011-03-13 04:38:04 UTC (rev 19725)
+++ trunk/Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul 2011-03-13 22:02:19 UTC (rev 19726)
@@ -125,6 +125,16 @@
accesskey="&staff.patron_search_form.post_code.accesskey;"/>
<textbox id="post_code" group="1" context="clipboard"/>
</row>
+ <vbox flex="1" style="overflow: auto">
+ <groupbox flex="1">
+ <caption label="&staff.patron_search_form.profile.label;" />
+ <menulist id="profile">
+ <menupopup>
+ <menuitem label="" value=""/>
+ </menupopup>
+ </menulist>
+ </groupbox>
+ </vbox>
<row id="psr12">
<spacer id="pss12"/>
<button id="search" label="&staff.patron_search_form.search.label;"
Modified: trunk/Open-ILS/xul/staff_client/server/patron/search_result.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/search_result.js 2011-03-13 04:38:04 UTC (rev 19725)
+++ trunk/Open-ILS/xul/staff_client/server/patron/search_result.js 2011-03-13 22:02:19 UTC (rev 19726)
@@ -187,7 +187,7 @@
obj.search_term_count++;
break;
- case 'family_name': case 'first_given_name': case 'second_given_name': case 'email': case 'alias': case 'usrname':
+ case 'family_name': case 'first_given_name': case 'second_given_name': case 'email': case 'alias': case 'usrname': case 'profile':
search_hash[ i ] = {};
search_hash[ i ].value = query[i];
More information about the open-ils-commits
mailing list