Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
archetypes.kss.fields.ATFieldDecoratorView Class Reference
Inheritance diagram for archetypes.kss.fields.ATFieldDecoratorView:
Inheritance graph
[legend]
Collaboration diagram for archetypes.kss.fields.ATFieldDecoratorView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getKssUIDClass
def getKssClasses
def getKssClassesInlineEditable

Private Member Functions

def _global_kss_inline_editable

Detailed Description

Definition at line 310 of file fields.py.


Member Function Documentation

Definition at line 320 of file fields.py.

00320 
00321     def _global_kss_inline_editable(self):
00322         inline_editing = queryMultiAdapter((self.context, self.request),
00323                                            IInlineEditingEnabled)
00324         if inline_editing is None:
00325             return False
00326         return inline_editing()

Here is the call graph for this function:

Here is the caller graph for this function:

def archetypes.kss.fields.ATFieldDecoratorView.getKssClasses (   self,
  fieldname,
  templateId = None,
  macro = None,
  target = None 
)

Definition at line 327 of file fields.py.

00327 
00328     def getKssClasses(self, fieldname, templateId=None, macro=None, target=None):
00329         context = aq_inner(self.context)
00330         field = context.getField(fieldname)
00331         # field can be None when widgets are used without fields
00332         # check whether field is valid
00333         if field is not None and field.writeable(context):
00334             classstring = ' kssattr-atfieldname-%s' % fieldname
00335             if templateId is not None:
00336                 classstring += ' kssattr-templateId-%s' % templateId
00337             if macro is not None:
00338                 classstring += ' kssattr-macro-%s' % macro
00339             if target is not None:
00340                 classstring += ' kssattr-target-%s' % target
00341             # XXX commented out to avoid macro showing up twice
00342             # not removed since it might be needed in a use case I forgot about
00343             # __gotcha
00344             #else:
00345             #    classstring += ' kssattr-macro-%s-field-view' % fieldname
00346         else:
00347             classstring = ''
00348         return classstring
    

Here is the call graph for this function:

Here is the caller graph for this function:

def archetypes.kss.fields.ATFieldDecoratorView.getKssClassesInlineEditable (   self,
  fieldname,
  templateId,
  macro = None,
  target = None 
)

Definition at line 349 of file fields.py.

00349 
00350     def getKssClassesInlineEditable(self, fieldname, templateId, macro=None, target=None):
00351         classstring = self.getKssClasses(fieldname, templateId, macro, target)
00352         global_kss_inline_editable = self._global_kss_inline_editable()
00353         if global_kss_inline_editable and classstring:
00354             classstring += ' inlineEditable'
00355         return classstring

Here is the call graph for this function:

This method generates a class-name from the current context UID.

Definition at line 312 of file fields.py.

00312 
00313     def getKssUIDClass(self):
00314         """
00315         This method generates a class-name from the current context UID.
00316         """
00317         uid = aq_inner(self.context).UID()
00318         
00319         return "kssattr-atuid-%s" % uid

Here is the call graph for this function:


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