added footerRow and footerCells to themes

This commit is contained in:
Mottie 2012-12-18 17:49:04 -06:00
parent 7a28b694d8
commit d7f2891a67
8 changed files with 81 additions and 82 deletions

Binary file not shown.

View File

@ -20,7 +20,7 @@
<script src="../js/jquery.tablesorter.widgets.js"></script> <script src="../js/jquery.tablesorter.widgets.js"></script>
<!-- Tablesorter: optional --> <!-- Tablesorter: optional -->
<link rel="stylesheet" href="../addons/pager/jquery.tablesorter.pager.css"> <!-- --> <link rel="stylesheet" href="../addons/pager/jquery.tablesorter.pager.css">
<script src="../addons/pager/jquery.tablesorter.pager.js"></script> <script src="../addons/pager/jquery.tablesorter.pager.js"></script>
<script id="js">$(function() { <script id="js">$(function() {
@ -30,6 +30,8 @@
// look here: http://twitter.github.com/bootstrap/base-css.html#tables // look here: http://twitter.github.com/bootstrap/base-css.html#tables
table : 'table table-bordered table-striped', table : 'table table-bordered table-striped',
header : 'bootstrap-header', // give the header a gradient background header : 'bootstrap-header', // give the header a gradient background
footerRow : '',
footerCells: '',
icons : '', // add "icon-white" to make them white; this icon class is added to the <i> in the header icons : '', // add "icon-white" to make them white; this icon class is added to the <i> in the header
sortNone : 'bootstrap-icon-unsorted', sortNone : 'bootstrap-icon-unsorted',
sortAsc : 'icon-chevron-up', sortAsc : 'icon-chevron-up',

View File

@ -13,9 +13,6 @@
<script src="js/chili/recipes.js"></script> <script src="js/chili/recipes.js"></script>
<script src="js/docs.js"></script> <script src="js/docs.js"></script>
<!-- theme switcher -->
<script src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
<!-- Tablesorter: required; also include any of the jQuery UI themes --> <!-- Tablesorter: required; also include any of the jQuery UI themes -->
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css"> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css">
<link rel="stylesheet" href="../css/theme.jui.css"> <link rel="stylesheet" href="../css/theme.jui.css">
@ -33,6 +30,8 @@
// change default jQuery uitheme icons - find the full list of icons here: http://jqueryui.com/themeroller/ (hover over them for their name) // change default jQuery uitheme icons - find the full list of icons here: http://jqueryui.com/themeroller/ (hover over them for their name)
table : 'ui-widget ui-widget-content ui-corner-all', // table classes table : 'ui-widget ui-widget-content ui-corner-all', // table classes
header : 'ui-widget-header ui-corner-all ui-state-default', // header classes header : 'ui-widget-header ui-corner-all ui-state-default', // header classes
footerRow : '',
footerCells: '',
icons : 'ui-icon', // icon class added to the <i> in the header icons : 'ui-icon', // icon class added to the <i> in the header
sortNone : 'ui-icon-carat-2-n-s', sortNone : 'ui-icon-carat-2-n-s',
sortAsc : 'ui-icon-carat-1-n', sortAsc : 'ui-icon-carat-1-n',
@ -63,18 +62,6 @@
});</script> });</script>
<style>
#switcher { display: inline-block; padding-bottom: 5px; }
</style>
<script>
$(function() {
// Theme switcher
// ********************
$('#switcher').themeswitcher();
});
</script>
</head> </head>
<body> <body>

File diff suppressed because one or more lines are too long

View File

@ -18,6 +18,8 @@ $.tablesorter.themes = {
"bootstrap" : { "bootstrap" : {
table : 'table table-bordered table-striped', table : 'table table-bordered table-striped',
header : 'bootstrap-header', // give the header a gradient background header : 'bootstrap-header', // give the header a gradient background
footerRow : '',
footerCells: '',
icons : '', // add "icon-white" to make them white; this icon class is added to the <i> in the header icons : '', // add "icon-white" to make them white; this icon class is added to the <i> in the header
sortNone : 'bootstrap-icon-unsorted', sortNone : 'bootstrap-icon-unsorted',
sortAsc : 'icon-chevron-up', sortAsc : 'icon-chevron-up',
@ -31,6 +33,8 @@ $.tablesorter.themes = {
"jui" : { "jui" : {
table : 'ui-widget ui-widget-content ui-corner-all', // table classes table : 'ui-widget ui-widget-content ui-corner-all', // table classes
header : 'ui-widget-header ui-corner-all ui-state-default', // header classes header : 'ui-widget-header ui-corner-all ui-state-default', // header classes
footerRow : '',
footerCells: '',
icons : 'ui-icon', // icon class added to the <i> in the header icons : 'ui-icon', // icon class added to the <i> in the header
sortNone : 'ui-icon-carat-2-n-s', sortNone : 'ui-icon-carat-2-n-s',
sortAsc : 'ui-icon-carat-1-n', sortAsc : 'ui-icon-carat-1-n',
@ -124,10 +128,16 @@ $.tablesorter.addWidget({
if (o.even !== '') { wo.zebra[0] += ' ' + o.even; } if (o.even !== '') { wo.zebra[0] += ' ' + o.even; }
if (o.odd !== '') { wo.zebra[1] += ' ' + o.odd; } if (o.odd !== '') { wo.zebra[1] += ' ' + o.odd; }
// add table/footer class names // add table/footer class names
$t t = $t
// remove other selected themes; use widgetOptions.theme_remove // remove other selected themes; use widgetOptions.theme_remove
.removeClass( c.theme === '' ? '' : 'tablesorter-' + c.theme ) .removeClass( c.theme === '' ? '' : 'tablesorter-' + c.theme )
.addClass('tablesorter-' + theme + ' ' + o.table); // add theme widget class name .addClass('tablesorter-' + theme + ' ' + o.table) // add theme widget class name
.find('tfoot');
if (t.length) {
t
.find('tr').addClass(o.footerRow)
.children('th, td').addClass(o.footerCells);
}
c.theme = ''; // clear out theme option so it doesn't interfere c.theme = ''; // clear out theme option so it doesn't interfere
// update header classes // update header classes
$h $h

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "tablesorter", "name": "tablesorter",
"version": "2.5.2", "version": "2.6",
"title": "tablesorter", "title": "tablesorter",
"author": { "author": {
"name": "Christian Bach", "name": "Christian Bach",