KScript is a collection of scripted libraries which add controls to forms, menus, lists and and other distinguishable page elements.
The libraries are designed to be
- non-obtrusive, i.e. wont clash with other controls/scripts
- gracefully degradeable functionality for incompatible browsers
This will come into effect from v 1.4
To add such a control is achieved by adding a script attribute to a widgets. Here are the available scripts...
- kscript.form (dynamic form controls)
- kscript.tree (dynamic menu's, like a folder)
Here is an example of implementing the control to a [form] widget.
[form: this.script:kscript.form ... ]
And the kscript tools requires no further knowledge to implement.
However if you are interested in the structure please read on....
kscript.init.js
This is a base loader script which is attached by default. It reads the HTML page to determine which controls are needed to be added. It then requests any further libraries. Each library is self initiating.
This also includes a css selector type function (a variant of the jquery framework). Which all the scripts utilize, because its very very useful especially for allowing comunitry contributions to the project.