Tooltip des commentaires (A modifier)

This commit is contained in:
Michael RICOIS 2009-03-31 11:17:07 +00:00
parent 2c6af50b74
commit ee2009da4e
2 changed files with 79 additions and 28 deletions

View File

@ -0,0 +1,14 @@
/**
* jquery.simpletip 1.3.1. A simple tooltip plugin
*
* Copyright (c) 2009 Craig Thompson
* http://craigsworks.com
*
* Licensed under GPLv3
* http://www.opensource.org/licenses/gpl-3.0.html
*
* Launch : February 2009
* Version : 1.3.1
* Released: February 5, 2009 - 11:04am
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([3-9a-zB-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){6 Z(f,3){4 7=n;f=b(f);4 5=b(document.createElement(\'div\')).B(3.10).B((3.p)?3.11:\'\').B((3.C)?3.12:\'\').13(3.q).appendTo(f);a(!3.14)5.t();o 5.r();a(!3.C){f.hover(6(c){7.t(c)},6(){7.r()});a(!3.p){f.mousemove(6(c){a(5.D(\'N\')!==\'u\')7.E(c)})}}o{f.click(6(c){a(c.15===f.16(0)){a(5.D(\'N\')!==\'u\')7.r();o 7.t()}});b(v).mousedown(6(c){a(5.D(\'N\')!==\'u\'){4 17=(3.O)?b(c.15).parents(\'.5\').andSelf().filter(6(){d n===5.16(0)}).length:0;a(17===0)7.r()}})};b.18(7,{getVersion:6(){d[1,2,0]},getParent:6(){d f},getTooltip:6(){d 5},getPos:6(){d 5.i()},19:6(8,9){4 e=f.i();a(s 8==\'F\')8=G(8)+e.k;a(s 9==\'F\')9=G(9)+e.l;5.D({k:8,l:9});d 7},t:6(c){3.1a.m(7);7.E((3.p)?P:c);Q(3.1b){g\'H\':5.fadeIn(3.I);h;g\'1c\':5.slideDown(3.I,7.E);h;g\'1d\':3.1e.m(5,3.I);h;w:g\'u\':5.t();h};5.B(3.R);3.1f.m(7);d 7},r:6(){3.1g.m(7);Q(3.1h){g\'H\':5.fadeOut(3.J);h;g\'1c\':5.slideUp(3.J);h;g\'1d\':3.1i.m(5,3.J);h;w:g\'u\':5.r();h};5.removeClass(3.R);3.1j.m(7);d 7},update:6(q){5.13(q);3.q=q;d 7},1k:6(1l,K){3.1m.m(7);5.1k(1l,K,6(){3.1n.m(7)});d 7},L:6(8,9){4 1o=8+5.S();4 1p=9+5.T();4 1q=b(v).width()+b(v).scrollLeft();4 1r=b(v).height()+b(v).scrollTop();d[(1o>=1q),(1p>=1r)]},E:6(c){4 x=5.S();4 y=5.T();a(!c&&3.p){a(3.j.constructor==Array){8=G(3.j[0]);9=G(3.j[1])}o a(b(3.j).attr(\'nodeType\')===1){4 i=b(3.j).i();8=i.k;9=i.l}o{4 e=f.i();4 z=f.S();4 M=f.T();Q(3.j){g\'l\':4 8=e.k-(x/2)+(z/2);4 9=e.l-y;h;g\'bottom\':4 8=e.k-(x/2)+(z/2);4 9=e.l+M;h;g\'k\':4 8=e.k-x;4 9=e.l-(y/2)+(M/2);h;g\'right\':4 8=e.k+z;4 9=e.l-(y/2)+(M/2);h;w:g\'w\':4 8=(z/2)+e.k+20;4 9=e.l;h}}}o{4 8=c.pageX;4 9=c.pageY};a(s 3.j!=\'object\'){8=8+3.i[0];9=9+3.i[1];a(3.L){4 U=7.L(8,9);a(U[0])8=8-(x/2)-(2*3.i[0]);a(U[1])9=9-(y/2)-(2*3.i[1])}}o{a(s 3.j[0]=="F")8=1s(8);a(s 3.j[1]=="F")9=1s(9)};7.19(8,9);d 7}})};b.fn.V=6(3){4 W=b(n).eq(s 3==\'number\'?3:0).K("V");a(W)d W;4 X={q:\'A simple 5\',C:1t,O:1t,14:Y,j:\'w\',i:[0,0],L:Y,p:Y,1b:\'H\',I:1u,1e:P,1h:\'H\',J:1u,1i:P,10:\'5\',R:\'active\',11:\'p\',12:\'C\',focusClass:\'O\',1a:6(){},1f:6(){},1g:6(){},1j:6(){},1m:6(){},1n:6(){}};b.18(X,3);n.each(6(){4 el=new Z(b(n),X);b(n).K("V",el)});d n}})();',[],93,'|||conf|var|tooltip|function|self|posX|posY|if|jQuery|event|return|elemPos|elem|case|break|offset|position|left|top|call|this|else|fixed|content|hide|typeof|show|none|window|default|tooltipWidth|tooltipHeight|elemWidth||addClass|persistent|css|updatePos|string|parseInt|fade|showTime|hideTime|data|boundryCheck|elemHeight|display|focus|null|switch|activeClass|outerWidth|outerHeight|overflow|simpletip|api|defaultConf|true|Simpletip|baseClass|fixedClass|persistentClass|html|hidden|target|get|check|extend|setPos|onBeforeShow|showEffect|slide|custom|showCustom|onShow|onBeforeHide|hideEffect|hideCustom|onHide|load|uri|beforeContentLoad|onContentLoad|newX|newY|windowWidth|windowHeight|String|false|150'.split('|'),0,{}))

View File

@ -17,6 +17,9 @@ $rationsEntrepEvol = array();
try {
$O = $client->getRatios($siren);
//$firephp->log((array)$O,'getRatios');
print '<!--';
print_r($O['result']);
print '-->';
$bilansInfos = $O['result']['BilansInfos'];
$ratiosInfos = $O['result']['RatiosInfos'];
$ratiosEntrep = $O['result']['RatiosEntrep'];
@ -64,47 +67,60 @@ foreach($bilansInfos as $dateCloture){
//Données pour les graphiques évolutions
if ($nbrAnnees-$i!=$nbrAnnees){
$evol_r1[] = array( 'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=> (($ratiosEntrepEvol[$nbrAnnees-$i]['r1']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r1']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r1'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r1']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r1']/1000 : 0 )
);
$evol_r7[] = array( 'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=> (($ratiosEntrepEvol[$nbrAnnees-$i]['r7']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r7']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r7'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r7']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r7']/1000 : 0 )
);
$evol_r10[] = array('date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r10']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r10']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r10'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r10']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r10']/1000 : 0 )
);
$evol_r82[] = array('date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r82']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r82']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r82'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r82']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r82']/1000 : 0 )
);
$evol_r22[] = array('date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r22']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r22']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r22'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r22']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r22']/1000 : 0 )
);
$evol_r231[] = array( 'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r231']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r231']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r231'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r231']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r231']/1000 : 0 )
);
$evol_r232[] = array( 'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r232']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r232']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r232'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r232']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r232']/1000 : 0 )
);
$evol_r87[] = array('date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r87']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r87']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r87'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r87']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r87']/1000 : 0 )
);
$evol_r24[] = array('date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
'value'=>(($ratiosEntrepEvol[$nbrAnnees-$i]['r24']!='NS')||($ratiosEntrep[$nbrAnnees-$i]['r24']!='NS') ? $ratiosEntrepEvol[$nbrAnnees-$i]['r24'] : 0 )
'value'=>(($ratiosEntrep[$nbrAnnees-$i]['r24']!='NS') ? $ratiosEntrep[$nbrAnnees-$i]['r24']/1000 : 0 )
);
}
$i++;
}
//print_r($data);
?>
<script type="text/javascript" src="./js/jquery.simpletip.js"></script>
<script type="text/javascript" src="./js/jtip.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#r1").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r1 > .tooltip").text()});
$("#r7").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r7 > .tooltip").text()});
$("#r10").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r10 > .tooltip").text()});
$("#r82").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r82 > .tooltip").text()});
$("#r22").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r22 > .tooltip").text()});
$("#r231").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r231 > .tooltip").text()});
$("#r232").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r232 > .tooltip").text()});
$("#r87").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r87 > .tooltip").text()});
$("#r24").simpletip({ fixed: true, position: 'bottom', content: $(this).find("#r24 > .tooltip").text()});
});
</script>
<link rel="stylesheet" type="text/css" href="./css/jtip.css" />
<style>
#container
@ -181,6 +197,27 @@ ul{list-style: none;}
ul li{padding-top:3px;}
.tooltip{
display:none;
position: absolute;
padding: 10px 10px;
width: 300px;
z-index: 3;
color: #303030;
background-color: #f5f5b5;
border: 1px solid #DECA7E;
font-family: sans-serif;
font-weight:normal;
font-size: 12px;
line-height: 16px;
}
.info {
margin-left:10px;
cursor:help;
font-weight:bold;
}
</style>
<div id="container">
@ -200,85 +237,85 @@ ul li{padding-top:3px;}
</thead>
<tbody>
<tr>
<td>CHIFFRE D'AFFAIRES</td>
<td>CHIFFRE D'AFFAIRES<a id="r1" class="info">i<div class="tooltip"><?=$ratiosInfos['r1']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r1'); ?></td>
<td class="right"><?php dRatio(1,'r1'); ?></td>
<td class="right"><?php dEvol(1,'r1'); ?></td>
<td class="right"><?php dRatio(0,'r1'); ?></td>
<td class="right"><?php dEvol(0,'r1'); ?></td>
<td><a class="jTip" id="r1" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r1))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr1" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r1))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>RESULTAT COURANT AVANT IMPOTS</td>
<td>RESULTAT COURANT AVANT IMPOTS<a id="r7" class="info">i<div class="tooltip"><?=$ratiosInfos['r7']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r7'); ?></td>
<td class="right"><?php dRatio(1,'r7'); ?></td>
<td class="right"><?php dEvol(1,'r7'); ?></td>
<td class="right"><?php dRatio(0,'r7'); ?></td>
<td class="right"><?php dEvol(0,'r7'); ?></td>
<td><a class="jTip" id="r7" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r7))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr7" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r7))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>RESULTAT NET</td>
<td>RESULTAT NET<a id="r10" class="info">i<div class="tooltip"><?=$ratiosInfos['r10']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r10'); ?></td>
<td class="right"><?php dRatio(1,'r10'); ?></td>
<td class="right"><?php dEvol(1,'r10'); ?></td>
<td class="right"><?php dRatio(0,'r10'); ?></td>
<td class="right"><?php dEvol(0,'r10'); ?></td>
<td><a class="jTip" id="r10" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r10))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr10" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r10))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>FONDS PROPRES</td>
<td>FONDS PROPRES<a id="r82" class="info">i<div class="tooltip"><?=$ratiosInfos['r82']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r82'); ?></td>
<td class="right"><?php dRatio(1,'r82'); ?></td>
<td class="right"><?php dEvol(1,'r82'); ?></td>
<td class="right"><?php dRatio(0,'r82'); ?></td>
<td class="right"><?php dEvol(0,'r82'); ?></td>
<td class="right"><a class="jTip" id="r82" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r82))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td class="right"><a class="jTip" id="gr82" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r82))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>TOTAL BILAN</td>
<td>TOTAL BILAN<a id="r22" class="info">i<div class="tooltip"><?=$ratiosInfos['r22']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r22'); ?></td>
<td class="right"><?php dRatio(1,'r22'); ?></td>
<td class="right"><?php dEvol(1,'r22'); ?></td>
<td class="right"><?php dRatio(0,'r22'); ?></td>
<td class="right"><?php dEvol(0,'r22'); ?></td>
<td><a class="jTip" id="r22" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r22))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr22" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r22))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>FONDS DE ROULEMENT</td>
<td>FONDS DE ROULEMENT<a id="r231" class="info">i<div class="tooltip"><?=$ratiosInfos['r231']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r231'); ?></td>
<td class="right"><?php dRatio(1,'r231'); ?></td>
<td class="right"><?php dEvol(1,'r231'); ?></td>
<td class="right"><?php dRatio(0,'r231'); ?></td>
<td class="right"><?php dEvol(0,'r231'); ?></td>
<td><a class="jTip" id="r231" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r231))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr231" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r231))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>BESOIN EN FONDS DE ROULEMENT</td>
<td>BESOIN EN FONDS DE ROULEMENT<a id="r232" class="info">i<div class="tooltip"><?=$ratiosInfos['r232']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r232'); ?></td>
<td class="right"><?php dRatio(1,'r232'); ?></td>
<td class="right"><?php dEvol(1,'r232'); ?></td>
<td class="right"><?php dRatio(0,'r232'); ?></td>
<td class="right"><?php dEvol(0,'r232'); ?></td>
<td><a class="jTip" id="r232" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r232))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr232" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r232))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>TRESORERIE</td>
<td>TRESORERIE<a id="r87" class="info">i<div class="tooltip"><?=$ratiosInfos['r87']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r87'); ?></td>
<td class="right"><?php dRatio(1,'r87'); ?></td>
<td class="right"><?php dEvol(1,'r87'); ?></td>
<td class="right"><?php dRatio(0,'r87'); ?></td>
<td class="right"><?php dEvol(0,'r87'); ?></td>
<td><a class="jTip" id="r87" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r87))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr87" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r87))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
<tr>
<td>EFFECTIF</td>
<td>EFFECTIF<a id="r24" class="info">i<div class="tooltip"><?=$ratiosInfos['r24']['commentaires']?></div></a></td>
<td class="right"><?php dRatio(2,'r24'); ?></td>
<td class="right"><?php dRatio(1,'r24'); ?></td>
<td class="right"><?php dEvol(1,'r24'); ?></td>
<td class="right"><?php dRatio(0,'r24'); ?></td>
<td class="right"><?php dEvol(0,'r24'); ?></td>
<td><a class="jTip" id="r24" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r24))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
<td><a class="jTip" id="gr24" href="./pages/synthese_dgraph.php?width=375&data=<?=urlencode(serialize($evol_r24))?>" name="Evolution :"><img src="./img/synthese/chart_bar.png" alt="Visionner le graphique"></a></td>
</tr>
</tbody>
</table>