Fixing issue when sorting a new inserted speaker.
This commit is contained in:
parent
09840edc0c
commit
7d1b65429e
@ -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].
|
||||
|
@ -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}
|
||||
|
@ -82,7 +82,7 @@
|
||||
<!-- Next speakers -->
|
||||
<div ng-show="nextSpeakers.length > 0">
|
||||
<div ui-tree="treeOptions" data-empty-placeholder-enabled="false">
|
||||
<ol ui-tree-nodes="" ng-model="speakers">
|
||||
<ol ui-tree-nodes="" ng-model="nextSpeakers">
|
||||
<li ng-repeat="speaker in nextSpeakers | orderBy:'weight'" ui-tree-node>
|
||||
<i os-perms="agenda.can_manage" ui-tree-handle="" class="fa fa-arrows-v"></i>
|
||||
{{ $index + 1 }}.
|
||||
|
Loading…
Reference in New Issue
Block a user