mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 12:38:30 +08:00
Ellipsis with css for Sidebar
This commit is contained in:
parent
cd9a89a586
commit
765a577669
5 changed files with 9 additions and 19 deletions
|
@ -191,15 +191,6 @@ var HelperModule = (function(){
|
|||
|
||||
var helpers = {};
|
||||
|
||||
helpers.treeLinkTruncation = function() {
|
||||
$('.tree-link a').each( function(){
|
||||
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
|
||||
});
|
||||
$(".tree-link span").each( function(){
|
||||
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
|
||||
});
|
||||
}
|
||||
|
||||
helpers.hideFlashMsg = function() {
|
||||
var flash = $('.alert');
|
||||
if (flash.length > 0) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<ul>
|
||||
<% if can_create_repositories?(current_team) %>
|
||||
<li>
|
||||
<span class="tree-link link-wrap no-indent">
|
||||
<span class="tree-link no-indent">
|
||||
<a class="sidebar-button create-new-repository" data-remote="true"
|
||||
href="<%= create_modal_team_repositories_path(current_team) %>">
|
||||
<span class="fas fa-plus"></span>
|
||||
|
@ -15,11 +15,10 @@
|
|||
<% end %>
|
||||
<% repositories.each do |repository| %>
|
||||
<li class="<%= 'active parent_li' if current_page?(repository_path(repository)) %>" >
|
||||
<span class="tree-link line-wrap no-indent">
|
||||
<span class="tree-link no-indent" title="<%= repository.name %>">
|
||||
<%= link_to repository.name,
|
||||
repository_path(repository),
|
||||
class: current_page?(repository_path(repository)) ? 'disabled' : '',
|
||||
title: repository.name,
|
||||
class: current_page?(repository_path(repository)) ? 'disabled line-wrap' : 'line-wrap',
|
||||
data: { 'no-turbolink' => 'true', type: 'repository', id: repository.id } %>
|
||||
<%= inventory_shared_status_icon(repository, current_team) %>
|
||||
</span>
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
<% project.active_experiments.each do |experiment| %>
|
||||
<% cache [action_name, current_user, experiment] do %>
|
||||
<li data-parent="candidate">
|
||||
<span class="tree-link line-wrap first-indent">
|
||||
<span class="tree-link line-wrap first-indent" title="<%= experiment.name %>">
|
||||
<i class="no-arrow"></i>
|
||||
<%= link_to experiment.name,
|
||||
experiment_action_to_link_to(experiment),
|
||||
title: experiment.name,
|
||||
class: 'overview_exp_label',
|
||||
class: 'overview_exp_label line-wrap',
|
||||
data: { type: 'experiment', id: experiment.id }
|
||||
%>
|
||||
</span>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<ul>
|
||||
<% experiment.active_my_modules.each do |my_module| %>
|
||||
<li class="leaf" data-module-id="<%= my_module.id %>">
|
||||
<span class="tree-link task-tree-link second-indent">
|
||||
<span class="tree-link task-tree-link second-indent" title="<%= my_module.name %>">
|
||||
<%= link_to my_module.name,
|
||||
module_action_to_link_to(my_module),
|
||||
title: my_module.name,
|
||||
class: 'line-wrap',
|
||||
data: { type: 'my_module', id: my_module.id } %>
|
||||
</span>
|
||||
</li>
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
<% @projects_tree.each do |project| %>
|
||||
<% cache [action_name, current_user, project] do %>
|
||||
<li data-parent="candidate">
|
||||
<span class="tree-link line-wrap no-indent">
|
||||
<span class="tree-link no-indent" title="<%= project.name %>">
|
||||
<i class="no-arrow"></i>
|
||||
<%= link_to project.name,
|
||||
project_action_to_link_to(project),
|
||||
title: project.name,
|
||||
class: 'line-wrap',
|
||||
data: { type: 'project', id: project.id } %>
|
||||
</span>
|
||||
<%= render partial: 'shared/sidebar/experiments', locals: { project: project } %>
|
||||
|
|
Loading…
Reference in a new issue