[open-ils-commits] r10069 - in
trunk/Open-ILS/web/opac/skin/default: js xml/advanced
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 18 09:29:00 EDT 2008
Author: erickson
Date: 2008-07-18 09:28:59 -0400 (Fri, 18 Jul 2008)
New Revision: 10069
Modified:
trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml
Log:
modified form clearing to work regardless of propogated search terms
Modified: trunk/Open-ILS/web/opac/skin/default/js/adv_global.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2008-07-18 13:24:11 UTC (rev 10068)
+++ trunk/Open-ILS/web/opac/skin/default/js/adv_global.js 2008-07-18 13:28:59 UTC (rev 10069)
@@ -69,7 +69,19 @@
}
-function initSearchBoxes(clean) {
+function clearSearchBoxes() {
+ var rows = $('adv_global_tbody').getElementsByTagName('tr');
+ for(var t = 0; t < rows.length; t++) {
+ if($n(rows[t], 'term')) {
+ $n(rows[t], 'term').value = '';
+ setSelector($n(rows[t], 'container'), 'contains');
+ setSelector($n(rows[t], 'type'), 'keyword');
+ }
+ }
+}
+
+
+function initSearchBoxes() {
/* loads the compiled search from the search cookie
and sets the widgets accordingly */
@@ -88,14 +100,6 @@
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-07-18 13:24:11 UTC (rev 10068)
+++ trunk/Open-ILS/web/opac/skin/default/xml/advanced/advanced_global.xml 2008-07-18 13:28:59 UTC (rev 10069)
@@ -33,8 +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 onclick='clearSearchBoxes();'>&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