Quantcast

Can't disable all tabs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can't disable all tabs

Sebastian Knapp

Hello,

after some problems I'm on a good way to successful intagrate the tabs
ui module into my current project.
Unfortunatly one problem remains open. First a short description what
I want.

Some checkboxes are synchronized with a tabs interface. When a
checkbox is checked the tab is enabed, if it is checked off, then the
corresponding tab becomes disabled. I found an example, so I can start
with all tabs disabled. But when I check all checkboxes off, the last
tab is still enabled, perhaps because it is the selected tab.

Is there an easy way to get this working?

Thank you and greetings
Sebastian Knapp




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't disable all tabs

Klaus Hartl-4

You cannot disable the selected tab currently. If you can start with
all tabs disabled in the beginning I consider this inconsistency as a
bug. A selected tab is more or less disabled anyway as nothing happens
if you click on it.

You could try to unselect the selected tab and then disable it. You
need to make tabs deselectable for that via unselect option (what a
bad option name, going to change this for the 1.6 release).

$('#foo').tabs({ unselect: true });

And then you need to deselect it before disabling: $
('#foo').tabs('select', 0).tabs('disable', 0);

Question: How should a selected tab behave if it's being disabled?


--Klaus


On 6 Okt., 17:20, Sebastian Knapp <[hidden email]> wrote:

> Hello,
>
> after some problems I'm on a good way to successful intagrate the tabs
> ui module into my current project.
> Unfortunatly one problem remains open. First a short description what
> I want.
>
> Some checkboxes are synchronized with a tabs interface. When a
> checkbox is checked the tab is enabed, if it is checked off, then the
> corresponding tab becomes disabled. I found an example, so I can start
> with all tabs disabled. But when I check all checkboxes off, the last
> tab is still enabled, perhaps because it is the selected tab.
>
> Is there an easy way to get this working?
>
> Thank you and greetings
> Sebastian Knapp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [!! SPAM] [jquery-ui] Re: Can't disable all tabs

Sebastian Knapp

Dear Klaus,

thank you very much for your fast reply. The described way works, but I
bind the select event
with an action, to modify the checkboxes. What I now need is a simple
way to distinguish
between a normal select from user and this select event. My current
solution is to save a state in the
checkbox, so it  only reacts on real clicks.

In my use case your question  does not  really apply. Your  recommended  
approach  to first
deselect the tab and then disable it, is exactly what I want. What would
help is a real unselect action,
which does not fire the select event. The current behaviour seems to be
ok.  Until now I simply select
the first selectable tab, but I understand that it is not easy to find a
general solution for the disable behaviour.
For me the the best variant would be to switch back to the last selected
selectable tab. But this depends
on the environment in which the tabs are used and I'm not sure if a
general solution, built in the UI is required.

Sebastian Knapp

Klaus Hartl schrieb:

> You cannot disable the selected tab currently. If you can start with
> all tabs disabled in the beginning I consider this inconsistency as a
> bug. A selected tab is more or less disabled anyway as nothing happens
> if you click on it.
>
> You could try to unselect the selected tab and then disable it. You
> need to make tabs deselectable for that via unselect option (what a
> bad option name, going to change this for the 1.6 release).
>
> $('#foo').tabs({ unselect: true });
>
> And then you need to deselect it before disabling: $
> ('#foo').tabs('select', 0).tabs('disable', 0);
>
> Question: How should a selected tab behave if it's being disabled?
>
>
> --Klaus
>
>
> On 6 Okt., 17:20, Sebastian Knapp <[hidden email]> wrote:
>  
>> Hello,
>>
>> after some problems I'm on a good way to successful intagrate the tabs
>> ui module into my current project.
>> Unfortunatly one problem remains open. First a short description what
>> I want.
>>
>> Some checkboxes are synchronized with a tabs interface. When a
>> checkbox is checked the tab is enabed, if it is checked off, then the
>> corresponding tab becomes disabled. I found an example, so I can start
>> with all tabs disabled. But when I check all checkboxes off, the last
>> tab is still enabled, perhaps because it is the selected tab.
>>
>> Is there an easy way to get this working?
>>
>> Thank you and greetings
>> Sebastian Knapp
>>    
> >
>
>  


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...