Skip to content

Commit

Permalink
Removed redundant autocomplete ui for roles admin crud page, removed …
Browse files Browse the repository at this point in the history
…associated search function
  • Loading branch information
zakhenry committed Jan 15, 2016
1 parent 47a4ed6 commit 59df7ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
18 changes: 0 additions & 18 deletions app/src/app/admin/users/editUser/roles/roles.tpl.html
Expand Up @@ -6,24 +6,6 @@ <h2>Roles &amp; Permissions</h2>
</div>
</md-toolbar>

<md-chips ng-model="RolesController.user._roles" md-autocomplete-snap
md-require-match="true">
<md-autocomplete
md-selected-item="RolesController.selectedRole"
md-search-text="RolesController.searchText"
md-items="role in RolesController.roleSearch(RolesController.searchText)"
md-item-text="role.key"
md-autoselect="true"
placeholder="+ Search for a role">
<md-item-template>
<span md-highlight-text="RolesController.searchText" md-highlight-flags="i">{{role.key | fromCamel }}</span> - {{role.description}}
</md-item-template>
</md-autocomplete>
<md-chip-template>
<strong>{{$chip.key | fromCamel }}</strong>
</md-chip-template>
</md-chips>

<h3>Available Roles</h3>

<md-list>
Expand Down
12 changes: 0 additions & 12 deletions app/src/app/admin/users/editUser/roles/roles.ts
Expand Up @@ -67,18 +67,6 @@ namespace app.admin.users.editUser.roles {

}

public roleSearch(query:string):common.models.Role[]{

if (!query){
return [];
}

return _.filter(this.roles, (role:common.models.Role) => {
return _.contains(role.key.toLowerCase(), query.toLowerCase());
});

}

public userHasRole(role:common.models.Role):boolean{
return _.contains(this.user._roles, role);
}
Expand Down

0 comments on commit 59df7ef

Please sign in to comment.