Correction tooltip

This commit is contained in:
Michael RICOIS 2012-01-06 13:51:22 +00:00
parent 87cdc96f2a
commit 8f9a4ce91d
2 changed files with 25 additions and 32 deletions

View File

@ -2,10 +2,10 @@
<div>
<ul class="critereSelection">
<?php foreach($this->fields->getByFamille('entreprise') as $name => $label): ?>
<li class="liHover printCritere" name="<?php echo $name; ?>">
<a class="tooltip" title="<?php echo $label['label'];?>" href="<?php echo $this->url(array('controller' => 'index', 'action' => 'save', 'name' => $name))?>">
<?php echo $label['label'];?>
<img src="/themes/default/images/<?php echo (($label['activated'])?'moins':'ajouter'); ?>.png" style="float:right"/>
<li class="liHover printCritere tooltip" name="<?=$name?>">
<a title="<?=$label['label']?>" href="<?=$this->url(array('controller' => 'index', 'action' => 'save', 'name' => $name))?>">
<?=$label['label']?>
<img src="/themes/default/images/<?=(($label['activated'])?'moins':'ajouter')?>.png" style="float:right"/>
</a>
</li>
<?php endforeach; ?>
@ -15,10 +15,10 @@
<div>
<ul class="critereSelection">
<?php foreach($this->fields->getByFamille('economique') as $name => $label): ?>
<li class="liHover printCritere" name="<?php echo $name; ?>">
<a class="tooltip" title="<?php echo $label['label'];?>">
<?php echo $label['label'];?>
<img src="" style="float:right"/>
<li class="liHover printCritere tooltip" name="<?=$name?>">
<a title="<?=$label['label']?>">
<?=$label['label']?>
<img src="/themes/default/images/<?=(($label['activated'])?'moins':'ajouter')?>.png" style="float:right"/>
</a>
</li>
<?php endforeach; ?>
@ -28,10 +28,10 @@
<div>
<ul class="critereSelection">
<?php foreach($this->fields->getByFamille('geographique') as $name => $label): ?>
<li class="liHover printCritere" name="<?php echo $name; ?>">
<a class="tooltip" title="<?php echo $label['label'];?>">
<?php echo $label['label'];?>
<img src="" style="float:right"/>
<li class="liHover printCritere tooltip" name="<?=$name?>">
<a title="<?=$label['label']?>">
<?=$label['label']?>
<img src="/themes/default/images/<?=(($label['activated'])?'moins':'ajouter')?>.png" style="float:right"/>
</a>
</li>
<?php endforeach; ?>
@ -41,10 +41,10 @@
<div>
<ul class="critereSelection">
<?php foreach($this->fields->getByFamille('juridique') as $name => $label): ?>
<li class="liHover printCritere" name="<?php echo $name; ?>">
<a class="tooltip" title="<?php echo $label['label'];?>">
<?php echo $label['label'];?>
<img src="" style="float:right"/>
<li class="liHover printCritere tooltip" name="<?=$name?>">
<a title="<?=$label['label']?>">
<?=$label['label']?>
<img src="/themes/default/images/<?=(($label['activated'])?'moins':'ajouter')?>.png" style="float:right"/>
</a>
</li>
<?php endforeach; ?>
@ -54,11 +54,11 @@
<div>
<ul class="critereSelection">
<?php foreach($this->fields->getByFamille('financier') as $name => $label): ?>
<li class="liHover printCritere" name="<?php echo $name; ?>">
<a class="tooltip" title="<?php echo $label['label'];?>">
<?php echo $label['label'];?>
<img src="" style="float:right"/>
</a>
<li class="liHover printCritere tooltip" name="<?=$name?>">
<a class="tooltip" title="<?=$label['label']?>">
<?=$label['label']?>
<img src="/themes/default/images/<?=(($label['activated'])?'moins':'ajouter')?>.png" style="float:right"/>
</a>
</li>
<?php endforeach; ?>
</ul>

View File

@ -4,10 +4,9 @@ $(document).ready(function(){
cookie: { expires: 1 },
});
$(".tooltip").each(function(){
var title = $(this).attr('title');
$("li.tooltip").each(function(){
var title = $('a', this).attr('title');
var width = $(this).attr('wdth');
$(this).attr('title', '');
$(this).qtip({
solo:true,
content: title,
@ -16,14 +15,8 @@ $(document).ready(function(){
classes: "ui-tooltip-dark"
},
position: {
at: $('#at').val(),
my: $('#my').val(),
viewport: $(window),
adjust: {
method: $('#adjust_method').val(),
x: parseInt($('#adjust_x').val(), 10) || 0,
y: parseInt($('#adjust_y').val(), 10) || 0
}
my: 'top right',
at: 'bottom right',
}
});
});