From 4bc0b1d19c620be936349d475bf93ee279f7f1b7 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sun, 10 Jan 2016 00:44:02 +0100 Subject: [PATCH] fix autoupdate and hide some groups in user edit form --- openslides/core/static/js/core/base.js | 1 - openslides/users/static/js/users/base.js | 4 +++- openslides/users/static/js/users/site.js | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index b08101e5b..2f78980dc 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -58,7 +58,6 @@ angular.module('OpenSlidesApp.core', [ }, reconnect: function () { socket.close(); - DS.clear(); Autoupdate.connect(); } }; diff --git a/openslides/users/static/js/users/base.js b/openslides/users/static/js/users/base.js index a09057c28..6f6e37ca6 100644 --- a/openslides/users/static/js/users/base.js +++ b/openslides/users/static/js/users/base.js @@ -9,7 +9,8 @@ angular.module('OpenSlidesApp.users', []) 'Group', 'loadGlobalData', 'autoupdate', - function (User, Group, loadGlobalData, autoupdate) { + 'DS', + function (User, Group, loadGlobalData, autoupdate, DS) { var operatorChangeCallbacks = [autoupdate.reconnect]; var operator = { user: null, @@ -35,6 +36,7 @@ angular.module('OpenSlidesApp.users', []) } else { operator.user = null; operator.perms = []; + DS.clear(); _.forEach(operatorChangeCallbacks, function (callback) { callback(); }); diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 20752dde8..c1dbb4fac 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -321,7 +321,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) label: gettextCatalog.getString('Groups'), optionsAttr: 'bs-options', options: Group.getAll(), - ngOptions: 'option[to.valueProp] as option in to.options | filter: $select.search', + ngOptions: 'option[to.valueProp] as option in to.options | ' + + 'filter: {id: "!1"} | filter: {id: "!2"} | ' + + 'filter: $select.search', valueProp: 'id', labelProp: 'name', placeholder: gettextCatalog.getString('Select or search a group ...')