--- a/src/pyams_content/component/illustration/__init__.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/illustration/__init__.py Fri Sep 07 16:40:05 2018 +0200
@@ -15,21 +15,28 @@
# import standard library
+# import packages
+from persistent import Persistent
+from pyramid.events import subscriber
+from pyramid.threadlocal import get_current_registry
+from zope.container.contained import Contained
+from zope.interface import implementer, alsoProvides
+from zope.lifecycleevent import ObjectAddedEvent
+from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent
+from zope.location.interfaces import ISublocations
+from zope.schema.fieldproperty import FieldProperty
+from zope.traversing.interfaces import ITraversable
+
+from pyams_content import _
# import interfaces
from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationTarget, \
ILLUSTRATION_KEY, ILLUSTRATION_RENDERERS, IBasicIllustration, IBasicIllustrationTarget, BASIC_ILLUSTRATION_KEY, \
ILinkIllustrationTarget, LINK_ILLUSTRATION_KEY, ILinkIllustration
+from pyams_content.features.checker import BaseContentChecker
from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE
+from pyams_content.features.renderer import RenderedContentMixin, RenderersVocabulary
from pyams_file.interfaces import IFileInfo, IImage, IResponsiveImage
from pyams_i18n.interfaces import INegotiator, II18n, II18nManager
-from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent
-from zope.location.interfaces import ISublocations
-from zope.traversing.interfaces import ITraversable
-
-# import packages
-from persistent import Persistent
-from pyams_content.features.checker import BaseContentChecker
-from pyams_content.features.renderer import RenderedContentMixin, RenderersVocabulary
from pyams_i18n.property import I18nFileProperty
from pyams_utils.adapter import adapter_config, ContextAdapter, get_annotation_adapter
from pyams_utils.factory import factory_config
@@ -37,14 +44,6 @@
from pyams_utils.request import check_request
from pyams_utils.traversing import get_parent
from pyams_utils.vocabulary import vocabulary_config
-from pyramid.events import subscriber
-from pyramid.threadlocal import get_current_registry
-from zope.container.contained import Contained
-from zope.interface import implementer, alsoProvides
-from zope.lifecycleevent import ObjectCreatedEvent, ObjectAddedEvent
-from zope.schema.fieldproperty import FieldProperty
-
-from pyams_content import _
@implementer(IBasicIllustration)
--- a/src/pyams_content/component/illustration/interfaces/__init__.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/illustration/interfaces/__init__.py Fri Sep 07 16:40:05 2018 +0200
@@ -15,18 +15,16 @@
# import standard library
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IBaseParagraph
-from pyams_content.features.renderer.interfaces import IRenderedContent
-from pyams_i18n.schema import I18nTextLineField, I18nTextField, I18nThumbnailMediaField
from zope.annotation.interfaces import IAttributeAnnotatable
-
# import packages
from zope.interface import Interface
from zope.schema import Choice, TextLine
from pyams_content import _
-
+# import interfaces
+from pyams_content.component.paragraph.interfaces import IBaseParagraph
+from pyams_content.features.renderer.interfaces import IRenderedContent
+from pyams_i18n.schema import I18nTextLineField, I18nTextField, I18nThumbnailMediaField
#
# Illustration
--- a/src/pyams_content/component/paragraph/interfaces/milestone.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/paragraph/interfaces/milestone.py Fri Sep 07 16:40:05 2018 +0200
@@ -15,19 +15,17 @@
# import standard library
-# import interfaces
-from pyams_content.component.paragraph import IBaseParagraph
-from pyams_content.interfaces.container import IOrderedContainer
from zope.annotation.interfaces import IAttributeAnnotatable
-
-# import packages
-from pyams_i18n.schema import I18nTextLineField, I18nTextField
from zope.container.constraints import containers, contains
from zope.interface import Interface
from zope.schema import Bool, Choice
from pyams_content import _
-
+# import interfaces
+from pyams_content.component.paragraph import IBaseParagraph
+from pyams_content.interfaces.container import IOrderedContainer
+# import packages
+from pyams_i18n.schema import I18nTextLineField, I18nTextField
MILESTONE_CONTAINER_KEY = 'pyams_content.milestones'
@@ -81,8 +79,8 @@
"""Milestones paragraph interface"""
body = I18nTextField(title=_("Associated text"),
- description=_("Additional text associated to this milestone Paragraph"),
- required=False)
+ description=_("Additional text associated to this milestone Paragraph"),
+ required=False)
renderer = Choice(title=_("Milestones template"),
description=_("Presentation template used for milestones"),
--- a/src/pyams_content/component/paragraph/milestone.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/paragraph/milestone.py Fri Sep 07 16:40:05 2018 +0200
@@ -15,40 +15,38 @@
# import standard library
from persistent import Persistent
+from pyramid.events import subscriber
+from zope.container.contained import Contained
+from zope.container.ordered import OrderedContainer
+from zope.interface import implementer
+from zope.lifecycleevent import ObjectModifiedEvent
+from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent, IObjectRemovedEvent
+from zope.location import locate
+from zope.location.interfaces import ISublocations
+from zope.schema.fieldproperty import FieldProperty
+from zope.traversing.interfaces import ITraversable
+# import interfaces
+from pyams_catalog.utils import index_object
+from pyams_content import _
+from pyams_content.component.paragraph import BaseParagraph, BaseParagraphFactory, BaseParagraphContentChecker
# import packages
from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
IParagraphFactory
from pyams_content.component.paragraph.interfaces.milestone import IMilestone, IMilestoneContainer, \
IMilestoneContainerTarget, MILESTONE_CONTAINER_KEY, IMilestoneParagraph, MILESTONE_PARAGRAPH_TYPE, \
MILESTONE_PARAGRAPH_RENDERERS, MILESTONE_PARAGRAPH_NAME
+from pyams_content.features.checker import BaseContentChecker
from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE, ERROR_VALUE
+from pyams_content.features.renderer import RenderersVocabulary
from pyams_form.interfaces.form import IFormContextPermissionChecker
from pyams_i18n.interfaces import II18n, II18nManager, INegotiator
-from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent, IObjectRemovedEvent
-from zope.location.interfaces import ISublocations
-from zope.traversing.interfaces import ITraversable
-
-# import interfaces
-from pyams_catalog.utils import index_object
-from pyams_content.component.paragraph import BaseParagraph, BaseParagraphFactory, BaseParagraphContentChecker
-from pyams_content.features.checker import BaseContentChecker
-from pyams_content.features.renderer import RenderersVocabulary
from pyams_utils.adapter import adapter_config, ContextAdapter, get_annotation_adapter
from pyams_utils.factory import factory_config
from pyams_utils.registry import get_current_registry, get_utility, utility_config
from pyams_utils.request import check_request
from pyams_utils.traversing import get_parent
from pyams_utils.vocabulary import vocabulary_config
-from pyramid.events import subscriber
-from zope.container.contained import Contained
-from zope.container.ordered import OrderedContainer
-from zope.interface import implementer
-from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
-from zope.location import locate
-from zope.schema.fieldproperty import FieldProperty
-
-from pyams_content import _
#
@@ -220,6 +218,7 @@
icon_class = 'fa-arrows-h'
icon_hint = MILESTONE_PARAGRAPH_NAME
+
body = FieldProperty(IMilestoneParagraph['body'])
renderer = FieldProperty(IMilestoneParagraph['renderer'])
--- a/src/pyams_content/component/paragraph/verbatim.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/paragraph/verbatim.py Fri Sep 07 16:40:05 2018 +0200
@@ -15,24 +15,24 @@
# import standard library
+from zope.interface import implementer
+from zope.schema.fieldproperty import FieldProperty
+
# import interfaces
-from pyams_content.component.illustration.interfaces import IIllustrationTarget, IBasicIllustrationTarget
+from pyams_content.component.illustration.interfaces import IBasicIllustrationTarget
+# import packages
+from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker, BaseParagraphFactory
from pyams_content.component.paragraph.interfaces import IParagraphFactory
from pyams_content.component.paragraph.interfaces.verbatim import IVerbatimParagraph, VERBATIM_PARAGRAPH_TYPE, \
VERBATIM_PARAGRAPH_RENDERERS, VERBATIM_PARAGRAPH_NAME
from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE
+from pyams_content.features.renderer import RenderersVocabulary
from pyams_i18n.interfaces import II18n, II18nManager, INegotiator
-
-# import packages
-from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker, BaseParagraphFactory
-from pyams_content.features.renderer import RenderersVocabulary
from pyams_utils.adapter import adapter_config
from pyams_utils.factory import factory_config
from pyams_utils.registry import utility_config, get_utility
from pyams_utils.traversing import get_parent
from pyams_utils.vocabulary import vocabulary_config
-from zope.interface import implementer
-from zope.schema.fieldproperty import FieldProperty
#
--- a/src/pyams_content/component/paragraph/zmi/milestone.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/milestone.py Fri Sep 07 16:40:05 2018 +0200
@@ -16,34 +16,41 @@
# import standard library
import json
+from pyramid.decorator import reify
+from pyramid.view import view_config
+from z3c.form import field, button
+from z3c.form.interfaces import INPUT_MODE
+from z3c.table.column import GetAttrColumn
+from z3c.table.interfaces import IValues, IColumn
+from zope.interface import implementer, Interface
+from zope.schema.vocabulary import getVocabularyRegistry
+
+from pyams_content import _
# import interfaces
from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
PARAGRAPH_HIDDEN_FIELDS
from pyams_content.component.paragraph.interfaces.milestone import MILESTONE_PARAGRAPH_TYPE, IMilestoneParagraph, \
IMilestoneContainer, IMilestoneContainerTarget, IMilestone
-from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
-from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
-from pyams_content.shared.common import IWfSharedContent
-from pyams_form.interfaces.form import IInnerForm, IInnerSubForm
-from pyams_i18n.interfaces import II18n
-from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
-from pyams_skin.layer import IPyAMSLayer
-from z3c.form.interfaces import INPUT_MODE
-from z3c.table.interfaces import IValues, IColumn
-
# import packages
from pyams_content.component.paragraph.milestone import MilestoneParagraph, Milestone
from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
+from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
+from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_content.shared.common import IWfSharedContent
from pyams_form.form import AJAXAddForm, ajax_config
+from pyams_form.interfaces.form import IInnerForm, IInnerSubForm
from pyams_form.security import ProtectedFormObjectMixin
from pyams_i18n.column import I18nAttrColumn
+from pyams_i18n.interfaces import II18n
from pyams_pagelet.pagelet import pagelet_config
from pyams_skin.container import switch_element_visibility
from pyams_skin.event import get_json_switched_table_refresh_event, get_json_table_row_refresh_event, \
get_json_widget_refresh_event
+from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
+from pyams_skin.layer import IPyAMSLayer
from pyams_skin.table import BaseTable, SorterColumn, I18nColumn, TrashColumn, VisibilitySwitcherColumn
from pyams_skin.viewlet.toolbar import ToolbarAction
from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
@@ -52,14 +59,6 @@
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
from pyams_zmi.zmi.table import InnerTableView
-from pyramid.decorator import reify
-from pyramid.view import view_config
-from z3c.form import field, button
-from z3c.table.column import GetAttrColumn
-from zope.interface import implementer, Interface
-from zope.schema.vocabulary import getVocabularyRegistry
-
-from pyams_content import _
class IMilestonesView(Interface):
--- a/src/pyams_content/component/paragraph/zmi/pictogram.py Thu Sep 06 18:10:04 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/pictogram.py Fri Sep 07 16:40:05 2018 +0200
@@ -16,38 +16,44 @@
# import standard library
import json
+from pyramid.decorator import reify
+from pyramid.events import subscriber
+from pyramid.view import view_config
+from z3c.form import field, button
+from z3c.form.interfaces import INPUT_MODE, IDataExtractedEvent
+from z3c.table.column import GetAttrColumn
+from z3c.table.interfaces import IValues, IColumn
+from zope.interface import implementer, Interface, Invalid
+
+from pyams_content import _
+# import packages
+from pyams_content.component.paragraph import BaseParagraph
# import interfaces
from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
PARAGRAPH_HIDDEN_FIELDS
from pyams_content.component.paragraph.interfaces.pictogram import PICTOGRAM_PARAGRAPH_TYPE, IPictogramParagraph, \
IPictogramContainer, IPictogramContainerTarget, IPictogramItem
-from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
-from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
-from pyams_content.shared.common import IWfSharedContent
-from pyams_form.interfaces.form import IInnerForm, IInnerSubForm
-from pyams_i18n.interfaces import II18n
-from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
-from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from z3c.form.interfaces import INPUT_MODE, IDataExtractedEvent
-from z3c.table.interfaces import IValues, IColumn
-
-# import packages
-from pyams_content.component.paragraph import BaseParagraph
from pyams_content.component.paragraph.pictogram import PictogramParagraph, PictogramItem
from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
+from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
+from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
from pyams_content.reference.pictograms.zmi.widget import PictogramSelectFieldWidget
+from pyams_content.shared.common import IWfSharedContent
from pyams_file.zmi.image import render_image
from pyams_form.form import AJAXAddForm, ajax_config
+from pyams_form.interfaces.form import IInnerForm, IInnerSubForm
from pyams_form.security import ProtectedFormObjectMixin
from pyams_i18n.column import I18nAttrColumn
+from pyams_i18n.interfaces import II18n
from pyams_pagelet.pagelet import pagelet_config
from pyams_skin.container import switch_element_visibility
from pyams_skin.event import get_json_widget_refresh_event, get_json_switched_table_refresh_event, \
get_json_table_row_refresh_event
+from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
+from pyams_skin.layer import IPyAMSLayer
from pyams_skin.table import BaseTable, SorterColumn, I18nColumn, TrashColumn, VisibilitySwitcherColumn
from pyams_skin.viewlet.toolbar import ToolbarAction
from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
@@ -56,15 +62,8 @@
from pyams_utils.url import absolute_url
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
+from pyams_zmi.interfaces import IPropertiesEditForm
from pyams_zmi.zmi.table import InnerTableView
-from pyramid.decorator import reify
-from pyramid.events import subscriber
-from pyramid.view import view_config
-from z3c.form import field, button
-from z3c.table.column import GetAttrColumn
-from zope.interface import implementer, alsoProvides, Interface, Invalid
-
-from pyams_content import _
class IPictogramsView(Interface):