src/pyams_content/component/paragraph/zmi/frame.py
changeset 555 8e8a14452567
parent 550 9658debb49a3
child 591 b694d5667d17
equal deleted inserted replaced
554:120ce09ade94 555:8e8a14452567
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.component.association.interfaces import IAssociationTarget
    19 from pyams_content.component.association.interfaces import IAssociationTarget
    20 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
    20 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
    21 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
    21 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer
    22     IParagraphRenderer
       
    23 from pyams_content.component.paragraph.interfaces.frame import IFrameParagraph, FRAME_PARAGRAPH_TYPE
    22 from pyams_content.component.paragraph.interfaces.frame import IFrameParagraph, FRAME_PARAGRAPH_TYPE
    24 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    23 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    25 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    24 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    26 from pyams_form.interfaces.form import IInnerForm
    25 from pyams_form.interfaces.form import IInnerForm
    27 from pyams_skin.interfaces.tinymce import ITinyMCEConfiguration
    26 from pyams_skin.interfaces.tinymce import ITinyMCEConfiguration
    36 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
    35 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
    37     BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_toolbar_refresh_event, \
    36     BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_toolbar_refresh_event, \
    38     IParagraphEditFormButtons
    37     IParagraphEditFormButtons
    39 from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable, \
    38 from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable, \
    40     ParagraphTitleToolbarViewletManager
    39     ParagraphTitleToolbarViewletManager
    41 from pyams_content.features.renderer.zmi import BaseRenderedContentRenderer
       
    42 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    40 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
    43 from pyams_pagelet.pagelet import pagelet_config
    41 from pyams_pagelet.pagelet import pagelet_config
    44 from pyams_skin.event import get_json_switched_table_refresh_event, get_json_widget_refresh_event
    42 from pyams_skin.event import get_json_switched_table_refresh_event, get_json_widget_refresh_event
    45 from pyams_utils.adapter import adapter_config, ContextRequestAdapter
    43 from pyams_utils.adapter import adapter_config, ContextRequestAdapter
    46 from pyams_utils.traversing import get_parent
    44 from pyams_utils.traversing import get_parent
   198         updated = changes.get(IFrameParagraph, ())
   196         updated = changes.get(IFrameParagraph, ())
   199         if 'renderer' in updated:
   197         if 'renderer' in updated:
   200             output.setdefault('events', []).append(
   198             output.setdefault('events', []).append(
   201                 get_json_widget_refresh_event(self.context, self.request, FrameParagraphInnerEditForm, 'renderer'))
   199                 get_json_widget_refresh_event(self.context, self.request, FrameParagraphInnerEditForm, 'renderer'))
   202         return output
   200         return output
   203 
       
   204 
       
   205 #
       
   206 # Framed text paragraph renderer
       
   207 #
       
   208 
       
   209 @adapter_config(context=(IFrameParagraph, IPyAMSLayer), provides=IParagraphRenderer)
       
   210 class FrameParagraphRenderer(BaseRenderedContentRenderer):
       
   211     """Framed text paragraph renderer"""