[KSS-checkins] r49291 - in kukit/kss.zope/trunk: . kss/core kss/core/plugins kss/zope kss/zope/plugins kss/zope/plugins/core kss/zope/plugins/draganddrop

reebalazs at codespeak.net reebalazs at codespeak.net
Sun Dec 2 18:40:43 CET 2007


Author: reebalazs
Date: Sun Dec  2 18:40:42 2007
New Revision: 49291

Added:
   kukit/kss.zope/trunk/kss/zope/plugins/
      - copied from r49285, kukit/kss.zope/trunk/kss/core/plugins/
   kukit/kss.zope/trunk/kss/zope/plugins/core/configure.zcml
      - copied unchanged from r49288, kukit/kss.zope/trunk/kss/core/plugins/core/configure.zcml
Removed:
   kukit/kss.zope/trunk/kss/core/plugins/
   kukit/kss.zope/trunk/kss/zope/plugins/core/commands.py
   kukit/kss.zope/trunk/kss/zope/plugins/core/interfaces.py
   kukit/kss.zope/trunk/kss/zope/plugins/draganddrop/
Modified:
   kukit/kss.zope/trunk/kss/core/configure.zcml
   kukit/kss.zope/trunk/kss/zope/configure.zcml
   kukit/kss.zope/trunk/kss/zope/plugins/configure.zcml
   kukit/kss.zope/trunk/setup.py
Log:
Move plugins from core to zope, delete draganddrop

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	Sun Dec  2 18:40:42 2007
@@ -8,7 +8,6 @@
  
     <!-- This include MUST come first! -->
     <include package=".pluginregistry"/>
-    <include package=".plugins"/>
 
     <!-- javascript testing support 
         XXX disabled during the transition process

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	Sun Dec  2 18:40:42 2007
@@ -8,6 +8,9 @@
   <utility factory=".registry.GlobalPluginRegistry"
            permission="zope.Public" />
 
+  <!-- XXX This include should go away by the end of the trensition. -->
+  <include package=".plugins" />
+
   <!-- Defining the kss concatenated javascript 
       as resources
   -->

Modified: kukit/kss.zope/trunk/kss/zope/plugins/configure.zcml
==============================================================================
--- kukit/kss.zope/trunk/kss/core/plugins/configure.zcml	(original)
+++ kukit/kss.zope/trunk/kss/zope/plugins/configure.zcml	Sun Dec  2 18:40:42 2007
@@ -2,19 +2,10 @@
            xmlns:browser="http://namespaces.zope.org/browser"
            xmlns:five="http://namespaces.zope.org/five">
  
-  <!-- Configuration of all the plugins distributed
-       with the core system.
-       Individual lines can be commented out.
-   -->
-  
   <!-- The core plugins -->
   <include package=".core" />
 
   <!-- The scriptaculous effects -->
   <include package=".effects" />
 
-  <!-- The drag and drop -->
-  <!-- This plugin will be deprecated, do not enable by default -->
-  <!--include package=".draganddrop" /-->
-
 </configure>

