Package: kss.plugin.cns
IntroductionTested with Plone 3.1.
Release 1.1 works with grok 0.13 but has not been tested properly.This package contains various plugins for kssRedirect requestCalendarJavascript value setterAutocomplete input boxJavascript confirmationAlert textDynamic positioningOpen windowRefresh pageRemove attributeUSAGE1. Redirect requestRedirect request is a simple plugin to redirect to a given url2. CalendarRender date picker is a global plugin that provides simple calendarOne mandatory parameter - id of the input box to fill the selected date
Example usage:#created_calendar:click {
    evt-click-preventdefault: True;
    action-client: renderDatePicker;
    renderDatePicker-fieldName: created;
}3. Value setterValue setter set a value of an input box using javascript ( changes actual
current form values )target_element is id of an node that can receive the value (i.e. input)
source_element is id of an node that is the value taken from
value is any value that is send to the target_elementAt least one of the sources has to be providedExample usage:#kss-attr-activity-field:click {
    evt-click-preventdefault: True;
    action-client: valueSetter;
    valueSetter-target_element: activity_name_field;
    valueSetter-source_element: project_name_field;
}4. AutocompleteAutocomplete plugin displays limited list as you type into inpt box
An input which is desired to use autocomplete has to have a attribute vocab with
a list of possible valuesAutocomplete triggers an event “selected” when an item is chosen either using
mouse or a keyboardfrom kss.plugin.cns.plugins.autocomplete import autocomplete_escape
vocab = autocomplete_esacae(DisplayList(…))Example usage:.kss-autocomplete:focus {
    evt-focus-preventdefault: False;
    action-client: autocomplete;
    autocomplete-vocab_list: nodeAttr(vocab);
}

.kss-autocomplete:selected {
    action-client: alert;
    alert-message: 'An item was seleted';
}Note the usage of a class - the vocab is passed by kss attribute so the same kss
definition can be used for more elements.5. Javascript confirmationConfirm is a plugin to display a confirmation dialog with given message and on
confirmation triggers an “confirmed” eventExample usage:button.removeItem:click {
    evt-click-preventdefault: True;
    evt-click-allowbubbling: True;
    action-client: confirm;
    confirm-text: "Do you really want to remove this item?";
}

button.removeItem:confirmed {
    action-client: alert;
    alert-message: "Deleting the item"
}6. Alert textAlert text is a simple plugin to display a javascript alert box, in opposite to
core alert plugin it does not display any debug info7. Dynamic positioningDynamcic positioning is a plugin to center selected node to an absolute position
in a window - simple implementation for ie6 problems with fixed positionParameters: left, top
Can be either position in pixels or “center” that finds the center of a window8. Open windowA simple plugin to open a new window with given url.Parameters: urlAvailable as a kss command so it can be invoked within kss server action9. Refresh pageA simple plugin to reload page. Available as a kss command so it can be invoked
within kss server action10. Remove attributeA plugin to remove attributes. Core plugins only support adding attributes and
removing by setting their values to empty.
For instance it was not possible to remove attribute “disabled”.Parameters: name - a name of the attribute to removeChangelog1.0 - UnreleasedInitial release - compatible with Plone 3.0.x. Some plugins does not work
with Plone 3.1 (for example confirm plugin)1.1 - ReleaseRemoved strict dependency on Five and GenericSetup so it works with plain Zope 3