From 264895b7733c6e648e284d2381da66c24b6ae62d Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 16 Sep 2015 14:49:33 +0200 Subject: [PATCH] Configure js-data for projector elements to "replace" on inject. fixes #1632 --- openslides/core/static/js/core/core.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openslides/core/static/js/core/core.js b/openslides/core/static/js/core/core.js index 79e999171..9964ac68f 100644 --- a/openslides/core/static/js/core/core.js +++ b/openslides/core/static/js/core/core.js @@ -158,9 +158,21 @@ angular.module('OpenSlidesApp.core', [ }); }]) +/* Model for a projector. + * + * At the moment we use only one projector, so there will be only one object + * in this model. It has the id 1. For later releases there will be multiple + * projector objects. + * + * This model uses onConfilict: 'replace' instead of 'merge'. This is necessary + * because the keys of the projector objects can change and old keys have to + * be removed. See http://www.js-data.io/docs/dsdefaults#onconflict for + * more information. + */ .factory('Projector', ['DS', function(DS) { return DS.defineResource({ name: 'core/projector', + onConflict: 'replace', }); }])