fix autoupdate and hide some groups in user edit form

This commit is contained in:
Oskar Hahn 2016-01-10 00:44:02 +01:00
parent b968a92630
commit 4bc0b1d19c
3 changed files with 6 additions and 3 deletions

View File

@ -58,7 +58,6 @@ angular.module('OpenSlidesApp.core', [
}, },
reconnect: function () { reconnect: function () {
socket.close(); socket.close();
DS.clear();
Autoupdate.connect(); Autoupdate.connect();
} }
}; };

View File

@ -9,7 +9,8 @@ angular.module('OpenSlidesApp.users', [])
'Group', 'Group',
'loadGlobalData', 'loadGlobalData',
'autoupdate', 'autoupdate',
function (User, Group, loadGlobalData, autoupdate) { 'DS',
function (User, Group, loadGlobalData, autoupdate, DS) {
var operatorChangeCallbacks = [autoupdate.reconnect]; var operatorChangeCallbacks = [autoupdate.reconnect];
var operator = { var operator = {
user: null, user: null,
@ -35,6 +36,7 @@ angular.module('OpenSlidesApp.users', [])
} else { } else {
operator.user = null; operator.user = null;
operator.perms = []; operator.perms = [];
DS.clear();
_.forEach(operatorChangeCallbacks, function (callback) { _.forEach(operatorChangeCallbacks, function (callback) {
callback(); callback();
}); });

View File

@ -321,7 +321,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
label: gettextCatalog.getString('Groups'), label: gettextCatalog.getString('Groups'),
optionsAttr: 'bs-options', optionsAttr: 'bs-options',
options: Group.getAll(), 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', valueProp: 'id',
labelProp: 'name', labelProp: 'name',
placeholder: gettextCatalog.getString('Select or search a group ...') placeholder: gettextCatalog.getString('Select or search a group ...')