diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index bc8d124bf..fee49c0d3 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -354,6 +354,7 @@ angular.module('OpenSlidesApp.motions.site', [ // Service for generic motion form (create and update) .factory('MotionForm', [ + '$filter', 'gettextCatalog', 'operator', 'Editor', @@ -367,8 +368,8 @@ angular.module('OpenSlidesApp.motions.site', [ 'Workflow', 'Agenda', 'AgendaTree', - function (gettextCatalog, operator, Editor, MotionComment, Category, Config, Mediafile, MotionBlock, - Tag, User, Workflow, Agenda, AgendaTree) { + function ($filter, gettextCatalog, operator, Editor, MotionComment, Category, + Config, Mediafile, MotionBlock, Tag, User, Workflow, Agenda, AgendaTree) { return { // ngDialog for motion form getDialog: function (motion) { @@ -498,7 +499,7 @@ angular.module('OpenSlidesApp.motions.site', [ type: 'select-multiple', templateOptions: { label: gettextCatalog.getString('Attachment'), - options: Mediafile.getAll(), + options: $filter('orderBy')(Mediafile.getAll(), 'title_or_filename'), ngOptions: 'option.id as option.title_or_filename for option in to.options', placeholder: gettextCatalog.getString('Select or search an attachment ...') }, diff --git a/openslides/topics/static/js/topics/site.js b/openslides/topics/static/js/topics/site.js index ff4922aa8..cc50f5d30 100644 --- a/openslides/topics/static/js/topics/site.js +++ b/openslides/topics/static/js/topics/site.js @@ -61,13 +61,14 @@ angular.module('OpenSlidesApp.topics.site', ['OpenSlidesApp.topics', 'OpenSlides ]) .factory('TopicForm', [ + '$filter', 'gettextCatalog', 'operator', 'Editor', 'Mediafile', 'Agenda', 'AgendaTree', - function (gettextCatalog, operator, Editor, Mediafile, Agenda, AgendaTree) { + function ($filter, gettextCatalog, operator, Editor, Mediafile, Agenda, AgendaTree) { return { // ngDialog for topic form getDialog: function (topic) { @@ -110,7 +111,7 @@ angular.module('OpenSlidesApp.topics.site', ['OpenSlidesApp.topics', 'OpenSlides type: 'select-multiple', templateOptions: { label: gettextCatalog.getString('Attachment'), - options: Mediafile.getAll(), + options: $filter('orderBy')(Mediafile.getAll(), 'title_or_filename'), ngOptions: 'option.id as option.title_or_filename for option in to.options', placeholder: gettextCatalog.getString('Select or search an attachment ...') } diff --git a/openslides/topics/static/templates/topics/topic-detail.html b/openslides/topics/static/templates/topics/topic-detail.html index 024a48b7e..18e8fdef4 100644 --- a/openslides/topics/static/templates/topics/topic-detail.html +++ b/openslides/topics/static/templates/topics/topic-detail.html @@ -30,7 +30,7 @@

Attachments