diff --git a/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee b/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee index da0d8b2ee..5d01652d6 100644 --- a/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee +++ b/app/assets/javascripts/app/lib/app_post/_object_organization_autocompletion.coffee @@ -27,6 +27,7 @@ class App.ObjectOrganizationAutocompletion extends App.Controller objectSingle: 'User' objectIcon: 'user' + inactiveObjectIcon: 'inactive-user' objectSingels: 'People' objectCreate: 'Create new object' referenceAttribute: 'member_ids' @@ -89,6 +90,7 @@ class App.ObjectOrganizationAutocompletion extends App.Controller @objectId.val('').trigger('change') onObjectClick: (e) => + return if e.currentTarget.classList.contains('is-inactive') objectId = $(e.currentTarget).data('object-id') @selectObject(objectId) @close() @@ -257,9 +259,14 @@ class App.ObjectOrganizationAutocompletion extends App.Controller organizationMemebers.append(@buildObjectItem(object)) buildObjectItem: (object) => + icon = @objectIcon + + if object.active is false and @inactiveObjectIcon + icon = @inactiveObjectIcon + App.view(@templateObjectItem)( object: object - icon: @objectIcon + icon: icon ) buildObjectNew: => diff --git a/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee b/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee index 3a8f1e997..8183c5a29 100644 --- a/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee +++ b/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee @@ -1,9 +1,5 @@ class App.UserOrganizationAutocompletion extends App.ObjectOrganizationAutocompletion - objectSingle: 'User' - objectIcon: 'user' - objectSingels: 'People' objectCreate: 'Create new Customer' - referenceAttribute: 'member_ids' newObject: (e) => if e @@ -18,10 +14,15 @@ class App.UserOrganizationAutocompletion extends App.ObjectOrganizationAutocompl if @Config.get('ui_user_organization_selector_with_email') && !_.isEmpty(object.email) realname += " <#{object.email}>" + icon = @objectIcon + + if object.active is false and @inactiveObjectIcon + icon = @inactiveObjectIcon + App.view(@templateObjectItem)( realname: realname object: object - icon: @objectIcon + icon: icon ) class UserNew extends App.ControllerModal diff --git a/app/assets/javascripts/app/views/generic/object_search/item_object.jst.eco b/app/assets/javascripts/app/views/generic/object_search/item_object.jst.eco index dc5747319..3a6f4ef10 100644 --- a/app/assets/javascripts/app/views/generic/object_search/item_object.jst.eco +++ b/app/assets/javascripts/app/views/generic/object_search/item_object.jst.eco @@ -1,4 +1,4 @@ -
  • +
  • <%- @Icon(@icon, 'recipientList-icon') %>
    @@ -12,4 +12,7 @@ - <%= @object.organization.displayName() %> <% end %> + <% if @object.active is false: %> +
    <%= @Ti('inactive') %>
    + <% end %>
  • \ No newline at end of file diff --git a/app/assets/stylesheets/svg-dimensions.css b/app/assets/stylesheets/svg-dimensions.css index c1257a214..25821753e 100644 --- a/app/assets/stylesheets/svg-dimensions.css +++ b/app/assets/stylesheets/svg-dimensions.css @@ -2,6 +2,7 @@ .icon-arrow-left { width: 7px; height: 13px; } .icon-arrow-right { width: 7px; height: 13px; } .icon-arrow-up { width: 13px; height: 7px; } +.icon-bold { width: 12px; height: 12px; } .icon-chat { width: 24px; height: 24px; } .icon-checkbox-checked { width: 11px; height: 11px; } .icon-checkbox-indeterminate { width: 11px; height: 11px; } @@ -38,9 +39,12 @@ .icon-google-button { width: 29px; height: 24px; } .icon-group { width: 24px; height: 24px; } .icon-help { width: 16px; height: 16px; } +.icon-horizontal-rule { width: 12px; height: 12px; } .icon-important { width: 16px; height: 16px; } .icon-in-process { width: 64px; height: 64px; } +.icon-inactive-user { width: 16px; height: 16px; } .icon-info { width: 5px; height: 11px; } +.icon-italic { width: 12px; height: 12px; } .icon-line-left-arrow { width: 34px; height: 7px; } .icon-line-right-arrow { width: 34px; height: 7px; } .icon-linkedin-button { width: 29px; height: 24px; } @@ -93,6 +97,7 @@ .icon-status-modified-outer-circle { width: 16px; height: 16px; } .icon-status { width: 16px; height: 16px; } .icon-stopwatch { width: 77px; height: 83px; } +.icon-strikethrough { width: 12px; height: 12px; } .icon-switchView { width: 19px; height: 18px; } .icon-task-state { width: 16px; height: 16px; } .icon-team { width: 16px; height: 16px; } @@ -103,7 +108,9 @@ .icon-trash { width: 16px; height: 16px; } .icon-twitter-button { width: 29px; height: 24px; } .icon-twitter { width: 17px; height: 17px; } +.icon-underline { width: 12px; height: 12px; } .icon-unmute { width: 16px; height: 16px; } +.icon-unordered-list { width: 12px; height: 12px; } .icon-user { width: 16px; height: 16px; } .icon-web { width: 17px; height: 17px; } .icon-weibo-button { width: 29px; height: 24px; } diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 8e1cd1a4c..698534a6a 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -6591,12 +6591,15 @@ footer { .dropdown li:hover, .dropdown li.is-active { background: hsl(205,90%,60%); - } - .dropdown li:hover + li, - .dropdown li.is-active + li { + &.is-inactive { + background: none !important; + } + + + li { box-shadow: none; } + } .dropdown-menu > li.danger:hover, .dropdown-menu > li.danger.is-active { @@ -6736,9 +6739,24 @@ footer { } .recipientList-entry { - @extend .u-clickable; display: flex; align-items: center; + @extend .u-clickable; + + &.is-inactive { + cursor: not-allowed; + + &:hover, + &.is-active { + .recipientList-icon { + opacity: 0.2; + } + } + + .recipientList-name { + color: hsl(238,2%,56%); + } + } } .recipientList-entry .recipientList-iconSpacer { @@ -6756,13 +6774,12 @@ footer { opacity: 0.2; } - .recipientList--new .recipientList-icon { - opacity: 1; - } - - .recipientList-entry:hover .recipientList-icon, - .recipientList-entry.is-active .recipientList-icon { - opacity: 1; + .recipientList--new, + .recipientList-entry:hover, + .recipientList-entry.is-active { + .recipientList-icon { + opacity: 1; + } } .recipientList-name { @@ -6772,6 +6789,11 @@ footer { @extend .u-textTruncate; } + .recipientList-status { + color: hsl(238,2%,56%); + opacity: 0.5; + } + .recipientList-arrow { fill: white; opacity: 0.39; diff --git a/contrib/icon-sprite.sketch b/contrib/icon-sprite.sketch index 6d28ea285..e6eb16ec3 100644 Binary files a/contrib/icon-sprite.sketch and b/contrib/icon-sprite.sketch differ diff --git a/public/assets/images/icons.svg b/public/assets/images/icons.svg index 9abe5dc9b..893555471 100644 --- a/public/assets/images/icons.svg +++ b/public/assets/images/icons.svg @@ -20,6 +20,11 @@ arrow-up + + + bold + + chat @@ -285,6 +290,14 @@ help + + + horizontal-rule + + + + + important @@ -298,11 +311,27 @@ <path d="M7.997 43.981a644.16 644.16 0 0 0 0-11.995c-2.244.046-4.129-.852-5.998-2.998C.793 27.84 0 25.945 0 23.99V7.997C0 3.792 3.77 0 7.997 0h30.988c5.153 0 8.922 3.592 8.996 7.997.025 5.474.025 10.563 0 15.993-.173 4.45-3.942 8.042-8.996 7.996-5.857.046-11.907.046-17.993 0-.56.046-1.353.345-2 1-3.519 3.436-6.99 7.228-10.995 10.995.335.025.235.025 0 0z"/> <path d="M52 20c3.609-.172 7.144-.172 10 3 1.185 1.404 1.993 3.195 2 5-.007 5.358-.209 10.432 0 15 .195 4.983-4.148 8.863-8 9 .316.062.114.161 0 0a272.316 272.316 0 0 0 0 12c-.593-.497-.997-.696-1-1-3.634-3.278-6.967-6.561-10-10-1.11-.64-1.917-1.038-3-1-6.09.062-12.15-.038-18 0-5.565-.038-9.707-4.813-9-10 .202-.385.404-.683 1-1 1.222-1.474 2.637-2.966 4-4 .657-.757 1.364-.956 2-1a1091.5 1091.5 0 0 0 17 0c6.002.044 11.356-4.134 13-10-.028-1.795-.23-3.785 0-6z" fill="#A9BCC4" opacity=".4"/> </g> +</symbol><symbol id="icon-inactive-user" viewBox="0 0 16 16"> + <title> + inactive-user + + + + + info + + + italic + + + + + line-left-arrow @@ -620,6 +649,14 @@ <path d="M10.5 24.8c-1-.9-2.1-1.9-3-2.8l6.2-6.2c.8.9 1.7 1.9 2.6 2.9.8-.6 1.4-1.1 2-1.5 3.9-2.9 8.2-4.9 12.9-6 .7-.2.9-.4.9-1.1-.1-1.7 0-3.4 0-5.2h15.4v6C60.3 14.2 69.4 21.8 74 34.1c3.6 9.6 3 19.2-1.4 28.4-8.9 18.6-31.4 25.9-49.9 16.2-19-9.9-25.9-35.4-12.2-53.9zM40.048 75c15.134 0 27.644-12.107 27.947-27.442.302-16.143-12.712-28.25-27.442-28.552C25.318 18.703 12.203 30.91 12 46.549 11.9 62.489 24.309 75 40.048 75zM14.9 12.4c-.3.5-.4 1.1-.8 1.5-2.9 2.9-5.8 5.8-8.6 8.7-.7.7-1.5.8-2.4.5-1.3-.4-2.1-1.3-2.5-2.5-.3-.9-.2-1.7.5-2.5l8.6-8.6c.6-.6 1.4-.8 2.2-.6 1.5.3 2.8 1.9 3 3.5zm18.8-8.5c-.2-1.4.3-2.6 1.6-3.1 2.9-1.1 5.9-1.1 8.9 0 1.2.4 1.8 1.6 1.7 3.1H33.7z" fill="#A9BCC4"/> <circle opacity=".3" cx="39.902" cy="46.902" r="24.902"/> </g> +</symbol><symbol id="icon-strikethrough" viewBox="0 0 12 12"> + <title> + strikethrough + + + + + switchView @@ -706,6 +743,13 @@ twitter + + + underline + + + + unmute @@ -713,6 +757,13 @@ <g fill-rule="evenodd"> <path d="M1 6v4h3l4 3V3L4 6zM10.327 5.115c2.231 1.455 2.231 4.315 0 5.77a.5.5 0 1 0 .546.838c2.837-1.85 2.837-5.596 0-7.446a.5.5 0 0 0-.546.838zm1.2-1.422c3.322 2.166 3.322 6.448 0 8.614a.5.5 0 1 0 .546.838c3.928-2.56 3.928-7.73 0-10.29a.5.5 0 0 0-.546.838zm-2.3 2.988c1.03.671 1.03 1.967 0 2.638a.5.5 0 1 0 .546.838c1.636-1.066 1.636-3.248 0-4.314a.5.5 0 1 0-.546.838z"/> </g> +</symbol><symbol id="icon-unordered-list" viewBox="0 0 12 12"> + <title> + unordered-list + + + + user diff --git a/public/assets/images/icons/bold.svg b/public/assets/images/icons/bold.svg new file mode 100644 index 000000000..628d5d14a --- /dev/null +++ b/public/assets/images/icons/bold.svg @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch --> + <title>bold + Created with Sketch. + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/horizontal-rule.svg b/public/assets/images/icons/horizontal-rule.svg new file mode 100644 index 000000000..a3d62fca6 --- /dev/null +++ b/public/assets/images/icons/horizontal-rule.svg @@ -0,0 +1,12 @@ + + + + horizontal-rule + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/inactive-user.svg b/public/assets/images/icons/inactive-user.svg new file mode 100644 index 000000000..85d78c037 --- /dev/null +++ b/public/assets/images/icons/inactive-user.svg @@ -0,0 +1,11 @@ + + + + inactive-user + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/italic.svg b/public/assets/images/icons/italic.svg new file mode 100644 index 000000000..dfdd0907b --- /dev/null +++ b/public/assets/images/icons/italic.svg @@ -0,0 +1,12 @@ + + + + italic + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/long-arrow-down.svg b/public/assets/images/icons/long-arrow-down.svg new file mode 100644 index 000000000..f86ae4477 --- /dev/null +++ b/public/assets/images/icons/long-arrow-down.svg @@ -0,0 +1,10 @@ + + + + long-arrow-down + Created with Sketch. + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/low-priority.svg b/public/assets/images/icons/low-priority.svg new file mode 100644 index 000000000..f0cb7e5d5 --- /dev/null +++ b/public/assets/images/icons/low-priority.svg @@ -0,0 +1,10 @@ + + + + low-priority + Created with Sketch. + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/strikethrough.svg b/public/assets/images/icons/strikethrough.svg new file mode 100644 index 000000000..683213cb5 --- /dev/null +++ b/public/assets/images/icons/strikethrough.svg @@ -0,0 +1,11 @@ + + + + strikethrough + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/underline.svg b/public/assets/images/icons/underline.svg new file mode 100644 index 000000000..1ea127e57 --- /dev/null +++ b/public/assets/images/icons/underline.svg @@ -0,0 +1,11 @@ + + + + underline + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/unordered-list.svg b/public/assets/images/icons/unordered-list.svg new file mode 100644 index 000000000..5264928ac --- /dev/null +++ b/public/assets/images/icons/unordered-list.svg @@ -0,0 +1,17 @@ + + + + unordered-list + Created with Sketch. + + + + + + + + + + + + \ No newline at end of file