From 79b857e7dc3320310ea242ae7a74e00289b4109c Mon Sep 17 00:00:00 2001 From: Christian Ratz Date: Tue, 3 Dec 2013 10:25:45 +0100 Subject: [PATCH 1/3] use icons from icon font --- .../_page_layout_attachments.html.erb | 8 ++++---- .../blocks/_spent_time.html.erb | 20 +++++++++++-------- .../my_projects_overviews/index.html.erb | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/views/my_projects_overviews/_page_layout_attachments.html.erb b/app/views/my_projects_overviews/_page_layout_attachments.html.erb index 46100b1b67..959cdb7506 100644 --- a/app/views/my_projects_overviews/_page_layout_attachments.html.erb +++ b/app/views/my_projects_overviews/_page_layout_attachments.html.erb @@ -22,11 +22,11 @@ See doc/COPYRIGHT.md for more details.

<%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> <%= h(" - #{attachment.description}") unless attachment.description.blank? %> (<%= number_to_human_size attachment.filesize %>) - <%= link_to_remote image_tag('webalys/delete.png'), - :url => { :action => 'destroy_attachment', :attachment_id => attachment.id, :id => project.id }, + <%= link_to_remote icon_wrapper('icon-context icon-delete', l(:button_delete)), + :url => { :action => 'destroy_attachment', :attachment_id => attachment.id, :id => project.id }, :confirm => l(:text_are_you_sure), - :class => 'delete', + :class => 'delete no-decoration-on-hover', :title => l(:button_delete), - :update => 'page_layout_attachments' %> + :update => 'page_layout_attachments' %>

<% end %> diff --git a/app/views/my_projects_overviews/blocks/_spent_time.html.erb b/app/views/my_projects_overviews/blocks/_spent_time.html.erb index 7bf9bd656d..3410f27235 100644 --- a/app/views/my_projects_overviews/blocks/_spent_time.html.erb +++ b/app/views/my_projects_overviews/blocks/_spent_time.html.erb @@ -56,14 +56,18 @@ See doc/COPYRIGHT.md for more details. <%= html_hours("%.2f" % entry.hours) %> <% if entry.editable_by?(@user) -%> - <%= link_to image_tag('webalys/edit.png'), {:controller => '/timelog', :action => 'edit', :id => entry}, - :alt => l(:button_edit), - :title => l(:button_edit) %> - <%= link_to image_tag('webalys/delete.png'), {:controller => '/timelog', :action => 'destroy', :id => entry}, - :confirm => l(:text_are_you_sure), - :method => :delete, - :alt => l(:button_delete), - :title => l(:button_delete) %> + <%= link_to icon_wrapper('icon-context icon-edit', t(:button_edit)), + {:controller => '/timelog', :action => 'edit', :id => entry}, + :alt => l(:button_edit), + :class => 'no-decoration-on-hover', + :title => l(:button_edit) %> + <%= link_to icon_wrapper('icon-context icon-delete', t(:button_delete)), + {:controller => '/timelog', :action => 'destroy', :id => entry}, + :confirm => l(:text_are_you_sure), + :method => :delete, + :class => 'no-decoration-on-hover', + :alt => l(:button_delete), + :title => l(:button_delete) %> <% end -%> diff --git a/app/views/my_projects_overviews/index.html.erb b/app/views/my_projects_overviews/index.html.erb index 2b205df5dc..d923ad2bad 100644 --- a/app/views/my_projects_overviews/index.html.erb +++ b/app/views/my_projects_overviews/index.html.erb @@ -64,7 +64,7 @@ See doc/COPYRIGHT.md for more details. <% content_for :sidebar do %> <% if total_hours.present? %>

<%= l(:label_spent_time) %>

-

<%= l_hours(total_hours) %>

+

<%= l_hours(total_hours) %>

<%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => project}) %> | From b2028b9c3cfc3d98d2949c5bcdf21015e01a6d43 Mon Sep 17 00:00:00 2001 From: Christian Ratz Date: Wed, 4 Dec 2013 10:28:42 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ebbfbb287..b7d697aa53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ See doc/COPYRIGHT.md for more details. # Changelog +* Adaptations for new icon font + ## 3.0.0.pre9 * `#2731` Migrate serialized yaml from syck to psych From d14095cad5da2832ed38429d1b0762ce122cf056 Mon Sep 17 00:00:00 2001 From: Christian Ratz Date: Wed, 4 Dec 2013 14:06:27 +0100 Subject: [PATCH 3/3] fixed missing delete icon --- app/views/my_projects_overviews/_block.html.erb | 2 +- app/views/my_projects_overviews/_block_textilizable.html.erb | 2 +- features/step_definitions/custom_overview_page_steps.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/my_projects_overviews/_block.html.erb b/app/views/my_projects_overviews/_block.html.erb index b181c646b2..97fa3e11ff 100644 --- a/app/views/my_projects_overviews/_block.html.erb +++ b/app/views/my_projects_overviews/_block.html.erb @@ -25,7 +25,7 @@ See doc/COPYRIGHT.md for more details. :confirm => l(:label_confirm_delete), :url => { :action => "remove_block", :block => block_name }, :complete => "removeBlock('block_#{block_name.dasherize}')" }, - :class => "icon icon-del" + :class => "icon icon-delete" %> diff --git a/app/views/my_projects_overviews/_block_textilizable.html.erb b/app/views/my_projects_overviews/_block_textilizable.html.erb index a64206d416..1deced2f87 100644 --- a/app/views/my_projects_overviews/_block_textilizable.html.erb +++ b/app/views/my_projects_overviews/_block_textilizable.html.erb @@ -25,7 +25,7 @@ See doc/COPYRIGHT.md for more details. :confirm => l(:label_confirm_delete), :url => { :action => "remove_block", :block => block_name }, :complete => "removeBlock('block_#{block_name.dasherize}')" }, - :class => "icon icon-del" + :class => "icon icon-delete" %> diff --git a/features/step_definitions/custom_overview_page_steps.rb b/features/step_definitions/custom_overview_page_steps.rb index 8fd50f2be9..51993043b9 100644 --- a/features/step_definitions/custom_overview_page_steps.rb +++ b/features/step_definitions/custom_overview_page_steps.rb @@ -37,7 +37,7 @@ Then /^I should be able to change things and see my changes when I finish$/ do !60.times{ break unless (driver.find_element(:css, "#ajax-indicator").displayed? rescue true); sleep 1 } driver.find_element(:css, "#list-top > #block_timelog").should be_displayed # ERROR: Caught exception [ERROR: Unsupported command [selectWindow]] - driver.find_element(:css, "#block_wiki > div > a.icon.icon-del").click + driver.find_element(:css, "#block_wiki > div > a.icon.icon-delete").click # ERROR: Caught exception [ERROR: Unsupported command [getConfirmation]] !60.times{ break unless (driver.find_element(:css, "#ajax-indicator").displayed? rescue true); sleep 1 } (driver.find_elements(:css, "#block-select > option[value='wiki'][disabled]").size).should == 0 @@ -73,7 +73,7 @@ Then /^I should be able to add a teaser element with custom text$/ do end Then /^I should be able to delete a teaser element$/ do - driver.find_element(:css, "#block_a > div > a.icon.icon-del").click + driver.find_element(:css, "#block_a > div > a.icon.icon-delete").click # ERROR: Caught exception [ERROR: Unsupported command [getConfirmation]] driver.find_element(:link, "Back").click (driver.find_elements(:css, "#list-right > .mypage-box > p").size).should == 0