pull/51/merge
Elad Efrat 11 years ago
commit 41bebe435f

@ -3,6 +3,10 @@ div.dataTables_length label {
float: left; float: left;
text-align: left; text-align: left;
} }
html[dir='rtl'] div.dataTables_length label {
float: right;
text-align: right;
}
div.dataTables_length select { div.dataTables_length select {
width: 75px; width: 75px;
@ -12,6 +16,9 @@ div.dataTables_filter label {
font-weight: normal; font-weight: normal;
float: right; float: right;
} }
html[dir='rtl'] div.dataTables_filter label {
float: left;
}
div.dataTables_filter input { div.dataTables_filter input {
width: 16em; width: 16em;
@ -25,6 +32,9 @@ div.dataTables_paginate {
float: right; float: right;
margin: 0; margin: 0;
} }
html[dir='rtl'] div.dataTables_paginate {
float: left;
}
div.dataTables_paginate ul.pagination { div.dataTables_paginate ul.pagination {
margin: 2px 0; margin: 2px 0;
@ -54,17 +64,43 @@ table.dataTable thead .sorting_desc_disabled {
cursor: pointer; cursor: pointer;
} }
table.dataTable thead .sorting { background: url('../images/sort_both.png') no-repeat center right; } /*
table.dataTable thead .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; } * Use Glyphicons Halflings from Bootstrap 3 instead of images.
table.dataTable thead .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; } *
* Relevant icons:
table.dataTable thead .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; } *
table.dataTable thead .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; } * Glyphicons Halflings (default)
* glyphicon-sort '\e150' sort
table.dataTable thead > tr > th { * glyphicon-sort-by-attributes '\e155' asc
padding-left: 18px; * glyphicon-sort-by-attributes-alt '\e156' desc
padding-right: 18px; *
* Font Awesome
* fa-sort '\f0dc' sort
* fa-caret-up '\f0d8' asc
* fa-caret-down '\f0d7' desc
*/
table.table thead .sorting:after,
table.table thead .sorting_asc:after,
table.table thead .sorting_desc:after,
table.table thead .sorting_asc_disabled:after,
table.table thead .sorting_desc_disabled:after {
font-family: 'Glyphicons Halflings';
text-align: right;
float: right;
}
html[dir='rtl'] table.table thead .sorting:after,
html[dir='rtl'] table.table thead .sorting_asc:after,
html[dir='rtl'] table.table thead .sorting_desc:after,
html[dir='rtl'] table.table thead .sorting_asc_disabled:after,
html[dir='rtl'] table.table thead .sorting_desc_disabled:after {
text-align: left;
float: left;
} }
table.table thead .sorting:after { content: '\e150'; opacity: 0.2; }
table.table thead .sorting_asc:after { content: '\e155'; }
table.table thead .sorting_desc:after { content: '\e156'; }
table.table thead .sorting_asc_disabled:after { content: '\e155'; opacity: 0.2; }
table.table thead .sorting_desc_disabled:after { content: '\e156'; opacity: 0.2; }
table.dataTable th:active { table.dataTable th:active {
outline: none; outline: none;

@ -1,9 +1,16 @@
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery','datatables'], factory);
} else {
factory(jQuery);
}
}(function ($) {
/* Set the defaults for DataTables initialisation */ /* Set the defaults for DataTables initialisation */
$.extend( true, $.fn.dataTable.defaults, { $.extend( true, $.fn.dataTable.defaults, {
"sDom": "sDom":
"<'row'<'col-xs-6'l><'col-xs-6'f>r>"+ "<'row'<'col-xs-6'<'pull-left'l>><'col-xs-6'<'pull-right'f>>r>"+
"t"+ "t"+
"<'row'<'col-xs-6'i><'col-xs-6'p>>", "<'row'<'col-xs-6'<'pull-left'i>><'col-xs-6'<'pull-right'p>>>",
"oLanguage": { "oLanguage": {
"sLengthMenu": "_MENU_ records per page" "sLengthMenu": "_MENU_ records per page"
} }
@ -13,8 +20,8 @@ $.extend( true, $.fn.dataTable.defaults, {
/* Default class modification */ /* Default class modification */
$.extend( $.fn.dataTableExt.oStdClasses, { $.extend( $.fn.dataTableExt.oStdClasses, {
"sWrapper": "dataTables_wrapper form-inline", "sWrapper": "dataTables_wrapper form-inline",
"sFilterInput": "form-control input-sm", "sFilterInput": "form-control",
"sLengthSelect": "form-control input-sm" "sLengthSelect": "form-control"
} ); } );
// In 1.10 we use the pagination renderers to draw the Bootstrap paging, // In 1.10 we use the pagination renderers to draw the Bootstrap paging,
@ -248,4 +255,4 @@ if ( $.fn.DataTable.TableTools ) {
} }
} ); } );
} }
}));

Loading…
Cancel
Save