// Added hint box on fieldsDisplay
This commit is contained in:
@@ -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"> </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}">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
29
js/admin.js
29
js/admin.js
@@ -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'); });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user