Filters input on tablesorter tables
This commit is contained in:
mespeche
2013-09-02 15:10:07 +02:00
parent 7f3e90555a
commit f48de82e96
5 changed files with 2708 additions and 12 deletions

View File

@@ -959,20 +959,26 @@ label {
}
// -- Table sorter --
th.header {
th.tablesorter-header {
background: url("data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==") no-repeat center right;
cursor: pointer;
font-weight: bold;
padding-left: 20px;
border-right: 1px solid #dad9c7;
border-left: 1px solid #dad9c7;
margin-left: -1px;
}
}
th.sorter-false {
background: none;
cursor: auto;
padding-left: 0;
border: none;
margin-left: 0;
}
th.headerSortUp {
th.tablesorter-headerAsc {
background: #F9F9F9 url("data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7") no-repeat center right;
}
th.headerSortDown {
th.tablesorter-headerDesc {
background: #F9F9F9 url("data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7") no-repeat center right;
}

View File

@@ -9,7 +9,12 @@
// -- Init tablesorter --
if($('.tablesorter').length){
$('.tablesorter').tablesorter();
$('.tablesorter').tablesorter({
widgets: ["filter"],
widgetOptions : {
filter_cssFilter : 'input-medium',
}
});
}
// -- Effect description

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -31,8 +31,8 @@
<th>Title</th>
<th>Expiration date</th>
<th>Usage left</th>
<th class="{literal}{sorter: false}{/literal}">Actions</th>
</tr>
<th class="sorter-false filter-false">Actions</th>
</tr>
</thead>
<tbody>
<tr>
@@ -92,7 +92,7 @@
<th>Title</th>
<th>Expiration date</th>
<th>Usage left</th>
<th class="{literal}{sorter: false}{/literal}">Actions</th>
<th class="sorter-false filter-false">Actions</th>
</tr>
</thead>
<tbody>
@@ -184,6 +184,10 @@
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/tablesorter/jquery.tablesorter.widgets.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}