Merge pull request #3548 from HDinger/feature/21515-restructure-icons-delete-remove-close

[21515] Restructure icons for close, remove and delete
pull/3567/head
Oliver Günther 9 years ago
commit 8c0daf33e2
  1. BIN
      app/assets/fonts/openproject_icon/openproject-icon-font.eot
  2. 1
      app/assets/fonts/openproject_icon/openproject-icon-font.svg
  3. BIN
      app/assets/fonts/openproject_icon/openproject-icon-font.ttf
  4. BIN
      app/assets/fonts/openproject_icon/openproject-icon-font.woff
  5. 4
      app/assets/stylesheets/content/_in_place_editing.lsg
  6. 5
      app/assets/stylesheets/content/_in_place_editing.sass
  7. 6
      app/assets/stylesheets/content/_notifications.lsg
  8. 5
      app/assets/stylesheets/fonts/_openproject_icon_font.lsg
  9. 15
      app/assets/stylesheets/fonts/_openproject_icon_font.sass
  10. 4
      app/views/groups/_memberships.html.erb
  11. 4
      app/views/groups/_users.html.erb
  12. 2
      app/views/members/index.html.erb
  13. 2
      app/views/repositories/_checkout_instructions.html.erb
  14. 2
      app/views/types/index.html.erb
  15. 4
      app/views/users/_memberships.html.erb
  16. 4
      config/locales/js-en.yml
  17. 2
      features/step_definitions/admin_steps.rb
  18. 2
      frontend/app/templates/components/notification-box.html
  19. 4
      frontend/app/templates/work_packages/tabs/_work_package_relations.html
  20. 2
      frontend/app/templates/work_packages/watchers/watcher.html
  21. 8
      frontend/tests/unit/tests/work_packages/directives/work-package-relations-directive-test.js

@ -275,4 +275,5 @@
<glyph unicode="&#57605;" d="M256 55l-177 307 354 0z m-177 402l354 0 0-46-354 0z"/>
<glyph unicode="&#57607;" d="M46 259l210 210 210-210-210-209z"/>
<glyph unicode="&#57608;" d="M177 326l158 0 0-24-158 0z m0-190l158 0 0-25-158 0z m70 258l25 0 0-159-25 0z m-181 118l32 0 0-512-32 0z m348-118l32 0 0-394-32 0z m-334-361l345 0 0-33-345 0z m0 479l238 0 0-33-238 0z m240 7l126-125-24-24-126 126z"/>
<glyph unicode="&#57609;" d="M438 390l-48 48-134-137-134 137-48-48 137-134-137-134 48-48 134 137 134-137 48 48-137 134z m0 0"/>
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

@ -158,7 +158,7 @@
<accessible-by-keyboard execute="discardEditing()" >
<a execute-on-enter="execute()" default-event-handling="defaultEventHandling" href="" tabindex="0">
<span >
<span class="icon-context icon-button icon-close2 " title="Description: Cancel" icon-name="close2" icon-title="Description: Cancel">
<span class="icon-context icon-button icon-close " title="Description: Cancel" icon-name="close2" icon-title="Description: Cancel">
<span class="hidden-for-sighted ">Description: Cancel</span>
</span>
</span>
@ -287,7 +287,7 @@
<accessible-by-keyboard execute="discardEditing()" >
<a execute-on-enter="execute()" default-event-handling="defaultEventHandling" href="" tabindex="0">
<span >
<span class="icon-context icon-button icon-close2 " title="Description: Cancel" icon-name="close2" icon-title="Description: Cancel">
<span class="icon-context icon-button icon-close " title="Description: Cancel" icon-name="close2" icon-title="Description: Cancel">
<span class="hidden-for-sighted ">Description: Cancel</span>
</span>
</span>

@ -179,8 +179,9 @@
visibility: hidden
font-size: rem-calc(14px)
.icon-edit::before,
.icon-delete::before
.icon-edit:before,
.icon-delete:before,
.icon-remove:before
// HACK: overriding default padding here
padding-right: 0

