Author: gotcha
Date: Thu Dec 18 13:27:34 2008
New Revision: 60565
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/INTRO.txt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_cancel.html
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_kssattr.html
Removed:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/deprecated/
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/commands.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/commandaction.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/configure.zcml
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/config.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/configure.zcml
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/demoview.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/protocol.html
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/zopeconfig.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/interfaces.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/setup.py
Log:
trunk changes : merge -r 53859:60016
http://codespeak.net/svn/kukit/kss.core/trunk
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt
(original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt
Thu Dec 18 13:27:34 2008
@@ -4,7 +4,52 @@
kss.core - 1.5dev Unreleased
- - ...
+ - Fix or improve calculateAbsoluteURL to handle absolute
+ and relative urls correctly, as well as get rid of the
+ double slash (//) issue.
+ It also satisfies the tests kss_url_param and
+ kss_url_param_multiprop, that now work as intended,
+ with previous workaround removed.
+ [ree]
+
+ - Use the real request in the json logic so skin layers, request parmeters,
+ etc. are available.
+ [wichert]
+
+ - Replaced license header of third-party sarissa.js
+ to workaround the license detection of ohloh.
+ sarissa.js is redistributed under GNU GPL v2
+ as previously.
+ [ree]
+
+ - Fix cssQuery-compat.js to use newest base2 api.
+ [ree]
+
+ - Fix a typo that caused an exception instead of
+ logging an error message, this happened when
+ an action was regitered twice with the same name.
+ [ree]
+
+kss.core - 1.4 Released 2008-04-21
+
+MISSING, PLEASE MERGE! - Add improved demos
+ (insertions in tbody is not included : that demo is
+ still broken in IE6)
+ [gotcha]
+
+ - Updated base2-dom-fp.js with newest version.
+ [ree]
+
+ - Change concatresource to accept resources with
+ "application/x-javascript" content type only
+ [ree]
+
+ - fix setKssAttribute action and command
+ (closes bug 8048 from plone.org)
+ [gotcha]
+
+ - fix action-cancel
+ [gotcha]
- Updated base2-don-fp.js with newest version.
This fixes breakage on FireFox 3.
Added: kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/INTRO.txt
==============================================================================
--- (empty file)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/INTRO.txt
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,44 @@
+
+***********************************
+Kinetic Style Sheets (KSS) kss.core
+***********************************
+
+KSS is an Ajax framework that allows UI development without writing any
+Javascript. It uses style sheets with CSS-compliant syntax to declare and bind
+dynamic behaviors in the browser. The engine supports a set of generic DOM-like
+commands; they are computed on the server and sent back to manipulate the HTML
+page.
+
+What is KSS?
+************
+
+KSS is an AJAX framework. KSS has both a client-side Javascript library and
+server-side support.
+
+The client-side Javascript library needs to be included in your page. It
+fetches Kinetic style sheets from the server, parses them and binds a set of
+action to browser events and/or page elements. It is clean Javascript code that
+can peacefully coexist with other clean Javascript librarys like JQuery or
+ExtJS. It is about 100k in production mode. You can integrate your own
+Javascript code by using its extension mechanism through plugins.
+
+Server-side code is currently available for Zope (2 and 3, which includes
+Plone). The kss.base egg (which is currently in alpha) brings server-side
+support to other pythonic platforms, such as:
+
+* pylons
+* django
+* grok
+
+The Javascript client-side code can be used independently of existing
+server-side support. In other words, it is usable on platforms where we have
+not built server-side support like PHP, Ruby or Java. (If you have interest in
+porting KSS to the server environment you use and need help, please contact us
+!)
+
+Homepage
+***********
+
+More information and documentation can be found on the
+`KSS project homepage <http://kssproject.org>`_.
+
Modified: kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt
(original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt
Thu Dec 18 13:27:34 2008
@@ -1,4 +1,72 @@
+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();
+
+
+Necessary server side changes
+'''''''''''''''''''''''''''''
+
+On the server side, the method that received the form as a dictionary in one
+parameter, must define the values directly in the method signature, or access
+them from the form directly.
+
+So the following old code::
+
+ def method(self, data):
+ field1 = data['field1']
+ field2 = data.get('field2', None)
+
+must be changed in one of the two ways shown in the following examples::
+
+ def method(self, field1, field2=None):
+ ...
+
+An alternate way is to get them from the request::
+
+ def method(self):
+ request = self.request
+ field1 = request.form['field1']
+ field2 = request.form.get('field2', None)
+
New in kss 1.4
--------------
@@ -9,6 +77,8 @@
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.
@@ -95,10 +165,14 @@
- Implement loglevels based on cookies (also backported to 1.2.)
-- Other fixes (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
+
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py
Thu Dec 18 13:27:34 2008
@@ -5,7 +5,6 @@
import os.path, logging
import zope.component as capi
from zope.interface import implements, Interface
-from zope.publisher.browser import TestRequest
from interfaces import IJSONStreamWriteable
logger = logging.getLogger('kss.core')
@@ -14,19 +13,21 @@
'Gets the addon javascript files for json'
files = []
# Try adding the jsonserver files
- request = TestRequest()
- try:
- # use the files already registered to that concat resource
- jsonrpc = capi.getAdapter(request, Interface, 'jsonrpc.js')
- except capi.ComponentLookupError:
- pass # JSON not present.
- else:
- # JSON present.
- files.extend(jsonrpc.context.context.getPathList())
- # add the json kukit support file
- plugins_dir = os.path.split(globals()['__file__'])[0]
- files.append(os.path.join(plugins_dir, 'browser', 'jsonkukit.js'))
- logger.info('Lazy plugin construction: Installed support for JSON-RPC
transport.')
+ request = getattr(capi.getSiteManager(), 'REQUEST', None)
+
+ if request is not None:
+ try:
+ # use the files already registered to that concat resource
+ jsonrpc = capi.getAdapter(request, Interface, 'jsonrpc.js')
+ except capi.ComponentLookupError:
+ pass # JSON not present.
+ else:
+ # JSON present.
+ files.extend(jsonrpc.context.context.getPathList())
+ # add the json kukit support file
+ plugins_dir = os.path.split(globals()['__file__'])[0]
+ files.append(os.path.join(plugins_dir, 'browser', 'jsonkukit.js'))
+ logger.info('Lazy plugin construction: Installed support for
JSON-RPC transport.')
return files
class JsonCommandView(object):
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml
Thu Dec 18 13:27:34 2008
@@ -4,9 +4,6 @@
<!-- XXX concatresource is now included locally. -->
<include package="._concatresource" file="meta.zcml"/>
- <!-- XXX deprecation of the old azax: namespace -->
- <include package=".deprecated" file="meta.zcml"/>
-
<directives namespace="http://namespaces.zope.org/kss">
<directive
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/commands.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/commands.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/commands.py
Thu Dec 18 13:27:34 2008
@@ -2,7 +2,6 @@
from kss.core.selectors import ParentNodeSelector, SameNodeSelector
from kss.core.kssview import CommandSet
from kss.core.deprecated import deprecated, deprecated_warning
-from kss.core.parsers import HtmlParser
from kss.core.plugins.core.interfaces import IKSSCoreCommands
from zope.interface import implements
@@ -45,6 +44,12 @@
data = command.addParam('name', name)
data = command.addParam('value', value)
+ def setKssAttribute(self, selector, name, value):
+ """ see interfaces.py """
+ command = self.commands.addCommand('setKssAttribute', selector)
+ data = command.addParam('name', name)
+ data = command.addParam('value', value)
+
def setStyle(self, selector, name, value):
""" see interfaces.py """
command = self.commands.addCommand('setStyle', selector)
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.kss
==============================================================================
--- (empty file)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.kss
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,24 @@
+#standard li:click {
+ action-server: cancel;
+}
+
+#standard #without:click {
+ action-cancel: cancel;
+}
+
+#alias li:click {
+ action-client: insertHTMLAsLastChild css(#logger) alias(test);
+ test-html: action;
+}
+
+#alias #without:click {
+ action-cancel: test;
+}
+
+/* Log control
+*/
+
+#log-reset a:click, #log-reset:click {
+ action-client: clearChildNodes;
+ clearChildNodes-kssSelector: #logger;
+}
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.pt
==============================================================================
--- (empty file)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.pt
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,33 @@
+<html tal:define="viewname string:cancel">
+
+ <head>
+
+ <metal:header use-macro="context/@@header_macros/header_resources" />
+
+ </head>
+
+ <body>
+
+ <p metal:use-macro="context/@@body_macros/header">header</p>
+
+ <h2>action-cancel</h2>
+
+ <div id="standard">
+ <h3>Standard case</h3>
+ <ul>
+ <li id="with">with</li>
+ <li id="without">without</li>
+ </ul>
+ </div>
+
+ <div id="alias">
+ <h3>Alias case</h3>
+ <ul>
+ <li id="with">with</li>
+ <li id="without">without</li>
+ </ul>
+ </div>
+
+ <p metal:use-macro="context/@@body_macros/logger">logger</p>
+ </body>
+</html>
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/commandaction.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/commandaction.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/commandaction.py
Thu Dec 18 13:27:34 2008
@@ -8,10 +8,6 @@
core.toggleClass(selector, 'selected')
return self.render()
- def focus(self, id):
- self.getCommandSet('core').focus('#' + id)
- return self.render()
-
def addClass(self):
core = self.getCommandSet('core')
selector = core.getSameNodeSelector()
@@ -23,3 +19,29 @@
selector = core.getSameNodeSelector()
core.removeClass(selector, 'selected')
return self.render()
+
+ #focus
+
+ def focus(self, id):
+ self.getCommandSet('core').focus('#' + id)
+ return self.render()
+
+ #action-cancel
+
+ def toCancel(self):
+ core = self.getCommandSet('core')
+ core.insertHTMLAsLastChild('#logger', 'action')
+ return self.render()
+
+ #setKssAttribute
+
+ def echo(self, value):
+ core = self.getCommandSet('core')
+ core.insertHTMLAsLastChild('#logger', value)
+ return self.render()
+
+ def setKssAttribute(self):
+ core = self.getCommandSet('core')
+ core.setKssAttribute('#command', 'name', 'value-from-command')
+ return self.render()
+
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/configure.zcml
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/configure.zcml
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/configure.zcml
Thu Dec 18 13:27:34 2008
@@ -39,6 +39,8 @@
permission="zope.View"
/>
+ <!-- focus -->
+
<browser:page
for="kss.demo.interfaces.ISimpleContent"
template="focus.pt"
@@ -59,5 +61,56 @@
permission="zope.View"
/>
+ <!-- action-cancel -->
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ template="cancel.pt"
+ name="ca_cancel.html"
+ permission="zope.View"
+ />
+
+ <browser:resource
+ file="cancel.kss"
+ name="cancel.kss"
+ />
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ class=".commandaction.ActionsView"
+ attribute="toCancel"
+ name="cancel"
+ permission="zope.View"
+ />
+ <!-- setKssAttribute -->
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ template="kssattr.pt"
+ name="ca_kssattr.html"
+ permission="zope.View"
+ />
+
+ <browser:resource
+ file="kssattr.kss"
+ name="kssattr.kss"
+ />
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ class=".commandaction.ActionsView"
+ attribute="echo"
+ name="echo"
+ permission="zope.View"
+ />
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ class=".commandaction.ActionsView"
+ attribute="setKssAttribute"
+ name="setKssAttribute"
+ permission="zope.View"
+ />
+
</configure>
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.kss
==============================================================================
--- (empty file)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.kss
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,28 @@
+.get:click {
+ action-server: echo;
+ echo-value: kssAttr('name', true);
+}
+
+#command .set:click {
+ action-server: setKssAttribute;
+}
+
+#action .set:click {
+ action-client: setKssAttribute;
+ setKssAttribute-kssSelector: #action;
+ setKssAttribute-name: name;
+ setKssAttribute-value: value-from-action;
+}
+
+/* Log control
+*/
+
+#log-reset:click {
+ action-client: clearChildNodes;
+ clearChildNodes-kssSelector: #logger;
+}
+
+#log-reset a:click {
+ action-client: clearChildNodes;
+ clearChildNodes-kssSelector: #logger;
+}
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.pt
==============================================================================
--- (empty file)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.pt
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,34 @@
+<html tal:define="viewname string:kssattr">
+
+ <head>
+
+ <metal:header use-macro="context/@@header_macros/header_resources" />
+
+ </head>
+
+ <body>
+
+ <p metal:use-macro="context/@@body_macros/header">header</p>
+
+ <h2>setKssAttribute</h2>
+
+ <div id="command">
+ <h3>Command</h3>
+ <p><a class="button click cursorPointer get">getKssAttr</a></p>
+ <p><a class="button click cursorPointer set">setKssAttr</a></p>
+ </div>
+
+ <div id="action">
+ <h3>Action</h3>
+ <p><a class="button click cursorPointer get">getKssAttr</a></p>
+ <p><a class="button click cursorPointer set">setKssAttr</a></p>
+ </div>
+
+ <div class="log">
+ <h3>Log</h3>
+ <p id="log-reset"><a class="clickable">Reset</a></p>
+
+ <div id="logger"></div>
+ </div>
+ </body>
+</html>
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/config.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/config.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/config.py
Thu Dec 18 13:27:34 2008
@@ -9,7 +9,6 @@
except ImportError: # no demo package installed
return Plugin()
-
class CoreDemos(Plugin):
zope_demos = (
@@ -30,7 +29,9 @@
KSSDemo('', 'Core events', "kss_evt_preventbubbling.html",
"Prevent bubbling KSS event parameter"),
KSSDemo('', 'Core events', "kss_keyevents.html", "Key events"),
KSSDemo('', 'Commands/Actions', "ca_focus.html", "Focus"),
- KSSDemo('', 'Commands/Actions', "actions.html", "Toggle case
action"),
+ KSSDemo('', 'Commands/Actions', "actions.html", "Class actions:
toggle, add, remove"),
+ KSSDemo('', 'Commands/Actions', "ca_cancel.html", "action-cancel"),
+ KSSDemo('', 'Commands/Actions', "ca_kssattr.html",
"setKssAttribute"),
# XXX this should go to the other plugin wuth all its stuff
KSSDemo('Effects', '', "effects.html", "Effects"),
)
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/configure.zcml
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/configure.zcml
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/configure.zcml
Thu Dec 18 13:27:34 2008
@@ -545,5 +545,21 @@
permission="zope.View"
/>
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ class=".demoview.KSSDemoView"
+ attribute="protocolAgrave"
+ name="protocolAgrave"
+ permission="zope.View"
+ />
+
+ <browser:page
+ for="kss.demo.interfaces.ISimpleContent"
+ class=".demoview.KSSDemoView"
+ attribute="protocolEacute"
+ name="protocolEacute"
+ permission="zope.View"
+ />
+
</configure>
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.kss
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.kss
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.kss
Thu Dec 18 13:27:34 2008
@@ -16,6 +16,6 @@
#button_3:click {
action-server: urlMethodAnotherAlias;
- urlMethodAnotherAlias-kssUrl: "@@urlMethod3/urlMethod3";
+ urlMethodAnotherAlias-kssUrl: "@@urlMethod3";
}
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.pt
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.pt
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.pt
Thu Dec 18 13:27:34 2008
@@ -42,10 +42,10 @@
<h3>Alias URL with <code>@@</code></h3>
<div class="help">
- Click the button; it will call <code>@@urlMethod3/urlMethod3</code>
on the server.
+ Click the button; it will call <code>@@urlMethod3</code> on the
server.
<pre><code>#button_3:click {
action-server: urlMethodAnotherAlias;
- urlMethodAnotherAlias-kssUrl: "@@urlMethod3/urlMethod3";
+ urlMethodAnotherAlias-kssUrl: "@@urlMethod3";
}</code></pre></div>
<div class="container">
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.kss
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.kss
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.kss
Thu Dec 18 13:27:34 2008
@@ -14,7 +14,7 @@
}
#button_3:click {
- action-server: urlMethodAnotherAlias url("@@urlMethod3/urlMethod3");
+ action-server: urlMethodAnotherAlias url("@@urlMethod3");
}
#button_4:click {
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.pt
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.pt
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.pt
Thu Dec 18 13:27:34 2008
@@ -41,9 +41,9 @@
<h3>Alias URL with <code>@@</code></h3>
<div class="help">
- Click the button; it will call <code>@@urlMethod3/urlMethod3</code>
on the server.
+ Click the button; it will call <code>@@urlMethod3</code> on the
server.
<pre><code>#button_3:click {
- action-server: urlMethodAnotherAlias url("@@urlMethod3/urlMethod3");
+ action-server: urlMethodAnotherAlias url("@@urlMethod3");
}</code></pre></div>
<div class="container">
@@ -53,7 +53,7 @@
<h3>Alias URL from provider</h3>
<div class="help" >
- Click the button; it will call <code>@@urlMethod3/urlMethod3</code>
on the server.
+ Click the button; it will call <code>urlMethod3</code> on the server.
<pre><code>#button_4:click {
action-server: urlMethodAnotherAlias url(kssAttr(methodname, true));
}</code></pre></div>
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/demoview.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/demoview.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/demoview.py
Thu Dec 18 13:27:34 2008
@@ -266,3 +266,12 @@
'#character-attr-output', 'title', 'before ]]> after')
return self.render()
+ def protocolAgrave(self):
+ self.getCommandSet('core').replaceInnerHTML(
+ '#named-entity-output', 'à')
+ return self.render()
+
+ def protocolEacute(self):
+ self.getCommandSet('core').replaceInnerHTML(
+ '#named-entity-output', 'é')
+ return self.render()
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.kss
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.kss
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.kss
Thu Dec 18 13:27:34 2008
@@ -56,4 +56,14 @@
#attr-endcdata:click {
evt-click-preventdefault: true;
action-server: protocolAttributeENDCDATA;
+}
+
+#agrave:click {
+ evt-click-preventdefault: true;
+ action-server: protocolAgrave;
+}
+
+#eacute:click {
+ evt-click-preventdefault: true;
+ action-server: protocolEacute;
}
\ No newline at end of file
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.pt
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.pt
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.pt
Thu Dec 18 13:27:34 2008
@@ -86,6 +86,20 @@
</ol>
<a href="#" id="character-attr-output">Link which get a title attribute</a>
+
+ <h2>Named entities</h2>
+ <p>Named entities should work. The next example demonstrates that
+ the server can send data with named entities.</p>
+
+ <ol>
+ <li><a href="#" id="agrave">Command with an à</a></li>
+ <li><a href="#" id="eacute">Command with a é</a></li>
+ </ol>
+
+ <div id="named-entity-output">
+ test data will appear here
+ </div>
+
</body>
</html>
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_cancel.html
==============================================================================
--- (empty file)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_cancel.html
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,119 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>ca_cancel</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ca_cancel</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/demo/ca_cancel.html</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextPresent</td>
+ <td>action-cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#standard #with</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#standard #without</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#standard #with</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>actionaction</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>actionaction</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>log-reset</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#alias #with</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#alias #without</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>action</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#alias #with</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>actionaction</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>actionaction</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_kssattr.html
==============================================================================
--- (empty file)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_kssattr.html
Thu Dec 18 13:27:34 2008
@@ -0,0 +1,99 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>ca_kssattr</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ca_kssattr</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/demo/ca_kssattr.html</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextPresent</td>
+ <td>setKssAttribute</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#command .set</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForAttribute</td>
+ <td>comm...@kssattr:name</td>
+ <td>value-from-command</td>
+</tr>
+<tr>
+ <td>assertAttribute</td>
+ <td>comm...@kssattr:name</td>
+ <td>value-from-command</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#command .get</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>value-from-command</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>value-from-command</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>log-reset</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>logger</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextNotPresent</td>
+ <td>logger</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#action .set</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForAttribute</td>
+ <td>act...@kssattr:name</td>
+ <td>value-from-action</td>
+</tr>
+<tr>
+ <td>assertAttribute</td>
+ <td>act...@kssattr:name</td>
+ <td>value-from-action</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>css=#action .get</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>logger</td>
+ <td>value-from-action</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>logger</td>
+ <td>value-from-action</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/protocol.html
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/protocol.html
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/protocol.html
Thu Dec 18 13:27:34 2008
@@ -163,6 +163,26 @@
<td>character-attr-out...@title</td>
<td>before ]]> after</td>
</tr>
+<tr>
+ <td>click</td>
+ <td>agrave</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>named-entity-output</td>
+ <td>à</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>eacute</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>named-entity-output</td>
+ <td>é</td>
+</tr>
</tbody></table>
</body>
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/zopeconfig.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/zopeconfig.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/zopeconfig.py
Thu Dec 18 13:27:34 2008
@@ -38,7 +38,9 @@
KSSDemo('', 'Core events', "kss_evt_preventbubbling.html", "Prevent
bubbling KSS event parameter"),
KSSDemo('', 'Core events', "kss_keyevents.html", "Key events"),
KSSDemo('', 'Commands/Actions', "ca_focus.html", "Focus"),
- KSSDemo('', 'Commands/Actions', "actions.html", "Toggle case action"),
+ KSSDemo('', 'Commands/Actions', "actions.html", "Class actions:
toggle, add, remove"),
+ KSSDemo('', 'Commands/Actions', "ca_cancel.html", "action-cancel"),
+ KSSDemo('', 'Commands/Actions', "ca_kssattr.html", "setKssAttribute"),
)
# directories are relative from the location of this .py file
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/interfaces.py
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/interfaces.py
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/interfaces.py
Thu Dec 18 13:27:34 2008
@@ -33,6 +33,9 @@
def setAttribute(selector, name, value):
"""Set an attribute on node(s) specified by the selector"""
+ def setKssAttribute(selector, name, value):
+ """Set a KSS attribute on node(s) specified by the selector"""
+
def setStyle(selector, name, value):
"""Set the style attribute of nodes specified by the selector"""
Modified: kukit/kss.core/branch/ree-service-layer-and-refactoring/setup.py
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/setup.py
(original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/setup.py Thu Dec
18 13:27:34 2008
@@ -1,13 +1,27 @@
from setuptools import setup, find_packages
-import sys, os
+import os
version = '1.5'
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+long_description = (
+ read('docs', 'INTRO.txt')
+ + '\n' +
+ 'Recently changed\n'
+ '**********************\n'
+ + '\n' +
+ read('docs', 'NEWS.txt')
+ + '\n' +
+ 'Download\n'
+ '**********************\n'
+ )
+
setup(name='kss.core',
version=version,
description="KSS (Kinetic Style Sheets) core framework",
- long_description="""\
-""",
+ long_description = long_description,
# Get more strings from
http://www.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Framework :: Zope2",
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins