Finally removed AgendaAutoupdate

This commit is contained in:
FinnStutzenstein 2018-01-26 09:43:54 +01:00 committed by Emanuel Schütze
parent 4aad16db4f
commit 39e49f7226
2 changed files with 1 additions and 28 deletions

View File

@ -21,32 +21,6 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
}
])
.factory('AgendaUpdate',[
'Agenda',
'operator',
function(Agenda, operator) {
return {
saveChanges: function (item_id, changes) {
// change agenda item only if user has the permission to do that
if (operator.hasPerms('agenda.can_manage agenda.can_see_hidden_items')) {
Agenda.find(item_id).then(function (item) {
var something = false;
_.each(changes, function(change) {
if (change.value !== item[change.key]) {
item[change.key] = change.value;
something = true;
}
});
if (something === true) {
Agenda.save(item);
}
});
}
}
};
}
])
.factory('Agenda', [
'$http',
'DS',

View File

@ -230,9 +230,8 @@ angular.module('OpenSlidesApp.motions.motionBlock', [])
'$state',
'MotionBlock',
'MotionBlockForm',
'AgendaUpdate',
'motionBlockId',
function($scope, $state, MotionBlock, MotionBlockForm, AgendaUpdate, motionBlockId) {
function($scope, $state, MotionBlock, MotionBlockForm, motionBlockId) {
$scope.alert = {};
// Prepare form. Set initial values by creating a deep copy of