You are here: Home CMS.Info Blog KSS Opener: Introduction

KSS Opener: Introduction

KSS is Ajax framework used in Plone-3.0 that allows Python programmers who want to build Ajax application do that without learning Javascript and browser DOM implementation bugs/features. KSS allows pluggable components. KSS Opener is one to enable some long-expected Plone features.

Plone-3.0 is knocking our doors. KSS is coming to shed some light upon Ajax for Plone Community. Myroslav Opyr of Quintagroup in his Introduction to KSS Opener post is revealing KSS component that can help Plone Application developers:

After installation product offers following event:

opener-selector:opener-init {
evt-init-elementSelector: element-selector;
}

All elements that matches opener-selector will get controller that will offer expand/collapse functionality with mouse click.

Real-life example is:

.term:opener-init {
evt-init-elementSelector: '.details';
}

and having HTML code:

<div class="term">
History
<div class="details">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum
iaculis eros eu purus. Integer accumsan leo id lorem viverra vulputate.
Donec feugiat nunc molestie massa nonummy pulvinar. Proin porta pede
sit amet lectus. Duis leo urna, tempor non, condimentum condimentum,
commodo non, libero. Integer feugiat, pede at.
</div>
</div>

will produce into something like:

_____
tags:
Document Actions

Why did you remove Geir's post?

Avatar Posted by Alexander Limi at 2007-03-14

Hi,

There was a useful comment here a few hours, where Geir pointed out that you shouldn't use something like div class="term", but use the correct structural element, which would be a definition list.

Creating div class="term" is equivalent to doing div class="header1" instead of using the h1 element.

Any reason why it was removed? It was pointed out in a very polite manner, and he's absolutely right.


Nope, I didn't removoved it and it is still available at my Blog

Avatar Posted by Myroslav Opyr at 2007-03-15

First of all, the original post http://talk.quintagroup.com/blogs/myroslav/kss-opener/introduction has Geir's comment.

You are completely right with your arguments. The purpose of the post was introduction (as simple as possible) to functionality. I've used non-semantic class "term" by purpose as my pending blog post (in a series of KSS Opener related ones) has the very same example with dl/dt/dd, behaviour of KSS Opener is different.

In the example above KSS Opener is inserting controller immediately into div.term it is initialized to. It is not correct behaviour with dl/dt/dd. All because dl cannot contain anything besides dt/dd in some browsers. My new post will contain details, as KSS Opener gets extra initialization parameters.

And thank you for feedback, I appreciate your semantic-web orientation ;)

Stay tuned!


CMS.Info Blog

RSS Subscribe to CMS Info by saving the URL of RSS icon to use in your newsreader.

Categories:
Plone (27)
Zope (1)
 
Powered by Plone