[open-ils-commits] r7734 - branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 29 10:58:44 EDT 2007


Author: phasefx
Date: 2007-08-29 10:52:52 -0400 (Wed, 29 Aug 2007)
New Revision: 7734

Modified:
   branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
   branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul
Log:
let's silence some debugging output, add in a global convenience function, and correct some debug/trace output

Modified: branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js	2007-08-29 14:50:50 UTC (rev 7733)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js	2007-08-29 14:52:52 UTC (rev 7734)
@@ -1,3 +1,5 @@
+	function $(id) { return document.getElementById(id); }
+
 	function ses(a) {
 		JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
 		switch(a) {
@@ -61,16 +63,16 @@
 	function xul_param(param_name,_params) {
 		/* By default, this function looks for a CGI-style query param identified by param_name.  If one isn't found, it then looks in xulG.  If one still isn't found, and _params.stash_name is true, it looks in the global xpcom stash for the field identified by stash_name.  If _params.concat is true, then it looks in all these places and concatenates the results.  There are also options for converting JSON to javascript objects, and clearing the xpcom stash_name field after retrieval.  Also added, ability to search a specific spot in the xpcom stash that implements a stack to hold xulG's for modal windows */
 		try {
-			dump('xul_param('+param_name+','+js2JSON(_params)+')\n');
+			//dump('xul_param('+param_name+','+js2JSON(_params)+')\n');
 			var value = undefined; if (!_params) _params = {};
 			if (typeof _params.no_cgi == 'undefined') {
 				var cgi = new CGI();
 				if (cgi.param(param_name)) {
 					var x = cgi.param(param_name);
-					dump('\tfound via location.href = ' + x + '\n');
+					//dump('\tfound via location.href = ' + x + '\n');
 					if (typeof _params.JSON2js_if_cgi != 'undefined') {
 						x = JSON2js( x );
-						dump('\tJSON2js = ' + x + '\n');
+						//dump('\tJSON2js = ' + x + '\n');
 					}
 					if (typeof _params.concat == 'undefined') {
 						//alert(param_name + ' x = ' + x);
@@ -89,17 +91,17 @@
 				if (typeof _params.modal_xulG != 'undefined') {
 					JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
 					var key = location.pathname + location.search + location.hash;
-					dump('xul_param, considering modal key = ' + key + '\n');
+					//dump('xul_param, considering modal key = ' + key + '\n');
 					if (typeof data.modal_xulG_stack != 'undefined' && typeof data.modal_xulG_stack[key] != 'undefined') {
 						xulG = data.modal_xulG_stack[key][ data.modal_xulG_stack[key].length - 1 ];
 					}
 				}
 				if (typeof xulG == 'object' && typeof xulG[ param_name ] != 'undefined') {
 					var x = xulG[ param_name ];
-					dump('\tfound via xulG = ' + x + '\n');
+					//dump('\tfound via xulG = ' + x + '\n');
 					if (typeof _params.JSON2js_if_xulG != 'undefined') {
 						x = JSON2js( x );
-						dump('\tJSON2js = ' + x + '\n');
+						//dump('\tJSON2js = ' + x + '\n');
 					}
 					if (typeof _params.concat == 'undefined') {
 						//alert(param_name + ' x = ' + x);
@@ -120,10 +122,10 @@
 					JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
 					if (typeof data[ _params.stash_name ] != 'undefined') {
 						var x = data[ _params.stash_name ];
-						dump('\tfound via xpcom = ' + x + '\n');
+						//dump('\tfound via xpcom = ' + x + '\n');
 						if (typeof _params.JSON2js_if_xpcom != 'undefined') {
 							x = JSON2js( x );
-							dump('\tJSON2js = ' + x + '\n');
+							//dump('\tJSON2js = ' + x + '\n');
 						}
 						if (_params.clear_xpcom) { 
 							data[ _params.stash_name ] = undefined; data.stash( _params.stash_name ); 

Modified: branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul	2007-08-29 14:50:50 UTC (rev 7733)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_offline.xul	2007-08-29 14:52:52 UTC (rev 7734)
@@ -4,7 +4,7 @@
 <overlay id="openils_util_overlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-	<script>dump('Loading OpenILS/util_overlay.xul\n');</script>
+	<script>dump('Loading OpenILS/util_overlay_offline.xul\n');</script>
 	<scripts id="openils_util_scripts">
 		<script type="text/javascript" src="../main/constants.js" />
 		<script type="text/javascript" src="util/utils.js" />
@@ -12,7 +12,7 @@
 		<script type="text/javascript" src="util/md5.js" />
 		<script type="text/javascript" src="util/JSON.js" />
 	</scripts>
-	<script>dump('Loaded OpenILS/util_overlay.xul\n');</script>
+	<script>dump('Loaded OpenILS/util_overlay_offline.xul\n');</script>
 
 </overlay>
 



More information about the open-ils-commits mailing list