mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Add caption styling to uitheme widget
This commit is contained in:
parent
bf733e0808
commit
954ddeb493
@ -62,7 +62,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* caption */
|
/* caption */
|
||||||
caption {
|
.caption {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* caption */
|
/* caption */
|
||||||
caption {
|
.tablesorter-jui caption {
|
||||||
background: #fff;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* filter widget */
|
/* filter widget */
|
||||||
|
@ -120,6 +120,7 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div id="demo"><table class="tablesorter">
|
<div id="demo"><table class="tablesorter">
|
||||||
|
<caption>Some interesting caption</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
|
@ -313,7 +313,7 @@
|
|||||||
<li><a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.10</span>)</li>
|
<li><a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.10</span>)</li>
|
||||||
<li>UITheme widget:
|
<li>UITheme widget:
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; Modified v2.4)</li>
|
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; <span class="version updated">v2.13.3</span>)</li>
|
||||||
<li><a href="example-widget-bootstrap-theme.html">Bootstrap</a> (v2.4)</li>
|
<li><a href="example-widget-bootstrap-theme.html">Bootstrap</a> (v2.4)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -17,6 +17,7 @@ var ts = $.tablesorter = $.tablesorter || {};
|
|||||||
ts.themes = {
|
ts.themes = {
|
||||||
"bootstrap" : {
|
"bootstrap" : {
|
||||||
table : 'table table-bordered table-striped',
|
table : 'table table-bordered table-striped',
|
||||||
|
caption : 'caption',
|
||||||
header : 'bootstrap-header', // give the header a gradient background
|
header : 'bootstrap-header', // give the header a gradient background
|
||||||
footerRow : '',
|
footerRow : '',
|
||||||
footerCells: '',
|
footerCells: '',
|
||||||
@ -32,6 +33,7 @@ ts.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
|
||||||
|
caption : 'ui-widget-content ui-corner-all',
|
||||||
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 : '',
|
footerRow : '',
|
||||||
footerCells: '',
|
footerCells: '',
|
||||||
@ -167,10 +169,13 @@ ts.addWidget({
|
|||||||
sh = 'tr.' + (wo.stickyHeaders || 'tablesorter-stickyHeader'),
|
sh = 'tr.' + (wo.stickyHeaders || 'tablesorter-stickyHeader'),
|
||||||
rmv = o.sortNone + ' ' + o.sortDesc + ' ' + o.sortAsc;
|
rmv = o.sortNone + ' ' + o.sortDesc + ' ' + o.sortAsc;
|
||||||
if (c.debug) { time = new Date(); }
|
if (c.debug) { time = new Date(); }
|
||||||
|
// initialization code - run once
|
||||||
if (!$t.hasClass('tablesorter-' + theme) || c.theme === theme || !table.hasInitialized){
|
if (!$t.hasClass('tablesorter-' + theme) || c.theme === theme || !table.hasInitialized){
|
||||||
// update zebra stripes
|
// update zebra stripes
|
||||||
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 caption style
|
||||||
|
$t.find('caption').addClass(o.caption);
|
||||||
// add table/footer class names
|
// add table/footer class names
|
||||||
t = $t
|
t = $t
|
||||||
// remove other selected themes; use widgetOptions.theme_remove
|
// remove other selected themes; use widgetOptions.theme_remove
|
||||||
|
Loading…
Reference in New Issue
Block a user