Permalink
Browse files

updated themes & ui-theme widget

  • Loading branch information...
1 parent 14c0e39 commit 06d4649415206b944447997f67dafb3b52236768 @Mottie committed Jan 30, 2012
View
@@ -34,6 +34,14 @@ Included all original [document pages](http://mottie.github.com/tablesorter/docs
View the [complete listing here](http://mottie.github.com/tablesorter/changelog.txt).
+####Version 2.0.26 (2012-1-30)
+
+* Widgets should no longer be applied twice when an initial sort direction is added. Fix for [issue #21](https://github.com/Mottie/tablesorter/issues/21).
+* Modified Green theme:
+ * The Green theme sort direction icon is now applied to only the first span it encounters inside the header. The UI theme adds a second span for it's icon.
+ * Essentially to fix [this demo](http://mottie.github.com/tablesorter/docs/example-widget-ui-theme.html) which allows switching between all of the themes.
+* Modified the UI theme to now add a div that wraps all of the header cell content to allow positioning of the sort direction icon.
+
####Version 2.0.25.2 (2012-1-27)
* Changed Blue theme to vertically align arrows. Fix for [issue #12](https://github.com/Mottie/tablesorter/issues/12).
@@ -83,78 +91,3 @@ View the [complete listing here](http://mottie.github.com/tablesorter/changelog.
* The column widths are not saved, but if I did consider saving the widths to local storage. I just didn't get around to doing it.
* [Demo page](http://mottie.github.com/tablesorter/docs/example-widget-resizable.html) added.
* Reorganized the next demo links, located at the bottom of every demo page, to match the order on the main document page.
-
-#### Version 2.0.23 (2011-10-18)
-
-* Changed the `dateFormat` option:
- * The settings are now "mmddyyyy", "ddmmyyyy", and "yyyymmdd".
- * Changed the date separator to include any of the following: slash, dash, period, comma, space(s) or tab.
- * The date format parser will only work with a four digit year.
- * Added a [demo page](http://mottie.github.com/tablesorter/docs/example-option-date-format.html).
-
-#### Version 2.0.22.1 (2011-10-15)
-
-* Updated the stickyHeaders widget
- * Sticky headers will now resize with the browser window
- * Updated blue and green themes to work better with sticky headers.
- * If using the uitheme widget, make sure the 'uitheme' widget is applied before (left of) the 'stickyHeaders' widget, as follows:
-
- widgets: ['zebra', 'uitheme', 'stickyHeaders']
-
-#### Version 2.0.22 (2011-10-13)
-
-* Updated the pager plugin:
- * Fixed a problem that occurred when `removeRows` is set to false - fix for [issue #4](https://github.com/Mottie/tablesorter/issues/4).
- * Added "disable.pager" and "enable.pager" methods to the pager. These are useful if you want to delete a table row with the pager applied.
-
- ```javascript
- // Delete a row
- // this function targets a button with a "remove" class name inside a table row
- // *************
- // Use delegate or live because `removeRows` is set to `true` in the demo - hidden rows don't exist
- $('table').delegate('button.remove', 'click' ,function(){
- var t = $('table');
- // disabling the pager will restore all table rows
- t.trigger('disable.pager');
- // remove the chosen row
- $(this).closest('tr').remove();
- // restore pager
- t.trigger('enable.pager');
- });
- ```
-
- * Fixed the `positionFixed` option (which positions the pager below the table) to now include the `offset` option value.
- * Fixed the pager arrow buttons so that destroying and enabling the pager multiple times doesn't multiply the number of pages changed.
- * Updated the pager demo page to allow deleting rows.
- * General cleanup and added lots of comments in the plugin and demo page on what each pager option does.
-* Made one minor change to the tablesorter plugin to accomidate the pager plugin using the `removeRows` option.
-
-#### Version 2.0.21.1 (2011-10-11)
-
-* Added "stickyHeader" widget to the "jquery.tablesorter.widgets.js" file.
- * This widget makes the header stick to the top of the page while scrolling down.
- * The sticky header is fully functional and will allow you to sort the table.
- * And best of all, it can be applied to the original tablesorter plugin.
- * Thanks to Chris Coyier and his post on [persistent headers](http://css-tricks.com/13465-persistent-headers/).
-* Added a compressed widget file named "jquery.tablesorter.widgets.min.js".
-
-#### Version 2.0.21 (2011-09-22)
-
-* Added `sortBegin` event
- * This event is triggered immediately before the actual sort. So this event occurs after the `sortStart` and after the `sortList` option has been updated.
- * It was added to allow for changing the sort dynamically. See [issue #3](https://github.com/Mottie/tablesorter/issues/3).
-* Added `removeRows` option to the pager plugin
- * When `true`, the default value, the pager plugin removes all non-active rows from the table. This greatly increases the sort speed of large tables.
- * When `false`, the pager plugin merely hides the non-active rows so they all continue to exist in the table. This should allow for better access to data within the table (i.e. submitting form elements)
-
-#### Version 2.0.20.1 (2011-09-16)
-
-* Oops fixed currency sorting
-
-#### Version 2.0.20 (2011-09-16)
-
-* Filter Widget
- * Added "filter" to the "headers" option to allow disabling the filter option for a specific column - thanks jizo!
- * Added "filter-false" class, that when applied will disable the filter widget for that column.
- * Updated the headers docs and the filter widget demo.
-* Updated the currency parser to use unicode characters to better work in different document formats.
View
@@ -1,5 +1,14 @@
TableSorter Change Log
+Version 2.0.26 (2012-1-30)
+============================
+
+* Widgets should no longer be applied twice when an initial sort direction is added. Fix for [issue #21](https://github.com/Mottie/tablesorter/issues/21).
+* Modified Green theme:
+ * The Green theme sort direction icon is now applied to only the first span it encounters inside the header. The UI theme adds a second span for it's icon.
+ * Essentially to fix [this demo](http://mottie.github.com/tablesorter/docs/example-widget-ui-theme.html) which allows switching between all of the themes.
+* Modified the UI theme to now add a div that wraps all of the header cell content to allow positioning of the sort direction icon.
+
Version 2.0.25.2 (2012-1-27)
============================
View
Binary file not shown.
View
@@ -26,14 +26,14 @@ table.tablesorter .header {
height: auto;
cursor: pointer;
}
-table.tablesorter .header span, .stickyHeader .header span {
+table.tablesorter .header span:first-child, .stickyHeader .header span:first-child {
background: url(none.png) no-repeat;
padding: 2px 0 2px 25px;
}
-table.tablesorter .headerSortUp span {
+table.tablesorter .headerSortUp span:first-child {
background: url(asc.png) no-repeat;
}
-table.tablesorter .headerSortDown span {
+table.tablesorter .headerSortDown span:first-child {
background: url(desc.png) no-repeat;
}
View
@@ -12,34 +12,33 @@ table.tablesorter thead tr th, table.tablesorter tfoot tr th {
font-size: 8pt;
padding: 4px;
}
-table.tablesorter thead tr .header {
- position: relative;
+table.tablesorter thead tr th {
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
white-space: normal;
- padding-right: 20px; /* wider than the icon */
+ /* UI hover and active states make the font normal and the table resizes, this fixes it */
+ font-weight: bold !important;
}
-table.tablesorter tbody td {
- padding: 4px;
- vertical-align: top;
+table.tablesorter thead tr th .inner {
+ position: relative;
+ padding-right: 20px; /* wider than the icon */
}
-table.tablesorter .header .ui-icon {
- display: block;
+table.tablesorter thead tr th .ui-icon {
position: absolute;
right: 3px;
top: 50%;
margin-top: -8px; /* half the icon height; older IE doesn't like this */
}
+table.tablesorter tbody td {
+ padding: 4px;
+ vertical-align: top;
+}
/* This allows you to use ui-state-default as the zebra stripe color */
table.tablesorter tr.ui-state-default {
background-image: url();
}
-/* UI hover and active states make the font normal and the table resizes, this fixes it */
-table.tablesorter th.header {
- font-weight: bold !important;
-}
/* filter widget */
table.tablesorter thead input.filter {
@@ -19,8 +19,8 @@
<!-- Tablesorter: required; also include any of the jQuery UI themes -->
<link class="ui-theme" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css">
<link class="ui-theme" rel="stylesheet" href="../css/ui/style.css">
- <link class="theme" rel="stylesheet" href="../css/blue/style.css" disabled>
- <link class="theme" rel="stylesheet" href="../css/green/style.css" disabled>
+ <link class="theme" rel="stylesheet" href="../css/blue/style.css">
+ <link class="theme" rel="stylesheet" href="../css/green/style.css">
<script src="../js/jquery.tablesorter.js"></script>
<script src="../js/jquery.tablesorter.widgets.js"></script>
@@ -58,16 +58,15 @@
// ********************
$('#switcher').themeswitcher();
+ $('link.theme').prop('disabled', true);
+
$('select').change(function(){
var theme = $(this).val().toLowerCase(),
files = $('link.theme, link.ui-theme'); // ui-theme is added by the themeswitcher
files
.prop('disabled', true)
.filter('[href*="' + theme + '"]')
.prop('disabled', false);
-
- // hide span.ui-icon when showing green theme or we get two indicator arrows
- $('table').find('thead span.ui-icon')[ (theme === "green") ? 'hide' : 'show' ]();
});
});
@@ -191,34 +190,33 @@
font-size: 8pt;
padding: 4px;
}
-table.tablesorter thead tr .header {
- position: relative;
+table.tablesorter thead tr th {
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
white-space: normal;
- padding-right: 20px; /* wider than the icon */
+ /* UI hover and active states make the font normal and the table resizes, this fixes it */
+ font-weight: bold !important;
}
-table.tablesorter tbody td {
- padding: 4px;
- vertical-align: top;
+table.tablesorter thead tr th .inner {
+ position: relative;
+ padding-right: 20px; /* wider than the icon */
}
-table.tablesorter .header .ui-icon {
- display: block;
+table.tablesorter thead tr th .ui-icon {
position: absolute;
right: 3px;
top: 50%;
margin-top: -8px; /* half the icon height; older IE doesn't like this */
}
+table.tablesorter tbody td {
+ padding: 4px;
+ vertical-align: top;
+}
/* This allows you to use ui-state-default as the zebra stripe color */
table.tablesorter tr.ui-state-default {
background-image: url();
}
-/* UI hover and active states make the font normal and the table resizes, this fixes it */
-table.tablesorter th.header {
- font-weight: bold !important;
-}
/* filter widget */
table.tablesorter thead input.filter {
@@ -1,4 +1,4 @@
-/* TableSorter 2.0 Widgets - updated 1/27/2012
+/* TableSorter 2.0 Widgets - updated 1/30/2012
*
* jQuery UI Theme
* Column Styles
@@ -29,6 +29,7 @@ $.tablesorter.addWidget({
// using "ui-theme" class in case the user adds their own ui-icon using onRenderHeader
.addClass('ui-widget-header ui-corner-all')
.append('<span class="ui-icon"/>')
+ .wrapInner('<div class="inner"/>')
.hover(function(){
$(this).addClass('ui-state-hover');
}, function(){

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 06d4649

Please sign in to comment.