Refactor the entity-search directive/control to make its interface much cleaner and to add support for ng-model validity checking
This commit is contained in:
parent
df7b8d651c
commit
3865e3b1b7
8 changed files with 234 additions and 155 deletions
|
@ -135,10 +135,11 @@
|
|||
|
||||
<tr>
|
||||
<td id="add-entity-permission" colspan="2" class="admin-search">
|
||||
<span class="entity-search" namespace="repo.namespace" include-teams="true"
|
||||
input-title="'Add a ' + (repo.is_organization ? 'team or ' : '') + 'user...'"
|
||||
entity-selected="addNewPermission" is-organization="repo.is_organization"
|
||||
current-entity="selectedEntity"></span>
|
||||
<span class="entity-search" namespace="repo.namespace"
|
||||
placeholder="'Add a ' + (repo.is_organization ? 'team or ' : '') + 'user...'"
|
||||
entity-selected="addNewPermission(entity)"
|
||||
current-entity="selectedEntity"
|
||||
auto-clear="true"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -23,10 +23,13 @@
|
|||
</tr>
|
||||
|
||||
<tr ng-show="canEditMembers">
|
||||
<td colspan="2">
|
||||
<span class="entity-search" namespace="orgname" include-teams="false" input-title="'Add a Quay.io user...'"
|
||||
entity-selected="addNewMember" is-organization="true"
|
||||
current-entity="selectedMember"></span>
|
||||
<td colspan="3">
|
||||
<div class="entity-search" style="width: 100%"
|
||||
namespace="orgname" placeholder="'Add a Quay.io user or robot...'"
|
||||
entity-selected="addNewMember(entity)"
|
||||
current-entity="selectedMember"
|
||||
auto-clear="true"
|
||||
allowed-entities="['user', 'robot']"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Reference in a new issue