Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different effect for setting sorter false for a column #18

Closed
innc opened this issue Dec 30, 2011 · 3 comments
Closed

Different effect for setting sorter false for a column #18

innc opened this issue Dec 30, 2011 · 3 comments
Labels

Comments

@innc
Copy link

innc commented Dec 30, 2011

Hello :)

I noticed a different effect for setting sorter false for a column by two different methods:
(I inserted '.' inside HTML code to display tags here)

Method 1 to disable sorter for column 0:

    $("#myTable").tablesorter(
    {
        widgets : ['uitheme', 'zebra', 'stickyHeaders', 'filter'],
        widgetZebra: { css: ["ui-widget-content", "ui-state-default"] },
        widgetUitheme: { css: ["ui-icon-carat-2-n-s", "ui-icon-carat-1-s", "ui-icon-carat-1-n"] },

        headers:
        {
          0:
          {
                    sorter: false 
          }
        }
    });

This works fine!
Generated table header code is:

<.th class="ui-widget-header ui-corner-all">
<.span><./span>
<.span class=""><./span>
<./th>

Methode 2 to disable sorter for column 0:
-Disable (or set) the column parser using class names
<.th class="sorter-false"><./th>

so you only need this now without an addional headers-option:

    $("#myTable").tablesorter(
    {
        widgets : ['uitheme', 'zebra', 'stickyHeaders', 'filter'],
        widgetZebra: { css: ["ui-widget-content", "ui-state-default"] },
        widgetUitheme: { css: ["ui-icon-carat-2-n-s", "ui-icon-carat-1-s", "ui-icon-carat-1-n"] }
    });

This works almost fine, BUT the look is wrong!
Generated table header code is:

<.th class="sorter-false ui-widget-header ui-corner-all ui-state-active">
<.span><./span>
<.span class="ui-icon"><./span>
<./th>

The sorting for this column is disabled, but ui-state-active is activated and ui-icon is displayed. Both should not be.

I hope you had nice Christmas days and i wish a Happy New Year!
greetings

@Mottie
Copy link
Owner

Mottie commented Dec 30, 2011

Hi Innc!

Are you using the latest version? Because in issue #17, bbbco shared how to check the correct disabled column parameter. It's been fixed in version 2.0.25.1.

Here is method 1 and method 2 using ui-darkness theme to make the active tab much more obvious.

@innc
Copy link
Author

innc commented Dec 31, 2011

SORRY :( my stupid mistake, I have not used newest version, sorry for stealing your time...

@Mottie
Copy link
Owner

Mottie commented Dec 31, 2011

LOL don't worry about it... Happy New Year! (almost)

@Mottie Mottie closed this as completed Dec 31, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants