[KSS-checkins] r49296 - in kukit/kss.zope/trunk/kss/zope: . plugins/core plugins/core/demo plugins/core/demo/binderids

reebalazs at codespeak.net reebalazs at codespeak.net
Sun Dec 2 21:03:52 CET 2007


Author: reebalazs
Date: Sun Dec  2 21:03:52 2007
New Revision: 49296

Added:
   kukit/kss.zope/trunk/kss/zope/plugins/core/config.py
   kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/config.py
      - copied, changed from r49291, kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/zopeconfig.py
   kukit/kss.zope/trunk/kss/zope/plugins/core/demo/config.py
      - copied, changed from r49291, kukit/kss.zope/trunk/kss/zope/plugins/core/demo/zopeconfig.py
Removed:
   kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/zopeconfig.py
   kukit/kss.zope/trunk/kss/zope/plugins/core/demo/zopeconfig.py
Modified:
   kukit/kss.zope/trunk/kss/zope/plugins/core/README
   kukit/kss.zope/trunk/kss/zope/plugins/core/configure.zcml
   kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/configure.zcml
   kukit/kss.zope/trunk/kss/zope/plugins/core/demo/configure.zcml
   kukit/kss.zope/trunk/kss/zope/registry.py
Log:
Register demos from plugins

Modified: kukit/kss.zope/trunk/kss/zope/plugins/core/README
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/README	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/README	Sun Dec  2 21:03:52 2007
@@ -1,4 +1 @@
 
-The core plugins have a missing browser directory as
-the plugins are included in kukit/kukit.js.
-

Added: kukit/kss.zope/trunk/kss/zope/plugins/core/config.py
==============================================================================
--- (empty file)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/config.py	Sun Dec  2 21:03:52 2007
@@ -0,0 +1,48 @@
+
+from kss.base.plugin import Plugin
+from kss.demo.resource import (
+    KSSDemo,
+    KSSSeleniumTestDirectory,
+)
+
+class KSSCore(Plugin):
+    '''The KSS core plugin has all the standard functionality'''
+
+    # XXX what is priority?
+    priority = -1000
+
+    javascripts = []
+    extra_javascripts = []
+    commandsets = {}
+    selectors = {}
+
+    # 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"),
+        )
+
+    # directories are relative from the location of this .py file
+    selenium_tests = (
+        KSSSeleniumTestDirectory('demos/selenium_tests'),
+        )

Modified: kukit/kss.zope/trunk/kss/zope/plugins/core/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/configure.zcml	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/configure.zcml	Sun Dec  2 21:03:52 2007
@@ -8,415 +8,7 @@
     <!-- Include demo setup conditionally -->
     <include zcml:condition="installed kss.demo" package=".demo" />
 