Deleted: /kukit/kss.zope/trunk/kss/core/plugins/core/commands.py
==============================================================================
--- /kukit/kss.zope/trunk/kss/core/plugins/core/commands.py	Sun Dec  2 18:40:42 2007
+++ (empty file)
@@ -1,198 +0,0 @@
-from kss.core.selectors import Selector, CssSelector, HtmlIdSelector
-from kss.core.selectors import ParentNodeSelector, SameNodeSelector
-from kss.core.kssview import CommandSet
-from kss.core.deprecated import deprecated, deprecated_warning
-from kss.core.parsers import HtmlParser
-from kss.core.plugins.core.interfaces import IKSSCoreCommands
-from zope.interface import implements
-
-class KSSCoreCommands(CommandSet):
-    implements(IKSSCoreCommands)
-
-    def getSelector(self, type, selector):
-        'Get a selector of a given type'
-        return Selector(type, selector)
-
-    def getCssSelector(self, selector):
-        return CssSelector(selector)
-            
-    def getHtmlIdSelector(self, selector):
-        return HtmlIdSelector(selector)
-
-    def getSameNodeSelector(self):
-        return SameNodeSelector()
-
-    def getParentNodeSelector(self, selector):
-        return ParentNodeSelector(selector)
-
-    # XXX the list is not full: maybe complete them?
-    
-    def replaceInnerHTML(self, selector, new_value, withKssSetup='True'):
-        """ see interfaces.py """
-        command = self.commands.addCommand('replaceInnerHTML', selector)
-        data = command.addHtmlParam('html', new_value)
-        data = command.addParam('withKssSetup', withKssSetup)
-
-    def replaceHTML(self, selector, new_value, withKssSetup='True'):
-        """ see interfaces.py """
-        command = self.commands.addCommand('replaceHTML', selector)
-        data = command.addHtmlParam('html', new_value)
-        data = command.addParam('withKssSetup', withKssSetup)
-    
-    def setAttribute(self, selector, name, value):
-        """ see interfaces.py """
-        command = self.commands.addCommand('setAttribute', selector)
-        data = command.addParam('name', name)
-        data = command.addParam('value', value)
-
-    def setStyle(self, selector, name, value):
-        """ see interfaces.py """
-        command = self.commands.addCommand('setStyle', selector)
-        data = command.addParam('name', name)
-        data = command.addParam('value', value)
-    
-    def insertHTMLAfter(self, selector, new_value, withKssSetup='True'):
-        """ see interfaces.py """
-        command = self.commands.addCommand('insertHTMLAfter', selector)
-        data = command.addHtmlParam('html', new_value)
-        data = command.addParam('withKssSetup', withKssSetup)
-
-    def insertHTMLAsFirstChild(self, selector, new_value, withKssSetup='True'):
-        """ see interfaces.py """
-        command = self.commands.addCommand('insertHTMLAsFirstChild', selector)
-        data = command.addHtmlParam('html', new_value)
-        data = command.addParam('withKssSetup', withKssSetup)
-
-    def insertHTMLAsLastChild(self, selector, new_value, withKssSetup='True'):
-        """ see interfaces.py """
-        command = self.commands.addCommand('insertHTMLAsLastChild', selector)
-        data = command.addHtmlParam('html', new_value)
-        data = command.addParam('withKssSetup', withKssSetup)
-
-    def insertHTMLBefore(self, selector, new_value, withKssSetup='True'):
-        """ see interfaces.py """
-        command = self.commands.addCommand('insertHTMLBefore', selector)
-        data = command.addHtmlParam('html', new_value)
-        data = command.addParam('withKssSetup', withKssSetup)
-
-    def clearChildNodes(self, selector):
-        """ see interfaces.py """
-        command = self.commands.addCommand('clearChildNodes', selector)
-    
-    def deleteNode(self, selector):
-        """ see interfaces.py """
-        command = self.commands.addCommand('deleteNode', selector)
-
-    def deleteNodeAfter(self, selector):
-        """ see interfaces.py """
-        command = self.commands.addCommand('deleteNodeAfter', selector)
-
-    def deleteNodeBefore(self, selector):
-        """ see interfaces.py """
-        command = self.commands.addCommand('deleteNodeBefore', selector)
-
-    def copyChildNodesFrom(self, selector, id):
-        """ see interfaces.py """
-        command = self.commands.addCommand('copyChildNodesFrom', selector)
-        data = command.addParam('html_id', id)
-
-    def moveNodeAfter(self, selector, id):
-        """ see interfaces.py """
-        command = self.commands.addCommand('moveNodeAfter', selector)
-        data = command.addParam('html_id', id)
-
-    def moveNodeBefore(self, selector, id):
-        """ see interfaces.py """
-        command = self.commands.addCommand('moveNodeBefore', selector)
-        data = command.addParam('html_id', id)
-
-    def copyChildNodesTo(self, selector, id):
-        """ see interfaces.py """
-        command = self.commands.addCommand('copyChildNodesTo', selector)
-        data = command.addParam('html_id', id)
-
-    def setStateVar(self, varname, value):
-        """ see interfaces.py """
-        command = self.commands.addCommand('setStateVar')
-        command.addParam('varname', varname)
-        command.addParam('value', value)
-
-    def triggerEvent(self, name, **kw):
-        """ see interfaces.py """
-        command = self.commands.addCommand('triggerEvent')
-        command.addParam('name', name)
-        for key, value in kw.iteritems():
-            command.addParam(key, value)
-
-    def toggleClass(self, selector, *arg, **kw):
-    ##def toggleClass(self, selector, value):
-        """ see interfaces.py """
-        # BBB 4 months, until 2007-10-18
-        value = BBB_classParms('toggleClass', *arg, **kw)
-
-        command = self.commands.addCommand('toggleClass', selector)
-        data = command.addParam('value', value)
-
-    def addClass(self, selector, *arg, **kw):
-    ##def addClass(self, selector, name):
-        """ see interfaces.py """
-        # BBB 4 months, until 2007-10-18
-        value = BBB_classParms('addClass', *arg, **kw)
-
-        command = self.commands.addCommand('addClass', selector)
-        data = command.addParam('value', value)
-
-    def removeClass(self, selector, *arg, **kw):
-    ##def removeClass(self, selector, name):
-        """ see interfaces.py """
-        # BBB 4 months, until 2007-10-18
-        value = BBB_classParms('removeClass', *arg, **kw)
-
-        command = self.commands.addCommand('removeClass', selector)
-        data = command.addParam('value', value)
-
-    def focus(self, selector):
-        """ see interfaces.py """
-        command = self.commands.addCommand('focus', selector)
-
-    # XXX Deprecated ones
-
-    # BBB until 2007-10-18
-    def moveChildrenTo(self, selector, id):
-        """ see interfaces.py """
-        self.copyChildrenTo(selector, id)
-        self.clearChildren(selector)
-    moveChildrenTo = deprecated(moveChildrenTo, 'No more supported, use a sequence of copyChildrenTo and clearChildren')
-
-    # BBB until 2007-10-18
-    setHtmlAsChild = deprecated(replaceInnerHTML, 'use replaceInnerHTML instead')
-    addAfter = deprecated(insertHTMLAfter, 'use insertHTMLAfter instead')
-    clearChildren = deprecated(clearChildNodes, 'use clearChildNodes instead')
-    removeNode = deprecated(deleteNode, 'use deleteNode instead')
-    removeNextSibling = deprecated(deleteNodeAfter, 'use deleteNodeAfter instead')
-    removePreviousSibling = deprecated(deleteNodeBefore, 'use deleteNodeBefore instead')
-    copyChildrenFrom = deprecated(copyChildNodesFrom, 'use copyChildNodesFrom instead')
-    copyChildrenTo = deprecated(copyChildNodesTo, 'use copyChildNodesTo instead')
-    setStatevar = deprecated(setStateVar, 'use setStateVar (capital V) instead')
-
-    # BBB 4 month, until 2007-10-18
-    addClassName = deprecated(addClass, 'use addClass instead')
-    removeClassName = deprecated(removeClass, 'use removeClass instead')
-
-# BBB 4 month, until 2007-10-18
-def BBB_classParms(commandname, value=None, classname=None, name=None):
-    if classname:
-        deprecated_warning(('Deprecated the "classname" parameter in the "%s" command, ' +
-                           'use "name" instead.') % (commandname ,))
-        if not value:
-            value = classname
-    if name:
-        deprecated_warning(('Deprecated the "name" parameter in the "%s" command, ' +
-                           'use "name" instead.') % (commandname ,))
-        if not value:
-            value = name
-    if not value:
-        raise Exception, 'Parameter "value" is mandatory in command "%s"' % (commandname, )
-    return value
-
-    # end deprecated

