You are here: Foswiki>Tasks Web>Item1323 (20 Mar 2009, EugenMayer)Edit Attach

Item1323: Implementing the accordion effect into TwistyPlugin

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Extension
Component: TwistyPlugin
Branches:
Reported By: EugenMayer
Waiting For: ArthurClemens, EugenMayer, MichaelDaum
Last Change By: EugenMayer
Implementing an additional way of having twisties.

The accordion effect ( demo at http://jqueryui.com/demos/accordion/ ) can be used to structure quite another way, while that looks quite nice.

I did some general improvement to be able to add new types like the Tabs planed by ArthurClements. Iam using JQuery, while i did not add any dependencies to this plugin. It works with JQueryPlugin and JQueryCompaibitlyPlugin and can be easy themen by the themeroller ( http://jqueryui.com/themeroller/ ) as all other Jquery UI implementations iam creating ( e.g. the JQuery ui dialogs ).

Tabs can be done the same way, using jquery its now a task of some few minutes to add this to the TwistyPlugin (( http://jqueryui.com/demos/tabs/ )) .. i think i will add this in a few days anyway.

Not releasing, as its and default plugin. Also checking in into the trunk and not the branch.

As i did not change any default behavior and only extended the plugins with new functionality, i thought i can skip the "proposal" way here. Please hit me if this is wrong.

-- EugenMayer - 19 Mar 2009

To me it does not make sense to introduct TWISTYITEM as container for a twisty, when the accordion is in fact a series of twisties (or a twisty controller if you like).

On IRC I had proposed to use TWISTIES as a container around individual TWISTY items. Then TWISTIES can have type="accordion" or type="tab".

This needs more thinking over.

Then this line in Accordion.pm:

my $output = '<script type="text/javascript">;(function($j) { $j(function() { $j("#'.$id.'").accordion('.$settings.'); }); })(jQuery);</script>';

This assumes the user has jQuery installed. It goes against the modular "js lib=template" setup we have now. This will fail with an error in the browser.

-- ArthurClemens - 19 Mar 2009

About the name of the name of the TWISTYITEM macro, this is to argue about. As far as i undestand you know, you would change TWISTY to be an item, and add TWISTIES to be the container. That way you will have to add some new behavior, as mode cant be used anymore. As its not usefull to define different types for TWISTYITEMS / TWISTY ( in your terminolgy ) i cant see a real use in it

to the direct JQuery dependencie. Thats what in the docs. you can do it a different way, as you cant use a general ID, the ID is generated. So you have to place such a line in any way. You can make a case here, for dojo and stuff. You can even make it more complicated by having a template for jquery / dojo whereever, where the ID is a placeholder and before you include the template you replace it. So its not that i did not think about, i was just using the "keep it simple" approach.

We can generalize all the time, make interfaces and thinks like that..but i cant see that we really get something usefull out of this.

-- EugenMayer - 19 Mar 2009

I am not sure if the TwistyPlugin is the right place to add the accordeon widget to. Doesn't it overcomplicate things?

-- MichaelDaum - 19 Mar 2009

Also TwistyPlugin is a default plugin and it then follows the same change process as core code. Ie. spec changes and enhancements should be raised as feature proposal.

Us regular developers should show a good example in this respect if we want other to not change the core or the default plugins without asking and discussing first. The fact that Michael has a concern with this amplifies the reason and the need to follow this simple process (where 90% of proposals are accepted by 14 day rule without fuzz with no or little discussion)

-- KennethLavrsen - 19 Mar 2009

reverting changes, implemented functionality in my own plugin meanwhile When i find time, i write a proposal and so on ... -- EugenMayer - 20 Mar 2009

ItemTemplate edit

Summary Implementing the accordion effect into TwistyPlugin
ReportedBy EugenMayer
Codebase trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component TwistyPlugin
Priority Normal
CurrentState No Action Required
WaitingFor ArthurClemens, EugenMayer, MichaelDaum
Checkins distro:49aa07abc1bd distro:28c6b688a3c8
TargetRelease n/a
ReleasedIn
Topic revision: r8 - 20 Mar 2009, EugenMayer
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