--- a/src/pyams_content/component/illustration/zmi/paragraph.py Mon Oct 02 15:24:08 2017 +0200
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py Mon Oct 02 17:03:26 2017 +0200
@@ -31,11 +31,10 @@
# import packages
from pyams_content.component.illustration.paragraph import Illustration
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+ BaseParagraphAddMenu
from pyams_content.component.paragraph.zmi.container import ParagraphContainerView
-from pyams_form.security import ProtectedFormObjectMixin
from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.viewlet.toolbar import ToolbarMenuItem
from pyams_utils.adapter import adapter_config
from pyams_utils.traversing import get_parent
from pyams_viewlet.viewlet import viewlet_config, BaseContentProvider
@@ -53,13 +52,13 @@
@viewlet_config(name='add-illustration.menu', context=IParagraphContainerTarget, view=ParagraphContainerView,
layer=IPyAMSLayer, manager=IToolbarAddingMenu, weight=60)
-class IllustrationAddMenu(ProtectedFormObjectMixin, ToolbarMenuItem):
+class IllustrationAddMenu(BaseParagraphAddMenu):
"""Illustration add menu"""
label = _("Add illustration...")
label_css_class = 'fa fa-fw fa-file-image-o'
url = 'add-illustration.html'
- modal_target = True
+ paragraph_type = 'Illustration'
@pagelet_config(name='add-illustration.html', context=IParagraphContainerTarget, layer=IPyAMSLayer,