Back to index

plone3  3.1.7
Functions | Variables
sample-kupu-customisation-policy Namespace Reference

Functions

def typefilter

Variables

tuple LINKABLE_BLACKLIST
tuple RESOURCES
list EXCLUDED_HTML
list STYLE_WHITELIST = ['text-align', 'list-style-type', 'float']
list CLASS_BLACKLIST
tuple TABLE_CLASSNAMES = ('plain', 'listing', 'grid', 'data')
tuple PARAGRAPH_STYLES
tuple LIBRARIES
string DEFAULT_LIBRARY = 'current'
 INSTALL_BEFOREUNLOAD = False
 LINKBYUID = False
 CAPTIONING = False
tuple tool = getToolByName(context, 'kupu_library_tool')
tuple typetool = getToolByName(context, 'portal_types')
string PREVIEW_EXPR = 'string:${object_url}/%s'
list PREVIEW
tuple types = tool.zmi_get_resourcetypes()
tuple mappings = tool.zmi_get_resourcetypes()
tuple libs = tool.zmi_get_libraries()
tuple keys = lib.keys()
 table_classnames = TABLE_CLASSNAMES,
 parastyles = PARAGRAPH_STYLES,
 html_exclusions = EXCLUDED_HTML,
 style_whitelist = STYLE_WHITELIST,
 class_blacklist = CLASS_BLACKLIST,
 installBeforeUnload = INSTALL_BEFOREUNLOAD,
 linkbyuid = LINKBYUID,
 captioning = CAPTIONING,

Function Documentation

def sample-kupu-customisation-policy.typefilter (   types)

Definition at line 147 of file sample-kupu-customisation-policy.py.

00147 
00148 def typefilter(types):
00149     all_meta_types = dict([ (t.id, 1) for t in typetool.listTypeInfo()])
00150     return [ t for t in types if t in all_meta_types ]

Here is the call graph for this function:


Variable Documentation

sample-kupu-customisation-policy.CAPTIONING = False

Definition at line 114 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.captioning = CAPTIONING,

Definition at line 190 of file sample-kupu-customisation-policy.py.

list sample-kupu-customisation-policy.CLASS_BLACKLIST
Initial value:
00001 ['MsoNormal', 'MsoTitle', 'MsoHeader', 'MsoFootnoteText',
00002         'Bullet1', 'Bullet2']

Definition at line 68 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.class_blacklist = CLASS_BLACKLIST,

Definition at line 187 of file sample-kupu-customisation-policy.py.

string sample-kupu-customisation-policy.DEFAULT_LIBRARY = 'current'

Definition at line 110 of file sample-kupu-customisation-policy.py.

list sample-kupu-customisation-policy.EXCLUDED_HTML
Initial value:
00001 [
00002   {'tags': ('center','tt','big','small','basefont','font',),
00003    'attributes':(),
00004    'keep': 1 },
00005   
00006   {'tags':(),
00007   'attributes': ('lang','valign','halign','border','frame',
00008       'rules','cellspacing','cellpadding','bgcolor'),
00009    'keep': 1},
00010 
00011   {'tags': ('table','th','td'),
00012    'attributes': ('width','height'),
00013    'keep': 1},
00014 
00015    {'tags': '', 'attributes': '' } # Must be dummy entry at end.
00016 ]

Definition at line 50 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.html_exclusions = EXCLUDED_HTML,

Definition at line 185 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.INSTALL_BEFOREUNLOAD = False

Definition at line 112 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.installBeforeUnload = INSTALL_BEFOREUNLOAD,

Definition at line 188 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.keys = lib.keys()

Definition at line 172 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.LIBRARIES
Initial value:
00001 (
00002     dict(id="root",
00003          title="string:Home",
00004          uri="string:${globals_view/navigationRootUrl|portal_url}",
00005          src="string:${globals_view/navigationRootUrl|portal_url}/kupucollection.xml",
00006          icon="string:${globals_view/navigationRootUrl|portal_url}/misc_/CMFPlone/plone_icon"),
00007     dict(id="current",
00008          title="string:Current folder",
00009          uri="string:${folder_url}",
00010          src="string:${folder_url}/kupucollection.xml",
00011          icon="string:${folder/getIcon}"),
00012     dict(id="myitems",
00013          title="string:My recent items",
00014          uri="string:${portal_url}/kupumyitems.xml",
00015          src="string:${portal_url}/kupumyitems.xml",
00016          icon="string:${portal_url}/kupuimages/kupusearch_icon.gif"),
00017     dict(id="recentitems",
00018          title="string:Recent items",
00019          uri="string:${portal_url}/kupurecentitems.xml",
00020          src="string:${portal_url}/kupurecentitems.xml",
00021          icon="string:${portal_url}/kupuimages/kupusearch_icon.gif")
00022     )

