theme & demo updates

This commit is contained in:
Mottie 2013-11-08 02:43:57 -06:00
parent 774192bf35
commit b312c707c3
9 changed files with 404 additions and 29 deletions

View File

@ -55,6 +55,8 @@
/* processing icon */
.tablesorter-bootstrap .tablesorter-processing {
background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=');
background-position: center center !important;
background-repeat: no-repeat !important;
position: absolute;
z-index: 1000;
}

View File

@ -114,7 +114,7 @@
/* caption */
caption {
background: #fff;
background: #202020;
}
/* filter widget */

View File

@ -0,0 +1,321 @@
[
{
"theme_name": "base",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "black-tie",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/black-tie/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "blitzer",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/blitzer/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "cupertino",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/cupertino/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "dark-hive",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/dark-hive/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "dot-luv",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/dot-luv/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "eggplant",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/eggplant/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "excite-bike",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/excite-bike/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "flick",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/flick/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "hot-sneaks",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/hot-sneaks/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "humanity",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/humanity/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "le-frog",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/le-frog/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "mint-choc",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/mint-choc/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "overcast",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/overcast/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "pepper-grinder",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/pepper-grinder/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "redmond",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/redmond/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "smoothness",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/smoothness/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "south-street",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/south-street/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "start",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/start/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "sunny",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/sunny/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "swanky-purse",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/swanky-purse/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "trontastic",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/trontastic/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "ui-darkness",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/ui-darkness/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "ui-lightness",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/ui-lightness/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "vader",
"theme_url": "http://code.jquery.com/ui/1.10.0/themes/vader/jquery-ui.css",
"group": "Official",
"active": "yes",
"author": "jQuery Project",
"license": "http://jquery.org/license"
},
{
"theme_name": "aristo",
"theme_url": "http://taitems.github.com/Aristo-jQuery-UI-Theme/css/Aristo/Aristo.css",
"group": "3rd-party",
"active": "yes",
"author": "https://github.com/taitems/Aristo-jQuery-UI-Theme",
"license": "MIT"
},
{
"theme_name": "jquery-ui-bootstrap",
"theme_url": "http://addyosmani.github.com/jquery-ui-bootstrap/css/custom-theme/jquery-ui-1.8.16.custom.css",
"group": "3rd-party",
"active": "yes",
"author": "http://addyosmani.github.com/jquery-ui-bootstrap",
"license": "Copyright 2012, Addy Osmani - Dual licensed under the MIT or GPL Version 2 licenses"
},
{
"theme_name": "Absolution",
"hosted_locally": "yes",
"theme_url": "/lib/jquery-ui-1.10.0.custom/css/3rd-party/Absolution/absolution.css",
"group": "3rd-party",
"active": "yes",
"author": "http://www.michaelvanderheeren.be/archives/382",
"license": "https://github.com/michaelvanderheeren/Absolution/blob/master/README.md",
"notes": "You are free to redistribute or change the theme. You can change the theme, but you should keep the references to contributors!"
},
{
"theme_name": "Selene",
"theme_url": "http://gravityonmars.github.com/Selene/css/ui-selene/jquery-ui-1.8.17.custom.css",
"group": "3rd-party",
"active": "yes",
"author": "https://github.com/gravityonmars/Selene",
"license": "MIT"
},
{
"theme_name": "kiandra-delta",
"theme_url": "http://kiandra.github.com/Delta-jQuery-UI-Theme/theme/jquery-ui.css",
"group": "3rd-party",
"active": "yes",
"author": "https://github.com/kiandra/Delta-jQuery-UI-Theme",
"license": "Dual licensed under the MIT or GPL Version 2 licenses."
},
{
"theme_name": "arctic",
"theme_url": "http://cdn.wijmo.com/themes/arctic/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "midnight",
"theme_url": "http://cdn.wijmo.com/themes/midnight/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "rocket",
"theme_url": "http://cdn.wijmo.com/themes/rocket/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "cobalt",
"theme_url": "http://cdn.wijmo.com/themes/cobalt/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "sterling",
"theme_url": "http://cdn.wijmo.com/themes/sterling/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "metro",
"theme_url": "http://cdn.wijmo.com/themes/metro/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "metro-dark",
"theme_url": "http://cdn.wijmo.com/themes/metro-dark/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license"
},
{
"theme_name": "bootstrap-wijmo",
"theme_url": "http://cdn.wijmo.com/themes/bootstrap/jquery-ui.css",
"group": "Wijmo",
"active": "yes",
"author": "http://addyosmani.github.com/jquery-ui-bootstrap",
"license": "Copyright 2012, Addy Osmani - Dual licensed under the MIT or GPL Version 2 licenses"
},
{
"theme_name": "aristo-wijmo",
"theme_url": "http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css",
"group": "Wijmo",
"active": "yes",
"author": "http://wijmo.com",
"license": "http://wijmo.com/license",
"notes": "Based on the Aristo theme concept created by 280 North and Pinvoke (https://github.com/280north/aristo)"
}
]

