From f479a7a1abf3c5c6e4f207750d8138c9b27d69b4 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 24 Oct 2017 08:48:15 +0200 Subject: [PATCH] Fixed user form for groups with ids greater than 9 --- openslides/core/static/css/app.css | 1 + openslides/users/static/js/users/site.js | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index edaf8de63..105e55339 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -1479,6 +1479,7 @@ img { vertical-align: top; text-align: center; min-width: 40px; + overflow: hidden; } #groups-table .perm-head { diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 19f92c5ae..867e7ae5c 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -335,9 +335,8 @@ angular.module('OpenSlidesApp.users.site', [ type: 'select-multiple', templateOptions: { label: gettextCatalog.getString('Groups'), - options: Group.getAll(), - ngOptions: 'option.id as option.name | translate for option in to.options | ' + - 'filter: {id: "!1"}', + options: Group.filter({where: {id: {'>': 1}}}), + ngOptions: "option.id as option.name | translate for option in to.options | orderBy: 'id'", placeholder: gettextCatalog.getString('Select or search a group ...') } }, @@ -784,10 +783,8 @@ angular.module('OpenSlidesApp.users.site', [ '$state', 'User', 'UserForm', - 'Group', 'ErrorMessage', - function($scope, $state, User, UserForm, Group, ErrorMessage) { - Group.bindAll({where: {id: {'>': 2}}}, $scope, 'groups'); + function($scope, $state, User, UserForm, ErrorMessage) { $scope.alert = {}; // get all form fields $scope.formFields = UserForm.getFormFields(true); @@ -814,11 +811,9 @@ angular.module('OpenSlidesApp.users.site', [ '$state', 'User', 'UserForm', - 'Group', 'userId', 'ErrorMessage', - function($scope, $state, User, UserForm, Group, userId, ErrorMessage) { - Group.bindAll({where: {id: {'>': 2}}}, $scope, 'groups'); + function($scope, $state, User, UserForm, userId, ErrorMessage) { $scope.alert = {}; // set initial values for form model by create deep copy of user object // so list/detail view is not updated while editing