Make number column sortable ascending only

This commit is contained in:
Brian Miyaji
2014-01-09 16:15:15 +11:00
parent 5faac4cff6
commit c6df9ebca0
2 changed files with 22 additions and 14 deletions

View File

@@ -3,7 +3,9 @@
/* Data Tables */
.sp-data-table thead .sorting,
.sp-data-table thead .sorting_asc,
.sp-data-table thead .sorting_desc {
.sp-data-table thead .sorting_desc,
.sp-data-table thead .sorting_asc_disabled,
.sp-data-table thead .sorting_desc_disabled {
cursor: pointer;
}
.sp-data-table .sorting:after,
@@ -21,6 +23,12 @@
.sp-data-table .sorting_desc:after {
content: "\f140";
}
.sp-data-table .column-number.sorting_asc {
cursor: default;
}
.sp-data-table .column-number:after {
content: "";
}
.sp-data-table .column-name .logo {
vertical-align: middle;
height: 2em;

View File

@@ -1,21 +1,21 @@
(function($) {
// Data tables
$('.sp-data-table').dataTable({
'aaSorting': [],
'bAutoWidth': false,
'bFilter': false,
'bInfo': false,
'bPaginate': false,
'bSort': true,
'oLanguage': {
'oAria': {
'sSortAscending': '',
'sSortDescending': ''
$(".sp-data-table").dataTable({
"aaSorting": [],
"bAutoWidth": false,
"bFilter": false,
"bInfo": false,
"bPaginate": false,
"bSort": true,
"oLanguage": {
"oAria": {
"sSortAscending": "",
"sSortDescending": ""
}
},
'aoColumnDefs': [
{ 'bSortable': false, 'aTargets': [ 0 ] }
"aoColumnDefs": [
{ "asSorting": [ "asc" ], "aTargets": [ 0 ] }
]
});