You are here: Foswiki>Tasks Web>Item10245 (11 Apr 2012, GeorgeClark)Edit Attach

Item10245: Make TABPANE contents visible if no js

Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Extension
Component: JQueryPlugin
Reported By: ArthurClemens
Waiting For:
Last Change By: GeorgeClark
This plugin should behave like twisty: if no javascript, show the contents.

This will be expecially useful when used in Base Skin, that should work without javascript as well.

-- ArthurClemens - 11 Jan 2011

The current solution adds a .foswikiJs to a series of properties, not only display. So while it now controls the display property of a tab as well as the tab content, it also switches off border and padding. This has got negative side effects on other css because the properties of .foswikiJs .jqTab and .foswikiJs .jqTabContents now have higher priority in the cascading of the styles.

While I see the value to remove the border + padding from the tabs, the impact on other css is too high. Instead of removing border+padding inside JQueryPlugin, non-javascript skins should remove them on their behalf thus controlling the effect within the cascading close to the cause.

Maybe it is better to revert the logic: add a .foswikiNoJs to the html tag instead of a .foswikiJs and then remove it using javascript. That way css of no-javascript skins ranks higher right away. Basically, with regards to the priority within cascading of styles it is better to add classes for the rules for the more specific case instead of forcing an additional class on every rule in the default case.

-- MichaelDaum - 14 Jan 2011

foswikiNoJs would have to be added in templates, which will not work with older skins. I will consider it for Base Skin (that skin was the main reason to fix the no script behaviour).

-- ArthurClemens - 14 Jan 2011

Adding a foswikiNoJs to the <html> element of old skins is relatively easy to get no-javascript browser on board for these, compared to the impact a too agressive foswikiJs class has got on css of other plugins ... which is the reason why I partially reverted your change.

-- MichaelDaum - 14 Jan 2011

I agree. Follow up in Item10264.

-- ArthurClemens - 15 Jan 2011

Finished this update (for trunk only)

-- ArthurClemens - 15 Jan 2011

It appears as though this has been synced over to release. Changing the target.

-- GeorgeClark - 17 Mar 2012
Topic revision: r14 - 11 Apr 2012, GeorgeClark - This page was cached on 16 Jan 2020 - 16:14.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy