コード例 #1
0
"""Initialize CMFDiffTool Product"""
# Set up a MessageFactory for the cmfdifftool domain
from zope.i18nmessageid import MessageFactory
CMFDiffToolMessageFactory = MessageFactory('cmfdifftool')

from Products.CMFCore.utils import ToolInit

from Products.CMFDiffTool import CMFDiffTool
from Products.CMFDiffTool import FieldDiff
from Products.CMFDiffTool import TextDiff
from Products.CMFDiffTool import ListDiff
from Products.CMFDiffTool import BinaryDiff
from Products.CMFDiffTool import CMFDTHtmlDiff
from Products.CMFDiffTool import ATCompoundDiff

CMFDiffTool.registerDiffType(BinaryDiff.BinaryDiff)
CMFDiffTool.registerDiffType(FieldDiff.FieldDiff)
CMFDiffTool.registerDiffType(ListDiff.ListDiff)
CMFDiffTool.registerDiffType(TextDiff.TextDiff)
CMFDiffTool.registerDiffType(TextDiff.AsTextDiff)
CMFDiffTool.registerDiffType(CMFDTHtmlDiff.CMFDTHtmlDiff)
CMFDiffTool.registerDiffType(ATCompoundDiff.ATCompoundDiff)

# Soft plone.namedfile dependency
try:
    from Products.CMFDiffTool import namedfile
except ImportError:
    pass
else:
    CMFDiffTool.registerDiffType(namedfile.NamedFileBinaryDiff)
    CMFDiffTool.registerDiffType(namedfile.NamedFileListDiff)
コード例 #2
0
# -*- coding: utf-8 -*-
"""Initialize CMFDiffTool Product"""
# Set up a MessageFactory for the cmfdifftool domain
from zope.i18nmessageid import MessageFactory
CMFDiffToolMessageFactory = MessageFactory('cmfdifftool')

from Products.CMFCore.utils import ToolInit  # NOQA
from Products.CMFDiffTool import CMFDiffTool  # NOQA
from Products.CMFDiffTool import FieldDiff  # NOQA
from Products.CMFDiffTool import TextDiff  # NOQA
from Products.CMFDiffTool import ListDiff  # NOQA
from Products.CMFDiffTool import BinaryDiff  # NOQA
from Products.CMFDiffTool import CMFDTHtmlDiff  # NOQA
from Products.CMFDiffTool import ATCompoundDiff  # NOQA

CMFDiffTool.registerDiffType(BinaryDiff.BinaryDiff)
CMFDiffTool.registerDiffType(FieldDiff.FieldDiff)
CMFDiffTool.registerDiffType(ListDiff.ListDiff)
CMFDiffTool.registerDiffType(TextDiff.TextDiff)
CMFDiffTool.registerDiffType(TextDiff.AsTextDiff)
CMFDiffTool.registerDiffType(CMFDTHtmlDiff.CMFDTHtmlDiff)
CMFDiffTool.registerDiffType(ATCompoundDiff.ATCompoundDiff)

# Soft plone.namedfile dependency
try:
    from Products.CMFDiffTool import namedfile
except ImportError:
    pass
else:
    CMFDiffTool.registerDiffType(namedfile.NamedFileBinaryDiff)
    CMFDiffTool.registerDiffType(namedfile.NamedFileListDiff)
コード例 #3
0
ファイル: __init__.py プロジェクト: nacho22martin/tesis
# -*- coding: utf-8 -*-
"""Initialize CMFDiffTool Product"""
# Set up a MessageFactory for the cmfdifftool domain
from zope.i18nmessageid import MessageFactory
CMFDiffToolMessageFactory = MessageFactory('cmfdifftool')

from Products.CMFCore.utils import ToolInit

from Products.CMFDiffTool import CMFDiffTool
from Products.CMFDiffTool import FieldDiff
from Products.CMFDiffTool import TextDiff
from Products.CMFDiffTool import ListDiff
from Products.CMFDiffTool import BinaryDiff
from Products.CMFDiffTool import CMFDTHtmlDiff
from Products.CMFDiffTool import ATCompoundDiff

tools = ( CMFDiffTool.CMFDiffTool,)

CMFDiffTool.registerDiffType(BinaryDiff.BinaryDiff)
CMFDiffTool.registerDiffType(FieldDiff.FieldDiff)
CMFDiffTool.registerDiffType(ListDiff.ListDiff)
CMFDiffTool.registerDiffType(TextDiff.TextDiff)
CMFDiffTool.registerDiffType(CMFDTHtmlDiff.CMFDTHtmlDiff)
CMFDiffTool.registerDiffType(ATCompoundDiff.ATCompoundDiff)

def initialize(context):
    ToolInit('CMF Diff Tool',
             tools = tools,
             icon='tool.gif'
             ).initialize( context )
コード例 #4
0
contentConstructors = (ModuleEditor.addModuleEditor,)
contentClasses = (ModuleEditor.ModuleEditor,)

product_globals = globals()

z_bases = utils.initializeBasesPhase1(contentClasses, this_module)

# XSL transform paths for EIP
MODULE_EIP_XSL =  os.path.join(package_home(globals()), 'www/editInPlace.xsl')
ModuleSecurityInfo('Products.RhaptosModuleEditor').declarePublic('MODULE_EIP_XSL')

# Make the skins available as DirectoryViews
registerDirectory('skins', globals())

# Allow access to transaction.abort, for import script
from AccessControl import allow_module
import transaction
allow_module('transaction')

CMFDiffTool.registerDiffType(LinksDiff.LinksDiff)

def initialize(context):
    utils.initializeBasesPhase2( z_bases, context )
    utils.ContentInit(ModuleEditor.ModuleEditor.meta_type,
                      content_types = contentClasses,
                      permission = permissions.AddModuleEditor,
                      extra_constructors = contentConstructors).initialize(context)
    

コード例 #5
0
contentConstructors = (ModuleEditor.addModuleEditor, )
contentClasses = (ModuleEditor.ModuleEditor, )

product_globals = globals()

z_bases = utils.initializeBasesPhase1(contentClasses, this_module)

# XSL transform paths for EIP
MODULE_EIP_XSL = os.path.join(package_home(globals()), 'www/editInPlace.xsl')
ModuleSecurityInfo('Products.RhaptosModuleEditor').declarePublic(
    'MODULE_EIP_XSL')

# Make the skins available as DirectoryViews
registerDirectory('skins', globals())

# Allow access to transaction.abort, for import script
from AccessControl import allow_module
import transaction
allow_module('transaction')

CMFDiffTool.registerDiffType(LinksDiff.LinksDiff)


def initialize(context):
    utils.initializeBasesPhase2(z_bases, context)
    utils.ContentInit(
        ModuleEditor.ModuleEditor.meta_type,
        content_types=contentClasses,
        permission=permissions.AddModuleEditor,
        extra_constructors=contentConstructors).initialize(context)