View File

@ -33,7 +33,7 @@ pre.normal {background-color:transparent;border:none;border-left-width:0;overflo
#start,#case,.bright {color:#007baa;}
#demo strong {color:#a00;}
hr {height:1px;}
ul {color:#333;list-style:square;}
ul {list-style:square;}
#banner {margin:20px 20px 5px 20px;padding:0;text-align:left;}
#banner *,.demo h1,.demo h1 em {color:#232121;font-family:Georgia, Palatino, Times New Roman;font-size:30px;font-style:normal;font-weight:400;margin:0;padding:0;}
#banner h1 {display:block;float:left;}

View File

@ -8,7 +8,6 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<!-- Demo stuff -->
<link class="ui-theme" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/themes/cupertino/jquery-ui.css">
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<link rel="stylesheet" href="css/jq.css">
<link href="css/prettify.css" rel="stylesheet">
@ -18,8 +17,20 @@
th { width: 15%; }
</style>
<!-- Tablesorter: required -->
<link href="../css/theme.blue.css" rel="stylesheet">
<!-- jQuery UI theme switcher: https://github.com/pontikis/jui_theme_switch/ -->
<style>
th { width: 15%; }
.reset { margin: 4px; }
#switcher { float: left; }
.switcher_container { padding: 5px; }
.switcher_list { padding: 2px; }
.switcher_label { margin-right: 5px; }
</style>
<script src="js/jquery.jui_theme_switch.min.js"></script>
<!-- Tablesorter: required; also include any of the jQuery UI themes -->
<link id="ui-theme" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css">
<link href="../css/theme.jui.css" rel="stylesheet">
<link href="../css/filter.formatter.css" rel="stylesheet">
<script src="../js/jquery.tablesorter.js"></script>
<script src="../js/jquery.tablesorter.widgets.js"></script>
@ -30,17 +41,23 @@
heightStyle: 'content',
collapsible : true
});
$('#switcher').jui_theme_switch({
stylesheet_link_id : 'ui-theme',
datasource_url : 'assets/theme_switcher.json'
});
});
</script>
<script id="js">$(function() {
// call the tablesorter plugin
$("table").tablesorter({
theme: 'blue',
theme: 'jui',
// hidden filter input/selects will resize the columns, so try to minimize the change
widthFixed : true,
// initialize zebra striping and filter widgets
widgets: ["zebra", "filter", "stickyHeaders"],
widgets: ["zebra", "filter", "stickyHeaders", "uitheme"],
widgetOptions : {
// jQuery selector string of an element used to reset the filters
filter_reset : 'button.reset',
@ -151,11 +168,11 @@
<li>Add the following code to apply a slider to filter a column:<pre class="prettyprint lang-javascript">$(function() {
$("table").tablesorter({
theme: 'blue',
theme: 'jui',
// hidden filter input/selects will resize the columns, so try to minimize the change
widthFixed : true,
// initialize zebra striping and filter widgets
widgets: ["zebra", "filter"],
widgets: ["zebra", "filter", "uitheme"],
widgetOptions : {
// jQuery selector string of an element used to reset the filters
filter_reset : 'button.reset',
@ -213,11 +230,11 @@
<li>Add the following code to apply a range slider to filter a column:<pre class="prettyprint lang-javascript">$(function() {
$("table").tablesorter({
theme: 'blue',
theme: 'jui',
// hidden filter input/selects will resize the columns, so try to minimize the change
widthFixed : true,
// initialize zebra striping and filter widgets
widgets: ["zebra", "filter"],
widgets: ["zebra", "filter", "uitheme"],
widgetOptions : {
// jQuery selector string of an element used to reset the filters
filter_reset : 'button.reset',
@ -256,11 +273,11 @@
<li>Add the following code to apply a spinner to filter a column:<pre class="prettyprint lang-javascript">$(function() {
$("table").tablesorter({
theme: 'blue',
theme: 'jui',
// hidden filter input/selects will resize the columns, so try to minimize the change
widthFixed : true,
// initialize zebra striping and filter widgets
widgets: ["zebra", "filter"],
widgets: ["zebra", "filter", "uitheme"],
widgetOptions : {
// jQuery selector string of an element used to reset the filters
filter_reset : 'button.reset',
@ -299,11 +316,11 @@
<li>Add the following code to apply a datepicker comparison selector to the filter row:<pre class="prettyprint lang-javascript">$(function() {
$("table").tablesorter({
theme: 'blue',
theme: 'jui',
// hidden filter input/selects will resize the columns, so try to minimize the change
widthFixed : true,
// initialize zebra striping and filter widgets
widgets: ["zebra", "filter"],
widgets: ["zebra", "filter", "uitheme"],
widgetOptions : {
// jQuery selector string of an element used to reset the filters
filter_reset : 'button.reset',
@ -345,11 +362,11 @@
<li>Add the following code to apply a datepicker range selector to the filter row:<pre class="prettyprint lang-javascript">$(function() {
$("table").tablesorter({
theme: 'blue',
theme: 'jui',
// hidden filter input/selects will resize the columns, so try to minimize the change
widthFixed : true,
// initialize zebra striping and filter widgets
widgets: ["zebra", "filter"],
widgets: ["zebra", "filter", "uitheme"],
widgetOptions : {
// jQuery selector string of an element used to reset the filters
filter_reset : 'button.reset',
@ -418,7 +435,9 @@
</div>
<h1>Demo</h1>
<div id="switcher"></div>
<button type="button" class="reset">Reset Search</button>
<br>
<div id="demo"><table class="tablesorter">
<thead>
<tr>

View File

@ -17,6 +17,7 @@
<link rel="stylesheet" href="../css/theme.blue.css">
<script src="../js/jquery.tablesorter.js"></script>
<script src="../js/jquery.tablesorter.widgets.js"></script>
<script src="../js/parsers/parser-ignore-articles.js"></script>
<script id="js">$(function() {
@ -128,7 +129,7 @@
<tr>
<th>Rank</th>
<th>Rating</th>
<th>Title</th>
<th class="sorter-ignoreArticles">Title</th>
<th>Votes</th>
</tr>
</thead>

View File

@ -5,7 +5,7 @@
<title>jQuery plugin: Tablesorter 2.0 - jQuery UITheme Widget (jQuery UI)</title>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<!-- Demo stuff -->
<link rel="stylesheet" href="css/jq.css">
@ -13,9 +13,17 @@
<script src="js/prettify.js"></script>
<script src="js/docs.js"></script>
<!-- jQuery UI theme switcher: https://github.com/pontikis/jui_theme_switch/ -->
<style>
.switcher_container { padding: 5px; }
.switcher_list { padding: 2px; }
.switcher_label { margin-right: 5px; }
</style>
<script src="js/jquery.jui_theme_switch.min.js"></script>
<!-- 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="../css/theme.jui.css">
<link id="ui-theme" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css">
<link href="../css/theme.jui.css" rel="stylesheet">
<script src="../js/jquery.tablesorter.js"></script>
<script src="../js/jquery.tablesorter.widgets.js"></script>
@ -67,6 +75,15 @@
});</script>
<script>
$(function(){
$('#switcher').jui_theme_switch({
stylesheet_link_id : 'ui-theme',
datasource_url : 'assets/theme_switcher.json'
});
});
</script>
</head>
<body>

View File

@ -445,12 +445,14 @@
<td>&quot;&quot;</td>
<td>Additional CSS class applied to style the header with a ascending sort - <span class="version updated">v2.11</span>.
<div class="collapsible"><br>
Changed to empty string in v2.11, as the <code>&quot;tablesorter-headerAsc&quot;</code> class will always be added to a header cell with an ascending sort; this option now contains any additional class names to add. Previous default value changed v2.5.
Changed to empty string (<code>&quot;&quot;</code>) in v2.11, as the <code>&quot;tablesorter-headerAsc&quot;</code> class will always be added to a header cell with an ascending sort; this option now contains any additional class names to add.
<p>Example from the blue theme:</p>
<pre class="prettyprint lang-css">.tablesorter-blue .tablesorter-headerAsc {
background-color: #9fbfdf;
background-image: url(black-asc.gif);
}</pre></div>
}</pre>
Default changed v2.5 to <code>&quot;tablesorter-headerAsc&quot;</code>. Default changed v2.1.7 to <code>&quot;tablesorter-headerSortUp&quot;</code>. Original default: <code>&quot;headerSortUp&quot;</code></div>
</td>
<td></td>
</tr>
@ -459,7 +461,7 @@
<td><a class="toggle" href="#">cssChildRow</a></td>
<td>String</td>
<td>&quot;tablesorter-childRow&quot;</td>
<td>Add this css class to a child row that should always be attached to its parent. Click on the &quot;cssChildRow&quot; link to toggle the view on the attached child row. Previous default was &quot;expand-child&quot; (Changed in v2.4).</td>
<td>Add this css class to a child row that should always be attached to its parent. Click on the &quot;cssChildRow&quot; link to toggle the view on the attached child row. Previous default was <code>&quot;expand-child&quot;</code> (Changed in v2.4).</td>
<td>Ex:<a href="example-child-rows.html">1</a> <a href="example-child-rows-filtered.html">2</a></td>
</tr>
<tr class="tablesorter-childRow">
@ -516,12 +518,13 @@
<td>&quot;&quot;</td>
<td>Additional CSS class applied to style the header with a descending sort - <span class="version updated">v2.11</span>.
<div class="collapsible"><br>
Changed to empty string in v2.11, as the <code>&quot;tablesorter-headerDesc&quot;</code> class will always be added to a header cell with a descending sort; this option now contains any additional class names to add. Previous default value changed v2.5.
Changed to empty string in v2.11, as the <code>&quot;tablesorter-headerDesc&quot;</code> class will always be added to a header cell with a descending sort; this option now contains any additional class names to add.
<p>Example from the blue theme:</p>
<pre class="prettyprint lang-css">.tablesorter-blue .tablesorter-headerDesc {
background-color: #8cb3d9;
background-image: url(black-desc.gif);
}</pre></div>
}</pre>
Default changed v2.5 to <code>&quot;tablesorter-headerDesc&quot;</code>. Default changed v2.1.7 to <code>&quot;tablesorter-headerSortDown&quot;</code>. Original default: <code>&quot;headerSortDown&quot;</code></div>
</td>
<td></td>
</tr>
@ -541,7 +544,8 @@
padding: 4px 20px 4px 4px;
white-space: normal;
cursor: pointer;
}</pre></div>
}</pre>
Default changed v2.1.7 to <code>&quot;tablesorter-header&quot;</code>. Original default: <code>&quot;header&quot;</code></div>
</td>
<td></td>
</tr>
@ -1211,7 +1215,7 @@ $(function(){
$("#myTable").tableSorter( { textExtraction: myTextExtraction } );
});</pre>
tablesorter will pass the current table cell object for you to parse and return. Thanks to Josh Nathanson for the examples. Updated to a jQuery example by Rob G (Mottie).
<p>Now if the text you are finding in the script above is say a number, then just include the <a href="#headers"><code>headers</code></a> sorter option to specify how to sort it. Also in this example, we will specify that the special textExtraction code is only needed for the second column ("1" because we are using a zero-based index). All other columns will ignore this textExtraction function.</p>
<p>Now if the text you are finding in the script above is say a number, then just include the <a href="#headers"><code>headers</code></a> sorter option to specify how to sort it. Also in this example, we will specify that the special textExtraction code is only needed for the second column (<code>1</code> because we are using a zero-based index). All other columns will ignore this textExtraction function.</p>
<p>Added <code>table</code> and <code>cellIndex</code> variables to the <code>textExtraction</code> function in version 2.1.2.</p>
<pre class="prettyprint lang-javascript">$(function(){
$("table").tablesorter({
@ -1283,7 +1287,7 @@ $(function(){
textSorter : {
// replace INDIVIDUAL COLUMN text sorter functions
0 : function(a, b, direction, columnIndex, table){
// same as $.tablesorter.sortText
// same as $.tablesorter.sortText (basic alphabetical sort)
// direction: true = ascending; false = descending
// columnIndex: zero-based index of the current table column being sorted
// table: table DOM element (access options by using table.config)

11
docs/js/jquery.jui_theme_switch.min.js vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* @fileOverview jui_theme_switch: jquery plugin to switch juery-ui themes
* <p>License MIT
* <br />Copyright 2012 Christos Pontikis <a href="http://pontikis.net">http://pontikis.net</a>
* <br />Project page <a href="http://pontikis.net/labs/jui_theme_switch">http://pontikis.net/labs/jui_theme_switch</a>
* <br />Minified using Online YUI Compressor http://www.refresh-sf.com/yui/
* @version 1.0.6 (21 Jan 2013)
* @author Christos Pontikis http://pontikis.net
* @requires jquery, jquery-ui
*/
"use strict";(function(e){var d="jui_theme_switch",c="jui_theme_switch_status";var a={init:function(f){var g=this;return this.each(function(){var k=g.data(d);if(typeof(k)=="undefined"){var n=g.jui_theme_switch("getDefaults");k=e.extend({},n,f)}else{k=e.extend({},k,f)}g.data(d,k);if(typeof g.data(c)==="undefined"){g.data(c,{});g.data(c)["selected_theme"]={}}g.unbind("onChangeTheme").bind("onChangeTheme",k.onChangeTheme);g.unbind("onDisplay").bind("onDisplay",k.onDisplay);var p=g.attr("id"),r,q,s="",h=b(k.switcher_id_prefix,p),u=b(k.switcher_label_id_prefix,p),t,m,w=e("#"+k.stylesheet_link_id),o="",l,j="",v="";e.ajax({url:k.datasource_url,dataType:"json",cache:false,success:function(i){r=i.length;s+='<label id="'+u+'" for="'+h+'">'+k.switcher_label+"</label>";s+='<select id="'+h+'" size="'+k.list_size+'">';for(q=0;q<r;q++){if(l=i[q]["active"]=="yes"||k.show_all=="yes"){if(k.use_groups=="yes"){l=i[q]["group"];if(l!==j){s+='<optgroup label="'+l+'">';j=l}}if(k.default_theme==i[q]["theme_name"]){g.data(c)["selected_theme"]=i[q];o=' selected="selected"'}else{o=""}v="";if(i[q].hasOwnProperty("hosted_locally")){if(i[q]["hosted_locally"]=="yes"){v=k.project_url}}s+='<option value="'+v+i[q]["theme_url"]+'"'+o+">";s+=i[q]["theme_name"];s+="</option>";if(k.use_groups=="yes"){if(q<r-1&&i[parseInt(q)+1]["group"]!==j){s+="</optgroup>"}}}}s+="</select>";g.html(s);m=e("#"+u);t=e("#"+h);m.removeClass().addClass(k.labelClass);t.removeClass().addClass(k.listClass);g.removeClass().addClass(k.containerClass);g.off("change",t).on("change",t,function(){w.attr("href",t.val());for(q=0;q<r;q++){if(e("#"+h+" option:selected").text()==i[q]["theme_name"]){g.data(c)["selected_theme"]=i[q];break}}g.triggerHandler("onChangeTheme",i[q])});g.triggerHandler("onDisplay")}})})},getDefaults:function(){return{switcher_label:"Select theme",default_theme:"ui-lightness",list_size:"1",use_groups:"yes",show_all:"no",project_url:"",containerClass:"switcher_container",labelClass:"switcher_label",listClass:"switcher_list",switcher_label_id_prefix:"lbl_",switcher_id_prefix:"switcher_",onChangeTheme:function(){},onDisplay:function(){}}},getOption:function(f){var g=this;return g.data(d)[f]},getAllOptions:function(){var f=this;return f.data(d)},setOption:function(f,i,h){var g=this;g.data(d)[f]=i;if(h){g.jui_theme_switch("init")}},refresh:function(){var f=this;f.jui_theme_switch()},destroy:function(){return e(this).each(function(){var f=e(this);f.removeData(d)})},getTheme:function(){var f=this;return f.data(c)["selected_theme"]}};var b=function(g,f){return g+f};e.fn.jui_theme_switch=function(g){if(this.size()!=1){var f="You must use this plugin ("+d+") with a unique element (at once)";this.html('<span style="color: red;">ERROR: '+f+"</span>");e.error(f)}if(a[g]){return a[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return a.init.apply(this,arguments)}else{e.error("Method "+g+" does not exist on jQuery."+d)}}}})(jQuery);