Improve formatting of users, groups and tags

This commit is contained in:
James Allen 2015-10-15 16:43:53 +01:00
parent b0895cc6aa
commit fb42489803
3 changed files with 4 additions and 11 deletions

View file

@ -55,6 +55,7 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
display-property="display" display-property="display"
key-property="id" key-property="id"
add-on-paste="true" add-on-paste="true"
replace-spaces-with-dashes="false"
) )
auto-complete( auto-complete(
source="filterAutocompleteUsers($query)" source="filterAutocompleteUsers($query)"
@ -148,10 +149,9 @@ script(type="text/ng-template", id="shareAutocompleteTemplate")
div(ng-if="data.type == 'user'") div(ng-if="data.type == 'user'")
i.fa.fa-fw.fa-user i.fa.fa-fw.fa-user
| |
span(ng-bind-html="$highlight(data.email)") span(ng-bind-html="$highlight(data.display)")
div.subdued.small(ng-show="data.name", ng-bind-html="$highlight(data.name)")
div(ng-if="data.type == 'group'") div(ng-if="data.type == 'group'")
i.fa.fa-fw.fa-group i.fa.fa-fw.fa-group
| |
span(ng-bind-html="$highlight(data.name)") span(ng-bind-html="$highlight(data.name)")
div.subdued.small(ng-show="data.member_count") {{ data.memberCount }} members span.subdued.small(ng-show="data.member_count") ({{ data.member_count }} members)

View file

@ -22,9 +22,6 @@ define [
allowedNoOfMembers = $scope.project.features.collaborators allowedNoOfMembers = $scope.project.features.collaborators
$scope.canAddCollaborators = noOfMembers < allowedNoOfMembers or allowedNoOfMembers == INFINITE_COLLABORATORS $scope.canAddCollaborators = noOfMembers < allowedNoOfMembers or allowedNoOfMembers == INFINITE_COLLABORATORS
$scope.$watchCollection "inputs.contacts", (value) ->
console.log "EMAILS", value
$scope.autocompleteContacts = [] $scope.autocompleteContacts = []
do loadAutocompleteUsers = () -> do loadAutocompleteUsers = () ->
$http.get "/user/contacts" $http.get "/user/contacts"
@ -34,7 +31,6 @@ define [
if contact.type == "user" if contact.type == "user"
if contact.last_name == "" and contact.first_name = contact.email.split("@")[0] if contact.last_name == "" and contact.first_name = contact.email.split("@")[0]
# User has not set their proper name so use email as canonical display property # User has not set their proper name so use email as canonical display property
contact.name = ""
contact.display = contact.email contact.display = contact.email
else else
contact.name = "#{contact.first_name} #{contact.last_name}" contact.name = "#{contact.first_name} #{contact.last_name}"
@ -59,8 +55,6 @@ define [
$scope.state.error = null $scope.state.error = null
$scope.state.inflight = true $scope.state.inflight = true
console.log "Adding members", members
do addNextMember = () -> do addNextMember = () ->
if members.length == 0 or !$scope.canAddCollaborators if members.length == 0 or !$scope.canAddCollaborators
$scope.state.inflight = false $scope.state.inflight = false

View file

@ -48,8 +48,7 @@ tags-input .tags .tag-item {
border-radius: 3px; border-radius: 3px;
} }
tags-input .tags .tag-item.selected { tags-input .tags .tag-item.selected {
background: -webkit-linear-gradient(top, #febbbb 0%, #fe9090 45%, #ff5c5c 100%); background-color: @gray-lighter;
background: linear-gradient(to bottom, #febbbb 0%, #fe9090 45%, #ff5c5c 100%);
} }
tags-input .tags .tag-item .remove-button { tags-input .tags .tag-item .remove-button {
color: @gray-light; color: @gray-light;