# HG changeset patch # User Thierry Florac # Date 1527692160 -7200 # Node ID b2e79295caecb87ee1f2780474fa3ec40f4e8cf3 # Parent 196121e4a6f45a63b60faf657ef14ddd35a707c0 Updated fields order diff -r 196121e4a6f4 -r b2e79295caec src/pyams_content/component/extfile/__init__.py --- a/src/pyams_content/component/extfile/__init__.py Wed May 30 16:27:07 2018 +0200 +++ b/src/pyams_content/component/extfile/__init__.py Wed May 30 16:56:00 2018 +0200 @@ -222,8 +222,6 @@ icon_class = 'fa-file-image-o' icon_hint = _("Image") - title = FieldProperty(IExtMedia['title']) - alt_title = FieldProperty(IExtImage['alt_title']) _data = I18nFileProperty(IExtImage['data']) @property @@ -254,7 +252,6 @@ icon_class = 'fa-file-video-o' icon_hint = _("Video") - title = FieldProperty(IExtMedia['title']) data = I18nFileProperty(IExtVideo['data']) register_file_factory('video', ExtVideo, _("Video")) @@ -274,7 +271,6 @@ icon_class = 'fa-file-audio-o' icon_hint = _("Audio file") - title = FieldProperty(IExtMedia['title']) data = I18nFileProperty(IExtAudio['data']) register_file_factory('audio', ExtAudio, _("Audio file")) diff -r 196121e4a6f4 -r b2e79295caec src/pyams_content/component/extfile/interfaces/__init__.py --- a/src/pyams_content/component/extfile/interfaces/__init__.py Wed May 30 16:27:07 2018 +0200 +++ b/src/pyams_content/component/extfile/interfaces/__init__.py Wed May 30 16:56:00 2018 +0200 @@ -33,7 +33,7 @@ class IBaseExtFile(IAssociationItem): """Base external file interface""" - title = I18nTextLineField(title=_("Title"), + title = I18nTextLineField(title=_("Alternate title"), description=_("File title, as shown in front-office"), required=False) @@ -70,14 +70,6 @@ class IExtImage(IExtMedia): """External image file interface""" - title = I18nTextLineField(title=_("Legend"), - description=_("File legend, as shown in front-office"), - required=False) - - alt_title = I18nTextLineField(title=_("Accessibility title"), - description=_("Alternate title used to describe image content"), - required=False) - data = I18nThumbnailImageField(title=_("Image data"), description=_("Image content"), required=True) diff -r 196121e4a6f4 -r b2e79295caec src/pyams_content/component/extfile/zmi/__init__.py --- a/src/pyams_content/component/extfile/zmi/__init__.py Wed May 30 16:27:07 2018 +0200 +++ b/src/pyams_content/component/extfile/zmi/__init__.py Wed May 30 16:56:00 2018 +0200 @@ -101,7 +101,7 @@ legend = _("Add new external file") icon_css_class = 'fa fa-fw fa-file-text-o' - fields = field.Fields(IExtFile).select('title', 'description', 'author', 'language', 'data', 'filename') + fields = field.Fields(IExtFile).select('data', 'filename', 'title', 'description', 'author', 'language') ajax_handler = 'add-extfile.json' edit_permission = MANAGE_CONTENT_PERMISSION @@ -142,7 +142,7 @@ icon_css_class = 'fa fa-fw fa-file-text-o' dialog_class = 'modal-large' - fields = field.Fields(IExtFile).select('title', 'description', 'author', 'language', 'data', 'filename') + fields = field.Fields(IExtFile).select('data', 'filename', 'title', 'description', 'author', 'language') ajax_handler = 'properties.json' edit_permission = MANAGE_CONTENT_PERMISSION @@ -208,8 +208,7 @@ legend = _("Add new image") icon_css_class = 'fa fa-fw fa-file-image-o' - fields = field.Fields(IExtImage).select('title', 'alt_title', 'description', 'author', - 'language', 'data', 'filename') + fields = field.Fields(IExtImage).select('data', 'filename', 'title', 'description', 'author') ajax_handler = 'add-extimage.json' def updateWidgets(self, prefix=None): @@ -245,8 +244,7 @@ legend = _("Update image properties") icon_css_class = 'fa fa-fw fa-file-image-o' - fields = field.Fields(IExtImage).select('title', 'alt_title', 'description', 'author', - 'language', 'data', 'filename') + fields = field.Fields(IExtImage).select('data', 'filename', 'title', 'description', 'author') def updateWidgets(self, prefix=None): super(ExtImagePropertiesEditForm, self).updateWidgets(prefix) @@ -312,7 +310,7 @@ legend = _("Add new video") icon_css_class = 'fa fa-fw fa-file-video-o' - fields = field.Fields(IExtVideo).select('title', 'description', 'author', 'language', 'data', 'filename') + fields = field.Fields(IExtVideo).select('data', 'filename', 'title', 'description', 'author', 'language') ajax_handler = 'add-extvideo.json' def create(self, data): @@ -341,7 +339,7 @@ legend = _("Update video properties") icon_css_class = 'fa fa-fw fa-file-video-o' - fields = field.Fields(IExtVideo).select('title', 'description', 'author', 'language', 'data', 'filename') + fields = field.Fields(IExtVideo).select('data', 'filename', 'title', 'description', 'author', 'language') @view_config(name='properties.json', context=IExtVideo, request_type=IPyAMSLayer, @@ -400,7 +398,7 @@ legend = _("Add new audio file") icon_css_class = 'fa fa-fw fa-file-audio-o' - fields = field.Fields(IExtAudio).select('title', 'description', 'author', 'language', 'data', 'filename') + fields = field.Fields(IExtAudio).select('data', 'filename', 'title', 'description', 'author', 'language') ajax_handler = 'add-extaudio.json' def create(self, data): @@ -429,7 +427,7 @@ legend = _("Update audio file properties") icon_css_class = 'fa fa-fw fa-file-audio-o' - fields = field.Fields(IExtAudio).select('title', 'description', 'author', 'language', 'data', 'filename') + fields = field.Fields(IExtAudio).select('data', 'filename', 'title', 'description', 'author', 'language') @view_config(name='properties.json', context=IExtAudio, request_type=IPyAMSLayer,