Author: reebalazs
Date: Fri Dec  7 17:16:07 2007
New Revision: 49522

Added:
   kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
   kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
Modified:
   kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/configure.zcml
   kukit/kss.core/trunk/kss/core/plugins/core/demo/configure.zcml
Log:
Allow the core plugin demos to be used both from kss.core and kss.zope 
transition

Added: kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py
==============================================================================
--- (empty file)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/config.py Fri Dec 
 7 17:16:07 2007
@@ -0,0 +1,22 @@
+
+from kss.base.plugin import Plugin
+from kss.demo.resource import (
+    KSSDemo,
+    KSSSeleniumTestDirectory,
+    )
+
+class CoreDemos(Plugin):
+
+    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'),
+        )

Modified: 
kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/configure.zcml
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/configure.zcml    
(original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/binderids/configure.zcml    
Fri Dec  7 17:16:07 2007
@@ -1,6 +1,7 @@
 <configure xmlns="http://namespaces.zope.org/zope";
            xmlns:browser="http://namespaces.zope.org/browser";
            xmlns:kss="http://namespaces.zope.org/kss";
+           xmlns:zcml="http://namespaces.zope.org/zcml";
                   i18n_domain="kss"
                   >
 
@@ -9,12 +10,14 @@
   -->
 
   <!-- Set up the demo utility, needed for registration -->
+  <configure zcml:condition="have kss_demo_version_1_2">
   <utility
-    name="core_demo_for_binderids"
-    factory=".zopeconfig.KSSDemos"
-    provides="kss.demo.interfaces.IKSSDemoResource"
-    permission="zope.Public"
-    />
+        name="core_demo_for_binderids"
+        factory=".zopeconfig.KSSDemos"
+        provides="kss.demo.interfaces.IKSSDemoResource"
+        permission="zope.Public"
+        />
+  </configure>
 
   <!-- Set up resources needed for the demo -->
   <browser:page

Added: kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py
==============================================================================
--- (empty file)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/config.py   Fri Dec  7 
17:16:07 2007
@@ -0,0 +1,39 @@
+
+from kss.base.plugin import Plugin
+from kss.demo.resource import (
+    KSSDemo,
+    KSSSeleniumTestDirectory,
+    )
+
+class CoreDemos(Plugin):
+
+    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('', 'Parameter functions', 'pf_forms.html', 'Forms'),
+        KSSDemo('', 'Selectors', 'selectors.html', 'Parent node selector'),
+        KSSDemo('', 'Core syntax', "kss_selector_param.html", "Kss selector 
parameters"),
+        KSSDemo('', 'Core syntax', "kss_url_param.html", "Kss url parameters"),
+        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'),
+        )

Modified: kukit/kss.core/trunk/kss/core/plugins/core/demo/configure.zcml
==============================================================================
--- kukit/kss.core/trunk/kss/core/plugins/core/demo/configure.zcml      
(original)
+++ kukit/kss.core/trunk/kss/core/plugins/core/demo/configure.zcml      Fri Dec 
 7 17:16:07 2007
@@ -1,6 +1,7 @@
 <configure xmlns="http://namespaces.zope.org/zope";
            xmlns:browser="http://namespaces.zope.org/browser";
            xmlns:kss="http://namespaces.zope.org/kss";
+           xmlns:zcml="http://namespaces.zope.org/zcml";
                   i18n_domain="kss"
                   >
 
@@ -20,12 +21,14 @@
   -->
 
   <!-- Set up the demo utility -->
-  <utility
-    name="core"
-    factory=".zopeconfig.KSSCoreDemos"
-    provides="kss.demo.interfaces.IKSSDemoResource"
-    permission="zope.Public"
-    />
+  <configure zcml:condition="installed kss.demo.marker">
+      <utility
+        name="core"
+        factory=".zopeconfig.KSSCoreDemos"
+        provides="kss.demo.interfaces.IKSSDemoResource"
+        permission="zope.Public"
+        />
+  </configure>
 
   <!-- change tag content -->
   <browser:page
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to