Deleted: /kukit/kss.zope/trunk/kss/core/plugins/core/interfaces.py
==============================================================================
--- /kukit/kss.zope/trunk/kss/core/plugins/core/interfaces.py	Sun Dec  2 18:40:42 2007
+++ (empty file)
@@ -1,96 +0,0 @@
-from zope.interface import Interface
-
-class IKSSCoreCommands(Interface):
-    """The core commands"""
-
-    def getSelector(type, selector):
-        """Return a specific type of selector
-
-        The type can be `css` or `htmlid`. The selector is the value for the
-        selector."""
-
-    def getCssSelector(selector):
-        """Return a CSS selector with selector as the value"""
-
-    def getHtmlIdSelector(selector):
-        """Return a HTML id selector with selector as the value"""
-
-    def getSameNodeSelector():
-        """Return the same node as the value"""
-
-    def getParentNodeSelector(selector):
-        """Return a all nodes in the parent chain which match the css
-        selector"""
-
-    def replaceInnerHTML(selector, new_value, withKssSetup='True'):
-        """Replace the contents of a node (selector) with the new_value"""
-
-    def replaceHTML(selector, new_value, withKssSetup='True'):
-        """Replace the node itself with new_value
-        
-        Node selection is done using the selector argument."""
-
-    def setAttribute(selector, name, value):
-        """Set an attribute on node(s) specified by the selector"""
-
-    def setStyle(selector, name, value):
-        """Set the style attribute of nodes specified by the selector"""
-
-    def insertHTMLAfter(selector, new_value, withKssSetup='True'):
-        """Insert some HTML after the node indicated by selector"""
-
-    def insertHTMLBefore(selector, new_value, withKssSetup='True'):
-        """Insert some HTML before the node specified by selector"""
-
-    def insertHTMLAsFirstChild(selector, new_value, withKssSetup='True'):
-        """Insert some HTML as the first child of the node specified by selector"""
-
-    def insertHTMLAsLastChild(selector, new_value, withKssSetup='True'):
-        """Insert some HTML as the last child of the node specified by selector"""
-
-    def clearChildNodes(selector):
-        """Remove all the child nodes from the node specified by selector"""
-
-    def deleteNode(selector):
-        """Remove the node itself specified by selector"""
-
-    def deleteNodeAfter(selector):
-        """Remove the node after the node specified by selector"""
-
-    def deleteNodeBefore(selector):
-        """Remove the node before the node specified by selector"""
-
-    def copyChildNodesFrom(selector, id):
-        """Copy the child nodes from the node specified by id to the selector node
-        
-        The copy operation will clear out all childnodes of selector."""
-
-    def copyChildNodesTo(selector, id):
-        """Copy the child nodes from the selector node to the node specified by id
-        
-        The copy operation will clear out all childnodes of selector."""
-
-    def moveNodeAfter(selector, id):
-        """Move the node indicated by selector to a sibling after id"""
-
-    def setStateVar(varname, value):
-        """Set a client side kukit variable"""
-
-    def triggerEvent(name, **kw):
-        """Trigger an event on the client """
-        # TODO: explain a bit better what this does
-
-    def toggleClass(selector, value):
-        """Add/remove a class to/from a node.
-        
-        If the class is present it will be removed. Else the class will be
-        added.  """
-
-    def addClass(selector, value):
-        """Add a class to a node."""
-
-    def removeClass(selector, value):
-        """Remove a class from a node."""
-
-    def focus(selector):
-        """Set focus to selected node."""

