Commits

Chris Leonello committed e41fff1

some cleanup of logging functions and reorg of directory structure.

Comments (0)

Files changed (6)

jqplot.categoryAxisRenderer.js

-(function($) {
-    var debug = 1;
-        
-	// Convienence function that won't hang IE.
-	function log() {
-	    if (window.console && debug) {
-	       if (arguments.length == 1) console.log (arguments[0]);
-	       else console.log(arguments);
-	    }
-	};
-    
+(function($) {    
     $.jqplot.CategoryAxisRenderer = function() {
         $.jqplot.LinearAxisRenderer.call(this);
     };

jqplot.dateAxisRenderer.js

 (function($) {  
-    var debug = 1;
-        
-	// Convienence function that won't hang IE.
-	function log() {
-	    if (window.console && debug) {
-	       if (arguments.length == 1) console.log (arguments[0]);
-	       else console.log(arguments);
-	    }
-	};
-    
     $.jqplot.DateAxisRenderer = function() {
         $.jqplot.LinearAxisRenderer.call(this);
     };
         }               
     ];
     
-    if (debug) $.date = Date.create;
+    if ($.jqplot.debug) $.date = Date.create;
    
 })(jQuery);
 

jqplot.linearAxisRenderer.js

 (function($) {
-    var debug = 1;
-        
-	// Convienence function that won't hang IE.
-	function log() {
-	    if (window.console && debug) {
-	       if (arguments.length == 1) console.log (arguments[0]);
-	       else console.log(arguments);
-	    }
-	};
-
     $.jqplot.LinearAxisRenderer = function() {
     };
     

jqplot.logAxisRenderer.js

 (function($) {
-    var debug = 1;
-        
-	// Convienence function that won't hang IE.
-	function log() {
-	    if (window.console && debug) {
-	       if (arguments.length == 1) console.log (arguments[0]);
-	       else console.log(arguments);
-	    }
-	};
 	// class: $.jqplot.LogAxisRenderer
 	// A plugin for a jqPlot to render a logarithmic axis.	
     $.jqplot.LogAxisRenderer = function() {
 */
 
 (function($) {
-    var debug = 1;
     
     var defaultPlugins = ['jqplot.linearAxisRenderer.js', 'jqplot.axisTickRenderer.js', 'jqplot.tableLegendRenderer.js', 'jqplot.lineRenderer.js', 'jqplot.markerRenderer.js', 'jqplot.divTitleRenderer.js', 'jqplot.canvasGridRenderer.js', 'jqplot.sprintf.js'];
     for (var i=0; i<defaultPlugins.length; i++) {
         return plot;
     };
     
+    $.jqplot.debug = 1;
+    
     $.jqplot.ElemContainer = function() {
         this._elem;
         this._plotWidth;
     $.jqplot.drawLegendHooks = [];
     
 	// Convienence function that won't hang IE.
-	function log() {
-	    if (window.console && debug) {
+	$.jqplot.log = function() {
+	    if (window.console && $.jqplot.debug) {
 	       if (arguments.length == 1) console.log (arguments[0]);
 	       else console.log(arguments);
 	    }
 	};
+	var log = $.jqplot.log;
+	
 })(jQuery);
 <html lang="en">
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-	<title>unittest</title>
+	<title>jqPlot Unit Tests and Examples</title>
     <script language="javascript" type="text/javascript" src="../jquery-1.3.2.js"></script>
-	<link rel="stylesheet" href="./jspec/jspec.css" type="text/css" media="screen" title="no title" charset="utf-8">
-	<script language="javascript" type="text/javascript" src="./jspec/jspec.min.js"></script>
-	<script language="javascript" type="text/javascript" src="./jspec/jspec.jquery.min.js"></script>
+	<link rel="stylesheet" href="extras/jspec/jspec.css" type="text/css" media="screen" title="no title" charset="utf-8">
+	<script language="javascript" type="text/javascript" src="extras/jspec/jspec.min.js"></script>
+	<script language="javascript" type="text/javascript" src="extras/jspec/jspec.jquery.min.js"></script>
 	<script language="javascript" type="text/javascript" src="jquery.jqplot.js"></script>
 	<script language="javascript" type="text/javascript" src="jqplot.logAxisRenderer.js"></script>
 	<script language="javascript" type="text/javascript" src="jqplot.categoryAxisRenderer.js"></script>
 	<script language="javascript" type="text/javascript" src="jqplot.dateAxisRenderer.js"></script>
-    <script language="javascript" type="text/javascript" src="beautify.js" ></script>
-    <script language="javascript" type="text/javascript" src="HTML-Beautify.js" ></script>
-    <link href="prettify.css" type="text/css" rel="stylesheet" />
-    <script language="javascript" type="text/javascript" src="prettify.js"></script>
+    <script language="javascript" type="text/javascript" src="extras/beautify/beautify.js" ></script>
+    <script language="javascript" type="text/javascript" src="extras/beautify/HTML-Beautify.js" ></script>
+    <link href="extras/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script language="javascript" type="text/javascript" src="extras/prettify/prettify.js"></script>
 
 	<script>
 	  var uID = (function() {