From 39e49f7226488c6e911d10ff29923636d88a12e6 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 26 Jan 2018 09:43:54 +0100 Subject: [PATCH] Finally removed AgendaAutoupdate --- openslides/agenda/static/js/agenda/base.js | 26 ------------------- .../motions/static/js/motions/motion-block.js | 3 +-- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index 8709164d7..fa296f8be 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -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', diff --git a/openslides/motions/static/js/motions/motion-block.js b/openslides/motions/static/js/motions/motion-block.js index 61aeb65a9..2a00aadc6 100644 --- a/openslides/motions/static/js/motions/motion-block.js +++ b/openslides/motions/static/js/motions/motion-block.js @@ -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