// Added hint box on fieldsDisplay

This commit is contained in:
bMancone
2011-11-09 11:16:36 +00:00
parent 21f1debc96
commit 83dd4ee80d
3 changed files with 46 additions and 2 deletions

View File

@@ -139,7 +139,10 @@
</th>
{foreach $fields_display AS $key => $params}
<th {if isset($params.align)} class="{$params.align}"{/if}>
{$params.title}
{if isset($params.hint)}<span class="hint" name="help_box">{$params.hint}<span class="hint-pointer">&nbsp;</span></span>{/if}
<span class="title_box">
{$params.title}
</span>
{if (!isset($params.orderby) || $params.orderby) && !$simple_header}
<br />
<a href="{$currentIndex}&{$identifier}={$id_cat}&{$table}Orderby={$key|urlencode}&{$table}Orderway=desc&token={$token}">

View File

@@ -764,6 +764,18 @@ div.hint {
position: relative;
}
table tr th .hint {
display: none;
position: absolute;
margin: 30px 5px 5px 5px;
width: 400px;
border: 1px solid #ECE52F;
padding: 8px 6px 8px 34px;
color: #383838;
background: #FFFBE5 url(../img/admin/help2.png) no-repeat 6px 5px;
border-radius:3px;
}
.hintGroup{
position: relative;
margin-top: 10px;
@@ -1753,4 +1765,4 @@ div.progressBarImage
width:24px;
color:#fff;
background:url(../img/loader.gif);
}
}

View File

@@ -436,6 +436,35 @@ if (helpboxes)
}
});
}
if ($('span.title_box'))
{
//Display by rollover
$('span.title_box').mouseover(function() {
//get reference to the hint box
var parent = $(this).parent();
var box = parent.find('.hint:first');
if (box.length > 0)
{
//gets parent position
var left_position = parent.offset().left;
//gets width of the box
var box_width = box.width();
//gets width of the screen
var document_width = $(document).width();
//changes position of the box if needed
if (document_width < (left_position + box_width))
box.css('margin-left', '-' + box_width + 'px');
//shows the box
box.css('display', 'block');
}
});
$('span.title_box').mouseout(function() { $(this).parent().find('.hint:first').css('display', 'none'); });
}
});
}