changeset 293:68dc70295a76

Ie graph support. + some small html/tooltip changes
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 23 Jun 2010 20:46:32 +0200
parents d7aeae23c56d
children c60eeeb8ac4d
files pylons_app/lib/helpers.py pylons_app/public/css/monoblue_custom.css pylons_app/public/js/graph.js
diffstat 3 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/lib/helpers.py	Wed Jun 23 18:14:27 2010 +0200
+++ b/pylons_app/lib/helpers.py	Wed Jun 23 20:46:32 2010 +0200
@@ -149,7 +149,7 @@
                         var pos_y = YAHOO.util.Dom.getY(context);
 
                         var display_strategy = 'top';
-                        var xy_pos= [0,0]
+                        var xy_pos = [0,0];
                         switch (display_strategy){
                         
                             case 'top':
@@ -172,7 +172,12 @@
                                 var cur_y = pos_y-((tt_h/2)-context_h/2);
                                 xy_pos = [cur_x,cur_y];                                
                                 break;
-                        
+                             default:
+                                var cur_x = (pos_x+context_w/2)-(tt_w/2);
+                                var cur_y = pos_y-tt_h-4;
+                                xy_pos = [cur_x,cur_y];                                
+                                break;                             
+                                 
                         }
 
                         this.cfg.setProperty("xy",xy_pos);
--- a/pylons_app/public/css/monoblue_custom.css	Wed Jun 23 18:14:27 2010 +0200
+++ b/pylons_app/public/css/monoblue_custom.css	Wed Jun 23 20:46:32 2010 +0200
@@ -174,6 +174,7 @@
     border:2px solid #556CB5;
     font:100% sans-serif;
     width:auto;
+    opacity:1.0;
 }
 
 .yui-tt-shadow {
--- a/pylons_app/public/js/graph.js	Wed Jun 23 18:14:27 2010 +0200
+++ b/pylons_app/public/js/graph.js	Wed Jun 23 20:46:32 2010 +0200
@@ -25,8 +25,8 @@
 	
 	this.canvas = document.getElementById("graph_canvas");
 	
-	//if ($.browser.msie)
-	//	this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
+	if (navigator.userAgent.indexOf('MSIE') >= 0) 
+		this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
 	this.ctx = this.canvas.getContext('2d');
 	this.ctx.strokeStyle = 'rgb(0, 0, 0)';
 	this.ctx.fillStyle = 'rgb(0, 0, 0)';