Back to index

plone3  3.1.7
z3interfaces.py
Go to the documentation of this file.
00001 """Kupu z3 interfaces.
00002 
00003 $Id: z3interfaces.py$
00004 """
00005 
00006 try:
00007     from zope.interface import Interface
00008 except ImportError:
00009     class Interface:
00010         """A dummy interface base class"""
00011 
00012 class IPloneKupuLibraryTool(Interface):
00013     def getLinkbyuid():
00014         """Returns 'is linking by UID enabled'?"""
00015 
00016     def getRefBrowser():
00017         """Returns True if kupu_references is in all skin layers"""
00018 
00019     def getCaptioning():
00020         """Returns True if captioning is enabled"""
00021 
00022     def getTableClassnames():
00023         """Return a list of classnames supported in tables"""
00024 
00025     def getParagraphStyles():
00026         """Return a list of classnames supported by paragraphs"""
00027 
00028     def getStyleList(field=None):
00029         """Return the styles for a field."""
00030 
00031     def filterToolbar(context, field=None):
00032         """Return a filter helper for toolbar elements.
00033         Attributes on the helper class are True if an element is enabled."""
00034 
00035     def getHtmlExclusions():
00036         """Returns the list of html exclusions"""
00037 
00038     def getStyleWhitelist():
00039         """Returns the style whitelist"""
00040 
00041     def getClassBlacklist():
00042         """Returns the class blacklist"""
00043 
00044     def getDefaultResource():
00045         """Returns the name of the default resource type (e.g. linkable)"""
00046 
00047     def installBeforeUnload():
00048         """Should kupu load its own unload handler? Default: False"""
00049 
00050     def getFiltersourceedit(self):
00051         """Should kupu clean up html in source editor? Default: True"""
00052 
00053     def isKupuEnabled(useragent='', allowAnonymous=False, REQUEST=None, context=None, fieldName=None):
00054         """Is kupu enabled for this combination of client browser, permissions, and field."""
00055 
00056     def getWysiwygmacros():
00057         """Find the appropriate template to use for the kupu widget"""
00058 
00059     def forcekupu_url(self, fieldName):
00060         """Generate the url used to force or suppress kupu"""
00061 
00062     def query_string(self, replace={}, original=None):
00063         """ Updates 'original' dictionary by the values in the 'replace'
00064             dictionary and returns the result as url quoted query string.
00065 
00066             The 'original' dictionary defaults to 'REQUEST.form' if no
00067             parameter is passed to it. Keys in the 'replace' dictionary
00068             with a value of 'None' (or _.None in DTML) will be deleted
00069             from 'original' dictionary before being quoted.
00070 
00071             The original 'REQUEST.form' will remain unchanged.
00072         """
00073 
00074     def url_plus_query(url, query=None):
00075         """Adds query segment to an existing URL.
00076         Existing query parameters are may be overridden by query,
00077         otherwise they are preserved.
00078         """
00079 
00080     def kupuUrl(url, query=None):
00081         """Generate a url which includes resource_type and instance"""
00082         
00083     def getCookedLibraries(context):
00084         """Return a list of libraries with our own parameters included"""
00085 
00086     def getPreviewForType(portal_type):
00087         """Get the preview url for a specific type"""
00088 
00089     def getNormalViewForType(portal_type):
00090         """Get the normal view url for a specific type"""
00091 
00092     def getScaleFieldForType(portal_type):
00093         """Get the name of the field containing a scalable image"""
00094 
00095     def getClassesForType(portal_type):
00096         """Get a sequence of classes that may be applied"""
00097 
00098     def getMediaForType(portal_type):
00099         """Gets the media type image/flash"""
00100 
00101     def configure_kupu(
00102         linkbyuid, table_classnames, html_exclusions, style_whitelist, class_blacklist,
00103         installBeforeUnload=None, parastyles=None, refbrowser=None,
00104         captioning=None,
00105         filterSourceEdit=None,
00106         REQUEST=None):
00107         """Modify kupu's configuration settings"""