From jvloothuis at codespeak.net Sat Feb 2 10:52:37 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 10:52:37 +0100 (CET)
Subject: [KSS-checkins] r51197 - kukit/buildout/kss.zope
Message-ID: <20080202095237.2F52C16840A@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 10:52:35 2008
New Revision: 51197
Modified:
kukit/buildout/kss.zope/base.cfg
Log:
Changed Zope to use a release just like ploneout (instead of the svn version)
Modified: kukit/buildout/kss.zope/base.cfg
==============================================================================
--- kukit/buildout/kss.zope/base.cfg (original)
+++ kukit/buildout/kss.zope/base.cfg Sat Feb 2 10:52:35 2008
@@ -91,8 +91,7 @@
[zope2]
recipe = plone.recipe.zope2install
-# url = http://www.zope.org/Products/Zope/2.10.4/Zope-2.10.4-final.tgz
-svn = svn://svn.zope.org/repos/main/Zope/trunk
+url = http://www.zope.org/Products/Zope/2.11.0b1/Zope-2.11.0-b1.tgz
[instance]
recipe = plone.recipe.zope2instance
From gotcha at codespeak.net Sat Feb 2 11:05:48 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 2 Feb 2008 11:05:48 +0100 (CET)
Subject: [KSS-checkins] r51198 - in kukit/kss.demo/trunk: . kss/demo/browser
Message-ID: <20080202100548.8E4CC168408@codespeak.net>
Author: gotcha
Date: Sat Feb 2 11:05:47 2008
New Revision: 51198
Modified:
kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt
kukit/kss.demo/trunk/setup.py
Log:
some fixes to ensure it still works with Z3
Modified: kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt (original)
+++ kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt Sat Feb 2 11:05:47 2008
@@ -10,7 +10,7 @@
Link to Zelenium object:
-
Modified: kukit/kss.demo/trunk/setup.py
==============================================================================
--- kukit/kss.demo/trunk/setup.py (original)
+++ kukit/kss.demo/trunk/setup.py Sat Feb 2 11:05:47 2008
@@ -27,6 +27,7 @@
install_requires=[
# -*- Extra requirements: -*-
'setuptools',
+ 'elementtree',
'kss.core>=dev',
],
entry_points="""
From jvloothuis at codespeak.net Sat Feb 2 11:27:17 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 11:27:17 +0100 (CET)
Subject: [KSS-checkins] r51199 -
kukit/kss.demo/branch/kss-zope-transition/kss/demo
Message-ID: <20080202102717.174E7168408@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 11:27:16 2008
New Revision: 51199
Modified:
kukit/kss.demo/branch/kss-zope-transition/kss/demo/interfaces.py
Log:
Merged from trunk
Modified: kukit/kss.demo/branch/kss-zope-transition/kss/demo/interfaces.py
==============================================================================
--- kukit/kss.demo/branch/kss-zope-transition/kss/demo/interfaces.py (original)
+++ kukit/kss.demo/branch/kss-zope-transition/kss/demo/interfaces.py Sat Feb 2 11:27:16 2008
@@ -1,6 +1,7 @@
from zope.interface import Interface
from zope.schema import (
TextLine,
+ List,
)
class ISimpleContent(Interface):
@@ -49,3 +50,94 @@
description=u'Relative directory path, contains *.html selenium tests',
required=False,
)
+
+# --
+# Resource definition interfaces
+# --
+
+class IKSSDemoResource(Interface):
+ """An utility that a demo needs to register"""
+
+ # list of IKSSDemo
+ demos = List(
+ title=u"demos",
+ description=u'The ordered list of demos contained in this plugin',
+ required=True,
+ )
+
+class IKSSSeleniumTestResource(Interface):
+ """An utility that a demo needs to register"""
+
+ # list of IKSSSeleniumTestDir
+ selenium_tests = List(
+ title=u"selenium tests",
+ description=u'The list of selenium test directories contained in this plugin',
+ required=True,
+ )
+
+# --
+# The registry itself
+# --
+
+class IKSSDemoRegistry(Interface):
+ """Faciliates registration of demos.
+
+ Implementations must look after the IKSSDemoResource
+ adapters, and use their content to set up themselves.
+ """
+
+ def registerDemo(demo):
+ """Register a demo
+
+ It has the attributes specified in IKSSDemo:
+
+ plugin_namespace - string with the name of the plugin.
+ Or: "" when it is the core part.
+
+ category - text that will appear as the title of the
+ category. "" if out of category.
+
+ demo_page - (relative) url of the demo page. This should
+ traverse on ISimpleContent.
+
+ title - Title of the demo. This also identifies it
+ for removal.
+ """
+
+ def unregisterDemo(demo):
+ """Unregister the given demo."""
+
+ def getSortedDemos():
+ """Get the (sorted) list of demos"""
+
+class IKSSSeleniumTestRegistry(Interface):
+ """Faciliates registration of demos.
+
+ Implementations must look after the IKSSSeleniumTestResource
+ adapters, and use their content to set up themselves.
+ """
+
+ def registerSeleniumTestFile(test_filename):
+ """Register a selenium test directory
+
+ It test_dir has the "filename" attributes specified in IKSSSeleniumTest.
+ """
+
+ def unregisterSeleniumTestFile(test_filename):
+ """Unregister the given test directory."""
+
+
+# --
+# Event that gets redispatched, for allowing
+# the listeners to filter on component
+# --
+
+class IKSSDemoRegistrationEvent(Interface):
+ """Redispatched event for registration of
+ IKSSDemoRegistration utilities (resources).
+ """
+
+class IKSSDemoRegistryEvent(Interface):
+ """Redispatched event for registration of
+ IKSSDemoRegistry utilities.
+ """
From jvloothuis at codespeak.net Sat Feb 2 12:06:52 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 12:06:52 +0100 (CET)
Subject: [KSS-checkins] r51200 - in kukit:
kss.core/trunk/kss/core/plugins/core/demo
kss.core/trunk/kss/core/plugins/core/demo/binderids
kss.zope/trunk/kss/core kss.zope/trunk/kss/zope
kss.zope/trunk/kss/zope/browser kss.zope/trunk/kss/zope/plugins/core
kss.zope/trunk/kss/zope/plugins/effects
Message-ID: <20080202110652.EE11016806C@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 12:06:51 2008
New Revision: 51200
Added:
kukit/kss.zope/trunk/kss/zope/baseconfigure.py
kukit/kss.zope/trunk/kss/zope/browser/kss_javascript.pt
Modified:
kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
kukit/kss.zope/trunk/kss/core/configure.zcml
kukit/kss.zope/trunk/kss/zope/browser/configure.zcml
kukit/kss.zope/trunk/kss/zope/configure.zcml
kukit/kss.zope/trunk/kss/zope/plugins/core/config.py
kukit/kss.zope/trunk/kss/zope/plugins/effects/configure.zcml
Log:
Changes needed to make Grok work
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py Sat Feb 2 12:06:51 2008
@@ -1,22 +1,25 @@
-
from kss.base.plugin import Plugin
-from kss.demo.resource import (
- KSSDemo,
- KSSSeleniumTestDirectory,
- )
-class CoreDemos(Plugin):
+try:
+ from kss.demo.resource import (
+ KSSDemo,
+ KSSSeleniumTestDirectory,
+ )
+except ImportError:
+ demos = False
- zope_demos = (
- # List your demos here.
- # (Second parameter can be a subcategory within the demo if needed.)
- KSSDemo('', 'Core syntax', 'binderids.html', 'Binder ids'),
+class CoreDemos(Plugin):
+ if demos:
+ zope_demos = (
+ # List your demos here.
+ # (Second parameter can be a subcategory within the demo if needed.)
+ KSSDemo('', 'Core syntax', 'binderids.html', 'Binder ids'),
- )
+ )
- # directories are relative from the location of this .py file
- zope_selenium_testsuites = (
- # if you only have one test directory, you
- # need not change anything here.
- KSSSeleniumTestDirectory('selenium_tests'),
- )
+ # directories are relative from the location of this .py file
+ zope_selenium_testsuites = (
+ # if you only have one test directory, you
+ # need not change anything here.
+ KSSSeleniumTestDirectory('selenium_tests'),
+ )
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py Sat Feb 2 12:06:51 2008
@@ -1,36 +1,38 @@
-
from kss.base.plugin import Plugin
-from kss.demo.resource import (
- KSSDemo,
- KSSSeleniumTestDirectory,
- )
+try:
+ from kss.demo.resource import (
+ KSSDemo,
+ KSSSeleniumTestDirectory,
+ )
+except ImportError:
+ demos = False
class CoreDemos(Plugin):
+ if demos:
+ zope_demos = (
+ KSSDemo('', '', "basic_commands.html", "Change tag content"),
+ KSSDemo('', '', "two_selects.html", "Two selects"),
+ KSSDemo('', '', "autoupdate.html", "Auto update"),
+ KSSDemo('', '', "inline_edit.html", "Inline edit"),
+ KSSDemo('', '', "cancel_submit.html", "Cancel Submit Click"),
+ KSSDemo('', '', "tree.html", "Tree"),
+ KSSDemo('', '', "more_selectors.html", "More complex selectors"),
+ KSSDemo('', '', "two_select_revisited.html", "Master-slave selects revisited"),
+ KSSDemo('', '', "form_submit.html", "Form submit"),
+ KSSDemo('', '', "error_handling.html", "Error handling"),
+ KSSDemo('', '', "preventdefault.html", "Preventdefault (a.k.a. Safari workarounds)"),
+ KSSDemo('', '', "html_inserts.html", "HTML insertions (Change tag content returns)"),
+ KSSDemo('', '', "client-server-protocol", "Client server protocol"),
+ KSSDemo('', 'Selectors', 'selectors.html', 'Parent node selector'),
+ 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"),
+ # XXX this should go to the other plugin wuth all its stuff
+ KSSDemo('Effects', '', "effects.html", "Effects"),
+ )
- zope_demos = (
- KSSDemo('', '', "basic_commands.html", "Change tag content"),
- KSSDemo('', '', "two_selects.html", "Two selects"),
- KSSDemo('', '', "autoupdate.html", "Auto update"),
- KSSDemo('', '', "inline_edit.html", "Inline edit"),
- KSSDemo('', '', "cancel_submit.html", "Cancel Submit Click"),
- KSSDemo('', '', "tree.html", "Tree"),
- KSSDemo('', '', "more_selectors.html", "More complex selectors"),
- KSSDemo('', '', "two_select_revisited.html", "Master-slave selects revisited"),
- KSSDemo('', '', "form_submit.html", "Form submit"),
- KSSDemo('', '', "error_handling.html", "Error handling"),
- KSSDemo('', '', "preventdefault.html", "Preventdefault (a.k.a. Safari workarounds)"),
- KSSDemo('', '', "html_inserts.html", "HTML insertions (Change tag content returns)"),
- KSSDemo('', '', "client-server-protocol", "Client server protocol"),
- KSSDemo('', 'Selectors', 'selectors.html', 'Parent node selector'),
- 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"),
- # XXX this should go to the other plugin wuth all its stuff
- KSSDemo('Effects', '', "effects.html", "Effects"),
- )
-
- # directories are relative from the location of this .py file
- zope_selenium_testsuites = (
- KSSSeleniumTestDirectory('selenium_tests'),
- )
+ # directories are relative from the location of this .py file
+ zope_selenium_testsuites = (
+ KSSSeleniumTestDirectory('selenium_tests'),
+ )
Modified: kukit/kss.zope/trunk/kss/core/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/core/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/core/configure.zcml Sat Feb 2 12:06:51 2008
@@ -3,55 +3,57 @@
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:five="http://namespaces.zope.org/five">
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: kukit/kss.zope/trunk/kss/zope/baseconfigure.py
==============================================================================
--- (empty file)
+++ kukit/kss.zope/trunk/kss/zope/baseconfigure.py Sat Feb 2 12:06:51 2008
@@ -0,0 +1,17 @@
+import kss.base
+from kss.base.plugin import file_below_module
+from zope.app.publisher.fileresource import File
+from zope.app.publisher.browser.fileresource import FileResource
+
+
+def third_party_js_resource(name, request):
+ path = file_below_module(kss.base, 'kukit/3rd_party/%s' % name)
+ return FileResource(File(path, name), request)
+
+def sarissa_resource(request):
+ return third_party_js_resource('sarissa.js', request)
+
+def base2_resource(request):
+ return third_party_js_resource('base2-dom-fp.js', request)
+
+
Modified: kukit/kss.zope/trunk/kss/zope/browser/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/browser/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/browser/configure.zcml Sat Feb 2 12:06:51 2008
@@ -1,34 +1,32 @@
-
+ xmlns:browser="http://namespaces.zope.org/browser"
+ >
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Added: kukit/kss.zope/trunk/kss/zope/browser/kss_javascript.pt
==============================================================================
--- (empty file)
+++ kukit/kss.zope/trunk/kss/zope/browser/kss_javascript.pt Sat Feb 2 12:06:51 2008
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
Modified: kukit/kss.zope/trunk/kss/zope/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/configure.zcml Sat Feb 2 12:06:51 2008
@@ -1,6 +1,6 @@
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:kss="http://namespaces.zope.org/kss">
@@ -29,4 +29,26 @@
lmt_check_period="5"
/>
+
+
+
+
+
+
+
+
+
Modified: kukit/kss.zope/trunk/kss/zope/plugins/core/config.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/config.py (original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/config.py Sat Feb 2 12:06:51 2008
@@ -1,9 +1,12 @@
-
from kss.base.plugin import Plugin
-from kss.demo.resource import (
- KSSDemo,
- KSSSeleniumTestDirectory,
-)
+
+try:
+ from kss.demo.resource import (
+ KSSDemo,
+ KSSSeleniumTestDirectory,
+ )
+except ImportError:
+ demos = False # No kss.demo installed so just skip the demos
class KSSCore(Plugin):
'''The KSS core plugin has all the standard functionality'''
@@ -18,29 +21,30 @@
# Zope specific stuff
- zope_demos = (
- KSSDemo('', '', "demos/basic_commands.html", "Change tag content"),
- KSSDemo('', '', "demos/two_selects.html", "Two selects"),
- KSSDemo('', '', "demos/autoupdate.html", "Auto update"),
- KSSDemo('', '', "demos/inline_edit.html", "Inline edit"),
- KSSDemo('', '', "demos/cancel_submit.html", "Cancel Submit Click"),
- KSSDemo('', '', "demos/tree.html", "Tree"),
- KSSDemo('', '', "demos/more_selectors.html", "More complex selectors"),
- KSSDemo('', '', "demos/two_select_revisited.html", "Master-slave selects revisited"),
- KSSDemo('', '', "demos/form_submit.html", "Form submit"),
- KSSDemo('', '', "demos/effects.html", "Effects"),
- KSSDemo('', '', "demos/error_handling.html", "Error handling"),
- KSSDemo('', '', "demos/preventdefault.html", "Preventdefault (a.k.a. Safari workarounds)"),
- KSSDemo('', '', "demos/html_inserts.html", "HTML insertions (Change tag content returns)"),
- KSSDemo('', 'Parameter functions', 'demos/pf_forms.html', 'Forms'),
- KSSDemo('', 'Selectors', 'demos/selectors.html', 'Parent node selector'),
- KSSDemo('', 'Core syntax', "demos/kss_selector_param.html", "Kss selector parameters"),
- KSSDemo('', 'Core syntax', "demos/kss_url_param.html", "Kss url parameters"),
- KSSDemo('', 'Core events', "demos/kss_evt_preventbubbling.html", "Prevent bubbling KSS event parameter"),
- KSSDemo('', 'Core events', "demos/kss_keyevents.html", "Key events"),
- KSSDemo('', 'Commands/Actions', "demos/ca_focus.html", "Focus"),
- KSSDemo('', 'Commands/Actions', "demos/actions.html", "Toggle case action"),
- )
+ if demos:
+ zope_demos = (
+ KSSDemo('', '', "demos/basic_commands.html", "Change tag content"),
+ KSSDemo('', '', "demos/two_selects.html", "Two selects"),
+ KSSDemo('', '', "demos/autoupdate.html", "Auto update"),
+ KSSDemo('', '', "demos/inline_edit.html", "Inline edit"),
+ KSSDemo('', '', "demos/cancel_submit.html", "Cancel Submit Click"),
+ KSSDemo('', '', "demos/tree.html", "Tree"),
+ KSSDemo('', '', "demos/more_selectors.html", "More complex selectors"),
+ KSSDemo('', '', "demos/two_select_revisited.html", "Master-slave selects revisited"),
+ KSSDemo('', '', "demos/form_submit.html", "Form submit"),
+ KSSDemo('', '', "demos/effects.html", "Effects"),
+ KSSDemo('', '', "demos/error_handling.html", "Error handling"),
+ KSSDemo('', '', "demos/preventdefault.html", "Preventdefault (a.k.a. Safari workarounds)"),
+ KSSDemo('', '', "demos/html_inserts.html", "HTML insertions (Change tag content returns)"),
+ KSSDemo('', 'Parameter functions', 'demos/pf_forms.html', 'Forms'),
+ KSSDemo('', 'Selectors', 'demos/selectors.html', 'Parent node selector'),
+ KSSDemo('', 'Core syntax', "demos/kss_selector_param.html", "Kss selector parameters"),
+ KSSDemo('', 'Core syntax', "demos/kss_url_param.html", "Kss url parameters"),
+ KSSDemo('', 'Core events', "demos/kss_evt_preventbubbling.html", "Prevent bubbling KSS event parameter"),
+ KSSDemo('', 'Core events', "demos/kss_keyevents.html", "Key events"),
+ KSSDemo('', 'Commands/Actions', "demos/ca_focus.html", "Focus"),
+ KSSDemo('', 'Commands/Actions', "demos/actions.html", "Toggle case action"),
+ )
# directories are relative from the location of this .py file
selenium_tests = (
Modified: kukit/kss.zope/trunk/kss/zope/plugins/effects/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/effects/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/effects/configure.zcml Sat Feb 2 12:06:51 2008
@@ -16,46 +16,4 @@
name="effects.js"
/>
-
-
-
-
-
-
-
-
-
-
-
-
From jvloothuis at codespeak.net Sat Feb 2 14:00:55 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 14:00:55 +0100 (CET)
Subject: [KSS-checkins] r51209 - in kukit/kss.zope/trunk: . kss/zope
kss/zope/plugins/core
Message-ID: <20080202130055.2CE2D16845B@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 14:00:54 2008
New Revision: 51209
Added:
kukit/kss.zope/trunk/kss/zope/EXTERNALS.txt
Modified:
kukit/kss.zope/trunk/kss/zope/ (props changed)
kukit/kss.zope/trunk/kss/zope/baseconfigure.py
kukit/kss.zope/trunk/kss/zope/configure.zcml
kukit/kss.zope/trunk/kss/zope/plugins/core/config.py
kukit/kss.zope/trunk/setup.py
Log:
Changes made to make kss.zope work on Zope 2 again after the Zope
3/Grok changes.
Ecmaunit tests work now. This means all Selenium tests pass!
Added: kukit/kss.zope/trunk/kss/zope/EXTERNALS.txt
==============================================================================
--- (empty file)
+++ kukit/kss.zope/trunk/kss/zope/EXTERNALS.txt Sat Feb 2 14:00:54 2008
@@ -0,0 +1 @@
+kukit_3rd_party https://codespeak.net/svn/kukit/kukit.js/trunk/3rd_party
\ No newline at end of file
Modified: kukit/kss.zope/trunk/kss/zope/baseconfigure.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/baseconfigure.py (original)
+++ kukit/kss.zope/trunk/kss/zope/baseconfigure.py Sat Feb 2 14:00:54 2008
@@ -4,8 +4,11 @@
from zope.app.publisher.browser.fileresource import FileResource
-def third_party_js_resource(name, request):
- path = file_below_module(kss.base, 'kukit/3rd_party/%s' % name)
+def third_party_js_resource(path, request, name=None):
+ if name is None:
+ name = path
+
+ path = file_below_module(kss.base, 'kukit/3rd_party/%s' % path)
return FileResource(File(path, name), request)
def sarissa_resource(request):
@@ -14,4 +17,18 @@
def base2_resource(request):
return third_party_js_resource('base2-dom-fp.js', request)
-
+def minisax_resource(request):
+ return third_party_js_resource(
+ 'johnnydebris.net/minisax.js/minisax.js', request, 'minisax.js')
+
+def string_resource(request):
+ return third_party_js_resource(
+ 'johnnydebris.net/jsbase/string.js', request, 'string.js')
+
+def array_resource(request):
+ return third_party_js_resource(
+ 'johnnydebris.net/jsbase/array.js', request, 'array.js')
+
+def dommer_resource(request):
+ return third_party_js_resource(
+ 'johnnydebris.net/dommer/dommer.js', request, 'dommer.js')
Modified: kukit/kss.zope/trunk/kss/zope/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/configure.zcml Sat Feb 2 14:00:54 2008
@@ -38,17 +38,78 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Modified: kukit/kss.zope/trunk/kss/zope/plugins/core/config.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/config.py (original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/config.py Sat Feb 2 14:00:54 2008
@@ -1,5 +1,9 @@
from kss.base.plugin import Plugin
+from kss.demo.resource import (
+ KSSDemo,
+ KSSSeleniumTestDirectory,
+ )
try:
from kss.demo.resource import (
KSSDemo,
@@ -11,9 +15,6 @@
class KSSCore(Plugin):
'''The KSS core plugin has all the standard functionality'''
- # XXX what is priority?
- priority = -1000
-
javascripts = []
extra_javascripts = []
commandsets = {}
@@ -21,30 +22,30 @@
# Zope specific stuff
- if demos:
- zope_demos = (
- KSSDemo('', '', "demos/basic_commands.html", "Change tag content"),
- KSSDemo('', '', "demos/two_selects.html", "Two selects"),
- KSSDemo('', '', "demos/autoupdate.html", "Auto update"),
- KSSDemo('', '', "demos/inline_edit.html", "Inline edit"),
- KSSDemo('', '', "demos/cancel_submit.html", "Cancel Submit Click"),
- KSSDemo('', '', "demos/tree.html", "Tree"),
- KSSDemo('', '', "demos/more_selectors.html", "More complex selectors"),
- KSSDemo('', '', "demos/two_select_revisited.html", "Master-slave selects revisited"),
- KSSDemo('', '', "demos/form_submit.html", "Form submit"),
- KSSDemo('', '', "demos/effects.html", "Effects"),
- KSSDemo('', '', "demos/error_handling.html", "Error handling"),
- KSSDemo('', '', "demos/preventdefault.html", "Preventdefault (a.k.a. Safari workarounds)"),
- KSSDemo('', '', "demos/html_inserts.html", "HTML insertions (Change tag content returns)"),
- KSSDemo('', 'Parameter functions', 'demos/pf_forms.html', 'Forms'),
- KSSDemo('', 'Selectors', 'demos/selectors.html', 'Parent node selector'),
- KSSDemo('', 'Core syntax', "demos/kss_selector_param.html", "Kss selector parameters"),
- KSSDemo('', 'Core syntax', "demos/kss_url_param.html", "Kss url parameters"),
- KSSDemo('', 'Core events', "demos/kss_evt_preventbubbling.html", "Prevent bubbling KSS event parameter"),
- KSSDemo('', 'Core events', "demos/kss_keyevents.html", "Key events"),
- KSSDemo('', 'Commands/Actions', "demos/ca_focus.html", "Focus"),
- KSSDemo('', 'Commands/Actions', "demos/actions.html", "Toggle case action"),
- )
+# if demos:
+ zope_demos = (
+ KSSDemo('', '', "demos/basic_commands.html", "Change tag content"),
+ KSSDemo('', '', "demos/two_selects.html", "Two selects"),
+ KSSDemo('', '', "demos/autoupdate.html", "Auto update"),
+ KSSDemo('', '', "demos/inline_edit.html", "Inline edit"),
+ KSSDemo('', '', "demos/cancel_submit.html", "Cancel Submit Click"),
+ KSSDemo('', '', "demos/tree.html", "Tree"),
+ KSSDemo('', '', "demos/more_selectors.html", "More complex selectors"),
+ KSSDemo('', '', "demos/two_select_revisited.html", "Master-slave selects revisited"),
+ KSSDemo('', '', "demos/form_submit.html", "Form submit"),
+ KSSDemo('', '', "demos/effects.html", "Effects"),
+ KSSDemo('', '', "demos/error_handling.html", "Error handling"),
+ KSSDemo('', '', "demos/preventdefault.html", "Preventdefault (a.k.a. Safari workarounds)"),
+ KSSDemo('', '', "demos/html_inserts.html", "HTML insertions (Change tag content returns)"),
+ KSSDemo('', 'Parameter functions', 'demos/pf_forms.html', 'Forms'),
+ KSSDemo('', 'Selectors', 'demos/selectors.html', 'Parent node selector'),
+ KSSDemo('', 'Core syntax', "demos/kss_selector_param.html", "Kss selector parameters"),
+ KSSDemo('', 'Core syntax', "demos/kss_url_param.html", "Kss url parameters"),
+ KSSDemo('', 'Core events', "demos/kss_evt_preventbubbling.html", "Prevent bubbling KSS event parameter"),
+ KSSDemo('', 'Core events', "demos/kss_keyevents.html", "Key events"),
+ KSSDemo('', 'Commands/Actions', "demos/ca_focus.html", "Focus"),
+ KSSDemo('', 'Commands/Actions', "demos/actions.html", "Toggle case action"),
+ )
# directories are relative from the location of this .py file
selenium_tests = (
Modified: kukit/kss.zope/trunk/setup.py
==============================================================================
--- kukit/kss.zope/trunk/setup.py (original)
+++ kukit/kss.zope/trunk/setup.py Sat Feb 2 14:00:54 2008
@@ -31,8 +31,8 @@
],
entry_points={
'kss.plugin': [
- 'core-demos-1=kss.zope.plugins.core.demo.config:CoreDemos',
- 'core-demos-binderids=kss.zope.plugins.core.demo.binderids.config:CoreDemos',
+ 'core-demos-1=kss.zope.plugins.core.demo.config:core_demos',
+ 'core-demos-binderids=kss.zope.plugins.core.demo.binderids.config:core_demos',
],
},
)
From jvloothuis at codespeak.net Sat Feb 2 14:01:09 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 14:01:09 +0100 (CET)
Subject: [KSS-checkins] r51210 - in
kukit/kss.core/trunk/kss/core/plugins/core/demo: . binderids
Message-ID: <20080202130109.9D945168462@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 14:01:09 2008
New Revision: 51210
Modified:
kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
Log:
Changes made to make kss.zope work on Zope 2 again after the Zope
3/Grok changes.
Ecmaunit tests work now. This means all Selenium tests pass!
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py Sat Feb 2 14:01:09 2008
@@ -1,20 +1,21 @@
from kss.base.plugin import Plugin
-try:
- from kss.demo.resource import (
- KSSDemo,
- KSSSeleniumTestDirectory,
- )
-except ImportError:
- demos = False
+def core_demos():
+ try:
+ from kss.demo.resource import (
+ KSSDemo,
+ KSSSeleniumTestDirectory,
+ )
+ except ImportError: # no demo package installed
+ return Plugin()
+
+
+ class CoreDemos(Plugin):
-class CoreDemos(Plugin):
- if demos:
zope_demos = (
# List your demos here.
# (Second parameter can be a subcategory within the demo if needed.)
KSSDemo('', 'Core syntax', 'binderids.html', 'Binder ids'),
-
)
# directories are relative from the location of this .py file
@@ -23,3 +24,5 @@
# need not change anything here.
KSSSeleniumTestDirectory('selenium_tests'),
)
+ return CoreDemos()
+
Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py Sat Feb 2 14:01:09 2008
@@ -1,14 +1,17 @@
from kss.base.plugin import Plugin
-try:
- from kss.demo.resource import (
- KSSDemo,
- KSSSeleniumTestDirectory,
- )
-except ImportError:
- demos = False
-class CoreDemos(Plugin):
- if demos:
+def core_demos():
+ try:
+ from kss.demo.resource import (
+ KSSDemo,
+ KSSSeleniumTestDirectory,
+ )
+ except ImportError: # no demo package installed
+ return Plugin()
+
+
+ class CoreDemos(Plugin):
+
zope_demos = (
KSSDemo('', '', "basic_commands.html", "Change tag content"),
KSSDemo('', '', "two_selects.html", "Two selects"),
@@ -36,3 +39,4 @@
zope_selenium_testsuites = (
KSSSeleniumTestDirectory('selenium_tests'),
)
+ return CoreDemos()
From jvloothuis at codespeak.net Sat Feb 2 16:56:42 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 16:56:42 +0100 (CET)
Subject: [KSS-checkins] r51212 - kukit/kss.base/trunk/kss/base
Message-ID: <20080202155642.2E0A6168471@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 16:56:41 2008
New Revision: 51212
Modified:
kukit/kss.base/trunk/kss/base/commands.txt
Log:
Added a test for the serialization of global actions
Modified: kukit/kss.base/trunk/kss/base/commands.txt
==============================================================================
--- kukit/kss.base/trunk/kss/base/commands.txt (original)
+++ kukit/kss.base/trunk/kss/base/commands.txt Sat Feb 2 16:56:41 2008
@@ -119,6 +119,25 @@
True
+Command types
+-------------
+
+KSS supports two types of commands; global and node based
+commands. The global commands call an action with a set of arguments.
+
+ >>> commands = KSSCommands()
+ >>> commands.add('globalAction', None, value='data')
+ >>> commands.render()
+ '...data...'
+
+Now lets demonstrate the other type of command. This needs a selector.
+
+ >>> commands = KSSCommands()
+ >>> commands.add('action', None, value='data')
+ >>> commands.render()
+ '...data...'
+
+
String representation
=====================
From jvloothuis at codespeak.net Sat Feb 2 16:59:30 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Sat, 2 Feb 2008 16:59:30 +0100 (CET)
Subject: [KSS-checkins] r51213 - kukit/kss.base/trunk/docs
Message-ID: <20080202155930.9102A168473@codespeak.net>
Author: jvloothuis
Date: Sat Feb 2 16:59:30 2008
New Revision: 51213
Added:
kukit/kss.base/trunk/docs/protocol.txt
Log:
Added a doc about the protocol
Added: kukit/kss.base/trunk/docs/protocol.txt
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/docs/protocol.txt Sat Feb 2 16:59:30 2008
@@ -0,0 +1,94 @@
+============
+KSS protocol
+============
+
+HTTP is used to let a browser and server communicate. Messages from
+the browser to the server are send using normal HTTP POST
+request. This means that you can use your server side framework just
+like you would when you would process a form.
+
+--------
+Response
+--------
+
+The response from the server should be an XML document. For this there
+are is a specific HTTP response header which needs to be set. This
+header is the `content-type` and should be set to `text/xml`.
+
+An example of a message body is shown below::
+
+
+
+
+ demo
+
+
+
+
+
+
+All KSS responses should be valid XML documents. This means that
+values passed from the server to the browser should be properly
+escaped. More on this later in the section `Escaping data`.
+
+The first line from the response is the container element. Next to
+this it should also specify the version of the protocol used like in
+the example.
+
+Next is the `commands` element. This is the container for all commands
+which should be executed by the browser. The sequence of the commands
+within this element is significant. Topmost commands are executed
+before commands lower in the document.
+
+Each command is represented by a `command` element. There are
+currently two types of commands, element bound (command which will be
+executed on zero to many nodes) and global command.
+
+For a global command only the name is required. An element bound
+command needs a `name` and a `selector`. The `selectorType` is
+optional and defaults to the CSS selector.
+
+Parameters for a command are located within the command node. These
+can be repeated for each parameter required for the command. A
+parameter element should have a `name`. This name is used for creating
+a keyword argument. The value of each parameter is its contents. This
+contents should be a text or CDATA node.
+
+
+-------------
+Escaping data
+-------------
+
+Since the message format of KSS is XML all data send from the sever
+should be properly escaped. Next to making sure that the data is valid
+there are also a few other concerns. The next few paragraphs will
+explain the guidelines for implementing the protocol. Note that these
+are not hard requirements but rather a set of know browser issues and
+their workarounds or things that have proven usefull in practise.
+
+
+Readable data
+-------------
+
+One thing which is not a hard requirement is having the response XML
+as human readable as possible. This is usefull when using tools like
+Firebug so one can easy inspect the response XML.
+
+To make the message as readable as possible escape all parameter
+values which are (X)HTML with CDATA sections.
+
+All other parameter values should be represented as text nodes. Do not
+forget to escape these where appropriate using normal XML escaping
+rules.
+
+
+CDATA for large values
+----------------------
+
+Parameter values which exceed 4 kilo byte should always be represented
+as CDATA nodes. The reason for this is that there is a bug in Firefox
+which causes large text nodes to be split up. This in turn results in
+parsing problems for the browser and usually means that commands stop
+executing like expected.
\ No newline at end of file
From gotcha at codespeak.net Sat Feb 2 18:50:44 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Sat, 2 Feb 2008 18:50:44 +0100 (CET)
Subject: [KSS-checkins] r51218 - kukit/kss.zope/trunk/kss/zope
Message-ID: <20080202175044.47FCF168451@codespeak.net>
Author: gotcha
Date: Sat Feb 2 18:50:43 2008
New Revision: 51218
Modified:
kukit/kss.zope/trunk/kss/zope/configure.zcml
Log:
update prod and dev mode to be inline with kss.core
Modified: kukit/kss.zope/trunk/kss/zope/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/configure.zcml (original)
+++ kukit/kss.zope/trunk/kss/zope/configure.zcml Sat Feb 2 18:50:43 2008
@@ -19,6 +19,8 @@
@@ -26,7 +28,7 @@
name="kukit-devel.js"
compress_level="devel"
caching="memory"
- lmt_check_period="5"
+ lmt_check_period="0"
/>
From kukit-checkins at codespeak.net Sun Feb 3 21:31:49 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Sun, 3 Feb 2008 21:31:49 +0100 (CET)
Subject: [KSS-checkins] February 50% OFF
Message-ID: <20080203143123.4904.qmail@ppp85-140-54-38.pppoe.mtu-net.ru>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080203/e689641c/attachment-0001.htm
From reebalazs at codespeak.net Mon Feb 4 19:47:51 2008
From: reebalazs at codespeak.net (reebalazs at codespeak.net)
Date: Mon, 4 Feb 2008 19:47:51 +0100 (CET)
Subject: [KSS-checkins] r51263 -
kukit/kss.core/branch/1.2/kss/core/plugins/core
Message-ID: <20080204184751.67F84168519@codespeak.net>
Author: reebalazs
Date: Mon Feb 4 19:47:50 2008
New Revision: 51263
Modified:
kukit/kss.core/branch/1.2/kss/core/plugins/core/commands.py
kukit/kss.core/branch/1.2/kss/core/plugins/core/configure.zcml
kukit/kss.core/branch/1.2/kss/core/plugins/core/interfaces.py
Log:
Fix core commandset, continueEvent must match up the kukit.js implementation,
or otherwise the action cannot be used at all. (needed for autocomplete)
Modified: kukit/kss.core/branch/1.2/kss/core/plugins/core/commands.py
==============================================================================
--- kukit/kss.core/branch/1.2/kss/core/plugins/core/commands.py (original)
+++ kukit/kss.core/branch/1.2/kss/core/plugins/core/commands.py Mon Feb 4 19:47:50 2008
@@ -123,10 +123,11 @@
command.addParam('varname', varname)
command.addParam('value', value)
- def triggerEvent(self, name, **kw):
+ def continueEvent(self, name, allnodes=False, **kw):
""" see interfaces.py """
- command = self.commands.addCommand('triggerEvent')
+ command = self.commands.addCommand('continueEvent')
command.addParam('name', name)
+ command.addParam('allnodes', allnodes and 'true' or 'false')
for key, value in kw.iteritems():
command.addParam(key, value)
Modified: kukit/kss.core/branch/1.2/kss/core/plugins/core/configure.zcml
==============================================================================
--- kukit/kss.core/branch/1.2/kss/core/plugins/core/configure.zcml (original)
+++ kukit/kss.core/branch/1.2/kss/core/plugins/core/configure.zcml Mon Feb 4 19:47:50 2008
@@ -279,10 +279,10 @@
/>
Author: reebalazs
Date: Mon Feb 4 19:49:40 2008
New Revision: 51264
Modified:
kukit/kss.core/branch/1.4pre/kss/core/plugins/core/commands.py
kukit/kss.core/branch/1.4pre/kss/core/plugins/core/configure.zcml
kukit/kss.core/branch/1.4pre/kss/core/plugins/core/interfaces.py
Log:
(forwardport -r51263 from 1.2): Fix core commandset, continueEvent must match up the kukit.js implementation,
dquote> or otherwise the action cannot be used at all. (needed for autocomplete)
Modified: kukit/kss.core/branch/1.4pre/kss/core/plugins/core/commands.py
==============================================================================
--- kukit/kss.core/branch/1.4pre/kss/core/plugins/core/commands.py (original)
+++ kukit/kss.core/branch/1.4pre/kss/core/plugins/core/commands.py Mon Feb 4 19:49:40 2008
@@ -117,10 +117,11 @@
command.addParam('varname', varname)
command.addParam('value', value)
- def triggerEvent(self, name, **kw):
+ def continueEvent(self, name, allnodes=False, **kw):
""" see interfaces.py """
- command = self.commands.addCommand('triggerEvent')
+ command = self.commands.addCommand('continueEvent')
command.addParam('name', name)
+ command.addParam('allnodes', allnodes and 'true' or 'false')
for key, value in kw.iteritems():
command.addParam(key, value)
Modified: kukit/kss.core/branch/1.4pre/kss/core/plugins/core/configure.zcml
==============================================================================
--- kukit/kss.core/branch/1.4pre/kss/core/plugins/core/configure.zcml (original)
+++ kukit/kss.core/branch/1.4pre/kss/core/plugins/core/configure.zcml Mon Feb 4 19:49:40 2008
@@ -282,10 +282,10 @@
/>
Author: reebalazs
Date: Mon Feb 4 19:54:44 2008
New Revision: 51265
Modified:
kukit/kss.core/trunk/kss/core/plugins/core/commands.py
kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml
kukit/kss.core/trunk/kss/core/plugins/core/interfaces.py
Log:
(forwardport -r51263 from 1.2): Fix core commandset, continueEvent must match up the kukit.js implementation,
dquote> or otherwise the action cannot be used at all. (needed for autocomplete)
Modified: kukit/kss.core/trunk/kss/core/plugins/core/commands.py
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/commands.py (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/commands.py Mon Feb 4 19:54:44 2008
@@ -117,10 +117,11 @@
command.addParam('varname', varname)
command.addParam('value', value)
- def triggerEvent(self, name, **kw):
+ def continueEvent(self, name, allnodes=False, **kw):
""" see interfaces.py """
- command = self.commands.addCommand('triggerEvent')
+ command = self.commands.addCommand('continueEvent')
command.addParam('name', name)
+ command.addParam('allnodes', allnodes and 'true' or 'false')
for key, value in kw.iteritems():
command.addParam(key, value)
Modified: kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml (original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml Mon Feb 4 19:54:44 2008
@@ -282,10 +282,10 @@
/>
Author: reebalazs
Date: Tue Feb 5 03:26:52 2008
New Revision: 51283
Modified:
kukit/kss.demo/branch/1.2/kss/demo/browser/header_macros.pt
Log:
Change rel type of the demo kss resources to kinetic-stylesheet
this gets rid of a deprecation warning.
Modified: kukit/kss.demo/branch/1.2/kss/demo/browser/header_macros.pt
==============================================================================
--- kukit/kss.demo/branch/1.2/kss/demo/browser/header_macros.pt (original)
+++ kukit/kss.demo/branch/1.2/kss/demo/browser/header_macros.pt Tue Feb 5 03:26:52 2008
@@ -13,7 +13,7 @@
-->
-
From jvloothuis at codespeak.net Thu Feb 7 21:30:55 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Thu, 7 Feb 2008 21:30:55 +0100 (CET)
Subject: [KSS-checkins] r51324 - kukit/kukit.js/trunk/kukit
Message-ID: <20080207203055.2D4EA16851F@codespeak.net>
Author: jvloothuis
Date: Thu Feb 7 21:30:52 2008
New Revision: 51324
Modified:
kukit/kukit.js/trunk/kukit/serveraction.js
Log:
Made sure that only one slash is used when concatinating the server
action and the url. Also append a slash after each url. This helps
with frameworks like Django (and does not seem to break others like
Grok or Zope).
Modified: kukit/kukit.js/trunk/kukit/serveraction.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/serveraction.js (original)
+++ kukit/kukit.js/trunk/kukit/serveraction.js Thu Feb 7 21:30:52 2008
@@ -44,10 +44,19 @@
//
if (url.match(RegExp('/^https?:\/\//'))) {
return url;
- } else {
- var result = kukit.engine.baseUrl + '/' + url;
- return result;
+ }
+
+ var result = kukit.engine.baseUrl;
+ if (!result.match(RegExp('\/$'))) {
+ result += '/';
}
+ result += url;
+ // Append slash to the end of the url, this helps with certain
+ // webframeworks like Django
+ if (!result.match(RegExp('\/$'))) {
+ result += '/';
+ }
+ return result;
};
this.url = this.calculateAbsoluteURL(this.url);
this.notifyServer();
From jvloothuis at codespeak.net Mon Feb 11 23:12:56 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Mon, 11 Feb 2008 23:12:56 +0100 (CET)
Subject: [KSS-checkins] r51399 - in kukit/kss.base/trunk: . kss/base
Message-ID: <20080211221256.3A0681683F7@codespeak.net>
Author: jvloothuis
Date: Mon Feb 11 23:12:54 2008
New Revision: 51399
Added:
kukit/kss.base/trunk/kss/base/utils.txt
Modified:
kukit/kss.base/trunk/kss/base/tests.py
kukit/kss.base/trunk/kss/base/utils.py
kukit/kss.base/trunk/setup.py
Log:
Improved the command lined utility by making it dump all the required
Javascript. Also made some of the unused options work. The script now
has tests as well.
Modified: kukit/kss.base/trunk/kss/base/tests.py
==============================================================================
--- kukit/kss.base/trunk/kss/base/tests.py (original)
+++ kukit/kss.base/trunk/kss/base/tests.py Mon Feb 11 23:12:54 2008
@@ -7,7 +7,7 @@
'README.txt', 'selectors.txt',
'registry.txt', 'plugin.txt',
'commands.txt', 'corecommands.txt',
- 'javascript.txt',
+ 'javascript.txt', 'utils.txt',
package='kss.base',
optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
),
Modified: kukit/kss.base/trunk/kss/base/utils.py
==============================================================================
--- kukit/kss.base/trunk/kss/base/utils.py (original)
+++ kukit/kss.base/trunk/kss/base/utils.py Mon Feb 11 23:12:54 2008
@@ -1,160 +1,59 @@
+import os
+import sys
import optparse
-import ConfigParser
-from paste.script.templates import Template
-
-from kss.base.javascript import packed
+from kss.base import javascript
from kss.base.plugin import load_plugins, activated_plugins
+def ksspackage():
+ parser = optparse.OptionParser()
+ parser.add_option('--list',
+ action='store_true',
+ dest='list_plugins',
+ help="lists available plugins")
+ parser.add_option('--compression',
+ action='store',
+ dest='compression',
+ default='safe',
+ help="specifies the compression level (devel / stripped / safe / full / safe-devel / full-devel)")
+ parser.add_option('--plugin',
+ action='append',
+ dest='plugins',
+ default=[],
+ help="specifies one additional plugin to load; if you want to specify multiple plugins you can do it by calling --plugin multiple times")
+
+
+ options, args = parser.parse_args()
+
+ def make_package():
+ output_dir = args[0]
+ if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+
+ load_plugins(*options.plugins)
+
+ print "Creating `kss.js` script:",
+ f = open(os.path.join(output_dir, 'kss.js'), 'w')
+ f.write(javascript.packed(options.compression))
+ f.close()
+ print "DONE"
+
+ for name, script in javascript.extra_scripts().items():
+ print "Creating `%s` script:" % name,
+ f = open(os.path.join(output_dir, name), 'w')
+ f.write(script)
+ f.close()
+ print "DONE"
+
+ if args:
+ make_package()
+
+ elif options.list_plugins:
+ print "Available plugins:"
+ for id, factory in activated_plugins():
+ print " %s" % id
+
+ else:
+ print 'Usage: %s OUTPUTDIR [OPTIONS]' % sys.argv[0]
+ print 'Try `%s --help` for more information.' % sys.argv[0]
-class KSSConcatJs(object):
- '''Prints out or saves a packed javascript of loaded plugins'''
-
- configSection = "KSSConcatJs"
-
- def __init__(self):
- self.getOptions()
- if self.options.configFile:
- self.getConfig(self.options.configFile)
- self.handleCreation()
-
-
- def getOptions(self):
- '''Gets the arguments passed to the script (override config)'''
- parser = optparse.OptionParser()
-
- parser.add_option('-m', '--message',
- action='store',
- dest='message',
- help="message (comment) that will be added to the generated javascript")
- parser.add_option('--list',
- action='store_true',
- dest='listPlugins',
- help="lists activated plugins")
- parser.add_option('--compression-level',
- action='store',
- dest='compressionLevel',
- help="specifies the compression level (devel / stripped / safe / full / safe-devel / full-devel)")
- parser.add_option('--plugin',
- action='append',
- dest='pluginsToHandle',
- help="specifies one additional plugin to load; if you want to specify multiple plugins you can do it by calling --plugin multiple times")
- parser.add_option('--no-display',
- action='store_true',
- dest='noDisplayJavascript',
- help="avoids the display of resulting javascript in console")
- parser.add_option('--output-file',
- action='store',
- dest='outputFile',
- help="outputs the resulting javascript to the specified file")
- parser.add_option('--include-extras',
- action='store',
- dest='includeExtras',
- help="specifies if 3rd party javascripts have to be packed too")
- parser.add_option('-v', '--verbose',
- action='store_true',
- dest='verboseMode',
- help="verbose mode")
- parser.add_option('-F',
- action='store',
- dest='configFile',
- help="loads options from the specified config file")
-
- options, args = parser.parse_args()
- self.options = options
-
-
- def getConfig(self, fileName):
- '''Gets the values in config file only if not overrided by argument'''
- config = ConfigParser.ConfigParser()
- config.read(fileName)
- listParameters = ['pluginsToHandle']
- strParameters = ['compressionLevel', \
- 'outputFile']
- boolParameters = ['listPlugins', \
- 'noDisplayJavascript', \
- 'includeExtras', \
- 'verboseMode']
- for param in strParameters:
- if not hasattr(self.options, param):
- try:
- setattr(self.options, \
- param, \
- config.get(self.configSection, param))
- except ConfigParser.NoOptionError:
- pass
- for param in boolParameters:
- if not hasattr(self.options, param):
- try:
- setattr(self.options, \
- param, \
- config.getboolean(self.configSection, param))
- except ConfigParser.NoOptionError:
- pass
- for param in listParameters:
- #this is a list so the condition doesn't work with hasattr
- if not bool(self.options.pluginsToHandle):
- try:
- paramList = config.get(self.configSection, param).split(' ')
- setattr(self.options, \
- param, \
- paramList)
- except ConfigParser.NoOptionError:
- pass
-
-
- def makeJS(self, compressionLevel=None, includeExtras=False):
- '''Returns a compacted javascript generated from loaded javascripts'''
- return packed(compressionLevel, include_extras=False)
-
-
- def setComment(self, javascript, message):
- '''Add a comment to the generated javascript'''
- return "/* %s */\n\n%s" % (message, javascript)
-
- def writeToFile(self, fileName, fileContent):
- '''Writes the packed javascript to file'''
- file = open(fileName, 'w')
- file.write(fileContent)
- file.close()
-
-
- def listPlugins(self):
- '''Displays activated plugins'''
- if self.options.verboseMode:
- print "Activated plugins :"
- for id, plugin in activated_plugins():
- print " * %s" % id
- else:
- for id, plugin in activated_plugins():
- print id
-
-
- def handleCreation(self):
- '''Handles the JS creation regarding options and/or config'''
- corePlugin = ('kss-core', )
- if self.options.pluginsToHandle:
- plugins = tuple(self.options.pluginsToHandle) + corePlugin
- else:
- plugins = corePlugin
- self.loadedPlugins = load_plugins(*plugins)
-
- if self.options.listPlugins:
- self.listPlugins()
-
- javascript = self.makeJS(self.options.compressionLevel, \
- self.options.includeExtras)
-
- if self.options.message:
- javascript = self.setComment(javascript, self.options.message)
-
- if self.options.outputFile:
- self.writeToFile(self.options.outputFile, javascript)
- elif not self.options.noDisplayJavascript:
- print javascript
-
-
-class KSSPluginTemplate(Template):
- _template_dir = 'templates/plugin'
- summary = 'KSS plugin template'
- egg_plugins = ['kss.base']
Added: kukit/kss.base/trunk/kss/base/utils.txt
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/kss/base/utils.txt Mon Feb 11 23:12:54 2008
@@ -0,0 +1,75 @@
+=========
+Utilities
+=========
+
+KSS ships with various utilties. When you install `kss.base` these get
+installed as executables.
+
+
+Create a standalone package
+===========================
+
+Since the whole KSS framework is pluggable the amount of Javascript
+that ends up being used depends a lot on the plugins. To make it easy
+to create static files from a know plugin configuration we have the
+`ksspackage`. This creates a directory with all the Javascripts needed
+to run the set of plugins.
+
+ >>> from pkg_resources import load_entry_point
+ >>> ksspackage = load_entry_point(
+ ... 'kss.base', 'console_scripts', 'ksspackage')
+
+We will first setup a temp directory to contain our stuff.
+
+ >>> import os
+ >>> from tempfile import mktemp
+ >>> temp = mktemp()
+ >>> static_dump = os.path.join(temp, 'static-dump')
+
+Executing the script without any arguments will raise an error.
+
+ >>> import sys
+ >>> old_argv = sys.argv
+ >>> sys.argv = ['ksspackage']
+
+ >>> ksspackage()
+ Usage: ksspackage OUTPUTDIR [OPTIONS]
+ Try `ksspackage --help` for more information.
+
+It needs at least one argument, the path for the output.
+
+ >>> sys.argv = ['ksspackage', static_dump]
+ >>> ksspackage()
+ Creating `kss.js` script: DONE
+
+If we look into the export we will see only the `kss.js` file.
+
+ >>> os.listdir(static_dump)
+ ['kss.js']
+
+In this case it is empty since we did not give it any plugins to
+extract the Javascript from.
+
+ >>> open(os.path.join(static_dump, 'kss.js')).read()
+ ''
+
+Now if we give it a plugin it will put the files into the dir.
+
+ >>> sys.argv = ['ksspackage', static_dump, '--plugin=kss-core']
+ >>> ksspackage()
+ Creating `kss.js` script: DONE
+ Creating `base2-dom-fp.js` script: DONE
+ Creating `sarissa.js` script: DONE
+
+ >>> list(sorted(os.listdir(static_dump)))
+ ['base2-dom-fp.js', 'kss.js', 'sarissa.js']
+
+ >>> sys.argv = old_argv
+
+Besides creating the scripts the utility can also list the available
+plugins.
+
+ >>> sys.argv = ['ksspackage', '--list']
+ >>> ksspackage()
+ Available plugins:
+ kss-core
Modified: kukit/kss.base/trunk/setup.py
==============================================================================
--- kukit/kss.base/trunk/setup.py (original)
+++ kukit/kss.base/trunk/setup.py Mon Feb 11 23:12:54 2008
@@ -47,7 +47,7 @@
'kss-core=kss.base.config:KSSCore'
],
'console_scripts': [
- 'kssconcatjs=kss.base.utils:KSSConcatJs'
+ 'ksspackage=kss.base.utils:ksspackage'
],
},
From jvloothuis at codespeak.net Tue Feb 12 19:58:37 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 12 Feb 2008 19:58:37 +0100 (CET)
Subject: [KSS-checkins] r51418 - in kukit/kss.base/trunk: . src src/kss
Message-ID: <20080212185837.369791683EE@codespeak.net>
Author: jvloothuis
Date: Tue Feb 12 19:58:35 2008
New Revision: 51418
Added:
kukit/kss.base/trunk/bootstrap.py
kukit/kss.base/trunk/buildout.cfg
kukit/kss.base/trunk/src/
kukit/kss.base/trunk/src/kss/
- copied from r51211, kukit/kss.base/trunk/kss/
Modified:
kukit/kss.base/trunk/setup.py
Log:
Moved the buildout config into the project structure. This makes it
easier for new developers to checkout the project and start hacking.
Added: kukit/kss.base/trunk/bootstrap.py
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/bootstrap.py Tue Feb 12 19:58:35 2008
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Added: kukit/kss.base/trunk/buildout.cfg
==============================================================================
--- (empty file)
+++ kukit/kss.base/trunk/buildout.cfg Tue Feb 12 19:58:35 2008
@@ -0,0 +1,20 @@
+[buildout]
+parts = test-runner scripts python
+develop = .
+eggs =
+
+[test-runner]
+recipe = zc.recipe.testrunner
+eggs = kss.base
+script = test
+
+[scripts]
+recipe = zc.recipe.egg
+eggs = kss.base
+
+parts = mypython
+
+[python]
+recipe = zc.recipe.egg
+interpreter = python
+eggs = kss.base
\ No newline at end of file
Modified: kukit/kss.base/trunk/setup.py
==============================================================================
--- kukit/kss.base/trunk/setup.py (original)
+++ kukit/kss.base/trunk/setup.py Tue Feb 12 19:58:35 2008
@@ -33,8 +33,8 @@
author_email='kss-devel at codespeak.net',
url='http://kssproject.org',
license='GPL',
- packages=find_packages(exclude=['ez_setup']),
- namespace_packages=['kss'],
+ package_dir={'': 'src'},
+ packages=find_packages('src'),
include_package_data=True,
zip_safe=False,
From jvloothuis at codespeak.net Tue Feb 12 20:07:50 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 12 Feb 2008 20:07:50 +0100 (CET)
Subject: [KSS-checkins] r51419 - kukit/kss.base/trunk/kss
Message-ID: <20080212190750.7A0981683EE@codespeak.net>
Author: jvloothuis
Date: Tue Feb 12 20:07:50 2008
New Revision: 51419
Removed:
kukit/kss.base/trunk/kss/
Log:
Removed old kss dir (was moved but svn refused to delete it before)
From jvloothuis at codespeak.net Tue Feb 12 20:16:00 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 12 Feb 2008 20:16:00 +0100 (CET)
Subject: [KSS-checkins] r51420 - in kukit/kss.base/trunk: docs src/kss/base
Message-ID: <20080212191600.121811683DF@codespeak.net>
Author: jvloothuis
Date: Tue Feb 12 20:16:00 2008
New Revision: 51420
Added:
kukit/kss.base/trunk/docs/README.txt
- copied, changed from r51419, kukit/kss.base/trunk/src/kss/base/README.txt
Removed:
kukit/kss.base/trunk/src/kss/base/README.txt
Log:
Moved the readme to the docs folder where it belongs (it was a pure
doc since there where no tests in it).
Copied: kukit/kss.base/trunk/docs/README.txt (from r51419, kukit/kss.base/trunk/src/kss/base/README.txt)
==============================================================================
--- kukit/kss.base/trunk/src/kss/base/README.txt (original)
+++ kukit/kss.base/trunk/docs/README.txt Tue Feb 12 20:16:00 2008
@@ -10,4 +10,6 @@
This Python package contains the Javascript engine and the server side
infrastructure. The package forms the base for ingegration with
specific web development frameworks. To see if there is support for
-your framework go to the KSS website.
\ No newline at end of file
+your framework go to the `KSS website`_.
+
+.. _`KSS website`: http://kssproject.org
\ No newline at end of file
Deleted: /kukit/kss.base/trunk/src/kss/base/README.txt
==============================================================================
--- /kukit/kss.base/trunk/src/kss/base/README.txt Tue Feb 12 20:16:00 2008
+++ (empty file)
@@ -1,13 +0,0 @@
-==============
-The KSS system
-==============
-
-KSS enables you write rich Ajax applications without having to code
-Javascript. It does this by using a CSS like resource, this is called
-a KSS file. All that you as a developer need to do is write files like
-these and implement server side Python.
-
-This Python package contains the Javascript engine and the server side
-infrastructure. The package forms the base for ingegration with
-specific web development frameworks. To see if there is support for
-your framework go to the KSS website.
\ No newline at end of file
From jvloothuis at codespeak.net Tue Feb 12 20:17:03 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 12 Feb 2008 20:17:03 +0100 (CET)
Subject: [KSS-checkins] r51421 - kukit/buildout/kss.base
Message-ID: <20080212191703.6F9071683EC@codespeak.net>
Author: jvloothuis
Date: Tue Feb 12 20:17:03 2008
New Revision: 51421
Removed:
kukit/buildout/kss.base/
Log:
No longer needed since it is now part of the kss.base package itself
From jvloothuis at codespeak.net Tue Feb 12 20:54:25 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 12 Feb 2008 20:54:25 +0100 (CET)
Subject: [KSS-checkins] r51422 - kukit/kss.base/trunk
Message-ID: <20080212195425.B3F4B1683EC@codespeak.net>
Author: jvloothuis
Date: Tue Feb 12 20:54:23 2008
New Revision: 51422
Modified:
kukit/kss.base/trunk/setup.py
Log:
Bumped the version for release
Modified: kukit/kss.base/trunk/setup.py
==============================================================================
--- kukit/kss.base/trunk/setup.py (original)
+++ kukit/kss.base/trunk/setup.py Tue Feb 12 20:54:23 2008
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = '0.2'
+version = '0.3'
long_description = """
KSS enables you write rich Ajax applications without having to code
From jvloothuis at codespeak.net Tue Feb 12 20:55:10 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Tue, 12 Feb 2008 20:55:10 +0100 (CET)
Subject: [KSS-checkins] r51423 - kukit/kss.base/tags/0.3
Message-ID: <20080212195510.02CA71683EC@codespeak.net>
Author: jvloothuis
Date: Tue Feb 12 20:55:10 2008
New Revision: 51423
Added:
kukit/kss.base/tags/0.3/
- copied from r51422, kukit/kss.base/trunk/
Log:
Tagged the release
From jvloothuis at codespeak.net Wed Feb 13 21:52:19 2008
From: jvloothuis at codespeak.net (jvloothuis at codespeak.net)
Date: Wed, 13 Feb 2008 21:52:19 +0100 (CET)
Subject: [KSS-checkins] r51463 - kukit/kukit.js/trunk/kukit
Message-ID: <20080213205219.55A6716840A@codespeak.net>
Author: jvloothuis
Date: Wed Feb 13 21:52:18 2008
New Revision: 51463
Modified:
kukit/kukit.js/trunk/kukit/serveraction.js
Log:
Url's starting with a / (like /update_something) are now also
considered to be absolute url's.
Absolute url's also get the `/` appended to them if the don't have
that already. So there is no difference any more between relative and
absolute url's in that regard.
Modified: kukit/kukit.js/trunk/kukit/serveraction.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/serveraction.js (original)
+++ kukit/kukit.js/trunk/kukit/serveraction.js Wed Feb 13 21:52:18 2008
@@ -31,6 +31,12 @@
}
this.calculateAbsoluteURL = function(url) {
+ // Append slash to the end of the url, this helps with certain
+ // webframeworks like Django
+ if (!url.match(RegExp('\/$'))) {
+ url += '/';
+ }
+
//
// If the url is an absolute path, it is used
//
@@ -42,7 +48,7 @@
//
// result='http://your.site.com/portal/folder/object/@@theview/getName'
//
- if (url.match(RegExp('/^https?:\/\//'))) {
+ if (url.match(RegExp('/^https?:\/\//')) || url.match(RegExp('^\/'))) {
return url;
}
@@ -50,13 +56,8 @@
if (!result.match(RegExp('\/$'))) {
result += '/';
}
- result += url;
- // Append slash to the end of the url, this helps with certain
- // webframeworks like Django
- if (!result.match(RegExp('\/$'))) {
- result += '/';
- }
- return result;
+
+ return result + url;
};
this.url = this.calculateAbsoluteURL(this.url);
this.notifyServer();
From kukit-checkins at codespeak.net Sat Feb 16 12:37:11 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Sat, 16 Feb 2008 12:37:11 +0100 (CET)
Subject: [KSS-checkins] February 74% OFF
Message-ID: <20040102084235.12665.qmail@xdsl-84-ppp135.tts.nov.ru>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080216/21281735/attachment.htm
From kukit-checkins at codespeak.net Mon Feb 18 06:12:50 2008
From: kukit-checkins at codespeak.net (Casanova's secret Official Site.)
Date: Mon, 18 Feb 2008 06:12:50 +0100 (CET)
Subject: [KSS-checkins] Spring - best time for LOVE ! 7359786873162
Message-ID: <20080218110737.4216.qmail@cli-nw.130.165.helios-nw.ru>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080218/fc767165/attachment.htm
From kukit-checkins at codespeak.net Tue Feb 19 11:14:10 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Tue, 19 Feb 2008 11:14:10 +0100 (CET)
Subject: [KSS-checkins] February 76% OFF
Message-ID: <20080219061350.34833.qmail@host91-146-59-197.etth.mark-itt.net>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080219/de6983f6/attachment.htm
From kukit-checkins at codespeak.net Thu Feb 21 18:53:10 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Thu, 21 Feb 2008 18:53:10 +0100 (CET)
Subject: [KSS-checkins] February 70% OFF
Message-ID: <20080221115229.3875.qmail@balzak.customer.top.net.ua>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080221/75df2e83/attachment.htm
From kukit-checkins at codespeak.net Thu Feb 21 23:43:03 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Thu, 21 Feb 2008 23:43:03 +0100 (CET)
Subject: [KSS-checkins] February 79% OFF
Message-ID: <20040222083236.8398.qmail@ds81-30-197-151.ufanet.ru>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080221/658f2b16/attachment-0001.htm
From kukit-checkins at codespeak.net Fri Feb 22 00:02:48 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Fri, 22 Feb 2008 00:02:48 +0100 (CET)
Subject: [KSS-checkins] February 78% OFF
Message-ID: <20080222050204.8796.qmail@ip89-124.adsl.wplus.ru>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080222/d22adf46/attachment.htm
From kukit-checkins at codespeak.net Fri Feb 22 00:04:05 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Fri, 22 Feb 2008 00:04:05 +0100 (CET)
Subject: [KSS-checkins] February 73% OFF
Message-ID: <20080222030333.25433.qmail@home-322141.b.astral.ro>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080222/3b8bf1c4/attachment.htm
From kukit-checkins at codespeak.net Wed Feb 27 00:58:08 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Wed, 27 Feb 2008 00:58:08 +0100 (CET)
Subject: [KSS-checkins] February 78% OFF
Message-ID: <20080227135735.12612.qmail@adsl-dyn166.78-98-101.t-com.sk>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080227/3c380997/attachment.htm
From kukit-checkins at codespeak.net Wed Feb 27 23:55:26 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Wed, 27 Feb 2008 23:55:26 +0100 (CET)
Subject: [KSS-checkins] February 74% OFF
Message-ID: <20080227125454.35303.qmail@catv-5985e861.catv.broadband.hu>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080227/3c8ee155/attachment-0001.htm
From kukit-checkins at codespeak.net Thu Feb 28 04:42:51 2008
From: kukit-checkins at codespeak.net (kukit-checkins at codespeak.net)
Date: Thu, 28 Feb 2008 05:42:51 +0200
Subject: [KSS-checkins] Sale 79% OFF
Message-ID: <20080228074251.3075.qmail@dsl85-106-43896.ttnet.net.tr>
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kukit-checkins/attachments/20080228/4efd6302/attachment.htm
From gotcha at codespeak.net Fri Feb 29 10:19:24 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 10:19:24 +0100 (CET)
Subject: [KSS-checkins] r51930 - kukit/kukit.js/trunk/kukit
Message-ID: <20080229091924.1D7D1168508@codespeak.net>
Author: gotcha
Date: Fri Feb 29 10:19:23 2008
New Revision: 51930
Modified:
kukit/kukit.js/trunk/kukit/plugin.js
Log:
* keep track of a change proposed by Martin Heidegger
* fix for error message
Modified: kukit/kukit.js/trunk/kukit/plugin.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/plugin.js (original)
+++ kukit/kukit.js/trunk/kukit/plugin.js Fri Feb 29 10:19:23 2008
@@ -86,6 +86,9 @@
eventName = oper.getEventName();
var func = function(e) {
var target = pl.getTargetForBrowserEvent(e);
+ // change suggested by Martin Heidegger
+ // TODO GC is asking Martin to explain his reasoning
+ //var target = this;
if (oper.parms.allowbubbling || target == oper.node) {
// Execute the action, provide browserevent on oper
// ... however, do it protected. We want the preventdefault
@@ -1088,7 +1091,7 @@
old = oper.parms.className;
has_old = true;
;;; var msg = 'Deprecated the [className] parameter in ' + oper.componentName;
-;;; msg += ', use [value] instead !';
+;;; msg += ', use [name] instead !';
;;; kukit.logWarning(msg);
}
if (typeof(oper.parms.name) != 'undefined') {
From gotcha at codespeak.net Fri Feb 29 10:21:21 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 10:21:21 +0100 (CET)
Subject: [KSS-checkins] r51931 - kukit/kukit.js/branch/separate-opers
Message-ID: <20080229092121.410F6168508@codespeak.net>
Author: gotcha
Date: Fri Feb 29 10:21:20 2008
New Revision: 51931
Added:
kukit/kukit.js/branch/separate-opers/
- copied from r51930, kukit/kukit.js/trunk/
Log:
branch to separate Bind and Action opers
From gotcha at codespeak.net Fri Feb 29 10:23:35 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 10:23:35 +0100 (CET)
Subject: [KSS-checkins] r51932 - kukit/kss.core/branch/separate-opers
Message-ID: <20080229092335.A595E16850A@codespeak.net>
Author: gotcha
Date: Fri Feb 29 10:23:35 2008
New Revision: 51932
Added:
kukit/kss.core/branch/separate-opers/
- copied from r51931, kukit/kss.core/trunk/
Log:
branch to separate Bind and Action opers
From gotcha at codespeak.net Fri Feb 29 10:26:34 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 10:26:34 +0100 (CET)
Subject: [KSS-checkins] r51933 -
kukit/kss.core/branch/separate-opers/kss/core
Message-ID: <20080229092634.95F1F168508@codespeak.net>
Author: gotcha
Date: Fri Feb 29 10:26:33 2008
New Revision: 51933
Modified:
kukit/kss.core/branch/separate-opers/kss/core/ (props changed)
kukit/kss.core/branch/separate-opers/kss/core/EXTERNALS.TXT
Log:
setup branch
Modified: kukit/kss.core/branch/separate-opers/kss/core/EXTERNALS.TXT
==============================================================================
--- kukit/kss.core/branch/separate-opers/kss/core/EXTERNALS.TXT (original)
+++ kukit/kss.core/branch/separate-opers/kss/core/EXTERNALS.TXT Fri Feb 29 10:26:33 2008
@@ -5,4 +5,4 @@
# You can update your working dir by:
# svn propset svn:externals -F EXTERNALS.TXT .
#
-kukit http://codespeak.net/svn/kukit/kukit.js/trunk/
+kukit http://codespeak.net/svn/kukit/kukit.js/branch/separate-opers
From gotcha at codespeak.net Fri Feb 29 10:31:32 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 10:31:32 +0100 (CET)
Subject: [KSS-checkins] r51934 - kukit/kukit.js/branch/separate-opers/kukit
Message-ID: <20080229093132.1C089168505@codespeak.net>
Author: gotcha
Date: Fri Feb 29 10:31:31 2008
New Revision: 51934
Modified:
kukit/kukit.js/branch/separate-opers/kukit/commandprocessor.js
kukit/kukit.js/branch/separate-opers/kukit/commandreg.js
kukit/kukit.js/branch/separate-opers/kukit/oper.js
kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js
Log:
* BindOper class
* work in progress
Modified: kukit/kukit.js/branch/separate-opers/kukit/commandprocessor.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/commandprocessor.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/commandprocessor.js Fri Feb 29 10:31:31 2008
@@ -111,11 +111,6 @@
};
this.executeCommands = function(oper) {
- // node, eventRule, binder are given on oper, in case
- // the command was called up from an event
- if (typeof(oper) == 'undefined' || oper == null) {
- oper = new kukit.op.Oper();
- }
var commands = this.commands;
for (var y=0;y < commands.length;y++) {
var command = commands[y];
Modified: kukit/kukit.js/branch/separate-opers/kukit/commandreg.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/commandreg.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/commandreg.js Fri Feb 29 10:31:31 2008
@@ -1,4 +1,4 @@
-/*
+*
* Copyright (c) 2005-2007
* Authors: KSS Project Contributors (see doc/CREDITS.txt)
*
@@ -109,11 +109,10 @@
};
var _executeCommand = function(oper) {
- var newoper = oper.clone({
- 'parms': this.parms,
- 'orignode': oper.node,
- 'node': null
- });
+ var newoper = oper.clone();
+ newoper.setParms(this.parms);
+ newoper.setOrigNode(oper.node);
+ newoper.setNode(null);
this.executeOnScope(newoper);
};
Modified: kukit/kukit.js/branch/separate-opers/kukit/oper.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/oper.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/oper.js Fri Feb 29 10:31:31 2008
@@ -62,16 +62,48 @@
this.clone = function(dict, restricted) {
var newoper = new kukit.op.Oper(this);
- newoper.unrestrictedUpdate(dict, restricted);
+ newoper._unrestrictedUpdate(dict, restricted);
return newoper;
};
this.update = function(dict) {
// restricted attrs must not be changed on existing oper.
- this.unrestrictedUpdate(dict, true);
+ this._unrestrictedUpdate(dict, true);
};
- this.unrestrictedUpdate = function(dict, restricted) {
+ this.setNode = function(node) {
+ this.node = node;
+ };
+
+ this.setParms = function(parms) {
+ this.parms = parms;
+ };
+
+ this.setKssParms = function(kssParms) {
+ this.kssParms = kssParms;
+ };
+
+ this.setEventRule = function(eventRule) {
+ this.eventRule = eventRule;
+ };
+
+ this.setBinder = function(binder) {
+ this.binder = binder;
+ };
+
+ this.setOrigNode = function(orignode) {
+ this.orignode = orignode;
+ };
+
+ this.setAction = function(action) {
+ this.action = action;
+ };
+
+ this.setBrowserEvent = function(browserevent) {
+ this.browserevent = browserevent;
+ };
+
+ this._unrestrictedUpdate = function(dict, restricted) {
if (typeof(dict) == 'undefined') {
return;
}
@@ -98,45 +130,7 @@
}
};
// update from the dict
- this.unrestrictedUpdate(dict);
-};
-
-this.clone = function(dict, restricted) {
- var newoper = new kukit.op.Oper(this);
- newoper.unrestrictedUpdate(dict, restricted);
- return newoper;
-};
-
-this.update = function(dict) {
- // restricted attrs must not be changed on existing oper.
- this.unrestrictedUpdate(dict, true);
-};
-
-this.unrestrictedUpdate = function(dict, restricted) {
- if (typeof(dict) == 'undefined') {
- return;
- }
- for (var key in dict) {
-;;; if (typeof(checkKey) == 'undefined') {
-;;; var checkKey = function(key) {
-;;; var isNode = key == 'node';
-;;; var isParameters = key == 'parms';
-;;; var isEventRule = key == 'eventRule';
-;;; var isBinder = key == 'binder';
-;;; var isOrig = key == 'orignode';
-;;; return isNode || isParameters || isEventRule || isBinder || isOrig;
-;;; };
-;;; }
-;;; if (restricted && checkKey(key)) {
-;;; kukit.E = 'Illegal update on oper object, protected attribute [';
-;;; kukit.E += key + '].';
-;;; throw new Error(kukit.E);
-;;; }
- var value = dict[key];
- if (typeof(value) != 'function') {
- this[key] = value;
- }
- }
+ this._unrestrictedUpdate(dict);
};
this.logDebug = function() {
@@ -422,4 +416,12 @@
this.initialize.apply(this, arguments);
};
+/*
+* class BindOper
+*
+*/
+op.BindOper = function(){
+};
+op.BindOper.prototype = new op.Oper();
+
}(); /// MODULE END
Modified: kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js Fri Feb 29 10:31:31 2008
@@ -362,7 +362,7 @@
this.bind = function(node) {
this.store(node);
// Creation of the binding oper
- var oper = new kukit.op.Oper();
+ var oper = new kukit.op.BindOper();
var binderInfo = this.getBinderInfo(node);
oper.node = node;
oper.eventRule = this;
@@ -512,13 +512,14 @@
// this is conditional: if there is no default method, it's skipped.
var name = oper.eventRule.kssSelector.name;
// Execution with no parms. (XXX ?)
- oper = oper.clone({'parms': {}});
+ oper = oper.clone();
+ oper.setParms({});
oper.executeDefaultAction(name, true);
}
};
this.getOrCreateAction = function(name, valuesByReturnType) {
- // kss parameters will ve set from valuesByReturnType
+ // kss parameters will be set from valuesByReturnType
//
// In case we alias, use the alias for name, this will become
// the action name used for execution. The alias name will
@@ -755,11 +756,10 @@
parms[key] = value;
}
}
- var anOper = oper.clone({
- 'parms': parms,
- 'kssParms': kssParms,
- 'action': this
- });
+ var anOper = oper.clone();
+ oper.setParms(parms);
+ oper.setKssParms(kssParms);
+ oper.setAction(this);
return anOper;
};
From gotcha at codespeak.net Fri Feb 29 11:17:03 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 11:17:03 +0100 (CET)
Subject: [KSS-checkins] r51936 - kukit/kukit.js/branch/separate-opers/kukit
Message-ID: <20080229101703.C170716850C@codespeak.net>
Author: gotcha
Date: Fri Feb 29 11:17:01 2008
New Revision: 51936
Modified:
kukit/kukit.js/branch/separate-opers/kukit/oper.js
Log:
checkin to help diffing
Modified: kukit/kukit.js/branch/separate-opers/kukit/oper.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/oper.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/oper.js Fri Feb 29 11:17:01 2008
@@ -54,6 +54,7 @@
this.initialize = function(dict) {
this.node = null;
this.parms = {};
+ this.kssParms = {};
this.eventRule = null;
this.binder = null;
this.orignode = null;
From gotcha at codespeak.net Fri Feb 29 11:33:50 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 11:33:50 +0100 (CET)
Subject: [KSS-checkins] r51940 - kukit/kukit.js/branch/separate-opers/kukit
Message-ID: <20080229103350.0F800168511@codespeak.net>
Author: gotcha
Date: Fri Feb 29 11:33:49 2008
New Revision: 51940
Modified:
kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js
Log:
fix changes
Modified: kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/resourcedata.js Fri Feb 29 11:33:49 2008
@@ -757,9 +757,9 @@
}
}
var anOper = oper.clone();
- oper.setParms(parms);
- oper.setKssParms(kssParms);
- oper.setAction(this);
+ anOper.setParms(parms);
+ anOper.setKssParms(kssParms);
+ anOper.setAction(this);
return anOper;
};
From gotcha at codespeak.net Fri Feb 29 11:50:28 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 11:50:28 +0100 (CET)
Subject: [KSS-checkins] r51944 - kukit/kukit.js/branch/separate-opers/kukit
Message-ID: <20080229105028.A585D16850B@codespeak.net>
Author: gotcha
Date: Fri Feb 29 11:50:27 2008
New Revision: 51944
Modified:
kukit/kukit.js/branch/separate-opers/kukit/commandreg.js
Log:
fix typo
Modified: kukit/kukit.js/branch/separate-opers/kukit/commandreg.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/commandreg.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/commandreg.js Fri Feb 29 11:50:27 2008
@@ -1,4 +1,4 @@
-*
+/*
* Copyright (c) 2005-2007
* Authors: KSS Project Contributors (see doc/CREDITS.txt)
*
From gotcha at codespeak.net Fri Feb 29 11:50:58 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Fri, 29 Feb 2008 11:50:58 +0100 (CET)
Subject: [KSS-checkins] r51945 - kukit/kukit.js/branch/separate-opers/kukit
Message-ID: <20080229105058.E710016850B@codespeak.net>
Author: gotcha
Date: Fri Feb 29 11:50:58 2008
New Revision: 51945
Modified:
kukit/kukit.js/branch/separate-opers/kukit/eventreg.js
Log:
remove unused var
Modified: kukit/kukit.js/branch/separate-opers/kukit/eventreg.js
==============================================================================
--- kukit/kukit.js/branch/separate-opers/kukit/eventreg.js (original)
+++ kukit/kukit.js/branch/separate-opers/kukit/eventreg.js Fri Feb 29 11:50:58 2008
@@ -430,7 +430,6 @@
var executed = 0;
// Normal rules. If any of those match, execute them too
// each on the node that it selects - not on the original node.
- var oper = new kukit.op.Oper();
var info = kukit.engine.binderInfoRegistry.getBinderInfoById(
this.__binderId__);
var opers = info.bound.getBoundOpers(name);