joonis Logo

KSS changes

Changelog

Version 2.4.2 [2015-04-26]

  • Made the loading of kinetic stylesheets asyncron.
  • Fixed a bug defining a custom selector engine.

Version 2.4.1 [2013-07-11]

  • Fixed a bug that generally stopped propagation of all mouse events on Chrome.

Version 2.4.0 [2013-07-05]

  • Added DOMContentLoaded event handler that is now used to start up.
  • Normalized the browser event objects on event creation.
  • Added the new parameter provider eventAttr(attrname).
  • Added the new parameter provider test(string, value1, value2).
  • Made the selector parameter of the selector type parentnode([selector]) optional.
  • Added the new special action parameter kssPrecondition.
  • Fixed a bug in continueEvent (did not work properly for client actions).
  • Modified the action provider setStyle. Now the property opacity is set correctly in IE.
  • Removed the parameter provider currentFormVarFromKssAttr, use currentFormVar(kssAttr(attrname)) instead.

Version 2.3.1 [2013-06-27]

  • Now the selector type of a server action command defaults to samenode if no selector is given (same behaviour as for client actions).

Version 2.3.0 [2013-06-16]

  • Added the possibility to declare event parameters without an event name (eg. "evt-preventdefault: true;"). In this case it is applied to all event types of the given selectors.

Version 2.2.0 [2013-06-14]

  • KSS attributes are now stored as HTML5 data attributes instead XML namespace attributes:
    • The parameter provider "kssAttr('foo')" equals "nodeAttr('data-kss-foo')"
    • The action "setKssAttribute('foo', 'bar')" equals "setAttribute('data-kss-foo', 'bar')"
    • KSS attributes can be declared via data attribute (data-kss-foo="bar") or class attribute (class="... kssattr-foo-bar ...")

Version 2.1.0 [2013-06-12]

  • Dropped dependency on Sarissa.
  • Dropped the following deprecated or unused functionality:
    • Link tags with a rel attribute of "kukit" or "k-stylesheet" are not longer processed. Use a value of "kinetic-stylesheet" instead.
    • Removed "kukit.initializeRules" that was used by Plone only.
    • Removed "oper.completeParms", use "oper.evaluateParameters" instead.
    • Removed "_eventRegistry", use "kukit.eventsGlobalRegistry.register" instead.
    • Removed "_EventBinder.__continueEvent__", use "_EventBinder.continueEvent" instead.
    • Removed "_EventBinder.__continueEvent_allNodes__", use "_EventBinder.continueEventAllNodes" instead.
    • Removed "_EventBinder.__makeFuncToBind__", use "_EventBinder.makeFuncToBind" instead.
    • Removed "_EventBinder._EventBinder_triggerEvent", use "_EventBinder.triggerEvent" instead.
    • Removed "_EventBinder._EventBinder_callMethod", use "_EventBinder.callMethod" instead.
    • Removed "kukit.ar.actionRegistry.register", use "kukit.actionsGlobalRegistry.register" instead.
    • Removed "kukit.cr.commandRegistry.registerFromAction", use "kukit.commandsGlobalRegistry.registerFromAction" instead.
    • Removed "kukit.fo.getCurrentForm(target)", use "kukit.fo.CurrentFormLocator(target).getForm()" instead.
    • Removed "kukit.fo.getFormVarFromCurrentForm(target, name)", use "kukit.fo.getFormVar(new kukit.fo.CurrentFormLocator(target), name)" instead.
    • Removed "kukit.fo.getFormVarFromNamedForm(formname, name)", use "kukit.fo.getFormVar(new kukit.fo.NamedFormLocator(formname), name)" instead.
    • Removed "kukit.fo.getAllFormVarsFromCurrentForm(target)", use "kukit.fo.getAllFormVars(new kukit.fo.CurrentFormLocator(target), new kukit.ut.DictCollector())" instead.
    • Removed "kukit.fo.getAllFormVarsFromNamedForm(formname)", use "kukit.fo.getAllFormVars(new kukit.fo.NamedFormLocator(formname), new kukit.ut.DictCollector())" instead.
    • Removed the action "executeCommand", instead use the parameter "kssSelector" in a standard action.
    • Removed the action "setHtmlAsChild", use "replaceInnerHTML" instead.
    • Removed the action "replaceNode", use "replaceHTML" instead.
    • Removed the action "addAfter", use "insertHTMLAfter" instead.
    • Removed the action "removeNextSibling", use "deleteNodeAfter" instead.
    • Removed the action "removePreviousSibling", use "deleteNodeBefore" instead.
    • Removed the action "removeNode", use "deleteNode" instead.
    • Removed the action "clearChildren", use "clearChildNodes" instead.
    • Removed the action "copyChildrenFrom", use "copyChildNodesFrom" instead.
    • Removed the action "copyChildrenTo", use "copyChildNodesTo" instead.
    • Removed the action "setStatevar", use "setStateVar" instead.
    • Removed the action "addClassName", use "addClass" instead.
    • Removed the action "removeClassName", use "removeClass" instead.
    • Removed the parameter name "className" of the actions "addClass", "removeClass" and "toggleClass", use "value" instead.
    • Removed unused "kukit.dom.getKssValue" and "kukit.dom.setKssValue", originally implemented for a new parameter provider.

