Removed custom size column
authorThierry Florac <thierry.florac@onf.fr>
Thu, 19 Jul 2018 17:14:24 +0200
changeset 866 62633f571e53
parent 865 bddcf038737f
child 867 17c1149151aa
Removed custom size column
src/pyams_content/features/menu/zmi/__init__.py
--- a/src/pyams_content/features/menu/zmi/__init__.py	Thu Jul 19 16:46:15 2018 +0200
+++ b/src/pyams_content/features/menu/zmi/__init__.py	Thu Jul 19 17:14:24 2018 +0200
@@ -17,8 +17,6 @@
 import json
 
 # import interfaces
-from pyams_content.component.links.zmi import InternalLinkAddMenu, InternalLinkAddForm, InternalLinkPropertiesEditForm, \
-    ExternalLinkAddMenu, ExternalLinkAddForm, ExternalLinkPropertiesEditForm
 from pyams_content.features.menu import IMenusContainer, IMenu, Menu, IMenuLink
 from pyams_content.features.menu.interfaces import IMenusContainerTarget, IMenuLinksContainer, IMenuInternalLink, \
     IMenuExternalLink, IMenuLinksContainerTarget
@@ -33,15 +31,17 @@
 
 # import packages
 from pyams_content.component.association.zmi import AssociationsTable, AssociationsTablePublicNameColumn
+from pyams_content.component.links.zmi import \
+    InternalLinkAddMenu, InternalLinkAddForm, InternalLinkPropertiesEditForm, \
+    ExternalLinkAddMenu, ExternalLinkAddForm, ExternalLinkPropertiesEditForm
 from pyams_form.form import ajax_config, AJAXAddForm, AJAXEditForm
 from pyams_i18n.column import I18nAttrColumn
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.container import switch_element_visibility, delete_container_element
 from pyams_skin.event import get_json_switched_table_refresh_event, get_json_table_row_refresh_event
-from pyams_skin.table import BaseTable, SorterColumn, VisibilitySwitcherColumn, I18nColumn, TrashColumn, NameColumn, \
-    get_table_id
+from pyams_skin.table import BaseTable, SorterColumn, VisibilitySwitcherColumn, I18nColumn, TrashColumn, get_table_id
 from pyams_skin.viewlet.toolbar import ToolbarAction
-from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter, ContextAdapter, NullAdapter
+from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter, ContextAdapter
 from pyams_utils.traversing import get_parent
 from pyams_utils.url import absolute_url
 from pyams_viewlet.viewlet import viewlet_config
@@ -487,13 +487,3 @@
     """Menu external link properties edit form"""
 
     edit_permission = None  # managed by IFormContextPermissionChecker adapter
-
-
-#
-# Custom adapters
-#
-
-@adapter_config(name='size', context=(IMenu, IPyAMSLayer, MenuLinksTable), provides=IColumn)
-@adapter_config(name='size', context=(IMenuLinksContainerTarget, IPyAMSLayer, LinksTable), provides=IColumn)
-class MenuLinksTableSizeColumn(NullAdapter):
-    """Menu links table size column"""