Definition at line 88 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.libs = tool.zmi_get_libraries()

Definition at line 164 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.LINKABLE_BLACKLIST
Initial value:
00001 (
00002     'ATBooleanCriterion',
00003     'ATCurrentAuthorCriterion',
00004     'ATDateCriteria',
00005     'ATDateRangeCriterion',
00006     'ATListCriterion',
00007     'ATPathCriterion',
00008     'ATPortalTypeCriterion',
00009     'ATReferenceCriterion',
00010     'ATRelativePathCriterion',
00011     'ATSelectionCriterion',
00012     'ATSimpleIntCriterion',
00013     'ATSimpleStringCriterion',
00014     'ATSortCriterion',
00015     'ChangeSet',
00016     'CMF Document',
00017     'CMF Event',
00018     'CMF Favorite',
00019     'CMF File',
00020     'CMF Image',
00021     'CMF Link',
00022     'CMF News Item',
00023     'Discussion Item',
00024     'Favorite',
00025     'Link',
00026     'TempFolder',
00027 )

Definition at line 16 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.LINKBYUID = False

Definition at line 113 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.linkbyuid = LINKBYUID,

Definition at line 189 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.mappings = tool.zmi_get_resourcetypes()

Definition at line 159 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.PARAGRAPH_STYLES
Initial value:
00001 (
00002     "Heading|h2",
00003     "Subheading|h3",
00004     "Literal|pre",
00005     "Discreet|p|discreet",
00006     "Pull-quote|div|pullquote",
00007     "Call-out|p|callout",
00008     "Highlight|span|visualHighlight",
00009     "Odd row|tr|odd",
00010     "Even row|tr|even",
00011     "Heading cell|th|",
00012 #    'Fancy|div|fancyClass',
00013 #    'Plain|div|plainClass',
00014 )

Definition at line 73 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.parastyles = PARAGRAPH_STYLES,

Definition at line 184 of file sample-kupu-customisation-policy.py.

list sample-kupu-customisation-policy.PREVIEW
Initial value:
00001 [ { 'portal_type': type,
00002     'expression': PREVIEW_EXPR % image,
00003     'normal': None,
00004     'scalefield': image.split('_',1)[0],
00005     'classes': '',
00006     'mediatype': 'image',
00007     }
00008             for (type, image) in tool.getPreviewable() ]

Definition at line 127 of file sample-kupu-customisation-policy.py.

string sample-kupu-customisation-policy.PREVIEW_EXPR = 'string:${object_url}/%s'

Definition at line 126 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.RESOURCES
Initial value:
00001 dict(
00002     linkable = ('blacklist', LINKABLE_BLACKLIST),
00003     mediaobject = ('whitelist', ('Image',)),
00004     collection = ('whitelist', ('Plone Site', 'Folder', 'Large Plone Folder')),
00005     containsanchors = ('whitelist', ('Document', 'News Item', 'Event')),
00006     )

Definition at line 43 of file sample-kupu-customisation-policy.py.

list sample-kupu-customisation-policy.STYLE_WHITELIST = ['text-align', 'list-style-type', 'float']

Definition at line 67 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.style_whitelist = STYLE_WHITELIST,

Definition at line 186 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.TABLE_CLASSNAMES = ('plain', 'listing', 'grid', 'data')

Definition at line 71 of file sample-kupu-customisation-policy.py.

sample-kupu-customisation-policy.table_classnames = TABLE_CLASSNAMES,

Definition at line 183 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.tool = getToolByName(context, 'kupu_library_tool')

Definition at line 116 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.types = tool.zmi_get_resourcetypes()

Definition at line 152 of file sample-kupu-customisation-policy.py.

tuple sample-kupu-customisation-policy.typetool = getToolByName(context, 'portal_types')

Definition at line 117 of file sample-kupu-customisation-policy.py.