src/pyams_content/component/illustration/zmi/paragraph.py
changeset 555 8e8a14452567
parent 550 9658debb49a3
child 591 b694d5667d17
equal deleted inserted replaced
554:120ce09ade94 555:8e8a14452567
    15 
    15 
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, \
    19 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, \
    20     IParagraphContainer, IParagraphRenderer
    20     IParagraphContainer
    21 from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationParagraph, \
    21 from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationParagraph, \
    22     ILLUSTRATION_PARAGRAPH_TYPE
    22     ILLUSTRATION_PARAGRAPH_TYPE
    23 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    23 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    24 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    24 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    25 from pyams_form.interfaces.form import IInnerForm
    25 from pyams_form.interfaces.form import IInnerForm
    30 
    30 
    31 # import packages
    31 # import packages
    32 from pyams_content.component.illustration.paragraph import Illustration
    32 from pyams_content.component.illustration.paragraph import Illustration
    33 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
    33 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
    34     BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_refresh_event, IParagraphEditFormButtons
    34     BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_refresh_event, IParagraphEditFormButtons
    35 from pyams_content.features.renderer.zmi import BaseRenderedContentRenderer
       
    36 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    35 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    37 from pyams_pagelet.pagelet import pagelet_config
    36 from pyams_pagelet.pagelet import pagelet_config
    38 from pyams_skin.event import get_json_form_refresh_event
    37 from pyams_skin.event import get_json_form_refresh_event
    39 from pyams_utils.adapter import adapter_config
    38 from pyams_utils.adapter import adapter_config
    40 from pyams_viewlet.viewlet import viewlet_config
    39 from pyams_viewlet.viewlet import viewlet_config
   160             # we have to commit transaction to be able to handle blobs...
   159             # we have to commit transaction to be able to handle blobs...
   161             ITransactionManager(self.context).get().commit()
   160             ITransactionManager(self.context).get().commit()
   162             output.setdefault('events', []).append(get_json_form_refresh_event(self.context, self.request,
   161             output.setdefault('events', []).append(get_json_form_refresh_event(self.context, self.request,
   163                                                                                IllustrationInnerEditForm))
   162                                                                                IllustrationInnerEditForm))
   164         return output
   163         return output
   165 
       
   166 
       
   167 #
       
   168 # Illustration renderer
       
   169 #
       
   170 
       
   171 @adapter_config(context=(IIllustrationParagraph, IPyAMSLayer), provides=IParagraphRenderer)
       
   172 class IllustrationRenderer(BaseRenderedContentRenderer):
       
   173     """Illustration renderer"""