/trunk/interfaces/squelettes/css/referentiel/referentiel.css |
---|
54,16 → 54,19 |
hr{ |
color:#62210F;} |
table{ |
border-collapse:collapse;} |
table{ |
border:1px solid #36560B; |
border-collapse: collapse;} |
border-collapse: collapse; |
width:100%; |
margin:0;} |
td,th{ |
border:1px solid #36560B; |
padding:5px;} |
padding:7px 5px;} |
th{ |
background-color:#EEE;} |
caption{ |
border:1px solid #36560B; |
background-color:#EEE; |
font-weight:bold; |
margin:2px;} |
padding:2px;} |
img{ |
border:0;} |
img a{ |
/trunk/interfaces/squelettes/form_version.tpl.html |
---|
8,6 → 8,8 |
} |
return ok; |
}); |
// Rend les tables portant la classe "defilante" srollable |
$('.defilante').chromatable(); |
}); |
</script> |
<h1>Versionnage du référentiel « <?=$ref?> »</h1> |
150,7 → 152,7 |
<h2>Versions</h2> |
<table> |
<table class="defilante"> |
<caption>Versions <?=strftime('à %H:%M:%S le %d %B %Y')?></caption> |
<thead> |
<tr> |
/trunk/interfaces/squelettes/js/jquery.chromatable.js |
---|
New file |
0,0 → 1,146 |
/* |
* File: chromatable.js |
* Version: 1.3.0 |
* CVS: $Id$ |
* Description: Make a "sticky" header at the top of the table, so it stays put while the table scrolls |
* Author: Zachary Siswick |
* Created: Thursday 19 November 2009 8:53pm |
* Language: Javascript |
* |
*/ |
(function($){ |
$.chromatable = { |
// Default options |
defaults: { |
//specify a pixel dimension, auto, or 100% |
width: "900px", |
height: "300px", |
scrolling: "yes" |
} |
}; |
$.fn.chromatable = function(options){ |
// Extend default options |
var options = $.extend({}, $.chromatable.defaults, options); |
return this.each(function(){ |
// Add jQuery methods to the element |
var $this = $(this); |
var $uniqueID = $(this).attr("ID") + ("wrapper"); |
//Add dimentsions from user or default parameters to the DOM elements |
$(this).css('width', options.width).addClass("_scrolling"); |
$(this).wrap('<div class="scrolling_outer"><div id="'+$uniqueID+'" class="scrolling_inner"></div></div>'); |
$(".scrolling_outer").css({'position':'relative'}); |
$("#"+$uniqueID).css({'overflow-x':'hidden', 'overflow-y':'auto','padding-right':'17px'}); |
$("#"+$uniqueID).css('height', options.height); |
$("#"+$uniqueID).css('width', options.width); |
// clone an exact copy of the scrolling table and add to DOM before the original table |
// replace old class with new to differentiate between the two |
$(this).before($(this).clone().attr("id", "").addClass("_thead").css( |
{'width' : 'auto', |
'display' : 'block', |
'position':'absolute', |
'border':'none', |
'border-bottom':'1px solid #CCC', |
'top':'0' |
})); |
// remove all children within the cloned table after the thead element |
$('._thead').children('tbody').remove(); |
$(this).each(function( $this ){ |
// if the width is auto, we need to remove padding-right on scrolling container |
if (options.width == "100%" || options.width == "auto") { |
$("#"+$uniqueID).css({'padding-right':'0px'}); |
} |
if (options.scrolling == "no") { |
$("#"+$uniqueID).before('<a href="#" class="expander" style="width:100%;">Expand table</a>'); |
$("#"+$uniqueID).css({'padding-right':'0px'}); |
$(".expander").each( |
function(int){ |
$(this).attr("ID", int); |
$( this ).bind ("click",function(){ |
$("#"+$uniqueID).css({'height':'auto'}); |
$("#"+$uniqueID+" ._thead").remove(); |
$(this).remove(); |
}); |
}); |
//this is dependant on the jQuery resizable UI plugin |
$("#"+$uniqueID).resizable({ handles: 's' }).css("overflow-y", "hidden"); |
} |
}); |
// Get a relative reference to the "sticky header" |
$curr = $this.prev(); |
// Copy the cell widths across from the original table |
$("thead:eq(0)>tr th",this).each( function (i) { |
$("thead:eq(0)>tr th:eq("+i+")", $curr).width( $(this).width()); |
}); |
//check to see if the width is set to auto, if not, we don't need to call the resizer function |
if (options.width == "100%" || "auto"){ |
// call the resizer function whenever the table width has been adjusted |
$(window).resize(function(){ |
resizer($this); |
}); |
} |
}); |
}; |
// private function to temporarily hide the header when the browser is resized |
function resizer($this) { |
// Need a relative reference to the "sticky header" |
$curr = $this.prev(); |
$("thead:eq(0)>tr th", $this).each( function (i) { |
$("thead:eq(0)>tr th:eq("+i+")", $curr).width( $(this).width()); |
}); |
}; |
})(jQuery); |
/trunk/interfaces/squelettes/traitement.tpl.html |
---|
13,31 → 13,49 |
<?php endforeach; ?> |
<?php endif; ?> |
<?php if (isset($urls_zip)) : ?> |
<h2>Téléchargements</h2> |
<ul> |
<?php foreach ($urls_zip as $nom => $url) : ?> |
<li><a href="<?=$url?>"><?=$nom?></a></li> |
<?php endforeach; ?> |
</ul> |
<?php endif; ?> |
<h2>Résultats</h2> |
<?php if (isset($resultats)) : ?> |
<table id="resultats"> |
<caption>Résultats</caption> |
<thead> |
<tr> |
<th>Numero</th> |
<th>Nom</th> |
<th>Résultat</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<?php $i=1; ?> |
<?php foreach ($resultats as $resultat) : ?> |
<tr> |
<td class="numero <?=$resultat['resultat'] ? 'ok' : 'ko';?>" title="Id:<?=$resultat['id_resultat']?>"><?=$i++?></td> |
<td class="nom <?=$resultat['resultat'] ? 'ok' : 'ko';?>"><a href="<?=$resultat['url']?>"><?=$resultat['nom']?></a></td> |
<td class="<?=$resultat['resultat'] ? 'ok' : 'ko';?>"><span class="resultat"><?=$resultat['resultat'] ? 'ok' : 'ko';?></span></td> |
<td class="description"><?=$resultat['description']?></td> |
</tr> |
<?php endforeach; ?> |
</tbody> |
</table> |
<?php if ($traitement['script'] == 'tests') : ?> |
<table id="resultats"> |
<caption>Résultats</caption> |
<thead> |
<tr> |
<th>Numero</th> |
<th>Nom</th> |
<th>Résultat</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<?php $i=1; ?> |
<?php foreach ($resultats as $resultat) : ?> |
<tr> |
<td class="numero <?=$resultat['resultat'] ? 'ok' : 'ko';?>" title="Id:<?=$resultat['id_resultat']?>"><?=$i++?></td> |
<td class="nom <?=$resultat['resultat'] ? 'ok' : 'ko';?>"><a href="<?=$resultat['url']?>"><?=$resultat['nom']?></a></td> |
<td class="<?=$resultat['resultat'] ? 'ok' : 'ko';?>"><span class="resultat"><?=$resultat['resultat'] ? 'ok' : 'ko';?></span></td> |
<td class="description"><?=$resultat['description']?></td> |
</tr> |
<?php endforeach; ?> |
</tbody> |
</table> |
<?php endif; ?> |
<?php if ($traitement['script'] == 'versionnage') : ?> |
<?php $i=1; ?> |
<?php foreach ($resultats as $resultat) : ?> |
<h3><?=$resultat['nom']?> (Id:<?=$resultat['id_resultat']?>)</h3> |
<p><?=$resultat['message']?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
<?php else : ?> |
<p class="information">Aucun resultat pour ce traitement.</p> |
<p class="information">Aucun resultat pour ce traitement.</p> |
<?php endif; ?> |
<!-- REF - FIN TRAITEMENT --> |
/trunk/interfaces/squelettes/form_tests.tpl.html |
---|
8,6 → 8,8 |
} |
return ok; |
}); |
// Rend les tables portant la classe "defilante" srollable |
$('.defilante').chromatable(); |
}); |
</script> |
<h1>Tests du référentiel « <?=$ref;?> »</h1> |
38,7 → 40,7 |
<?php endif; ?> |
<h2>Tests</h2> |
<table> |
<table class="defilante"> |
<caption>Traitements <?=strftime('à %H:%M:%S le %d %B %Y')?></caption> |
<thead> |
<tr> |