Changeset - 68dc70295a76
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-06-23 20:46:32
marcin@python-works.com
Ie graph support.
+ some small html/tooltip changes
3 files changed with 9 insertions and 3 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/helpers.py
Show inline comments
 
@@ -140,47 +140,52 @@ class _ToolTip(object):
 
                        
 
                        // positioning of tooltip
 
                        var tt_w = this.element.clientWidth;
 
                        var tt_h = this.element.clientHeight;
 
                        
 
                        var context_w = context.offsetWidth;
 
                        var context_h = context.offsetHeight;
 
                        
 
                        var pos_x = YAHOO.util.Dom.getX(context);
 
                        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':
 
                                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;
 
                            case 'bottom':
 
                                var cur_x = (pos_x+context_w/2)-(tt_w/2);
 
                                var cur_y = pos_y+context_h+4;
 
                                xy_pos = [cur_x,cur_y];                                
 
                                break;
 
                            case 'left':
 
                                var cur_x = (pos_x-tt_w-4);
 
                                var cur_y = pos_y-((tt_h/2)-context_h/2);
 
                                xy_pos = [cur_x,cur_y];                                
 
                                break;
 
                            case 'right':
 
                                var cur_x = (pos_x+context_w+4);
 
                                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);
 

	
 
                  });
 
                  
 
            //Mouse out 
 
            myToolTips.contextMouseOutEvent.subscribe(
 
                function(type, args) {
 
                    var context = args[0];
 
                    
pylons_app/public/css/monoblue_custom.css
Show inline comments
 
@@ -165,24 +165,25 @@ table tr.parity1 {
 
}
 

	
 
.yui-tt {
 
    visibility:hidden;
 
    position:absolute;
 
    color:#666666;
 
    background-color:#FFFFFF;
 
    font-family:arial,helvetica,verdana,sans-serif;
 
    padding:8px;
 
    border:2px solid #556CB5;
 
    font:100% sans-serif;
 
    width:auto;
 
    opacity:1.0;
 
}
 

	
 
.yui-tt-shadow {
 
    display: none;
 
}
 
/** end of Tooltip **/ 
 

	
 

	
 
div#main {
 
	padding: 5px;
 
}
 

	
pylons_app/public/js/graph.js
Show inline comments
 
@@ -16,26 +16,26 @@ var colors = [
 
	[ 0.0, 1.0, 0.0 ],
 
	[ 0.0, 1.0, 1.0 ],
 
	[ 0.0, 0.0, 1.0 ],
 
	[ 1.0, 0.0, 1.0 ],
 
	[ 1.0, 1.0, 0.0 ],
 
	[ 0.0, 0.0, 0.0 ]
 
];
 

	
 
function BranchRenderer() {
 
	
 
	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)';
 
	this.cur = [0, 0];
 
	this.max_column = 1;
 
	this.line_width = 3;
 
	this.bg = [0, 4];
 
	this.cell = [2, 0];
 
	this.revlink = '';
 
	
 
	this.scale = function(height) {
 
		this.box_size = Math.floor(height/1.2);
0 comments (0 inline, 0 general)