Project

General

Profile

Actions

Patch #24313

closed

Use the regular "icon icon-*" classes for all elements with icons

Patch #24313: Use the regular "icon icon-*" classes for all elements with icons

Added by Marius BĂLTEANU about 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:

Description

Working at #23980 we discovered that some links or other elements with icons (background image) doesn't use the regular "icon icon-*" classes.

I think that for consistency, better theme support and easier styling, we should add the "icon icon-*" also to these elements.

The attached patch is a first patch that implements this for admin menu links.


Files


Related issues 2 (0 open — 2 closed)

Related to Redmine - Patch #28605: Add the missing icon class to the items with icons from the contextual menuClosedGo MAEDAActions
Related to Redmine - Patch #31433: Use "icon icon-*" classes for sort-handler, collapsible fieldsets and collapsible versionsClosedGo MAEDAActions

Updated by Marius BĂLTEANU about 10 years ago Actions #2

Added the last patches:

- 05_use_regular_icons_in_search_results.patch:

The change from the view (app/views/search/index.html) was required because the classes in the search page are delimited by space and not by "-" like in the activity page even if are the same events. I think that this fix should be made in the Search and libs modules in order to return the same event_type for closed issues, but I wasn't able to do it.

event type: closed issue
class in activity: "issue-closed"
class in search: "issue closed"

- 06_other_pages.patch

Changes in various pages: like favorite projects, members, attachments, forums.

- 07_small_improvement.patch:

The class "icon" should not have the rules with padding-top and padding-bottom because these are required only when the font size is smaller than the default one (like is in the contextual block or calendar).

- Updated an already uploaded patch to use the background-image rule and not just the background rule.

- There are some rules in the CSS file that I wasn't able to find them in the application:

table.boards a.board { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
span.add_attachment a {padding-left:16px; background: url(../images/bullet_add.png) no-repeat 0 50%; }
.task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }
.task_done { background:#00c600 url(../images/task_done.png); border: 1px solid #00c600; }
.task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }
... 
.project.task_late { background:#f66 url(../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
.project.task_done { background:#00c600 url(../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
.project.task_todo { background:#fff url(../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
.project.marker { background-image:url(../images/project_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }

Any feedback is welcome on this issue.

Updated by Jean-Philippe Lang about 10 years ago Actions #3

  • Target version set to 3.4.0

Updated by Jean-Philippe Lang about 10 years ago Actions #4

Activity view: event type class preserved in addition to the icon-* class.

Updated by Marius BĂLTEANU about 10 years ago Actions #5

Jean-Philippe Lang wrote:

Activity view: event type class preserved in addition to the icon-* class.

I've updated the patch 05_use_regular_icons_in_search_results.patch in order to preserve the event type class like you made in the activity.

Thanks for committing this patch so fast.

Updated by Jean-Philippe Lang about 10 years ago Actions #6

Marius BALTEANU wrote:

- 05_use_regular_icons_in_search_results.patch:

The change from the view (app/views/search/index.html) was required because the classes in the search page are delimited by space and not by "-" like in the activity page even if are the same events. I think that this fix should be made in the Search and libs modules in order to return the same event_type for closed issues, but I wasn't able to do it.

There was a difference between Issue and Journal acts_as_event definition. It's fixed and I've removed the #parameterize call from the patch.

Updated by Jean-Philippe Lang about 10 years ago Actions #7

Patch 6 committed with several changes. I've added a few icon-* (eg. icon-sticky) classes that are more meaningful than icon-arrow-right, even if they actually use the same image in the default CSS.

Updated by Jean-Philippe Lang about 10 years ago Actions #8

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

And I've hidden the user icon on the member list, just like it was before the patches.

All patches are now committed, thanks.

Updated by Marius BĂLTEANU about 10 years ago Actions #9

Thanks Jean-Philippe Lang for your feedback on these patches.

I think that one more change is required, you committed the 02_use_regular_icons_in_overview_tab.patch and not the second version of the patch 02_use_regular_icons_in_overview_tab_v2.patch which contains a small fix for .icon-new class.

 
.icon-news { background: url(../images/news.png); }
 

should be
.icon-news { background-image: url(../images/news.png); }

Updated by Jean-Philippe Lang about 10 years ago Actions #10

Marius BALTEANU wrote:

I think that one more change is required

Committed, thanks.

Updated by Mischa The Evil over 9 years ago Actions #11

  • Subject changed from Use the regular "icon icon-*" classes for all elements with icons to Use the regular "icon icon-*" classes for all elements with icons

Updated by Marius BĂLTEANU over 8 years ago Actions #12

  • Related to Patch #28605: Add the missing icon class to the items with icons from the contextual menu added

Updated by Marius BĂLTEANU over 7 years ago Actions #13

  • Related to Patch #31433: Use "icon icon-*" classes for sort-handler, collapsible fieldsets and collapsible versions added
Actions

Also available in: PDF Atom