mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT: Improved TableListField header styling. (from r96028)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98104 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
589d9216c9
commit
b03af42994
@ -37,15 +37,17 @@ table.CMSList thead th {
|
||||
background-repeat: repeat-x;
|
||||
background-position: left bottom;
|
||||
background-color: #ebeadb;
|
||||
height: 24px;
|
||||
border-right: 1px solid #aca899;
|
||||
border-left: 1px solid #ffffff;
|
||||
white-space: nowrap;
|
||||
padding: 3px;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.TableField thead th span,
|
||||
.TableListField table.data thead th span {
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
table.TableField thead th a,
|
||||
@ -57,8 +59,6 @@ table.CMSList thead th a {
|
||||
table.TableField thead th span.sortLink,
|
||||
.TableListField table.data thead th span.sortLink,
|
||||
table.CMSList thead th span.sortLink {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -17,15 +17,15 @@ TableListField.prototype = {
|
||||
rules['#'+this.id+' th'] = {
|
||||
initialize: function() {
|
||||
var sortLinks = $$('span.sortLinkHidden a', this);
|
||||
if(sortLinks) Element.hide(sortLinks[0]);
|
||||
if(sortLinks) sortLinks[0].style.visibility = 'hidden';
|
||||
},
|
||||
onmouseover: function(e) {
|
||||
var sortLinks = $$('span.sortLinkHidden a', this);
|
||||
if(sortLinks) Element.show(sortLinks[0]);
|
||||
if(sortLinks) sortLinks[0].style.visibility = 'visible';
|
||||
},
|
||||
onmouseout: function(e) {
|
||||
var sortLinks = $$('span.sortLinkHidden a', this);
|
||||
if(sortLinks) Element.hide(sortLinks[0]);
|
||||
if(sortLinks) sortLinks[0].style.visibility = 'hidden';
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -18,17 +18,16 @@
|
||||
<a href="$SortLink">$Title</a>
|
||||
</span>
|
||||
<span class="sortLink <% if SortBy %><% else %>sortLinkHidden<% end_if %>">
|
||||
<a href="$SortLink"">
|
||||
<% if SortDirection = desc %>
|
||||
<img src="cms/images/bullet_arrow_down.png" alt="<% _t('SORTDESC', 'Sort in descending order') %>" />
|
||||
<% else %>
|
||||
<img src="cms/images/bullet_arrow_up.png" alt="<% _t('SORTASC', 'Sort in ascending order') %>" />
|
||||
<% end_if %>
|
||||
<% if SortDirection = desc %>
|
||||
<a href="$SortLink"><img src="cms/images/bullet_arrow_down.png" alt="<% _t('SORTDESC', 'Sort in descending order') %>" /></a>
|
||||
<% else %>
|
||||
<a href="$SortLink"><img src="cms/images/bullet_arrow_up.png" alt="<% _t('SORTASC', 'Sort in ascending order') %>" /></a>
|
||||
<% end_if %>
|
||||
</a>
|
||||
|
||||
</span>
|
||||
<% else %>
|
||||
$Title
|
||||
<span>$Title</span>
|
||||
<% end_if %>
|
||||
</th>
|
||||
<% end_control %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user