Modified: kukit/kss.zope/trunk/setup.py
==============================================================================
--- kukit/kss.zope/trunk/setup.py	(original)
+++ kukit/kss.zope/trunk/setup.py	Sun Dec  2 18:40:42 2007
@@ -1,34 +1,37 @@
 from setuptools import setup, find_packages
-import sys, os
+from textwrap import dedent
 
 version = '1.4'
 
-setup(name='kss.zope',
-      version=version,
-      description="KSS (Kinetic Style Sheets) core framework",
-      long_description="""\
-""",
-      # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
-      classifiers=[
+setup(
+    name = 'kss.zope',
+    version = version,
+    description = "KSS (Kinetic Style Sheets) core framework",
+    long_description = dedent("""\
+        """),
+    # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+    classifiers = [
         "Framework :: Zope2",
         "Framework :: Zope3",
         "Programming Language :: Python",
         "Topic :: Software Development :: Libraries :: Python Modules",
         ],
-      keywords='',
-      author='KSS Project',
-      author_email='kss-devel at codespeak.net',
-      url='http://kssproject.org',
-      license='GPL',
-      packages=find_packages(exclude=['ez_setup']),
-      namespace_packages=['kss'],
-      include_package_data=True,
-      zip_safe=False,
-      install_requires=[
-          'kss.base>=dev',
-          'setuptools',
-      ],
-      entry_points="""
-      # -*- Entry points: -*-
-      """,
-      )
+    keywords = '',
+    author = 'KSS Project',
+    author_email = 'kss-devel at codespeak.net',
+    url = 'http://kssproject.org',
+    license = 'GPL',
+    packages = find_packages(exclude=['ez_setup']),
+    namespace_packages = ['kss'],
+    include_package_data = True,
+    zip_safe = False,
+    install_requires = [
+        'kss.base>=dev',
+        'setuptools',
+        ],
+    entry_points={
+#        'kss.plugin': [
+#            'core=kss.base.config:KSSCore'
+#            ],
+        },
+)


More information about the Kukit-checkins mailing list