@ -22,7 +22,7 @@
```
<div class="notification-box -error">
<a href="#" title="close" class="notification-box--close icon-context icon-close2"></a>
<a href="#" title="close" class="notification-box--close icon-context icon-close"></a>
<div class="notification-box--content">
<p>An error occured, here are the facts:</p>
<ul>
@ -39,7 +39,7 @@
```
<div class="notification-box -warning">
<a href="#" title="close" class="notification-box--close icon-context icon-close2"></a>
<a href="#" title="close" class="notification-box--close icon-context icon-close"></a>
<div class="notification-box--content">
<p>This is a warning. You may ignore it, but bad things might happen.</p>
</div>
@ -50,7 +50,7 @@
```
<div class="notification-box -success">
<a href="#" title="close" class="notification-box--close icon-context icon-close2"></a>
<a href="#" title="close" class="notification-box--close icon-context icon-close"></a>
<div class="notification-box--content">
<p>Successful update. <a href="#">A link to the past</a></p>
</div>

@ -57,8 +57,7 @@
<li><span class="icon-changeset3"></span> changeset3</li>
<li><span class="icon-clock-reminder"></span> clock-reminder</li>
<li><span class="icon-close"></span> close</li>
<li><span class="icon-close2"></span> close2</li>
<li><span class="icon-close2"></span> close2</li>
<li><span class="icon-cross"></span> cross</li>
<li><span class="icon-code-tag"></span> code-tag</li>
<li><span class="icon-color-text"></span> color-text</li>
<li><span class="icon-color-underline"></span> color-underline</li>
@ -191,6 +190,7 @@
<li><span class="icon-redo"></span> redo</li>
<li><span class="icon-reload1"></span> reload1</li>
<li><span class="icon-reload2"></span> reload2</li>
<li><span class="icon-remove"></span> remove</li>
<li><span class="icon-rename"></span> rename</li>
<li><span class="icon-rss"></span> rss</li>
<li><span class="icon-rss2"></span> rss2</li>
@ -247,7 +247,6 @@
<li><span class="icon-undo"></span> undo</li>
<li><span class="icon-unit"></span> unit</li>
<li><span class="icon-unit2"></span> unit2</li>
<li><span class="icon-unit2"></span> unit2</li>
<li><span class="icon-unlocked"></span> unlocked</li>
<li><span class="icon-user-guide-admin"></span> user-guide-admin</li>
<li><span class="icon-user-guide-user"></span> user-guide-user</li>

@ -216,12 +216,9 @@ dt > .icon-changeset:before,
.icon-changeset:before
content: "\e006"
.icon-close:before
.icon-cross:before
content: "\e007"
.icon-close2:before
content: "\e0f6"
.icon-copy:before
content: "\e008"
@ -950,7 +947,7 @@ dt > .icon-wiki-page:before,
.icon-glossar:before
content: "\e0f5"
.icon-close2:before
.icon-close:before
content: "\e0f6"
.icon-hosting:before
@ -1007,6 +1004,14 @@ dt > .icon-wiki-page:before,
.icon-compare:before
content: "\e108"
.icon-remove:before
content: "\e109"
// HACK to align this icon and it's text
// This occurs because the icon is not aligned at its border.
// This should be removed when the icon font is updated.
position: relative
top: 0.15em
/* remove once all menu items have an icon */
.no-icon
margin-left: 15px

@ -85,10 +85,10 @@ See doc/COPYRIGHT.rdoc for more details.
</td>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to l(:button_delete), membership_of_group_path(@group, membership),
<%= link_to l(:button_remove), membership_of_group_path(@group, membership),
:method => :delete,
:remote => true,
:class => 'icon icon-delete' %>
:class => 'icon icon-remove' %>
</td>
</tr>
</tbody>

@ -55,10 +55,10 @@ See doc/COPYRIGHT.rdoc for more details.
<tr id="user-<%= user.id %>">
<td class="user"><%= link_to_user user %></td>
<td class="buttons">
<%= link_to l(:button_delete), member_of_group_path(@group, user),
<%= link_to l(:button_remove), member_of_group_path(@group, user),
:method => :delete,
:remote => :true,
:class => 'icon icon-delete' %>
:class => 'icon icon-remove' %>
</td>
</tr>
<% end %>

@ -124,7 +124,7 @@ See doc/COPYRIGHT.rdoc for more details.
delete_class, delete_title = if member.disposable?
['icon icon-delete', I18n.t(:title_remove_and_delete_user)]
else
['icon icon-close', I18n.t(:button_remove)]
['icon icon-remove', I18n.t(:button_remove)]
end
%>
<%= link_to_function '', "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit', :title => l(:button_edit) %>

@ -27,7 +27,7 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<div id="repository--checkout-instructions" class="notification-box -info">
<a href="javscript:" title="{{ ::I18n.t('js.close_popup_title') }}" class="notification-box--close icon-context icon-close2"></a>
<a href="javscript:" title="{{ ::I18n.t('js.close_popup_title') }}" class="notification-box--close icon-context icon-close"></a>
<div class="notification-box--content">
<p>
<%= simple_format instructions.instructions %>

@ -123,7 +123,7 @@ See doc/COPYRIGHT.rdoc for more details.
<td class="timelines-pet-reorder"><%= reorder_links('type', {:action => 'move', :id => type}) %></td>
<td class="buttons">
<% if !type.is_standard? %>
<%= link_to type, :method => :delete, data: { confirm: t(:text_are_you_sure) }, :class => 'icon-context icon-delete' do %>
<%= link_to type, :method => :delete, data: { confirm: t(:text_are_you_sure) }, :class => 'icon icon-delete' do %>
<%= t(:button_delete) %>
<span class="hidden-for-sighted"><%=h type.name %></span>
<% end %>

@ -95,13 +95,13 @@ See doc/COPYRIGHT.rdoc for more details.
<%= call_hook(:view_users_memberships_table_row, :user => @user, :membership => membership, :roles => roles, :projects => projects )%>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to(l(:button_delete), { :controller => 'users',
<%= link_to(l(:button_remove), { :controller => 'users',
:action => 'destroy_membership',
:id => @user,
:membership_id => membership },
:remote => true,
:method => :post,
:class => 'icon icon-delete') if membership.deletable? %>
:class => 'icon icon-remove') if membership.deletable? %>
</td>
</tr>
<% end %>

@ -165,7 +165,7 @@ en:
label_drop_files: Drop files here
label_drop_files_hint: or click to add files
label_remove_file: "Delete %{fileName}"
label_remove_watcher: "Delete watcher %{name}"
label_remove_watcher: "Remove watcher %{name}"
label_remove_all_files: Delete all files
label_add_description: "Add a description for %{file}"
label_upload_notification: "Uploading files for Work package #%{id}: %{subject}"
@ -436,7 +436,7 @@ en:
notice_bad_request: "Bad Request."
relations:
empty: No relation exists
delete: Delete relation
remove: Remove relation
inplace:
button_edit: "%{attribute}: Edit"
button_save: "%{attribute}: Save"

@ -53,7 +53,7 @@ end
When /^I delete membership to project "(.*?)"$/ do |project|
project = Project.like(project).first
page.find(:css, '#tab-content-memberships .memberships').find(:xpath, "//tr[contains(.,'#{project.name}')]").find(:css, '.icon-delete').click
page.find(:css, '#tab-content-memberships .memberships').find(:xpath, "//tr[contains(.,'#{project.name}')]").find(:css, '.icon-remove').click
end
When /^I edit membership to project "(.*?)" to contain the roles:$/ do |project, roles_table|

@ -31,5 +31,5 @@
</div>
</div>
</div>
<a data-ng-click="remove()" data-ng-if="removable()" title="{{ ::I18n.t('js.close_popup_title') }}" class="notification-box--close icon-context icon-close2"></a>
<a data-ng-click="remove()" data-ng-if="removable()" title="{{ ::I18n.t('js.close_popup_title') }}" class="notification-box--close icon-context icon-close"></a>
</div>

@ -44,8 +44,8 @@
<td class="icon">
<accessible-by-keyboard ng-if="handler.canDeleteRelation(relation)"
execute="handler.removeRelation(this)">
<icon-wrapper icon-name="delete"
icon-title="{{ I18n.t('js.relations.delete') }}">
<icon-wrapper icon-name="remove"
icon-title="{{ I18n.t('js.relations.remove') }}">
</icon-wrapper>
</accessible-by-keyboard>
</td>

@ -19,7 +19,7 @@
data-ng-click="remove()"
data-ng-focus="focus()"
data-ng-blur="blur()">
<icon-wrapper icon-name="delete"
<icon-wrapper icon-name="remove"
data-icon-title="{{::I18n.t('js.label_remove_watcher',
{ name: watcher.name })}}">
</icon-wrapper>

@ -76,7 +76,7 @@ describe('Work Package Relations Directive', function() {
stub.withArgs('js.work_packages.properties.subject').returns('Column0');
stub.withArgs('js.work_packages.properties.status').returns('Column1');
stub.withArgs('js.work_packages.properties.assignee').returns('Column2');
stub.withArgs('js.relations.delete').returns('Delete relation');
stub.withArgs('js.relations.remove').returns('Remove relation');
}));
afterEach(function() {
@ -294,9 +294,9 @@ describe('Work Package Relations Directive', function() {
if(removable) {
var column4 = angular.element(element.find('.workpackages table tbody tr:nth-of-type(' + x + ') td:nth-child(4)'));
var deleteIcon = angular.element(column4.find('span.icon-delete'));
expect(deleteIcon.length).not.to.eq(0);
expect(deleteIcon.attr('title')).to.include('Delete relation');
var removeIcon = angular.element(column4.find('span.icon-remove'));
expect(removeIcon.length).not.to.eq(0);
expect(removeIcon.attr('title')).to.include('Remove relation');
}
}
});

Loading…
Cancel
Save