[Koha-cvs] koha/koha-tmpl/opac-tmpl/npl/en/includes catsea... [dev_week]

Joshua Ferraro jmf at kados.org
Tue Jun 6 14:36:11 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Joshua Ferraro <kados>	06/06/06 12:36:11

Added files:
	koha-tmpl/opac-tmpl/npl/en/includes: catsearch.js 

Log message:
	adding catsearch.js 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/npl/en/includes/catsearch.js?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1

Patches:
Index: catsearch.js
===================================================================
RCS file: catsearch.js
diff -N catsearch.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catsearch.js	6 Jun 2006 12:36:11 -0000	1.1.2.1
@@ -0,0 +1,51 @@
+function hideSearchsTypes() {
+	  document.getElementById('cql').style.display = 'none';
+            document.getElementById('advanced').style.display = 'none';
+            document.getElementById('power').style.display = 'none';
+            document.getElementById('proximity').style.display = 'none';
+		}
+
+		function resetButtonsColors() {
+			document.getElementById('cql_formButton').className = 'off';
+			document.getElementById('advanced_formButton').className = 'off';
+			document.getElementById('power_formButton').className = 'off';
+			document.getElementById('proximity_formButton').className = 'off';
+		}
+
+		function changeSearch(divid) {
+			resetButtonsColors();
+			var navlink = divid+"_formButton";
+		    document.getElementById(navlink).className = 'on';
+		    hideSearchsTypes();
+		  //  document.getElementById('keyword_form').reset();
+		    document.getElementById(divid).style.display = 'block';
+		}
+
+		function checkKeywordSearch() {
+		if (document.keyword_form.keyword.value == '' && document.keyword_form.callno.value == '') {
+			alert("Enter a word to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+
+	function checkLooseSearch() {
+		if ( document.loose_form.field_value1.value == '' ) {
+			alert("Enter at least the first search to start searching.");
+			document.loose_form.field_value1.focus();
+			return false;
+		    } else {
+		        return true;
+		    }
+	}
+
+	function checkPreciseSearch() {
+		if ( (document.precise_form.itemnumber.value == '') &&
+			(document.precise_form.isbn.value == '') && (document.precise_form.biblionumber.value == '') ) {
+			alert("Enter a barcode or ISBN or Biblionumber to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}





More information about the Koha-cvs mailing list