Commit 03770698 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use css truncation instead of rails

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 18fac587
......@@ -119,3 +119,12 @@ pre.well-pre {
padding: 0;
color: #666;
}
.str-truncated {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
max-width: 82%;
}
......@@ -481,6 +481,10 @@ li.commit {
font-family: $monospace_font;
}
.str-truncated {
max-width: 70%;
}
.commit-row-message {
color: #333;
font-weight: 500;
......
......@@ -61,6 +61,10 @@
top:-1px;
}
}
.tree_time_ago {
min-width: 135px;
}
}
.tree_author {
......
= link_to project_path(project), class: dom_class(project) do
.dash-project-access-icon
= visibility_level_icon(project.visibility_level)
%span.str-truncated
%span.namespace-name
- if project.namespace
= project.namespace.human_name
\/
%span.project-name.filter-title
= truncate(project.name, length: 25)
= project.name
%span.arrow
%i.icon-angle-right
......@@ -14,6 +14,7 @@
= link_to project_path(project), class: dom_class(project) do
.dash-project-access-icon
= visibility_level_icon(project.visibility_level)
%span.str-truncated
%span.project-name
= truncate(project.name, length: 25)
%span.arrow
......
......@@ -2,7 +2,8 @@
.commit-row-title
= link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
&nbsp;
= link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "commit-row-message"
%span.str-truncated
= link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message"
= link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
.notes_count
- notes = project.notes.for_commit_id(commit.id)
......
......@@ -5,7 +5,8 @@
.issue-title
%span.light= "##{issue.iid}"
= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
%span.str-truncated
= link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title"
- if issue.closed?
%small.pull-right
= "CLOSED"
......
%tr{ class: "tree-item #{tree_hex_class(blob_item)}" }
%td.tree-item-file-name
= tree_icon(type)
%span= link_to truncate(blob_item.name, length: 40), project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name))
%span.str-truncated
= link_to blob_item.name, project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name))
%td.tree_time_ago.cgray
%span.log_loading.hide
Loading commit data...
......
%span.tree_author= commit_author_link(commit, avatar: true, size: 16)
= link_to_gfm truncate(commit.title, length: 80), project_commit_path(@project, commit.id), class: "tree-commit-link"
%span.str-truncated
%span.tree_author= commit_author_link(commit, avatar: true, size: 16)
= link_to_gfm commit.title, project_commit_path(@project, commit.id), class: "tree-commit-link"
%tr{ class: "tree-item #{tree_hex_class(tree_item)}" }
%td.tree-item-file-name
= tree_icon(type)
%span= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
%span.str-truncated
= link_to tree_item.name, project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
%td.tree_time_ago.cgray
%span.log_loading.hide
Loading commit data...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment