diff --git a/CHANGELOG b/CHANGELOG index 4141b1dc9..c09242154 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ Version 2.2 (unreleased) Agenda: - Fixed wrong sorting of last speakers [#3193]. +- Fixed issue when sorting a new inserted speaker [#3210]. Motions: - New export dialog [#3185]. diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index d7698fd13..9d68f685a 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -563,10 +563,8 @@ angular.module('OpenSlidesApp.agenda.site', [ // save reordered list of speakers $scope.treeOptions = { dropped: function (event) { - var sortedSpeakers = []; - var nextSpeakers = $filter('filter')($scope.speakers, {'begin_time': null}); - angular.forEach(nextSpeakers, function (speaker) { - sortedSpeakers.push(speaker.id); + var sortedSpeakers = _.map($scope.nextSpeakers, function (speaker) { + return speaker.id; }); $http.post('/rest/agenda/item/' + $scope.item.id + '/sort_speakers/', {speakers: sortedSpeakers} diff --git a/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html b/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html index 71865f227..63f1859fc 100644 --- a/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html +++ b/openslides/agenda/static/templates/agenda/list-of-speakers-partial-management.html @@ -82,7 +82,7 @@