Finally removed AgendaAutoupdate
This commit is contained in:
parent
4aad16db4f
commit
39e49f7226
@ -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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user