Add divider for users and groups
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label">{{ 'email.editMailboxDialog.owner' | tr }}</label>
|
||||
<div class="control-label">
|
||||
<multiselect ng-model="mailboxes.edit.owner" options="o.display for o in owners" data-compare-by="name" data-multiple="false" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
<multiselect ng-model="mailboxes.edit.owner" options="o.display for o in owners" data-compare-by="name" data-header-key="header" data-divider-key="divider" data-multiple="false" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -763,6 +763,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
if (error) return console.error('Unable to get user listing.', error);
|
||||
|
||||
// ensure we have a display value available
|
||||
$scope.owners.push({ header: true, display: 'Users' });
|
||||
users.forEach(function (u) {
|
||||
$scope.owners.push({ display: u.username || u.email, id: u.id, type: 'user' });
|
||||
});
|
||||
@@ -770,6 +771,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
Client.getGroups(function (error, groups) {
|
||||
if (error) return console.error('Unable to get group listing.', error);
|
||||
|
||||
$scope.owners.push({ header: true, display: 'Groups' });
|
||||
groups.forEach(function (g) {
|
||||
$scope.owners.push({ display: g.name, id: g.id, type: 'group' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user