-     <!-- example plugin registration
-     
-      <kss:eventtype
-          name="myCustomEventType"
-          jsfile="browser/my_plugins.js"
-          />
-  
-      <kss:action
-          name="myCustomAction"
-          jsfile="browser/my_plugins.js"
-          command_factory="selector/global"
-          params_mandatory="param1 param2 ... paramN"
-          params_optional=""
-          />
-  
-      <kss:selectortype
-          name="myCustomSelectorType"
-          jsfile="browser/my_plugins.js"
-          />
-
-      <kss:commandset
-          name="core"
-          provides=".interfaces.IKSSCoreCommands"
-          />
-
-     -->
-
-     <!-- register core plugins 
-          jsfile is omitted since these are defined in the core
-          and the plugin.js file is included statically in kukit.
-     -->
-          
-     <!-- Event types -->
-
-    <kss:eventtype
-        name="blur"
-        />
-    <kss:eventtype
-        name="focus"
-        />
-    <kss:eventtype
-        name="resize"
-        />
-    <kss:eventtype
-        name="click"
-        />
-    <kss:eventtype
-        name="dblclick"
-        />
-    <kss:eventtype
-        name="mousedown"
-        />
-    <kss:eventtype
-        name="mouseup"
-        />
-    <kss:eventtype
-        name="mousemove"
-        />
-    <kss:eventtype
-        name="mouseover"
-        />
-    <kss:eventtype
-        name="mouseout"
-        />
-    <kss:eventtype
-        name="change"
-        />
-    <kss:eventtype
-        name="reset"
-        />
-    <kss:eventtype
-        name="select"
-        />
-    <kss:eventtype
-        name="submit"
-        />
-    <kss:eventtype
-        name="keydown"
-        />
-    <kss:eventtype
-        name="keypress"
-        />
-    <kss:eventtype
-        name="keyup"
-        />
-
-    <kss:eventtype
-        name="timeout"
-        />
-
-    <kss:eventtype
-        name="load"
-        />
-        
-    <kss:eventtype
-        name="iload"
-        />
-
-    <kss:eventtype
-        name="spinneron"
-        />
-
-    <kss:eventtype
-        name="spinneroff"
-        />
-
-    <!-- This does not work yet. -->
-
-    <!--kss:eventtype
-        name="unload"
-        /-->
-
-    <!-- the special error action -->
-
-    <kss:action
-        name="error"
-        command_factory="global"
-        params_optional="message"
-        />
-       
-     <!-- Client actions & commands -->
-	
-    <kss:action
-        name="logDebug"
-        command_factory="global"
-        params_mandatory="message"
-        />
-
-    <kss:action
-        name="log"
-        command_factory="global"
-        params_mandatory="message"
-        />
-
-    <kss:action
-        name="alert"
-        command_factory="global"
-        params_mandatory="message"
-        />
-
-    <kss:action
-        name="replaceInnerHTML"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="replaceHTML"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="appendHTML"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="insertHTMLBefore"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="insertHTMLAfter"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="insertHTMLAsFirstChild"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="insertHTMLAsLastChild"
-        command_factory="selector"
-        params_mandatory="html"
-        />
-
-    <kss:action
-        name="deleteNodeAfter"
-        command_factory="selector"
-        />
-
-    <kss:action
-        name="deleteNodeBefore"
-        command_factory="selector"
-        />
-
-    <kss:action
-        name="deleteNode"
-        command_factory="selector"
-        />
-
-    <kss:action
-        name="clearChildNodes"
-        command_factory="selector"
-        />
-
-    <kss:action
-        name="moveNodeAfter"
-        command_factory="selector"
-        params_mandatory="html_id"
-        />
-
-    <kss:action
-        name="moveNodeBefore"
-        command_factory="selector"
-        params_mandatory="html_id"
-        />
-
-    <kss:action
-        name="copyChildNodesFrom"
-        command_factory="selector"
-        params_mandatory="html_id"
-        />
-
-    <kss:action
-        name="copyChildNodesTo"
-        command_factory="selector"
-        params_mandatory="html_id"
-        />
-
-    <kss:action
-        name="setAttribute"
-        command_factory="selector"
-        params_mandatory="name value"
-        />
-
-    <kss:action
-        name="setKssAttribute"
-        command_factory="selector"
-        params_mandatory="name value"
-        />
-
-    <kss:action
-        name="setStyle"
-        command_factory="selector"
-        params_mandatory="name value"
-        />
-
-    <kss:action
-        name="toggleClass"
-        command_factory="selector"
-        params_mandatory="value"
-        />
-
-    <kss:action
-        name="addClass"
-        command_factory="selector"
-        params_mandatory="value"
-        />
-
-    <kss:action
-        name="removeClass"
-        command_factory="selector"
-        params_mandatory="value"
-        />
-
-    <kss:action
-        name="focus"
-        command_factory="selector"
-        />
-
-    <kss:action
-        name="setStateVar"
-        command_factory="global"
-        params_mandatory="varname value"
-        />
-
-    <kss:action
-        name="triggerEvent"
-        command_factory="global"
-        params_mandatory="name"
-        params_optional="id namespace"
-        />
-
-    <kss:action
-        name="executeCommand"
-        />
-
-
-    <!-- Old command names (XXX compatibility, to be deprecated) -->
-
-    <kss:action
-        name="setHtmlAsChild"
-        command_factory="selector"
-        params_mandatory="html"
-        deprecated = "use setInnerHTML instead"
-        />
-          
-    <kss:action
-        name="addAfter"
-        command_factory="selector"
-        params_mandatory="html"
-        deprecated = "use insertHTMLAfter instead"
-        />
-          
-    <kss:action
-        name="removeNextSibling"
-        command_factory="selector"
-        deprecated = "use deleteNodeAfter instead"
-        />
-          
-    <kss:action
-        name="removePreviousSibling"
-        command_factory="selector"
-        deprecated = "use deleteNodeBefore instead"
-        />
-          
-    <kss:action
-        name="removeNode"
-        command_factory="selector"
-        deprecated = "use deleteNode instead"
-        />
-          
-    <kss:action
-        name="clearChildren"
-        command_factory="selector"
-        deprecated = "use clearChildNodes instead"
-        />
-          
-    <kss:action
-        name="copyChildrenFrom"
-        command_factory="selector"
-        params_mandatory="html_id"
-        deprecated = "use copyChildNodesFrom instead"
-        />
-          
-     <kss:action
-        name="copyChildrenTo"
-        command_factory="selector"
-        params_mandatory="html_id"
-        deprecated = "use copyChildNodesTo instead"
-        />
-
-     <kss:action
-        name="setStatevar"
-        command_factory="global"
-        params_mandatory="varname value"
-        deprecated = "use setInnerHTML instead"
-        />
-
-     <!-- Selector types -->
-
-    <kss:selectortype
-        name="css"
-        />
-
-    <kss:selectortype
-        name="htmlid"
-        />
-
-    <kss:selectortype
-        name="samenode"
-        />
-
-    <kss:selectortype
-        name="parentnode"
-        />
-
-     <!-- Parameter producers -->
-
-     <kss:paramprovider
-        name="formVar"
-        />
-
-     <kss:paramprovider
-        name="currentFormVar"
-        />
-
-     <kss:paramprovider
-        name="currentFormVarFromKssAttr"
-        />
-
-     <kss:paramprovider
-        name="form"
-        />
-
-     <kss:paramprovider
-        name="currentForm"
-        />
-
-     <kss:paramprovider
-        name="nodeAttr"
-        />
-
-     <kss:paramprovider
-        name="kssAttr"
-        />
-
-     <kss:paramprovider
-        name="nodeContent"
-        />
-
-     <kss:paramprovider
-        name="stateVar"
-        />
-
-     <kss:paramprovider
-        name="pass"
-        />
-
-    <!-- Command sets -->
-    
-    <!-- XXX is already in kss.base -->
-
+    <!-- This plugin is really just contains the demos now, the
+         rest is provided by kss.base. -->
 
 </configure>

