Changeset - fc3613065baf
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-08-23 22:04:35
marcin@python-works.com
fixed templating issue with graph, and improved toggle of commiters
2 files changed with 13 insertions and 6 deletions:
0 comments (0 inline, 0 general)
pylons_app/public/css/style.css
Show inline comments
 
@@ -3393,102 +3393,104 @@ table.code-browser .browser-dir {
 
    color: #556CB5;
 
}
 
 
.success_msg,.error_msg,.notice_msg,.warning_msg {
 
    background-position: 10px center;
 
    background-repeat: no-repeat;
 
    font-size: 12px;
 
    font-weight: bold;
 
    min-height: 14px;
 
    line-height: 14px;
 
    margin-bottom: 0px;
 
    margin-top: 0px;
 
    padding: 6px 10px 6px 40px;
 
    display: block;
 
    overflow: auto;
 
}
 
 
#msg_close {
 
    background: transparent url("icons/cross_grey_small.png") no-repeat
 
        scroll 0 0;
 
    cursor: pointer;
 
    height: 16px;
 
    position: absolute;
 
    right: 5px;
 
    top: 5px;
 
    width: 16px;
 
}
 
/* -----------------------------------------------------------
 
	YUI FLOT
 
----------------------------------------------------------- */
 
 
div#commit_history{
 
	float: left;
 
}
 
div#legend_data{
 
	float:left;
 
	
 
}
 
div#legend_container {
 
	float: left;
 
}
 
 
div#legend_container table,div#legend_choices table{
 
	width:auto !important;
 
}
 
 
div#legend_container table td{
 
	border: none !important;
 
	padding: 2px !important;
 
	padding: 0px !important;
 
	height: 20px  !important;
 
}
 
 
div#legend_choices table td{
 
	border: none !important;
 
	padding: 0px !important;
 
	height: 20px  !important;
 
}
 
 
div#legend_choices{
 
	float:left;
 
}
 
 
/* -----------------------------------------------------------
 
    PERMISSIONS TABLE
 
----------------------------------------------------------- */
 
table#permissions_manage{
 
    width: 0 !important;
 
 
}
 
table#permissions_manage span.private_repo_msg{
 
    font-size: 0.8em;
 
    opacity:0.6;
 
    
 
}
 
table#permissions_manage td.private_repo_msg{
 
    font-size: 0.8em;
 
    
 
}
 
table#permissions_manage tr#add_perm_input td{
 
    vertical-align:middle;
 
 
}
 
 
/* -----------------------------------------------------------
 
    GRAVATARS
 
----------------------------------------------------------- */
 
div.gravatar{
 
	background-color:white;
 
	border:1px solid #D0D0D0;
 
	float:left;
 
	margin-right:0.7em;
 
	padding: 2px 2px 0px;
 
}
 
 
/* -----------------------------------------------------------
 
	jquery ui
 
----------------------------------------------------------- */
 
 
.ui-helper-hidden { display: none; }
 
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
 
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
 
 
/* -----------------------------------------------------------
 
	jquery ui -> icons
pylons_app/templates/summary/summary.html
Show inline comments
 
@@ -109,102 +109,107 @@ E.onDOMReady(function(e){
 
			  <div class="label">
 
			      <label>${_('Feeds')}:</label>
 
			  </div>
 
			  <div class="input-short">
 
	            ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_icon')}
 
	            ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_icon')}
 
			  </div>
 
			 </div>				 			 			 
 
	  </div>		 
 
	</div>				
 
</div>
 
        
 
<div class="box box-right"  style="min-height:455px">
 
    <!-- box / title -->
 
    <div class="title">
 
        <h5>${_('Last month commit activity')}</h5>
 
    </div>
 
    
 
    <div class="table">
 
        <div id="commit_history" style="width:560px;height:300px;float:left"></div>
 
    	<div id="legend_data">
 
	    	<div id="legend_container"></div>
 
	    	<div id="legend_choices">
 
				<table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
 
	    	</div>
 
    	</div>
 
		<script type="text/javascript">
 
		
 
		(function () {
 
			var datasets = {${c.commit_data|n}};
 
			var i = 0;
 
		    var choiceContainer = YAHOO.util.Dom.get("legend_choices");
 
		    var choiceContainerTable = YAHOO.util.Dom.get("legend_choices_tables");
 
		    for(var key in datasets) {
 
		        datasets[key].color = i;
 
		        i++;
 
		        choiceContainerTable.innerHTML += '<tr><td>'+
 
		        '<input type="checkbox" name="' + key +'" checked="checked" />'
 
		        +datasets[key].label+
 
		        '</td></tr>';
 
		    };
 
		    
 

	
 
		    function plotAccordingToChoices() {
 
		        var data = [];
 

	
 
		        var inputs = choiceContainer.getElementsByTagName("input");
 
		        for(var i=0; i<inputs.length; i++) {
 
		            if(!inputs[i].checked)
 
		                continue;
 
		            var key = inputs[i].name;
 
		            if (key && datasets[key]){
 
			            if(!inputs[i].checked){
 
				            data.push({label:key,data:[[0,1],]});	
 
				        }
 
			            else{
 
			            	data.push(datasets[key]);
 
			            }
 

	
 
		            var key = inputs[i].name;
 
		            if (key && datasets[key])
 
		                data.push(datasets[key]);
 
		            }
 
		            
 
		        };
 

	
 
		        if (data.length > 0){
 

	
 
				    var plot = YAHOO.widget.Flot("commit_history", data,
 
					        { bars: { show: true, align:'center',lineWidth:4 },
 
			    			  points: { show: true, radius:0,fill:true },
 
			    			  legend:{show:true, container:"legend_container"},
 
			    	          selection: { mode: "xy" },
 
			    	          yaxis: {tickDecimals:0},
 
				              xaxis: { mode: "time", timeformat: "%d",tickSize:[1, "day"],min:${c.ts_min},max:${c.ts_max} }, 
 
				              grid: { hoverable: true, clickable: true,autoHighlight:true },
 
					        });
 
			        
 
				    function showTooltip(x, y, contents) {
 
				        var div=document.getElementById('tooltip');
 
				        if(!div) {
 
				            div = document.createElement('div');
 
				            div.id="tooltip";
 
				            div.style.position="absolute";
 
				            div.style.border='1px solid #fdd';
 
				            div.style.padding='2px';
 
				            div.style.backgroundColor='#fee';
 
				            document.body.appendChild(div);
 
				        }
 
				        YAHOO.util.Dom.setStyle(div, 'opacity', 0);
 
				        div.innerHTML = contents;
 
				        div.style.top=(y + 5) + "px";
 
				        div.style.left=(x + 5) + "px";
 
		
 
				        var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
 
				        anim.animate();
 
				    }
 

	
 
			        var previousPoint = null;
 
			        plot.subscribe("plothover", function (o) {
 
				        var pos = o.pos;
 
				        var item = o.item;
 
				        
 
				        //YAHOO.util.Dom.get("x").innerHTML = pos.x.toFixed(2);
 
				        //YAHOO.util.Dom.get("y").innerHTML = pos.y.toFixed(2);
 
		                if (item) {
 
		                    if (previousPoint != item.datapoint) {
 
		                        previousPoint = item.datapoint;
 
		                        
 
		                        var tooltip = YAHOO.util.Dom.get("tooltip");
 
		                        if(tooltip) {
 
		                        	  tooltip.parentNode.removeChild(tooltip);
0 comments (0 inline, 0 general)