From 7d1b65429e6c609ee0c4bc4c39122d1f2f811169 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Wed, 19 Apr 2017 16:06:14 +0200 Subject: [PATCH] Fixing issue when sorting a new inserted speaker. --- CHANGELOG | 1 + openslides/agenda/static/js/agenda/site.js | 6 ++---- .../agenda/list-of-speakers-partial-management.html | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 114b67412..7c78800a1 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 @@
-
    +
    1. {{ $index + 1 }}.