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:
|
Agenda:
|
||||||
- Fixed wrong sorting of last speakers [#3193].
|
- Fixed wrong sorting of last speakers [#3193].
|
||||||
|
- Fixed issue when sorting a new inserted speaker [#3210].
|
||||||
|
|
||||||
Motions:
|
Motions:
|
||||||
- New export dialog [#3185].
|
- New export dialog [#3185].
|
||||||
|
@ -563,10 +563,8 @@ angular.module('OpenSlidesApp.agenda.site', [
|
|||||||
// save reordered list of speakers
|
// save reordered list of speakers
|
||||||
$scope.treeOptions = {
|
$scope.treeOptions = {
|
||||||
dropped: function (event) {
|
dropped: function (event) {
|
||||||
var sortedSpeakers = [];
|
var sortedSpeakers = _.map($scope.nextSpeakers, function (speaker) {
|
||||||
var nextSpeakers = $filter('filter')($scope.speakers, {'begin_time': null});
|
return speaker.id;
|
||||||
angular.forEach(nextSpeakers, function (speaker) {
|
|
||||||
sortedSpeakers.push(speaker.id);
|
|
||||||
});
|
});
|
||||||
$http.post('/rest/agenda/item/' + $scope.item.id + '/sort_speakers/',
|
$http.post('/rest/agenda/item/' + $scope.item.id + '/sort_speakers/',
|
||||||
{speakers: sortedSpeakers}
|
{speakers: sortedSpeakers}
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<!-- Next speakers -->
|
<!-- Next speakers -->
|
||||||
<div ng-show="nextSpeakers.length > 0">
|
<div ng-show="nextSpeakers.length > 0">
|
||||||
<div ui-tree="treeOptions" data-empty-placeholder-enabled="false">
|
<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>
|
<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>
|
<i os-perms="agenda.can_manage" ui-tree-handle="" class="fa fa-arrows-v"></i>
|
||||||
{{ $index + 1 }}.
|
{{ $index + 1 }}.
|
||||||
|
Loading…
Reference in New Issue
Block a user