Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install kss.plugin.cns

How to install kss.plugin.cns

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install kss.plugin.cns
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.1 Available View build log
Windows (64-bit)
1.1 Available View build log
Mac OS X (10.5+)
1.1 Available View build log
Linux (32-bit)
1.1 Available View build log
Linux (64-bit)
1.1 Available View build log
kss
 
Author
License
GPL
Dependencies
Lastest release
version 1.1 on Jan 5th, 2011

Introduction

Tested with Plone 3.1. Release 1.1 works with grok 0.13 but has not been tested properly.

This package contains various plugins for kss

  1. Redirect request
  2. Calendar
  3. Javascript value setter
  4. Autocomplete input box
  5. Javascript confirmation
USAGE
1. Redirect request

Redirect request is a simple plugin to redirect to a given url

2. Calendar

Render date picker is a global plugin that provides simple calendar

One mandatory parameter - id of the input box to fill the selected date Example usage:

#created_calendar:click {

System Message: ERROR/3 (<string>, line 31)

Inconsistent literal block quoting.

evt-click-preventdefault: True; action-client: renderDatePicker; renderDatePicker-fieldName: created; }

3. Value setter

Value 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_element

At least one of the sources has to be provided

Example usage:

#kss-attr-activity-field:click {

System Message: ERROR/3 (<string>, line 50)

Inconsistent literal block quoting.

evt-click-preventdefault: True; action-client: valueSetter; valueSetter-target_element: activity_name_field; valueSetter-source_element: project_name_field; }

4. Autocomplete

Autocomplete 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 values

Autocomplete triggers an event "selected" when an item is chosen either using mouse or a keyboard

from kss.plugin.cns.plugins.autocomplete import autocomplete_escape vocab = autocomplete_esacae(DisplayList(...))

Example usage:

.kss-autocomplete:focus {

System Message: ERROR/3 (<string>, line 70)

Inconsistent literal block quoting.

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 confirmation

Confirm is a plugin to display a confirmation dialog with given message and on confirmation triggers an "confirmed" event

Example usage:

System Message: WARNING/2 (<string>, line 89)

Literal block expected; none found.

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 text

Alert text is a simple plugin to display a javascript alert box, in opposite to core alert plugin it does not display any debug info

7. Dynamic positioning

Dynamcic positioning is a plugin to center selected node to an absolute position in a window - simple implementation for ie6 problems with fixed position

Parameters: left, top Can be either position in pixels or "center" that finds the center of a window

8. Open window

A simple plugin to open a new window with given url.

Parameters: url

Available as a kss command so it can be invoked within kss server action

9. Refresh page

A simple plugin to reload page. Available as a kss command so it can be invoked within kss server action

10. Remove attribute

A 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 remove

Changelog

1.0 - Unreleased
  • Initial release - compatible with Plone 3.0.x. Some plugins does not work

System Message: WARNING/2 (<string>, line 145)

Bullet list ends without a blank line; unexpected unindent.

with Plone 3.1 (for example confirm plugin)

1.1 - Release
  • Removed strict dependency on Five and GenericSetup so it works with plain Zope 3

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:3

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.