Fix IE7 : cosmetic size of report in access

FIX IE7 : bug with infobulle
Improve infobulle with mouseover and mouseclick
Check browser version and refuse to work if using IE < 7
This commit is contained in:
Dany De Bontridder 2009-10-20 18:28:01 +00:00
parent 1bf3a0a77c
commit e1efdd7bb3
5 changed files with 57 additions and 6 deletions

View file

@ -37,7 +37,30 @@ $cn=DbConnect(dossier::id());
$user=new User($cn);
$user->Check();
$user->check_dossier(dossier::id());
/* Check Browser version if < IE6 then unsupported */
$browser=$_SERVER['HTTP_USER_AGENT'];
if ( strpos($browser,'MSIE 6')!=false ||
strpos($browser,'MSIE 5')!=false ) {
echo <<<EOF
<!--[if lt IE 7]>
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
<div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>
<div style='width: 275px; float: left; font-family: Arial, sans-serif;'>
<div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>Vous utilisez un navigateur dépassé depuis près de 8 ans!</div>
<div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour.</div>
</div>
<div style='width: 75px; float: left;'><a href='http://fr.www.mozilla.com/fr/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
<div style='width: 73px; float: left;'><a href='http://www.apple.com/fr/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
<div style='float: left;'><a href='http://www.google.com/chrome?hl=fr' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
</div>
</div>
<![endif]-->
EOF;
exit();
}
if ( DBVERSION!=dossier::get_version($cn)) {
echo '<h2 class="error">Votre base de données n\'est pas à jour, ';
$a="cliquez ici pour appliquer le patch";
@ -67,7 +90,7 @@ if ( isset($_REQUEST['save_todo_list'])) {
$todo=new Todo_List($cn);
$array=$todo->load_all();
echo '<div style="float:left;width:40%">';
echo '<div style="float:left;width:27%;">';
echo '<fieldset> <legend>Liste des tâches</legend>';
echo '<div id="add_todo_list" style="display:none;text-align:left;line-height:3em">';
echo '<form method="post">';
@ -122,7 +145,7 @@ if ( $rapport->exist() == false ) {
}
if ( $report != 0 ) {
echo '<div style="float:right">';
echo '<div style="float:right;width:27%">';
echo '<fieldset style="background-color:white"><legend>'.$rapport->get_name().'</legend>';
$exercice=$user->get_exercice();
if ( $exercice == 0 ) {
@ -133,7 +156,7 @@ if ( $report != 0 ) {
$result=$rapport->get_row($limit['start'],$limit['end'],'periode');
$ix=0;
echo '<table border="0">';
echo '<table border="0" width="100%">';
foreach ($result as $row) {
$ix++;
$bgcolor=($ix%2==0)?' style="background-color:lightgrey"':'';

View file

@ -21,6 +21,7 @@
var posX=0,posy=0,offsetX=10,offsetY=10;
document.onmousemove=getPosition;
var content=new Array();
content[0]="Donnez le quickcode ou tapez une partie du nom de la fiche puis cliquer sur rechercher, si la recherche ne donne rien, il vous sera proposé de créer une nouvelle fiche";
content[1]="(optionnel) La description est un commentaire libre qui sert à identifier cette opération";
content[2]="Selectionnez le journal où l'opération doit être sauvée";
@ -51,4 +52,4 @@ function getPosition(e) {
function hideBulle(p_ctl) {
d=document.getElementById('bulle');
d.style.visibility="hidden";
}
}

View file

@ -499,7 +499,7 @@ border: 1px solid blue;
background-color:yellow;
top:0;left:0;
visibility:hidden;
z-index:10;
z-index:2;
width:25em;
}

View file

@ -29,6 +29,33 @@ include_once ("class_user.php");
$User=new User($rep);
$User->Check();
/* Check Browser version if < IE6 then unsupported */
$browser=$_SERVER['HTTP_USER_AGENT'];
if ( strpos($browser,'MSIE 6')!=false ||
strpos($browser,'MSIE 5')!=false ) {
echo <<<EOF
<!--[if lt IE 7]>
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
<div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>
<div style='width: 275px; float: left; font-family: Arial, sans-serif;'>
<div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>Vous utilisez un navigateur dépassé depuis près de 8 ans!</div>
<div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour.</div>
</div>
<div style='width: 75px; float: left;'><a href='http://fr.www.mozilla.com/fr/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
<div style='width: 73px; float: left;'><a href='http://www.apple.com/fr/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
<div style='float: left;'><a href='http://www.google.com/chrome?hl=fr' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
</div>
</div>
<![endif]-->
EOF;
exit();
}
html_min_page_start($_SESSION['g_theme']);
include_once("user_menu.php");

View file

@ -779,7 +779,7 @@ class widget {
}
static function infobulle($p_comment){
$r='<A HREF="#" style="display:inline;color:black;background-color:yellow" onClick="showBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">?</A>';
$r='<A HREF="#" style="display:inline;color:black;background-color:yellow" onmouseover="showBulle(\''.$p_comment.'\')" onClick="showBulle(\''.$p_comment.'\')" onmouseout="hideBulle(0)">?</A>';
return $r;
}