[open-ils-commits] r9867 - in trunk/Open-ILS/web/opac: locale/en-US
skin/default/js skin/default/xml/advanced
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jun 19 09:10:57 EDT 2008
Author: erickson
Date: 2008-06-19 09:10:56 -0400 (Thu, 19 Jun 2008)
New Revision: 9867
Modified:
trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml
Log:
patch from Bill Ott for a form-reset button to clear the advanced search inputs. i augmented the "clean" action to clear user-entered data in addition to data propogated from a search
Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-06-19 13:08:23 UTC (rev 9866)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd 2008-06-19 13:10:56 UTC (rev 9867)
@@ -443,6 +443,7 @@
<!ENTITY advanced.search.title "Search Input">
<!ENTITY advanced.add.row "Add Search Row">
<!ENTITY advanced.search.submit "Submit Search">
+<!ENTITY advanced.search.reset "Reset Form">
<!ENTITY advanced.search.filters "Search Filters">
<!ENTITY advanced.item.form "Item Form">
<!ENTITY advanced.item.type "Item Type">
Modified: trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2008-06-19 13:08:23 UTC (rev 9866)
+++ trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2008-06-19 13:10:56 UTC (rev 9867)
@@ -70,7 +70,7 @@
}
-function initSearchBoxes() {
+function initSearchBoxes(clean) {
/* loads the compiled search from the search cookie
and sets the widgets accordingly */
@@ -88,6 +88,15 @@
advAddGblRow();
var rows = $('adv_global_tbody').getElementsByTagName('tr');
+
+ if(clean) {
+ for(var t = 0; t < rows.length; t++) {
+ var input = $n(rows[t], 'term');
+ if(input) input.value = '';
+ }
+ return;
+ }
+
for(var t = 0; t < types.length; t++) {
var row = rows[t];
setSelector($n(row, 'type'), types[t]);
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-06-19 13:08:23 UTC (rev 9866)
+++ trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml 2008-06-19 13:10:56 UTC (rev 9867)
@@ -33,6 +33,8 @@
<!-- add a new row -->
<tr id='adv_global_addrow'>
<td align='center'>
+ <button onclick='initSearchBoxes(1);'>&advanced.search.reset;</button>
+ <span style='padding-left: 10px;'> </span>
<button id='myopac_new_global_row' onclick='advAddGblRow();'>&advanced.add.row;</button>
<span style='padding-left: 10px;'> </span>
<button onclick='advSubmitGlobal();'>&advanced.search.submit;</button>
More information about the open-ils-commits
mailing list