equal
deleted
inserted
replaced
15 |
15 |
16 # import standard library |
16 # import standard library |
17 import json |
17 import json |
18 |
18 |
19 # import interfaces |
19 # import interfaces |
20 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \ |
20 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer |
21 IParagraphRenderer |
|
22 from pyams_content.component.paragraph.interfaces.pictogram import PICTOGRAM_PARAGRAPH_TYPE, IPictogramParagraph, \ |
21 from pyams_content.component.paragraph.interfaces.pictogram import PICTOGRAM_PARAGRAPH_TYPE, IPictogramParagraph, \ |
23 IPictogramContainer, IPictogramContainerTarget, IPictogramItem |
22 IPictogramContainer, IPictogramContainerTarget, IPictogramItem |
24 from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons |
23 from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons |
25 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor |
24 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor |
26 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION |
25 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION |
36 # import packages |
35 # import packages |
37 from pyams_content.component.paragraph import BaseParagraph |
36 from pyams_content.component.paragraph import BaseParagraph |
38 from pyams_content.component.paragraph.pictogram import PictogramParagraph, PictogramItem |
37 from pyams_content.component.paragraph.pictogram import PictogramParagraph, PictogramItem |
39 from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \ |
38 from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \ |
40 BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm |
39 BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm |
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_form.form import AJAXAddForm, AJAXEditForm |
41 from pyams_form.form import AJAXAddForm, AJAXEditForm |
44 from pyams_form.security import ProtectedFormObjectMixin |
42 from pyams_form.security import ProtectedFormObjectMixin |
45 from pyams_i18n.column import I18nAttrColumn |
43 from pyams_i18n.column import I18nAttrColumn |
46 from pyams_pagelet.pagelet import pagelet_config |
44 from pyams_pagelet.pagelet import pagelet_config |
166 get_json_widget_refresh_event(self.context, self.request, PictogramParagraphInnerEditForm, 'renderer')) |
164 get_json_widget_refresh_event(self.context, self.request, PictogramParagraphInnerEditForm, 'renderer')) |
167 return output |
165 return output |
168 |
166 |
169 |
167 |
170 # |
168 # |
171 # Pictogram paragraph renderer |
|
172 # |
|
173 |
|
174 @adapter_config(context=(IPictogramParagraph, IPyAMSLayer), provides=IParagraphRenderer) |
|
175 class PictogramParagraphRenderer(BaseRenderedContentRenderer): |
|
176 """Pictogram paragraph renderer""" |
|
177 |
|
178 |
|
179 # |
|
180 # Pictogram items table view |
169 # Pictogram items table view |
181 # |
170 # |
182 |
171 |
183 class PictogramsTable(ProtectedFormObjectMixin, BaseTable): |
172 class PictogramsTable(ProtectedFormObjectMixin, BaseTable): |
184 """Pictograms view inner table""" |
173 """Pictograms view inner table""" |