Version 2.0.0 [2013-06-06]

  • Dropped dependency on base2/cssQuery. Now plays well with selector engines like Sizzle or Slick.
  • The param nodes of an XML response can now have more than one CDATA node.
  • The server response can be also in JSON instead XML.
  • Added the native event contextmenu.
  • All native events can have the preventdefault parameter. (Why was this limited to click events?)
  • All parameter providers (except pass()) return an empty string for nonexistent variables instead null.
  • The selector type htmlid() now extracts the fragment identifier from a url (http://www.joonis.de#anchor -> anchor).
  • Enabled the execution of script tags, that are inserted into the dom.
  • Sarissa is now included in kukit.js
The following part is adapted from the original KSS documentation, written by the KSS contributors.

Archive

New in kss 1.4.8

  • new client action setActionServerTimeout

    It allows to setup timeout separately for each server action. You call it in the stylesheet just before the server action. It has a value parameter where you specify the timeout in milliseconds:

        div.timeout:click {
            action-client: setActionServerTimeout;
            setActionServerTimeout-value: 10000;
            action-server: bla;
        }
        

    You can also use it to change the global default timeout value at body load time:

        body:load {
            action-client: setActionServerTimeout;
            setActionServerTimeout-value: 5000;
        }
        

New in kss 1.4

  • Major code refactoring, for better readibility and speedups.

  • Lots and lots of ecma unittests and selenium tests that test kss.core and the core plugin, are added. All are checkable from a single click from any browser.

  • New and improved demos

  • Base2 is used for css selection, instead of the original cssQuery (if present). Significantly faster page load.

  • multiple selectors in the same rule are allowed, ie.:

        selector1:click selector2:click { ... }
        

    or even:

        selector1:keyup selector2:keydown { ... }
        
  • Value providers can be recursive, ie.:

        nodeAttr(kssAttr(blah))
        

    is allowed.

  • added url() special value provider, the first is alternate syntax for:

        action-server: blah;
        blah-kssUrl: "http://foo.bar/blahblah";
        

    you can now say in one line:

        action-server: blah url(http://foo.bar/blahblah);
        

    This may be handy if you want to call @@ url-s.

  • added alias() special value provider, this enables using more client actions on the same node:

        action-client: setAttribute;
        setAttribute-key: foo;
        setAttribute-value: bar;
        action-client: setAttribute alias(other);
        other-key: foo2;
        other-value: bar2;
        
  • enable node selection in the same line as the action specification, ie. instead of:

        action-client: foo;
        foo-kssSelector: css(div.klass);
        

    you can also say:

        action-client: foo css(div.klass);
        
  • enable full form submits in the same line as the action specification, ie. instead of:

        action-server: foo;
        foo-kssSubmitForm: currentForm();
        

    you can also say:

        action-server: foo currentForm();
        
  • Value providers can be used also in the "event binder id", eg. instead of the static binder id:

        xxxxx:click(blah) { ... }
        

    a dynamic binder id can also be used:

        xxxxx:click(kssAttr(blah)) { ... }
        

    This feature is needed for upcoming use cases like drag and drop.

  • Remove previously deprecated form() and currentForm() value providers from normal action parameters (remark: they should now be used with xxx-kssSelector or directly on the action-client line as described above, and they properly support Zope multiform fields like :list, :record, :records.)

  • Demos and selenium tests are removed from kss.demo and are now placed together with the plugin in kss.core. This means, all 3rdparty plugins should now have a zope-only demo page with a selenium test, if the plugin is loaded the demo appears in the index and the test is run together with all tests. (Demos can be viewed and tested by kss.demo.) We also have kss.template that creates a skeleton kss plugin with all bells and whistles.

  • Implement loglevels based on cookies (also backported to 1.2.)

  • Other fixes (also backported to 1.2):

    • Fix error fallback handling
    • Fix multiple selection form fields marshalling on Safari and IE
    • Fix setKssAttribute action and command
    • fix action-cancel

Deprecated in kss 1.4

form() and currentForm() in normal value providers

currentForm()

You must change rules that use currentForm() in a normal value provider:

    action-server:                     myServerAction;
    myServerAction-data:               currentForm();
    

to:

    action-server:                     myServerAction currentForm();
    

Or, if you want to keep compatibility with kss 1.2:

    action-server:                     myServerAction;
    myServerAction-kssSubmitForm:      currentForm();
    
form()

Similarly, for form(), you must change the following:

    action-server:                     myServerAction;
    myServerAction-data:               form();
    

to:

    action-server:                     myServerAction form();
    

Or, if you want to keep compatibility with kss 1.2:

    action-server:                     myServerAction;
    myServerAction-kssSubmitForm:      form();
    

Kann ich
  Ihnen helfen?


Schreiben Sie mir
doch einfach unter
giraffe@joonis.de