Copied: kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/config.py (from r49291, kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/zopeconfig.py)
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/zopeconfig.py	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/config.py	Sun Dec  2 21:03:52 2007
@@ -1,26 +1,13 @@
 
-from kss.demo.interfaces import (
-    IKSSDemoResource,
-    IKSSSeleniumTestResource,
-    )
+from kss.base.plugin import Plugin
 from kss.demo.resource import (
     KSSDemo,
     KSSSeleniumTestDirectory,
     )
-from zope.interface import implements
-     
-# Create a mesh of provided interfaces
-# This is needed, because an utility must have a single interface.
-class IResource(IKSSDemoResource, IKSSSeleniumTestResource):
-    pass
-
-# XXX you do not need to change anything above here
-# -------------------------------------------------
 
-class KSSDemos(object):
-    implements(IResource)
+class CoreDemos(Plugin):
 
-    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'),
@@ -28,7 +15,7 @@
         )
 
     # directories are relative from the location of this .py file
-    selenium_tests = (
+    zope_selenium_testsuites = (
         # if you only have one test directory, you
         # need not change anything here.
         KSSSeleniumTestDirectory('selenium_tests'),

Modified: kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/configure.zcml	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/configure.zcml	Sun Dec  2 21:03:52 2007
@@ -8,14 +8,6 @@
     Set up the demos
   -->
 
-  <!-- Set up the demo utility, needed for registration -->
-  <utility
-    name="core_demo_for_binderids"
-    factory=".zopeconfig.KSSDemos"
-    provides="kss.demo.interfaces.IKSSDemoResource"
-    permission="zope.Public"
-    />
-
   <!-- Set up resources needed for the demo -->
   <browser:page
       for="kss.demo.interfaces.ISimpleContent"

Deleted: /kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/zopeconfig.py
==============================================================================
--- /kukit/kss.zope/trunk/kss/zope/plugins/core/demo/binderids/zopeconfig.py	Sun Dec  2 21:03:52 2007
+++ (empty file)
@@ -1,35 +0,0 @@
-
-from kss.demo.interfaces import (
-    IKSSDemoResource,
-    IKSSSeleniumTestResource,
-    )
-from kss.demo.resource import (
-    KSSDemo,
-    KSSSeleniumTestDirectory,
-    )
-from zope.interface import implements
-     
-# Create a mesh of provided interfaces
-# This is needed, because an utility must have a single interface.
-class IResource(IKSSDemoResource, IKSSSeleniumTestResource):
-    pass
-
-# XXX you do not need to change anything above here
-# -------------------------------------------------
-
-class KSSDemos(object):
-    implements(IResource)
-
-    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
-    selenium_tests = (
-        # if you only have one test directory, you
-        # need not change anything here.
-        KSSSeleniumTestDirectory('selenium_tests'),
-        )

Copied: kukit/kss.zope/trunk/kss/zope/plugins/core/demo/config.py (from r49291, kukit/kss.zope/trunk/kss/zope/plugins/core/demo/zopeconfig.py)
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/demo/zopeconfig.py	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/demo/config.py	Sun Dec  2 21:03:52 2007
@@ -1,23 +1,13 @@
 
-from kss.demo.interfaces import (
-    IKSSDemoResource,
-    IKSSSeleniumTestResource,
-    )
+from kss.base.plugin import Plugin
 from kss.demo.resource import (
     KSSDemo,
     KSSSeleniumTestDirectory,
     )
-from zope.interface import implements
-     
-# Create a mesh of provided interfaces
-# This is needed, because an utility must have a single interface.
-class IResource(IKSSDemoResource, IKSSSeleniumTestResource):
-    pass
 
-class KSSCoreDemos(object):
-    implements(IResource)
+class CoreDemos(Plugin):
 
-    demos = (
+    zope_demos = (
         KSSDemo('', '', "basic_commands.html", "Change tag content"),
         KSSDemo('', '', "two_selects.html", "Two selects"),
         KSSDemo('', '', "autoupdate.html", "Auto update"),
@@ -27,11 +17,9 @@
         KSSDemo('', '', "more_selectors.html", "More complex selectors"),
         KSSDemo('', '', "two_select_revisited.html", "Master-slave selects revisited"),
         KSSDemo('', '', "form_submit.html", "Form submit"),
-        KSSDemo('', '', "effects.html", "Effects"),
         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('', '',  "draganddrop.html", "Scriptaculous drag and drop"),
         KSSDemo('', 'Parameter functions', 'pf_forms.html', 'Forms'),
         KSSDemo('', 'Selectors', 'selectors.html', 'Parent node selector'),
         KSSDemo('', 'Core syntax', "kss_selector_param.html", "Kss selector parameters"),
@@ -40,9 +28,11 @@
         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
-    selenium_tests = (
+    zope_selenium_testsuites = (
         KSSSeleniumTestDirectory('selenium_tests'),
         )

Modified: kukit/kss.zope/trunk/kss/zope/plugins/core/demo/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/plugins/core/demo/configure.zcml	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/core/demo/configure.zcml	Sun Dec  2 21:03:52 2007
@@ -19,14 +19,6 @@
     Set up the demos in the root of this package
   -->
 
-  <!-- Set up the demo utility -->
-  <utility
-    name="core"
-    factory=".zopeconfig.KSSCoreDemos"
-    provides="kss.demo.interfaces.IKSSDemoResource"
-    permission="zope.Public"
-    />
-
   <!-- change tag content -->
   <browser:page
       for="kss.demo.interfaces.ISimpleContent"

Deleted: /kukit/kss.zope/trunk/kss/zope/plugins/core/demo/zopeconfig.py
==============================================================================
--- /kukit/kss.zope/trunk/kss/zope/plugins/core/demo/zopeconfig.py	Sun Dec  2 21:03:52 2007
+++ (empty file)
@@ -1,48 +0,0 @@
-
-from kss.demo.interfaces import (
-    IKSSDemoResource,
-    IKSSSeleniumTestResource,
-    )
-from kss.demo.resource import (
-    KSSDemo,
-    KSSSeleniumTestDirectory,
-    )
-from zope.interface import implements
-     
-# Create a mesh of provided interfaces
-# This is needed, because an utility must have a single interface.
-class IResource(IKSSDemoResource, IKSSSeleniumTestResource):
-    pass
-
-class KSSCoreDemos(object):
-    implements(IResource)
-
-    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('', '', "effects.html", "Effects"),
-        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('', '',  "draganddrop.html", "Scriptaculous drag and drop"),
-        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"),
-        )
-
-    # directories are relative from the location of this .py file
-    selenium_tests = (
-        KSSSeleniumTestDirectory('selenium_tests'),
-        )

Modified: kukit/kss.zope/trunk/kss/zope/registry.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/registry.py	(original)
+++ kukit/kss.zope/trunk/kss/zope/registry.py	Sun Dec  2 21:03:52 2007
@@ -1,6 +1,5 @@
 from zope import interface
 from kss.base.plugin import available_plugins
-
 from kss.zope.interfaces import IKSSPluginRegistry
 
 # BBB registries for configuration of plugins through ZCML
@@ -15,18 +14,24 @@
         self._javascripts = []
         self._extra_javascripts = []
         self._selectors = {}
+        self._zope_demos = []
+        self._zope_selenium_testsuites = []
 
         # Import information from all available plugins,
         # and make them availeble on the level of Zope.
         for id, config in self.plugins():
+
             # get commandset info
             self._commandsets.update(config.commandsets)
+
             # get javascripts info
             for javascript in config.javascripts:
                 self._javascripts.append(javascript)
+
             # get extra javascripts info
             for extra_javascript in config.extra_javascripts:
                 self._extra_javascripts.append(extra_javascript)
+
             # get selectors info
             # XXX TODO We would really like to use selectors[name]
             # lookup directly from kss.base... and then we won't need
@@ -35,7 +40,21 @@
             for selectors in config.selectors.itervalues():
                 for selector in selectors:
                     self._selectors[selector.type] = selector
-
+            
+            # get demos info
+            self._zope_demos.extend(getattr(config, 'zope_demos', ()))
+            
+            # get selenium test info
+            for selenium_testsuite in getattr(config, 'zope_selenium_testsuites', ()):
+                # We need to save the config, so that its root dir can be used.
+                self._zope_selenium_testsuites.append((config, selenium_testsuite))
+
+        # sort the demos
+        self._zope_demos.sort(key=lambda demo: (
+                demo.plugin_namespace,
+                demo.category,
+                ))
+  
     def plugins(self):
         return available_plugins()
 
@@ -60,6 +79,13 @@
         except KeyError, exc:
             raise KeyError, 'Selector "%s" is not registered.' % (id, )
 
+    def zope_demos(self):
+        return self._zope_demos
+
+    def zope_selenium_testsuites(self):
+        return self._zope_selenium_testsuites
+
+
 #=============================================
 # Stuff needed for compatibility features
 #=============================================


More information about the Kukit-checkins mailing list