コード例 #1
0
ファイル: __init__.py プロジェクト: eaudeweb/trunk-eggs
misc_ = {
    'Site.gif':
    ImageFile('www/Site.gif', globals()),
    'jquery.ajaxupload.min.js':
    ImageFile('www/jquery.ajaxupload.min.js', globals()),
    'jquery.Jcrop.min.js':
    ImageFile('www/jquery.Jcrop.min.js', globals()),
    'tagcloud.css':
    ImageFile('www/tagcloud.css', globals()),
}

#process config.xml file
content_urls = {}
config = config_parser()
config_handler, error = config_parser().parse(file_utils().futRead(
    os.path.join(CHM2_PRODUCT_PATH, 'skel', 'config.xml'), 'r'))
if config_handler is not None:
    if config_handler.root.urls is not None:
        for item in config_handler.root.urls.entries:
            if not content_urls.has_key(item.meta_type):
                content_urls[item.meta_type] = []
            content_urls[item.meta_type].append(item.property)


def get_content_urls(self):
    return content_urls


CHMSite.CHMSite.get_content_urls = get_content_urls

コード例 #2
0
ファイル: __init__.py プロジェクト: eaudeweb/naaya.chm
    from Products.NaayaCore.LayoutTool.DiskFile import allow_path
    allow_path('Products.CHM2:skel/layout/')
    allow_path('Products.CHM2:skel-chm3/layout/')

misc_ = {
    'Site.gif':ImageFile('www/Site.gif', globals()),
    'jquery.ajaxupload.min.js':ImageFile('www/jquery.ajaxupload.min.js', globals()),
    'jquery.Jcrop.min.js':ImageFile('www/jquery.Jcrop.min.js', globals()),
    'tagcloud.css': ImageFile('www/tagcloud.css', globals()),
}

#process config.xml file
content_urls = {}
config = config_parser()
config_handler, error = config_parser().parse(file_utils().futRead(
    os.path.join(CHM2_PRODUCT_PATH, 'skel', 'config.xml'), 'r'))
if config_handler is not None:
    if config_handler.root.urls is not None:
        for item in config_handler.root.urls.entries:
            if not content_urls.has_key(item.meta_type):
                content_urls[item.meta_type] = []
            content_urls[item.meta_type].append(item.property)

def get_content_urls(self):
    return content_urls

CHMSite.CHMSite.get_content_urls = get_content_urls

def chm_bundle_registration():
    """ Register things from skel into the CHM bundle """
    from Products.NaayaCore.FormsTool.bundlesupport import \
コード例 #3
0
                          permission=PERMISSION_ADD_ENVPORTAL,
                          constructors=(
                              EnvPortal.manage_addEnvPortal_html,
                              EnvPortal.manage_addEnvPortal,
                          ),
                          icon='www/Site.gif')


misc_ = {
    'Site.gif': ImageFile('www/Site.gif', globals()),
}

#process config.xml file
content_urls = {}
config = config_parser()
config_handler, error = config_parser().parse(file_utils().futRead(
    join(ENVPORTAL_PRODUCT_PATH, 'skel', 'config.xml'), 'r'))
if config_handler is not None:
    if config_handler.root.urls is not None:
        for item in config_handler.root.urls.entries:
            if not content_urls.has_key(item.meta_type):
                content_urls[item.meta_type] = []
            content_urls[item.meta_type].append(item.property)


def get_content_urls(self):
    return content_urls


EnvPortal.EnvPortal.get_content_urls = get_content_urls

コード例 #4
0
ファイル: __init__.py プロジェクト: eaudeweb/naaya
    """ """

    # register classes
    context.registerClass(
        CHMSite.CHMSite,
        permission=PERMISSION_ADD_CHMSITE,
        constructors=(CHMSite.manage_addCHMSite_html, CHMSite.manage_addCHMSite),
        icon="www/Site.gif",
    )


misc_ = {"Site.gif": ImageFile("www/Site.gif", globals())}

# process config.xml file
content_urls = {}
config = config_parser()
config_handler, error = config_parser().parse(file_utils().futRead(join(CHM2_PRODUCT_PATH, "skel", "config.xml"), "r"))
if config_handler is not None:
    if config_handler.root.urls is not None:
        for item in config_handler.root.urls.entries:
            if not content_urls.has_key(item.meta_type):
                content_urls[item.meta_type] = []
            content_urls[item.meta_type].append(item.property)


def get_content_urls(self):
    return content_urls


CHMSite.CHMSite.get_content_urls = get_content_urls