src/pyams_skin/interfaces/__init__.py
changeset 485 bd3550a252ea
parent 319 7ad85ca36f04
child 569 afbe3216c217
equal deleted inserted replaced
484:0424aeca91a3 485:bd3550a252ea
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
    13 __docformat__ = 'restructuredtext'
    14 
    14 
    15 # import standard library
    15 from zope.component.interfaces import IObjectEvent, ObjectEvent
       
    16 from zope.configuration.fields import GlobalInterface
       
    17 from zope.interface import implementer, invariant, Interface, Attribute, Invalid
       
    18 from zope.schema import Text, TextLine, Choice, Int, Bool
    16 
    19 
    17 # import interfaces
    20 from pyams_file.schema import FileField
    18 from pyams_skin.layer import IPyAMSLayer
    21 from pyams_skin.layer import IPyAMSLayer
    19 from zope.component.interfaces import IObjectEvent, ObjectEvent
       
    20 
       
    21 # import packages
       
    22 from pyams_template.template import layout_config
    22 from pyams_template.template import layout_config
    23 from zope.interface import implementer, invariant, Interface, Attribute, Invalid
       
    24 from zope.configuration.fields import GlobalInterface
       
    25 from zope.schema import Text, TextLine, Choice, Int, Bool
       
    26 
    23 
    27 from pyams_skin import _
    24 from pyams_skin import _
    28 
    25 
    29 
    26 
    30 class ISkin(Interface):
    27 class ISkin(Interface):
    77         if self.no_inherit_skin and not self.skin:
    74         if self.no_inherit_skin and not self.skin:
    78             raise Invalid(_("You must select a custom skin or inherit from parent!"))
    75             raise Invalid(_("You must select a custom skin or inherit from parent!"))
    79 
    76 
    80     def get_skin(self, request=None):
    77     def get_skin(self, request=None):
    81         """Get skin matching this content"""
    78         """Get skin matching this content"""
       
    79 
       
    80     custom_stylesheet = FileField(title=_("Custom stylesheet"),
       
    81                                   description=_("This custom stylesheet will be used to override selected theme styles"),
       
    82                                   required=False)
       
    83 
       
    84     editor_stylesheet = FileField(title=_("Editor stylesheet"),
       
    85                                   description=_("Styles defined into this stylesheet will be available into HTML editor"),
       
    86                                   required=False)
       
    87 
       
    88     custom_script = FileField(title=_("Custom script"),
       
    89                               description=_("This custom javascript file will be used to add dynamic features to "
       
    90                                             "selected theme"),
       
    91                               required=False)
    82 
    92 
    83 
    93 
    84 class IUserSkinnable(ISkinnable):
    94 class IUserSkinnable(ISkinnable):
    85     """User skinnable content interface"""
    95     """User skinnable content interface"""
    86 
    96