Back to index

plone3  3.1.7
Public Member Functions
Archetypes.browser.widgets.TextareaWidget Class Reference
Inheritance diagram for Archetypes.browser.widgets.TextareaWidget:
Inheritance graph
Collaboration diagram for Archetypes.browser.widgets.TextareaWidget:
Collaboration graph

List of all members.

Public Member Functions

def getSelected
def lookupMime

Detailed Description

View used in Archetypes textarea widget.

Definition at line 120 of file

Member Function Documentation

def Archetypes.browser.widgets.TextareaWidget.getSelected (   self,

Definition at line 123 of file

00124     def getSelected(self, mimetypes, contenttype):
00125         # An object can have only one contenttype at a time and mimetypes
00126         # are limited to ASCII-only characters. We already assumed to get all
00127         # values in all lowercase, so we don't do any case-juggling.
00129         contenttype = MIMETYPES_MAPPING.get(contenttype, contenttype)
00131         if contenttype in mimetypes:
00132             return (contenttype, )
00134         return ()

Definition at line 135 of file

00136     def lookupMime(self, name):
00137         context = aq_inner(self.context)
00138         mimetool = context.mimetypes_registry
00139         mimetypes = mimetool.lookup(name)
00140         if len(mimetypes):
00141             return mimetypes[0].name()
00142         else:
00143             return name

Here is the call graph for this function:

The documentation for this class was generated from the following file: